function b9(t,e){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();var kc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function f2(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var hp={exports:{}},el={};/** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var aC;function w9(){if(aC)return el;aC=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,a,i){var o=null;if(i!==void 0&&(o=""+i),a.key!==void 0&&(o=""+a.key),"key"in a){i={};for(var s in a)s!=="key"&&(i[s]=a[s])}else i=a;return a=i.ref,{$$typeof:t,type:n,key:o,ref:a!==void 0?a:null,props:i}}return el.Fragment=e,el.jsx=r,el.jsxs=r,el}var iC;function x9(){return iC||(iC=1,hp.exports=w9()),hp.exports}var vt=x9(),vp={exports:{}},et={};/** * @license React * react.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var oC;function _9(){if(oC)return et;oC=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),o=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.iterator;function g(z){return z===null||typeof z!="object"?null:(z=h&&z[h]||z["@@iterator"],typeof z=="function"?z:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,b={};function w(z,H,Z){this.props=z,this.context=H,this.refs=b,this.updater=Z||p}w.prototype.isReactComponent={},w.prototype.setState=function(z,H){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,H,"setState")},w.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function x(){}x.prototype=w.prototype;function E(z,H,Z){this.props=z,this.context=H,this.refs=b,this.updater=Z||p}var S=E.prototype=new x;S.constructor=E,y(S,w.prototype),S.isPureReactComponent=!0;var C=Array.isArray,A={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function M(z,H,Z,J,U,K){return Z=K.ref,{$$typeof:t,type:z,key:H,ref:Z!==void 0?Z:null,props:K}}function R(z,H){return M(z.type,H,void 0,void 0,void 0,z.props)}function O(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function B(z){var H={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(Z){return H[Z]})}var k=/\/+/g;function N(z,H){return typeof z=="object"&&z!==null&&z.key!=null?B(""+z.key):H.toString(36)}function L(){}function q(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(L,L):(z.status="pending",z.then(function(H){z.status==="pending"&&(z.status="fulfilled",z.value=H)},function(H){z.status==="pending"&&(z.status="rejected",z.reason=H)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function V(z,H,Z,J,U){var K=typeof z;(K==="undefined"||K==="boolean")&&(z=null);var j=!1;if(z===null)j=!0;else switch(K){case"bigint":case"string":case"number":j=!0;break;case"object":switch(z.$$typeof){case t:case e:j=!0;break;case d:return j=z._init,V(j(z._payload),H,Z,J,U)}}if(j)return U=U(z),j=J===""?"."+N(z,0):J,C(U)?(Z="",j!=null&&(Z=j.replace(k,"$&/")+"/"),V(U,H,Z,"",function(ee){return ee})):U!=null&&(O(U)&&(U=R(U,Z+(U.key==null||z&&z.key===U.key?"":(""+U.key).replace(k,"$&/")+"/")+j)),H.push(U)),1;j=0;var re=J===""?".":J+":";if(C(z))for(var ne=0;ne>>1,z=P[Y];if(0>>1;Ya(J,F))Ua(K,J)?(P[Y]=K,P[U]=F,Y=U):(P[Y]=J,P[Z]=F,Y=Z);else if(Ua(K,F))P[Y]=K,P[U]=F,Y=U;else break e}}return $}function a(P,$){var F=P.sortIndex-$.sortIndex;return F!==0?F:P.id-$.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();t.unstable_now=function(){return o.now()-s}}var l=[],f=[],d=1,h=null,g=3,p=!1,y=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function S(P){for(var $=r(f);$!==null;){if($.callback===null)n(f);else if($.startTime<=P)n(f),$.sortIndex=$.expirationTime,e(l,$);else break;$=r(f)}}function C(P){if(b=!1,S(P),!y)if(r(l)!==null)y=!0,q();else{var $=r(f);$!==null&&V(C,$.startTime-P)}}var A=!1,D=-1,M=5,R=-1;function O(){return!(t.unstable_now()-RP&&O());){var Y=h.callback;if(typeof Y=="function"){h.callback=null,g=h.priorityLevel;var z=Y(h.expirationTime<=P);if(P=t.unstable_now(),typeof z=="function"){h.callback=z,S(P),$=!0;break t}h===r(l)&&n(l),S(P)}else n(l);h=r(l)}if(h!==null)$=!0;else{var H=r(f);H!==null&&V(C,H.startTime-P),$=!1}}break e}finally{h=null,g=F,p=!1}$=void 0}}finally{$?k():A=!1}}}var k;if(typeof E=="function")k=function(){E(B)};else if(typeof MessageChannel<"u"){var N=new MessageChannel,L=N.port2;N.port1.onmessage=B,k=function(){L.postMessage(null)}}else k=function(){w(B,0)};function q(){A||(A=!0,k())}function V(P,$){D=w(function(){P(t.unstable_now())},$)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(P){P.callback=null},t.unstable_continueExecution=function(){y||p||(y=!0,q())},t.unstable_forceFrameRate=function(P){0>P||125Y?(P.sortIndex=F,e(f,P),r(l)===null&&P===r(f)&&(b?(x(D),D=-1):b=!0,V(C,F-Y))):(P.sortIndex=z,e(l,P),y||p||(y=!0,q())),P},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(P){var $=g;return function(){var F=g;g=$;try{return P.apply(this,arguments)}finally{g=F}}}}(mp)),mp}var fC;function T9(){return fC||(fC=1,pp.exports=S9()),pp.exports}var yp={exports:{}},Dr={};/** * @license React * react-dom.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var cC;function C9(){if(cC)return Dr;cC=1;var t=c2();function e(l){var f="https://react.dev/errors/"+l;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),yp.exports=C9(),yp.exports}/** * @license React * react-dom-client.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var hC;function A9(){if(hC)return tl;hC=1;var t=T9(),e=c2(),r=cL();function n(u){var c="https://react.dev/errors/"+u;if(1)":-1_||Q[m]!==ie[_]){var me=` `+Q[m].replace(" at new "," at ");return u.displayName&&me.includes("")&&(me=me.replace("",u.displayName)),me}while(1<=m&&0<=_);break}}}finally{q=!1,Error.prepareStackTrace=v}return(v=u?u.displayName||u.name:"")?L(v):""}function P(u){switch(u.tag){case 26:case 27:case 5:return L(u.type);case 16:return L("Lazy");case 13:return L("Suspense");case 19:return L("SuspenseList");case 0:case 15:return u=V(u.type,!1),u;case 11:return u=V(u.type.render,!1),u;case 1:return u=V(u.type,!0),u;default:return""}}function $(u){try{var c="";do c+=P(u),u=u.return;while(u);return c}catch(v){return` Error generating stack: `+v.message+` `+v.stack}}function F(u){var c=u,v=u;if(u.alternate)for(;c.return;)c=c.return;else{u=c;do c=u,(c.flags&4098)!==0&&(v=c.return),u=c.return;while(u)}return c.tag===3?v:null}function Y(u){if(u.tag===13){var c=u.memoizedState;if(c===null&&(u=u.alternate,u!==null&&(c=u.memoizedState)),c!==null)return c.dehydrated}return null}function z(u){if(F(u)!==u)throw Error(n(188))}function H(u){var c=u.alternate;if(!c){if(c=F(u),c===null)throw Error(n(188));return c!==u?null:u}for(var v=u,m=c;;){var _=v.return;if(_===null)break;var T=_.alternate;if(T===null){if(m=_.return,m!==null){v=m;continue}break}if(_.child===T.child){for(T=_.child;T;){if(T===v)return z(_),u;if(T===m)return z(_),c;T=T.sibling}throw Error(n(188))}if(v.return!==m.return)v=_,m=T;else{for(var I=!1,G=_.child;G;){if(G===v){I=!0,v=_,m=T;break}if(G===m){I=!0,m=_,v=T;break}G=G.sibling}if(!I){for(G=T.child;G;){if(G===v){I=!0,v=T,m=_;break}if(G===m){I=!0,m=T,v=_;break}G=G.sibling}if(!I)throw Error(n(189))}}if(v.alternate!==m)throw Error(n(190))}if(v.tag!==3)throw Error(n(188));return v.stateNode.current===v?u:c}function Z(u){var c=u.tag;if(c===5||c===26||c===27||c===6)return u;for(u=u.child;u!==null;){if(c=Z(u),c!==null)return c;u=u.sibling}return null}var J=Array.isArray,U=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K={pending:!1,data:null,method:null,action:null},j=[],re=-1;function ne(u){return{current:u}}function ee(u){0>re||(u.current=j[re],j[re]=null,re--)}function W(u,c){re++,j[re]=u.current,u.current=c}var te=ne(null),ce=ne(null),de=ne(null),ye=ne(null);function we(u,c){switch(W(de,c),W(ce,u),W(te,null),u=c.nodeType,u){case 9:case 11:c=(c=c.documentElement)&&(c=c.namespaceURI)?LT(c):0;break;default:if(u=u===8?c.parentNode:c,c=u.tagName,u=u.namespaceURI)u=LT(u),c=NT(u,c);else switch(c){case"svg":c=1;break;case"math":c=2;break;default:c=0}}ee(te),W(te,c)}function Pe(){ee(te),ee(ce),ee(de)}function Re(u){u.memoizedState!==null&&W(ye,u);var c=te.current,v=NT(c,u.type);c!==v&&(W(ce,u),W(te,v))}function Te(u){ce.current===u&&(ee(te),ee(ce)),ye.current===u&&(ee(ye),js._currentValue=K)}var Ce=Object.prototype.hasOwnProperty,Be=t.unstable_scheduleCallback,$e=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Ne=t.unstable_requestPaint,ze=t.unstable_now,Je=t.unstable_getCurrentPriorityLevel,xe=t.unstable_ImmediatePriority,X=t.unstable_UserBlockingPriority,oe=t.unstable_NormalPriority,ve=t.unstable_LowPriority,ue=t.unstable_IdlePriority,fe=t.log,Ae=t.unstable_setDisableYieldValue,ge=null,Se=null;function Fe(u){if(Se&&typeof Se.onCommitFiberRoot=="function")try{Se.onCommitFiberRoot(ge,u,void 0,(u.current.flags&128)===128)}catch{}}function Ue(u){if(typeof fe=="function"&&Ae(u),Se&&typeof Se.setStrictMode=="function")try{Se.setStrictMode(ge,u)}catch{}}var Oe=Math.clz32?Math.clz32:Ge,Ze=Math.log,Qe=Math.LN2;function Ge(u){return u>>>=0,u===0?32:31-(Ze(u)/Qe|0)|0}var dt=128,bt=4194304;function Ut(u){var c=u&42;if(c!==0)return c;switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return u&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return u}}function dr(u,c){var v=u.pendingLanes;if(v===0)return 0;var m=0,_=u.suspendedLanes,T=u.pingedLanes,I=u.warmLanes;u=u.finishedLanes!==0;var G=v&134217727;return G!==0?(v=G&~_,v!==0?m=Ut(v):(T&=G,T!==0?m=Ut(T):u||(I=G&~I,I!==0&&(m=Ut(I))))):(G=v&~_,G!==0?m=Ut(G):T!==0?m=Ut(T):u||(I=v&~I,I!==0&&(m=Ut(I)))),m===0?0:c!==0&&c!==m&&(c&_)===0&&(_=m&-m,I=c&-c,_>=I||_===32&&(I&4194176)!==0)?c:m}function Mt(u,c){return(u.pendingLanes&~(u.suspendedLanes&~u.pingedLanes)&c)===0}function jt(u,c){switch(u){case 1:case 2:case 4:case 8:return c+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Gt(){var u=dt;return dt<<=1,(dt&4194176)===0&&(dt=128),u}function hr(){var u=bt;return bt<<=1,(bt&62914560)===0&&(bt=4194304),u}function rr(u){for(var c=[],v=0;31>v;v++)c.push(u);return c}function Mr(u,c){u.pendingLanes|=c,c!==268435456&&(u.suspendedLanes=0,u.pingedLanes=0,u.warmLanes=0)}function Fr(u,c,v,m,_,T){var I=u.pendingLanes;u.pendingLanes=v,u.suspendedLanes=0,u.pingedLanes=0,u.warmLanes=0,u.expiredLanes&=v,u.entangledLanes&=v,u.errorRecoveryDisabledLanes&=v,u.shellSuspendCounter=0;var G=u.entanglements,Q=u.expirationTimes,ie=u.hiddenUpdates;for(v=I&~v;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vi=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Hr={},Sf={};function hq(u){return Ce.call(Sf,u)?!0:Ce.call(Hr,u)?!1:Vi.test(u)?Sf[u]=!0:(Hr[u]=!0,!1)}function Tf(u,c,v){if(hq(c))if(v===null)u.removeAttribute(c);else{switch(typeof v){case"undefined":case"function":case"symbol":u.removeAttribute(c);return;case"boolean":var m=c.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){u.removeAttribute(c);return}}u.setAttribute(c,""+v)}}function Cf(u,c,v){if(v===null)u.removeAttribute(c);else{switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":u.removeAttribute(c);return}u.setAttribute(c,""+v)}}function _a(u,c,v,m){if(m===null)u.removeAttribute(v);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":u.removeAttribute(v);return}u.setAttributeNS(c,v,""+m)}}function dn(u){switch(typeof u){case"bigint":case"boolean":case"number":case"string":case"undefined":return u;case"object":return u;default:return""}}function q_(u){var c=u.type;return(u=u.nodeName)&&u.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function vq(u){var c=q_(u)?"checked":"value",v=Object.getOwnPropertyDescriptor(u.constructor.prototype,c),m=""+u[c];if(!u.hasOwnProperty(c)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var _=v.get,T=v.set;return Object.defineProperty(u,c,{configurable:!0,get:function(){return _.call(this)},set:function(I){m=""+I,T.call(this,I)}}),Object.defineProperty(u,c,{enumerable:v.enumerable}),{getValue:function(){return m},setValue:function(I){m=""+I},stopTracking:function(){u._valueTracker=null,delete u[c]}}}}function Af(u){u._valueTracker||(u._valueTracker=vq(u))}function P_(u){if(!u)return!1;var c=u._valueTracker;if(!c)return!0;var v=c.getValue(),m="";return u&&(m=q_(u)?u.checked?"true":"false":u.value),u=m,u!==v?(c.setValue(u),!0):!1}function Rf(u){if(u=u||(typeof document<"u"?document:void 0),typeof u>"u")return null;try{return u.activeElement||u.body}catch{return u.body}}var gq=/[\n"\\]/g;function hn(u){return u.replace(gq,function(c){return"\\"+c.charCodeAt(0).toString(16)+" "})}function cv(u,c,v,m,_,T,I,G){u.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?u.type=I:u.removeAttribute("type"),c!=null?I==="number"?(c===0&&u.value===""||u.value!=c)&&(u.value=""+dn(c)):u.value!==""+dn(c)&&(u.value=""+dn(c)):I!=="submit"&&I!=="reset"||u.removeAttribute("value"),c!=null?dv(u,I,dn(c)):v!=null?dv(u,I,dn(v)):m!=null&&u.removeAttribute("value"),_==null&&T!=null&&(u.defaultChecked=!!T),_!=null&&(u.checked=_&&typeof _!="function"&&typeof _!="symbol"),G!=null&&typeof G!="function"&&typeof G!="symbol"&&typeof G!="boolean"?u.name=""+dn(G):u.removeAttribute("name")}function z_(u,c,v,m,_,T,I,G){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(u.type=T),c!=null||v!=null){if(!(T!=="submit"&&T!=="reset"||c!=null))return;v=v!=null?""+dn(v):"",c=c!=null?""+dn(c):v,G||c===u.value||(u.value=c),u.defaultValue=c}m=m??_,m=typeof m!="function"&&typeof m!="symbol"&&!!m,u.checked=G?u.checked:!!m,u.defaultChecked=!!m,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(u.name=I)}function dv(u,c,v){c==="number"&&Rf(u.ownerDocument)===u||u.defaultValue===""+v||(u.defaultValue=""+v)}function Bo(u,c,v,m){if(u=u.options,c){c={};for(var _=0;_=hs),Q_=" ",W_=!1;function J_(u,c){switch(u){case"keyup":return Hq.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eE(u){return u=u.detail,typeof u=="object"&&"data"in u?u.data:null}var Io=!1;function Gq(u,c){switch(u){case"compositionend":return eE(c);case"keypress":return c.which!==32?null:(W_=!0,Q_);case"textInput":return u=c.data,u===Q_&&W_?null:u;default:return null}}function Yq(u,c){if(Io)return u==="compositionend"||!Ev&&J_(u,c)?(u=G_(),Of=yv=Wa=null,Io=!1,u):null;switch(u){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1=c)return{node:v,offset:c-u};u=m}e:{for(;v;){if(v.nextSibling){v=v.nextSibling;break e}v=v.parentNode}v=void 0}v=sE(v)}}function fE(u,c){return u&&c?u===c?!0:u&&u.nodeType===3?!1:c&&c.nodeType===3?fE(u,c.parentNode):"contains"in u?u.contains(c):u.compareDocumentPosition?!!(u.compareDocumentPosition(c)&16):!1:!1}function cE(u){u=u!=null&&u.ownerDocument!=null&&u.ownerDocument.defaultView!=null?u.ownerDocument.defaultView:window;for(var c=Rf(u.document);c instanceof u.HTMLIFrameElement;){try{var v=typeof c.contentWindow.location.href=="string"}catch{v=!1}if(v)u=c.contentWindow;else break;c=Rf(u.document)}return c}function Cv(u){var c=u&&u.nodeName&&u.nodeName.toLowerCase();return c&&(c==="input"&&(u.type==="text"||u.type==="search"||u.type==="tel"||u.type==="url"||u.type==="password")||c==="textarea"||u.contentEditable==="true")}function eP(u,c){var v=cE(c);c=u.focusedElem;var m=u.selectionRange;if(v!==c&&c&&c.ownerDocument&&fE(c.ownerDocument.documentElement,c)){if(m!==null&&Cv(c)){if(u=m.start,v=m.end,v===void 0&&(v=u),"selectionStart"in c)c.selectionStart=u,c.selectionEnd=Math.min(v,c.value.length);else if(v=(u=c.ownerDocument||document)&&u.defaultView||window,v.getSelection){v=v.getSelection();var _=c.textContent.length,T=Math.min(m.start,_);m=m.end===void 0?T:Math.min(m.end,_),!v.extend&&T>m&&(_=m,m=T,T=_),_=lE(c,T);var I=lE(c,m);_&&I&&(v.rangeCount!==1||v.anchorNode!==_.node||v.anchorOffset!==_.offset||v.focusNode!==I.node||v.focusOffset!==I.offset)&&(u=u.createRange(),u.setStart(_.node,_.offset),v.removeAllRanges(),T>m?(v.addRange(u),v.extend(I.node,I.offset)):(u.setEnd(I.node,I.offset),v.addRange(u)))}}for(u=[],v=c;v=v.parentNode;)v.nodeType===1&&u.push({element:v,left:v.scrollLeft,top:v.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c=document.documentMode,Vo=null,Av=null,ms=null,Rv=!1;function dE(u,c,v){var m=v.window===v?v.document:v.nodeType===9?v:v.ownerDocument;Rv||Vo==null||Vo!==Rf(m)||(m=Vo,"selectionStart"in m&&Cv(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),ms&&ps(ms,m)||(ms=m,m=mc(Av,"onSelect"),0>=I,_-=I,Ea=1<<32-Oe(c)+_|v<<_|m,Sa=T+u}else Ea=1<Ke?(pr=Ie,Ie=null):pr=Ie.sibling;var ft=he(se,Ie,le[Ke],be);if(ft===null){Ie===null&&(Ie=pr);break}u&&Ie&&ft.alternate===null&&c(se,Ie),ae=T(ft,ae,Ke),nt===null?ke=ft:nt.sibling=ft,nt=ft,Ie=pr}if(Ke===le.length)return v(se,Ie),lt&&Gi(se,Ke),ke;if(Ie===null){for(;KeKe?(pr=Ie,Ie=null):pr=Ie.sibling;var yi=he(se,Ie,ft.value,be);if(yi===null){Ie===null&&(Ie=pr);break}u&&Ie&&yi.alternate===null&&c(se,Ie),ae=T(yi,ae,Ke),nt===null?ke=yi:nt.sibling=yi,nt=yi,Ie=pr}if(ft.done)return v(se,Ie),lt&&Gi(se,Ke),ke;if(Ie===null){for(;!ft.done;Ke++,ft=le.next())ft=_e(se,ft.value,be),ft!==null&&(ae=T(ft,ae,Ke),nt===null?ke=ft:nt.sibling=ft,nt=ft);return lt&&Gi(se,Ke),ke}for(Ie=m(Ie);!ft.done;Ke++,ft=le.next())ft=pe(Ie,se,Ke,ft.value,be),ft!==null&&(u&&ft.alternate!==null&&Ie.delete(ft.key===null?Ke:ft.key),ae=T(ft,ae,Ke),nt===null?ke=ft:nt.sibling=ft,nt=ft);return u&&Ie.forEach(function(y9){return c(se,y9)}),lt&&Gi(se,Ke),ke}function $t(se,ae,le,be){if(typeof le=="object"&&le!==null&&le.type===l&&le.key===null&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case o:e:{for(var ke=le.key;ae!==null;){if(ae.key===ke){if(ke=le.type,ke===l){if(ae.tag===7){v(se,ae.sibling),be=_(ae,le.props.children),be.return=se,se=be;break e}}else if(ae.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===E&&ME(ke)===ae.type){v(se,ae.sibling),be=_(ae,le.props),Ss(be,le),be.return=se,se=be;break e}v(se,ae);break}else c(se,ae);ae=ae.sibling}le.type===l?(be=ro(le.props.children,se.mode,be,le.key),be.return=se,se=be):(be=uc(le.type,le.key,le.props,null,se.mode,be),Ss(be,le),be.return=se,se=be)}return I(se);case s:e:{for(ke=le.key;ae!==null;){if(ae.key===ke)if(ae.tag===4&&ae.stateNode.containerInfo===le.containerInfo&&ae.stateNode.implementation===le.implementation){v(se,ae.sibling),be=_(ae,le.children||[]),be.return=se,se=be;break e}else{v(se,ae);break}else c(se,ae);ae=ae.sibling}be=Og(le,se.mode,be),be.return=se,se=be}return I(se);case E:return ke=le._init,le=ke(le._payload),$t(se,ae,le,be)}if(J(le))return qe(se,ae,le,be);if(D(le)){if(ke=D(le),typeof ke!="function")throw Error(n(150));return le=ke.call(le),We(se,ae,le,be)}if(typeof le.then=="function")return $t(se,ae,Ff(le),be);if(le.$$typeof===p)return $t(se,ae,ac(se,le),be);Hf(se,le)}return typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint"?(le=""+le,ae!==null&&ae.tag===6?(v(se,ae.sibling),be=_(ae,le),be.return=se,se=be):(v(se,ae),be=Mg(le,se.mode,be),be.return=se,se=be),I(se)):v(se,ae)}return function(se,ae,le,be){try{Es=0;var ke=$t(se,ae,le,be);return Yo=null,ke}catch(Ie){if(Ie===xs)throw Ie;var nt=xn(29,Ie,null,se.mode);return nt.lanes=be,nt.return=se,nt}finally{}}}var Xi=OE(!0),DE=OE(!1),Xo=ne(null),Uf=ne(0);function kE(u,c){u=Ba,W(Uf,u),W(Xo,c),Ba=u|c.baseLanes}function qv(){W(Uf,Ba),W(Xo,Xo.current)}function Pv(){Ba=Uf.current,ee(Xo),ee(Uf)}var yn=ne(null),jn=null;function ei(u){var c=u.alternate;W(ir,ir.current&1),W(yn,u),jn===null&&(c===null||Xo.current!==null||c.memoizedState!==null)&&(jn=u)}function LE(u){if(u.tag===22){if(W(ir,ir.current),W(yn,u),jn===null){var c=u.alternate;c!==null&&c.memoizedState!==null&&(jn=u)}}else ti()}function ti(){W(ir,ir.current),W(yn,yn.current)}function Ta(u){ee(yn),jn===u&&(jn=null),ee(ir)}var ir=ne(0);function Gf(u){for(var c=u;c!==null;){if(c.tag===13){var v=c.memoizedState;if(v!==null&&(v=v.dehydrated,v===null||v.data==="$?"||v.data==="$!"))return c}else if(c.tag===19&&c.memoizedProps.revealOrder!==void 0){if((c.flags&128)!==0)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===u)break;for(;c.sibling===null;){if(c.return===null||c.return===u)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var iP=typeof AbortController<"u"?AbortController:function(){var u=[],c=this.signal={aborted:!1,addEventListener:function(v,m){u.push(m)}};this.abort=function(){c.aborted=!0,u.forEach(function(v){return v()})}},oP=t.unstable_scheduleCallback,uP=t.unstable_NormalPriority,or={$$typeof:p,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zv(){return{controller:new iP,data:new Map,refCount:0}}function Ts(u){u.refCount--,u.refCount===0&&oP(uP,function(){u.controller.abort()})}var Cs=null,Iv=0,Ko=0,jo=null;function sP(u,c){if(Cs===null){var v=Cs=[];Iv=0,Ko=Gg(),jo={status:"pending",value:void 0,then:function(m){v.push(m)}}}return Iv++,c.then(NE,NE),c}function NE(){if(--Iv===0&&Cs!==null){jo!==null&&(jo.status="fulfilled");var u=Cs;Cs=null,Ko=0,jo=null;for(var c=0;cT?T:8;var I=O.T,G={};O.T=G,rg(u,!1,c,v);try{var Q=_(),ie=O.S;if(ie!==null&&ie(G,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var me=lP(Q,m);Ms(u,c,me,rn(u))}else Ms(u,c,m,rn(u))}catch(_e){Ms(u,c,{then:function(){},status:"rejected",reason:_e},rn())}finally{U.p=T,O.T=I}}function vP(){}function eg(u,c,v,m){if(u.tag!==5)throw Error(n(476));var _=cS(u).queue;fS(u,_,c,K,v===null?vP:function(){return dS(u),v(m)})}function cS(u){var c=u.memoizedState;if(c!==null)return c;c={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:K},next:null};var v={};return c.next={memoizedState:v,baseState:v,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:v},next:null},u.memoizedState=c,u=u.alternate,u!==null&&(u.memoizedState=c),c}function dS(u){var c=cS(u).next.queue;Ms(u,c,{},rn())}function tg(){return Or(js)}function hS(){return Wt().memoizedState}function vS(){return Wt().memoizedState}function gP(u){for(var c=u.return;c!==null;){switch(c.tag){case 24:case 3:var v=rn();u=oi(v);var m=ui(c,u,v);m!==null&&(zr(m,c,v),ks(m,c,v)),c={cache:zv()},u.payload=c;return}c=c.return}}function pP(u,c,v){var m=rn();v={lane:m,revertLane:0,action:v,hasEagerState:!1,eagerState:null,next:null},ec(u)?pS(c,v):(v=Dv(u,c,v,m),v!==null&&(zr(v,u,m),mS(v,c,m)))}function gS(u,c,v){var m=rn();Ms(u,c,v,m)}function Ms(u,c,v,m){var _={lane:m,revertLane:0,action:v,hasEagerState:!1,eagerState:null,next:null};if(ec(u))pS(c,_);else{var T=u.alternate;if(u.lanes===0&&(T===null||T.lanes===0)&&(T=c.lastRenderedReducer,T!==null))try{var I=c.lastRenderedState,G=T(I,v);if(_.hasEagerState=!0,_.eagerState=G,Wr(G,I))return Pf(u,c,_,0),Tt===null&&qf(),!1}catch{}finally{}if(v=Dv(u,c,_,m),v!==null)return zr(v,u,m),mS(v,c,m),!0}return!1}function rg(u,c,v,m){if(m={lane:2,revertLane:Gg(),action:m,hasEagerState:!1,eagerState:null,next:null},ec(u)){if(c)throw Error(n(479))}else c=Dv(u,v,m,2),c!==null&&zr(c,u,2)}function ec(u){var c=u.alternate;return u===tt||c!==null&&c===tt}function pS(u,c){Zo=Xf=!0;var v=u.pending;v===null?c.next=c:(c.next=v.next,v.next=c),u.pending=c}function mS(u,c,v){if((v&4194176)!==0){var m=c.lanes;m&=u.pendingLanes,v|=m,c.lanes=v,sn(u,v)}}var Zn={readContext:Or,use:Zf,useCallback:Kt,useContext:Kt,useEffect:Kt,useImperativeHandle:Kt,useLayoutEffect:Kt,useInsertionEffect:Kt,useMemo:Kt,useReducer:Kt,useRef:Kt,useState:Kt,useDebugValue:Kt,useDeferredValue:Kt,useTransition:Kt,useSyncExternalStore:Kt,useId:Kt};Zn.useCacheRefresh=Kt,Zn.useMemoCache=Kt,Zn.useHostTransitionStatus=Kt,Zn.useFormState=Kt,Zn.useActionState=Kt,Zn.useOptimistic=Kt;var Zi={readContext:Or,use:Zf,useCallback:function(u,c){return Gr().memoizedState=[u,c===void 0?null:c],u},useContext:Or,useEffect:rS,useImperativeHandle:function(u,c,v){v=v!=null?v.concat([u]):null,Wf(4194308,4,iS.bind(null,c,u),v)},useLayoutEffect:function(u,c){return Wf(4194308,4,u,c)},useInsertionEffect:function(u,c){Wf(4,2,u,c)},useMemo:function(u,c){var v=Gr();c=c===void 0?null:c;var m=u();if(ji){Ue(!0);try{u()}finally{Ue(!1)}}return v.memoizedState=[m,c],m},useReducer:function(u,c,v){var m=Gr();if(v!==void 0){var _=v(c);if(ji){Ue(!0);try{v(c)}finally{Ue(!1)}}}else _=c;return m.memoizedState=m.baseState=_,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:_},m.queue=u,u=u.dispatch=pP.bind(null,tt,u),[m.memoizedState,u]},useRef:function(u){var c=Gr();return u={current:u},c.memoizedState=u},useState:function(u){u=jv(u);var c=u.queue,v=gS.bind(null,tt,c);return c.dispatch=v,[u.memoizedState,v]},useDebugValue:Wv,useDeferredValue:function(u,c){var v=Gr();return Jv(v,u,c)},useTransition:function(){var u=jv(!1);return u=fS.bind(null,tt,u.queue,!0,!1),Gr().memoizedState=u,[!1,u]},useSyncExternalStore:function(u,c,v){var m=tt,_=Gr();if(lt){if(v===void 0)throw Error(n(407));v=v()}else{if(v=c(),Tt===null)throw Error(n(349));(ot&60)!==0||VE(m,c,v)}_.memoizedState=v;var T={value:v,getSnapshot:c};return _.queue=T,rS(FE.bind(null,m,T,u),[u]),m.flags|=2048,Wo(9,$E.bind(null,m,T,v,c),{destroy:void 0},null),v},useId:function(){var u=Gr(),c=Tt.identifierPrefix;if(lt){var v=Sa,m=Ea;v=(m&~(1<<32-Oe(m)-1)).toString(32)+v,c=":"+c+"R"+v,v=Kf++,0 title"))),Er(T,m,v),T[Yt]=u,Xt(T),m=T;break e;case"link":var I=UT("link","href",_).get(m+(v.href||""));if(I){for(var G=0;G<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof m.is=="string"?_.createElement("select",{is:m.is}):_.createElement("select"),m.multiple?u.multiple=!0:m.size&&(u.size=m.size);break;default:u=typeof m.is=="string"?_.createElement(v,{is:m.is}):_.createElement(v)}}u[Yt]=c,u[Ot]=m;e:for(_=c.child;_!==null;){if(_.tag===5||_.tag===6)u.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===c)break e;for(;_.sibling===null;){if(_.return===null||_.return===c)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}c.stateNode=u;e:switch(Er(u,v,m),v){case"button":case"input":case"select":case"textarea":u=!!m.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&La(c)}}return Bt(c),c.flags&=-16777217,null;case 6:if(u&&c.stateNode!=null)u.memoizedProps!==m&&La(c);else{if(typeof m!="string"&&c.stateNode===null)throw Error(n(166));if(u=de.current,ys(c)){if(u=c.stateNode,v=c.memoizedProps,m=null,_=Pr,_!==null)switch(_.tag){case 27:case 5:m=_.memoizedProps}u[Yt]=c,u=!!(u.nodeValue===v||m!==null&&m.suppressHydrationWarning===!0||kT(u.nodeValue,v)),u||Yi(c)}else u=bc(u).createTextNode(m),u[Yt]=c,c.stateNode=u}return Bt(c),null;case 13:if(m=c.memoizedState,u===null||u.memoizedState!==null&&u.memoizedState.dehydrated!==null){if(_=ys(c),m!==null&&m.dehydrated!==null){if(u===null){if(!_)throw Error(n(318));if(_=c.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(n(317));_[Yt]=c}else bs(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;Bt(c),_=!1}else Nn!==null&&(zg(Nn),Nn=null),_=!0;if(!_)return c.flags&256?(Ta(c),c):(Ta(c),null)}if(Ta(c),(c.flags&128)!==0)return c.lanes=v,c;if(v=m!==null,u=u!==null&&u.memoizedState!==null,v){m=c.child,_=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(_=m.alternate.memoizedState.cachePool.pool);var T=null;m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(T=m.memoizedState.cachePool.pool),T!==_&&(m.flags|=2048)}return v!==u&&v&&(c.child.flags|=8192),sc(c,c.updateQueue),Bt(c),null;case 4:return Pe(),u===null&&jg(c.stateNode.containerInfo),Bt(c),null;case 10:return Ma(c.type),Bt(c),null;case 19:if(ee(ir),_=c.memoizedState,_===null)return Bt(c),null;if(m=(c.flags&128)!==0,T=_.rendering,T===null)if(m)Is(_,!1);else{if(Vt!==0||u!==null&&(u.flags&128)!==0)for(u=c.child;u!==null;){if(T=Gf(u),T!==null){for(c.flags|=128,Is(_,!1),u=T.updateQueue,c.updateQueue=u,sc(c,u),c.subtreeFlags=0,u=v,v=c.child;v!==null;)oT(v,u),v=v.sibling;return W(ir,ir.current&1|2),c.child}u=u.sibling}_.tail!==null&&ze()>lc&&(c.flags|=128,m=!0,Is(_,!1),c.lanes=4194304)}else{if(!m)if(u=Gf(T),u!==null){if(c.flags|=128,m=!0,u=u.updateQueue,c.updateQueue=u,sc(c,u),Is(_,!0),_.tail===null&&_.tailMode==="hidden"&&!T.alternate&&!lt)return Bt(c),null}else 2*ze()-_.renderingStartTime>lc&&v!==536870912&&(c.flags|=128,m=!0,Is(_,!1),c.lanes=4194304);_.isBackwards?(T.sibling=c.child,c.child=T):(u=_.last,u!==null?u.sibling=T:c.child=T,_.last=T)}return _.tail!==null?(c=_.tail,_.rendering=c,_.tail=c.sibling,_.renderingStartTime=ze(),c.sibling=null,u=ir.current,W(ir,m?u&1|2:u&1),c):(Bt(c),null);case 22:case 23:return Ta(c),Pv(),m=c.memoizedState!==null,u!==null?u.memoizedState!==null!==m&&(c.flags|=8192):m&&(c.flags|=8192),m?(v&536870912)!==0&&(c.flags&128)===0&&(Bt(c),c.subtreeFlags&6&&(c.flags|=8192)):Bt(c),v=c.updateQueue,v!==null&&sc(c,v.retryQueue),v=null,u!==null&&u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(v=u.memoizedState.cachePool.pool),m=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(m=c.memoizedState.cachePool.pool),m!==v&&(c.flags|=2048),u!==null&&ee(Ki),null;case 24:return v=null,u!==null&&(v=u.memoizedState.cache),c.memoizedState.cache!==v&&(c.flags|=2048),Ma(or),Bt(c),null;case 25:return null}throw Error(n(156,c.tag))}function EP(u,c){switch(Lv(c),c.tag){case 1:return u=c.flags,u&65536?(c.flags=u&-65537|128,c):null;case 3:return Ma(or),Pe(),u=c.flags,(u&65536)!==0&&(u&128)===0?(c.flags=u&-65537|128,c):null;case 26:case 27:case 5:return Te(c),null;case 13:if(Ta(c),u=c.memoizedState,u!==null&&u.dehydrated!==null){if(c.alternate===null)throw Error(n(340));bs()}return u=c.flags,u&65536?(c.flags=u&-65537|128,c):null;case 19:return ee(ir),null;case 4:return Pe(),null;case 10:return Ma(c.type),null;case 22:case 23:return Ta(c),Pv(),u!==null&&ee(Ki),u=c.flags,u&65536?(c.flags=u&-65537|128,c):null;case 24:return Ma(or),null;case 25:return null;default:return null}}function lT(u,c){switch(Lv(c),c.tag){case 3:Ma(or),Pe();break;case 26:case 27:case 5:Te(c);break;case 4:Pe();break;case 13:Ta(c);break;case 19:ee(ir);break;case 10:Ma(c.type);break;case 22:case 23:Ta(c),Pv(),u!==null&&ee(Ki);break;case 24:Ma(or)}}var SP={getCacheForType:function(u){var c=Or(or),v=c.data.get(u);return v===void 0&&(v=u(),c.data.set(u,v)),v}},TP=typeof WeakMap=="function"?WeakMap:Map,qt=0,Tt=null,at=null,ot=0,Ct=0,tn=null,Na=!1,ru=!1,Dg=!1,Ba=0,Vt=0,di=0,no=0,kg=0,_n=0,nu=0,Vs=null,Qn=null,Lg=!1,Ng=0,lc=1/0,fc=null,hi=null,cc=!1,ao=null,$s=0,Bg=0,qg=null,Fs=0,Pg=null;function rn(){if((qt&2)!==0&&ot!==0)return ot&-ot;if(O.T!==null){var u=Ko;return u!==0?u:Gg()}return nr()}function fT(){_n===0&&(_n=(ot&536870912)===0||lt?Gt():536870912);var u=yn.current;return u!==null&&(u.flags|=32),_n}function zr(u,c,v){(u===Tt&&Ct===2||u.cancelPendingCommit!==null)&&(au(u,0),qa(u,ot,_n,!1)),Mr(u,v),((qt&2)===0||u!==Tt)&&(u===Tt&&((qt&2)===0&&(no|=v),Vt===4&&qa(u,ot,_n,!1)),Wn(u))}function cT(u,c,v){if((qt&6)!==0)throw Error(n(327));var m=!v&&(c&60)===0&&(c&u.expiredLanes)===0||Mt(u,c),_=m?RP(u,c):$g(u,c,!0),T=m;do{if(_===0){ru&&!m&&qa(u,c,0,!1);break}else if(_===6)qa(u,c,0,!Na);else{if(v=u.current.alternate,T&&!CP(v)){_=$g(u,c,!1),T=!1;continue}if(_===2){if(T=c,u.errorRecoveryDisabledLanes&T)var I=0;else I=u.pendingLanes&-536870913,I=I!==0?I:I&536870912?536870912:0;if(I!==0){c=I;e:{var G=u;_=Vs;var Q=G.current.memoizedState.isDehydrated;if(Q&&(au(G,I).flags|=256),I=$g(G,I,!1),I!==2){if(Dg&&!Q){G.errorRecoveryDisabledLanes|=T,no|=T,_=4;break e}T=Qn,Qn=_,T!==null&&zg(T)}_=I}if(T=!1,_!==2)continue}}if(_===1){au(u,0),qa(u,c,0,!0);break}e:{switch(m=u,_){case 0:case 1:throw Error(n(345));case 4:if((c&4194176)===c){qa(m,c,_n,!Na);break e}break;case 2:Qn=null;break;case 3:case 5:break;default:throw Error(n(329))}if(m.finishedWork=v,m.finishedLanes=c,(c&62914560)===c&&(T=Ng+300-ze(),10v?32:v,O.T=null,ao===null)var T=!1;else{v=qg,qg=null;var I=ao,G=$s;if(ao=null,$s=0,(qt&6)!==0)throw Error(n(331));var Q=qt;if(qt|=4,aT(I.current),tT(I,I.current,G,v),qt=Q,Hs(0,!1),Se&&typeof Se.onPostCommitFiberRoot=="function")try{Se.onPostCommitFiberRoot(ge,I)}catch{}T=!0}return T}finally{U.p=_,O.T=m,wT(u,c)}}return!1}function xT(u,c,v){c=gn(v,c),c=ig(u.stateNode,c,2),u=ui(u,c,2),u!==null&&(Mr(u,2),Wn(u))}function Et(u,c,v){if(u.tag===3)xT(u,u,v);else for(;c!==null;){if(c.tag===3){xT(c,u,v);break}else if(c.tag===1){var m=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(hi===null||!hi.has(m))){u=gn(v,u),v=SS(2),m=ui(c,v,2),m!==null&&(TS(v,m,c,u),Mr(m,2),Wn(m));break}}c=c.return}}function Fg(u,c,v){var m=u.pingCache;if(m===null){m=u.pingCache=new TP;var _=new Set;m.set(c,_)}else _=m.get(c),_===void 0&&(_=new Set,m.set(c,_));_.has(v)||(Dg=!0,_.add(v),u=DP.bind(null,u,c,v),c.then(u,u))}function DP(u,c,v){var m=u.pingCache;m!==null&&m.delete(c),u.pingedLanes|=u.suspendedLanes&v,u.warmLanes&=~v,Tt===u&&(ot&v)===v&&(Vt===4||Vt===3&&(ot&62914560)===ot&&300>ze()-Ng?(qt&2)===0&&au(u,0):kg|=v,nu===ot&&(nu=0)),Wn(u)}function _T(u,c){c===0&&(c=hr()),u=Ja(u,c),u!==null&&(Mr(u,c),Wn(u))}function kP(u){var c=u.memoizedState,v=0;c!==null&&(v=c.retryLane),_T(u,v)}function LP(u,c){var v=0;switch(u.tag){case 13:var m=u.stateNode,_=u.memoizedState;_!==null&&(v=_.retryLane);break;case 19:m=u.stateNode;break;case 22:m=u.stateNode._retryCache;break;default:throw Error(n(314))}m!==null&&m.delete(c),_T(u,v)}function NP(u,c){return Be(u,c)}var vc=null,uu=null,Hg=!1,gc=!1,Ug=!1,io=0;function Wn(u){u!==uu&&u.next===null&&(uu===null?vc=uu=u:uu=uu.next=u),gc=!0,Hg||(Hg=!0,qP(BP))}function Hs(u,c){if(!Ug&&gc){Ug=!0;do for(var v=!1,m=vc;m!==null;){if(u!==0){var _=m.pendingLanes;if(_===0)var T=0;else{var I=m.suspendedLanes,G=m.pingedLanes;T=(1<<31-Oe(42|u)+1)-1,T&=_&~(I&~G),T=T&201326677?T&201326677|1:T?T|2:0}T!==0&&(v=!0,TT(m,T))}else T=ot,T=dr(m,m===Tt?T:0),(T&3)===0||Mt(m,T)||(v=!0,TT(m,T));m=m.next}while(v);Ug=!1}}function BP(){gc=Hg=!1;var u=0;io!==0&&(UP()&&(u=io),io=0);for(var c=ze(),v=null,m=vc;m!==null;){var _=m.next,T=ET(m,c);T===0?(m.next=null,v===null?vc=_:v.next=_,_===null&&(uu=v)):(v=m,(u!==0||(T&3)!==0)&&(gc=!0)),m=_}Hs(u)}function ET(u,c){for(var v=u.suspendedLanes,m=u.pingedLanes,_=u.expirationTimes,T=u.pendingLanes&-62914561;0"u"?null:document;function VT(u,c,v){var m=lu;if(m&&typeof c=="string"&&c){var _=hn(c);_='link[rel="'+u+'"][href="'+_+'"]',typeof v=="string"&&(_+='[crossorigin="'+v+'"]'),IT.has(_)||(IT.add(_),u={rel:u,crossOrigin:v,href:c},m.querySelector(_)===null&&(c=m.createElement("link"),Er(c,"link",u),Xt(c),m.head.appendChild(c)))}}function WP(u){Pa.D(u),VT("dns-prefetch",u,null)}function JP(u,c){Pa.C(u,c),VT("preconnect",u,c)}function e9(u,c,v){Pa.L(u,c,v);var m=lu;if(m&&u&&c){var _='link[rel="preload"][as="'+hn(c)+'"]';c==="image"&&v&&v.imageSrcSet?(_+='[imagesrcset="'+hn(v.imageSrcSet)+'"]',typeof v.imageSizes=="string"&&(_+='[imagesizes="'+hn(v.imageSizes)+'"]')):_+='[href="'+hn(u)+'"]';var T=_;switch(c){case"style":T=fu(u);break;case"script":T=cu(u)}En.has(T)||(u=B({rel:"preload",href:c==="image"&&v&&v.imageSrcSet?void 0:u,as:c},v),En.set(T,u),m.querySelector(_)!==null||c==="style"&&m.querySelector(Ys(T))||c==="script"&&m.querySelector(Xs(T))||(c=m.createElement("link"),Er(c,"link",u),Xt(c),m.head.appendChild(c)))}}function t9(u,c){Pa.m(u,c);var v=lu;if(v&&u){var m=c&&typeof c.as=="string"?c.as:"script",_='link[rel="modulepreload"][as="'+hn(m)+'"][href="'+hn(u)+'"]',T=_;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=cu(u)}if(!En.has(T)&&(u=B({rel:"modulepreload",href:u},c),En.set(T,u),v.querySelector(_)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(v.querySelector(Xs(T)))return}m=v.createElement("link"),Er(m,"link",u),Xt(m),v.head.appendChild(m)}}}function r9(u,c,v){Pa.S(u,c,v);var m=lu;if(m&&u){var _=kn(m).hoistableStyles,T=fu(u);c=c||"default";var I=_.get(T);if(!I){var G={loading:0,preload:null};if(I=m.querySelector(Ys(T)))G.loading=5;else{u=B({rel:"stylesheet",href:u,"data-precedence":c},v),(v=En.get(T))&&ap(u,v);var Q=I=m.createElement("link");Xt(Q),Er(Q,"link",u),Q._p=new Promise(function(ie,me){Q.onload=ie,Q.onerror=me}),Q.addEventListener("load",function(){G.loading|=1}),Q.addEventListener("error",function(){G.loading|=2}),G.loading|=4,xc(I,c,m)}I={type:"stylesheet",instance:I,count:1,state:G},_.set(T,I)}}}function n9(u,c){Pa.X(u,c);var v=lu;if(v&&u){var m=kn(v).hoistableScripts,_=cu(u),T=m.get(_);T||(T=v.querySelector(Xs(_)),T||(u=B({src:u,async:!0},c),(c=En.get(_))&&ip(u,c),T=v.createElement("script"),Xt(T),Er(T,"link",u),v.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},m.set(_,T))}}function a9(u,c){Pa.M(u,c);var v=lu;if(v&&u){var m=kn(v).hoistableScripts,_=cu(u),T=m.get(_);T||(T=v.querySelector(Xs(_)),T||(u=B({src:u,async:!0,type:"module"},c),(c=En.get(_))&&ip(u,c),T=v.createElement("script"),Xt(T),Er(T,"link",u),v.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},m.set(_,T))}}function $T(u,c,v,m){var _=(_=de.current)?wc(_):null;if(!_)throw Error(n(446));switch(u){case"meta":case"title":return null;case"style":return typeof v.precedence=="string"&&typeof v.href=="string"?(c=fu(v.href),v=kn(_).hoistableStyles,m=v.get(c),m||(m={type:"style",instance:null,count:0,state:null},v.set(c,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(v.rel==="stylesheet"&&typeof v.href=="string"&&typeof v.precedence=="string"){u=fu(v.href);var T=kn(_).hoistableStyles,I=T.get(u);if(I||(_=_.ownerDocument||_,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(u,I),(T=_.querySelector(Ys(u)))&&!T._p&&(I.instance=T,I.state.loading=5),En.has(u)||(v={rel:"preload",as:"style",href:v.href,crossOrigin:v.crossOrigin,integrity:v.integrity,media:v.media,hrefLang:v.hrefLang,referrerPolicy:v.referrerPolicy},En.set(u,v),T||i9(_,u,v,I.state))),c&&m===null)throw Error(n(528,""));return I}if(c&&m!==null)throw Error(n(529,""));return null;case"script":return c=v.async,v=v.src,typeof v=="string"&&c&&typeof c!="function"&&typeof c!="symbol"?(c=cu(v),v=kn(_).hoistableScripts,m=v.get(c),m||(m={type:"script",instance:null,count:0,state:null},v.set(c,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,u))}}function fu(u){return'href="'+hn(u)+'"'}function Ys(u){return'link[rel="stylesheet"]['+u+"]"}function FT(u){return B({},u,{"data-precedence":u.precedence,precedence:null})}function i9(u,c,v,m){u.querySelector('link[rel="preload"][as="style"]['+c+"]")?m.loading=1:(c=u.createElement("link"),m.preload=c,c.addEventListener("load",function(){return m.loading|=1}),c.addEventListener("error",function(){return m.loading|=2}),Er(c,"link",v),Xt(c),u.head.appendChild(c))}function cu(u){return'[src="'+hn(u)+'"]'}function Xs(u){return"script[async]"+u}function HT(u,c,v){if(c.count++,c.instance===null)switch(c.type){case"style":var m=u.querySelector('style[data-href~="'+hn(v.href)+'"]');if(m)return c.instance=m,Xt(m),m;var _=B({},v,{"data-href":v.href,"data-precedence":v.precedence,href:null,precedence:null});return m=(u.ownerDocument||u).createElement("style"),Xt(m),Er(m,"style",_),xc(m,v.precedence,u),c.instance=m;case"stylesheet":_=fu(v.href);var T=u.querySelector(Ys(_));if(T)return c.state.loading|=4,c.instance=T,Xt(T),T;m=FT(v),(_=En.get(_))&&ap(m,_),T=(u.ownerDocument||u).createElement("link"),Xt(T);var I=T;return I._p=new Promise(function(G,Q){I.onload=G,I.onerror=Q}),Er(T,"link",m),c.state.loading|=4,xc(T,v.precedence,u),c.instance=T;case"script":return T=cu(v.src),(_=u.querySelector(Xs(T)))?(c.instance=_,Xt(_),_):(m=v,(_=En.get(T))&&(m=B({},v),ip(m,_)),u=u.ownerDocument||u,_=u.createElement("script"),Xt(_),Er(_,"link",m),u.head.appendChild(_),c.instance=_);case"void":return null;default:throw Error(n(443,c.type))}else c.type==="stylesheet"&&(c.state.loading&4)===0&&(m=c.instance,c.state.loading|=4,xc(m,v.precedence,u));return c.instance}function xc(u,c,v){for(var m=v.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),_=m.length?m[m.length-1]:null,T=_,I=0;I title"):null)}function o9(u,c,v){if(v===1||c.itemProp!=null)return!1;switch(u){case"meta":case"title":return!0;case"style":if(typeof c.precedence!="string"||typeof c.href!="string"||c.href==="")break;return!0;case"link":if(typeof c.rel!="string"||typeof c.href!="string"||c.href===""||c.onLoad||c.onError)break;switch(c.rel){case"stylesheet":return u=c.disabled,typeof c.precedence=="string"&&u==null;default:return!0}case"script":if(c.async&&typeof c.async!="function"&&typeof c.async!="symbol"&&!c.onLoad&&!c.onError&&c.src&&typeof c.src=="string")return!0}return!1}function YT(u){return!(u.type==="stylesheet"&&(u.state.loading&3)===0)}var Ks=null;function u9(){}function s9(u,c,v){if(Ks===null)throw Error(n(475));var m=Ks;if(c.type==="stylesheet"&&(typeof v.media!="string"||matchMedia(v.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var _=fu(v.href),T=u.querySelector(Ys(_));if(T){u=T._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(m.count++,m=Ec.bind(m),u.then(m,m)),c.state.loading|=4,c.instance=T,Xt(T);return}T=u.ownerDocument||u,v=FT(v),(_=En.get(_))&&ap(v,_),T=T.createElement("link"),Xt(T);var I=T;I._p=new Promise(function(G,Q){I.onload=G,I.onerror=Q}),Er(T,"link",v),c.instance=T}m.stylesheets===null&&(m.stylesheets=new Map),m.stylesheets.set(c,u),(u=c.state.preload)&&(c.state.loading&3)===0&&(m.count++,c=Ec.bind(m),u.addEventListener("load",c),u.addEventListener("error",c))}}function l9(){if(Ks===null)throw Error(n(475));var u=Ks;return u.stylesheets&&u.count===0&&op(u,u.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),gp.exports=A9(),gp.exports}var M9=R9();const O9=JSON.parse('[{"data":{"id":"models/microsoft/deberta-v3-large","type":"model","likes":204,"downloads":511878,"downloads_all_time":27553871,"trending_score":2,"used_storage":8074445747,"library_name":"transformers","pipeline_tag":"fill-mask"},"group":"nodes"},{"data":{"id":"models/brianronan/test-xet-enable","type":"model","likes":0,"downloads":0,"downloads_all_time":0,"trending_score":0,"used_storage":133610664,"library_name":"NULL","pipeline_tag":"NULL"},"group":"nodes"},{"data":{"id":"models/stabilityai/stable-diffusion-2-1-base","type":"model","likes":654,"downloads":1137932,"downloads_all_time":18624276,"trending_score":2,"used_storage":50410059287,"library_name":"diffusers","pipeline_tag":"text-to-image"},"group":"nodes"},{"data":{"id":"models/julien-c/xet-feb14","type":"model","likes":0,"downloads":0,"downloads_all_time":0,"trending_score":0,"used_storage":5234139343,"library_name":"NULL","pipeline_tag":"NULL"},"group":"nodes"},{"data":{"id":"models/yikuan8/Clinical-Longformer","type":"model","likes":59,"downloads":1234935,"downloads_all_time":13542999,"trending_score":0,"used_storage":1189900247,"library_name":"transformers","pipeline_tag":"fill-mask"},"group":"nodes"},{"data":{"id":"models/google/flan-t5-xxl","type":"model","likes":1234,"downloads":231899,"downloads_all_time":11590705,"trending_score":3,"used_storage":179295887866,"library_name":"transformers","pipeline_tag":"text2text-generation"},"group":"nodes"},{"data":{"id":"models/theainerd/Wav2Vec2-large-xlsr-hindi","type":"model","likes":5,"downloads":1128456,"downloads_all_time":13384283,"trending_score":0,"used_storage":2524266079,"library_name":"transformers","pipeline_tag":"automatic-speech-recognition"},"group":"nodes"},{"data":{"id":"models/CompVis/stable-diffusion-v1-4","type":"model","likes":6715,"downloads":1088888,"downloads_all_time":38298263,"trending_score":14,"used_storage":59631537390,"library_name":"diffusers","pipeline_tag":"text-to-image"},"group":"nodes"},{"data":{"id":"models/brianronan/test-xet-upload","type":"model","likes":0,"downloads":0,"downloads_all_time":0,"trending_score":0,"used_storage":393684173,"library_name":"NULL","pipeline_tag":"NULL"},"group":"nodes"},{"data":{"id":"models/google/flan-t5-base","type":"model","likes":838,"downloads":1110832,"downloads_all_time":36324897,"trending_score":1,"used_storage":7894822589,"library_name":"transformers","pipeline_tag":"text2text-generation"},"group":"nodes"},{"data":{"id":"models/Helsinki-NLP/opus-mt-fr-en","type":"model","likes":39,"downloads":2276155,"downloads_all_time":29219292,"trending_score":0,"used_storage":2350704530,"library_name":"transformers","pipeline_tag":"translation"},"group":"nodes"},{"data":{"id":"models/celinah/dummy-xet-testing","type":"model","likes":0,"downloads":0,"downloads_all_time":0,"trending_score":0,"used_storage":143400465,"library_name":"transformers","pipeline_tag":"NULL"},"group":"nodes"},{"data":{"id":"models/diffusers/stable-diffusion-xl-1.0-inpainting-0.1","type":"model","likes":323,"downloads":721337,"downloads_all_time":6557776,"trending_score":1,"used_storage":20815472866,"library_name":"diffusers","pipeline_tag":"text-to-image"},"group":"nodes"},{"data":{"id":"models/Systran/faster-whisper-large-v3","type":"model","likes":351,"downloads":798952,"downloads_all_time":7401515,"trending_score":3,"used_storage":3102942254,"library_name":"ctranslate2","pipeline_tag":"automatic-speech-recognition"},"group":"nodes"},{"data":{"id":"models/allenai/longformer-base-4096","type":"model","likes":188,"downloads":6224811,"downloads_all_time":104451323,"trending_score":1,"used_storage":2710777429,"library_name":"transformers","pipeline_tag":"NULL"},"group":"nodes"},{"data":{"id":"models/google/t5-v1_1-xxl","type":"model","likes":103,"downloads":644094,"downloads_all_time":8492507,"trending_score":1,"used_storage":178693324045,"library_name":"transformers","pipeline_tag":"text2text-generation"},"group":"nodes"},{"data":{"id":"models/stabilityai/stable-diffusion-xl-refiner-1.0","type":"model","likes":1840,"downloads":1613325,"downloads_all_time":40129637,"trending_score":13,"used_storage":31115495204,"library_name":"diffusers","pipeline_tag":"image-to-image"},"group":"nodes"},{"data":{"id":"models/celinah/xet-experiments","type":"model","likes":0,"downloads":0,"downloads_all_time":0,"trending_score":0,"used_storage":6967180696,"library_name":"NULL","pipeline_tag":"NULL"},"group":"nodes"},{"data":{"id":"models/google/flan-t5-small","type":"model","likes":322,"downloads":581330,"downloads_all_time":7638317,"trending_score":4,"used_storage":2378897868,"library_name":"transformers","pipeline_tag":"text2text-generation"},"group":"nodes"},{"data":{"id":"models/microsoft/table-transformer-detection","type":"model","likes":343,"downloads":4243608,"downloads_all_time":32021411,"trending_score":2,"used_storage":461429446,"library_name":"transformers","pipeline_tag":"object-detection"},"group":"nodes"},{"data":{"id":"models/brianronan/test-scanner","type":"model","likes":0,"downloads":0,"downloads_all_time":0,"trending_score":0,"used_storage":260073338,"library_name":"NULL","pipeline_tag":"NULL"},"group":"nodes"},{"data":{"id":"models/kingabzpro/wav2vec2-large-xls-r-300m-Urdu","type":"model","likes":14,"downloads":220903,"downloads_all_time":4602856,"trending_score":1,"used_storage":54169970269,"library_name":"transformers","pipeline_tag":"automatic-speech-recognition"},"group":"nodes"},{"data":{"id":"models/papluca/xlm-roberta-base-language-detection","type":"model","likes":318,"downloads":5043005,"downloads_all_time":47874518,"trending_score":2,"used_storage":5567282236,"library_name":"transformers","pipeline_tag":"text-classification"},"group":"nodes"},{"data":{"id":"models/lucadiliello/BLEURT-20-D12","type":"model","likes":0,"downloads":742345,"downloads_all_time":4260341,"trending_score":0,"used_storage":1344920403,"library_name":"transformers","pipeline_tag":"text-classification"},"group":"nodes"},{"data":{"id":"models/kresnik/wav2vec2-large-xlsr-korean","type":"model","likes":40,"downloads":2045676,"downloads_all_time":18557960,"trending_score":1,"used_storage":8800393692,"library_name":"transformers","pipeline_tag":"automatic-speech-recognition"},"group":"nodes"},{"data":{"id":"models/facebook/m2m100_1.2B","type":"model","likes":163,"downloads":895564,"downloads_all_time":5018946,"trending_score":1,"used_storage":49510473447,"library_name":"transformers","pipeline_tag":"text2text-generation"},"group":"nodes"},{"data":{"id":"models/facebook/musicgen-medium","type":"model","likes":112,"downloads":1426559,"downloads_all_time":3840384,"trending_score":1,"used_storage":36073996801,"library_name":"transformers","pipeline_tag":"text-to-audio"},"group":"nodes"},{"data":{"id":"models/Helsinki-NLP/opus-mt-de-en","type":"model","likes":44,"downloads":3034754,"downloads_all_time":26620985,"trending_score":0,"used_storage":2637770406,"library_name":"transformers","pipeline_tag":"translation"},"group":"nodes"},{"data":{"id":"models/Helsinki-NLP/opus-mt-es-en","type":"model","likes":69,"downloads":1055466,"downloads_all_time":19441079,"trending_score":0,"used_storage":1252015522,"library_name":"transformers","pipeline_tag":"translation"},"group":"nodes"},{"data":{"id":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment","type":"model","likes":206,"downloads":1454368,"downloads_all_time":29486731,"trending_score":4,"used_storage":4456588160,"library_name":"transformers","pipeline_tag":"text-classification"},"group":"nodes"},{"data":{"id":"models/celinah/xet-experiments_bis","type":"model","likes":0,"downloads":0,"downloads_all_time":0,"trending_score":0,"used_storage":0,"library_name":"NULL","pipeline_tag":"NULL"},"group":"nodes"},{"data":{"id":"models/google/flan-t5-large","type":"model","likes":705,"downloads":1655084,"downloads_all_time":30520075,"trending_score":6,"used_storage":15929620947,"library_name":"transformers","pipeline_tag":"text2text-generation"},"group":"nodes"},{"data":{"id":"models/microsoft/table-transformer-structure-recognition","type":"model","likes":183,"downloads":1449023,"downloads_all_time":14150864,"trending_score":1,"used_storage":461896422,"library_name":"transformers","pipeline_tag":"object-detection"},"group":"nodes"},{"data":{"id":"models/Systran/faster-whisper-large-v2","type":"model","likes":32,"downloads":489911,"downloads_all_time":5280258,"trending_score":1,"used_storage":3086912962,"library_name":"ctranslate2","pipeline_tag":"automatic-speech-recognition"},"group":"nodes"},{"data":{"id":"models/stabilityai/stable-diffusion-xl-base-1.0","type":"model","likes":6388,"downloads":4103552,"downloads_all_time":81083135,"trending_score":24,"used_storage":77373571593,"library_name":"diffusers","pipeline_tag":"text-to-image"},"group":"nodes"},{"data":{"id":"models/microsoft/mdeberta-v3-base","type":"model","likes":174,"downloads":1273735,"downloads_all_time":15509921,"trending_score":1,"used_storage":5852650649,"library_name":"transformers","pipeline_tag":"fill-mask"},"group":"nodes"},{"data":{"id":"models/hf-internal-testing/tiny-random-AlbertModel","type":"model","likes":0,"downloads":749925,"downloads_all_time":11451673,"trending_score":0,"used_storage":98580129,"library_name":"transformers","pipeline_tag":"feature-extraction"},"group":"nodes"},{"data":{"id":"models/stabilityai/stable-diffusion-2-1","type":"model","likes":3949,"downloads":960039,"downloads_all_time":44056385,"trending_score":4,"used_storage":57147037677,"library_name":"diffusers","pipeline_tag":"text-to-image"},"group":"nodes"},{"data":{"id":"datasets/OwlMaster/gg2","type":"dataset","likes":1,"downloads":21651,"downloads_all_time":139732,"trending_score":0,"used_storage":37010441673,"library_name":"NULL","pipeline_tag":"NULL"},"group":"nodes"},{"data":{"id":"models/Rostlab/prot_t5_xl_uniref50","type":"model","likes":43,"downloads":74640,"downloads_all_time":22110394,"trending_score":1,"used_storage":45102350610,"library_name":"transformers","pipeline_tag":"text2text-generation"},"group":"nodes"},{"data":{"id":"models/Rostlab/prot_t5_xl_uniref50_models/papluca/xlm-roberta-base-language-detection","source":"models/Rostlab/prot_t5_xl_uniref50","target":"models/papluca/xlm-roberta-base-language-detection","weight":1},"group":"edges"},{"data":{"id":"models/Rostlab/prot_t5_xl_uniref50_models/microsoft/deberta-v3-large","source":"models/Rostlab/prot_t5_xl_uniref50","target":"models/microsoft/deberta-v3-large","weight":1},"group":"edges"},{"data":{"id":"models/Rostlab/prot_t5_xl_uniref50_models/microsoft/mdeberta-v3-base","source":"models/Rostlab/prot_t5_xl_uniref50","target":"models/microsoft/mdeberta-v3-base","weight":1},"group":"edges"},{"data":{"id":"models/Rostlab/prot_t5_xl_uniref50_models/facebook/m2m100_1.2B","source":"models/Rostlab/prot_t5_xl_uniref50","target":"models/facebook/m2m100_1.2B","weight":2},"group":"edges"},{"data":{"id":"models/Rostlab/prot_t5_xl_uniref50_models/cardiffnlp/twitter-xlm-roberta-base-sentiment","source":"models/Rostlab/prot_t5_xl_uniref50","target":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment","weight":1},"group":"edges"},{"data":{"id":"models/Rostlab/prot_t5_xl_uniref50_models/google/flan-t5-xxl","source":"models/Rostlab/prot_t5_xl_uniref50","target":"models/google/flan-t5-xxl","weight":1},"group":"edges"},{"data":{"id":"models/Rostlab/prot_t5_xl_uniref50_models/google/flan-t5-large","source":"models/Rostlab/prot_t5_xl_uniref50","target":"models/google/flan-t5-large","weight":1},"group":"edges"},{"data":{"id":"models/Rostlab/prot_t5_xl_uniref50_models/google/flan-t5-small","source":"models/Rostlab/prot_t5_xl_uniref50","target":"models/google/flan-t5-small","weight":1},"group":"edges"},{"data":{"id":"models/Rostlab/prot_t5_xl_uniref50_models/google/flan-t5-base","source":"models/Rostlab/prot_t5_xl_uniref50","target":"models/google/flan-t5-base","weight":1},"group":"edges"},{"data":{"id":"models/Rostlab/prot_t5_xl_uniref50_models/hf-internal-testing/tiny-random-AlbertModel","source":"models/Rostlab/prot_t5_xl_uniref50","target":"models/hf-internal-testing/tiny-random-AlbertModel","weight":1},"group":"edges"},{"data":{"id":"models/Rostlab/prot_t5_xl_uniref50_models/lucadiliello/BLEURT-20-D12","source":"models/Rostlab/prot_t5_xl_uniref50","target":"models/lucadiliello/BLEURT-20-D12","weight":1},"group":"edges"},{"data":{"id":"models/Rostlab/prot_t5_xl_uniref50_models/facebook/musicgen-medium","source":"models/Rostlab/prot_t5_xl_uniref50","target":"models/facebook/musicgen-medium","weight":1},"group":"edges"},{"data":{"id":"models/Helsinki-NLP/opus-mt-es-en_models/Helsinki-NLP/opus-mt-fr-en","source":"models/Helsinki-NLP/opus-mt-es-en","target":"models/Helsinki-NLP/opus-mt-fr-en","weight":224},"group":"edges"},{"data":{"id":"models/Helsinki-NLP/opus-mt-de-en_models/Helsinki-NLP/opus-mt-fr-en","source":"models/Helsinki-NLP/opus-mt-de-en","target":"models/Helsinki-NLP/opus-mt-fr-en","weight":336},"group":"edges"},{"data":{"id":"models/Helsinki-NLP/opus-mt-de-en_models/Helsinki-NLP/opus-mt-es-en","source":"models/Helsinki-NLP/opus-mt-de-en","target":"models/Helsinki-NLP/opus-mt-es-en","weight":336},"group":"edges"},{"data":{"id":"models/microsoft/deberta-v3-large_models/papluca/xlm-roberta-base-language-detection","source":"models/microsoft/deberta-v3-large","target":"models/papluca/xlm-roberta-base-language-detection","weight":1},"group":"edges"},{"data":{"id":"models/microsoft/deberta-v3-large_models/microsoft/mdeberta-v3-base","source":"models/microsoft/deberta-v3-large","target":"models/microsoft/mdeberta-v3-base","weight":4},"group":"edges"},{"data":{"id":"models/microsoft/mdeberta-v3-base_models/papluca/xlm-roberta-base-language-detection","source":"models/microsoft/mdeberta-v3-base","target":"models/papluca/xlm-roberta-base-language-detection","weight":2},"group":"edges"},{"data":{"id":"models/kresnik/wav2vec2-large-xlsr-korean_models/theainerd/Wav2Vec2-large-xlsr-hindi","source":"models/kresnik/wav2vec2-large-xlsr-korean","target":"models/theainerd/Wav2Vec2-large-xlsr-hindi","weight":1067},"group":"edges"},{"data":{"id":"models/kingabzpro/wav2vec2-large-xls-r-300m-Urdu_models/kresnik/wav2vec2-large-xlsr-korean","source":"models/kingabzpro/wav2vec2-large-xls-r-300m-Urdu","target":"models/kresnik/wav2vec2-large-xlsr-korean","weight":1},"group":"edges"},{"data":{"id":"models/facebook/m2m100_1.2B_models/papluca/xlm-roberta-base-language-detection","source":"models/facebook/m2m100_1.2B","target":"models/papluca/xlm-roberta-base-language-detection","weight":1},"group":"edges"},{"data":{"id":"models/facebook/m2m100_1.2B_models/microsoft/deberta-v3-large","source":"models/facebook/m2m100_1.2B","target":"models/microsoft/deberta-v3-large","weight":1},"group":"edges"},{"data":{"id":"models/facebook/m2m100_1.2B_models/microsoft/mdeberta-v3-base","source":"models/facebook/m2m100_1.2B","target":"models/microsoft/mdeberta-v3-base","weight":1},"group":"edges"},{"data":{"id":"models/facebook/m2m100_1.2B_models/google/flan-t5-xxl","source":"models/facebook/m2m100_1.2B","target":"models/google/flan-t5-xxl","weight":1},"group":"edges"},{"data":{"id":"models/facebook/m2m100_1.2B_models/google/flan-t5-large","source":"models/facebook/m2m100_1.2B","target":"models/google/flan-t5-large","weight":1},"group":"edges"},{"data":{"id":"models/facebook/m2m100_1.2B_models/google/flan-t5-small","source":"models/facebook/m2m100_1.2B","target":"models/google/flan-t5-small","weight":1},"group":"edges"},{"data":{"id":"models/facebook/m2m100_1.2B_models/google/flan-t5-base","source":"models/facebook/m2m100_1.2B","target":"models/google/flan-t5-base","weight":1},"group":"edges"},{"data":{"id":"models/facebook/m2m100_1.2B_models/hf-internal-testing/tiny-random-AlbertModel","source":"models/facebook/m2m100_1.2B","target":"models/hf-internal-testing/tiny-random-AlbertModel","weight":1},"group":"edges"},{"data":{"id":"models/facebook/m2m100_1.2B_models/lucadiliello/BLEURT-20-D12","source":"models/facebook/m2m100_1.2B","target":"models/lucadiliello/BLEURT-20-D12","weight":1},"group":"edges"},{"data":{"id":"models/facebook/m2m100_1.2B_models/facebook/musicgen-medium","source":"models/facebook/m2m100_1.2B","target":"models/facebook/musicgen-medium","weight":1},"group":"edges"},{"data":{"id":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment_models/papluca/xlm-roberta-base-language-detection","source":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment","target":"models/papluca/xlm-roberta-base-language-detection","weight":191},"group":"edges"},{"data":{"id":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment_models/microsoft/deberta-v3-large","source":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment","target":"models/microsoft/deberta-v3-large","weight":1},"group":"edges"},{"data":{"id":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment_models/microsoft/mdeberta-v3-base","source":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment","target":"models/microsoft/mdeberta-v3-base","weight":2},"group":"edges"},{"data":{"id":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment_models/facebook/m2m100_1.2B","source":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment","target":"models/facebook/m2m100_1.2B","weight":1},"group":"edges"},{"data":{"id":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment_models/google/flan-t5-xxl","source":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment","target":"models/google/flan-t5-xxl","weight":2},"group":"edges"},{"data":{"id":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment_models/google/flan-t5-large","source":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment","target":"models/google/flan-t5-large","weight":2},"group":"edges"},{"data":{"id":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment_models/google/flan-t5-small","source":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment","target":"models/google/flan-t5-small","weight":2},"group":"edges"},{"data":{"id":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment_models/google/flan-t5-base","source":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment","target":"models/google/flan-t5-base","weight":2},"group":"edges"},{"data":{"id":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment_models/hf-internal-testing/tiny-random-AlbertModel","source":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment","target":"models/hf-internal-testing/tiny-random-AlbertModel","weight":2},"group":"edges"},{"data":{"id":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment_models/lucadiliello/BLEURT-20-D12","source":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment","target":"models/lucadiliello/BLEURT-20-D12","weight":1},"group":"edges"},{"data":{"id":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment_models/facebook/musicgen-medium","source":"models/cardiffnlp/twitter-xlm-roberta-base-sentiment","target":"models/facebook/musicgen-medium","weight":2},"group":"edges"},{"data":{"id":"models/allenai/longformer-base-4096_models/yikuan8/Clinical-Longformer","source":"models/allenai/longformer-base-4096","target":"models/yikuan8/Clinical-Longformer","weight":5128},"group":"edges"},{"data":{"id":"models/CompVis/stable-diffusion-v1-4_models/stabilityai/stable-diffusion-xl-base-1.0","source":"models/CompVis/stable-diffusion-v1-4","target":"models/stabilityai/stable-diffusion-xl-base-1.0","weight":34917},"group":"edges"},{"data":{"id":"models/CompVis/stable-diffusion-v1-4_models/diffusers/stable-diffusion-xl-1.0-inpainting-0.1","source":"models/CompVis/stable-diffusion-v1-4","target":"models/diffusers/stable-diffusion-xl-1.0-inpainting-0.1","weight":18948},"group":"edges"},{"data":{"id":"models/CompVis/stable-diffusion-v1-4_models/stabilityai/stable-diffusion-2-1-base","source":"models/CompVis/stable-diffusion-v1-4","target":"models/stabilityai/stable-diffusion-2-1-base","weight":30955},"group":"edges"},{"data":{"id":"models/CompVis/stable-diffusion-v1-4_models/stabilityai/stable-diffusion-2-1","source":"models/CompVis/stable-diffusion-v1-4","target":"models/stabilityai/stable-diffusion-2-1","weight":30920},"group":"edges"},{"data":{"id":"models/microsoft/table-transformer-detection_models/microsoft/table-transformer-structure-recognition","source":"models/microsoft/table-transformer-detection","target":"models/microsoft/table-transformer-structure-recognition","weight":24},"group":"edges"},{"data":{"id":"models/google/flan-t5-xxl_models/google/t5-v1_1-xxl","source":"models/google/flan-t5-xxl","target":"models/google/t5-v1_1-xxl","weight":338},"group":"edges"},{"data":{"id":"models/google/flan-t5-xxl_models/papluca/xlm-roberta-base-language-detection","source":"models/google/flan-t5-xxl","target":"models/papluca/xlm-roberta-base-language-detection","weight":2},"group":"edges"},{"data":{"id":"models/google/flan-t5-xxl_models/microsoft/deberta-v3-large","source":"models/google/flan-t5-xxl","target":"models/microsoft/deberta-v3-large","weight":1},"group":"edges"},{"data":{"id":"models/google/flan-t5-xxl_models/microsoft/mdeberta-v3-base","source":"models/google/flan-t5-xxl","target":"models/microsoft/mdeberta-v3-base","weight":2},"group":"edges"},{"data":{"id":"models/google/flan-t5-xxl_models/hf-internal-testing/tiny-random-AlbertModel","source":"models/google/flan-t5-xxl","target":"models/hf-internal-testing/tiny-random-AlbertModel","weight":2},"group":"edges"},{"data":{"id":"models/google/flan-t5-xxl_models/lucadiliello/BLEURT-20-D12","source":"models/google/flan-t5-xxl","target":"models/lucadiliello/BLEURT-20-D12","weight":1},"group":"edges"},{"data":{"id":"models/google/flan-t5-large_models/google/flan-t5-xxl","source":"models/google/flan-t5-large","target":"models/google/flan-t5-xxl","weight":14},"group":"edges"},{"data":{"id":"models/google/flan-t5-large_models/google/flan-t5-small","source":"models/google/flan-t5-large","target":"models/google/flan-t5-small","weight":14},"group":"edges"},{"data":{"id":"models/google/flan-t5-large_models/papluca/xlm-roberta-base-language-detection","source":"models/google/flan-t5-large","target":"models/papluca/xlm-roberta-base-language-detection","weight":2},"group":"edges"},{"data":{"id":"models/google/flan-t5-large_models/microsoft/deberta-v3-large","source":"models/google/flan-t5-large","target":"models/microsoft/deberta-v3-large","weight":1},"group":"edges"},{"data":{"id":"models/google/flan-t5-large_models/microsoft/mdeberta-v3-base","source":"models/google/flan-t5-large","target":"models/microsoft/mdeberta-v3-base","weight":2},"group":"edges"},{"data":{"id":"models/google/flan-t5-large_models/hf-internal-testing/tiny-random-AlbertModel","source":"models/google/flan-t5-large","target":"models/hf-internal-testing/tiny-random-AlbertModel","weight":2},"group":"edges"},{"data":{"id":"models/google/flan-t5-large_models/lucadiliello/BLEURT-20-D12","source":"models/google/flan-t5-large","target":"models/lucadiliello/BLEURT-20-D12","weight":1},"group":"edges"},{"data":{"id":"models/google/flan-t5-small_models/google/flan-t5-xxl","source":"models/google/flan-t5-small","target":"models/google/flan-t5-xxl","weight":14},"group":"edges"},{"data":{"id":"models/google/flan-t5-small_models/papluca/xlm-roberta-base-language-detection","source":"models/google/flan-t5-small","target":"models/papluca/xlm-roberta-base-language-detection","weight":2},"group":"edges"},{"data":{"id":"models/google/flan-t5-small_models/microsoft/deberta-v3-large","source":"models/google/flan-t5-small","target":"models/microsoft/deberta-v3-large","weight":1},"group":"edges"},{"data":{"id":"models/google/flan-t5-small_models/microsoft/mdeberta-v3-base","source":"models/google/flan-t5-small","target":"models/microsoft/mdeberta-v3-base","weight":2},"group":"edges"},{"data":{"id":"models/google/flan-t5-small_models/hf-internal-testing/tiny-random-AlbertModel","source":"models/google/flan-t5-small","target":"models/hf-internal-testing/tiny-random-AlbertModel","weight":2},"group":"edges"},{"data":{"id":"models/google/flan-t5-small_models/lucadiliello/BLEURT-20-D12","source":"models/google/flan-t5-small","target":"models/lucadiliello/BLEURT-20-D12","weight":1},"group":"edges"},{"data":{"id":"models/google/flan-t5-base_models/google/flan-t5-xxl","source":"models/google/flan-t5-base","target":"models/google/flan-t5-xxl","weight":14},"group":"edges"},{"data":{"id":"models/google/flan-t5-base_models/google/flan-t5-large","source":"models/google/flan-t5-base","target":"models/google/flan-t5-large","weight":14},"group":"edges"},{"data":{"id":"models/google/flan-t5-base_models/google/flan-t5-small","source":"models/google/flan-t5-base","target":"models/google/flan-t5-small","weight":14},"group":"edges"},{"data":{"id":"models/google/flan-t5-base_models/papluca/xlm-roberta-base-language-detection","source":"models/google/flan-t5-base","target":"models/papluca/xlm-roberta-base-language-detection","weight":2},"group":"edges"},{"data":{"id":"models/google/flan-t5-base_models/microsoft/deberta-v3-large","source":"models/google/flan-t5-base","target":"models/microsoft/deberta-v3-large","weight":1},"group":"edges"},{"data":{"id":"models/google/flan-t5-base_models/microsoft/mdeberta-v3-base","source":"models/google/flan-t5-base","target":"models/microsoft/mdeberta-v3-base","weight":2},"group":"edges"},{"data":{"id":"models/google/flan-t5-base_models/hf-internal-testing/tiny-random-AlbertModel","source":"models/google/flan-t5-base","target":"models/hf-internal-testing/tiny-random-AlbertModel","weight":2},"group":"edges"},{"data":{"id":"models/google/flan-t5-base_models/lucadiliello/BLEURT-20-D12","source":"models/google/flan-t5-base","target":"models/lucadiliello/BLEURT-20-D12","weight":1},"group":"edges"},{"data":{"id":"models/hf-internal-testing/tiny-random-AlbertModel_models/papluca/xlm-roberta-base-language-detection","source":"models/hf-internal-testing/tiny-random-AlbertModel","target":"models/papluca/xlm-roberta-base-language-detection","weight":2},"group":"edges"},{"data":{"id":"models/hf-internal-testing/tiny-random-AlbertModel_models/microsoft/deberta-v3-large","source":"models/hf-internal-testing/tiny-random-AlbertModel","target":"models/microsoft/deberta-v3-large","weight":1},"group":"edges"},{"data":{"id":"models/hf-internal-testing/tiny-random-AlbertModel_models/microsoft/mdeberta-v3-base","source":"models/hf-internal-testing/tiny-random-AlbertModel","target":"models/microsoft/mdeberta-v3-base","weight":2},"group":"edges"},{"data":{"id":"models/hf-internal-testing/tiny-random-AlbertModel_models/lucadiliello/BLEURT-20-D12","source":"models/hf-internal-testing/tiny-random-AlbertModel","target":"models/lucadiliello/BLEURT-20-D12","weight":1},"group":"edges"},{"data":{"id":"models/stabilityai/stable-diffusion-2-1_models/stabilityai/stable-diffusion-2-1-base","source":"models/stabilityai/stable-diffusion-2-1","target":"models/stabilityai/stable-diffusion-2-1-base","weight":1062769},"group":"edges"},{"data":{"id":"models/lucadiliello/BLEURT-20-D12_models/papluca/xlm-roberta-base-language-detection","source":"models/lucadiliello/BLEURT-20-D12","target":"models/papluca/xlm-roberta-base-language-detection","weight":1},"group":"edges"},{"data":{"id":"models/lucadiliello/BLEURT-20-D12_models/microsoft/deberta-v3-large","source":"models/lucadiliello/BLEURT-20-D12","target":"models/microsoft/deberta-v3-large","weight":1},"group":"edges"},{"data":{"id":"models/lucadiliello/BLEURT-20-D12_models/microsoft/mdeberta-v3-base","source":"models/lucadiliello/BLEURT-20-D12","target":"models/microsoft/mdeberta-v3-base","weight":1},"group":"edges"},{"data":{"id":"models/facebook/musicgen-medium_models/google/flan-t5-xxl","source":"models/facebook/musicgen-medium","target":"models/google/flan-t5-xxl","weight":14},"group":"edges"},{"data":{"id":"models/facebook/musicgen-medium_models/google/flan-t5-large","source":"models/facebook/musicgen-medium","target":"models/google/flan-t5-large","weight":14},"group":"edges"},{"data":{"id":"models/facebook/musicgen-medium_models/google/flan-t5-small","source":"models/facebook/musicgen-medium","target":"models/google/flan-t5-small","weight":14},"group":"edges"},{"data":{"id":"models/facebook/musicgen-medium_models/google/flan-t5-base","source":"models/facebook/musicgen-medium","target":"models/google/flan-t5-base","weight":14},"group":"edges"},{"data":{"id":"models/facebook/musicgen-medium_models/papluca/xlm-roberta-base-language-detection","source":"models/facebook/musicgen-medium","target":"models/papluca/xlm-roberta-base-language-detection","weight":2},"group":"edges"},{"data":{"id":"models/facebook/musicgen-medium_models/microsoft/deberta-v3-large","source":"models/facebook/musicgen-medium","target":"models/microsoft/deberta-v3-large","weight":1},"group":"edges"},{"data":{"id":"models/facebook/musicgen-medium_models/microsoft/mdeberta-v3-base","source":"models/facebook/musicgen-medium","target":"models/microsoft/mdeberta-v3-base","weight":2},"group":"edges"},{"data":{"id":"models/facebook/musicgen-medium_models/hf-internal-testing/tiny-random-AlbertModel","source":"models/facebook/musicgen-medium","target":"models/hf-internal-testing/tiny-random-AlbertModel","weight":2},"group":"edges"},{"data":{"id":"models/facebook/musicgen-medium_models/lucadiliello/BLEURT-20-D12","source":"models/facebook/musicgen-medium","target":"models/lucadiliello/BLEURT-20-D12","weight":1},"group":"edges"},{"data":{"id":"datasets/OwlMaster/gg2_models/stabilityai/stable-diffusion-xl-base-1.0","source":"datasets/OwlMaster/gg2","target":"models/stabilityai/stable-diffusion-xl-base-1.0","weight":277703},"group":"edges"},{"data":{"id":"datasets/OwlMaster/gg2_models/stabilityai/stable-diffusion-xl-refiner-1.0","source":"datasets/OwlMaster/gg2","target":"models/stabilityai/stable-diffusion-xl-refiner-1.0","weight":567531},"group":"edges"},{"data":{"id":"datasets/OwlMaster/gg2_models/diffusers/stable-diffusion-xl-1.0-inpainting-0.1","source":"datasets/OwlMaster/gg2","target":"models/diffusers/stable-diffusion-xl-1.0-inpainting-0.1","weight":136438},"group":"edges"},{"data":{"id":"datasets/OwlMaster/gg2_models/CompVis/stable-diffusion-v1-4","source":"datasets/OwlMaster/gg2","target":"models/CompVis/stable-diffusion-v1-4","weight":1},"group":"edges"},{"data":{"id":"datasets/OwlMaster/gg2_models/stabilityai/stable-diffusion-2-1","source":"datasets/OwlMaster/gg2","target":"models/stabilityai/stable-diffusion-2-1","weight":1},"group":"edges"},{"data":{"id":"datasets/OwlMaster/gg2_models/stabilityai/stable-diffusion-2-1-base","source":"datasets/OwlMaster/gg2","target":"models/stabilityai/stable-diffusion-2-1-base","weight":1},"group":"edges"},{"data":{"id":"models/stabilityai/stable-diffusion-xl-base-1.0_models/stabilityai/stable-diffusion-xl-refiner-1.0","source":"models/stabilityai/stable-diffusion-xl-base-1.0","target":"models/stabilityai/stable-diffusion-xl-refiner-1.0","weight":315054},"group":"edges"},{"data":{"id":"models/diffusers/stable-diffusion-xl-1.0-inpainting-0.1_models/stabilityai/stable-diffusion-xl-base-1.0","source":"models/diffusers/stable-diffusion-xl-1.0-inpainting-0.1","target":"models/stabilityai/stable-diffusion-xl-base-1.0","weight":153876},"group":"edges"},{"data":{"id":"models/diffusers/stable-diffusion-xl-1.0-inpainting-0.1_models/stabilityai/stable-diffusion-xl-refiner-1.0","source":"models/diffusers/stable-diffusion-xl-1.0-inpainting-0.1","target":"models/stabilityai/stable-diffusion-xl-refiner-1.0","weight":113626},"group":"edges"},{"data":{"id":"models/Systran/faster-whisper-large-v2_models/Systran/faster-whisper-large-v3","source":"models/Systran/faster-whisper-large-v2","target":"models/Systran/faster-whisper-large-v3","weight":50},"group":"edges"},{"data":{"id":"models/brianronan/test-xet-enable_models/celinah/xet-experiments","source":"models/brianronan/test-xet-enable","target":"models/celinah/xet-experiments","weight":4368},"group":"edges"},{"data":{"id":"models/brianronan/test-xet-enable_models/celinah/xet-experiments_bis","source":"models/brianronan/test-xet-enable","target":"models/celinah/xet-experiments_bis","weight":2184},"group":"edges"},{"data":{"id":"models/brianronan/test-xet-enable_models/brianronan/test-xet-upload","source":"models/brianronan/test-xet-enable","target":"models/brianronan/test-xet-upload","weight":1574},"group":"edges"},{"data":{"id":"models/brianronan/test-scanner_models/brianronan/test-xet-upload","source":"models/brianronan/test-scanner","target":"models/brianronan/test-xet-upload","weight":5916},"group":"edges"},{"data":{"id":"models/brianronan/test-scanner_models/brianronan/test-xet-enable","source":"models/brianronan/test-scanner","target":"models/brianronan/test-xet-enable","weight":1574},"group":"edges"},{"data":{"id":"models/brianronan/test-scanner_models/celinah/xet-experiments","source":"models/brianronan/test-scanner","target":"models/celinah/xet-experiments","weight":3148},"group":"edges"},{"data":{"id":"models/brianronan/test-scanner_models/celinah/xet-experiments_bis","source":"models/brianronan/test-scanner","target":"models/celinah/xet-experiments_bis","weight":1574},"group":"edges"},{"data":{"id":"models/celinah/xet-experiments_models/celinah/xet-experiments_bis","source":"models/celinah/xet-experiments","target":"models/celinah/xet-experiments_bis","weight":117484},"group":"edges"},{"data":{"id":"models/celinah/xet-experiments_models/julien-c/xet-feb14","source":"models/celinah/xet-experiments","target":"models/julien-c/xet-feb14","weight":526},"group":"edges"},{"data":{"id":"models/brianronan/test-xet-upload_models/celinah/xet-experiments","source":"models/brianronan/test-xet-upload","target":"models/celinah/xet-experiments","weight":3148},"group":"edges"},{"data":{"id":"models/brianronan/test-xet-upload_models/celinah/xet-experiments_bis","source":"models/brianronan/test-xet-upload","target":"models/celinah/xet-experiments_bis","weight":1574},"group":"edges"},{"data":{"id":"models/celinah/xet-experiments_bis_models/julien-c/xet-feb14","source":"models/celinah/xet-experiments_bis","target":"models/julien-c/xet-feb14","weight":526},"group":"edges"},{"data":{"id":"models/celinah/dummy-xet-testing_models/celinah/xet-experiments","source":"models/celinah/dummy-xet-testing","target":"models/celinah/xet-experiments","weight":25},"group":"edges"},{"data":{"id":"models/celinah/dummy-xet-testing_models/celinah/xet-experiments_bis","source":"models/celinah/dummy-xet-testing","target":"models/celinah/xet-experiments_bis","weight":25},"group":"edges"}]');function Tx(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(l){throw l},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return o=l.done,l},e:function(l){s=!0,i=l},f:function(){try{o||r.return==null||r.return()}finally{if(s)throw i}}}}function dL(t,e,r){return(e=vL(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function N9(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function B9(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,f=!1;try{if(i=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(d){f=!0,a=d}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(f)throw a}}return s}}function q9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P9(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yr(t,e){return D9(t)||B9(t,e)||d2(t,e)||q9()}function hL(t){return k9(t)||N9(t)||d2(t)||P9()}function z9(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function vL(t){var e=z9(t,"string");return typeof e=="symbol"?e:e+""}function lr(t){"@babel/helpers - typeof";return lr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lr(t)}function d2(t,e){if(t){if(typeof t=="string")return Tx(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Tx(t,e):void 0}}var ur=typeof window>"u"?null:window,gC=ur?ur.navigator:null;ur&&ur.document;var I9=lr(""),gL=lr({}),V9=lr(function(){}),$9=typeof HTMLElement>"u"?"undefined":lr(HTMLElement),Wl=function(e){return e&&e.instanceString&&zt(e.instanceString)?e.instanceString():null},Ve=function(e){return e!=null&&lr(e)==I9},zt=function(e){return e!=null&&lr(e)===V9},St=function(e){return!an(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},st=function(e){return e!=null&&lr(e)===gL&&!St(e)&&e.constructor===Object},F9=function(e){return e!=null&&lr(e)===gL},Me=function(e){return e!=null&&lr(e)===lr(1)&&!isNaN(e)},H9=function(e){return Me(e)&&Math.floor(e)===e},Rd=function(e){if($9!=="undefined")return e!=null&&e instanceof HTMLElement},an=function(e){return Jl(e)||pL(e)},Jl=function(e){return Wl(e)==="collection"&&e._private.single},pL=function(e){return Wl(e)==="collection"&&!e._private.single},h2=function(e){return Wl(e)==="core"},mL=function(e){return Wl(e)==="stylesheet"},U9=function(e){return Wl(e)==="event"},Ai=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},G9=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},Y9=function(e){return st(e)&&Me(e.x1)&&Me(e.x2)&&Me(e.y1)&&Me(e.y2)},X9=function(e){return F9(e)&&zt(e.then)},K9=function(){return gC&&gC.userAgent.match(/msie|trident|edge/i)},Rl=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],o=0;or?1:0},t7=function(e,r){return-1*bL(e,r)},Xe=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r1&&(w-=1),w<1/6?y+(b-y)*6*w:w<1/2?b:w<2/3?y+(b-y)*(2/3-w)*6:y}var h=new RegExp("^"+Q9+"$").exec(e);if(h){if(n=parseInt(h[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n=n%360),n/=360,a=parseFloat(h[2]),a<0||a>100||(a=a/100,i=parseFloat(h[3]),i<0||i>100)||(i=i/100,o=h[4],o!==void 0&&(o=parseFloat(o),o<0||o>1)))return;if(a===0)s=l=f=Math.round(i*255);else{var g=i<.5?i*(1+a):i+a-i*a,p=2*i-g;s=Math.round(255*d(p,g,n+1/3)),l=Math.round(255*d(p,g,n)),f=Math.round(255*d(p,g,n-1/3))}r=[s,l,f,o]}return r},a7=function(e){var r,n=new RegExp("^"+j9+"$").exec(e);if(n){r=[];for(var a=[],i=1;i<=3;i++){var o=n[i];if(o[o.length-1]==="%"&&(a[i]=!0),o=parseFloat(o),a[i]&&(o=o/100*255),o<0||o>255)return;r.push(Math.floor(o))}var s=a[1]||a[2]||a[3],l=a[1]&&a[2]&&a[3];if(s&&!l)return;var f=n[4];if(f!==void 0){if(f=parseFloat(f),f<0||f>1)return;r.push(f)}}return r},i7=function(e){return o7[e.toLowerCase()]},wL=function(e){return(St(e)?e:null)||i7(e)||r7(e)||a7(e)||n7(e)},o7={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},xL=function(e){for(var r=e.map,n=e.keys,a=n.length,i=0;i=l||q<0||E&&V>=g}function R(){var L=e();if(M(L))return O(L);y=setTimeout(R,D(L))}function O(L){return y=void 0,S&&d?C(L):(d=h=void 0,p)}function B(){y!==void 0&&clearTimeout(y),w=0,d=b=h=y=void 0}function k(){return y===void 0?p:O(e())}function N(){var L=e(),q=M(L);if(d=arguments,h=this,b=L,q){if(y===void 0)return A(b);if(E)return clearTimeout(y),y=setTimeout(R,l),C(b)}return y===void 0&&(y=setTimeout(R,l)),p}return N.cancel=B,N.flush=k,N}return kp=o,kp}var p7=g7(),nf=ef(p7),Lp=ur?ur.performance:null,SL=Lp&&Lp.now?function(){return Lp.now()}:function(){return Date.now()},m7=function(){if(ur){if(ur.requestAnimationFrame)return function(t){ur.requestAnimationFrame(t)};if(ur.mozRequestAnimationFrame)return function(t){ur.mozRequestAnimationFrame(t)};if(ur.webkitRequestAnimationFrame)return function(t){ur.webkitRequestAnimationFrame(t)};if(ur.msRequestAnimationFrame)return function(t){ur.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(SL())},1e3/60)}}(),Md=function(e){return m7(e)},Ha=SL,Su=9261,TL=65599,gl=5381,CL=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Su,n=r,a;a=e.next(),!a.done;)n=n*TL+a.value|0;return n},Ml=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Su;return r*TL+e|0},Ol=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gl;return(r<<5)+r+e|0},y7=function(e,r){return e*2097152+r},bi=function(e){return e[0]*2097152+e[1]},Nc=function(e,r){return[Ml(e[0],r[0]),Ol(e[1],r[1])]},b7=function(e,r){var n={value:0,done:!1},a=0,i=e.length,o={next:function(){return a=0;a--)e[a]===r&&e.splice(a,1)},y2=function(e){e.splice(0,e.length)},C7=function(e,r){for(var n=0;n"u"?"undefined":lr(Set))!==R7?Set:M7,gh=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!h2(e)){Pt("An element must have a core reference and parameters set");return}var a=r.group;if(a==null&&(r.data&&r.data.source!=null&&r.data.target!=null?a="edges":a="nodes"),a!=="nodes"&&a!=="edges"){Pt("An element must be of type `nodes` or `edges`; you specified `"+a+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:a,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?a==="edges":!!r.pannable,active:!1,classes:new Yu,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),r.renderedPosition){var o=r.renderedPosition,s=e.pan(),l=e.zoom();i.position={x:(o.x-s.x)/l,y:(o.y-s.y)/l}}var f=[];St(r.classes)?f=r.classes:Ve(r.classes)&&(f=r.classes.split(/\s+/));for(var d=0,h=f.length;dE?1:0},d=function(x,E,S,C,A){var D;if(S==null&&(S=0),A==null&&(A=n),S<0)throw new Error("lo must be non-negative");for(C==null&&(C=x.length);SB;0<=B?O++:O--)R.push(O);return R}).apply(this).reverse(),M=[],C=0,A=D.length;Ck;0<=k?++R:--R)N.push(o(x,S));return N},b=function(x,E,S,C){var A,D,M;for(C==null&&(C=n),A=x[S];S>E;){if(M=S-1>>1,D=x[M],C(A,D)<0){x[S]=D,S=M;continue}break}return x[S]=A},w=function(x,E,S){var C,A,D,M,R;for(S==null&&(S=n),A=x.length,R=E,D=x[E],C=2*E+1;C0;){var D=E.pop(),M=w(D),R=D.id();if(g[R]=M,M!==1/0)for(var O=D.neighborhood().intersect(y),B=0;B0)for(F.unshift($);h[z];){var H=h[z];F.unshift(H.edge),F.unshift(H.node),Y=H.node,z=Y.id()}return s.spawn(F)}}}},q7={kruskal:function(e){e=e||function(S){return 1};for(var r=this.byGroup(),n=r.nodes,a=r.edges,i=n.length,o=new Array(i),s=n,l=function(C){for(var A=0;A0;){if(A(),M++,C===d){for(var R=[],O=i,B=d,k=x[B];R.unshift(O),k!=null&&R.unshift(k),O=w[B],O!=null;)B=O.id(),k=x[B];return{found:!0,distance:h[C],path:this.spawn(R),steps:M}}p[C]=!0;for(var N=S._private.edges,L=0;Lk&&(y[B]=k,E[B]=O,S[B]=A),!i){var N=O*d+R;!i&&y[N]>k&&(y[N]=k,E[N]=R,S[N]=A)}}}for(var L=0;L1&&arguments[1]!==void 0?arguments[1]:o,Be=S(Te),$e=[],Le=Be;;){if(Le==null)return r.spawn();var Ne=E(Le),ze=Ne.edge,Je=Ne.pred;if($e.unshift(Le[0]),Le.same(Ce)&&$e.length>0)break;ze!=null&&$e.unshift(ze),Le=Je}return l.spawn($e)},D=0;D=0;d--){var h=f[d],g=h[1],p=h[2];(r[g]===s&&r[p]===l||r[g]===l&&r[p]===s)&&f.splice(d,1)}for(var y=0;ya;){var i=Math.floor(Math.random()*r.length);r=U7(i,e,r),n--}return r},G7={kargerStein:function(){var e=this,r=this.byGroup(),n=r.nodes,a=r.edges;a.unmergeBy(function(F){return F.isLoop()});var i=n.length,o=a.length,s=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),l=Math.floor(i/H7);if(i<2){Pt("At least 2 nodes are required for Karger-Stein algorithm");return}for(var f=[],d=0;d1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=1/0,i=r;i1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=-1/0,i=r;i1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=0,i=0,o=r;o1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;a?e=e.slice(r,n):(n0&&e.splice(0,r));for(var s=0,l=e.length-1;l>=0;l--){var f=e[l];o?isFinite(f)||(e[l]=-1/0,s++):e.splice(l,1)}i&&e.sort(function(g,p){return g-p});var d=e.length,h=Math.floor(d/2);return d%2!==0?e[h+1+s]:(e[h-1+s]+e[h+s])/2},Q7=function(e){return Math.PI*e/180},Bc=function(e,r){return Math.atan2(r,e)-Math.PI/2},b2=Math.log2||function(t){return Math.log(t)/Math.log(2)},LL=function(e){return e>0?1:e<0?-1:0},xo=function(e,r){return Math.sqrt(ho(e,r))},ho=function(e,r){var n=r.x-e.x,a=r.y-e.y;return n*n+a*a},W7=function(e){for(var r=e.length,n=0,a=0;a=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},ez=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},tz=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},rz=function(e,r,n){return{x1:e.x1+r,x2:e.x2+r,y1:e.y1+n,y2:e.y2+n,w:e.w,h:e.h}},NL=function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},nz=function(e,r,n){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},ud=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},sd=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,a,i,o;if(r.length===1)n=a=i=o=r[0];else if(r.length===2)n=i=r[0],o=a=r[1];else if(r.length===4){var s=yr(r,4);n=s[0],a=s[1],i=s[2],o=s[3]}return e.x1-=o,e.x2+=a,e.y1-=n,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},qC=function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},w2=function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2r.y2||r.y1>e.y2)},Pu=function(e,r,n){return e.x1<=r&&r<=e.x2&&e.y1<=n&&n<=e.y2},az=function(e,r){return Pu(e,r.x,r.y)},BL=function(e,r){return Pu(e,r.x1,r.y1)&&Pu(e,r.x2,r.y2)},qL=function(e,r,n,a,i,o,s){var l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",f=l==="auto"?_o(i,o):l,d=i/2,h=o/2;f=Math.min(f,d,h);var g=f!==d,p=f!==h,y;if(g){var b=n-d+f-s,w=a-h-s,x=n+d-f+s,E=w;if(y=Si(e,r,n,a,b,w,x,E,!1),y.length>0)return y}if(p){var S=n+d+s,C=a-h+f-s,A=S,D=a+h-f+s;if(y=Si(e,r,n,a,S,C,A,D,!1),y.length>0)return y}if(g){var M=n-d+f-s,R=a+h+s,O=n+d-f+s,B=R;if(y=Si(e,r,n,a,M,R,O,B,!1),y.length>0)return y}if(p){var k=n-d-s,N=a-h+f-s,L=k,q=a+h-f+s;if(y=Si(e,r,n,a,k,N,L,q,!1),y.length>0)return y}var V;{var P=n-d+f,$=a-h+f;if(V=pl(e,r,n,a,P,$,f+s),V.length>0&&V[0]<=P&&V[1]<=$)return[V[0],V[1]]}{var F=n+d-f,Y=a-h+f;if(V=pl(e,r,n,a,F,Y,f+s),V.length>0&&V[0]>=F&&V[1]<=Y)return[V[0],V[1]]}{var z=n+d-f,H=a+h-f;if(V=pl(e,r,n,a,z,H,f+s),V.length>0&&V[0]>=z&&V[1]>=H)return[V[0],V[1]]}{var Z=n-d+f,J=a+h-f;if(V=pl(e,r,n,a,Z,J,f+s),V.length>0&&V[0]<=Z&&V[1]>=J)return[V[0],V[1]]}return[]},iz=function(e,r,n,a,i,o,s){var l=s,f=Math.min(n,i),d=Math.max(n,i),h=Math.min(a,o),g=Math.max(a,o);return f-l<=e&&e<=d+l&&h-l<=r&&r<=g+l},oz=function(e,r,n,a,i,o,s,l,f){var d={x1:Math.min(n,s,i)-f,x2:Math.max(n,s,i)+f,y1:Math.min(a,l,o)-f,y2:Math.max(a,l,o)+f};return!(ed.x2||rd.y2)},uz=function(e,r,n,a){n-=a;var i=r*r-4*e*n;if(i<0)return[];var o=Math.sqrt(i),s=2*e,l=(-r+o)/s,f=(-r-o)/s;return[l,f]},sz=function(e,r,n,a,i){var o=1e-5;e===0&&(e=o),r/=e,n/=e,a/=e;var s,l,f,d,h,g,p,y;if(l=(3*n-r*r)/9,f=-(27*a)+r*(9*n-2*(r*r)),f/=54,s=l*l*l+f*f,i[1]=0,p=r/3,s>0){h=f+Math.sqrt(s),h=h<0?-Math.pow(-h,1/3):Math.pow(h,1/3),g=f-Math.sqrt(s),g=g<0?-Math.pow(-g,1/3):Math.pow(g,1/3),i[0]=-p+h+g,p+=(h+g)/2,i[4]=i[2]=-p,p=Math.sqrt(3)*(-g+h)/2,i[3]=p,i[5]=-p;return}if(i[5]=i[3]=0,s===0){y=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),i[0]=-p+2*y,i[4]=i[2]=-(y+p);return}l=-l,d=l*l*l,d=Math.acos(f/Math.sqrt(d)),y=2*Math.sqrt(l),i[0]=-p+y*Math.cos(d/3),i[2]=-p+y*Math.cos((d+2*Math.PI)/3),i[4]=-p+y*Math.cos((d+4*Math.PI)/3)},lz=function(e,r,n,a,i,o,s,l){var f=1*n*n-4*n*i+2*n*s+4*i*i-4*i*s+s*s+a*a-4*a*o+2*a*l+4*o*o-4*o*l+l*l,d=1*9*n*i-3*n*n-3*n*s-6*i*i+3*i*s+9*a*o-3*a*a-3*a*l-6*o*o+3*o*l,h=1*3*n*n-6*n*i+n*s-n*e+2*i*i+2*i*e-s*e+3*a*a-6*a*o+a*l-a*r+2*o*o+2*o*r-l*r,g=1*n*i-n*n+n*e-i*e+a*o-a*a+a*r-o*r,p=[];sz(f,d,h,g,p);for(var y=1e-7,b=[],w=0;w<6;w+=2)Math.abs(p[w+1])=0&&p[w]<=1&&b.push(p[w]);b.push(1),b.push(0);for(var x=-1,E,S,C,A=0;A=0?Cf?(e-i)*(e-i)+(r-o)*(r-o):d-g},Yr=function(e,r,n){for(var a,i,o,s,l,f=0,d=0;d=e&&e>=o||a<=e&&e<=o)l=(e-a)/(o-a)*(s-i)+i,l>r&&f++;else continue;return f%2!==0},Ua=function(e,r,n,a,i,o,s,l,f){var d=new Array(n.length),h;l[0]!=null?(h=Math.atan(l[1]/l[0]),l[0]<0?h=h+Math.PI/2:h=-h-Math.PI/2):h=l;for(var g=Math.cos(-h),p=Math.sin(-h),y=0;y0){var w=kd(d,-f);b=Dd(w)}else b=d;return Yr(e,r,b)},cz=function(e,r,n,a,i,o,s,l){for(var f=new Array(n.length*2),d=0;d=0&&w<=1&&E.push(w),x>=0&&x<=1&&E.push(x),E.length===0)return[];var S=E[0]*l[0]+e,C=E[0]*l[1]+r;if(E.length>1){if(E[0]==E[1])return[S,C];var A=E[1]*l[0]+e,D=E[1]*l[1]+r;return[S,C,A,D]}else return[S,C]},qp=function(e,r,n){return r<=e&&e<=n||n<=e&&e<=r?e:e<=r&&r<=n||n<=r&&r<=e?r:n},Si=function(e,r,n,a,i,o,s,l,f){var d=e-i,h=n-e,g=s-i,p=r-o,y=a-r,b=l-o,w=g*p-b*d,x=h*p-y*d,E=b*h-g*y;if(E!==0){var S=w/E,C=x/E,A=.001,D=0-A,M=1+A;return D<=S&&S<=M&&D<=C&&C<=M?[e+S*h,r+S*y]:f?[e+S*h,r+S*y]:[]}else return w===0||x===0?qp(e,n,s)===s?[s,l]:qp(e,n,i)===i?[i,o]:qp(i,s,n)===n?[n,a]:[]:[]},Ll=function(e,r,n,a,i,o,s,l){var f=[],d,h=new Array(n.length),g=!0;o==null&&(g=!1);var p;if(g){for(var y=0;y0){var b=kd(h,-l);p=Dd(b)}else p=h}else p=n;for(var w,x,E,S,C=0;C2){for(var y=[d[0],d[1]],b=Math.pow(y[0]-e,2)+Math.pow(y[1]-r,2),w=1;wd&&(d=C)},get:function(S){return f[S]}},g=0;g0?V=q.edgesTo(L)[0]:V=L.edgesTo(q)[0];var P=a(V);L=L.id(),M[L]>M[k]+P&&(M[L]=M[k]+P,R.nodes.indexOf(L)<0?R.push(L):R.updateItem(L),D[L]=0,A[L]=[]),M[L]==M[k]+P&&(D[L]=D[L]+D[k],A[L].push(k))}else for(var $=0;$0;){for(var H=C.pop(),Z=0;Z0&&s.push(n[l]);s.length!==0&&i.push(a.collection(s))}return i},Az=function(e,r){for(var n=0;n5&&arguments[5]!==void 0?arguments[5]:Oz,s=a,l,f,d=0;d=2?rl(e,r,n,0,$C,Dz):rl(e,r,n,0,VC)},squaredEuclidean:function(e,r,n){return rl(e,r,n,0,$C)},manhattan:function(e,r,n){return rl(e,r,n,0,VC)},max:function(e,r,n){return rl(e,r,n,-1/0,kz)}};zu["squared-euclidean"]=zu.squaredEuclidean;zu.squaredeuclidean=zu.squaredEuclidean;function mh(t,e,r,n,a,i){var o;return zt(t)?o=t:o=zu[t]||zu.euclidean,e===0&&zt(t)?o(a,i):o(e,r,n,a,i)}var Lz=fr({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),_2=function(e){return Lz(e)},Ld=function(e,r,n,a,i){var o=i!=="kMedoids",s=o?function(h){return n[h]}:function(h){return a[h](n)},l=function(g){return a[g](r)},f=n,d=r;return mh(e,a.length,s,l,f,d)},Pp=function(e,r,n){for(var a=n.length,i=new Array(a),o=new Array(a),s=new Array(r),l=null,f=0;fn)return!1}return!0},qz=function(e,r,n){for(var a=0;as&&(s=r[f][d],l=d);i[l].push(e[f])}for(var h=0;h=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var y=r[o],b=r[a[o]],w;i.mode==="dendrogram"?w={left:y,right:b,key:y.key}:w={value:y.value.concat(b.value),key:y.key},e[y.index]=w,e.splice(b.index,1),r[y.key]=w;for(var x=0;xn[b.key][E.key]&&(l=n[b.key][E.key])):i.linkage==="max"?(l=n[y.key][E.key],n[y.key][E.key]0&&a.push(i);return a},XC=function(e,r,n){for(var a=[],i=0;is&&(o=f,s=r[i*e+f])}o>0&&a.push(o)}for(var d=0;df&&(l=d,f=h)}n[i]=o[l]}return a=XC(e,r,n),a},KC=function(e){for(var r=this.cy(),n=this.nodes(),a=Kz(e),i={},o=0;o=k?(N=k,k=q,L=V):q>N&&(N=q);for(var P=0;P0?1:0;M[O%a.minIterations*s+Z]=J,H+=J}if(H>0&&(O>=a.minIterations-1||O==a.maxIterations-1)){for(var U=0,K=0;K1||D>1)&&(s=!0),h[S]=[],E.outgoers().forEach(function(R){R.isEdge()&&h[S].push(R.id())})}else g[S]=[void 0,E.target().id()]}):o.forEach(function(E){var S=E.id();if(E.isNode()){var C=E.degree(!0);C%2&&(l?f?s=!0:f=S:l=S),h[S]=[],E.connectedEdges().forEach(function(A){return h[S].push(A.id())})}else g[S]=[E.source().id(),E.target().id()]});var p={found:!1,trail:void 0};if(s)return p;if(f&&l)if(i){if(d&&f!=d)return p;d=f}else{if(d&&f!=d&&l!=d)return p;d||(d=f)}else d||(d=o[0].id());var y=function(S){for(var C=S,A=[S],D,M,R;h[C].length;)D=h[C].shift(),M=g[D][0],R=g[D][1],C!=R?(h[R]=h[R].filter(function(O){return O!=D}),C=R):!i&&C!=M&&(h[M]=h[M].filter(function(O){return O!=D}),C=M),A.unshift(D),A.unshift(C);return A},b=[],w=[];for(w=y(d);w.length!=1;)h[w[0]].length==0?(b.unshift(o.getElementById(w.shift())),b.unshift(o.getElementById(w.shift()))):w=y(w.shift()).concat(w);b.unshift(o.getElementById(w.shift()));for(var x in h)if(h[x].length)return p;return p.found=!0,p.trail=this.spawn(b,!0),p}},Pc=function(){var e=this,r={},n=0,a=0,i=[],o=[],s={},l=function(g,p){for(var y=o.length-1,b=[],w=e.spawn();o[y].x!=g||o[y].y!=p;)b.push(o.pop().edge),y--;b.push(o.pop().edge),b.forEach(function(x){var E=x.connectedNodes().intersection(e);w.merge(x),E.forEach(function(S){var C=S.id(),A=S.connectedEdges().intersection(e);w.merge(S),r[C].cutVertex?w.merge(A.filter(function(D){return D.isLoop()})):w.merge(A)})}),i.push(w)},f=function(g,p,y){g===y&&(a+=1),r[p]={id:n,low:n++,cutVertex:!1};var b=e.getElementById(p).connectedEdges().intersection(e);if(b.size()===0)i.push(e.spawn(e.getElementById(p)));else{var w,x,E,S;b.forEach(function(C){w=C.source().id(),x=C.target().id(),E=w===p?x:w,E!==y&&(S=C.id(),s[S]||(s[S]=!0,o.push({x:p,y:E,edge:C})),E in r?r[p].low=Math.min(r[p].low,r[E].id):(f(g,E,p),r[p].low=Math.min(r[p].low,r[E].low),r[p].id<=r[E].low&&(r[p].cutVertex=!0,l(p,E))))})}};e.forEach(function(h){if(h.isNode()){var g=h.id();g in r||(a=0,f(g,g),r[g].cutVertex=a>1)}});var d=Object.keys(r).filter(function(h){return r[h].cutVertex}).map(function(h){return e.getElementById(h)});return{cut:e.spawn(d),components:i}},rI={hopcroftTarjanBiconnected:Pc,htbc:Pc,htb:Pc,hopcroftTarjanBiconnectedComponents:Pc},zc=function(){var e=this,r={},n=0,a=[],i=[],o=e.spawn(e),s=function(f){i.push(f),r[f]={index:n,low:n++,explored:!1};var d=e.getElementById(f).connectedEdges().intersection(e);if(d.forEach(function(b){var w=b.target().id();w!==f&&(w in r||s(w),r[w].explored||(r[f].low=Math.min(r[f].low,r[w].low)))}),r[f].index===r[f].low){for(var h=e.spawn();;){var g=i.pop();if(h.merge(e.getElementById(g)),r[g].low=r[f].index,r[g].explored=!0,g===f)break}var p=h.edgesWith(h),y=h.merge(p);a.push(y),o=o.difference(y)}};return e.forEach(function(l){if(l.isNode()){var f=l.id();f in r||s(f)}}),{cut:o,components:a}},nI={tarjanStronglyConnected:zc,tsc:zc,tscc:zc,tarjanStronglyConnectedComponents:zc},HL={};[Dl,B7,q7,z7,V7,F7,G7,pz,Mu,Ou,Rx,Mz,Fz,Yz,Jz,tI,rI,nI].forEach(function(t){Xe(HL,t)});/*! Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) Licensed under The MIT License (http://opensource.org/licenses/MIT) */var UL=0,GL=1,YL=2,Hn=function(e){if(!(this instanceof Hn))return new Hn(e);this.id="Thenable/1.0.7",this.state=UL,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Hn.prototype={fulfill:function(e){return jC(this,GL,"fulfillValue",e)},reject:function(e){return jC(this,YL,"rejectReason",e)},then:function(e,r){var n=this,a=new Hn;return n.onFulfilled.push(QC(e,a,"fulfill")),n.onRejected.push(QC(r,a,"reject")),XL(n),a.proxy}};var jC=function(e,r,n,a){return e.state===UL&&(e.state=r,e[n]=a,XL(e)),e},XL=function(e){e.state===GL?ZC(e,"onFulfilled",e.fulfillValue):e.state===YL&&ZC(e,"onRejected",e.rejectReason)},ZC=function(e,r,n){if(e[r].length!==0){var a=e[r];e[r]=[];var i=function(){for(var s=0;s0}},clearQueue:function(){return function(){var r=this,n=r.length!==void 0,a=n?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var o=0;o-1}return im=e,im}var om,wA;function _I(){if(wA)return om;wA=1;var t=wh();function e(r,n){var a=this.__data__,i=t(a,r);return i<0?(++this.size,a.push([r,n])):a[i][1]=n,this}return om=e,om}var um,xA;function EI(){if(xA)return um;xA=1;var t=yI(),e=bI(),r=wI(),n=xI(),a=_I();function i(o){var s=-1,l=o==null?0:o.length;for(this.clear();++s-1&&n%1==0&&n0&&this.spawn(a).updateStyle().emit("class"),r},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var r=this[0];return r!=null&&r._private.classes.has(e)},toggleClass:function(e,r){St(e)||(e=e.match(/\S+/g)||[]);for(var n=this,a=r===void 0,i=[],o=0,s=n.length;o0&&this.spawn(i).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,r){var n=this;if(r==null)r=250;else if(r===0)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},r),n}};ld.className=ld.classNames=ld.classes;var ut={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:sr,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};ut.variable="(?:[\\w-.]|(?:\\\\"+ut.metaChar+"))+";ut.className="(?:[\\w-]|(?:\\\\"+ut.metaChar+"))+";ut.value=ut.string+"|"+ut.number;ut.id=ut.variable;(function(){var t,e,r;for(t=ut.comparatorOp.split("|"),r=0;r=0)&&e!=="="&&(ut.comparatorOp+="|\\!"+e)})();var _t=function(){return{checks:[]}},De={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},kx=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(t,e){return t7(t.selector,e.selector)}),eV=function(){for(var t={},e,r=0;r0&&d.edgeCount>0)return yt("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(d.edgeCount>1)return yt("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;d.edgeCount===1&&yt("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},oV=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(d){return d??""},r=function(d){return Ve(d)?'"'+d+'"':e(d)},n=function(d){return" "+d+" "},a=function(d,h){var g=d.type,p=d.value;switch(g){case De.GROUP:{var y=e(p);return y.substring(0,y.length-1)}case De.DATA_COMPARE:{var b=d.field,w=d.operator;return"["+b+n(e(w))+r(p)+"]"}case De.DATA_BOOL:{var x=d.operator,E=d.field;return"["+e(x)+E+"]"}case De.DATA_EXIST:{var S=d.field;return"["+S+"]"}case De.META_COMPARE:{var C=d.operator,A=d.field;return"[["+A+n(e(C))+r(p)+"]]"}case De.STATE:return p;case De.ID:return"#"+p;case De.CLASS:return"."+p;case De.PARENT:case De.CHILD:return i(d.parent,h)+n(">")+i(d.child,h);case De.ANCESTOR:case De.DESCENDANT:return i(d.ancestor,h)+" "+i(d.descendant,h);case De.COMPOUND_SPLIT:{var D=i(d.left,h),M=i(d.subject,h),R=i(d.right,h);return D+(D.length>0?" ":"")+M+R}case De.TRUE:return""}},i=function(d,h){return d.checks.reduce(function(g,p,y){return g+(h===d&&y===0?"$":"")+a(p,h)},"")},o="",s=0;s1&&s=0&&(r=r.replace("!",""),h=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),d=!0),(i||s||d)&&(l=!i&&!o?"":""+e,f=""+n),d&&(e=l=l.toLowerCase(),n=f=f.toLowerCase()),r){case"*=":a=l.indexOf(f)>=0;break;case"$=":a=l.indexOf(f,l.length-f.length)>=0;break;case"^=":a=l.indexOf(f)===0;break;case"=":a=e===n;break;case">":g=!0,a=e>n;break;case">=":g=!0,a=e>=n;break;case"<":g=!0,a=e0;){var d=a.shift();e(d),i.add(d.id()),s&&n(a,i,d)}return t}function t8(t,e,r){if(r.isParent())for(var n=r._private.children,a=0;a1&&arguments[1]!==void 0?arguments[1]:!0;return C2(this,t,e,t8)};function r8(t,e,r){if(r.isChild()){var n=r._private.parent;e.has(n.id())||t.push(n)}}Iu.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return C2(this,t,e,r8)};function vV(t,e,r){r8(t,e,r),t8(t,e,r)}Iu.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return C2(this,t,e,vV)};Iu.ancestors=Iu.parents;var Nl,n8;Nl=n8={data:mt.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:mt.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:mt.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:mt.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:mt.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:mt.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};Nl.attr=Nl.data;Nl.removeAttr=Nl.removeData;var gV=n8,_h={};function Bm(t){return function(e){var r=this;if(e===void 0&&(e=!0),r.length!==0)if(r.isNode()&&!r.removed()){for(var n=0,a=r[0],i=a._private.edges,o=0;oe}),minIndegree:hu("indegree",function(t,e){return te}),minOutdegree:hu("outdegree",function(t,e){return te})});Xe(_h,{totalDegree:function(e){for(var r=0,n=this.nodes(),a=0;a0,g=h;h&&(d=d[0]);var p=g?d.position():{x:0,y:0};r!==void 0?f.position(e,r+p[e]):i!==void 0&&f.position({x:i.x+p.x,y:i.y+p.y})}else{var y=n.position(),b=s?n.parent():null,w=b&&b.length>0,x=w;w&&(b=b[0]);var E=x?b.position():{x:0,y:0};return i={x:y.x-E.x,y:y.y-E.y},e===void 0?i:i[e]}else if(!o)return;return this}};Fn.modelPosition=Fn.point=Fn.position;Fn.modelPositions=Fn.points=Fn.positions;Fn.renderedPoint=Fn.renderedPosition;Fn.relativePoint=Fn.relativePosition;var pV=a8,Du,Bi;Du=Bi={};Bi.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),n=r.zoom(),a=r.pan(),i=e.x1*n+a.x,o=e.x2*n+a.x,s=e.y1*n+a.y,l=e.y2*n+a.y;return{x1:i,x2:o,y1:s,y2:l,w:o-i,h:l-s}};Bi.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var n=r._private;n.compoundBoundsClean=!1,n.bbCache=null,t||r.emitAndNotify("bounds")}}),this)};Bi.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(o){if(!o.isParent())return;var s=o._private,l=o.children(),f=o.pstyle("compound-sizing-wrt-labels").value==="include",d={width:{val:o.pstyle("min-width").pfValue,left:o.pstyle("min-width-bias-left"),right:o.pstyle("min-width-bias-right")},height:{val:o.pstyle("min-height").pfValue,top:o.pstyle("min-height-bias-top"),bottom:o.pstyle("min-height-bias-bottom")}},h=l.boundingBox({includeLabels:f,includeOverlays:!1,useCache:!1}),g=s.position;(h.w===0||h.h===0)&&(h={w:o.pstyle("width").pfValue,h:o.pstyle("height").pfValue},h.x1=g.x-h.w/2,h.x2=g.x+h.w/2,h.y1=g.y-h.h/2,h.y2=g.y+h.h/2);function p(O,B,k){var N=0,L=0,q=B+k;return O>0&&q>0&&(N=B/q*O,L=k/q*O),{biasDiff:N,biasComplementDiff:L}}function y(O,B,k,N){if(k.units==="%")switch(N){case"width":return O>0?k.pfValue*O:0;case"height":return B>0?k.pfValue*B:0;case"average":return O>0&&B>0?k.pfValue*(O+B)/2:0;case"min":return O>0&&B>0?O>B?k.pfValue*B:k.pfValue*O:0;case"max":return O>0&&B>0?O>B?k.pfValue*O:k.pfValue*B:0;default:return 0}else return k.units==="px"?k.pfValue:0}var b=d.width.left.value;d.width.left.units==="px"&&d.width.val>0&&(b=b*100/d.width.val);var w=d.width.right.value;d.width.right.units==="px"&&d.width.val>0&&(w=w*100/d.width.val);var x=d.height.top.value;d.height.top.units==="px"&&d.height.val>0&&(x=x*100/d.height.val);var E=d.height.bottom.value;d.height.bottom.units==="px"&&d.height.val>0&&(E=E*100/d.height.val);var S=p(d.width.val-h.w,b,w),C=S.biasDiff,A=S.biasComplementDiff,D=p(d.height.val-h.h,x,E),M=D.biasDiff,R=D.biasComplementDiff;s.autoPadding=y(h.w,h.h,o.pstyle("padding"),o.pstyle("padding-relative-to").value),s.autoWidth=Math.max(h.w,d.width.val),g.x=(-C+h.x1+h.x2+A)/2,s.autoHeight=Math.max(h.h,d.height.val),g.y=(-M+h.y1+h.y2+R)/2}for(var n=0;ne.x2?a:e.x2,e.y1=ne.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},vo=function(e,r){return r==null?e:Pn(e,r.x1,r.y1,r.x2,r.y2)},nl=function(e,r,n){return zn(e,r,n)},Ic=function(e,r,n){if(!r.cy().headless()){var a=r._private,i=a.rstyle,o=i.arrowWidth/2,s=r.pstyle(n+"-arrow-shape").value,l,f;if(s!=="none"){n==="source"?(l=i.srcX,f=i.srcY):n==="target"?(l=i.tgtX,f=i.tgtY):(l=i.midX,f=i.midY);var d=a.arrowBounds=a.arrowBounds||{},h=d[n]=d[n]||{};h.x1=l-o,h.y1=f-o,h.x2=l+o,h.y2=f+o,h.w=h.x2-h.x1,h.h=h.y2-h.y1,ud(h,1),Pn(e,h.x1,h.y1,h.x2,h.y2)}}},qm=function(e,r,n){if(!r.cy().headless()){var a;n?a=n+"-":a="";var i=r._private,o=i.rstyle,s=r.pstyle(a+"label").strValue;if(s){var l=r.pstyle("text-halign"),f=r.pstyle("text-valign"),d=nl(o,"labelWidth",n),h=nl(o,"labelHeight",n),g=nl(o,"labelX",n),p=nl(o,"labelY",n),y=r.pstyle(a+"text-margin-x").pfValue,b=r.pstyle(a+"text-margin-y").pfValue,w=r.isEdge(),x=r.pstyle(a+"text-rotation"),E=r.pstyle("text-outline-width").pfValue,S=r.pstyle("text-border-width").pfValue,C=S/2,A=r.pstyle("text-background-padding").pfValue,D=2,M=h,R=d,O=R/2,B=M/2,k,N,L,q;if(w)k=g-O,N=g+O,L=p-B,q=p+B;else{switch(l.value){case"left":k=g-R,N=g;break;case"center":k=g-O,N=g+O;break;case"right":k=g,N=g+R;break}switch(f.value){case"top":L=p-M,q=p;break;case"center":L=p-B,q=p+B;break;case"bottom":L=p,q=p+M;break}}var V=y-Math.max(E,C)-A-D,P=y+Math.max(E,C)+A+D,$=b-Math.max(E,C)-A-D,F=b+Math.max(E,C)+A+D;k+=V,N+=P,L+=$,q+=F;var Y=n||"main",z=i.labelBounds,H=z[Y]=z[Y]||{};H.x1=k,H.y1=L,H.x2=N,H.y2=q,H.w=N-k,H.h=q-L,H.leftPad=V,H.rightPad=P,H.topPad=$,H.botPad=F;var Z=w&&x.strValue==="autorotate",J=x.pfValue!=null&&x.pfValue!==0;if(Z||J){var U=Z?nl(i.rstyle,"labelAngle",n):x.pfValue,K=Math.cos(U),j=Math.sin(U),re=(k+N)/2,ne=(L+q)/2;if(!w){switch(l.value){case"left":re=N;break;case"right":re=k;break}switch(f.value){case"top":ne=q;break;case"bottom":ne=L;break}}var ee=function(Re,Te){return Re=Re-re,Te=Te-ne,{x:Re*K-Te*j+re,y:Re*j+Te*K+ne}},W=ee(k,L),te=ee(k,q),ce=ee(N,L),de=ee(N,q);k=Math.min(W.x,te.x,ce.x,de.x),N=Math.max(W.x,te.x,ce.x,de.x),L=Math.min(W.y,te.y,ce.y,de.y),q=Math.max(W.y,te.y,ce.y,de.y)}var ye=Y+"Rot",we=z[ye]=z[ye]||{};we.x1=k,we.y1=L,we.x2=N,we.y2=q,we.w=N-k,we.h=q-L,Pn(e,k,L,N,q),Pn(i.labelBounds.all,k,L,N,q)}return e}},mV=function(e,r){if(!r.cy().headless()){var n=r.pstyle("outline-opacity").value,a=r.pstyle("outline-width").value;if(n>0&&a>0){var i=r.pstyle("outline-offset").value,o=r.pstyle("shape").value,s=a+i,l=(e.w+s*2)/e.w,f=(e.h+s*2)/e.h,d=0,h=0;["diamond","pentagon","round-triangle"].includes(o)?(l=(e.w+s*2.4)/e.w,h=-s/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(o)?l=(e.w+s*2.4)/e.w:o==="star"?(l=(e.w+s*2.8)/e.w,f=(e.h+s*2.6)/e.h,h=-s/3.8):o==="triangle"?(l=(e.w+s*2.8)/e.w,f=(e.h+s*2.4)/e.h,h=-s/1.4):o==="vee"&&(l=(e.w+s*4.4)/e.w,f=(e.h+s*3.8)/e.h,h=-s*.5);var g=e.h*f-e.h,p=e.w*l-e.w;if(sd(e,[Math.ceil(g/2),Math.ceil(p/2)]),d!=0||h!==0){var y=rz(e,d,h);NL(e,y)}}}},yV=function(e,r){var n=e._private.cy,a=n.styleEnabled(),i=n.headless(),o=jr(),s=e._private,l=e.isNode(),f=e.isEdge(),d,h,g,p,y,b,w=s.rstyle,x=l&&a?e.pstyle("bounds-expansion").pfValue:[0],E=function(Pe){return Pe.pstyle("display").value!=="none"},S=!a||E(e)&&(!f||E(e.source())&&E(e.target()));if(S){var C=0,A=0;a&&r.includeOverlays&&(C=e.pstyle("overlay-opacity").value,C!==0&&(A=e.pstyle("overlay-padding").value));var D=0,M=0;a&&r.includeUnderlays&&(D=e.pstyle("underlay-opacity").value,D!==0&&(M=e.pstyle("underlay-padding").value));var R=Math.max(A,M),O=0,B=0;if(a&&(O=e.pstyle("width").pfValue,B=O/2),l&&r.includeNodes){var k=e.position();y=k.x,b=k.y;var N=e.outerWidth(),L=N/2,q=e.outerHeight(),V=q/2;d=y-L,h=y+L,g=b-V,p=b+V,Pn(o,d,g,h,p),a&&r.includeOutlines&&mV(o,e)}else if(f&&r.includeEdges)if(a&&!i){var P=e.pstyle("curve-style").strValue;if(d=Math.min(w.srcX,w.midX,w.tgtX),h=Math.max(w.srcX,w.midX,w.tgtX),g=Math.min(w.srcY,w.midY,w.tgtY),p=Math.max(w.srcY,w.midY,w.tgtY),d-=B,h+=B,g-=B,p+=B,Pn(o,d,g,h,p),P==="haystack"){var $=w.haystackPts;if($&&$.length===2){if(d=$[0].x,g=$[0].y,h=$[1].x,p=$[1].y,d>h){var F=d;d=h,h=F}if(g>p){var Y=g;g=p,p=Y}Pn(o,d-B,g-B,h+B,p+B)}}else if(P==="bezier"||P==="unbundled-bezier"||P.endsWith("segments")||P.endsWith("taxi")){var z;switch(P){case"bezier":case"unbundled-bezier":z=w.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":z=w.linePts;break}if(z!=null)for(var H=0;Hh){var re=d;d=h,h=re}if(g>p){var ne=g;g=p,p=ne}d-=B,h+=B,g-=B,p+=B,Pn(o,d,g,h,p)}if(a&&r.includeEdges&&f&&(Ic(o,e,"mid-source"),Ic(o,e,"mid-target"),Ic(o,e,"source"),Ic(o,e,"target")),a){var ee=e.pstyle("ghost").value==="yes";if(ee){var W=e.pstyle("ghost-offset-x").pfValue,te=e.pstyle("ghost-offset-y").pfValue;Pn(o,o.x1+W,o.y1+te,o.x2+W,o.y2+te)}}var ce=s.bodyBounds=s.bodyBounds||{};qC(ce,o),sd(ce,x),ud(ce,1),a&&(d=o.x1,h=o.x2,g=o.y1,p=o.y2,Pn(o,d-R,g-R,h+R,p+R));var de=s.overlayBounds=s.overlayBounds||{};qC(de,o),sd(de,x),ud(de,1);var ye=s.labelBounds=s.labelBounds||{};ye.all!=null?tz(ye.all):ye.all=jr(),a&&r.includeLabels&&(r.includeMainLabels&&qm(o,e,null),f&&(r.includeSourceLabels&&qm(o,e,"source"),r.includeTargetLabels&&qm(o,e,"target")))}return o.x1=Cn(o.x1),o.y1=Cn(o.y1),o.x2=Cn(o.x2),o.y2=Cn(o.y2),o.w=Cn(o.x2-o.x1),o.h=Cn(o.y2-o.y1),o.w>0&&o.h>0&&S&&(sd(o,x),ud(o,1)),o},o8=function(e){var r=0,n=function(o){return(o?1:0)<0&&arguments[0]!==void 0?arguments[0]:LV,e=arguments.length>1?arguments[1]:void 0,r=0;r=0;s--)o(s);return this};ki.removeAllListeners=function(){return this.removeListener("*")};ki.emit=ki.trigger=function(t,e,r){var n=this.listeners,a=n.length;return this.emitting++,St(e)||(e=[e]),NV(this,function(i,o){r!=null&&(n=[{event:o.event,type:o.type,namespace:o.namespace,callback:r}],a=n.length);for(var s=function(){var d=n[l];if(d.type===o.type&&(!d.namespace||d.namespace===o.namespace||d.namespace===kV)&&i.eventMatches(i.context,d,o)){var h=[o];e!=null&&C7(h,e),i.beforeEmit(i.context,d,o),d.conf&&d.conf.one&&(i.listeners=i.listeners.filter(function(y){return y!==d}));var g=i.callbackContext(i.context,d,o),p=d.callback.apply(g,h);i.afterEmit(i.context,d,o),p===!1&&(o.stopPropagation(),o.preventDefault())}},l=0;l1&&!o){var s=this.length-1,l=this[s],f=l._private.data.id;this[s]=void 0,this[e]=l,i.set(f,{ele:l,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var r=this._private,n=e._private.data.id,a=r.map,i=a.get(n);if(!i)return this;var o=i.index;return this.unmergeAt(o),this},unmerge:function(e){var r=this._private.cy;if(!e)return this;if(e&&Ve(e)){var n=e;e=r.mutableElements().filter(n)}for(var a=0;a=0;r--){var n=this[r];e(n)&&this.unmergeAt(r)}return this},map:function(e,r){for(var n=[],a=this,i=0;in&&(n=l,a=s)}return{value:n,ele:a}},min:function(e,r){for(var n=1/0,a,i=this,o=0;o=0&&i"u"?"undefined":lr(Symbol))!=e&&lr(Symbol.iterator)!=e;r&&(Nd[Symbol.iterator]=function(){var n=this,a={value:void 0,done:!1},i=0,o=this.length;return dL({next:function(){return i1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],a=n.cy();if(a.styleEnabled()&&n){n._private.styleDirty&&(n._private.styleDirty=!1,a.style().apply(n));var i=n._private.style[e];return i??(r?a.style().getDefaultProperty(e):null)}},numericStyle:function(e){var r=this[0];if(r.cy().styleEnabled()&&r){var n=r.pstyle(e);return n.pfValue!==void 0?n.pfValue:n.value}},numericStyleUnits:function(e){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(e).units},renderedStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=this[0];if(n)return r.style().getRenderedStyle(n,e)},style:function(e,r){var n=this.cy();if(!n.styleEnabled())return this;var a=!1,i=n.style();if(st(e)){var o=e;i.applyBypass(this,o,a),this.emitAndNotify("style")}else if(Ve(e))if(r===void 0){var s=this[0];return s?i.getStylePropertyValue(s,e):void 0}else i.applyBypass(this,e,r,a),this.emitAndNotify("style");else if(e===void 0){var l=this[0];return l?i.getRawStyle(l):void 0}return this},removeStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=!1,a=r.style(),i=this;if(e===void 0)for(var o=0;o0&&e.push(d[0]),e.push(s[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});Nr.neighbourhood=Nr.neighborhood;Nr.closedNeighbourhood=Nr.closedNeighborhood;Nr.openNeighbourhood=Nr.openNeighborhood;Xe(Nr,{source:An(function(e){var r=this[0],n;return r&&(n=r._private.source||r.cy().collection()),n&&e?n.filter(e):n},"source"),target:An(function(e){var r=this[0],n;return r&&(n=r._private.target||r.cy().collection()),n&&e?n.filter(e):n},"target"),sources:oR({attr:"source"}),targets:oR({attr:"target"})});function oR(t){return function(r){for(var n=[],a=0;a0);return o},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}});Nr.componentsOf=Nr.components;var Ar=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){Pt("A collection must have a reference to the core");return}var i=new $a,o=!1;if(!r)r=[];else if(r.length>0&&st(r[0])&&!Jl(r[0])){o=!0;for(var s=[],l=new Yu,f=0,d=r.length;f0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=r.cy(),a=n._private,i=[],o=[],s,l=0,f=r.length;l0){for(var Y=s.length===r.length?r:new Ar(n,s),z=0;z0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=[],a={},i=r._private.cy;function o(q){for(var V=q._private.edges,P=0;P0&&(t?k.emitAndNotify("remove"):e&&k.emit("remove"));for(var N=0;N0?N=q:k=q;while(Math.abs(L)>o&&++V=i?E(B,V):P===0?V:C(B,k,k+f)}var D=!1;function M(){D=!0,(t!==e||r!==n)&&S()}var R=function(k){return D||M(),t===e&&r===n?k:k===0?0:k===1?1:w(A(k),e,n)};R.getControlPoints=function(){return[{x:t,y:e},{x:r,y:n}]};var O="generateBezier("+[t,e,r,n]+")";return R.toString=function(){return O},R}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var GV=function(){function t(n){return-n.tension*n.x-n.friction*n.v}function e(n,a,i){var o={x:n.x+i.dx*a,v:n.v+i.dv*a,tension:n.tension,friction:n.friction};return{dx:o.v,dv:t(o)}}function r(n,a){var i={dx:n.v,dv:t(n)},o=e(n,a*.5,i),s=e(n,a*.5,o),l=e(n,a,s),f=1/6*(i.dx+2*(o.dx+s.dx)+l.dx),d=1/6*(i.dv+2*(o.dv+s.dv)+l.dv);return n.x=n.x+f*a,n.v=n.v+d*a,n}return function n(a,i,o){var s={x:-1,v:0,tension:null,friction:null},l=[0],f=0,d=1/1e4,h=16/1e3,g,p,y;for(a=parseFloat(a)||500,i=parseFloat(i)||20,o=o||null,s.tension=a,s.friction=i,g=o!==null,g?(f=n(a,i),p=f/o*h):p=h;y=r(y||s,p),l.push(1+y.x),f+=16,Math.abs(y.x)>d&&Math.abs(y.v)>d;);return g?function(b){return l[b*(l.length-1)|0]}:f}}(),At=function(e,r,n,a){var i=UV(e,r,n,a);return function(o,s,l){return o+(s-o)*i(l)}},cd={linear:function(e,r,n){return e+(r-e)*n},ease:At(.25,.1,.25,1),"ease-in":At(.42,0,1,1),"ease-out":At(0,0,.58,1),"ease-in-out":At(.42,0,.58,1),"ease-in-sine":At(.47,0,.745,.715),"ease-out-sine":At(.39,.575,.565,1),"ease-in-out-sine":At(.445,.05,.55,.95),"ease-in-quad":At(.55,.085,.68,.53),"ease-out-quad":At(.25,.46,.45,.94),"ease-in-out-quad":At(.455,.03,.515,.955),"ease-in-cubic":At(.55,.055,.675,.19),"ease-out-cubic":At(.215,.61,.355,1),"ease-in-out-cubic":At(.645,.045,.355,1),"ease-in-quart":At(.895,.03,.685,.22),"ease-out-quart":At(.165,.84,.44,1),"ease-in-out-quart":At(.77,0,.175,1),"ease-in-quint":At(.755,.05,.855,.06),"ease-out-quint":At(.23,1,.32,1),"ease-in-out-quint":At(.86,0,.07,1),"ease-in-expo":At(.95,.05,.795,.035),"ease-out-expo":At(.19,1,.22,1),"ease-in-out-expo":At(1,0,0,1),"ease-in-circ":At(.6,.04,.98,.335),"ease-out-circ":At(.075,.82,.165,1),"ease-in-out-circ":At(.785,.135,.15,.86),spring:function(e,r,n){if(n===0)return cd.linear;var a=GV(e,r,n);return function(i,o,s){return i+(o-i)*a(s)}},"cubic-bezier":At};function lR(t,e,r,n,a){if(n===1||e===r)return r;var i=a(e,r,n);return t==null||((t.roundValue||t.color)&&(i=Math.round(i)),t.min!==void 0&&(i=Math.max(i,t.min)),t.max!==void 0&&(i=Math.min(i,t.max))),i}function fR(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t}function vu(t,e,r,n,a){var i=a!=null?a.type:null;r<0?r=0:r>1&&(r=1);var o=fR(t,a),s=fR(e,a);if(Me(o)&&Me(s))return lR(i,o,s,r,n);if(St(o)&&St(s)){for(var l=[],f=0;f0?(p==="spring"&&y.push(o.duration),o.easingImpl=cd[p].apply(null,y)):o.easingImpl=cd[p]}var b=o.easingImpl,w;if(o.duration===0?w=1:w=(r-l)/o.duration,o.applying&&(w=o.progress),w<0?w=0:w>1&&(w=1),o.delay==null){var x=o.startPosition,E=o.position;if(E&&a&&!t.locked()){var S={};il(x.x,E.x)&&(S.x=vu(x.x,E.x,w,b)),il(x.y,E.y)&&(S.y=vu(x.y,E.y,w,b)),t.position(S)}var C=o.startPan,A=o.pan,D=i.pan,M=A!=null&&n;M&&(il(C.x,A.x)&&(D.x=vu(C.x,A.x,w,b)),il(C.y,A.y)&&(D.y=vu(C.y,A.y,w,b)),t.emit("pan"));var R=o.startZoom,O=o.zoom,B=O!=null&&n;B&&(il(R,O)&&(i.zoom=kl(i.minZoom,vu(R,O,w,b),i.maxZoom)),t.emit("zoom")),(M||B)&&t.emit("viewport");var k=o.style;if(k&&k.length>0&&a){for(var N=0;N=0;M--){var R=D[M];R()}D.splice(0,D.length)},E=p.length-1;E>=0;E--){var S=p[E],C=S._private;if(C.stopped){p.splice(E,1),C.hooked=!1,C.playing=!1,C.started=!1,x(C.frames);continue}!C.playing&&!C.applying||(C.playing&&C.applying&&(C.applying=!1),C.started||XV(d,S,t),YV(d,S,t,h),C.applying&&(C.applying=!1),x(C.frames),C.step!=null&&C.step(t),S.completed()&&(p.splice(E,1),C.hooked=!1,C.playing=!1,C.started=!1,x(C.completes)),b=!0)}return!h&&p.length===0&&y.length===0&&n.push(d),b}for(var i=!1,o=0;o0?e.notify("draw",r):e.notify("draw")),r.unmerge(n),e.emit("step")}var KV={animate:mt.animate(),animation:mt.animation(),animated:mt.animated(),clearQueue:mt.clearQueue(),delay:mt.delay(),delayAnimation:mt.delayAnimation(),stop:mt.stop(),addToAnimationPool:function(e){var r=this;r.styleEnabled()&&r._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function r(){e._private.animationsRunning&&Md(function(i){cR(i,e),r()})}var n=e.renderer();n&&n.beforeRender?n.beforeRender(function(i,o){cR(o,e)},n.beforeRenderPriorities.animations):r()}},jV={qualifierCompare:function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},eventMatches:function(e,r,n){var a=r.qualifier;return a!=null?e!==n.target&&Jl(n.target)&&a.matches(n.target):!0},addEventFields:function(e,r){r.cy=e,r.target=e},callbackContext:function(e,r,n){return r.qualifier!=null?n.target:e}},Fc=function(e){return Ve(e)?new Oi(e):e},m8={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Eh(jV,this)),this},emitter:function(){return this._private.emitter},on:function(e,r,n){return this.emitter().on(e,Fc(r),n),this},removeListener:function(e,r,n){return this.emitter().removeListener(e,Fc(r),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,r,n){return this.emitter().one(e,Fc(r),n),this},once:function(e,r,n){return this.emitter().one(e,Fc(r),n),this},emit:function(e,r){return this.emitter().emit(e,r),this},emitAndNotify:function(e,r){return this.emit(e),this.notify(e,r),this}};mt.eventAliasesOn(m8);var Nx={png:function(e){var r=this._private.renderer;return e=e||{},r.png(e)},jpg:function(e){var r=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",r.jpg(e)}};Nx.jpeg=Nx.jpg;var dd={layout:function(e){var r=this;if(e==null){Pt("Layout options must be specified to make a layout");return}if(e.name==null){Pt("A `name` must be specified to make a layout");return}var n=e.name,a=r.extension("layout",n);if(a==null){Pt("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var i;Ve(e.eles)?i=r.$(e.eles):i=e.eles!=null?e.eles:r.$();var o=new a(Xe({},e,{cy:r,eles:i}));return o}};dd.createLayout=dd.makeLayout=dd.layout;var ZV={notify:function(e,r){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var a=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();r!=null&&a.merge(r);return}if(n.notificationsEnabled){var i=this.renderer();this.destroyed()||!i||i.notify(e,r)}},notifications:function(e){var r=this._private;return e===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var a=e.batchNotifications[n];a.empty()?r.notify(n):r.notify(n,a)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var r=this;return this.batch(function(){for(var n=Object.keys(e),a=0;a0;)r.removeChild(r.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(n){var a=n._private;a.rscratch={},a.rstyle={},a.animation.current=[],a.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Bx.invalidateDimensions=Bx.resize;var hd={collection:function(e,r){return Ve(e)?this.$(e):an(e)?e.collection():St(e)?(r||(r={}),new Ar(this,e,r.unique,r.removed)):new Ar(this)},nodes:function(e){var r=this.$(function(n){return n.isNode()});return e?r.filter(e):r},edges:function(e){var r=this.$(function(n){return n.isEdge()});return e?r.filter(e):r},$:function(e){var r=this._private.elements;return e?r.filter(e):r.spawnSelf()},mutableElements:function(){return this._private.elements}};hd.elements=hd.filter=hd.$;var wr={},Tl="t",WV="f";wr.apply=function(t){for(var e=this,r=e._private,n=r.cy,a=n.collection(),i=0;i0;if(g||h&&p){var y=void 0;g&&p||g?y=f.properties:p&&(y=f.mappedProperties);for(var b=0;b1&&(C=1),s.color){var D=n.valueMin[0],M=n.valueMax[0],R=n.valueMin[1],O=n.valueMax[1],B=n.valueMin[2],k=n.valueMax[2],N=n.valueMin[3]==null?1:n.valueMin[3],L=n.valueMax[3]==null?1:n.valueMax[3],q=[Math.round(D+(M-D)*C),Math.round(R+(O-R)*C),Math.round(B+(k-B)*C),Math.round(N+(L-N)*C)];i={bypass:n.bypass,name:n.name,value:q,strValue:"rgb("+q[0]+", "+q[1]+", "+q[2]+")"}}else if(s.number){var V=n.valueMin+(n.valueMax-n.valueMin)*C;i=this.parse(n.name,V,n.bypass,g)}else return!1;if(!i)return b(),!1;i.mapping=n,n=i;break}case o.data:{for(var P=n.field.split("."),$=h.data,F=0;F0&&i>0){for(var s={},l=!1,f=0;f0?t.delayAnimation(o).play().promise().then(S):S()}).then(function(){return t.animation({style:s,duration:i,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,a),t.emitAndNotify("style"),n.transitioning=!1})}else n.transitioning&&(this.removeBypasses(t,a),t.emitAndNotify("style"),n.transitioning=!1)};wr.checkTrigger=function(t,e,r,n,a,i){var o=this.properties[e],s=a(o);t.removed()||s!=null&&s(r,n,t)&&i(o)};wr.checkZOrderTrigger=function(t,e,r,n){var a=this;this.checkTrigger(t,e,r,n,function(i){return i.triggersZOrder},function(){a._private.cy.notify("zorder",t)})};wr.checkBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(a){return a.triggersBounds},function(a){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})};wr.checkConnectedEdgesBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(a){return a.triggersBoundsOfConnectedEdges},function(a){t.connectedEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};wr.checkParallelEdgesBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(a){return a.triggersBoundsOfParallelEdges},function(a){t.parallelEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};wr.checkTriggers=function(t,e,r,n){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,n),this.checkBoundsTrigger(t,e,r,n),this.checkConnectedEdgesBoundsTrigger(t,e,r,n),this.checkParallelEdgesBoundsTrigger(t,e,r,n)};var uf={};uf.applyBypass=function(t,e,r,n){var a=this,i=[],o=!0;if(e==="*"||e==="**"){if(r!==void 0)for(var s=0;sa.length?n=n.substr(a.length):n=""}function l(){i.length>o.length?i=i.substr(o.length):i=""}for(;;){var f=n.match(/^\s*$/);if(f)break;var d=n.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!d){yt("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+n);break}a=d[0];var h=d[1];if(h!=="core"){var g=new Oi(h);if(g.invalid){yt("Skipping parsing of block: Invalid selector found in string stylesheet: "+h),s();continue}}var p=d[2],y=!1;i=p;for(var b=[];;){var w=i.match(/^\s*$/);if(w)break;var x=i.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!x){yt("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+p),y=!0;break}o=x[0];var E=x[1],S=x[2],C=e.properties[E];if(!C){yt("Skipping property: Invalid property name in: "+o),l();continue}var A=r.parse(E,S);if(!A){yt("Skipping property: Invalid property definition in: "+o),l();continue}b.push({name:E,val:S}),l()}if(y){s();break}r.selector(h);for(var D=0;D=7&&e[0]==="d"&&(d=new RegExp(s.data.regex).exec(e))){if(r)return!1;var g=s.data;return{name:t,value:d,strValue:""+e,mapped:g,field:d[1],bypass:r}}else if(e.length>=10&&e[0]==="m"&&(h=new RegExp(s.mapData.regex).exec(e))){if(r||f.multiple)return!1;var p=s.mapData;if(!(f.color||f.number))return!1;var y=this.parse(t,h[4]);if(!y||y.mapped)return!1;var b=this.parse(t,h[5]);if(!b||b.mapped)return!1;if(y.pfValue===b.pfValue||y.strValue===b.strValue)return yt("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+y.strValue+"`"),this.parse(t,y.strValue);if(f.color){var w=y.value,x=b.value,E=w[0]===x[0]&&w[1]===x[1]&&w[2]===x[2]&&(w[3]===x[3]||(w[3]==null||w[3]===1)&&(x[3]==null||x[3]===1));if(E)return!1}return{name:t,value:h,strValue:""+e,mapped:p,field:h[1],fieldMin:parseFloat(h[2]),fieldMax:parseFloat(h[3]),valueMin:y.value,valueMax:b.value,bypass:r}}}if(f.multiple&&n!=="multiple"){var S;if(l?S=e.split(/\s+/):St(e)?S=e:S=[e],f.evenMultiple&&S.length%2!==0)return null;for(var C=[],A=[],D=[],M="",R=!1,O=0;O0?" ":"")+B.strValue}return f.validate&&!f.validate(C,A)?null:f.singleEnum&&R?C.length===1&&Ve(C[0])?{name:t,value:C[0],strValue:C[0],bypass:r}:null:{name:t,value:C,pfValue:D,strValue:M,bypass:r,units:A}}var k=function(){for(var ee=0;eef.max||f.strictMax&&e===f.max))return null;var P={name:t,value:e,strValue:""+e+(N||""),units:N,bypass:r};return f.unitless||N!=="px"&&N!=="em"?P.pfValue=e:P.pfValue=N==="px"||!N?e:this.getEmSizeInPixels()*e,(N==="ms"||N==="s")&&(P.pfValue=N==="ms"?e:1e3*e),(N==="deg"||N==="rad")&&(P.pfValue=N==="rad"?e:Q7(e)),N==="%"&&(P.pfValue=e/100),P}else if(f.propList){var $=[],F=""+e;if(F!=="none"){for(var Y=F.split(/\s*,\s*|\s+/),z=0;z0&&s>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){l=Math.min((o-2*r)/n.w,(s-2*r)/n.h),l=l>this._private.maxZoom?this._private.maxZoom:l,l=l=n.minZoom&&(n.maxZoom=r),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var r=this._private,n=r.pan,a=r.zoom,i,o,s=!1;if(r.zoomingEnabled||(s=!0),Me(e)?o=e:st(e)&&(o=e.level,e.position!=null?i=ph(e.position,a,n):e.renderedPosition!=null&&(i=e.renderedPosition),i!=null&&!r.panningEnabled&&(s=!0)),o=o>r.maxZoom?r.maxZoom:o,o=or.maxZoom||!r.zoomingEnabled?o=!0:(r.zoom=l,i.push("zoom"))}if(a&&(!o||!e.cancelOnFailedZoom)&&r.panningEnabled){var f=e.pan;Me(f.x)&&(r.pan.x=f.x,s=!1),Me(f.y)&&(r.pan.y=f.y,s=!1),s||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var r=this.getCenterPan(e);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,r){if(this._private.panningEnabled){if(Ve(e)){var n=e;e=this.mutableElements().filter(n)}else an(e)||(e=this.mutableElements());if(e.length!==0){var a=e.boundingBox(),i=this.width(),o=this.height();r=r===void 0?this._private.zoom:r;var s={x:(i-r*(a.x1+a.x2))/2,y:(o-r*(a.y1+a.y2))/2};return s}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,r=e.container,n=this;return e.sizeCache=e.sizeCache||(r?function(){var a=n.window().getComputedStyle(r),i=function(s){return parseFloat(a.getPropertyValue(s))};return{width:r.clientWidth-i("padding-left")-i("padding-right"),height:r.clientHeight-i("padding-top")-i("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,r=this._private.zoom,n=this.renderedExtent(),a={x1:(n.x1-e.x)/r,x2:(n.x2-e.x)/r,y1:(n.y1-e.y)/r,y2:(n.y2-e.y)/r};return a.w=a.x2-a.x1,a.h=a.y2-a.y1,a},renderedExtent:function(){var e=this.width(),r=this.height();return{x1:0,y1:0,x2:e,y2:r,w:e,h:r}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};So.centre=So.center;So.autolockNodes=So.autolock;So.autoungrabifyNodes=So.autoungrabify;var ql={data:mt.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:mt.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:mt.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:mt.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};ql.attr=ql.data;ql.removeAttr=ql.removeData;var Pl=function(e){var r=this;e=Xe({},e);var n=e.container;n&&!Rd(n)&&Rd(n[0])&&(n=n[0]);var a=n?n._cyreg:null;a=a||{},a&&a.cy&&(a.cy.destroy(),a={});var i=a.readies=a.readies||[];n&&(n._cyreg=a),a.cy=r;var o=ur!==void 0&&n!==void 0&&!e.headless,s=e;s.layout=Xe({name:o?"grid":"null"},s.layout),s.renderer=Xe({name:o?"canvas":"null"},s.renderer);var l=function(y,b,w){return b!==void 0?b:w!==void 0?w:y},f=this._private={container:n,ready:!1,options:s,elements:new Ar(this),listeners:[],aniEles:new Ar(this),data:s.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,s.zoomingEnabled),userZoomingEnabled:l(!0,s.userZoomingEnabled),panningEnabled:l(!0,s.panningEnabled),userPanningEnabled:l(!0,s.userPanningEnabled),boxSelectionEnabled:l(!0,s.boxSelectionEnabled),autolock:l(!1,s.autolock,s.autolockNodes),autoungrabify:l(!1,s.autoungrabify,s.autoungrabifyNodes),autounselectify:l(!1,s.autounselectify),styleEnabled:s.styleEnabled===void 0?o:s.styleEnabled,zoom:Me(s.zoom)?s.zoom:1,pan:{x:st(s.pan)&&Me(s.pan.x)?s.pan.x:0,y:st(s.pan)&&Me(s.pan.y)?s.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,s.multiClickDebounceTime)};this.createEmitter(),this.selectionType(s.selectionType),this.zoomRange({min:s.minZoom,max:s.maxZoom});var d=function(y,b){var w=y.some(X9);if(w)return Xu.all(y).then(b);b(y)};f.styleEnabled&&r.setStyle([]);var h=Xe({},s,s.renderer);r.initRenderer(h);var g=function(y,b,w){r.notifications(!1);var x=r.mutableElements();x.length>0&&x.remove(),y!=null&&(st(y)||St(y))&&r.add(y),r.one("layoutready",function(S){r.notifications(!0),r.emit(S),r.one("load",b),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",w),r.emit("done")});var E=Xe({},r._private.options.layout);E.eles=r.elements(),r.layout(E).run()};d([s.style,s.elements],function(p){var y=p[0],b=p[1];f.styleEnabled&&r.style().append(y),g(b,function(){r.startAnimationLoop(),f.ready=!0,zt(s.ready)&&r.on("ready",s.ready);for(var w=0;w0,s=!!t.boundingBox,l=e.extent(),f=jr(s?t.boundingBox:{x1:l.x1,y1:l.y1,w:l.w,h:l.h}),d;if(an(t.roots))d=t.roots;else if(St(t.roots)){for(var h=[],g=0;g0;){var V=q(),P=B(V,N);if(P)V.outgoers().filter(function(Te){return Te.isNode()&&r.has(Te)}).forEach(L);else if(P===null){yt("Detected double maximal shift for node `"+V.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var $=0;if(t.avoidOverlap)for(var F=0;F0&&E[0].length<=3?Ne/2:0),Je=2*Math.PI/E[$e].length*Le;return $e===0&&E[0].length===1&&(ze=1),{x:de.x+ze*Math.cos(Je),y:de.y+ze*Math.sin(Je)}}else{var xe=E[$e].length,X=Math.max(xe===1?0:s?(f.w-t.padding*2-ye.w)/((t.grid?Pe:xe)-1):(f.w-t.padding*2-ye.w)/((t.grid?Pe:xe)+1),$),oe={x:de.x+(Le+1-(xe+1)/2)*X,y:de.y+($e+1-(j+1)/2)*we};return oe}};return r.nodes().layoutPositions(this,t,Re),this};var n$={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function b8(t){this.options=Xe({},n$,t)}b8.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,a=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,i=n.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));for(var o=jr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},l=e.sweep===void 0?2*Math.PI-2*Math.PI/i.length:e.sweep,f=l/Math.max(1,i.length-1),d,h=0,g=0;g1&&e.avoidOverlap){h*=1.75;var x=Math.cos(f)-Math.cos(0),E=Math.sin(f)-Math.sin(0),S=Math.sqrt(h*h/(x*x+E*E));d=Math.max(S,d)}var C=function(D,M){var R=e.startAngle+M*f*(a?1:-1),O=d*Math.cos(R),B=d*Math.sin(R),k={x:s.x+O,y:s.y+B};return k};return n.nodes().layoutPositions(this,e,C),this};var a$={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function w8(t){this.options=Xe({},a$,t)}w8.prototype.run=function(){for(var t=this.options,e=t,r=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,n=t.cy,a=e.eles,i=a.nodes().not(":parent"),o=jr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},l=[],f=0,d=0;d0){var A=Math.abs(E[0].value-C.value);A>=w&&(E=[],x.push(E))}E.push(C)}var D=f+e.minNodeSpacing;if(!e.avoidOverlap){var M=x.length>0&&x[0].length>1,R=Math.min(o.w,o.h)/2-D,O=R/(x.length+M?1:0);D=Math.min(D,O)}for(var B=0,k=0;k1&&e.avoidOverlap){var V=Math.cos(q)-Math.cos(0),P=Math.sin(q)-Math.sin(0),$=Math.sqrt(D*D/(V*V+P*P));B=Math.max($,B)}N.r=B,B+=D}if(e.equidistant){for(var F=0,Y=0,z=0;z=t.numIter||(c$(n,t),n.temperature=n.temperature*t.coolingFactor,n.temperature=t.animationThreshold&&i(),Md(d)}};d()}else{for(;f;)f=o(l),l++;vR(n,t),s()}return this};Rh.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};Rh.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var o$=function(e,r,n){for(var a=n.eles.edges(),i=n.eles.nodes(),o=jr(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),s={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:a.size(),temperature:n.initialTemp,clientWidth:o.w,clientHeight:o.h,boundingBox:o},l=n.eles.components(),f={},d=0;d0){s.graphSet.push(R);for(var d=0;da.count?0:a.graph},x8=function(e,r,n,a){var i=a.graphSet[n];if(-10)var h=a.nodeOverlap*d,g=Math.sqrt(s*s+l*l),p=h*s/g,y=h*l/g;else var b=qd(e,s,l),w=qd(r,-1*s,-1*l),x=w.x-b.x,E=w.y-b.y,S=x*x+E*E,g=Math.sqrt(S),h=(e.nodeRepulsion+r.nodeRepulsion)/S,p=h*x/g,y=h*E/g;e.isLocked||(e.offsetX-=p,e.offsetY-=y),r.isLocked||(r.offsetX+=p,r.offsetY+=y)}},v$=function(e,r,n,a){if(n>0)var i=e.maxX-r.minX;else var i=r.maxX-e.minX;if(a>0)var o=e.maxY-r.minY;else var o=r.maxY-e.minY;return i>=0&&o>=0?Math.sqrt(i*i+o*o):0},qd=function(e,r,n){var a=e.positionX,i=e.positionY,o=e.height||1,s=e.width||1,l=n/r,f=o/s,d={};return r===0&&0n?(d.x=a,d.y=i+o/2,d):0r&&-1*f<=l&&l<=f?(d.x=a-s/2,d.y=i-s*n/2/r,d):0=f)?(d.x=a+o*r/2/n,d.y=i+o/2,d):(0>n&&(l<=-1*f||l>=f)&&(d.x=a-o*r/2/n,d.y=i-o/2),d)},g$=function(e,r){for(var n=0;nn){var w=r.gravity*p/b,x=r.gravity*y/b;g.offsetX+=w,g.offsetY+=x}}}}},m$=function(e,r){var n=[],a=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;a<=i;){var o=n[a++],s=e.idToIndex[o],l=e.layoutNodes[s],f=l.children;if(0n)var i={x:n*e/a,y:n*r/a};else var i={x:e,y:r};return i},E8=function(e,r){var n=e.parentId;if(n!=null){var a=r.layoutNodes[r.idToIndex[n]],i=!1;if((a.maxX==null||e.maxX+a.padRight>a.maxX)&&(a.maxX=e.maxX+a.padRight,i=!0),(a.minX==null||e.minX-a.padLefta.maxY)&&(a.maxY=e.maxY+a.padBottom,i=!0),(a.minY==null||e.minY-a.padTopx&&(y+=w+r.componentSpacing,p=0,b=0,w=0)}}},w$={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function S8(t){this.options=Xe({},w$,t)}S8.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,a=n.nodes().not(":parent");e.sort&&(a=a.sort(e.sort));var i=jr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(i.h===0||i.w===0)n.nodes().layoutPositions(this,e,function(J){return{x:i.x1,y:i.y1}});else{var o=a.size(),s=Math.sqrt(o*i.h/i.w),l=Math.round(s),f=Math.round(i.w/i.h*s),d=function(U){if(U==null)return Math.min(l,f);var K=Math.min(l,f);K==l?l=U:f=U},h=function(U){if(U==null)return Math.max(l,f);var K=Math.max(l,f);K==l?l=U:f=U},g=e.rows,p=e.cols!=null?e.cols:e.columns;if(g!=null&&p!=null)l=g,f=p;else if(g!=null&&p==null)l=g,f=Math.ceil(o/l);else if(g==null&&p!=null)f=p,l=Math.ceil(o/f);else if(f*l>o){var y=d(),b=h();(y-1)*b>=o?d(y-1):(b-1)*y>=o&&h(b-1)}else for(;f*l=o?h(x+1):d(w+1)}var E=i.w/f,S=i.h/l;if(e.condense&&(E=0,S=0),e.avoidOverlap)for(var C=0;C=f&&(V=0,q++)},$={},F=0;F(V=fz(t,e,P[$],P[$+1],P[$+2],P[$+3])))return w(M,V),!0}else if(O.edgeType==="bezier"||O.edgeType==="multibezier"||O.edgeType==="self"||O.edgeType==="compound"){for(var P=O.allpts,$=0;$+5(V=lz(t,e,P[$],P[$+1],P[$+2],P[$+3],P[$+4],P[$+5])))return w(M,V),!0}for(var F=F||R.source,Y=Y||R.target,z=a.getArrowWidth(B,k),H=[{name:"source",x:O.arrowStartX,y:O.arrowStartY,angle:O.srcArrowAngle},{name:"target",x:O.arrowEndX,y:O.arrowEndY,angle:O.tgtArrowAngle},{name:"mid-source",x:O.midX,y:O.midY,angle:O.midsrcArrowAngle},{name:"mid-target",x:O.midX,y:O.midY,angle:O.midtgtArrowAngle}],$=0;$0&&(x(F),x(Y))}function S(M,R,O){return zn(M,R,O)}function C(M,R){var O=M._private,B=g,k;R?k=R+"-":k="",M.boundingBox();var N=O.labelBounds[R||"main"],L=M.pstyle(k+"label").value,q=M.pstyle("text-events").strValue==="yes";if(!(!q||!L)){var V=S(O.rscratch,"labelX",R),P=S(O.rscratch,"labelY",R),$=S(O.rscratch,"labelAngle",R),F=M.pstyle(k+"text-margin-x").pfValue,Y=M.pstyle(k+"text-margin-y").pfValue,z=N.x1-B-F,H=N.x2+B-F,Z=N.y1-B-Y,J=N.y2+B-Y;if($){var U=Math.cos($),K=Math.sin($),j=function(de,ye){return de=de-V,ye=ye-P,{x:de*U-ye*K+V,y:de*K+ye*U+P}},re=j(z,Z),ne=j(z,J),ee=j(H,Z),W=j(H,J),te=[re.x+F,re.y+Y,ee.x+F,ee.y+Y,W.x+F,W.y+Y,ne.x+F,ne.y+Y];if(Yr(t,e,te))return w(M),!0}else if(Pu(N,t,e))return w(M),!0}}for(var A=o.length-1;A>=0;A--){var D=o[A];D.isNode()?x(D)||C(D):E(D)||C(D)||C(D,"source")||C(D,"target")}return s};Mo.getAllInBox=function(t,e,r,n){var a=this.getCachedZSortedEles().interactive,i=[],o=Math.min(t,r),s=Math.max(t,r),l=Math.min(e,n),f=Math.max(e,n);t=o,r=s,e=l,n=f;for(var d=jr({x1:t,y1:e,x2:r,y2:n}),h=0;h0?-(Math.PI-e.ang):Math.PI+e.ang},C$=function(e,r,n,a,i){if(e!==bR?wR(r,e,ra):T$(Sn,ra),wR(r,n,Sn),mR=ra.nx*Sn.ny-ra.ny*Sn.nx,yR=ra.nx*Sn.nx-ra.ny*-Sn.ny,za=Math.asin(Math.max(-1,Math.min(1,mR))),Math.abs(za)<1e-6){qx=r.x,Px=r.y,go=pu=0;return}po=1,vd=!1,yR<0?za<0?za=Math.PI+za:(za=Math.PI-za,po=-1,vd=!0):za>0&&(po=-1,vd=!0),r.radius!==void 0?pu=r.radius:pu=a,oo=za/2,Hc=Math.min(ra.len/2,Sn.len/2),i?(Jn=Math.abs(Math.cos(oo)*pu/Math.sin(oo)),Jn>Hc?(Jn=Hc,go=Math.abs(Jn*Math.sin(oo)/Math.cos(oo))):go=pu):(Jn=Math.min(Hc,pu),go=Math.abs(Jn*Math.sin(oo)/Math.cos(oo))),zx=r.x+Sn.nx*Jn,Ix=r.y+Sn.ny*Jn,qx=zx-Sn.ny*go*po,Px=Ix+Sn.nx*go*po,R8=r.x+ra.nx*Jn,M8=r.y+ra.ny*Jn,bR=r};function O8(t,e){e.radius===0?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function k2(t,e,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return n===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(C$(t,e,r,n,a),{cx:qx,cy:Px,radius:go,startX:R8,startY:M8,stopX:zx,stopY:Ix,startAngle:ra.ang+Math.PI/2*po,endAngle:Sn.ang-Math.PI/2*po,counterClockwise:vd})}var qr={};qr.findMidptPtsEtc=function(t,e){var r=e.posPts,n=e.intersectionPts,a=e.vectorNormInverse,i,o=t.pstyle("source-endpoint"),s=t.pstyle("target-endpoint"),l=o.units!=null&&s.units!=null,f=function(A,D,M,R){var O=R-D,B=M-A,k=Math.sqrt(B*B+O*O);return{x:-O/k,y:B/k}},d=t.pstyle("edge-distances").value;switch(d){case"node-position":i=r;break;case"intersection":i=n;break;case"endpoints":{if(l){var h=this.manualEndptToPx(t.source()[0],o),g=yr(h,2),p=g[0],y=g[1],b=this.manualEndptToPx(t.target()[0],s),w=yr(b,2),x=w[0],E=w[1],S={x1:p,y1:y,x2:x,y2:E};a=f(p,y,x,E),i=S}else yt("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),i=n;break}}return{midptPts:i,vectorNormInverse:a}};qr.findHaystackPoints=function(t){for(var e=0;e0?Math.max(ge-Se,0):Math.min(ge+Se,0)},L=N(B,R),q=N(k,O),V=!1;E===f?x=Math.abs(L)>Math.abs(q)?a:n:E===l||E===s?(x=n,V=!0):(E===i||E===o)&&(x=a,V=!0);var P=x===n,$=P?q:L,F=P?k:B,Y=LL(F),z=!1;!(V&&(C||D))&&(E===s&&F<0||E===l&&F>0||E===i&&F>0||E===o&&F<0)&&(Y*=-1,$=Y*Math.abs($),z=!0);var H;if(C){var Z=A<0?1+A:A;H=Z*$}else{var J=A<0?$:0;H=J+A*Y}var U=function(ge){return Math.abs(ge)=Math.abs($)},K=U(H),j=U(Math.abs($)-Math.abs(H)),re=K||j;if(re&&!z)if(P){var ne=Math.abs(F)<=g/2,ee=Math.abs(B)<=p/2;if(ne){var W=(d.x1+d.x2)/2,te=d.y1,ce=d.y2;r.segpts=[W,te,W,ce]}else if(ee){var de=(d.y1+d.y2)/2,ye=d.x1,we=d.x2;r.segpts=[ye,de,we,de]}else r.segpts=[d.x1,d.y2]}else{var Pe=Math.abs(F)<=h/2,Re=Math.abs(k)<=y/2;if(Pe){var Te=(d.y1+d.y2)/2,Ce=d.x1,Be=d.x2;r.segpts=[Ce,Te,Be,Te]}else if(Re){var $e=(d.x1+d.x2)/2,Le=d.y1,Ne=d.y2;r.segpts=[$e,Le,$e,Ne]}else r.segpts=[d.x2,d.y1]}else if(P){var ze=d.y1+H+(w?g/2*Y:0),Je=d.x1,xe=d.x2;r.segpts=[Je,ze,xe,ze]}else{var X=d.x1+H+(w?h/2*Y:0),oe=d.y1,ve=d.y2;r.segpts=[X,oe,X,ve]}if(r.isRound){var ue=t.pstyle("taxi-radius").value,fe=t.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(ue),r.isArcRadius=new Array(r.segpts.length/2).fill(fe)}};qr.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(r.edgeType==="bezier"){var n=e.srcPos,a=e.tgtPos,i=e.srcW,o=e.srcH,s=e.tgtW,l=e.tgtH,f=e.srcShape,d=e.tgtShape,h=e.srcCornerRadius,g=e.tgtCornerRadius,p=e.srcRs,y=e.tgtRs,b=!Me(r.startX)||!Me(r.startY),w=!Me(r.arrowStartX)||!Me(r.arrowStartY),x=!Me(r.endX)||!Me(r.endY),E=!Me(r.arrowEndX)||!Me(r.arrowEndY),S=3,C=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,A=S*C,D=xo({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),M=DF.poolIndex()){var Y=$;$=F,F=Y}var z=L.srcPos=$.position(),H=L.tgtPos=F.position(),Z=L.srcW=$.outerWidth(),J=L.srcH=$.outerHeight(),U=L.tgtW=F.outerWidth(),K=L.tgtH=F.outerHeight(),j=L.srcShape=r.nodeShapes[e.getNodeShape($)],re=L.tgtShape=r.nodeShapes[e.getNodeShape(F)],ne=L.srcCornerRadius=$.pstyle("corner-radius").value==="auto"?"auto":$.pstyle("corner-radius").pfValue,ee=L.tgtCornerRadius=F.pstyle("corner-radius").value==="auto"?"auto":F.pstyle("corner-radius").pfValue,W=L.tgtRs=F._private.rscratch,te=L.srcRs=$._private.rscratch;L.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var ce=0;ce0){var ce=i,de=ho(ce,Tu(r)),ye=ho(ce,Tu(te)),we=de;if(ye2){var Pe=ho(ce,{x:te[2],y:te[3]});Pe0){var ve=o,ue=ho(ve,Tu(r)),fe=ho(ve,Tu(oe)),Ae=ue;if(fe2){var ge=ho(ve,{x:oe[2],y:oe[3]});ge=y||M){w={cp:C,segment:D};break}}if(w)break}var R=w.cp,O=w.segment,B=(y-x)/O.length,k=O.t1-O.t0,N=p?O.t0+k*B:O.t1-k*B;N=kl(0,N,1),e=Ru(R.p0,R.p1,R.p2,N),g=R$(R.p0,R.p1,R.p2,N);break}case"straight":case"segments":case"haystack":{for(var L=0,q,V,P,$,F=n.allpts.length,Y=0;Y+3=y));Y+=2);var z=y-V,H=z/q;H=kl(0,H,1),e=J7(P,$,H),g=L8(P,$);break}}o("labelX",h,e.x),o("labelY",h,e.y),o("labelAutoAngle",h,g)}};f("source"),f("target"),this.applyLabelDimensions(t)}};ga.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))};ga.applyPrefixedLabelDimensions=function(t,e){var r=t._private,n=this.getLabelText(t,e),a=this.calculateLabelDimensions(t,n),i=t.pstyle("line-height").pfValue,o=t.pstyle("text-wrap").strValue,s=zn(r.rscratch,"labelWrapCachedLines",e)||[],l=o!=="wrap"?1:Math.max(s.length,1),f=a.height/l,d=f*i,h=a.width,g=a.height+(l-1)*(i-1)*f;Ei(r.rstyle,"labelWidth",e,h),Ei(r.rscratch,"labelWidth",e,h),Ei(r.rstyle,"labelHeight",e,g),Ei(r.rscratch,"labelHeight",e,g),Ei(r.rscratch,"labelLineHeight",e,d)};ga.getLabelText=function(t,e){var r=t._private,n=e?e+"-":"",a=t.pstyle(n+"label").strValue,i=t.pstyle("text-transform").value,o=function(J,U){return U?(Ei(r.rscratch,J,e,U),U):zn(r.rscratch,J,e)};if(!a)return"";i=="none"||(i=="uppercase"?a=a.toUpperCase():i=="lowercase"&&(a=a.toLowerCase()));var s=t.pstyle("text-wrap").value;if(s==="wrap"){var l=o("labelKey");if(l!=null&&o("labelWrapKey")===l)return o("labelWrapCachedText");for(var f="​",d=a.split(` `),h=t.pstyle("text-max-width").pfValue,g=t.pstyle("text-overflow-wrap").value,p=g==="anywhere",y=[],b=/[\s\u200b]+|$/g,w=0;wh){var A=x.matchAll(b),D="",M=0,R=$n(A),O;try{for(R.s();!(O=R.n()).done;){var B=O.value,k=B[0],N=x.substring(M,B.index);M=B.index+k.length;var L=D.length===0?N:D+N+k,q=this.calculateLabelDimensions(t,L),V=q.width;V<=h?D+=N+k:(D&&y.push(D),D=N+k)}}catch(Z){R.e(Z)}finally{R.f()}D.match(/^[\s\u200b]+$/)||y.push(D)}else y.push(x)}o("labelWrapCachedLines",y),a=o("labelWrapCachedText",y.join(` `)),o("labelWrapKey",l)}else if(s==="ellipsis"){var P=t.pstyle("text-max-width").pfValue,$="",F="…",Y=!1;if(this.calculateLabelDimensions(t,a).widthP)break;$+=a[z],z===a.length-1&&(Y=!0)}return Y||($+=F),$}return a};ga.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if(e==="auto")if(t.isNode())switch(r){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e};ga.calculateLabelDimensions=function(t,e){var r=this,n=r.cy.window(),a=n.document,i=Ri(e,t._private.labelDimsKey),o=r.labelDimCache||(r.labelDimCache=[]),s=o[i];if(s!=null)return s;var l=0,f=t.pstyle("font-style").strValue,d=t.pstyle("font-size").pfValue,h=t.pstyle("font-family").strValue,g=t.pstyle("font-weight").strValue,p=this.labelCalcCanvas,y=this.labelCalcCanvasContext;if(!p){p=this.labelCalcCanvas=a.createElement("canvas"),y=this.labelCalcCanvasContext=p.getContext("2d");var b=p.style;b.position="absolute",b.left="-9999px",b.top="-9999px",b.zIndex="-1",b.visibility="hidden",b.pointerEvents="none"}y.font="".concat(f," ").concat(g," ").concat(d,"px ").concat(h);for(var w=0,x=0,E=e.split(` `),S=0;S1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(o),s)for(var l=0;l=t.desktopTapThreshold2}var hr=i(X);bt&&(t.hoverData.tapholdCancelled=!0);var rr=function(){var Ot=t.hoverData.dragDelta=t.hoverData.dragDelta||[];Ot.length===0?(Ot.push(Ge[0]),Ot.push(Ge[1])):(Ot[0]+=Ge[0],Ot[1]+=Ge[1])};ve=!0,a(Oe,["mousemove","vmousemove","tapdrag"],X,{x:ge[0],y:ge[1]});var Mr=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||ue.emit({originalEvent:X,type:"boxstart",position:{x:ge[0],y:ge[1]}}),Ue[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(t.hoverData.which===3){if(bt){var Fr={originalEvent:X,type:"cxtdrag",position:{x:ge[0],y:ge[1]}};Qe?Qe.emit(Fr):ue.emit(Fr),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||Oe!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit({originalEvent:X,type:"cxtdragout",position:{x:ge[0],y:ge[1]}}),t.hoverData.cxtOver=Oe,Oe&&Oe.emit({originalEvent:X,type:"cxtdragover",position:{x:ge[0],y:ge[1]}}))}}else if(t.hoverData.dragging){if(ve=!0,ue.panningEnabled()&&ue.userPanningEnabled()){var Qr;if(t.hoverData.justStartedPan){var sn=t.hoverData.mdownPos;Qr={x:(ge[0]-sn[0])*fe,y:(ge[1]-sn[1])*fe},t.hoverData.justStartedPan=!1}else Qr={x:Ge[0]*fe,y:Ge[1]*fe};ue.panBy(Qr),ue.emit("dragpan"),t.hoverData.dragged=!0}ge=t.projectIntoViewport(X.clientX,X.clientY)}else if(Ue[4]==1&&(Qe==null||Qe.pannable())){if(bt){if(!t.hoverData.dragging&&ue.boxSelectionEnabled()&&(hr||!ue.panningEnabled()||!ue.userPanningEnabled()))Mr();else if(!t.hoverData.selecting&&ue.panningEnabled()&&ue.userPanningEnabled()){var ln=o(Qe,t.hoverData.downs);ln&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,Ue[4]=0,t.data.bgActivePosistion=Tu(Se),t.redrawHint("select",!0),t.redraw())}Qe&&Qe.pannable()&&Qe.active()&&Qe.unactivate()}}else{if(Qe&&Qe.pannable()&&Qe.active()&&Qe.unactivate(),(!Qe||!Qe.grabbed())&&Oe!=Ze&&(Ze&&a(Ze,["mouseout","tapdragout"],X,{x:ge[0],y:ge[1]}),Oe&&a(Oe,["mouseover","tapdragover"],X,{x:ge[0],y:ge[1]}),t.hoverData.last=Oe),Qe)if(bt){if(ue.boxSelectionEnabled()&&hr)Qe&&Qe.grabbed()&&(x(dt),Qe.emit("freeon"),dt.emit("free"),t.dragData.didDrag&&(Qe.emit("dragfreeon"),dt.emit("dragfree"))),Mr();else if(Qe&&Qe.grabbed()&&t.nodeIsDraggable(Qe)){var nr=!t.dragData.didDrag;nr&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||b(dt,{inDragLayer:!0});var Zt={x:0,y:0};if(Me(Ge[0])&&Me(Ge[1])&&(Zt.x+=Ge[0],Zt.y+=Ge[1],nr)){var Nt=t.hoverData.dragDelta;Nt&&Me(Nt[0])&&Me(Nt[1])&&(Zt.x+=Nt[0],Zt.y+=Nt[1])}t.hoverData.draggingEles=!0,dt.silentShift(Zt).emit("position drag"),t.redrawHint("drag",!0),t.redraw()}}else rr();ve=!0}if(Ue[2]=ge[0],Ue[3]=ge[1],ve)return X.stopPropagation&&X.stopPropagation(),X.preventDefault&&X.preventDefault(),!1}},!1);var N,L,q;t.registerBinding(e,"mouseup",function(X){if(!(t.hoverData.which===1&&X.which!==1&&t.hoverData.capture)){var oe=t.hoverData.capture;if(oe){t.hoverData.capture=!1;var ve=t.cy,ue=t.projectIntoViewport(X.clientX,X.clientY),fe=t.selection,Ae=t.findNearestElement(ue[0],ue[1],!0,!1),ge=t.dragData.possibleDragElements,Se=t.hoverData.down,Fe=i(X);if(t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,Se&&Se.unactivate(),t.hoverData.which===3){var Ue={originalEvent:X,type:"cxttapend",position:{x:ue[0],y:ue[1]}};if(Se?Se.emit(Ue):ve.emit(Ue),!t.hoverData.cxtDragged){var Oe={originalEvent:X,type:"cxttap",position:{x:ue[0],y:ue[1]}};Se?Se.emit(Oe):ve.emit(Oe)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(a(Ae,["mouseup","tapend","vmouseup"],X,{x:ue[0],y:ue[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(a(Se,["click","tap","vclick"],X,{x:ue[0],y:ue[1]}),L=!1,X.timeStamp-q<=ve.multiClickDebounceTime()?(N&&clearTimeout(N),L=!0,q=null,a(Se,["dblclick","dbltap","vdblclick"],X,{x:ue[0],y:ue[1]})):(N=setTimeout(function(){L||a(Se,["oneclick","onetap","voneclick"],X,{x:ue[0],y:ue[1]})},ve.multiClickDebounceTime()),q=X.timeStamp)),Se==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!i(X)&&(ve.$(r).unselect(["tapunselect"]),ge.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=ge=ve.collection()),Ae==Se&&!t.dragData.didDrag&&!t.hoverData.selecting&&Ae!=null&&Ae._private.selectable&&(t.hoverData.dragging||(ve.selectionType()==="additive"||Fe?Ae.selected()?Ae.unselect(["tapunselect"]):Ae.select(["tapselect"]):Fe||(ve.$(r).unmerge(Ae).unselect(["tapunselect"]),Ae.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var Ze=ve.collection(t.getAllInBox(fe[0],fe[1],fe[2],fe[3]));t.redrawHint("select",!0),Ze.length>0&&t.redrawHint("eles",!0),ve.emit({type:"boxend",originalEvent:X,position:{x:ue[0],y:ue[1]}});var Qe=function(bt){return bt.selectable()&&!bt.selected()};ve.selectionType()==="additive"||Fe||ve.$(r).unmerge(Ze).unselect(),Ze.emit("box").stdFilter(Qe).select().emit("boxselect"),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!fe[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var Ge=Se&&Se.grabbed();x(ge),Ge&&(Se.emit("freeon"),ge.emit("free"),t.dragData.didDrag&&(Se.emit("dragfreeon"),ge.emit("dragfree")))}}fe[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}}},!1);var V=function(X){if(!t.scrollingPage){var oe=t.cy,ve=oe.zoom(),ue=oe.pan(),fe=t.projectIntoViewport(X.clientX,X.clientY),Ae=[fe[0]*ve+ue.x,fe[1]*ve+ue.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||O()){X.preventDefault();return}if(oe.panningEnabled()&&oe.userPanningEnabled()&&oe.zoomingEnabled()&&oe.userZoomingEnabled()){X.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout(function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()},150);var ge;X.deltaY!=null?ge=X.deltaY/-250:X.wheelDeltaY!=null?ge=X.wheelDeltaY/1e3:ge=X.wheelDelta/1e3,ge=ge*t.wheelSensitivity;var Se=X.deltaMode===1;Se&&(ge*=33);var Fe=oe.zoom()*Math.pow(10,ge);X.type==="gesturechange"&&(Fe=t.gestureStartZoom*X.scale),oe.zoom({level:Fe,renderedPosition:{x:Ae[0],y:Ae[1]}}),oe.emit(X.type==="gesturechange"?"pinchzoom":"scrollzoom")}}};t.registerBinding(t.container,"wheel",V,!0),t.registerBinding(e,"scroll",function(X){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},!0),t.registerBinding(t.container,"gesturestart",function(X){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||X.preventDefault()},!0),t.registerBinding(t.container,"gesturechange",function(xe){t.hasTouchStarted||V(xe)},!0),t.registerBinding(t.container,"mouseout",function(X){var oe=t.projectIntoViewport(X.clientX,X.clientY);t.cy.emit({originalEvent:X,type:"mouseout",position:{x:oe[0],y:oe[1]}})},!1),t.registerBinding(t.container,"mouseover",function(X){var oe=t.projectIntoViewport(X.clientX,X.clientY);t.cy.emit({originalEvent:X,type:"mouseover",position:{x:oe[0],y:oe[1]}})},!1);var P,$,F,Y,z,H,Z,J,U,K,j,re,ne,ee=function(X,oe,ve,ue){return Math.sqrt((ve-X)*(ve-X)+(ue-oe)*(ue-oe))},W=function(X,oe,ve,ue){return(ve-X)*(ve-X)+(ue-oe)*(ue-oe)},te;t.registerBinding(t.container,"touchstart",te=function(X){if(t.hasTouchStarted=!0,!!B(X)){S(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var oe=t.cy,ve=t.touchData.now,ue=t.touchData.earlier;if(X.touches[0]){var fe=t.projectIntoViewport(X.touches[0].clientX,X.touches[0].clientY);ve[0]=fe[0],ve[1]=fe[1]}if(X.touches[1]){var fe=t.projectIntoViewport(X.touches[1].clientX,X.touches[1].clientY);ve[2]=fe[0],ve[3]=fe[1]}if(X.touches[2]){var fe=t.projectIntoViewport(X.touches[2].clientX,X.touches[2].clientY);ve[4]=fe[0],ve[5]=fe[1]}if(X.touches[1]){t.touchData.singleTouchMoved=!0,x(t.dragData.touchDragEles);var Ae=t.findContainerClientCoords();U=Ae[0],K=Ae[1],j=Ae[2],re=Ae[3],P=X.touches[0].clientX-U,$=X.touches[0].clientY-K,F=X.touches[1].clientX-U,Y=X.touches[1].clientY-K,ne=0<=P&&P<=j&&0<=F&&F<=j&&0<=$&&$<=re&&0<=Y&&Y<=re;var ge=oe.pan(),Se=oe.zoom();z=ee(P,$,F,Y),H=W(P,$,F,Y),Z=[(P+F)/2,($+Y)/2],J=[(Z[0]-ge.x)/Se,(Z[1]-ge.y)/Se];var Fe=200,Ue=Fe*Fe;if(H=1){for(var dr=t.touchData.startPosition=[null,null,null,null,null,null],Mt=0;Mt=t.touchTapThreshold2}if(oe&&t.touchData.cxt){X.preventDefault();var dr=X.touches[0].clientX-U,Mt=X.touches[0].clientY-K,jt=X.touches[1].clientX-U,Gt=X.touches[1].clientY-K,hr=W(dr,Mt,jt,Gt),rr=hr/H,Mr=150,Fr=Mr*Mr,Qr=1.5,sn=Qr*Qr;if(rr>=sn||hr>=Fr){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var ln={originalEvent:X,type:"cxttapend",position:{x:fe[0],y:fe[1]}};t.touchData.start?(t.touchData.start.unactivate().emit(ln),t.touchData.start=null):ue.emit(ln)}}if(oe&&t.touchData.cxt){var ln={originalEvent:X,type:"cxtdrag",position:{x:fe[0],y:fe[1]}};t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(ln):ue.emit(ln),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var nr=t.findNearestElement(fe[0],fe[1],!0,!0);(!t.touchData.cxtOver||nr!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit({originalEvent:X,type:"cxtdragout",position:{x:fe[0],y:fe[1]}}),t.touchData.cxtOver=nr,nr&&nr.emit({originalEvent:X,type:"cxtdragover",position:{x:fe[0],y:fe[1]}}))}else if(oe&&X.touches[2]&&ue.boxSelectionEnabled())X.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||ue.emit({originalEvent:X,type:"boxstart",position:{x:fe[0],y:fe[1]}}),t.touchData.selecting=!0,t.touchData.didSelect=!0,ve[4]=1,!ve||ve.length===0||ve[0]===void 0?(ve[0]=(fe[0]+fe[2]+fe[4])/3,ve[1]=(fe[1]+fe[3]+fe[5])/3,ve[2]=(fe[0]+fe[2]+fe[4])/3+1,ve[3]=(fe[1]+fe[3]+fe[5])/3+1):(ve[2]=(fe[0]+fe[2]+fe[4])/3,ve[3]=(fe[1]+fe[3]+fe[5])/3),t.redrawHint("select",!0),t.redraw();else if(oe&&X.touches[1]&&!t.touchData.didSelect&&ue.zoomingEnabled()&&ue.panningEnabled()&&ue.userZoomingEnabled()&&ue.userPanningEnabled()){X.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Zt=t.dragData.touchDragEles;if(Zt){t.redrawHint("drag",!0);for(var Nt=0;Nt0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1);var de;t.registerBinding(e,"touchcancel",de=function(X){var oe=t.touchData.start;t.touchData.capture=!1,oe&&oe.unactivate()});var ye,we,Pe,Re;if(t.registerBinding(e,"touchend",ye=function(X){var oe=t.touchData.start,ve=t.touchData.capture;if(ve)X.touches.length===0&&(t.touchData.capture=!1),X.preventDefault();else return;var ue=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var fe=t.cy,Ae=fe.zoom(),ge=t.touchData.now,Se=t.touchData.earlier;if(X.touches[0]){var Fe=t.projectIntoViewport(X.touches[0].clientX,X.touches[0].clientY);ge[0]=Fe[0],ge[1]=Fe[1]}if(X.touches[1]){var Fe=t.projectIntoViewport(X.touches[1].clientX,X.touches[1].clientY);ge[2]=Fe[0],ge[3]=Fe[1]}if(X.touches[2]){var Fe=t.projectIntoViewport(X.touches[2].clientX,X.touches[2].clientY);ge[4]=Fe[0],ge[5]=Fe[1]}oe&&oe.unactivate();var Ue;if(t.touchData.cxt){if(Ue={originalEvent:X,type:"cxttapend",position:{x:ge[0],y:ge[1]}},oe?oe.emit(Ue):fe.emit(Ue),!t.touchData.cxtDragged){var Oe={originalEvent:X,type:"cxttap",position:{x:ge[0],y:ge[1]}};oe?oe.emit(Oe):fe.emit(Oe)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!X.touches[2]&&fe.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var Ze=fe.collection(t.getAllInBox(ue[0],ue[1],ue[2],ue[3]));ue[0]=void 0,ue[1]=void 0,ue[2]=void 0,ue[3]=void 0,ue[4]=0,t.redrawHint("select",!0),fe.emit({type:"boxend",originalEvent:X,position:{x:ge[0],y:ge[1]}});var Qe=function(Fr){return Fr.selectable()&&!Fr.selected()};Ze.emit("box").stdFilter(Qe).select().emit("boxselect"),Ze.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(oe!=null&&oe.unactivate(),X.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!X.touches[1]){if(!X.touches[0]){if(!X.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Ge=t.dragData.touchDragEles;if(oe!=null){var dt=oe._private.grabbed;x(Ge),t.redrawHint("drag",!0),t.redrawHint("eles",!0),dt&&(oe.emit("freeon"),Ge.emit("free"),t.dragData.didDrag&&(oe.emit("dragfreeon"),Ge.emit("dragfree"))),a(oe,["touchend","tapend","vmouseup","tapdragout"],X,{x:ge[0],y:ge[1]}),oe.unactivate(),t.touchData.start=null}else{var bt=t.findNearestElement(ge[0],ge[1],!0,!0);a(bt,["touchend","tapend","vmouseup","tapdragout"],X,{x:ge[0],y:ge[1]})}var Ut=t.touchData.startPosition[0]-ge[0],dr=Ut*Ut,Mt=t.touchData.startPosition[1]-ge[1],jt=Mt*Mt,Gt=dr+jt,hr=Gt*Ae*Ae;t.touchData.singleTouchMoved||(oe||fe.$(":selected").unselect(["tapunselect"]),a(oe,["tap","vclick"],X,{x:ge[0],y:ge[1]}),we=!1,X.timeStamp-Re<=fe.multiClickDebounceTime()?(Pe&&clearTimeout(Pe),we=!0,Re=null,a(oe,["dbltap","vdblclick"],X,{x:ge[0],y:ge[1]})):(Pe=setTimeout(function(){we||a(oe,["onetap","voneclick"],X,{x:ge[0],y:ge[1]})},fe.multiClickDebounceTime()),Re=X.timeStamp)),oe!=null&&!t.dragData.didDrag&&oe._private.selectable&&hr"u"){var Te=[],Ce=function(X){return{clientX:X.clientX,clientY:X.clientY,force:1,identifier:X.pointerId,pageX:X.pageX,pageY:X.pageY,radiusX:X.width/2,radiusY:X.height/2,screenX:X.screenX,screenY:X.screenY,target:X.target}},Be=function(X){return{event:X,touch:Ce(X)}},$e=function(X){Te.push(Be(X))},Le=function(X){for(var oe=0;oe0)return Z[0]}return null},y=Object.keys(g),b=0;b0?p:qL(i,o,e,r,n,a,s,l)},checkPoint:function(e,r,n,a,i,o,s,l){l=l==="auto"?_o(a,i):l;var f=2*l;if(Ua(e,r,this.points,o,s,a,i-f,[0,-1],n)||Ua(e,r,this.points,o,s,a-f,i,[0,-1],n))return!0;var d=a/2+2*n,h=i/2+2*n,g=[o-d,s-h,o-d,s,o+d,s,o+d,s-h];return!!(Yr(e,r,g)||mo(e,r,f,f,o+a/2-l,s+i/2-l,n)||mo(e,r,f,f,o-a/2+l,s+i/2-l,n))}}};Xa.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",Ir(3,0)),this.generateRoundPolygon("round-triangle",Ir(3,0)),this.generatePolygon("rectangle",Ir(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r)}this.generatePolygon("pentagon",Ir(5,0)),this.generateRoundPolygon("round-pentagon",Ir(5,0)),this.generatePolygon("hexagon",Ir(6,0)),this.generateRoundPolygon("round-hexagon",Ir(6,0)),this.generatePolygon("heptagon",Ir(7,0)),this.generateRoundPolygon("round-heptagon",Ir(7,0)),this.generatePolygon("octagon",Ir(8,0)),this.generateRoundPolygon("round-octagon",Ir(8,0));var n=new Array(20);{var a=Cx(5,0),i=Cx(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s=e.deqFastCost*C)break}else if(f){if(E>=e.deqCost*p||E>=e.deqAvgCost*g)break}else if(S>=e.deqNoDrawCost*Im)break;var A=e.deq(n,w,b);if(A.length>0)for(var D=0;D0&&(e.onDeqd(n,y),!f&&e.shouldRedraw(n,y,w,b)&&i())},s=e.priority||m2;a.beforeRender(o,s(n))}}}},O$=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Od;Li(this,t),this.idsByKey=new $a,this.keyForId=new $a,this.cachesByLvl=new $a,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r}return Ni(t,[{key:"getIdsFor",value:function(r){r==null&&Pt("Can not get id list for null key");var n=this.idsByKey,a=this.idsByKey.get(r);return a||(a=new Yu,n.set(r,a)),a}},{key:"addIdForKey",value:function(r,n){r!=null&&this.getIdsFor(r).add(n)}},{key:"deleteIdForKey",value:function(r,n){r!=null&&this.getIdsFor(r).delete(n)}},{key:"getNumberOfIdsForKey",value:function(r){return r==null?0:this.getIdsFor(r).size}},{key:"updateKeyMappingFor",value:function(r){var n=r.id(),a=this.keyForId.get(n),i=this.getKey(r);this.deleteIdForKey(a,n),this.addIdForKey(i,n),this.keyForId.set(n,i)}},{key:"deleteKeyMappingFor",value:function(r){var n=r.id(),a=this.keyForId.get(n);this.deleteIdForKey(a,n),this.keyForId.delete(n)}},{key:"keyHasChangedFor",value:function(r){var n=r.id(),a=this.keyForId.get(n),i=this.getKey(r);return a!==i}},{key:"isInvalid",value:function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)}},{key:"getCachesAt",value:function(r){var n=this.cachesByLvl,a=this.lvls,i=n.get(r);return i||(i=new $a,n.set(r,i),a.push(r)),i}},{key:"getCache",value:function(r,n){return this.getCachesAt(n).get(r)}},{key:"get",value:function(r,n){var a=this.getKey(r),i=this.getCache(a,n);return i!=null&&this.updateKeyMappingFor(r),i}},{key:"getForCachedKey",value:function(r,n){var a=this.keyForId.get(r.id()),i=this.getCache(a,n);return i}},{key:"hasCache",value:function(r,n){return this.getCachesAt(n).has(r)}},{key:"has",value:function(r,n){var a=this.getKey(r);return this.hasCache(a,n)}},{key:"setCache",value:function(r,n,a){a.key=r,this.getCachesAt(n).set(r,a)}},{key:"set",value:function(r,n,a){var i=this.getKey(r);this.setCache(i,n,a),this.updateKeyMappingFor(r)}},{key:"deleteCache",value:function(r,n){this.getCachesAt(n).delete(r)}},{key:"delete",value:function(r,n){var a=this.getKey(r);this.deleteCache(a,n)}},{key:"invalidateKey",value:function(r){var n=this;this.lvls.forEach(function(a){return n.deleteCache(r,a)})}},{key:"invalidate",value:function(r){var n=r.id(),a=this.keyForId.get(n);this.deleteKeyMappingFor(r);var i=this.doesEleInvalidateKey(r);return i&&this.invalidateKey(a),i||this.getNumberOfIdsForKey(a)===0}}])}(),SR=25,Uc=50,gd=-4,Vx=3,I8=7.99,D$=8,k$=1024,L$=1024,N$=1024,B$=.2,q$=.8,P$=10,z$=.15,I$=.1,V$=.9,$$=.9,F$=100,H$=1,Au={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},U$=fr({getKey:null,doesEleInvalidateKey:Od,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:RL,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),yl=function(e,r){var n=this;n.renderer=e,n.onDequeues=[];var a=U$(r);Xe(n,a),n.lookup=new O$(a.getKey,a.doesEleInvalidateKey),n.setupDequeueing()},cr=yl.prototype;cr.reasons=Au;cr.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]};cr.getRetiredTextureQueue=function(t){var e=this,r=e.eleImgCaches.retired=e.eleImgCaches.retired||{},n=r[t]=r[t]||[];return n};cr.getElementQueue=function(){var t=this,e=t.eleCacheQueue=t.eleCacheQueue||new af(function(r,n){return n.reqs-r.reqs});return e};cr.getElementKeyToQueue=function(){var t=this,e=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return e};cr.getElement=function(t,e,r,n,a){var i=this,o=this.renderer,s=o.cy.zoom(),l=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed()||!i.allowEdgeTxrCaching&&t.isEdge()||!i.allowParentTxrCaching&&t.isParent())return null;if(n==null&&(n=Math.ceil(b2(s*r))),n=I8||n>Vx)return null;var f=Math.pow(2,n),d=e.h*f,h=e.w*f,g=o.eleTextBiggerThanMin(t,f);if(!this.isVisible(t,g))return null;var p=l.get(t,n);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;var y;if(d<=SR?y=SR:d<=Uc?y=Uc:y=Math.ceil(d/Uc)*Uc,d>N$||h>L$)return null;var b=i.getTextureQueue(y),w=b[b.length-2],x=function(){return i.recycleTexture(y,h)||i.addTexture(y,h)};w||(w=b[b.length-1]),w||(w=x()),w.width-w.usedWidthn;k--)O=i.getElement(t,e,r,k,Au.downscale);B()}else return i.queueElement(t,D.level-1),D;else{var N;if(!S&&!C&&!A)for(var L=n-1;L>=gd;L--){var q=l.get(t,L);if(q){N=q;break}}if(E(N))return i.queueElement(t,n),N;w.context.translate(w.usedWidth,0),w.context.scale(f,f),this.drawElement(w.context,t,e,g,!1),w.context.scale(1/f,1/f),w.context.translate(-w.usedWidth,0)}return p={x:w.usedWidth,texture:w,level:n,scale:f,width:h,height:d,scaledLabelShown:g},w.usedWidth+=Math.ceil(h+D$),w.eleCaches.push(p),l.set(t,n,p),i.checkTextureFullness(w),p};cr.invalidateElements=function(t){for(var e=0;e=B$*t.width&&this.retireTexture(t)};cr.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>q$&&t.fullnessChecks>=P$?Mi(r,t):t.fullnessChecks++};cr.retireTexture=function(t){var e=this,r=t.height,n=e.getTextureQueue(r),a=this.lookup;Mi(n,t),t.retired=!0;for(var i=t.eleCaches,o=0;o=e)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,y2(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),Mi(a,o),n.push(o),o}};cr.queueElement=function(t,e){var r=this,n=r.getElementQueue(),a=r.getElementKeyToQueue(),i=this.getKey(t),o=a[i];if(o)o.level=Math.max(o.level,e),o.eles.merge(t),o.reqs++,n.updateItem(o);else{var s={eles:t.spawn().merge(t),level:e,reqs:1,key:i};n.push(s),a[i]=s}};cr.dequeue=function(t){for(var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),a=[],i=e.lookup,o=0;o0;o++){var s=r.pop(),l=s.key,f=s.eles[0],d=i.hasCache(f,s.level);if(n[l]=null,d)continue;a.push(s);var h=e.getBoundingBox(f);e.getElement(f,h,t,s.level,Au.dequeue)}return a};cr.removeFromQueue=function(t){var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),a=this.getKey(t),i=n[a];i!=null&&(i.eles.length===1?(i.reqs=p2,r.updateItem(i),r.pop(),n[a]=null):i.eles.unmerge(t))};cr.onDequeue=function(t){this.onDequeues.push(t)};cr.offDequeue=function(t){Mi(this.onDequeues,t)};cr.setupDequeueing=z8.setupDequeueing({deqRedrawThreshold:F$,deqCost:z$,deqAvgCost:I$,deqNoDrawCost:V$,deqFastCost:$$,deq:function(e,r,n){return e.dequeue(r,n)},onDeqd:function(e,r){for(var n=0;n=Y$||r>zd)return null}n.validateLayersElesOrdering(r,t);var l=n.layersByLevel,f=Math.pow(2,r),d=l[r]=l[r]||[],h,g=n.levelIsComplete(r,t),p,y=function(){var B=function(V){if(n.validateLayersElesOrdering(V,t),n.levelIsComplete(V,t))return p=l[V],!0},k=function(V){if(!p)for(var P=r+V;Cl<=P&&P<=zd&&!B(P);P+=V);};k(1),k(-1);for(var N=d.length-1;N>=0;N--){var L=d[N];L.invalid&&Mi(d,L)}};if(!g)y();else return d;var b=function(){if(!h){h=jr();for(var B=0;BCR||L>CR)return null;var q=N*L;if(q>eF)return null;var V=n.makeLayer(h,r);if(k!=null){var P=d.indexOf(k)+1;d.splice(P,0,V)}else(B.insert===void 0||B.insert)&&d.unshift(V);return V};if(n.skipping&&!s)return null;for(var x=null,E=t.length/G$,S=!s,C=0;C=E||!BL(x.bb,A.boundingBox()))&&(x=w({insert:!0,after:x}),!x))return null;p||S?n.queueLayer(x,A):n.drawEleInLayer(x,A,r,e),x.eles.push(A),M[r]=x}return p||(S?null:d)};Rr.getEleLevelForLayerLevel=function(t,e){return t};Rr.drawEleInLayer=function(t,e,r,n){var a=this,i=this.renderer,o=t.context,s=e.boundingBox();s.w===0||s.h===0||!e.visible()||(r=a.getEleLevelForLayerLevel(r,n),i.setImgSmoothing(o,!1),i.drawCachedElement(o,e,null,null,r,tF),i.setImgSmoothing(o,!0))};Rr.levelIsComplete=function(t,e){var r=this,n=r.layersByLevel[t];if(!n||n.length===0)return!1;for(var a=0,i=0;i0||o.invalid)return!1;a+=o.eles.length}return a===e.length};Rr.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n0){e=!0;break}}return e};Rr.invalidateElements=function(t){var e=this;t.length!==0&&(e.lastInvalidationTime=Ha(),!(t.length===0||!e.haveLayers())&&e.updateElementsInLayers(t,function(n,a,i){e.invalidateLayer(n)}))};Rr.invalidateLayer=function(t){if(this.lastInvalidationTime=Ha(),!t.invalid){var e=t.level,r=t.eles,n=this.layersByLevel[e];Mi(n,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var a=0;a3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,s=e._private.rscratch;if(!(i&&!e.visible())&&!(s.badLine||s.allpts==null||isNaN(s.allpts[0]))){var l;r&&(l=r,t.translate(-l.x1,-l.y1));var f=i?e.pstyle("opacity").value:1,d=i?e.pstyle("line-opacity").value:1,h=e.pstyle("curve-style").value,g=e.pstyle("line-style").value,p=e.pstyle("width").pfValue,y=e.pstyle("line-cap").value,b=e.pstyle("line-outline-width").value,w=e.pstyle("line-outline-color").value,x=f*d,E=f*d,S=function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x;h==="straight-triangle"?(o.eleStrokeStyle(t,e,V),o.drawEdgeTrianglePath(e,t,s.allpts)):(t.lineWidth=p,t.lineCap=y,o.eleStrokeStyle(t,e,V),o.drawEdgePath(e,t,s.allpts,g),t.lineCap="butt")},C=function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x;if(t.lineWidth=p+b,t.lineCap=y,b>0)o.colorStrokeStyle(t,w[0],w[1],w[2],V);else{t.lineCap="butt";return}h==="straight-triangle"?o.drawEdgeTrianglePath(e,t,s.allpts):(o.drawEdgePath(e,t,s.allpts,g),t.lineCap="butt")},A=function(){a&&o.drawEdgeOverlay(t,e)},D=function(){a&&o.drawEdgeUnderlay(t,e)},M=function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:E;o.drawArrowheads(t,e,V)},R=function(){o.drawElementText(t,e,null,n)};t.lineJoin="round";var O=e.pstyle("ghost").value==="yes";if(O){var B=e.pstyle("ghost-offset-x").pfValue,k=e.pstyle("ghost-offset-y").pfValue,N=e.pstyle("ghost-opacity").value,L=x*N;t.translate(B,k),S(L),M(L),t.translate(-B,-k)}else C();D(),S(),M(),A(),R(),r&&t.translate(l.x1,l.y1)}};var F8=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,n){if(n.visible()){var a=n.pstyle("".concat(e,"-opacity")).value;if(a!==0){var i=this,o=i.usePaths(),s=n._private.rscratch,l=n.pstyle("".concat(e,"-padding")).pfValue,f=2*l,d=n.pstyle("".concat(e,"-color")).value;r.lineWidth=f,s.edgeType==="self"&&!o?r.lineCap="butt":r.lineCap="round",i.colorStrokeStyle(r,d[0],d[1],d[2],a),i.drawEdgePath(n,r,s.allpts,"solid")}}}};Ka.drawEdgeOverlay=F8("overlay");Ka.drawEdgeUnderlay=F8("underlay");Ka.drawEdgePath=function(t,e,r,n){var a=t._private.rscratch,i=e,o,s=!1,l=this.usePaths(),f=t.pstyle("line-dash-pattern").pfValue,d=t.pstyle("line-dash-offset").pfValue;if(l){var h=r.join("$"),g=a.pathCacheKey&&a.pathCacheKey===h;g?(o=e=a.pathCache,s=!0):(o=e=new Path2D,a.pathCacheKey=h,a.pathCache=o)}if(i.setLineDash)switch(n){case"dotted":i.setLineDash([1,1]);break;case"dashed":i.setLineDash(f),i.lineDashOffset=d;break;case"solid":i.setLineDash([]);break}if(!s&&!a.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var p=2;p+35&&arguments[5]!==void 0?arguments[5]:!0,o=this;if(n==null){if(i&&!o.eleTextBiggerThanMin(e))return}else if(n===!1)return;if(e.isNode()){var s=e.pstyle("label");if(!s||!s.value)return;var l=o.getLabelJustification(e);t.textAlign=l,t.textBaseline="bottom"}else{var f=e.element()._private.rscratch.badLine,d=e.pstyle("label"),h=e.pstyle("source-label"),g=e.pstyle("target-label");if(f||(!d||!d.value)&&(!h||!h.value)&&(!g||!g.value))return;t.textAlign="center",t.textBaseline="bottom"}var p=!r,y;r&&(y=r,t.translate(-y.x1,-y.y1)),a==null?(o.drawText(t,e,null,p,i),e.isEdge()&&(o.drawText(t,e,"source",p,i),o.drawText(t,e,"target",p,i))):o.drawText(t,e,a,p,i),r&&t.translate(y.x1,y.y1)};Oo.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!0,n=e.pstyle("font-style").strValue,a=e.pstyle("font-size").pfValue+"px",i=e.pstyle("font-family").strValue,o=e.pstyle("font-weight").strValue,s=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*s,f=e.pstyle("color").value,d=e.pstyle("text-outline-color").value;t.font=n+" "+o+" "+a+" "+i,t.lineJoin="round",this.colorFillStyle(t,f[0],f[1],f[2],s),this.colorStrokeStyle(t,d[0],d[1],d[2],l)};function $m(t,e,r,n,a){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,o=arguments.length>6?arguments[6]:void 0;t.beginPath(),t.moveTo(e+i,r),t.lineTo(e+n-i,r),t.quadraticCurveTo(e+n,r,e+n,r+i),t.lineTo(e+n,r+a-i),t.quadraticCurveTo(e+n,r+a,e+n-i,r+a),t.lineTo(e+i,r+a),t.quadraticCurveTo(e,r+a,e,r+a-i),t.lineTo(e,r+i),t.quadraticCurveTo(e,r,e+i,r),t.closePath(),o?t.stroke():t.fill()}Oo.getTextAngle=function(t,e){var r,n=t._private,a=n.rscratch,i=e?e+"-":"",o=t.pstyle(i+"text-rotation");if(o.strValue==="autorotate"){var s=zn(a,"labelAngle",e);r=t.isEdge()?s:0}else o.strValue==="none"?r=0:r=o.pfValue;return r};Oo.drawText=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=e._private,o=i.rscratch,s=a?e.effectiveOpacity():1;if(!(a&&(s===0||e.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var l=zn(o,"labelX",r),f=zn(o,"labelY",r),d,h,g=this.getLabelText(e,r);if(g!=null&&g!==""&&!isNaN(l)&&!isNaN(f)){this.setupTextStyle(t,e,a);var p=r?r+"-":"",y=zn(o,"labelWidth",r),b=zn(o,"labelHeight",r),w=e.pstyle(p+"text-margin-x").pfValue,x=e.pstyle(p+"text-margin-y").pfValue,E=e.isEdge(),S=e.pstyle("text-halign").value,C=e.pstyle("text-valign").value;E&&(S="center",C="center"),l+=w,f+=x;var A;switch(n?A=this.getTextAngle(e,r):A=0,A!==0&&(d=l,h=f,t.translate(d,h),t.rotate(A),l=0,f=0),C){case"top":break;case"center":f+=b/2;break;case"bottom":f+=b;break}var D=e.pstyle("text-background-opacity").value,M=e.pstyle("text-border-opacity").value,R=e.pstyle("text-border-width").pfValue,O=e.pstyle("text-background-padding").pfValue,B=e.pstyle("text-background-shape").strValue,k=B.indexOf("round")===0,N=2;if(D>0||R>0&&M>0){var L=l-O;switch(S){case"left":L-=y;break;case"center":L-=y/2;break}var q=f-b-O,V=y+2*O,P=b+2*O;if(D>0){var $=t.fillStyle,F=e.pstyle("text-background-color").value;t.fillStyle="rgba("+F[0]+","+F[1]+","+F[2]+","+D*s+")",k?$m(t,L,q,V,P,N):t.fillRect(L,q,V,P),t.fillStyle=$}if(R>0&&M>0){var Y=t.strokeStyle,z=t.lineWidth,H=e.pstyle("text-border-color").value,Z=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+H[0]+","+H[1]+","+H[2]+","+M*s+")",t.lineWidth=R,t.setLineDash)switch(Z){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=R/4,t.setLineDash([]);break;case"solid":t.setLineDash([]);break}if(k?$m(t,L,q,V,P,N,"stroke"):t.strokeRect(L,q,V,P),Z==="double"){var J=R/2;k?$m(t,L+J,q+J,V-J*2,P-J*2,N,"stroke"):t.strokeRect(L+J,q+J,V-J*2,P-J*2)}t.setLineDash&&t.setLineDash([]),t.lineWidth=z,t.strokeStyle=Y}}var U=2*e.pstyle("text-outline-width").pfValue;if(U>0&&(t.lineWidth=U),e.pstyle("text-wrap").value==="wrap"){var K=zn(o,"labelWrapCachedLines",r),j=zn(o,"labelLineHeight",r),re=y/2,ne=this.getLabelJustification(e);switch(ne==="auto"||(S==="left"?ne==="left"?l+=-y:ne==="center"&&(l+=-re):S==="center"?ne==="left"?l+=-re:ne==="right"&&(l+=re):S==="right"&&(ne==="center"?l+=re:ne==="right"&&(l+=y))),C){case"top":f-=(K.length-1)*j;break;case"center":case"bottom":f-=(K.length-1)*j;break}for(var ee=0;ee0&&t.strokeText(K[ee],l,f),t.fillText(K[ee],l,f),f+=j}else U>0&&t.strokeText(g,l,f),t.fillText(g,l,f);A!==0&&(t.rotate(-A),t.translate(-d,-h))}}};var Wu={};Wu.drawNode=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,s,l,f=e._private,d=f.rscratch,h=e.position();if(!(!Me(h.x)||!Me(h.y))&&!(i&&!e.visible())){var g=i?e.effectiveOpacity():1,p=o.usePaths(),y,b=!1,w=e.padding();s=e.width()+2*w,l=e.height()+2*w;var x;r&&(x=r,t.translate(-x.x1,-x.y1));for(var E=e.pstyle("background-image"),S=E.value,C=new Array(S.length),A=new Array(S.length),D=0,M=0;M0&&arguments[0]!==void 0?arguments[0]:L;o.eleFillStyle(t,e,ue)},ee=function(){var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:H;o.colorStrokeStyle(t,q[0],q[1],q[2],ue)},W=function(){var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:K;o.colorStrokeStyle(t,J[0],J[1],J[2],ue)},te=function(ue,fe,Ae,ge){var Se=o.nodePathCache=o.nodePathCache||[],Fe=AL(Ae==="polygon"?Ae+","+ge.join(","):Ae,""+fe,""+ue,""+re),Ue=Se[Fe],Oe,Ze=!1;return Ue!=null?(Oe=Ue,Ze=!0,d.pathCache=Oe):(Oe=new Path2D,Se[Fe]=d.pathCache=Oe),{path:Oe,cacheHit:Ze}},ce=e.pstyle("shape").strValue,de=e.pstyle("shape-polygon-points").pfValue;if(p){t.translate(h.x,h.y);var ye=te(s,l,ce,de);y=ye.path,b=ye.cacheHit}var we=function(){if(!b){var ue=h;p&&(ue={x:0,y:0}),o.nodeShapes[o.getNodeShape(e)].draw(y||t,ue.x,ue.y,s,l,re,d)}p?t.fill(y):t.fill()},Pe=function(){for(var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:g,fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Ae=f.backgrounding,ge=0,Se=0;Se0&&arguments[0]!==void 0?arguments[0]:!1,fe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:g;o.hasPie(e)&&(o.drawPie(t,e,fe),ue&&(p||o.nodeShapes[o.getNodeShape(e)].draw(t,h.x,h.y,s,l,re,d)))},Te=function(){var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:g,fe=(k>0?k:-k)*ue,Ae=k>0?0:255;k!==0&&(o.colorFillStyle(t,Ae,Ae,Ae,fe),p?t.fill(y):t.fill())},Ce=function(){if(N>0){if(t.lineWidth=N,t.lineCap=$,t.lineJoin=P,t.setLineDash)switch(V){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(Y),t.lineDashOffset=z;break;case"solid":case"double":t.setLineDash([]);break}if(F!=="center"){if(t.save(),t.lineWidth*=2,F==="inside")p?t.clip(y):t.clip();else{var ue=new Path2D;ue.rect(-s/2-N,-l/2-N,s+2*N,l+2*N),ue.addPath(y),t.clip(ue,"evenodd")}p?t.stroke(y):t.stroke(),t.restore()}else p?t.stroke(y):t.stroke();if(V==="double"){t.lineWidth=N/3;var fe=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",p?t.stroke(y):t.stroke(),t.globalCompositeOperation=fe}t.setLineDash&&t.setLineDash([])}},Be=function(){if(Z>0){if(t.lineWidth=Z,t.lineCap="butt",t.setLineDash)switch(U){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break}var ue=h;p&&(ue={x:0,y:0});var fe=o.getNodeShape(e),Ae=N;F==="inside"&&(Ae=0),F==="outside"&&(Ae*=2);var ge=(s+Ae+(Z+j))/s,Se=(l+Ae+(Z+j))/l,Fe=s*ge,Ue=l*Se,Oe=o.nodeShapes[fe].points,Ze;if(p){var Qe=te(Fe,Ue,fe,Oe);Ze=Qe.path}if(fe==="ellipse")o.drawEllipsePath(Ze||t,ue.x,ue.y,Fe,Ue);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(fe)){var Ge=0,dt=0,bt=0;fe==="round-diamond"?Ge=(Ae+j+Z)*1.4:fe==="round-heptagon"?(Ge=(Ae+j+Z)*1.075,bt=-(Ae/2+j+Z)/35):fe==="round-hexagon"?Ge=(Ae+j+Z)*1.12:fe==="round-pentagon"?(Ge=(Ae+j+Z)*1.13,bt=-(Ae/2+j+Z)/15):fe==="round-tag"?(Ge=(Ae+j+Z)*1.12,dt=(Ae/2+Z+j)*.07):fe==="round-triangle"&&(Ge=(Ae+j+Z)*(Math.PI/2),bt=-(Ae+j/2+Z)/Math.PI),Ge!==0&&(ge=(s+Ge)/s,Fe=s*ge,["round-hexagon","round-tag"].includes(fe)||(Se=(l+Ge)/l,Ue=l*Se)),re=re==="auto"?zL(Fe,Ue):re;for(var Ut=Fe/2,dr=Ue/2,Mt=re+(Ae+Z+j)/2,jt=new Array(Oe.length/2),Gt=new Array(Oe.length/2),hr=0;hr0){if(a=a||n.position(),i==null||o==null){var p=n.padding();i=n.width()+2*p,o=n.height()+2*p}s.colorFillStyle(r,d[0],d[1],d[2],f),s.nodeShapes[h].draw(r,a.x,a.y,i+l*2,o+l*2,g),r.fill()}}}};Wu.drawNodeOverlay=H8("overlay");Wu.drawNodeUnderlay=H8("underlay");Wu.hasPie=function(t){return t=t[0],t._private.hasPie};Wu.drawPie=function(t,e,r,n){e=e[0],n=n||e.position();var a=e.cy().style(),i=e.pstyle("pie-size"),o=n.x,s=n.y,l=e.width(),f=e.height(),d=Math.min(l,f)/2,h=0,g=this.usePaths();g&&(o=0,s=0),i.units==="%"?d=d*i.pfValue:i.pfValue!==void 0&&(d=i.pfValue/2);for(var p=1;p<=a.pieBackgroundN;p++){var y=e.pstyle("pie-"+p+"-background-size").value,b=e.pstyle("pie-"+p+"-background-color").value,w=e.pstyle("pie-"+p+"-background-opacity").value*r,x=y/100;x+h>1&&(x=1-h);var E=1.5*Math.PI+2*Math.PI*h,S=2*Math.PI*x,C=E+S;y===0||h>=1||h+x>1||(t.beginPath(),t.moveTo(o,s),t.arc(o,s,d,E,C),t.closePath(),this.colorFillStyle(t,b[0],b[1],b[2],w),t.fill(),h+=x)}};var $r={},dF=100;$r.getPixelRatio=function(){var t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/r};$r.paintCache=function(t){for(var e=this.paintCaches=this.paintCaches||[],r=!0,n,a=0;ae.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!h&&(d[e.NODE]=!0,d[e.SELECT_BOX]=!0);var E=r.style(),S=r.zoom(),C=o!==void 0?o:S,A=r.pan(),D={x:A.x,y:A.y},M={zoom:S,pan:{x:A.x,y:A.y}},R=e.prevViewport,O=R===void 0||M.zoom!==R.zoom||M.pan.x!==R.pan.x||M.pan.y!==R.pan.y;!O&&!(b&&!y)&&(e.motionBlurPxRatio=1),s&&(D=s),C*=l,D.x*=l,D.y*=l;var B=e.getCachedZSortedEles();function k(ee,W,te,ce,de){var ye=ee.globalCompositeOperation;ee.globalCompositeOperation="destination-out",e.colorFillStyle(ee,255,255,255,e.motionBlurTransparency),ee.fillRect(W,te,ce,de),ee.globalCompositeOperation=ye}function N(ee,W){var te,ce,de,ye;!e.clearingMotionBlur&&(ee===f.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]||ee===f.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG])?(te={x:A.x*p,y:A.y*p},ce=S*p,de=e.canvasWidth*p,ye=e.canvasHeight*p):(te=D,ce=C,de=e.canvasWidth,ye=e.canvasHeight),ee.setTransform(1,0,0,1,0,0),W==="motionBlur"?k(ee,0,0,de,ye):!n&&(W===void 0||W)&&ee.clearRect(0,0,de,ye),a||(ee.translate(te.x,te.y),ee.scale(ce,ce)),s&&ee.translate(s.x,s.y),o&&ee.scale(o,o)}if(h||(e.textureDrawLastFrame=!1),h){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=r.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var L=e.data.bufferContexts[e.TEXTURE_BUFFER];L.setTransform(1,0,0,1,0,0),L.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:L,drawOnlyNodeLayer:!0,forcedPxRatio:l*e.textureMult});var M=e.textureCache.viewport={zoom:r.zoom(),pan:r.pan(),width:e.canvasWidth,height:e.canvasHeight};M.mpan={x:(0-M.pan.x)/M.zoom,y:(0-M.pan.y)/M.zoom}}d[e.DRAG]=!1,d[e.NODE]=!1;var q=f.contexts[e.NODE],V=e.textureCache.texture,M=e.textureCache.viewport;q.setTransform(1,0,0,1,0,0),g?k(q,0,0,M.width,M.height):q.clearRect(0,0,M.width,M.height);var P=E.core("outside-texture-bg-color").value,$=E.core("outside-texture-bg-opacity").value;e.colorFillStyle(q,P[0],P[1],P[2],$),q.fillRect(0,0,M.width,M.height);var S=r.zoom();N(q,!1),q.clearRect(M.mpan.x,M.mpan.y,M.width/M.zoom/l,M.height/M.zoom/l),q.drawImage(V,M.mpan.x,M.mpan.y,M.width/M.zoom/l,M.height/M.zoom/l)}else e.textureOnViewport&&!n&&(e.textureCache=null);var F=r.extent(),Y=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),z=e.hideEdgesOnViewport&&Y,H=[];if(H[e.NODE]=!d[e.NODE]&&g&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,H[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),H[e.DRAG]=!d[e.DRAG]&&g&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,H[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),d[e.NODE]||a||i||H[e.NODE]){var Z=g&&!H[e.NODE]&&p!==1,q=n||(Z?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:f.contexts[e.NODE]),J=g&&!Z?"motionBlur":void 0;N(q,J),z?e.drawCachedNodes(q,B.nondrag,l,F):e.drawLayeredElements(q,B.nondrag,l,F),e.debug&&e.drawDebugPoints(q,B.nondrag),!a&&!g&&(d[e.NODE]=!1)}if(!i&&(d[e.DRAG]||a||H[e.DRAG])){var Z=g&&!H[e.DRAG]&&p!==1,q=n||(Z?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:f.contexts[e.DRAG]);N(q,g&&!Z?"motionBlur":void 0),z?e.drawCachedNodes(q,B.drag,l,F):e.drawCachedElements(q,B.drag,l,F),e.debug&&e.drawDebugPoints(q,B.drag),!a&&!g&&(d[e.DRAG]=!1)}if(this.drawSelectionRectangle(t,N),g&&p!==1){var U=f.contexts[e.NODE],K=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],j=f.contexts[e.DRAG],re=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],ne=function(W,te,ce){W.setTransform(1,0,0,1,0,0),ce||!x?W.clearRect(0,0,e.canvasWidth,e.canvasHeight):k(W,0,0,e.canvasWidth,e.canvasHeight);var de=p;W.drawImage(te,0,0,e.canvasWidth*de,e.canvasHeight*de,0,0,e.canvasWidth,e.canvasHeight)};(d[e.NODE]||H[e.NODE])&&(ne(U,K,H[e.NODE]),d[e.NODE]=!1),(d[e.DRAG]||H[e.DRAG])&&(ne(j,re,H[e.DRAG]),d[e.DRAG]=!1)}e.prevViewport=M,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),g&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!h,e.mbFrames=0,d[e.NODE]=!0,d[e.DRAG]=!0,e.redraw()},dF)),n||r.emit("render")};var ol;$r.drawSelectionRectangle=function(t,e){var r=this,n=r.cy,a=r.data,i=n.style(),o=t.drawOnlyNodeLayer,s=t.drawAllLayers,l=a.canvasNeedsRedraw,f=t.forcedContext;if(r.showFps||!o&&l[r.SELECT_BOX]&&!s){var d=f||a.contexts[r.SELECT_BOX];if(e(d),r.selection[4]==1&&(r.hoverData.selecting||r.touchData.selecting)){var h=r.cy.zoom(),g=i.core("selection-box-border-width").value/h;d.lineWidth=g,d.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",d.fillRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]),g>0&&(d.strokeStyle="rgba("+i.core("selection-box-border-color").value[0]+","+i.core("selection-box-border-color").value[1]+","+i.core("selection-box-border-color").value[2]+","+i.core("selection-box-opacity").value+")",d.strokeRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]))}if(a.bgActivePosistion&&!r.hoverData.selecting){var h=r.cy.zoom(),p=a.bgActivePosistion;d.fillStyle="rgba("+i.core("active-bg-color").value[0]+","+i.core("active-bg-color").value[1]+","+i.core("active-bg-color").value[2]+","+i.core("active-bg-opacity").value+")",d.beginPath(),d.arc(p.x,p.y,i.core("active-bg-size").pfValue/h,0,2*Math.PI),d.fill()}var y=r.lastRedrawTime;if(r.showFps&&y){y=Math.round(y);var b=Math.round(1e3/y),w="1 frame = "+y+" ms = "+b+" fps";if(d.setTransform(1,0,0,1,0,0),d.fillStyle="rgba(255, 0, 0, 0.75)",d.strokeStyle="rgba(255, 0, 0, 0.75)",d.font="30px Arial",!ol){var x=d.measureText(w);ol=x.actualBoundingBoxAscent}d.fillText(w,0,ol);var E=60;d.strokeRect(0,ol+10,250,20),d.fillRect(0,ol+10,250*Math.min(b/E,1),20)}s||(l[r.SELECT_BOX]=!1)}};function OR(t,e,r){var n=t.createShader(e);if(t.shaderSource(n,r),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))throw new Error(t.getShaderInfoLog(n));return n}function hF(t,e,r){var n=OR(t,t.VERTEX_SHADER,e),a=OR(t,t.FRAGMENT_SHADER,r),i=t.createProgram();if(t.attachShader(i,n),t.attachShader(i,a),t.linkProgram(i),!t.getProgramParameter(i,t.LINK_STATUS))throw new Error("Could not initialize shaders");return i}function vF(t,e,r){r===void 0&&(r=e);var n=t.makeOffscreenCanvas(e,r),a=n.context=n.getContext("2d");return n.clear=function(){return a.clearRect(0,0,n.width,n.height)},n.clear(),n}function B2(t){var e=t.pixelRatio,r=t.cy.zoom(),n=t.cy.pan();return{zoom:r*e,pan:{x:n.x*e,y:n.y*e}}}function gF(t,e,r,n,a){var i=n*r+e.x,o=a*r+e.y;return o=Math.round(t.canvasHeight-o),[i,o]}function ul(t,e,r){var n=t[0]/255,a=t[1]/255,i=t[2]/255,o=e,s=r||new Array(4);return s[0]=n*o,s[1]=a*o,s[2]=i*o,s[3]=o,s}function mu(t,e){var r=e||new Array(4);return r[0]=(t>>0&255)/255,r[1]=(t>>8&255)/255,r[2]=(t>>16&255)/255,r[3]=(t>>24&255)/255,r}function pF(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function mF(t,e){var r=t.createTexture();return r.buffer=function(n){t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_NEAREST),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n),t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null)},r.deleteTexture=function(){t.deleteTexture(r)},r}function U8(t,e){switch(e){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}function G8(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r)}}function yF(t,e,r,n,a,i){switch(e){case t.FLOAT:return new Float32Array(r.buffer,i*n,a);case t.INT:return new Int32Array(r.buffer,i*n,a)}}function bF(t,e,r,n){var a=U8(t,e),i=yr(a,2),o=i[0],s=i[1],l=G8(t,s,n),f=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,f),t.bufferData(t.ARRAY_BUFFER,l,t.STATIC_DRAW),s===t.FLOAT?t.vertexAttribPointer(r,o,s,!1,0,0):s===t.INT&&t.vertexAttribIPointer(r,o,s,0,0),t.enableVertexAttribArray(r),t.bindBuffer(t.ARRAY_BUFFER,null),f}function xi(t,e,r,n){var a=U8(t,r),i=yr(a,3),o=i[0],s=i[1],l=i[2],f=G8(t,s,e*o),d=o*l,h=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,h),t.bufferData(t.ARRAY_BUFFER,e*d,t.DYNAMIC_DRAW),t.enableVertexAttribArray(n),s===t.FLOAT?t.vertexAttribPointer(n,o,s,!1,d,0):s===t.INT&&t.vertexAttribIPointer(n,o,s,d,0),t.vertexAttribDivisor(n,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var g=new Array(e),p=0;po&&(s=o/n,l=n*s,f=a*s),{scale:s,texW:l,texH:f}}},{key:"draw",value:function(r,n,a){var i=this;if(this.locked)throw new Error("can't draw, atlas is locked");var o=this.texSize,s=this.texRows,l=this.texHeight,f=this.getScale(n),d=f.scale,h=f.texW,g=f.texH,p=[null,null],y=function(S,C){if(a&&C){var A=C.context,D=S.x,M=S.row,R=D,O=l*M;A.save(),A.translate(R,O),A.scale(d,d),a(A,n),A.restore()}},b=function(){y(i.freePointer,i.canvas),p[0]={x:i.freePointer.x,y:i.freePointer.row*l,w:h,h:g},p[1]={x:i.freePointer.x+h,y:i.freePointer.row*l,w:0,h:g},i.freePointer.x+=h,i.freePointer.x==o&&(i.freePointer.x=0,i.freePointer.row++)},w=function(){var S=i.scratch,C=i.canvas;S.clear(),y({x:0,row:0},S);var A=o-i.freePointer.x,D=h-A,M=l;{var R=i.freePointer.x,O=i.freePointer.row*l,B=A;C.context.drawImage(S,0,0,B,M,R,O,B,M),p[0]={x:R,y:O,w:B,h:g}}{var k=A,N=(i.freePointer.row+1)*l,L=D;C&&C.context.drawImage(S,k,0,L,M,0,N,L,M),p[1]={x:0,y:N,w:L,h:g}}i.freePointer.x=D,i.freePointer.row++},x=function(){i.freePointer.x=0,i.freePointer.row++};if(this.freePointer.x+h<=o)b();else{if(this.freePointer.row>=s-1)return!1;this.freePointer.x===o?(x(),b()):this.enableWrapping?w():(x(),b())}return this.keyToLocation.set(r,p),this.needsBuffer=!0,p}},{key:"getOffsets",value:function(r){return this.keyToLocation.get(r)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(r){if(this.locked)return!1;var n=this.texSize,a=this.texRows,i=this.getScale(r),o=i.texW;return this.freePointer.x+o>n?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},a=n.forceRedraw,i=a===void 0?!1:a,o=n.filterEle,s=o===void 0?function(){return!0}:o,l=n.filterType,f=l===void 0?function(){return!0}:l,d=!1,h=!1,g=$n(r),p;try{for(g.s();!(p=g.n()).done;){var y=p.value;if(s(y)){var b=$n(this.renderTypes.values()),w;try{for(b.s();!(w=b.n()).done;){var x=w.value,E=x.type;if(f(E)){var S=x.getKey(y),C=this.collections.get(x.collection);if(i)C.markKeyForGC(S),h=!0;else{var A=x.getID?x.getID(y):y.id(),D=this._key(E,A),M=this.typeAndIdToKey.get(D);M!==void 0&&M!==S&&(this.typeAndIdToKey.delete(D),C.markKeyForGC(M),d=!0)}}}}catch(R){b.e(R)}finally{b.f()}}}}catch(R){g.e(R)}finally{g.f()}return h&&(this.gc(),d=!1),d}},{key:"gc",value:function(){var r=$n(this.collections.values()),n;try{for(r.s();!(n=r.n()).done;){var a=n.value;a.gc()}}catch(i){r.e(i)}finally{r.f()}}},{key:"getOrCreateAtlas",value:function(r,n,a){var i=this.renderTypes.get(n),o=i.getKey(r);a||(a=i.getBoundingBox(r));var s=this.collections.get(i.collection),l=!1,f=s.draw(o,a,function(g){i.drawElement(g,r,a,!0,!0),l=!0});if(l){var d=i.getID?i.getID(r):r.id(),h=this._key(n,d);this.typeAndIdToKey.set(h,o)}return f}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(r,n){if(this.batchAtlases.length===this.maxAtlasesPerBatch){var a=this.renderTypes.get(n),i=a.getKey(r),o=this.collections.get(a.collection),s=o.getAtlas(i);return!!s&&this.batchAtlases.includes(s)}return!0}},{key:"getAtlasIndexForBatch",value:function(r){var n=this.batchAtlases.indexOf(r);if(n<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)return;this.batchAtlases.push(r),n=this.batchAtlases.length-1}return n}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(r,n){return n})}},{key:"getAtlasInfo",value:function(r,n){var a=this.renderTypes.get(n),i=a.getBoundingBox(r),o=this.getOrCreateAtlas(r,n,i),s=this.getAtlasIndexForBatch(o);if(s!==void 0){var l=a.getKey(r),f=o.getOffsets(l),d=yr(f,2),h=d[0],g=d[1];return{index:s,tex1:h,tex2:g,bb:i}}}},{key:"setTransformMatrix",value:function(r,n,a,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=this.getRenderTypeOpts(a),l=s.getPadding?s.getPadding(r):0;if(i){var f=i.bb,d=i.tex1,h=i.tex2,g=d.w/(d.w+h.w);o||(g=1-g);var p=this.getAdjustedBB(f,l,o,g);this._applyTransformMatrix(n,p,s,r)}else{var y=s.getBoundingBox(r),b=this.getAdjustedBB(y,l,!0,1);this._applyTransformMatrix(n,b,s,r)}}},{key:"_applyTransformMatrix",value:function(r,n,a,i){var o,s;Y8(r);var l=a.getRotation?a.getRotation(i):0;if(l!==0){var f=a.getRotationPoint(i),d=f.x,h=f.y;Id(r,r,[d,h]),X8(r,r,l);var g=a.getRotationOffset(i);o=g.x+n.xOffset,s=g.y}else o=n.x1,s=n.y1;Id(r,r,[o,s]),q2(r,r,[n.w,n.h])}},{key:"getAdjustedBB",value:function(r,n,a,i){var o=r.x1,s=r.y1,l=r.w,f=r.h;n&&(o-=n,s-=n,l+=2*n,f+=2*n);var d=0,h=l*i;return a&&i<1?l=h:!a&&i<1&&(d=l-h,o+=d,l=h),{x1:o,y1:s,w:l,h:f,xOffset:d}}},{key:"getDebugInfo",value:function(){var r=[],n=$n(this.collections),a;try{for(n.s();!(a=n.n()).done;){var i=yr(a.value,2),o=i[0],s=i[1],l=s.getCounts(),f=l.keyCount,d=l.atlasCount;r.push({type:o,keyCount:f,atlasCount:d})}}catch(h){n.e(h)}finally{n.f()}return r}}])}(),Gc=0,LR=1,NR=2,Fm=3,BR=4,RF=function(){function t(e,r,n){Li(this,t),this.r=e,this.gl=r,this.maxInstances=n.webglBatchSize,this.atlasSize=n.webglTexSize,this.bgColor=n.bgColor,this.debug=n.webglDebug,this.batchDebugInfo=[],n.enableWrapping=!0,n.createTextureCanvas=vF,this.atlasManager=new AF(e,n),this.program=this.createShaderProgram(Al.SCREEN),this.pickingProgram=this.createShaderProgram(Al.PICKING),this.vao=this.createVAO()}return Ni(t,[{key:"addAtlasCollection",value:function(r,n){this.atlasManager.addAtlasCollection(r,n)}},{key:"addAtlasRenderType",value:function(r,n){this.atlasManager.addRenderType(r,n)}},{key:"invalidate",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.type,i=this.atlasManager;return a?i.invalidate(r,{filterType:function(s){return s===a},forceRedraw:!0}):i.invalidate(r)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"createShaderProgram",value:function(r){var n=this.gl,a=`#version 300 es precision highp float; uniform mat3 uPanZoomMatrix; uniform int uAtlasSize; // instanced in vec2 aPosition; in mat3 aTransform; // what are we rendering? in int aVertType; // for picking in vec4 aIndex; // For textures in int aAtlasId; // which shader unit/atlas to use in vec4 aTex; // x/y/w/h of texture in atlas // for edges in vec4 aPointAPointB; in vec4 aPointCPointD; in float aLineWidth; in vec4 aColor; out vec2 vTexCoord; out vec4 vColor; flat out int vAtlasId; flat out vec4 vIndex; flat out int vVertType; void main(void) { int vid = gl_VertexID; vec2 position = aPosition; if(aVertType == `.concat(Gc,`) { float texX = aTex.x; float texY = aTex.y; float texW = aTex.z; float texH = aTex.w; int vid = gl_VertexID; if(vid == 1 || vid == 2 || vid == 4) { texX += texW; } if(vid == 2 || vid == 4 || vid == 5) { texY += texH; } float d = float(uAtlasSize); vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1 gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); } else if(aVertType == `).concat(BR,`) { gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); vColor = aColor; } else if(aVertType == `).concat(LR,`) { vec2 source = aPointAPointB.xy; vec2 target = aPointAPointB.zw; // adjust the geometry so that the line is centered on the edge position.y = position.y - 0.5; vec2 xBasis = target - source; vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x)); vec2 point = source + xBasis * position.x + yBasis * aLineWidth * position.y; gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0); vColor = aColor; } else if(aVertType == `).concat(NR,`) { vec2 pointA = aPointAPointB.xy; vec2 pointB = aPointAPointB.zw; vec2 pointC = aPointCPointD.xy; vec2 pointD = aPointCPointD.zw; // adjust the geometry so that the line is centered on the edge position.y = position.y - 0.5; vec2 p0 = pointA; vec2 p1 = pointB; vec2 p2 = pointC; vec2 pos = position; if(position.x == 1.0) { p0 = pointD; p1 = pointC; p2 = pointB; pos = vec2(0.0, -position.y); } vec2 p01 = p1 - p0; vec2 p12 = p2 - p1; vec2 p21 = p1 - p2; // Find the normal vector. vec2 tangent = normalize(normalize(p12) + normalize(p01)); vec2 normal = vec2(-tangent.y, tangent.x); // Find the vector perpendicular to p0 -> p1. vec2 p01Norm = normalize(vec2(-p01.y, p01.x)); // Determine the bend direction. float sigma = sign(dot(p01 + p21, normal)); float width = aLineWidth; if(sign(pos.y) == -sigma) { // This is an intersecting vertex. Adjust the position so that there's no overlap. vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm); gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); } else { // This is a non-intersecting vertex. Treat it like a mitre join. vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm); gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); } vColor = aColor; } else if(aVertType == `).concat(Fm,` && vid < 3) { // massage the first triangle into an edge arrow if(vid == 0) position = vec2(-0.15, -0.3); if(vid == 1) position = vec2( 0.0, 0.0); if(vid == 2) position = vec2( 0.15, -0.3); gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); vColor = aColor; } else { gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space } vAtlasId = aAtlasId; vIndex = aIndex; vVertType = aVertType; } `),i=this.atlasManager.getIndexArray(),o=`#version 300 es precision highp float; // define texture unit for each node in the batch `.concat(i.map(function(f){return"uniform sampler2D uTexture".concat(f,";")}).join(` `),` uniform vec4 uBGColor; in vec2 vTexCoord; in vec4 vColor; flat in int vAtlasId; flat in vec4 vIndex; flat in int vVertType; out vec4 outColor; void main(void) { if(vVertType == `).concat(Gc,`) { `).concat(i.map(function(f){return"if(vAtlasId == ".concat(f,") outColor = texture(uTexture").concat(f,", vTexCoord);")}).join(` else `),` } else if(vVertType == `).concat(Fm,`) { // blend arrow color with background (using premultiplied alpha) outColor.rgb = vColor.rgb + (uBGColor.rgb * (1.0 - vColor.a)); outColor.a = 1.0; // make opaque, masks out line under arrow } else { outColor = vColor; } `).concat(r.picking?`if(outColor.a == 0.0) discard; else outColor = vIndex;`:"",` } `),s=hF(n,a,o);s.aPosition=n.getAttribLocation(s,"aPosition"),s.aIndex=n.getAttribLocation(s,"aIndex"),s.aVertType=n.getAttribLocation(s,"aVertType"),s.aTransform=n.getAttribLocation(s,"aTransform"),s.aAtlasId=n.getAttribLocation(s,"aAtlasId"),s.aTex=n.getAttribLocation(s,"aTex"),s.aPointAPointB=n.getAttribLocation(s,"aPointAPointB"),s.aPointCPointD=n.getAttribLocation(s,"aPointCPointD"),s.aLineWidth=n.getAttribLocation(s,"aLineWidth"),s.aColor=n.getAttribLocation(s,"aColor"),s.uPanZoomMatrix=n.getUniformLocation(s,"uPanZoomMatrix"),s.uAtlasSize=n.getUniformLocation(s,"uAtlasSize"),s.uBGColor=n.getUniformLocation(s,"uBGColor"),s.uTextures=[];for(var l=0;l1&&arguments[1]!==void 0?arguments[1]:Al.SCREEN;this.panZoomMatrix=r,this.renderTarget=n,this.batchDebugInfo=[],this.wrappedCount=0,this.rectangleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.atlasManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"getTempMatrix",value:function(){return this.tempMatrix=this.tempMatrix||pd()}},{key:"drawTexture",value:function(r,n,a){var i=this.atlasManager;if(r.visible()&&i.getRenderTypeOpts(a).isVisible(r)){i.canAddToCurrentBatch(r,a)||this.endBatch(),this.instanceCount+1>=this.maxInstances&&this.endBatch();var o=this.instanceCount;this.vertTypeBuffer.getView(o)[0]=Gc;var s=this.indexBuffer.getView(o);mu(n,s);var l=i.getAtlasInfo(r,a),f=l.index,d=l.tex1,h=l.tex2;h.w>0&&this.wrappedCount++;for(var g=!0,p=0,y=[d,h];p=this.maxInstances&&this.endBatch()}}},{key:"drawSimpleRectangle",value:function(r,n,a){if(r.visible()){var i=this.atlasManager,o=this.instanceCount;this.vertTypeBuffer.getView(o)[0]=BR;var s=this.indexBuffer.getView(o);mu(n,s);var l=r.pstyle("background-color").value,f=r.pstyle("background-opacity").value,d=this.colorBuffer.getView(o);ul(l,f,d);var h=this.transformBuffer.getMatrixView(o);i.setTransformMatrix(r,h,a),this.rectangleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"drawEdgeArrow",value:function(r,n,a){if(r.visible()){var i=r._private.rscratch,o,s,l;if(a==="source"?(o=i.arrowStartX,s=i.arrowStartY,l=i.srcArrowAngle):(o=i.arrowEndX,s=i.arrowEndY,l=i.tgtArrowAngle),!(isNaN(o)||o==null||isNaN(s)||s==null||isNaN(l)||l==null)){var f=r.pstyle(a+"-arrow-shape").value;if(f!=="none"){var d=r.pstyle(a+"-arrow-color").value,h=r.pstyle("opacity").value,g=r.pstyle("line-opacity").value,p=h*g,y=r.pstyle("width").pfValue,b=r.pstyle("arrow-scale").value,w=this.r.getArrowWidth(y,b),x=this.instanceCount,E=this.transformBuffer.getMatrixView(x);Y8(E),Id(E,E,[o,s]),q2(E,E,[w,w]),X8(E,E,l),this.vertTypeBuffer.getView(x)[0]=Fm;var S=this.indexBuffer.getView(x);mu(n,S);var C=this.colorBuffer.getView(x);ul(d,p,C),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(r,n){if(r.visible()){var a=this.getEdgePoints(r);if(a){var i=r.pstyle("opacity").value,o=r.pstyle("line-opacity").value,s=r.pstyle("width").pfValue,l=r.pstyle("line-color").value,f=i*o;if(a.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),a.length==4){var d=this.instanceCount;this.vertTypeBuffer.getView(d)[0]=LR;var h=this.indexBuffer.getView(d);mu(n,h);var g=this.colorBuffer.getView(d);ul(l,f,g);var p=this.lineWidthBuffer.getView(d);p[0]=s;var y=this.pointAPointBBuffer.getView(d);y[0]=a[0],y[1]=a[1],y[2]=a[2],y[3]=a[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var b=0;b=this.maxInstances&&this.endBatch()}}}}},{key:"getEdgePoints",value:function(r){var n=r._private.rscratch;if(!(n.badLine||n.allpts==null||isNaN(n.allpts[0]))){var a=n.allpts;if(a.length==4)return a;var i=this.getNumSegments(r);return this.getCurveSegmentPoints(a,i)}}},{key:"getNumSegments",value:function(r){var n=15;return Math.min(Math.max(n,5),this.maxInstances)}},{key:"getCurveSegmentPoints",value:function(r,n){if(r.length==4)return r;for(var a=Array((n+1)*2),i=0;i<=n;i++)if(i==0)a[0]=r[0],a[1]=r[1];else if(i==n)a[i*2]=r[r.length-2],a[i*2+1]=r[r.length-1];else{var o=i/n;this.setCurvePoint(r,o,a,i*2)}return a}},{key:"setCurvePoint",value:function(r,n,a,i){if(r.length<=2)a[i]=r[0],a[i+1]=r[1];else{for(var o=Array(r.length-2),s=0;s0}},{key:"getStyle",value:function(r,n){var a=n.pstyle("".concat(r,"-opacity")).value,i=n.pstyle("".concat(r,"-color")).value,o=n.pstyle("".concat(r,"-shape")).value;return{opacity:a,color:i,shape:o}}},{key:"getPadding",value:function(r,n){return n.pstyle("".concat(r,"-padding")).pfValue}},{key:"draw",value:function(r,n,a,i){if(this.isVisible(r,a)){var o=this.r,s=i.w,l=i.h,f=s/2,d=l/2,h=this.getStyle(r,a),g=h.shape,p=h.color,y=h.opacity;n.save(),n.fillStyle=qR(p,y),g==="round-rectangle"||g==="roundrectangle"?o.drawRoundRectanglePath(n,f,d,s,l,"auto"):g==="ellipse"&&o.drawEllipsePath(n,f,d,s,l),n.fill(),n.restore()}}}])}(),K8={};K8.initWebgl=function(t,e){var r=this,n=r.data.contexts[r.WEBGL];t.bgColor=OF(r),t.webglTexSize=Math.min(t.webglTexSize,n.getParameter(n.MAX_TEXTURE_SIZE)),t.webglTexRows=Math.min(t.webglTexRows,54),t.webglTexRowsNodes=Math.min(t.webglTexRowsNodes,54),t.webglBatchSize=Math.min(t.webglBatchSize,16384),t.webglTexPerBatch=Math.min(t.webglTexPerBatch,n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS)),r.webglDebug=t.webglDebug,r.webglDebugShowAtlases=t.webglDebugShowAtlases,r.pickingFrameBuffer=xF(n),r.pickingFrameBuffer.needsDraw=!0;var a=function(f){return function(d){return r.getTextAngle(d,f)}},i=function(f){return function(d){var h=d.pstyle(f);return h&&h.value}};r.drawing=new RF(r,n,t);var o=new MF(r);r.drawing.addAtlasCollection("node",kR({texRows:t.webglTexRowsNodes})),r.drawing.addAtlasCollection("label",kR({texRows:t.webglTexRows})),r.drawing.addAtlasRenderType("node-body",yu({collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement})),r.drawing.addAtlasRenderType("label",yu({collection:"label",getKey:e.getLabelKey,getBoundingBox:e.getLabelBox,drawElement:e.drawLabel,getRotation:a(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:i("label")})),r.drawing.addAtlasRenderType("node-overlay",yu({collection:"node",getBoundingBox:e.getElementBox,getKey:function(f){return o.getStyleKey("overlay",f)},drawElement:function(f,d,h){return o.draw("overlay",f,d,h)},isVisible:function(f){return o.isVisible("overlay",f)},getPadding:function(f){return o.getPadding("overlay",f)}})),r.drawing.addAtlasRenderType("node-underlay",yu({collection:"node",getBoundingBox:e.getElementBox,getKey:function(f){return o.getStyleKey("underlay",f)},drawElement:function(f,d,h){return o.draw("underlay",f,d,h)},isVisible:function(f){return o.isVisible("underlay",f)},getPadding:function(f){return o.getPadding("underlay",f)}})),r.drawing.addAtlasRenderType("edge-source-label",yu({collection:"label",getKey:e.getSourceLabelKey,getBoundingBox:e.getSourceLabelBox,drawElement:e.drawSourceLabel,getRotation:a("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:i("source-label")})),r.drawing.addAtlasRenderType("edge-target-label",yu({collection:"label",getKey:e.getTargetLabelKey,getBoundingBox:e.getTargetLabelBox,drawElement:e.drawTargetLabel,getRotation:a("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:i("target-label")}));var s=nf(function(){console.log("garbage collect flag set"),r.data.gc=!0},1e4);r.onUpdateEleCalcs(function(l,f){var d=!1;f&&f.length>0&&(d|=r.drawing.invalidate(f)),d&&s()}),DF(r)};function OF(t){var e=t.cy.container(),r=e&&e.style&&e.style.backgroundColor||"white";return wL(r)}function DF(t){{var e=t.render;t.render=function(i){i=i||{};var o=t.cy;t.webgl&&(o.zoom()>I8?(kF(t),e.call(t,i)):(LF(t),Z8(t,i,Al.SCREEN)))}}{var r=t.matchCanvasSize;t.matchCanvasSize=function(i){r.call(t,i),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0}}t.findNearestElements=function(i,o,s,l){return IF(t,i,o)};{var n=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){n.call(t),t.pickingFrameBuffer.needsDraw=!0}}{var a=t.notify;t.notify=function(i,o){a.call(t,i,o),i==="viewport"||i==="bounds"?t.pickingFrameBuffer.needsDraw=!0:i==="background"&&t.drawing.invalidate(o,{type:"node-body"})}}}function kF(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function LF(t){var e=function(n){n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,t.canvasWidth,t.canvasHeight),n.restore()};e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}function NF(t){var e=t.canvasWidth,r=t.canvasHeight,n=B2(t),a=n.pan,i=n.zoom,o=pd();Id(o,o,[a.x,a.y]),q2(o,o,[i,i]);var s=pd();EF(s,e,r);var l=pd();return _F(l,s,o),l}function j8(t,e){var r=t.canvasWidth,n=t.canvasHeight,a=B2(t),i=a.pan,o=a.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,r,n),e.translate(i.x,i.y),e.scale(o,o)}function BF(t,e){t.drawSelectionRectangle(e,function(r){return j8(t,r)})}function qF(t){var e=t.data.contexts[t.NODE];e.save(),j8(t,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function PF(t){var e=function(a,i,o){for(var s=a.atlasManager.getAtlasCollection(i),l=t.data.contexts[t.NODE],f=.125,d=s.atlases,h=0;h=0&&C.add(M)}return C}function IF(t,e,r){var n=zF(t,e,r),a=t.getCachedZSortedEles(),i,o,s=$n(n),l;try{for(s.s();!(l=s.n()).done;){var f=l.value,d=a[f];if(!i&&d.isNode()&&(i=d),!o&&d.isEdge()&&(o=d),i&&o)break}}catch(h){s.e(h)}finally{s.f()}return[i,o].filter(Boolean)}function VF(t){return t.pstyle("shape").value==="rectangle"&&t.pstyle("background-fill").value==="solid"&&t.pstyle("border-width").pfValue===0&&t.pstyle("background-image").strValue==="none"}function Hm(t,e,r){var n=t.drawing;e+=1,r.isNode()?(n.drawTexture(r,e,"node-underlay"),VF(r)?n.drawSimpleRectangle(r,e,"node-body"):n.drawTexture(r,e,"node-body"),n.drawTexture(r,e,"label"),n.drawTexture(r,e,"node-overlay")):(n.drawEdgeLine(r,e),n.drawEdgeArrow(r,e,"source"),n.drawEdgeArrow(r,e,"target"),n.drawTexture(r,e,"label"),n.drawTexture(r,e,"edge-source-label"),n.drawTexture(r,e,"edge-target-label"))}function Z8(t,e,r){var n;t.webglDebug&&(n=performance.now());var a=t.drawing,i=0;if(r.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&BF(t,e),t.data.canvasNeedsRedraw[t.NODE]||r.picking){var o=t.data.contexts[t.WEBGL];r.screen?(o.clearColor(0,0,0,0),o.enable(o.BLEND),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.disable(o.BLEND),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT),o.viewport(0,0,o.canvas.width,o.canvas.height);var s=NF(t),l=t.getCachedZSortedEles();if(i=l.length,a.startFrame(s,r),r.screen){for(var f=0;f0&&o>0){p.clearRect(0,0,i,o),p.globalCompositeOperation="source-over";var y=this.getCachedZSortedEles();if(t.full)p.translate(-n.x1*f,-n.y1*f),p.scale(f,f),this.drawElements(p,y),p.scale(1/f,1/f),p.translate(n.x1*f,n.y1*f);else{var b=e.pan(),w={x:b.x*f,y:b.y*f};f*=e.zoom(),p.translate(w.x,w.y),p.scale(f,f),this.drawElements(p,y),p.scale(1/f,1/f),p.translate(-w.x,-w.y)}t.bg&&(p.globalCompositeOperation="destination-over",p.fillStyle=t.bg,p.rect(0,0,i,o),p.fill())}return g};function $F(t,e){for(var r=atob(t),n=new ArrayBuffer(r.length),a=new Uint8Array(n),i=0;i"u"?"undefined":lr(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(t,e);else{var n=this.cy.window(),a=n.document;r=a.createElement("canvas"),r.width=t,r.height=e}return r};[$8,pa,Ka,N2,Oo,Wu,$r,K8,qi,ff,J8].forEach(function(t){Xe(rt,t)});var UF=[{name:"null",impl:A8},{name:"base",impl:P8},{name:"canvas",impl:FF}],GF=[{type:"layout",extensions:S$},{type:"renderer",extensions:UF}],t6={},r6={};function n6(t,e,r){var n=r,a=function(R){yt("Can not register `"+e+"` for `"+t+"` since `"+R+"` already exists in the prototype and can not be overridden")};if(t==="core"){if(Pl.prototype[e])return a(e);Pl.prototype[e]=r}else if(t==="collection"){if(Ar.prototype[e])return a(e);Ar.prototype[e]=r}else if(t==="layout"){for(var i=function(R){this.options=R,r.call(this,R),st(this._private)||(this._private={}),this._private.cy=R.cy,this._private.listeners=[],this.createEmitter()},o=i.prototype=Object.create(r.prototype),s=[],l=0;l-1}return jm=e,jm}var Zm,YR;function JF(){if(YR)return Zm;YR=1;var t=Dh();function e(r,n){var a=this.__data__,i=t(a,r);return i<0?(++this.size,a.push([r,n])):a[i][1]=n,this}return Zm=e,Zm}var Qm,XR;function kh(){if(XR)return Qm;XR=1;var t=jF(),e=ZF(),r=QF(),n=WF(),a=JF();function i(o){var s=-1,l=o==null?0:o.length;for(this.clear();++s-1&&n%1==0&&n-1&&r%1==0&&r<=t}return Yy=e,Yy}var Xy,UM;function CH(){if(UM)return Xy;UM=1;var t=Do(),e=$2(),r=ma(),n="[object Arguments]",a="[object Array]",i="[object Boolean]",o="[object Date]",s="[object Error]",l="[object Function]",f="[object Map]",d="[object Number]",h="[object Object]",g="[object RegExp]",p="[object Set]",y="[object String]",b="[object WeakMap]",w="[object ArrayBuffer]",x="[object DataView]",E="[object Float32Array]",S="[object Float64Array]",C="[object Int8Array]",A="[object Int16Array]",D="[object Int32Array]",M="[object Uint8Array]",R="[object Uint8ClampedArray]",O="[object Uint16Array]",B="[object Uint32Array]",k={};k[E]=k[S]=k[C]=k[A]=k[D]=k[M]=k[R]=k[O]=k[B]=!0,k[n]=k[a]=k[w]=k[i]=k[x]=k[o]=k[s]=k[l]=k[f]=k[d]=k[h]=k[g]=k[p]=k[y]=k[b]=!1;function N(L){return r(L)&&e(L.length)&&!!k[t(L)]}return Xy=N,Xy}var Ky,GM;function Ih(){if(GM)return Ky;GM=1;function t(e){return function(r){return e(r)}}return Ky=t,Ky}var wl={exports:{}};wl.exports;var YM;function F2(){return YM||(YM=1,function(t,e){var r=i6(),n=e&&!e.nodeType&&e,a=n&&!0&&t&&!t.nodeType&&t,i=a&&a.exports===n,o=i&&r.process,s=function(){try{var l=a&&a.require&&a.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();t.exports=s}(wl,wl.exports)),wl.exports}var jy,XM;function vf(){if(XM)return jy;XM=1;var t=CH(),e=Ih(),r=F2(),n=r&&r.isTypedArray,a=n?e(n):t;return jy=a,jy}var Zy,KM;function s6(){if(KM)return Zy;KM=1;var t=EH(),e=hf(),r=tr(),n=ts(),a=zh(),i=vf(),o=Object.prototype,s=o.hasOwnProperty;function l(f,d){var h=r(f),g=!h&&e(f),p=!h&&!g&&n(f),y=!h&&!g&&!p&&i(f),b=h||g||p||y,w=b?t(f.length,String):[],x=w.length;for(var E in f)(d||s.call(f,E))&&!(b&&(E=="length"||p&&(E=="offset"||E=="parent")||y&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||a(E,x)))&&w.push(E);return w}return Zy=l,Zy}var Qy,jM;function Vh(){if(jM)return Qy;jM=1;var t=Object.prototype;function e(r){var n=r&&r.constructor,a=typeof n=="function"&&n.prototype||t;return r===a}return Qy=e,Qy}var Wy,ZM;function l6(){if(ZM)return Wy;ZM=1;function t(e,r){return function(n){return e(r(n))}}return Wy=t,Wy}var Jy,QM;function AH(){if(QM)return Jy;QM=1;var t=l6(),e=t(Object.keys,Object);return Jy=e,Jy}var e0,WM;function H2(){if(WM)return e0;WM=1;var t=Vh(),e=AH(),r=Object.prototype,n=r.hasOwnProperty;function a(i){if(!t(i))return e(i);var o=[];for(var s in Object(i))n.call(i,s)&&s!="constructor"&&o.push(s);return o}return e0=a,e0}var t0,JM;function ja(){if(JM)return t0;JM=1;var t=cf(),e=$2();function r(n){return n!=null&&e(n.length)&&!t(n)}return t0=r,t0}var r0,e5;function Pi(){if(e5)return r0;e5=1;var t=s6(),e=H2(),r=ja();function n(a){return r(a)?t(a):e(a)}return r0=n,r0}var n0,t5;function RH(){if(t5)return n0;t5=1;var t=df(),e=Pi();function r(n,a){return n&&t(a,e(a),n)}return n0=r,n0}var a0,r5;function MH(){if(r5)return a0;r5=1;function t(e){var r=[];if(e!=null)for(var n in Object(e))r.push(n);return r}return a0=t,a0}var i0,n5;function OH(){if(n5)return i0;n5=1;var t=On(),e=Vh(),r=MH(),n=Object.prototype,a=n.hasOwnProperty;function i(o){if(!t(o))return r(o);var s=e(o),l=[];for(var f in o)f=="constructor"&&(s||!a.call(o,f))||l.push(f);return l}return i0=i,i0}var o0,a5;function Lo(){if(a5)return o0;a5=1;var t=s6(),e=OH(),r=ja();function n(a){return r(a)?t(a,!0):e(a)}return o0=n,o0}var u0,i5;function DH(){if(i5)return u0;i5=1;var t=df(),e=Lo();function r(n,a){return n&&t(a,e(a),n)}return u0=r,u0}var xl={exports:{}};xl.exports;var o5;function f6(){return o5||(o5=1,function(t,e){var r=Gn(),n=e&&!e.nodeType&&e,a=n&&!0&&t&&!t.nodeType&&t,i=a&&a.exports===n,o=i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;function l(f,d){if(d)return f.slice();var h=f.length,g=s?s(h):new f.constructor(h);return f.copy(g),g}t.exports=l}(xl,xl.exports)),xl.exports}var s0,u5;function c6(){if(u5)return s0;u5=1;function t(e,r){var n=-1,a=e.length;for(r||(r=Array(a));++np))return!1;var b=h.get(o),w=h.get(s);if(b&&w)return b==s&&w==o;var x=-1,E=!0,S=l&a?new t:void 0;for(h.set(o,s),h.set(s,o);++x0&&i(d)?a>1?r(d,a-1,i,o,s):t(s,d):o||(s[s.length]=d)}return s}return Jb=r,Jb}var e1,JO;function RU(){if(JO)return e1;JO=1;function t(e,r,n){switch(n.length){case 0:return e.call(r);case 1:return e.call(r,n[0]);case 2:return e.call(r,n[0],n[1]);case 3:return e.call(r,n[0],n[1],n[2])}return e.apply(r,n)}return e1=t,e1}var t1,eD;function F6(){if(eD)return t1;eD=1;var t=RU(),e=Math.max;function r(n,a,i){return a=e(a===void 0?n.length-1:a,0),function(){for(var o=arguments,s=-1,l=e(o.length-a,0),f=Array(l);++s0){if(++i>=t)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return n1=n,n1}var a1,nD;function H6(){if(nD)return a1;nD=1;var t=MU(),e=OU(),r=e(t);return a1=r,a1}var i1,aD;function Yh(){if(aD)return i1;aD=1;var t=No(),e=F6(),r=H6();function n(a,i){return r(e(a,i,t),a+"")}return i1=n,i1}var o1,iD;function U6(){if(iD)return o1;iD=1;function t(e,r,n,a){for(var i=e.length,o=n+(a?1:-1);a?o--:++o-1}return f1=e,f1}var c1,fD;function BU(){if(fD)return c1;fD=1;function t(e,r,n){for(var a=-1,i=e==null?0:e.length;++a=o){var x=f?null:a(l);if(x)return i(x);y=!1,g=n,w=new t}else w=f?[]:b;e:for(;++h1?p.setNode(y,h):p.setNode(y)}),this},a.prototype.setNode=function(d,h){return t.has(this._nodes,d)?(arguments.length>1&&(this._nodes[d]=h),this):(this._nodes[d]=arguments.length>1?h:this._defaultNodeLabelFn(d),this._isCompound&&(this._parent[d]=r,this._children[d]={},this._children[r][d]=!0),this._in[d]={},this._preds[d]={},this._out[d]={},this._sucs[d]={},++this._nodeCount,this)},a.prototype.node=function(d){return this._nodes[d]},a.prototype.hasNode=function(d){return t.has(this._nodes,d)},a.prototype.removeNode=function(d){var h=this;if(t.has(this._nodes,d)){var g=function(p){h.removeEdge(h._edgeObjs[p])};delete this._nodes[d],this._isCompound&&(this._removeFromParentsChildList(d),delete this._parent[d],t.each(this.children(d),function(p){h.setParent(p)}),delete this._children[d]),t.each(t.keys(this._in[d]),g),delete this._in[d],delete this._preds[d],t.each(t.keys(this._out[d]),g),delete this._out[d],delete this._sucs[d],--this._nodeCount}return this},a.prototype.setParent=function(d,h){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(t.isUndefined(h))h=r;else{h+="";for(var g=h;!t.isUndefined(g);g=this.parent(g))if(g===d)throw new Error("Setting "+h+" as parent of "+d+" would create a cycle");this.setNode(h)}return this.setNode(d),this._removeFromParentsChildList(d),this._parent[d]=h,this._children[h][d]=!0,this},a.prototype._removeFromParentsChildList=function(d){delete this._children[this._parent[d]][d]},a.prototype.parent=function(d){if(this._isCompound){var h=this._parent[d];if(h!==r)return h}},a.prototype.children=function(d){if(t.isUndefined(d)&&(d=r),this._isCompound){var h=this._children[d];if(h)return t.keys(h)}else{if(d===r)return this.nodes();if(this.hasNode(d))return[]}},a.prototype.predecessors=function(d){var h=this._preds[d];if(h)return t.keys(h)},a.prototype.successors=function(d){var h=this._sucs[d];if(h)return t.keys(h)},a.prototype.neighbors=function(d){var h=this.predecessors(d);if(h)return t.union(h,this.successors(d))},a.prototype.isLeaf=function(d){var h;return this.isDirected()?h=this.successors(d):h=this.neighbors(d),h.length===0},a.prototype.filterNodes=function(d){var h=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});h.setGraph(this.graph());var g=this;t.each(this._nodes,function(b,w){d(w)&&h.setNode(w,b)}),t.each(this._edgeObjs,function(b){h.hasNode(b.v)&&h.hasNode(b.w)&&h.setEdge(b,g.edge(b))});var p={};function y(b){var w=g.parent(b);return w===void 0||h.hasNode(w)?(p[b]=w,w):w in p?p[w]:y(w)}return this._isCompound&&t.each(h.nodes(),function(b){h.setParent(b,y(b))}),h},a.prototype.setDefaultEdgeLabel=function(d){return t.isFunction(d)||(d=t.constant(d)),this._defaultEdgeLabelFn=d,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return t.values(this._edgeObjs)},a.prototype.setPath=function(d,h){var g=this,p=arguments;return t.reduce(d,function(y,b){return p.length>1?g.setEdge(y,b,h):g.setEdge(y,b),b}),this},a.prototype.setEdge=function(){var d,h,g,p,y=!1,b=arguments[0];typeof b=="object"&&b!==null&&"v"in b?(d=b.v,h=b.w,g=b.name,arguments.length===2&&(p=arguments[1],y=!0)):(d=b,h=arguments[1],g=arguments[3],arguments.length>2&&(p=arguments[2],y=!0)),d=""+d,h=""+h,t.isUndefined(g)||(g=""+g);var w=s(this._isDirected,d,h,g);if(t.has(this._edgeLabels,w))return y&&(this._edgeLabels[w]=p),this;if(!t.isUndefined(g)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(d),this.setNode(h),this._edgeLabels[w]=y?p:this._defaultEdgeLabelFn(d,h,g);var x=l(this._isDirected,d,h,g);return d=x.v,h=x.w,Object.freeze(x),this._edgeObjs[w]=x,i(this._preds[h],d),i(this._sucs[d],h),this._in[h][w]=x,this._out[d][w]=x,this._edgeCount++,this},a.prototype.edge=function(d,h,g){var p=arguments.length===1?f(this._isDirected,arguments[0]):s(this._isDirected,d,h,g);return this._edgeLabels[p]},a.prototype.hasEdge=function(d,h,g){var p=arguments.length===1?f(this._isDirected,arguments[0]):s(this._isDirected,d,h,g);return t.has(this._edgeLabels,p)},a.prototype.removeEdge=function(d,h,g){var p=arguments.length===1?f(this._isDirected,arguments[0]):s(this._isDirected,d,h,g),y=this._edgeObjs[p];return y&&(d=y.v,h=y.w,delete this._edgeLabels[p],delete this._edgeObjs[p],o(this._preds[h],d),o(this._sucs[d],h),delete this._in[h][p],delete this._out[d][p],this._edgeCount--),this},a.prototype.inEdges=function(d,h){var g=this._in[d];if(g){var p=t.values(g);return h?t.filter(p,function(y){return y.v===h}):p}},a.prototype.outEdges=function(d,h){var g=this._out[d];if(g){var p=t.values(g);return h?t.filter(p,function(y){return y.w===h}):p}},a.prototype.nodeEdges=function(d,h){var g=this.inEdges(d,h);if(g)return g.concat(this.outEdges(d,h))};function i(d,h){d[h]?d[h]++:d[h]=1}function o(d,h){--d[h]||delete d[h]}function s(d,h,g,p){var y=""+h,b=""+g;if(!d&&y>b){var w=y;y=b,b=w}return y+n+b+n+(t.isUndefined(p)?e:p)}function l(d,h,g,p){var y=""+h,b=""+g;if(!d&&y>b){var w=y;y=b,b=w}var x={v:y,w:b};return p&&(x.name=p),x}function f(d,h){return s(d,h.v,h.w,h.name)}return w1}var x1,wD;function $U(){return wD||(wD=1,x1="2.1.8"),x1}var _1,xD;function FU(){return xD||(xD=1,_1={Graph:J2(),version:$U()}),_1}var E1,_D;function HU(){if(_D)return E1;_D=1;var t=Dn(),e=J2();E1={write:r,read:i};function r(o){var s={options:{directed:o.isDirected(),multigraph:o.isMultigraph(),compound:o.isCompound()},nodes:n(o),edges:a(o)};return t.isUndefined(o.graph())||(s.value=t.clone(o.graph())),s}function n(o){return t.map(o.nodes(),function(s){var l=o.node(s),f=o.parent(s),d={v:s};return t.isUndefined(l)||(d.value=l),t.isUndefined(f)||(d.parent=f),d})}function a(o){return t.map(o.edges(),function(s){var l=o.edge(s),f={v:s.v,w:s.w};return t.isUndefined(s.name)||(f.name=s.name),t.isUndefined(l)||(f.value=l),f})}function i(o){var s=new e(o.options).setGraph(o.value);return t.each(o.nodes,function(l){s.setNode(l.v,l.value),l.parent&&s.setParent(l.v,l.parent)}),t.each(o.edges,function(l){s.setEdge({v:l.v,w:l.w,name:l.name},l.value)}),s}return E1}var S1,ED;function UU(){if(ED)return S1;ED=1;var t=Dn();S1=e;function e(r){var n={},a=[],i;function o(s){t.has(n,s)||(n[s]=!0,i.push(s),t.each(r.successors(s),o),t.each(r.predecessors(s),o))}return t.each(r.nodes(),function(s){i=[],o(s),i.length&&a.push(i)}),a}return S1}var T1,SD;function X6(){if(SD)return T1;SD=1;var t=Dn();T1=e;function e(){this._arr=[],this._keyIndices={}}return e.prototype.size=function(){return this._arr.length},e.prototype.keys=function(){return this._arr.map(function(r){return r.key})},e.prototype.has=function(r){return t.has(this._keyIndices,r)},e.prototype.priority=function(r){var n=this._keyIndices[r];if(n!==void 0)return this._arr[n].priority},e.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},e.prototype.add=function(r,n){var a=this._keyIndices;if(r=String(r),!t.has(a,r)){var i=this._arr,o=i.length;return a[r]=o,i.push({key:r,priority:n}),this._decrease(o),!0}return!1},e.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var r=this._arr.pop();return delete this._keyIndices[r.key],this._heapify(0),r.key},e.prototype.decrease=function(r,n){var a=this._keyIndices[r];if(n>this._arr[a].priority)throw new Error("New priority is greater than current priority. Key: "+r+" Old: "+this._arr[a].priority+" New: "+n);this._arr[a].priority=n,this._decrease(a)},e.prototype._heapify=function(r){var n=this._arr,a=2*r,i=a+1,o=r;a>1,!(n[i].priority0&&(h=d.removeMin(),g=f[h],g.distance!==Number.POSITIVE_INFINITY);)l(h).forEach(p);return f}return C1}var A1,CD;function GU(){if(CD)return A1;CD=1;var t=K6(),e=Dn();A1=r;function r(n,a,i){return e.transform(n.nodes(),function(o,s){o[s]=t(n,s,a,i)},{})}return A1}var R1,AD;function j6(){if(AD)return R1;AD=1;var t=Dn();R1=e;function e(r){var n=0,a=[],i={},o=[];function s(l){var f=i[l]={onStack:!0,lowlink:n,index:n++};if(a.push(l),r.successors(l).forEach(function(g){t.has(i,g)?i[g].onStack&&(f.lowlink=Math.min(f.lowlink,i[g].index)):(s(g),f.lowlink=Math.min(f.lowlink,i[g].lowlink))}),f.lowlink===f.index){var d=[],h;do h=a.pop(),i[h].onStack=!1,d.push(h);while(l!==h);o.push(d)}}return r.nodes().forEach(function(l){t.has(i,l)||s(l)}),o}return R1}var M1,RD;function YU(){if(RD)return M1;RD=1;var t=Dn(),e=j6();M1=r;function r(n){return t.filter(e(n),function(a){return a.length>1||a.length===1&&n.hasEdge(a[0],a[0])})}return M1}var O1,MD;function XU(){if(MD)return O1;MD=1;var t=Dn();O1=r;var e=t.constant(1);function r(a,i,o){return n(a,i||e,o||function(s){return a.outEdges(s)})}function n(a,i,o){var s={},l=a.nodes();return l.forEach(function(f){s[f]={},s[f][f]={distance:0},l.forEach(function(d){f!==d&&(s[f][d]={distance:Number.POSITIVE_INFINITY})}),o(f).forEach(function(d){var h=d.v===f?d.w:d.v,g=i(d);s[f][h]={distance:g,predecessor:f}})}),l.forEach(function(f){var d=s[f];l.forEach(function(h){var g=s[h];l.forEach(function(p){var y=g[f],b=d[p],w=g[p],x=y.distance+b.distance;x0;){if(f=l.removeMin(),t.has(s,f))o.setEdge(f,s[f]);else{if(h)throw new Error("Input graph is not connected: "+a);h=!0}a.nodeEdges(f).forEach(d)}return o}return q1}var P1,qD;function WU(){return qD||(qD=1,P1={components:UU(),dijkstra:K6(),dijkstraAll:GU(),findCycles:YU(),floydWarshall:XU(),isAcyclic:KU(),postorder:jU(),preorder:ZU(),prim:QU(),tarjan:j6(),topsort:Z6()}),P1}var z1,PD;function JU(){if(PD)return z1;PD=1;var t=FU();return z1={Graph:t.Graph,json:HU(),alg:WU(),version:t.version},z1}var I1,zD;function Un(){if(zD)return I1;zD=1;var t;if(typeof P2=="function")try{t=JU()}catch{}return t||(t=window.graphlib),I1=t,I1}var V1,ID;function eG(){if(ID)return V1;ID=1;var t=_6(),e=1,r=4;function n(a){return t(a,e|r)}return V1=n,V1}var $1,VD;function Xh(){if(VD)return $1;VD=1;var t=Ju(),e=ja(),r=zh(),n=On();function a(i,o,s){if(!n(s))return!1;var l=typeof o;return(l=="number"?e(s)&&r(o,s.length):l=="string"&&o in s)?t(s[o],i):!1}return $1=a,$1}var F1,$D;function tG(){if($D)return F1;$D=1;var t=Yh(),e=Ju(),r=Xh(),n=Lo(),a=Object.prototype,i=a.hasOwnProperty,o=t(function(s,l){s=Object(s);var f=-1,d=l.length,h=d>2?l[2]:void 0;for(h&&r(l[0],l[1],h)&&(d=1);++f-1?l[f?i[d]:d]:void 0}}return H1=n,H1}var U1,HD;function nG(){if(HD)return U1;HD=1;var t=/\s/;function e(r){for(var n=r.length;n--&&t.test(r.charAt(n)););return n}return U1=e,U1}var G1,UD;function aG(){if(UD)return G1;UD=1;var t=nG(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return G1=r,G1}var Y1,GD;function iG(){if(GD)return Y1;GD=1;var t=aG(),e=On(),r=ns(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function l(f){if(typeof f=="number")return f;if(r(f))return n;if(e(f)){var d=typeof f.valueOf=="function"?f.valueOf():f;f=e(d)?d+"":d}if(typeof f!="string")return f===0?f:+f;f=t(f);var h=i.test(f);return h||o.test(f)?s(f.slice(2),h?2:8):a.test(f)?n:+f}return Y1=l,Y1}var X1,YD;function W6(){if(YD)return X1;YD=1;var t=iG(),e=1/0,r=17976931348623157e292;function n(a){if(!a)return a===0?a:0;if(a=t(a),a===e||a===-1/0){var i=a<0?-1:1;return i*r}return a===a?a:0}return X1=n,X1}var K1,XD;function oG(){if(XD)return K1;XD=1;var t=W6();function e(r){var n=t(r),a=n%1;return n===n?a?n-a:n:0}return K1=e,K1}var j1,KD;function uG(){if(KD)return j1;KD=1;var t=U6(),e=Za(),r=oG(),n=Math.max;function a(i,o,s){var l=i==null?0:i.length;if(!l)return-1;var f=s==null?0:r(s);return f<0&&(f=n(l+f,0)),t(i,e(o,3),f)}return j1=a,j1}var Z1,jD;function sG(){if(jD)return Z1;jD=1;var t=rG(),e=uG(),r=t(e);return Z1=r,Z1}var Q1,ZD;function J6(){if(ZD)return Q1;ZD=1;var t=W2();function e(r){var n=r==null?0:r.length;return n?t(r,1):[]}return Q1=e,Q1}var W1,QD;function lG(){if(QD)return W1;QD=1;var t=K2(),e=E6(),r=Lo();function n(a,i){return a==null?a:t(a,e(i),r)}return W1=n,W1}var J1,WD;function fG(){if(WD)return J1;WD=1;function t(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}return J1=t,J1}var ew,JD;function cG(){if(JD)return ew;JD=1;var t=qh(),e=j2(),r=Za();function n(a,i){var o={};return i=r(i,3),e(a,function(s,l,f){t(o,l,i(s,l,f))}),o}return ew=n,ew}var tw,e3;function e_(){if(e3)return tw;e3=1;var t=ns();function e(r,n,a){for(var i=-1,o=r.length;++ir}return rw=t,rw}var nw,r3;function hG(){if(r3)return nw;r3=1;var t=e_(),e=dG(),r=No();function n(a){return a&&a.length?t(a,r,e):void 0}return nw=n,nw}var aw,n3;function eN(){if(n3)return aw;n3=1;var t=qh(),e=Ju();function r(n,a,i){(i!==void 0&&!e(n[a],i)||i===void 0&&!(a in n))&&t(n,a,i)}return aw=r,aw}var iw,a3;function vG(){if(a3)return iw;a3=1;var t=Do(),e=$h(),r=ma(),n="[object Object]",a=Function.prototype,i=Object.prototype,o=a.toString,s=i.hasOwnProperty,l=o.call(Object);function f(d){if(!r(d)||t(d)!=n)return!1;var h=e(d);if(h===null)return!0;var g=s.call(h,"constructor")&&h.constructor;return typeof g=="function"&&g instanceof g&&o.call(g)==l}return iw=f,iw}var ow,i3;function tN(){if(i3)return ow;i3=1;function t(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}return ow=t,ow}var uw,o3;function gG(){if(o3)return uw;o3=1;var t=df(),e=Lo();function r(n){return t(n,e(n))}return uw=r,uw}var sw,u3;function pG(){if(u3)return sw;u3=1;var t=eN(),e=f6(),r=b6(),n=c6(),a=x6(),i=hf(),o=tr(),s=G6(),l=ts(),f=cf(),d=On(),h=vG(),g=vf(),p=tN(),y=gG();function b(w,x,E,S,C,A,D){var M=p(w,E),R=p(x,E),O=D.get(R);if(O){t(w,E,O);return}var B=A?A(M,R,E+"",w,x,D):void 0,k=B===void 0;if(k){var N=o(R),L=!N&&l(R),q=!N&&!L&&g(R);B=R,N||L||q?o(M)?B=M:s(M)?B=n(M):L?(k=!1,B=e(R,!0)):q?(k=!1,B=r(R,!0)):B=[]:h(R)||i(R)?(B=M,i(M)?B=y(M):(!d(M)||f(M))&&(B=a(R))):k=!1}k&&(D.set(R,B),C(B,R,S,A,D),D.delete(R)),t(w,E,B)}return sw=b,sw}var lw,s3;function mG(){if(s3)return lw;s3=1;var t=Bh(),e=eN(),r=K2(),n=pG(),a=On(),i=Lo(),o=tN();function s(l,f,d,h,g){l!==f&&r(f,function(p,y){if(g||(g=new t),a(p))n(l,f,y,d,s,h,g);else{var b=h?h(o(l,y),p,y+"",l,f,g):void 0;b===void 0&&(b=p),e(l,y,b)}},i)}return lw=s,lw}var fw,l3;function yG(){if(l3)return fw;l3=1;var t=Yh(),e=Xh();function r(n){return t(function(a,i){var o=-1,s=i.length,l=s>1?i[s-1]:void 0,f=s>2?i[2]:void 0;for(l=n.length>3&&typeof l=="function"?(s--,l):void 0,f&&e(i[0],i[1],f)&&(l=s<3?void 0:l,s=1),a=Object(a);++on||s&&l&&d&&!f&&!h||i&&l&&d||!a&&d||!o)return 1;if(!i&&!s&&!h&&r=f)return d;var h=a[i];return d*(h=="desc"?-1:1)}}return r.index-n.index}return Cw=e,Cw}var Aw,A3;function NG(){if(A3)return Aw;A3=1;var t=Hh(),e=Gh(),r=Za(),n=I6(),a=DG(),i=Ih(),o=LG(),s=No(),l=tr();function f(d,h,g){h.length?h=t(h,function(b){return l(b)?function(w){return e(w,b.length===1?b[0]:b)}:b}):h=[s];var p=-1;h=t(h,i(r));var y=n(d,function(b,w,x){var E=t(h,function(S){return S(b)});return{criteria:E,index:++p,value:b}});return a(y,function(b,w){return o(b,w,g)})}return Aw=f,Aw}var Rw,R3;function BG(){if(R3)return Rw;R3=1;var t=W2(),e=NG(),r=Yh(),n=Xh(),a=r(function(i,o){if(i==null)return[];var s=o.length;return s>1&&n(i,o[0],o[1])?o=[]:s>2&&n(o[0],o[1],o[2])&&(o=[o[0]]),e(i,t(o,1),[])});return Rw=a,Rw}var Mw,M3;function qG(){if(M3)return Mw;M3=1;var t=k6(),e=0;function r(n){var a=++e;return t(n)+a}return Mw=r,Mw}var Ow,O3;function PG(){if(O3)return Ow;O3=1;function t(e,r,n){for(var a=-1,i=e.length,o=r.length,s={};++a0;--w)if(b=d[w].dequeue(),b){g=g.concat(o(f,d,h,b,!0));break}}}return g}function o(f,d,h,g,p){var y=p?[]:void 0;return t.forEach(f.inEdges(g.v),function(b){var w=f.edge(b),x=f.node(b.v);p&&y.push({v:b.v,w:b.w}),x.out-=w,l(d,h,x)}),t.forEach(f.outEdges(g.v),function(b){var w=f.edge(b),x=b.w,E=f.node(x);E.in-=w,l(d,h,E)}),f.removeNode(g.v),y}function s(f,d){var h=new e,g=0,p=0;t.forEach(f.nodes(),function(w){h.setNode(w,{v:w,in:0,out:0})}),t.forEach(f.edges(),function(w){var x=h.edge(w.v,w.w)||0,E=d(w),S=x+E;h.setEdge(w.v,w.w,S),p=Math.max(p,h.node(w.v).out+=E),g=Math.max(g,h.node(w.w).in+=E)});var y=t.range(p+g+3).map(function(){return new r}),b=g+1;return t.forEach(h.nodes(),function(w){l(y,b,h.node(w))}),{graph:h,buckets:y,zeroIdx:b}}function l(f,d,h){h.out?h.in?f[h.out-h.in+d].enqueue(h):f[f.length-1].enqueue(h):f[0].enqueue(h)}return Nw}var Bw,B3;function $G(){if(B3)return Bw;B3=1;var t=Lt(),e=VG();Bw={run:r,undo:a};function r(i){var o=i.graph().acyclicer==="greedy"?e(i,s(i)):n(i);t.forEach(o,function(l){var f=i.edge(l);i.removeEdge(l),f.forwardName=l.name,f.reversed=!0,i.setEdge(l.w,l.v,f,t.uniqueId("rev"))});function s(l){return function(f){return l.edge(f).weight}}}function n(i){var o=[],s={},l={};function f(d){t.has(l,d)||(l[d]=!0,s[d]=!0,t.forEach(i.outEdges(d),function(h){t.has(s,h.w)?o.push(h):f(h.w)}),delete s[d])}return t.forEach(i.nodes(),f),o}function a(i){t.forEach(i.edges(),function(o){var s=i.edge(o);if(s.reversed){i.removeEdge(o);var l=s.forwardName;delete s.reversed,delete s.forwardName,i.setEdge(o.w,o.v,s,l)}})}return Bw}var qw,q3;function Kr(){if(q3)return qw;q3=1;var t=Lt(),e=Un().Graph;qw={addDummyNode:r,simplify:n,asNonCompoundGraph:a,successorWeights:i,predecessorWeights:o,intersectRect:s,buildLayerMatrix:l,normalizeRanks:f,removeEmptyRanks:d,addBorderNode:h,maxRank:g,partition:p,time:y,notime:b};function r(w,x,E,S){var C;do C=t.uniqueId(S);while(w.hasNode(C));return E.dummy=x,w.setNode(C,E),C}function n(w){var x=new e().setGraph(w.graph());return t.forEach(w.nodes(),function(E){x.setNode(E,w.node(E))}),t.forEach(w.edges(),function(E){var S=x.edge(E.v,E.w)||{weight:0,minlen:1},C=w.edge(E);x.setEdge(E.v,E.w,{weight:S.weight+C.weight,minlen:Math.max(S.minlen,C.minlen)})}),x}function a(w){var x=new e({multigraph:w.isMultigraph()}).setGraph(w.graph());return t.forEach(w.nodes(),function(E){w.children(E).length||x.setNode(E,w.node(E))}),t.forEach(w.edges(),function(E){x.setEdge(E,w.edge(E))}),x}function i(w){var x=t.map(w.nodes(),function(E){var S={};return t.forEach(w.outEdges(E),function(C){S[C.w]=(S[C.w]||0)+w.edge(C).weight}),S});return t.zipObject(w.nodes(),x)}function o(w){var x=t.map(w.nodes(),function(E){var S={};return t.forEach(w.inEdges(E),function(C){S[C.v]=(S[C.v]||0)+w.edge(C).weight}),S});return t.zipObject(w.nodes(),x)}function s(w,x){var E=w.x,S=w.y,C=x.x-E,A=x.y-S,D=w.width/2,M=w.height/2;if(!C&&!A)throw new Error("Not possible to find intersection inside of the rectangle");var R,O;return Math.abs(A)*D>Math.abs(C)*M?(A<0&&(M=-M),R=M*C/A,O=M):(C<0&&(D=-D),R=D,O=D*A/C),{x:E+R,y:S+O}}function l(w){var x=t.map(t.range(g(w)+1),function(){return[]});return t.forEach(w.nodes(),function(E){var S=w.node(E),C=S.rank;t.isUndefined(C)||(x[C][S.order]=E)}),x}function f(w){var x=t.min(t.map(w.nodes(),function(E){return w.node(E).rank}));t.forEach(w.nodes(),function(E){var S=w.node(E);t.has(S,"rank")&&(S.rank-=x)})}function d(w){var x=t.min(t.map(w.nodes(),function(A){return w.node(A).rank})),E=[];t.forEach(w.nodes(),function(A){var D=w.node(A).rank-x;E[D]||(E[D]=[]),E[D].push(A)});var S=0,C=w.graph().nodeRankFactor;t.forEach(E,function(A,D){t.isUndefined(A)&&D%C!==0?--S:S&&t.forEach(A,function(M){w.node(M).rank+=S})})}function h(w,x,E,S){var C={width:0,height:0};return arguments.length>=4&&(C.rank=E,C.order=S),r(w,"border",C,x)}function g(w){return t.max(t.map(w.nodes(),function(x){var E=w.node(x).rank;if(!t.isUndefined(E))return E}))}function p(w,x){var E={lhs:[],rhs:[]};return t.forEach(w,function(S){x(S)?E.lhs.push(S):E.rhs.push(S)}),E}function y(w,x){var E=t.now();try{return x()}finally{console.log(w+" time: "+(t.now()-E)+"ms")}}function b(w,x){return x()}return qw}var Pw,P3;function FG(){if(P3)return Pw;P3=1;var t=Lt(),e=Kr();Pw={run:r,undo:a};function r(i){i.graph().dummyChains=[],t.forEach(i.edges(),function(o){n(i,o)})}function n(i,o){var s=o.v,l=i.node(s).rank,f=o.w,d=i.node(f).rank,h=o.name,g=i.edge(o),p=g.labelRank;if(d!==l+1){i.removeEdge(o);var y,b,w;for(w=0,++l;lO.lim&&(B=O,k=!0);var N=t.filter(C.edges(),function(L){return k===E(S,S.node(L.v),B)&&k!==E(S,S.node(L.w),B)});return t.minBy(N,function(L){return r(C,L)})}function b(S,C,A,D){var M=A.v,R=A.w;S.removeEdge(M,R),S.setEdge(D.v,D.w,{}),h(S),l(S,C),w(S,C)}function w(S,C){var A=t.find(S.nodes(),function(M){return!C.node(M).parent}),D=a(S,A);D=D.slice(1),t.forEach(D,function(M){var R=S.node(M).parent,O=C.edge(M,R),B=!1;O||(O=C.edge(R,M),B=!0),C.node(M).rank=C.node(R).rank+(B?O.minlen:-O.minlen)})}function x(S,C,A){return S.hasEdge(C,A)}function E(S,C,A){return A.low<=C.lim&&C.lim<=A.lim}return Vw}var $w,$3;function UG(){if($3)return $w;$3=1;var t=$d(),e=t.longestPath,r=nN(),n=HG();$w=a;function a(l){switch(l.graph().ranker){case"network-simplex":s(l);break;case"tight-tree":o(l);break;case"longest-path":i(l);break;default:s(l)}}var i=e;function o(l){e(l),r(l)}function s(l){n(l)}return $w}var Fw,F3;function GG(){if(F3)return Fw;F3=1;var t=Lt();Fw=e;function e(a){var i=n(a);t.forEach(a.graph().dummyChains,function(o){for(var s=a.node(o),l=s.edgeObj,f=r(a,i,l.v,l.w),d=f.path,h=f.lca,g=0,p=d[g],y=!0;o!==l.w;){if(s=a.node(o),y){for(;(p=d[g])!==h&&a.node(p).maxRankd||h>i[g].lim));for(p=g,g=s;(g=a.parent(g))!==p;)f.push(g);return{path:l.concat(f.reverse()),lca:p}}function n(a){var i={},o=0;function s(l){var f=o;t.forEach(a.children(l),s),i[l]={low:f,lim:o++}}return t.forEach(a.children(),s),i}return Fw}var Hw,H3;function YG(){if(H3)return Hw;H3=1;var t=Lt(),e=Kr();Hw={run:r,cleanup:o};function r(s){var l=e.addDummyNode(s,"root",{},"_root"),f=a(s),d=t.max(t.values(f))-1,h=2*d+1;s.graph().nestingRoot=l,t.forEach(s.edges(),function(p){s.edge(p).minlen*=h});var g=i(s)+1;t.forEach(s.children(),function(p){n(s,l,h,g,d,f,p)}),s.graph().nodeRankFactor=h}function n(s,l,f,d,h,g,p){var y=s.children(p);if(!y.length){p!==l&&s.setEdge(l,p,{weight:0,minlen:f});return}var b=e.addBorderNode(s,"_bt"),w=e.addBorderNode(s,"_bb"),x=s.node(p);s.setParent(b,p),x.borderTop=b,s.setParent(w,p),x.borderBottom=w,t.forEach(y,function(E){n(s,l,f,d,h,g,E);var S=s.node(E),C=S.borderTop?S.borderTop:E,A=S.borderBottom?S.borderBottom:E,D=S.borderTop?d:2*d,M=C!==A?1:h-g[p]+1;s.setEdge(b,C,{weight:D,minlen:M,nestingEdge:!0}),s.setEdge(A,w,{weight:D,minlen:M,nestingEdge:!0})}),s.parent(p)||s.setEdge(l,b,{weight:0,minlen:h+g[p]})}function a(s){var l={};function f(d,h){var g=s.children(d);g&&g.length&&t.forEach(g,function(p){f(p,h+1)}),l[d]=h}return t.forEach(s.children(),function(d){f(d,1)}),l}function i(s){return t.reduce(s.edges(),function(l,f){return l+s.edge(f).weight},0)}function o(s){var l=s.graph();s.removeNode(l.nestingRoot),delete l.nestingRoot,t.forEach(s.edges(),function(f){var d=s.edge(f);d.nestingEdge&&s.removeEdge(f)})}return Hw}var Uw,U3;function XG(){if(U3)return Uw;U3=1;var t=Lt(),e=Kr();Uw=r;function r(a){function i(o){var s=a.children(o),l=a.node(o);if(s.length&&t.forEach(s,i),t.has(l,"minRank")){l.borderLeft=[],l.borderRight=[];for(var f=l.minRank,d=l.maxRank+1;f0;)p%2&&(y+=d[p+1]),p=p-1>>1,d[p]+=g.weight;h+=g.weight*y})),h}return Xw}var Kw,K3;function QG(){if(K3)return Kw;K3=1;var t=Lt();Kw=e;function e(r,n){return t.map(n,function(a){var i=r.inEdges(a);if(i.length){var o=t.reduce(i,function(s,l){var f=r.edge(l),d=r.node(l.v);return{sum:s.sum+f.weight*d.order,weight:s.weight+f.weight}},{sum:0,weight:0});return{v:a,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:a}})}return Kw}var jw,j3;function WG(){if(j3)return jw;j3=1;var t=Lt();jw=e;function e(a,i){var o={};t.forEach(a,function(l,f){var d=o[l.v]={indegree:0,in:[],out:[],vs:[l.v],i:f};t.isUndefined(l.barycenter)||(d.barycenter=l.barycenter,d.weight=l.weight)}),t.forEach(i.edges(),function(l){var f=o[l.v],d=o[l.w];!t.isUndefined(f)&&!t.isUndefined(d)&&(d.indegree++,f.out.push(o[l.w]))});var s=t.filter(o,function(l){return!l.indegree});return r(s)}function r(a){var i=[];function o(f){return function(d){d.merged||(t.isUndefined(d.barycenter)||t.isUndefined(f.barycenter)||d.barycenter>=f.barycenter)&&n(f,d)}}function s(f){return function(d){d.in.push(f),--d.indegree===0&&a.push(d)}}for(;a.length;){var l=a.pop();i.push(l),t.forEach(l.in.reverse(),o(l)),t.forEach(l.out,s(l))}return t.map(t.filter(i,function(f){return!f.merged}),function(f){return t.pick(f,["vs","i","barycenter","weight"])})}function n(a,i){var o=0,s=0;a.weight&&(o+=a.barycenter*a.weight,s+=a.weight),i.weight&&(o+=i.barycenter*i.weight,s+=i.weight),a.vs=i.vs.concat(a.vs),a.barycenter=o/s,a.weight=s,a.i=Math.min(i.i,a.i),i.merged=!0}return jw}var Zw,Z3;function JG(){if(Z3)return Zw;Z3=1;var t=Lt(),e=Kr();Zw=r;function r(i,o){var s=e.partition(i,function(b){return t.has(b,"barycenter")}),l=s.lhs,f=t.sortBy(s.rhs,function(b){return-b.i}),d=[],h=0,g=0,p=0;l.sort(a(!!o)),p=n(d,f,p),t.forEach(l,function(b){p+=b.vs.length,d.push(b.vs),h+=b.barycenter*b.weight,g+=b.weight,p=n(d,f,p)});var y={vs:t.flatten(d,!0)};return g&&(y.barycenter=h/g,y.weight=g),y}function n(i,o,s){for(var l;o.length&&(l=t.last(o)).i<=s;)o.pop(),i.push(l.vs),s++;return s}function a(i){return function(o,s){return o.barycenters.barycenter?1:i?s.i-o.i:o.i-s.i}}return Zw}var Qw,Q3;function eY(){if(Q3)return Qw;Q3=1;var t=Lt(),e=QG(),r=WG(),n=JG();Qw=a;function a(s,l,f,d){var h=s.children(l),g=s.node(l),p=g?g.borderLeft:void 0,y=g?g.borderRight:void 0,b={};p&&(h=t.filter(h,function(A){return A!==p&&A!==y}));var w=e(s,h);t.forEach(w,function(A){if(s.children(A.v).length){var D=a(s,A.v,f,d);b[A.v]=D,t.has(D,"barycenter")&&o(A,D)}});var x=r(w,f);i(x,b);var E=n(x,d);if(p&&(E.vs=t.flatten([p,E.vs,y],!0),s.predecessors(p).length)){var S=s.node(s.predecessors(p)[0]),C=s.node(s.predecessors(y)[0]);t.has(E,"barycenter")||(E.barycenter=0,E.weight=0),E.barycenter=(E.barycenter*E.weight+S.order+C.order)/(E.weight+2),E.weight+=2}return E}function i(s,l){t.forEach(s,function(f){f.vs=t.flatten(f.vs.map(function(d){return l[d]?l[d].vs:d}),!0)})}function o(s,l){t.isUndefined(s.barycenter)?(s.barycenter=l.barycenter,s.weight=l.weight):(s.barycenter=(s.barycenter*s.weight+l.barycenter*l.weight)/(s.weight+l.weight),s.weight+=l.weight)}return Qw}var Ww,W3;function tY(){if(W3)return Ww;W3=1;var t=Lt(),e=Un().Graph;Ww=r;function r(a,i,o){var s=n(a),l=new e({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(f){return a.node(f)});return t.forEach(a.nodes(),function(f){var d=a.node(f),h=a.parent(f);(d.rank===i||d.minRank<=i&&i<=d.maxRank)&&(l.setNode(f),l.setParent(f,h||s),t.forEach(a[o](f),function(g){var p=g.v===f?g.w:g.v,y=l.edge(p,f),b=t.isUndefined(y)?0:y.weight;l.setEdge(p,f,{weight:a.edge(g).weight+b})}),t.has(d,"minRank")&&l.setNode(f,{borderLeft:d.borderLeft[i],borderRight:d.borderRight[i]}))}),l}function n(a){for(var i;a.hasNode(i=t.uniqueId("_root")););return i}return Ww}var Jw,J3;function rY(){if(J3)return Jw;J3=1;var t=Lt();Jw=e;function e(r,n,a){var i={},o;t.forEach(a,function(s){for(var l=r.parent(s),f,d;l;){if(f=r.parent(l),f?(d=i[f],i[f]=l):(d=o,o=l),d&&d!==l){n.setEdge(d,l);return}l=f}})}return Jw}var ex,ek;function nY(){if(ek)return ex;ek=1;var t=Lt(),e=jG(),r=ZG(),n=eY(),a=tY(),i=rY(),o=Un().Graph,s=Kr();ex=l;function l(g){var p=s.maxRank(g),y=f(g,t.range(1,p+1),"inEdges"),b=f(g,t.range(p-1,-1,-1),"outEdges"),w=e(g);h(g,w);for(var x=Number.POSITIVE_INFINITY,E,S=0,C=0;C<4;++S,++C){d(S%2?y:b,S%4>=2),w=s.buildLayerMatrix(g);var A=r(g,w);AB)&&o(S,L,k)})})}function A(D,M){var R=-1,O,B=0;return t.forEach(M,function(k,N){if(x.node(k).dummy==="border"){var L=x.predecessors(k);L.length&&(O=x.node(L[0]).order,C(M,B,N,R,O),B=N,R=O)}C(M,B,M.length,O,D.length)}),M}return t.reduce(E,A),S}function i(x,E){if(x.node(E).dummy)return t.find(x.predecessors(E),function(S){return x.node(S).dummy})}function o(x,E,S){if(E>S){var C=E;E=S,S=C}var A=x[E];A||(x[E]=A={}),A[S]=!0}function s(x,E,S){if(E>S){var C=E;E=S,S=C}return t.has(x[E],S)}function l(x,E,S,C){var A={},D={},M={};return t.forEach(E,function(R){t.forEach(R,function(O,B){A[O]=O,D[O]=O,M[O]=B})}),t.forEach(E,function(R){var O=-1;t.forEach(R,function(B){var k=C(B);if(k.length){k=t.sortBy(k,function(P){return M[P]});for(var N=(k.length-1)/2,L=Math.floor(N),q=Math.ceil(N);L<=q;++L){var V=k[L];D[B]===B&&O1?o-1:0),l=1;l=this.R))return this.merge(h.a,h.b,f),!0}},l.prototype.nEdges=function(f,d){var h=f.incoming.intersection(d.incoming),g=f.outgoing.intersection(d.outgoing);return this.R-h.count()-g.count()},l.prototype.getGroupHierarchy=function(f){var d=this,h=[],g={};r(this.roots[0],g,h);var p=this.allEdges();return p.forEach(function(y){var b=d.modules[y.source],w=d.modules[y.target];f.push(new t(typeof b.gid>"u"?y.source:h[b.gid],typeof w.gid>"u"?y.target:h[w.gid],y.type))}),h},l.prototype.allEdges=function(){var f=[];return l.getEdges(this.roots[0],f),f},l.getEdges=function(f,d){f.forAll(function(h){h.getEdges(d),l.getEdges(h.children,d)})},l}();Ia.Configuration=e;function r(l,f,d){l.forAll(function(h){if(h.isLeaf())f.leaves||(f.leaves=[]),f.leaves.push(h.id);else{var g=f;if(h.gid=d.length,!h.isIsland()||h.isPredefined()){if(g={id:h.gid},h.isPredefined())for(var p in h.definition)g[p]=h.definition[p];f.groups||(f.groups=[]),f.groups.push(h.gid),d.push(g)}r(h.children,g,d)}})}var n=function(){function l(f,d,h,g,p){d===void 0&&(d=new o),h===void 0&&(h=new o),g===void 0&&(g=new i),this.id=f,this.outgoing=d,this.incoming=h,this.children=g,this.definition=p}return l.prototype.getEdges=function(f){var d=this;this.outgoing.forAll(function(h,g){h.forAll(function(p){f.push(new t(d.id,p.id,g))})})},l.prototype.isLeaf=function(){return this.children.count()===0},l.prototype.isIsland=function(){return this.outgoing.count()===0&&this.incoming.count()===0},l.prototype.isPredefined=function(){return typeof this.definition<"u"},l}();Ia.Module=n;function a(l,f){var d={};for(var h in l)h in f&&(d[h]=l[h]);return d}var i=function(){function l(){this.table={}}return l.prototype.count=function(){return Object.keys(this.table).length},l.prototype.intersection=function(f){var d=new l;return d.table=a(this.table,f.table),d},l.prototype.intersectionCount=function(f){return this.intersection(f).count()},l.prototype.contains=function(f){return f in this.table},l.prototype.add=function(f){this.table[f.id]=f},l.prototype.remove=function(f){delete this.table[f.id]},l.prototype.forAll=function(f){for(var d in this.table)f(this.table[d])},l.prototype.modules=function(){var f=[];return this.forAll(function(d){d.isPredefined()||f.push(d)}),f},l}();Ia.ModuleSet=i;var o=function(){function l(){this.sets={},this.n=0}return l.prototype.count=function(){return this.n},l.prototype.contains=function(f){var d=!1;return this.forAllModules(function(h){!d&&h.id==f&&(d=!0)}),d},l.prototype.add=function(f,d){var h=f in this.sets?this.sets[f]:this.sets[f]=new i;h.add(d),++this.n},l.prototype.remove=function(f,d){var h=this.sets[f];h.remove(d),h.count()===0&&delete this.sets[f],--this.n},l.prototype.forAll=function(f){for(var d in this.sets)f(this.sets[d],Number(d))},l.prototype.forAllModules=function(f){this.forAll(function(d,h){return d.forAll(f)})},l.prototype.intersection=function(f){var d=new l;return this.forAll(function(h,g){if(g in f.sets){var p=h.intersection(f.sets[g]),y=p.count();y>0&&(d.sets[g]=p,d.n+=y)}}),d},l}();Ia.LinkSets=o;function s(l,f,d,h){for(var g=l.length,p=new e(g,f,d,h);p.greedyMerge(););var y=[],b=p.getGroupHierarchy(y);return y.forEach(function(w){var x=function(E){var S=w[E];typeof S=="number"&&(w[E]=l[S])};x("source"),x("target")}),{groups:b,powerEdges:y}}return Ia.getGroups=s,Ia}var so={},lk;function t_(){if(lk)return so;lk=1,Object.defineProperty(so,"__esModule",{value:!0});function t(l,f){var d={};for(var h in l)d[h]={};for(var h in f)d[h]={};return Object.keys(d).length}function e(l,f){var d=0;for(var h in l)typeof f[h]<"u"&&++d;return d}function r(l,f){var d={},h=function(g,p){typeof d[g]>"u"&&(d[g]={}),d[g][p]={}};return l.forEach(function(g){var p=f.getSourceIndex(g),y=f.getTargetIndex(g);h(p,y),h(y,p)}),d}function n(l,f,d,h){var g=r(l,h);l.forEach(function(p){var y=g[h.getSourceIndex(p)],b=g[h.getTargetIndex(p)];h.setLength(p,1+f*d(y,b))})}function a(l,f,d){d===void 0&&(d=1),n(l,d,function(h,g){return Math.sqrt(t(h,g)-e(h,g))},f)}so.symmetricDiffLinkLengths=a;function i(l,f,d){d===void 0&&(d=1),n(l,d,function(h,g){return Math.min(Object.keys(h).length,Object.keys(g).length)<1.1?0:e(h,g)/t(h,g)},f)}so.jaccardLinkLengths=i;function o(l,f,d,h){var g=s(l,f,h),p={};g.forEach(function(b,w){return b.forEach(function(x){return p[x]=w})});var y=[];return f.forEach(function(b){var w=h.getSourceIndex(b),x=h.getTargetIndex(b),E=p[w],S=p[x];E!==S&&y.push({axis:d,left:w,right:x,gap:h.getMinSeparation(b)})}),y}so.generateDirectedEdgeConstraints=o;function s(l,f,d){var h=[],g=0,p=[],y=[];function b(O){O.index=O.lowlink=g++,p.push(O),O.onStack=!0;for(var B=0,k=O.out;B"u"?(b(N),O.lowlink=Math.min(O.lowlink,N.lowlink)):N.onStack&&(O.lowlink=Math.min(O.lowlink,N.index))}if(O.lowlink===O.index){for(var L=[];p.length&&(N=p.pop(),N.onStack=!1,L.push(N),N!==O););y.push(L.map(function(q){return q.id}))}}for(var w=0;w"u"&&b(R)}return y}return so.stronglyConnectedComponents=s,so}var wu={},fk;function r_(){if(fk)return wu;fk=1,Object.defineProperty(wu,"__esModule",{value:!0});var t=function(){function n(){this.locks={}}return n.prototype.add=function(a,i){this.locks[a]=i},n.prototype.clear=function(){this.locks={}},n.prototype.isEmpty=function(){for(var a in this.locks)return!1;return!0},n.prototype.apply=function(a){for(var i in this.locks)a(Number(i),this.locks[i])},n}();wu.Locks=t;var e=function(){function n(a,i,o){o===void 0&&(o=null),this.D=i,this.G=o,this.threshold=1e-4,this.numGridSnapNodes=0,this.snapGridSize=100,this.snapStrength=1e3,this.scaleSnapByMaxH=!1,this.random=new r,this.project=null,this.x=a,this.k=a.length;var s=this.n=a[0].length;this.H=new Array(this.k),this.g=new Array(this.k),this.Hd=new Array(this.k),this.a=new Array(this.k),this.b=new Array(this.k),this.c=new Array(this.k),this.d=new Array(this.k),this.e=new Array(this.k),this.ia=new Array(this.k),this.ib=new Array(this.k),this.xtmp=new Array(this.k),this.locks=new t,this.minD=Number.MAX_VALUE;for(var l=s,f;l--;)for(f=s;--f>l;){var d=i[l][f];d>0&&d1e-9)break;var x=this.offsetDir();for(s=0;s1&&E>S||!isFinite(S)){for(s=0;s1&&(C=1);var A=S*S,D=2*C*(E-S)/(A*E),M=E*E*E,R=2*-C/(A*M);for(isFinite(D)||console.log(D),s=0;s0?q-($+1)*B:q-($-1)*B;-O0;)for(var l=i;l-- >0;)o(s,l)},n.prototype.matrixApply=function(a){n.mApply(this.k,this.n,a)},n.prototype.computeNextPosition=function(a,i){var o=this;this.computeDerivatives(a);var s=this.computeStepSize(this.g);if(this.stepAndProject(a,i,this.g,s),this.project){this.matrixApply(function(f,d){return o.e[f][d]=a[f][d]-i[f][d]});var l=this.computeStepSize(this.e);l=Math.max(.2,Math.min(l,1)),this.stepAndProject(a,i,this.e,l)}},n.prototype.run=function(a){for(var i=Number.MAX_VALUE,o=!1;!o&&a-- >0;){var s=this.rungeKutta();o=Math.abs(i/s-1)>16)/this.range},n.prototype.getNextBetween=function(a,i){return a+this.getNext()*(i-a)},n}();return wu.PseudoRandom=r,wu}var kr={},ea={},ck;function n_(){if(ck)return ea;ck=1,Object.defineProperty(ea,"__esModule",{value:!0});var t=function(){function s(l){this.scale=l,this.AB=0,this.AD=0,this.A2=0}return s.prototype.addVariable=function(l){var f=this.scale/l.scale,d=l.offset/l.scale,h=l.weight;this.AB+=h*f*d,this.AD+=h*f*l.desiredPosition,this.A2+=h*f*f},s.prototype.getPosn=function(){return(this.AD-this.AB)/this.A2},s}();ea.PositionStats=t;var e=function(){function s(l,f,d,h){h===void 0&&(h=!1),this.left=l,this.right=f,this.gap=d,this.equality=h,this.active=!1,this.unsatisfiable=!1,this.left=l,this.right=f,this.gap=d,this.equality=h}return s.prototype.slack=function(){return this.unsatisfiable?Number.MAX_VALUE:this.right.scale*this.right.position()-this.gap-this.left.scale*this.left.position()},s}();ea.Constraint=e;var r=function(){function s(l,f,d){f===void 0&&(f=1),d===void 0&&(d=1),this.desiredPosition=l,this.weight=f,this.scale=d,this.offset=0}return s.prototype.dfdv=function(){return 2*this.weight*(this.position()-this.desiredPosition)},s.prototype.position=function(){return(this.block.ps.scale*this.block.posn+this.offset)/this.scale},s.prototype.visitNeighbours=function(l,f){var d=function(h,g){return h.active&&l!==g&&f(h,g)};this.cOut.forEach(function(h){return d(h,h.right)}),this.cIn.forEach(function(h){return d(h,h.left)})},s}();ea.Variable=r;var n=function(){function s(l){this.vars=[],l.offset=0,this.ps=new t(l.scale),this.addVariable(l)}return s.prototype.addVariable=function(l){l.block=this,this.vars.push(l),this.ps.addVariable(l),this.posn=this.ps.getPosn()},s.prototype.updateWeightedPosition=function(){this.ps.AB=this.ps.AD=this.ps.A2=0;for(var l=0,f=this.vars.length;l=0?this.inactive.push(l):this.bs.merge(l)}}},s.prototype.solve=function(){this.satisfy();for(var l=Number.MAX_VALUE,f=this.bs.cost();Math.abs(l-f)>1e-4;)this.satisfy(),l=f,f=this.bs.cost();return f},s.LAGRANGIAN_TOLERANCE=-1e-4,s.ZERO_UPPERBOUND=-1e-10,s}();ea.Solver=i;function o(s,l,f){for(var d=s.map(function(M){return new r(M.desiredCenter)}),h=[],g=s.length,p=0;p0)}return null}}return i.prototype.clear=function(){this._root=null,this.size=0},i.prototype.find=function(o){for(var s=this._root;s!==null;){var l=this._comparator(o,s.data);if(l===0)return s.data;s=s.get_child(l>0)}return null},i.prototype.lowerBound=function(o){return this._bound(o,this._comparator)},i.prototype.upperBound=function(o){var s=this._comparator;function l(f,d){return s(d,f)}return this._bound(o,l)},i.prototype.min=function(){var o=this._root;if(o===null)return null;for(;o.left!==null;)o=o.left;return o.data},i.prototype.max=function(){var o=this._root;if(o===null)return null;for(;o.right!==null;)o=o.right;return o.data},i.prototype.iterator=function(){return new r(this)},i.prototype.each=function(o){for(var s=this.iterator(),l;(l=s.next())!==null;)o(l)},i.prototype.reach=function(o){for(var s=this.iterator(),l;(l=s.prev())!==null;)o(l)},i.prototype._bound=function(o,s){for(var l=this._root,f=this.iterator();l!==null;){var d=this._comparator(o,l.data);if(d===0)return f._cursor=l,f;f._ancestors.push(l),l=l.get_child(d>0)}for(var h=f._ancestors.length-1;h>=0;--h)if(l=f._ancestors[h],s(o,l.data)>0)return f._cursor=l,f._ancestors.length=h,f;return f._ancestors.length=0,f},i}();_i.TreeBase=e;var r=function(){function i(o){this._tree=o,this._ancestors=[],this._cursor=null}return i.prototype.data=function(){return this._cursor!==null?this._cursor.data:null},i.prototype.next=function(){if(this._cursor===null){var o=this._tree._root;o!==null&&this._minNode(o)}else if(this._cursor.right===null){var s;do if(s=this._cursor,this._ancestors.length)this._cursor=this._ancestors.pop();else{this._cursor=null;break}while(this._cursor.right===s)}else this._ancestors.push(this._cursor),this._minNode(this._cursor.right);return this._cursor!==null?this._cursor.data:null},i.prototype.prev=function(){if(this._cursor===null){var o=this._tree._root;o!==null&&this._maxNode(o)}else if(this._cursor.left===null){var s;do if(s=this._cursor,this._ancestors.length)this._cursor=this._ancestors.pop();else{this._cursor=null;break}while(this._cursor.left===s)}else this._ancestors.push(this._cursor),this._maxNode(this._cursor.left);return this._cursor!==null?this._cursor.data:null},i.prototype._minNode=function(o){for(;o.left!==null;)this._ancestors.push(o),o=o.left;this._cursor=o},i.prototype._maxNode=function(o){for(;o.right!==null;)this._ancestors.push(o),o=o.right;this._cursor=o},i}();_i.Iterator=r;var n=function(){function i(o){this.data=o,this.left=null,this.right=null,this.red=!0}return i.prototype.get_child=function(o){return o?this.right:this.left},i.prototype.set_child=function(o,s){o?this.right=s:this.left=s},i}(),a=function(i){t(o,i);function o(s){var l=i.call(this)||this;return l._root=null,l._comparator=s,l.size=0,l}return o.prototype.insert=function(s){var l=!1;if(this._root===null)this._root=new n(s),l=!0,this.size++;else{var f=new n(void 0),d=!1,h=!1,g=null,p=f,y=null,b=this._root;for(p.right=this._root;;){if(b===null?(b=new n(s),y.set_child(d,b),l=!0,this.size++):o.is_red(b.left)&&o.is_red(b.right)&&(b.red=!0,b.left.red=!1,b.right.red=!1),o.is_red(b)&&o.is_red(y)){var w=p.right===g;b===y.get_child(h)?p.set_child(w,o.single_rotate(g,!h)):p.set_child(w,o.double_rotate(g,!h))}var x=this._comparator(b.data,s);if(x===0)break;h=d,d=x<0,g!==null&&(p=g),g=y,y=b,b=b.get_child(d)}this._root=f.right}return this._root.red=!1,l},o.prototype.remove=function(s){if(this._root===null)return!1;var l=new n(void 0),f=l;f.right=this._root;for(var d=null,h=null,g=null,p=!0;f.get_child(p)!==null;){var y=p;h=d,d=f,f=f.get_child(p);var b=this._comparator(s,f.data);if(p=b>0,b===0&&(g=f),!o.is_red(f)&&!o.is_red(f.get_child(p))){if(o.is_red(f.get_child(!p))){var w=o.single_rotate(f,p);d.set_child(y,w),d=w}else if(!o.is_red(f.get_child(!p))){var x=d.get_child(!y);if(x!==null)if(!o.is_red(x.get_child(!y))&&!o.is_red(x.get_child(y)))d.red=!1,x.red=!0,f.red=!0;else{var E=h.right===d;o.is_red(x.get_child(y))?h.set_child(E,o.double_rotate(d,y)):o.is_red(x.get_child(!y))&&h.set_child(E,o.single_rotate(d,y));var S=h.get_child(E);S.red=!0,f.red=!0,S.left.red=!1,S.right.red=!1}}}}return g!==null&&(g.data=f.data,d.set_child(d.right===f,f.get_child(f.left===null)),this.size--),this._root=l.right,this._root!==null&&(this._root.red=!1),g!==null},o.is_red=function(s){return s!==null&&s.red},o.single_rotate=function(s,l){var f=s.get_child(!l);return s.set_child(!l,f.get_child(l)),f.set_child(l,s),s.red=!0,f.red=!1,f},o.double_rotate=function(s,l){return s.set_child(!l,o.single_rotate(s.get_child(!l),!l)),o.single_rotate(s,l)},o}(e);return _i.RBTree=a,_i}var hk;function pf(){if(hk)return kr;hk=1;var t=kr&&kr.__extends||function(){var R=function(O,B){return R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,N){k.__proto__=N}||function(k,N){for(var L in N)N.hasOwnProperty(L)&&(k[L]=N[L])},R(O,B)};return function(O,B){R(O,B);function k(){this.constructor=O}O.prototype=B===null?Object.create(B):(k.prototype=B.prototype,new k)}}();Object.defineProperty(kr,"__esModule",{value:!0});var e=n_(),r=iN();function n(R){return R.bounds=typeof R.leaves<"u"?R.leaves.reduce(function(O,B){return B.bounds.union(O)},a.empty()):a.empty(),typeof R.groups<"u"&&(R.bounds=R.groups.reduce(function(O,B){return n(B).union(O)},R.bounds)),R.bounds=R.bounds.inflate(R.padding),R.bounds}kr.computeGroupBounds=n;var a=function(){function R(O,B,k,N){this.x=O,this.X=B,this.y=k,this.Y=N}return R.empty=function(){return new R(Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY)},R.prototype.cx=function(){return(this.x+this.X)/2},R.prototype.cy=function(){return(this.y+this.Y)/2},R.prototype.overlapX=function(O){var B=this.cx(),k=O.cx();return B<=k&&O.x0?k[0]:null},R.prototype.vertices=function(){return[{x:this.x,y:this.y},{x:this.X,y:this.y},{x:this.X,y:this.Y},{x:this.x,y:this.Y}]},R.lineIntersection=function(O,B,k,N,L,q,V,P){var $=k-O,F=V-L,Y=N-B,z=P-q,H=z*$-F*Y;if(H==0)return null;var Z=O-L,J=B-q,U=F*J-z*Z,K=U/H,j=$*J-Y*Z,re=j/H;return K>=0&&K<=1&&re>=0&&re<=1?{x:O+K*$,y:B+K*Y}:null},R.prototype.inflate=function(O){return new R(this.x-O,this.X+O,this.y-O,this.Y+O)},R}();kr.Rectangle=a;function i(R,O,B){var k=R.rayIntersection(O.cx(),O.cy())||{x:R.cx(),y:R.cy()},N=O.rayIntersection(R.cx(),R.cy())||{x:O.cx(),y:O.cy()},L=N.x-k.x,q=N.y-k.y,V=Math.sqrt(L*L+q*q),P=V-B;return{sourceIntersection:k,targetIntersection:N,arrowStart:{x:k.x+P*L/V,y:k.y+P*q/V}}}kr.makeEdgeBetween=i;function o(R,O,B){var k=O.rayIntersection(R.x,R.y);k||(k={x:O.cx(),y:O.cy()});var N=k.x-R.x,L=k.y-R.y,q=Math.sqrt(N*N+L*L);return{x:k.x-B*N/q,y:k.y-B*L/q}}kr.makeEdgeTo=o;var s=function(){function R(O,B,k){this.v=O,this.r=B,this.pos=k,this.prev=d(),this.next=d()}return R}(),l=function(){function R(O,B,k){this.isOpen=O,this.v=B,this.pos=k}return R}();function f(R,O){return R.pos>O.pos?1:R.pos=L);var V=new Array(q);for(N=0;N0&&(R[k].insert(L),L[N].insert(R))};B("next","prev"),B("prev","next")}function x(R,O){return y(R,O,h,1e-6)}kr.generateXConstraints=x;function E(R,O){return y(R,O,g,1e-6)}kr.generateYConstraints=E;function S(R){return p(R,h,1e-6)}kr.generateXGroupConstraints=S;function C(R){return p(R,g,1e-6)}kr.generateYGroupConstraints=C;function A(R){var O=R.map(function(N){return new e.Variable(N.cx())}),B=x(R,O),k=new e.Solver(O,B);k.solve(),O.forEach(function(N,L){return R[L].setXCentre(N.position())}),O=R.map(function(N){return new e.Variable(N.cy())}),B=E(R,O),k=new e.Solver(O,B),k.solve(),O.forEach(function(N,L){return R[L].setYCentre(N.position())})}kr.removeOverlaps=A;var D=function(R){t(O,R);function O(B,k){var N=R.call(this,0,k)||this;return N.index=B,N}return O}(e.Variable);kr.IndexedVariable=D;var M=function(){function R(O,B,k,N,L){var q=this;if(k===void 0&&(k=null),N===void 0&&(N=null),L===void 0&&(L=!1),this.nodes=O,this.groups=B,this.rootGroup=k,this.avoidOverlaps=L,this.variables=O.map(function(P,$){return P.variable=new D($,1)}),N&&this.createConstraints(N),L&&k&&typeof k.groups<"u"){O.forEach(function(P){if(!P.width||!P.height){P.bounds=new a(P.x,P.x,P.y,P.y);return}var $=P.width/2,F=P.height/2;P.bounds=new a(P.x-$,P.x+$,P.y-F,P.y+F)}),n(k);var V=O.length;B.forEach(function(P){q.variables[V]=P.minVar=new D(V++,typeof P.stiffness<"u"?P.stiffness:.01),q.variables[V]=P.maxVar=new D(V++,typeof P.stiffness<"u"?P.stiffness:.01)})}}return R.prototype.createSeparation=function(O){return new e.Constraint(this.nodes[O.left].variable,this.nodes[O.right].variable,O.gap,typeof O.equality<"u"?O.equality:!1)},R.prototype.makeFeasible=function(O){var B=this;if(this.avoidOverlaps){var k="x",N="width";O.axis==="x"&&(k="y",N="height");var L=O.offsets.map(function(V){return B.nodes[V.node]}).sort(function(V,P){return V[k]-P[k]}),q=null;L.forEach(function(V){if(q){var P=q[k]+q[N];P>V[k]&&(V[k]=P)}q=V})}},R.prototype.createAlignment=function(O){var B=this,k=this.nodes[O.offsets[0].node].variable;this.makeFeasible(O);var N=O.axis==="x"?this.xConstraints:this.yConstraints;O.offsets.slice(1).forEach(function(L){var q=B.nodes[L.node].variable;N.push(new e.Constraint(k,q,L.offset,!0))})},R.prototype.createConstraints=function(O){var B=this,k=function(N){return typeof N.type>"u"||N.type==="separation"};this.xConstraints=O.filter(function(N){return N.axis==="x"&&k(N)}).map(function(N){return B.createSeparation(N)}),this.yConstraints=O.filter(function(N){return N.axis==="y"&&k(N)}).map(function(N){return B.createSeparation(N)}),O.filter(function(N){return N.type==="alignment"}).forEach(function(N){return B.createAlignment(N)})},R.prototype.setupVariablesAndBounds=function(O,B,k,N){this.nodes.forEach(function(L,q){L.fixed?(L.variable.weight=L.fixedWeight?L.fixedWeight:1e3,k[q]=N(L)):L.variable.weight=1;var V=(L.width||0)/2,P=(L.height||0)/2,$=O[q],F=B[q];L.bounds=new a($-V,$+V,F-P,F+P)})},R.prototype.xProject=function(O,B,k){!this.rootGroup&&!(this.avoidOverlaps||this.xConstraints)||this.project(O,B,O,k,function(N){return N.px},this.xConstraints,S,function(N){return N.bounds.setXCentre(k[N.variable.index]=N.variable.position())},function(N){var L=k[N.minVar.index]=N.minVar.position(),q=k[N.maxVar.index]=N.maxVar.position(),V=N.padding/2;N.bounds.x=L-V,N.bounds.X=q+V})},R.prototype.yProject=function(O,B,k){!this.rootGroup&&!this.yConstraints||this.project(O,B,B,k,function(N){return N.py},this.yConstraints,C,function(N){return N.bounds.setYCentre(k[N.variable.index]=N.variable.position())},function(N){var L=k[N.minVar.index]=N.minVar.position(),q=k[N.maxVar.index]=N.maxVar.position(),V=N.padding/2;N.bounds.y=L-V,N.bounds.Y=q+V})},R.prototype.projectFunctions=function(){var O=this;return[function(B,k,N){return O.xProject(B,k,N)},function(B,k,N){return O.yProject(B,k,N)}]},R.prototype.project=function(O,B,k,N,L,q,V,P,$){this.setupVariablesAndBounds(O,B,N,L),this.rootGroup&&this.avoidOverlaps&&(n(this.rootGroup),q=q.concat(V(this.rootGroup))),this.solve(this.variables,q,k,N),this.nodes.forEach(P),this.rootGroup&&this.avoidOverlaps&&(this.groups.forEach($),n(this.rootGroup))},R.prototype.solve=function(O,B,k,N){var L=new e.Solver(O,B);L.setStartingPositions(k),L.setDesiredPositions(N),L.solve()},R}();return kr.Projection=M,kr}var Yc={},sl={},vk;function oN(){if(vk)return sl;vk=1,Object.defineProperty(sl,"__esModule",{value:!0});var t=function(){function r(n){this.elem=n,this.subheaps=[]}return r.prototype.toString=function(n){for(var a="",i=!1,o=0;ow&&(y.d=w,y.prev=g,l.reduceKey(y.q,y,function(E,S){return E.q=S}))}}return d},i}();return Yc.Calculator=a,Yc}var kt={},pk;function uN(){if(pk)return kt;pk=1;var t=kt&&kt.__extends||function(){var L=function(q,V){return L=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,$){P.__proto__=$}||function(P,$){for(var F in $)$.hasOwnProperty(F)&&(P[F]=$[F])},L(q,V)};return function(q,V){L(q,V);function P(){this.constructor=q}q.prototype=V===null?Object.create(V):(P.prototype=V.prototype,new P)}}();Object.defineProperty(kt,"__esModule",{value:!0});var e=pf(),r=function(){function L(){}return L}();kt.Point=r;var n=function(){function L(q,V,P,$){this.x1=q,this.y1=V,this.x2=P,this.y2=$}return L}();kt.LineSegment=n;var a=function(L){t(q,L);function q(){return L!==null&&L.apply(this,arguments)||this}return q}(r);kt.PolyPoint=a;function i(L,q,V){return(q.x-L.x)*(V.y-L.y)-(V.x-L.x)*(q.y-L.y)}kt.isLeft=i;function o(L,q,V){return i(L,q,V)>0}function s(L,q,V){return i(L,q,V)<0}function l(L){var q=L.slice(0).sort(function(K,j){return K.x!==j.x?j.x-K.x:j.y-K.y}),V=L.length,P,$=0,F=q[0].x;for(P=1;P=0&&q[P].x===J;P--);for(H=P+1,P=Y;++P<=H;)if(!(i(q[$],q[H],q[P])>=0&&P1&&!(i(z[z.length-2],z[z.length-1],q[P])>0);)z.length-=1;P!=$&&z.push(q[P])}Z!=H&&z.push(q[Z]);var U=z.length;for(P=H;--P>=Y;)if(!(i(q[Z],q[Y],q[P])>=0&&P>Y)){for(;z.length>U&&!(i(z[z.length-2],z[z.length-1],q[P])>0);)z.length-=1;P!=$&&z.push(q[P])}}return z}kt.ConvexHull=l;function f(L,q,V){q.slice(0).sort(function(P,$){return Math.atan2(P.y-L.y,P.x-L.x)-Math.atan2($.y-L.y,$.x-L.x)}).forEach(V)}kt.clockwiseRadialSweep=f;function d(L,q){var V=q.slice(0);return V.push(q[0]),{rtan:h(L,V),ltan:g(L,V)}}function h(L,q){var V=q.length-1,P,$,F,Y,z;if(s(L,q[1],q[0])&&!o(L,q[V-1],q[0]))return 0;for(P=0,$=V;;){if($-P===1)return o(L,q[P],q[$])?P:$;if(F=Math.floor((P+$)/2),z=s(L,q[F+1],q[F]),z&&!o(L,q[F-1],q[F]))return F;Y=o(L,q[P+1],q[P]),Y?z||o(L,q[P],q[F])?$=F:P=F:z&&s(L,q[P],q[F])?$=F:P=F}}function g(L,q){var V=q.length-1,P,$,F,Y,z;if(o(L,q[V-1],q[0])&&!s(L,q[1],q[0]))return 0;for(P=0,$=V;;){if($-P===1)return s(L,q[P],q[$])?P:$;if(F=Math.floor((P+$)/2),z=s(L,q[F+1],q[F]),o(L,q[F-1],q[F])&&!z)return F;Y=s(L,q[P+1],q[P]),Y?z?s(L,q[P],q[F])?$=F:P=F:$=F:z?P=F:o(L,q[P],q[F])?$=F:P=F}}function p(L,q,V,P,$,F){var Y,z;Y=V(q[0],L),z=P(L[Y],q);for(var H=!1;!H;){for(H=!0;Y===L.length-1&&(Y=0),!$(q[z],L[Y],L[Y+1]);)++Y;for(;z===0&&(z=q.length-1),!F(L[Y],q[z],q[z-1]);)--z,H=!1}return{t1:Y,t2:z}}kt.tangent_PolyPolyC=p;function y(L,q){var V=b(q,L);return{t1:V.t2,t2:V.t1}}kt.LRtangent_PolyPolyC=y;function b(L,q){return p(L,q,h,g,o,s)}kt.RLtangent_PolyPolyC=b;function w(L,q){return p(L,q,g,g,s,s)}kt.LLtangent_PolyPolyC=w;function x(L,q){return p(L,q,h,h,o,o)}kt.RRtangent_PolyPolyC=x;var E=function(){function L(q,V){this.t1=q,this.t2=V}return L}();kt.BiTangent=E;var S=function(){function L(){}return L}();kt.BiTangents=S;var C=function(L){t(q,L);function q(){return L!==null&&L.apply(this,arguments)||this}return q}(r);kt.TVGPoint=C;var A=function(){function L(q,V,P,$){this.id=q,this.polyid=V,this.polyvertid=P,this.p=$,$.vv=this}return L}();kt.VisibilityVertex=A;var D=function(){function L(q,V){this.source=q,this.target=V}return L.prototype.length=function(){var q=this.source.p.x-this.target.p.x,V=this.source.p.y-this.target.p.y;return Math.sqrt(q*q+V*V)},L}();kt.VisibilityEdge=D;var M=function(){function L(q,V){if(this.P=q,this.V=[],this.E=[],V)this.V=V.V.slice(0),this.E=V.E.slice(0);else{for(var P=q.length,$=0;$0&&this.E.push(new D(F[Y-1].vv,H))}F.length>1&&this.E.push(new D(F[0].vv,F[F.length-1].vv))}for(var $=0;$0)return!0;return!1},L}();kt.TangentVisibilityGraph=M;function R(L,q){for(var V=[],P=1,$=q.length;P<$;++P){var F=e.Rectangle.lineIntersection(L.x1,L.y1,L.x2,L.y2,q[P-1].x,q[P-1].y,q[P].x,q[P].y);F&&V.push(F)}return V}function O(L,q){for(var V=L.length-1,P=q.length-1,$=new S,F=0;F=0&&re>=0&&ne<0&&ee>=0&&W>=0&&te<0?$.ll=new E(F,Y):j<=0&&re<=0&&ne>0&&ee<=0&&W<=0&&te>0?$.rr=new E(F,Y):j<=0&&re>0&&ne<=0&&ee>=0&&W<0&&te>=0?$.rl=new E(F,Y):j>=0&&re<0&&ne>=0&&ee<=0&&W>0&&te<=0&&($.lr=new E(F,Y))}return $}kt.tangents=O;function B(L,q){for(var V=1,P=q.length;V0)return!0}return!1}return kt.polysOverlap=N,kt}var ll={},mk;function sN(){if(mk)return ll;mk=1,Object.defineProperty(ll,"__esModule",{value:!0});var t={PADDING:10,GOLDEN_SECTION:(1+Math.sqrt(5))/2,FLOAT_EPSILON:1e-4};function e(n,a,i,y,p,l){p===void 0&&(p=1),l===void 0&&(l=!0);var f=0,d=0,h=a,g=i,p=typeof p<"u"?p:1,y=typeof y<"u"?y:0,b=0,w=0,x=0,E=0,S=[];if(n.length==0)return;C(n),D(n),l&&A(n);function C(k){k.forEach(function(L){N(L)});function N(L){var q=Number.MAX_VALUE,V=Number.MAX_VALUE,P=0,$=0;L.array.forEach(function(F){var Y=typeof F.width<"u"?F.width:y,z=typeof F.height<"u"?F.height:y;Y/=2,z/=2,P=Math.max(F.x+Y,P),q=Math.min(F.x-Y,q),$=Math.max(F.y+z,$),V=Math.min(F.y-z,V)}),L.width=P-q,L.height=$-V}}function A(k){k.forEach(function(N){var L={x:0,y:0};N.array.forEach(function(P){L.x+=P.x,L.y+=P.y}),L.x/=N.array.length,L.y/=N.array.length;var q={x:L.x-N.width/2,y:L.y-N.height/2},V={x:N.x-q.x+h/2-b/2,y:N.y-q.y+g/2-w/2};N.array.forEach(function(P){P.x+=V.x,P.y+=V.y})})}function D(k,N){var L=Number.POSITIVE_INFINITY,q=0;k.sort(function(K,j){return j.height-K.height}),x=k.reduce(function(K,j){return K.widthx||Z>t.FLOAT_EPSILON;){if(z!=1)var J=P-(P-V)/t.GOLDEN_SECTION,F=M(k,J);if(z!=0)var U=V+(P-V)/t.GOLDEN_SECTION,Y=M(k,U);if(H=Math.abs(J-U),Z=Math.abs(F-Y),FY?(V=J,J=U,F=Y,z=1):(P=U,U=J,Y=F,z=0),$++>100)break}M(k,q)}function M(k,N){S=[],b=0,w=0,E=d;for(var L=0;L=k.height&&S[q].x+S[q].width+k.width+t.PADDING-N<=t.FLOAT_EPSILON){L=S[q];break}S.push(k),L!==void 0?(k.x=L.x+L.width+t.PADDING,k.y=L.bottom,k.space_left=k.height,k.bottom=k.y,L.space_left-=k.height+t.PADDING,L.bottom+=k.height+t.PADDING):(k.y=E,E+=k.height+t.PADDING,k.x=f,k.bottom=k.y,k.space_left=k.height),k.y+k.height-w>-1e-4&&(w=k.y+k.height-d),k.x+k.width-b>-1e-4&&(b=k.x+k.width-f)}function O(k){var N=0;return k.forEach(function(L){return N+=L.width+t.PADDING}),N}function B(){return b/w}}ll.applyPacking=e;function r(n,a){for(var i={},o={},s=[],l=0,f=0;f"u"||typeof p.py>"u")&&(p.px=p.x,p.py=p.y);var b=[p.px,p.py];this._descent.locks.add(y,b)}var w=this._descent.rungeKutta();return w===0?this._alpha=0:typeof this._lastStress<"u"&&(this._alpha=w),this._lastStress=w,this.updateNodePositions(),this.trigger({type:l.tick,alpha:this._alpha,stress:this._lastStress}),!1},h.prototype.updateNodePositions=function(){for(var g=this._descent.x[0],p=this._descent.x[1],y,b=this._nodes.length;b--;)y=this._nodes[b],y.x=g[b],y.y=p[b]},h.prototype.nodes=function(g){if(!g){if(this._nodes.length===0&&this._links.length>0){var p=0;this._links.forEach(function(b){p=Math.max(p,b.source,b.target)}),this._nodes=new Array(++p);for(var y=0;y"u"&&(y.padding=1),typeof y.leaves<"u"&&y.leaves.forEach(function(b,w){typeof b=="number"&&((y.leaves[w]=p._nodes[b]).parent=y)}),typeof y.groups<"u"&&y.groups.forEach(function(b,w){typeof b=="number"&&((y.groups[w]=p._groups[b]).parent=y)})}),this._rootGroup.leaves=this._nodes.filter(function(y){return typeof y.parent>"u"}),this._rootGroup.groups=this._groups.filter(function(y){return typeof y.parent>"u"}),this):this._groups},h.prototype.powerGraphGroups=function(g){var p=e.getGroups(this._nodes,this._links,this.linkAccessor,this._rootGroup);return this.groups(p.groups),g(p),this},h.prototype.avoidOverlaps=function(g){return arguments.length?(this._avoidOverlaps=g,this):this._avoidOverlaps},h.prototype.handleDisconnected=function(g){return arguments.length?(this._handleDisconnected=g,this):this._handleDisconnected},h.prototype.flowLayout=function(g,p){return arguments.length||(g="y"),this._directedLinkConstraints={axis:g,getMinSeparation:typeof p=="number"?function(){return p}:p},this},h.prototype.links=function(g){return arguments.length?(this._links=g,this):this._links},h.prototype.constraints=function(g){return arguments.length?(this._constraints=g,this):this._constraints},h.prototype.distanceMatrix=function(g){return arguments.length?(this._distanceMatrix=g,this):this._distanceMatrix},h.prototype.size=function(g){return g?(this._canvasSize=g,this):this._canvasSize},h.prototype.defaultNodeSize=function(g){return g?(this._defaultNodeSize=g,this):this._defaultNodeSize},h.prototype.groupCompactness=function(g){return g?(this._groupCompactness=g,this):this._groupCompactness},h.prototype.linkDistance=function(g){return g?(this._linkDistance=typeof g=="function"?g:+g,this._linkLengthCalculator=null,this):this._linkDistance},h.prototype.linkType=function(g){return this._linkType=g,this},h.prototype.convergenceThreshold=function(g){return g?(this._threshold=typeof g=="function"?g:+g,this):this._threshold},h.prototype.alpha=function(g){return arguments.length?(g=+g,this._alpha?g>0?this._alpha=g:this._alpha=0:g>0&&(this._running||(this._running=!0,this.trigger({type:l.start,alpha:this._alpha=g}),this.kick())),this):this._alpha},h.prototype.getLinkLength=function(g){return typeof this._linkDistance=="function"?+this._linkDistance(g):this._linkDistance},h.setLinkLength=function(g,p){g.length=p},h.prototype.getLinkType=function(g){return typeof this._linkType=="function"?this._linkType(g):0},h.prototype.symmetricDiffLinkLengths=function(g,p){var y=this;return p===void 0&&(p=1),this.linkDistance(function(b){return g*b.length}),this._linkLengthCalculator=function(){return r.symmetricDiffLinkLengths(y._links,y.linkAccessor,p)},this},h.prototype.jaccardLinkLengths=function(g,p){var y=this;return p===void 0&&(p=1),this.linkDistance(function(b){return g*b.length}),this._linkLengthCalculator=function(){return r.jaccardLinkLengths(y._links,y.linkAccessor,p)},this},h.prototype.start=function(g,p,y,b,w,x){var E=this;g===void 0&&(g=0),p===void 0&&(p=0),y===void 0&&(y=0),b===void 0&&(b=0),w===void 0&&(w=!0),x===void 0&&(x=!0);var S,C=this.nodes().length,A=C+2*this._groups.length;this._links.length;var D=this._canvasSize[0],M=this._canvasSize[1],R=new Array(A),O=new Array(A),B=null,k=this._avoidOverlaps;this._nodes.forEach(function(Y,z){Y.index=z,typeof Y.x>"u"&&(Y.x=D/2,Y.y=M/2),R[z]=Y.x,O[z]=Y.y}),this._linkLengthCalculator&&this._linkLengthCalculator();var N;this._distanceMatrix?N=this._distanceMatrix:(N=new i.Calculator(A,this._links,h.getSourceIndex,h.getTargetIndex,function(Y){return E.getLinkLength(Y)}).DistanceMatrix(),B=n.Descent.createSquareMatrix(A,function(){return 2}),this._links.forEach(function(Y){typeof Y.source=="number"&&(Y.source=E._nodes[Y.source]),typeof Y.target=="number"&&(Y.target=E._nodes[Y.target])}),this._links.forEach(function(Y){var z=h.getSourceIndex(Y),H=h.getTargetIndex(Y);B[z][H]=B[H][z]=Y.weight||1}));var L=n.Descent.createSquareMatrix(A,function(Y,z){return N[Y][z]});if(this._rootGroup&&typeof this._rootGroup.groups<"u"){var S=C,q=function(z,H,Z,J){B[z][H]=B[H][z]=Z,L[z][H]=L[H][z]=J};this._groups.forEach(function(z){q(S,S+1,E._groupCompactness,.1),R[S]=0,O[S++]=0,R[S]=0,O[S++]=0})}else this._rootGroup={leaves:this._nodes,groups:[]};var V=this._constraints||[];this._directedLinkConstraints&&(this.linkAccessor.getMinSeparation=this._directedLinkConstraints.getMinSeparation,V=V.concat(r.generateDirectedEdgeConstraints(C,this._links,this._directedLinkConstraints.axis,this.linkAccessor))),this.avoidOverlaps(!1),this._descent=new n.Descent([R,O],L),this._descent.locks.clear();for(var S=0;S0&&(this._descent.project=new a.Projection(this._nodes,this._groups,this._rootGroup,V).projectFunctions()),this._descent.run(p),this.separateOverlappingComponents(D,M,x),this.avoidOverlaps(k),k&&(this._nodes.forEach(function(Y,z){Y.x=R[z],Y.y=O[z]}),this._descent.project=new a.Projection(this._nodes,this._groups,this._rootGroup,V,!0).projectFunctions(),this._nodes.forEach(function(Y,z){R[z]=Y.x,O[z]=Y.y})),this._descent.G=B,this._descent.run(y),b){this._descent.snapStrength=1e3,this._descent.snapGridSize=this._nodes[0].width,this._descent.numGridSnapNodes=C,this._descent.scaleSnapByMaxH=C!=A;var F=n.Descent.createSquareMatrix(A,function(Y,z){return Y>=C||z>=C?B[Y][z]:0});this._descent.G=F,this._descent.run(b)}return this.updateNodePositions(),this.separateOverlappingComponents(D,M,x),w?this.resume():this},h.prototype.initialLayout=function(g,p,y){if(this._groups.length>0&&g>0){var b=this._nodes.length,w=this._links.map(function(E){return{source:E.source.index,target:E.target.index}}),x=this._nodes.map(function(E){return{index:E.index}});this._groups.forEach(function(E,S){x.push({index:E.index=b+S})}),this._groups.forEach(function(E,S){typeof E.leaves<"u"&&E.leaves.forEach(function(C){return w.push({source:E.index,target:C.index})}),typeof E.groups<"u"&&E.groups.forEach(function(C){return w.push({source:E.index,target:C.index})})}),new h().size(this.size()).nodes(x).links(w).avoidOverlaps(!1).linkDistance(this.linkDistance()).symmetricDiffLinkLengths(5).convergenceThreshold(1e-4).start(g,0,0,0,!1),this._nodes.forEach(function(E){p[E.index]=x[E.index].x,y[E.index]=x[E.index].y})}else this._descent.run(g)},h.prototype.separateOverlappingComponents=function(g,p,y){var b=this;if(y===void 0&&(y=!0),!this._distanceMatrix&&this._handleDisconnected){var w=this._descent.x[0],x=this._descent.x[1];this._nodes.forEach(function(S,C){S.x=w[C],S.y=x[C]});var E=s.separateGraphs(this._nodes,this._links);s.applyPacking(E,g,p,this._defaultNodeSize,1,y),this._nodes.forEach(function(S,C){b._descent.x[0][C]=S.x,b._descent.x[1][C]=S.y,S.bounds&&(S.bounds.setXCentre(S.x),S.bounds.setYCentre(S.y))})}},h.prototype.resume=function(){return this.alpha(.1)},h.prototype.stop=function(){return this.alpha(0)},h.prototype.prepareEdgeRouting=function(g){g===void 0&&(g=0),this._visibilityGraph=new o.TangentVisibilityGraph(this._nodes.map(function(p){return p.bounds.inflate(-g).vertices()}))},h.prototype.routeEdge=function(g,p,y){p===void 0&&(p=5);var b=[],w=new o.TangentVisibilityGraph(this._visibilityGraph.P,{V:this._visibilityGraph.V,E:this._visibilityGraph.E}),x={x:g.source.x,y:g.source.y},E={x:g.target.x,y:g.target.y},S=w.addPoint(x,g.source.index),C=w.addPoint(E,g.target.index);w.addEdgeIfVisible(x,E,g.source.index,g.target.index),typeof y<"u"&&y(w);var A=function(V){return V.source.id},D=function(V){return V.target.id},M=function(V){return V.length()},R=new i.Calculator(w.V.length,w.E,A,D,M),O=R.PathFromNodeToNode(S.id,C.id);if(O.length===1||O.length===w.V.length){var B=a.makeEdgeBetween(g.source.innerBounds,g.target.innerBounds,p);b=[B.sourceIntersection,B.arrowStart]}else{for(var k=O.length-2,N=w.V[O[k]].p,L=w.V[O[0]].p,b=[g.source.innerBounds.rayIntersection(N.x,N.y)],q=k;q>=0;--q)b.push(w.V[O[q]].p);b.push(a.makeEdgeTo(L,g.target.innerBounds,p))}return b},h.getSourceIndex=function(g){return typeof g.source=="number"?g.source:g.source.index},h.getTargetIndex=function(g){return typeof g.target=="number"?g.target:g.target.index},h.linkId=function(g){return h.getSourceIndex(g)+"-"+h.getTargetIndex(g)},h.dragStart=function(g){f(g)?h.storeOffset(g,h.dragOrigin(g)):(h.stopNode(g),g.fixed|=2)},h.stopNode=function(g){g.px=g.x,g.py=g.y},h.storeOffset=function(g,p){typeof g.leaves<"u"&&g.leaves.forEach(function(y){y.fixed|=2,h.stopNode(y),y._dragGroupOffsetX=y.x-p.x,y._dragGroupOffsetY=y.y-p.y}),typeof g.groups<"u"&&g.groups.forEach(function(y){return h.storeOffset(y,p)})},h.dragOrigin=function(g){return f(g)?{x:g.bounds.cx(),y:g.bounds.cy()}:g},h.drag=function(g,p){f(g)?(typeof g.leaves<"u"&&g.leaves.forEach(function(y){g.bounds.setXCentre(p.x),g.bounds.setYCentre(p.y),y.px=y._dragGroupOffsetX+p.x,y.py=y._dragGroupOffsetY+p.y}),typeof g.groups<"u"&&g.groups.forEach(function(y){return h.drag(y,p)})):(g.px=p.x,g.py=p.y)},h.dragEnd=function(g){f(g)?(typeof g.leaves<"u"&&g.leaves.forEach(function(p){h.dragEnd(p),delete p._dragGroupOffsetX,delete p._dragGroupOffsetY}),typeof g.groups<"u"&&g.groups.forEach(h.dragEnd)):g.fixed&=-7},h.mouseOver=function(g){g.fixed|=4,g.px=g.x,g.py=g.y},h.mouseOut=function(g){g.fixed&=-5},h}();t.Layout=d}(sx)),sx}var bk;function vY(){if(bk)return uo;bk=1;var t=uo&&uo.__extends||function(){var a=function(i,o){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var f in l)l.hasOwnProperty(f)&&(s[f]=l[f])},a(i,o)};return function(i,o){a(i,o);function s(){this.constructor=i}i.prototype=o===null?Object.create(o):(s.prototype=o.prototype,new s)}}();Object.defineProperty(uo,"__esModule",{value:!0});var e=mf(),r=function(a){t(i,a);function i(o){var s=a.call(this)||this,l=o;return l.trigger&&(s.trigger=l.trigger),l.kick&&(s.kick=l.kick),l.drag&&(s.drag=l.drag),l.on&&(s.on=l.on),s.dragstart=s.dragStart=e.Layout.dragStart,s.dragend=s.dragEnd=e.Layout.dragEnd,s}return i.prototype.trigger=function(o){},i.prototype.kick=function(){},i.prototype.drag=function(){},i.prototype.on=function(o,s){return this},i}(e.Layout);uo.LayoutAdaptor=r;function n(a){return new r(a)}return uo.adaptor=n,uo}var Xc={},lo={},wk;function gY(){if(wk)return lo;wk=1;var t=lo&&lo.__extends||function(){var a=function(i,o){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var f in l)l.hasOwnProperty(f)&&(s[f]=l[f])},a(i,o)};return function(i,o){a(i,o);function s(){this.constructor=i}i.prototype=o===null?Object.create(o):(s.prototype=o.prototype,new s)}}();Object.defineProperty(lo,"__esModule",{value:!0});var e=mf(),r=function(a){t(i,a);function i(){var o=a.call(this)||this;o.event=d3.dispatch(e.EventType[e.EventType.start],e.EventType[e.EventType.tick],e.EventType[e.EventType.end]);var s=o;return o.drag=function(){if(!l)var l=d3.behavior.drag().origin(e.Layout.dragOrigin).on("dragstart.d3adaptor",e.Layout.dragStart).on("drag.d3adaptor",function(f){e.Layout.drag(f,d3.event),s.resume()}).on("dragend.d3adaptor",e.Layout.dragEnd);if(!arguments.length)return l;this.call(l)},o}return i.prototype.trigger=function(o){var s={type:e.EventType[o.type],alpha:o.alpha,stress:o.stress};this.event[s.type](s)},i.prototype.kick=function(){var o=this;d3.timer(function(){return a.prototype.tick.call(o)})},i.prototype.on=function(o,s){return typeof o=="string"?this.event.on(o,s):this.event.on(e.EventType[o],s),this},i}(e.Layout);lo.D3StyleLayoutAdaptor=r;function n(){return new r}return lo.d3adaptor=n,lo}var xu={},xk;function pY(){if(xk)return xu;xk=1;var t=xu&&xu.__extends||function(){var n=function(a,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var l in s)s.hasOwnProperty(l)&&(o[l]=s[l])},n(a,i)};return function(a,i){n(a,i);function o(){this.constructor=a}a.prototype=i===null?Object.create(i):(o.prototype=i.prototype,new o)}}();Object.defineProperty(xu,"__esModule",{value:!0});var e=mf(),r=function(n){t(a,n);function a(i){var o=n.call(this)||this;o.d3Context=i,o.event=i.dispatch(e.EventType[e.EventType.start],e.EventType[e.EventType.tick],e.EventType[e.EventType.end]);var s=o;return o.drag=function(){if(!l)var l=i.drag().subject(e.Layout.dragOrigin).on("start.d3adaptor",e.Layout.dragStart).on("drag.d3adaptor",function(f){e.Layout.drag(f,i.event),s.resume()}).on("end.d3adaptor",e.Layout.dragEnd);if(!arguments.length)return l;arguments[0].call(l)},o}return a.prototype.trigger=function(i){var o={type:e.EventType[i.type],alpha:i.alpha,stress:i.stress};this.event.call(o.type,o)},a.prototype.kick=function(){var i=this,o=this.d3Context.timer(function(){return n.prototype.tick.call(i)&&o.stop()})},a.prototype.on=function(i,o){return typeof i=="string"?this.event.on(i,o):this.event.on(e.EventType[i],o),this},a}(e.Layout);return xu.D3StyleLayoutAdaptor=r,xu}var _k;function mY(){if(_k)return Xc;_k=1,Object.defineProperty(Xc,"__esModule",{value:!0});var t=gY(),e=pY();function r(a){return!a||n(a)?new t.D3StyleLayoutAdaptor:new e.D3StyleLayoutAdaptor(a)}Xc.d3adaptor=r;function n(a){var i=/^3\./;return a.version&&a.version.match(i)!==null}return Xc}var fo={},Ek;function lN(){if(Ek)return fo;Ek=1,Object.defineProperty(fo,"__esModule",{value:!0});var t=pf(),e=n_(),r=Kh(),n=function(){function s(l,f,d){this.id=l,this.rect=f,this.children=d,this.leaf=typeof d>"u"||d.length===0}return s}();fo.NodeWrapper=n;var a=function(){function s(l,f,d,h,g){h===void 0&&(h=null),g===void 0&&(g=null),this.id=l,this.x=f,this.y=d,this.node=h,this.line=g}return s}();fo.Vert=a;var i=function(){function s(l,f){this.s=l,this.t=f;var d=s.findMatch(l,f),h=f.slice(0).reverse(),g=s.findMatch(l,h);d.length>=g.length?(this.length=d.length,this.si=d.si,this.ti=d.ti,this.reversed=!1):(this.length=g.length,this.si=g.si,this.ti=f.length-g.ti-g.length,this.reversed=!0)}return s.findMatch=function(l,f){for(var d=l.length,h=f.length,g={length:0,si:-1,ti:-1},p=new Array(d),y=0;yg.length&&(g.length=w,g.si=y-w+1,g.ti=b-w+1)}else p[y][b]=0}return g},s.prototype.getSequence=function(){return this.length>=0?this.s.slice(this.si,this.si+this.length):[]},s}();fo.LongestCommonSubsequence=i;var o=function(){function s(l,f,d){var h=this;d===void 0&&(d=12),this.originalnodes=l,this.groupPadding=d,this.leaves=null,this.nodes=l.map(function(D,M){return new n(M,f.getBounds(D),f.getChildren(D))}),this.leaves=this.nodes.filter(function(D){return D.leaf}),this.groups=this.nodes.filter(function(D){return!D.leaf}),this.cols=this.getGridLines("x"),this.rows=this.getGridLines("y"),this.groups.forEach(function(D){return D.children.forEach(function(M){return h.nodes[M].parent=D})}),this.root={children:[]},this.nodes.forEach(function(D){typeof D.parent>"u"&&(D.parent=h.root,h.root.children.push(D.id)),D.ports=[]}),this.backToFront=this.nodes.slice(0),this.backToFront.sort(function(D,M){return h.getDepth(D)-h.getDepth(M)});var g=this.backToFront.slice(0).reverse().filter(function(D){return!D.leaf});g.forEach(function(D){var M=t.Rectangle.empty();D.children.forEach(function(R){return M=M.union(h.nodes[R].rect)}),D.rect=M.inflate(h.groupPadding)});var p=this.midPoints(this.cols.map(function(D){return D.pos})),y=this.midPoints(this.rows.map(function(D){return D.pos})),b=p[0],w=p[p.length-1],x=y[0],E=y[y.length-1],S=this.rows.map(function(D){return{x1:b,x2:w,y1:D.pos,y2:D.pos}}).concat(y.map(function(D){return{x1:b,x2:w,y1:D,y2:D}})),C=this.cols.map(function(D){return{x1:D.pos,x2:D.pos,y1:x,y2:E}}).concat(p.map(function(D){return{x1:D,x2:D,y1:x,y2:E}})),A=S.concat(C);A.forEach(function(D){return D.verts=[]}),this.verts=[],this.edges=[],S.forEach(function(D){return C.forEach(function(M){var R=new a(h.verts.length,M.x1,D.y1);D.verts.push(R),M.verts.push(R),h.verts.push(R);for(var O=h.backToFront.length;O-- >0;){var B=h.backToFront[O],k=B.rect,N=Math.abs(R.x-k.cx()),L=Math.abs(R.y-k.cy());if(N0;){var h=d.filter(function(p){return p.rect["overlap"+l.toUpperCase()](d[0].rect)}),g={nodes:h,pos:this.avg(h.map(function(p){return p.rect["c"+l]()}))};f.push(g),g.nodes.forEach(function(p){return d.splice(d.indexOf(p),1)})}return f.sort(function(p,y){return p.pos-y.pos}),f},s.prototype.getDepth=function(l){for(var f=0;l.parent!==this.root;)f++,l=l.parent;return f},s.prototype.midPoints=function(l){for(var f=l[1]-l[0],d=[l[0]-f/2],h=1;h.1)&&(E={pos:b[0][f],segments:[]},x.push(E)),E.segments.push(b)}return x},s.nudgeSegs=function(l,f,d,h,g,p){var y=h.length;if(!(y<=1)){for(var b=h.map(function(B){return new e.Variable(B[0][l])}),w=[],x=0;x=0&&w.push(new e.Constraint(b[M],b[R],p))}var O=new e.Solver(b,w);O.solve(),b.forEach(function(B,k){var N=h[k],L=B.position();N[0][l]=N[1][l]=L;var q=d[N.edgeid];N.i>0&&(q[N.i-1][1][l]=L),N.iMath.PI||g<-Math.PI)&&(g=h-d),g},s.isLeft=function(l,f,d){return(f.x-l.x)*(d.y-l.y)-(f.y-l.y)*(d.x-l.x)<=0},s.getOrder=function(l){for(var f={},d=0;d"u"&&(f[h.l]={}),f[h.l][h.r]=!0}return function(g,p){return typeof f[g]<"u"&&f[g][p]}},s.orderEdges=function(l){for(var f=[],d=0;d=g.length||y.ti+y.length>=p.length)){f.push({l:d,r:h});continue}y.si+y.length>=g.length||y.ti+y.length>=p.length?(b=g[y.si+1],x=g[y.si-1],w=p[y.ti-1]):(b=g[y.si+y.length-2],w=g[y.si+y.length],x=p[y.ti+y.length]),s.isLeft(b,w,x)?f.push({l:h,r:d}):f.push({l:d,r:h})}}return s.getOrder(f)},s.makeSegments=function(l){function f(w){return{x:w.x,y:w.y}}for(var d=function(w,x,E){return Math.abs((x.x-w.x)*(E.y-w.y)-(x.y-w.y)*(E.x-w.x))<.001},h=[],g=f(l[0]),p=1;p1&&V>1?1e3:0},D=C.PathFromNodeToNodeWithPrevCost(h.ports[0].id,g.ports[0].id,A),M=D.reverse().map(function(R){return d.verts[R]});return M.push(this.nodes[g.id].ports[0]),M.filter(function(R,O){return!(O0&&R.node===g&&M[O-1].node===g)})},s.getRoutePath=function(l,f,d,h){var g={routepath:"M "+l[0][0].x+" "+l[0][0].y+" ",arrowpath:""};if(l.length>1)for(var p=0;p0?b-=x/Math.abs(x)*f:w-=E/Math.abs(E)*f,g.routepath+="L "+b+" "+w+" ";var S=l[p+1],C=S[0].x,A=S[0].y,D=S[1].x,M=S[1].y;x=D-C,E=M-A;var R=s.angleBetween2Lines(y,S)<0?1:0,O,B;Math.abs(x)>0?(O=C+x/Math.abs(x)*f,B=A):(O=C,B=A+E/Math.abs(E)*f);var k=Math.abs(O-b),N=Math.abs(B-w);g.routepath+="A "+k+" "+N+" 0 0 "+R+" "+O+" "+B+" "}else{var L=[b,w],q,V;Math.abs(x)>0?(b-=x/Math.abs(x)*h,q=[b,w+d],V=[b,w-d]):(w-=E/Math.abs(E)*h,q=[b+d,w],V=[b-d,w]),g.routepath+="L "+b+" "+w+" ",h>0&&(g.arrowpath="M "+L[0]+" "+L[1]+" L "+q[0]+" "+q[1]+" L "+V[0]+" "+V[1])}}else{var y=l[0],b=y[1].x,w=y[1].y,x=b-y[0].x,E=w-y[0].y,L=[b,w],q,V;Math.abs(x)>0?(b-=x/Math.abs(x)*h,q=[b,w+d],V=[b,w-d]):(w-=E/Math.abs(E)*h,q=[b+d,w],V=[b-d,w]),g.routepath+="L "+b+" "+w+" ",h>0&&(g.arrowpath="M "+L[0]+" "+L[1]+" L "+q[0]+" "+q[1]+" L "+V[0]+" "+V[1])}return g},s}();return fo.GridRouter=o,fo}var _u={},Sk;function yY(){if(Sk)return _u;Sk=1,Object.defineProperty(_u,"__esModule",{value:!0});var t=Kh(),e=r_(),r=pf(),n=t_(),a=function(){function l(f,d){this.source=f,this.target=d}return l.prototype.actualLength=function(f){var d=this;return Math.sqrt(f.reduce(function(h,g){var p=g[d.target]-g[d.source];return h+p*p},0))},l}();_u.Link3D=a;var i=function(){function l(f,d,h){f===void 0&&(f=0),d===void 0&&(d=0),h===void 0&&(h=0),this.x=f,this.y=d,this.z=h}return l}();_u.Node3D=i;var o=function(){function l(f,d,h){var g=this;h===void 0&&(h=1),this.nodes=f,this.links=d,this.idealLinkLength=h,this.constraints=null,this.useJaccardLinkLengths=!0,this.result=new Array(l.k);for(var p=0;p"u"&&(y[E]=Math.random())}g.result[0][b]=y.x,g.result[1][b]=y.y,g.result[2][b]=y.z})}return l.prototype.linkLength=function(f){return f.actualLength(this.result)},l.prototype.start=function(f){var d=this;f===void 0&&(f=100);var h=this.nodes.length,g=new s;this.useJaccardLinkLengths&&n.jaccardLinkLengths(this.links,g,1.5),this.links.forEach(function(E){return E.length*=d.idealLinkLength});var p=new t.Calculator(h,this.links,function(E){return E.source},function(E){return E.target},function(E){return E.length}).DistanceMatrix(),y=e.Descent.createSquareMatrix(h,function(E,S){return p[E][S]}),b=e.Descent.createSquareMatrix(h,function(){return 2});this.links.forEach(function(E){var S=E.source,C=E.target;return b[S][C]=b[C][S]=1}),this.descent=new e.Descent(this.result,y),this.descent.threshold=.001,this.descent.G=b,this.constraints&&(this.descent.project=new r.Projection(this.nodes,null,null,this.constraints).projectFunctions());for(var w=0;w"u"?"undefined":o(S))===o("")},g=function(S){return(typeof S>"u"?"undefined":o(S))===o(0)},p=function(S){return S!=null&&(typeof S>"u"?"undefined":o(S))===o({})},y=function(S){return S!=null&&(typeof S>"u"?"undefined":o(S))===o(function(){})},b=function(){},w=function(S,C){if(y(S)){var A=S;return A.apply(C,[C])}else return S};function x(E){this.options=s({},l,E)}x.prototype.run=function(){var E=this,S=this.options;E.manuallyStopped=!1;var C=S.cy,A=S.eles,D=A.nodes(),M=A.edges(),R=!1,O=function(ce){return ce.isParent()},B=D.filter(O),k=D.subtract(B),N=S.boundingBox||{x1:0,y1:0,w:C.width(),h:C.height()};N.x2===void 0&&(N.x2=N.x1+N.w),N.w===void 0&&(N.w=N.x2-N.x1),N.y2===void 0&&(N.y2=N.y1+N.h),N.h===void 0&&(N.h=N.y2-N.y1);var L=function(){for(var ce=0;ce0&&$.constraints(Z),$.groups(B.map(function(te,ce){var de=w(S.nodeSpacing,te),ye=function(Be){return parseFloat(te.style("padding-"+Be))},we=ye("left")+de,Pe=ye("right")+de,Re=ye("top")+de,Te=ye("bottom")+de;return te.scratch().cola={index:ce,padding:Math.max(we,Pe,Re,Te),leaves:te.children().intersection(k).map(function(Ce){return Ce[0].scratch().cola.index}),fixed:te.locked()},te}).map(function(te){return te.scratch().cola.groups=te.children().intersection(B).map(function(ce){return ce.scratch().cola.index}),te.scratch().cola}));var K=void 0,j=void 0;S.edgeLength!=null?(K=S.edgeLength,j="linkDistance"):S.edgeSymDiffLength!=null?(K=S.edgeSymDiffLength,j="symmetricDiffLinkLengths"):S.edgeJaccardLength!=null?(K=S.edgeJaccardLength,j="jaccardLinkLengths"):(K=100,j="linkDistance");var re=function(ce){return ce.calcLength};if($.links(M.stdFilter(function(te){return k.contains(te.source())&&k.contains(te.target())}).map(function(te){var ce=te.scratch().cola={source:te.source()[0].scratch().cola.index,target:te.target()[0].scratch().cola.index};return K!=null&&(ce.calcLength=w(K,te)),ce})),$.size([N.w,N.h]),K!=null&&$[j](re),S.flow){var ne=void 0,ee="y",W=50;h(S.flow)?ne={axis:S.flow,minSeparation:W}:g(S.flow)?ne={axis:ee,minSeparation:S.flow}:p(S.flow)?(ne=S.flow,ne.axis=ne.axis||ee,ne.minSeparation=ne.minSeparation!=null?ne.minSeparation:W):ne={axis:ee,minSeparation:W},$.flowLayout(ne.axis,ne.minSeparation)}return E.trigger({type:"layoutstart",layout:E}),$.avoidOverlaps(S.avoidOverlap).handleDisconnected(S.handleDisconnected).start(S.unconstrIter,S.userConstIter,S.allConstIter,void 0,void 0,S.centerGraph),S.infinite||setTimeout(function(){E.manuallyStopped||$.stop()},S.maxSimulationTime),this},x.prototype.stop=function(){return this.adaptor&&(this.manuallyStopped=!0,this.adaptor.stop()),this},n.exports=x},function(n,a,i){n.exports=Object.assign!=null?Object.assign.bind(Object):function(o){for(var s=arguments.length,l=Array(s>1?s-1:0),f=1;f"u"?"undefined":o(window))!=="undefined"?s=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(l){return setTimeout(l,16)}:s=function(f){f()},n.exports=s},function(n,a){n.exports=r}])})}(yd)),yd.exports}var EY=_Y();const SY=f2(EY);function fN(t){for(var e=t.length/6|0,r=new Array(e),n=0;n>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Kc(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Kc(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=AY.exec(t))?new Xr(e[1],e[2],e[3],1):(e=RY.exec(t))?new Xr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=MY.exec(t))?Kc(e[1],e[2],e[3],e[4]):(e=OY.exec(t))?Kc(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=DY.exec(t))?Nk(e[1],e[2]/100,e[3]/100,1):(e=kY.exec(t))?Nk(e[1],e[2]/100,e[3]/100,e[4]):Rk.hasOwnProperty(t)?Dk(Rk[t]):t==="transparent"?new Xr(NaN,NaN,NaN,0):null}function Dk(t){return new Xr(t>>16&255,t>>8&255,t&255,1)}function Kc(t,e,r,n){return n<=0&&(t=e=r=NaN),new Xr(t,e,r,n)}function BY(t){return t instanceof yf||(t=Vl(t)),t?(t=t.rgb(),new Xr(t.r,t.g,t.b,t.opacity)):new Xr}function Hd(t,e,r,n){return arguments.length===1?BY(t):new Xr(t,e,r,n??1)}function Xr(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}a_(Xr,Hd,cN(yf,{brighter(t){return t=t==null?Fd:Math.pow(Fd,t),new Xr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?zl:Math.pow(zl,t),new Xr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Xr(bo(this.r),bo(this.g),bo(this.b),Ud(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:kk,formatHex:kk,formatHex8:qY,formatRgb:Lk,toString:Lk}));function kk(){return`#${yo(this.r)}${yo(this.g)}${yo(this.b)}`}function qY(){return`#${yo(this.r)}${yo(this.g)}${yo(this.b)}${yo((isNaN(this.opacity)?1:this.opacity)*255)}`}function Lk(){const t=Ud(this.opacity);return`${t===1?"rgb(":"rgba("}${bo(this.r)}, ${bo(this.g)}, ${bo(this.b)}${t===1?")":`, ${t})`}`}function Ud(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function bo(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function yo(t){return t=bo(t),(t<16?"0":"")+t.toString(16)}function Nk(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Vn(t,e,r,n)}function dN(t){if(t instanceof Vn)return new Vn(t.h,t.s,t.l,t.opacity);if(t instanceof yf||(t=Vl(t)),!t)return new Vn;if(t instanceof Vn)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,a=Math.min(e,r,n),i=Math.max(e,r,n),o=NaN,s=i-a,l=(i+a)/2;return s?(e===i?o=(r-n)/s+(r0&&l<1?0:o,new Vn(o,s,l,t.opacity)}function PY(t,e,r,n){return arguments.length===1?dN(t):new Vn(t,e,r,n??1)}function Vn(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}a_(Vn,PY,cN(yf,{brighter(t){return t=t==null?Fd:Math.pow(Fd,t),new Vn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?zl:Math.pow(zl,t),new Vn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,a=2*r-n;return new Xr(lx(t>=240?t-240:t+120,a,n),lx(t,a,n),lx(t<120?t+240:t-120,a,n),this.opacity)},clamp(){return new Vn(Bk(this.h),jc(this.s),jc(this.l),Ud(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ud(this.opacity);return`${t===1?"hsl(":"hsla("}${Bk(this.h)}, ${jc(this.s)*100}%, ${jc(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Bk(t){return t=(t||0)%360,t<0?t+360:t}function jc(t){return Math.max(0,Math.min(1,t||0))}function lx(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}function zY(t,e,r,n,a){var i=t*t,o=i*t;return((1-3*t+3*i-o)*e+(4-6*i+3*o)*r+(1+3*t+3*i-3*o)*n+o*a)/6}function IY(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),a=t[n],i=t[n+1],o=n>0?t[n-1]:2*a-i,s=n()=>t;function VY(t,e){return function(r){return t+r*e}}function $Y(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function FY(t){return(t=+t)==1?hN:function(e,r){return r-e?$Y(e,r,t):i_(isNaN(e)?r:e)}}function hN(t,e){var r=e-t;return r?VY(t,r):i_(isNaN(t)?e:t)}const Gd=function t(e){var r=FY(e);function n(a,i){var o=r((a=Hd(a)).r,(i=Hd(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),f=hN(a.opacity,i.opacity);return function(d){return a.r=o(d),a.g=s(d),a.b=l(d),a.opacity=f(d),a+""}}return n.gamma=t,n}(1);function HY(t){return function(e){var r=e.length,n=new Array(r),a=new Array(r),i=new Array(r),o,s;for(o=0;or&&(i=e.slice(r,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,l.push({i:o,x:In(n,a)})),r=fx.lastIndex;return r180?d+=360:d-f>180&&(f+=360),g.push({i:h.push(a(h)+"rotate(",null,n)-2,x:In(f,d)})):d&&h.push(a(h)+"rotate("+d+n)}function s(f,d,h,g){f!==d?g.push({i:h.push(a(h)+"skewX(",null,n)-2,x:In(f,d)}):d&&h.push(a(h)+"skewX("+d+n)}function l(f,d,h,g,p,y){if(f!==h||d!==g){var b=p.push(a(p)+"scale(",null,",",null,")");y.push({i:b-4,x:In(f,h)},{i:b-2,x:In(d,g)})}else(h!==1||g!==1)&&p.push(a(p)+"scale("+h+","+g+")")}return function(f,d){var h=[],g=[];return f=t(f),d=t(d),i(f.translateX,f.translateY,d.translateX,d.translateY,h,g),o(f.rotate,d.rotate,h,g),s(f.skewX,d.skewX,h,g),l(f.scaleX,f.scaleY,d.scaleX,d.scaleY,h,g),f=d=null,function(p){for(var y=-1,b=g.length,w;++yUY(t[t.length-1]);var nX=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(fN);const yN=rX(nX);function bd(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}function aX(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}function bN(t){let e,r,n;t.length!==2?(e=bd,r=(s,l)=>bd(t(s),l),n=(s,l)=>t(s)-l):(e=t===bd||t===aX?t:iX,r=t,n=t);function a(s,l,f=0,d=s.length){if(f>>1;r(s[h],l)<0?f=h+1:d=h}while(f>>1;r(s[h],l)<=0?f=h+1:d=h}while(ff&&n(s[h-1],l)>-n(s[h],l)?h-1:h}return{left:a,center:o,right:i}}function iX(){return 0}function oX(t){return t===null?NaN:+t}const uX=bN(bd),sX=uX.right;bN(oX).center;class Pk extends Map{constructor(e,r=cX){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[n,a]of e)this.set(n,a)}get(e){return super.get(zk(this,e))}has(e){return super.has(zk(this,e))}set(e,r){return super.set(lX(this,e),r)}delete(e){return super.delete(fX(this,e))}}function zk({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function lX({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function fX({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function cX(t){return t!==null&&typeof t=="object"?t.valueOf():t}const dX=Math.sqrt(50),hX=Math.sqrt(10),vX=Math.sqrt(2);function Yd(t,e,r){const n=(e-t)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),o=i>=dX?10:i>=hX?5:i>=vX?2:1;let s,l,f;return a<0?(f=Math.pow(10,-a)/o,s=Math.round(t*f),l=Math.round(e*f),s/fe&&--l,f=-f):(f=Math.pow(10,a)*o,s=Math.round(t/f),l=Math.round(e/f),s*fe&&--l),l0))return[];if(t===e)return[t];const n=e=a))return[];const s=i-a+1,l=new Array(s);if(n)if(o<0)for(let f=0;fe&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function wX(t,e,r){var n=t[0],a=t[1],i=e[0],o=e[1];return a2?xX:wX,l=f=null,h}function h(g){return g==null||isNaN(g=+g)?i:(l||(l=s(t.map(n),e,r)))(n(o(g)))}return h.invert=function(g){return o(a((f||(f=s(e,t.map(n),In)))(g)))},h.domain=function(g){return arguments.length?(t=Array.from(g,yX),d()):t.slice()},h.range=function(g){return arguments.length?(e=Array.from(g),d()):e.slice()},h.rangeRound=function(g){return e=Array.from(g),r=gN,d()},h.clamp=function(g){return arguments.length?(o=g?!0:Rn,d()):o!==Rn},h.interpolate=function(g){return arguments.length?(r=g,d()):r},h.unknown=function(g){return arguments.length?(i=g,h):i},function(g,p){return n=g,a=p,d()}}function _X(){return u_()(Rn,Rn)}function EX(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Xd(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function Vu(t){return t=Xd(Math.abs(t)),t?t[1]:NaN}function SX(t,e){return function(r,n){for(var a=r.length,i=[],o=0,s=t[0],l=0;a>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),i.push(r.substring(a-=s,a+s)),!((l+=s+1)>n));)s=t[o=(o+1)%t.length];return i.reverse().join(e)}}function TX(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var CX=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $l(t){if(!(e=CX.exec(t)))throw new Error("invalid format: "+t);var e;return new s_({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}$l.prototype=s_.prototype;function s_(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}s_.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function AX(t){e:for(var e=t.length,r=1,n=-1,a;r0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(a+1):t}var xN;function RX(t,e){var r=Xd(t,e);if(!r)return t+"";var n=r[0],a=r[1],i=a-(xN=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=n.length;return i===o?n:i>o?n+new Array(i-o+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Xd(t,Math.max(0,e+i-1))[0]}function $k(t,e){var r=Xd(t,e);if(!r)return t+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const Fk={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:EX,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>$k(t*100,e),r:$k,s:RX,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Hk(t){return t}var Uk=Array.prototype.map,Gk=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function MX(t){var e=t.grouping===void 0||t.thousands===void 0?Hk:SX(Uk.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",a=t.decimal===void 0?".":t.decimal+"",i=t.numerals===void 0?Hk:TX(Uk.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function f(h){h=$l(h);var g=h.fill,p=h.align,y=h.sign,b=h.symbol,w=h.zero,x=h.width,E=h.comma,S=h.precision,C=h.trim,A=h.type;A==="n"?(E=!0,A="g"):Fk[A]||(S===void 0&&(S=12),C=!0,A="g"),(w||g==="0"&&p==="=")&&(w=!0,g="0",p="=");var D=b==="$"?r:b==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():"",M=b==="$"?n:/[%p]/.test(A)?o:"",R=Fk[A],O=/[defgprs%]/.test(A);S=S===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function B(k){var N=D,L=M,q,V,P;if(A==="c")L=R(k)+L,k="";else{k=+k;var $=k<0||1/k<0;if(k=isNaN(k)?l:R(Math.abs(k),S),C&&(k=AX(k)),$&&+k==0&&y!=="+"&&($=!1),N=($?y==="("?y:s:y==="-"||y==="("?"":y)+N,L=(A==="s"?Gk[8+xN/3]:"")+L+($&&y==="("?")":""),O){for(q=-1,V=k.length;++qP||P>57){L=(P===46?a+k.slice(q+1):k.slice(q))+L,k=k.slice(0,q);break}}}E&&!w&&(k=e(k,1/0));var F=N.length+k.length+L.length,Y=F>1)+N+k+L+Y.slice(F);break;default:k=Y+N+k+L;break}return i(k)}return B.toString=function(){return h+""},B}function d(h,g){var p=f((h=$l(h),h.type="f",h)),y=Math.max(-8,Math.min(8,Math.floor(Vu(g)/3)))*3,b=Math.pow(10,-y),w=Gk[8+y/3];return function(x){return p(b*x)+w}}return{format:f,formatPrefix:d}}var Qc,l_,_N;OX({thousands:",",grouping:[3],currency:["$",""]});function OX(t){return Qc=MX(t),l_=Qc.format,_N=Qc.formatPrefix,Qc}function DX(t){return Math.max(0,-Vu(Math.abs(t)))}function kX(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Vu(e)/3)))*3-Vu(Math.abs(t)))}function LX(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Vu(e)-Vu(t))+1}function NX(t,e,r,n){var a=gX(t,e,r),i;switch(n=$l(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(i=kX(a,o))&&(n.precision=i),_N(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=LX(a,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=DX(a))&&(n.precision=i-(n.type==="%")*2);break}}return l_(n)}function f_(t){var e=t.domain;return t.ticks=function(r){var n=e();return Yx(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){var a=e();return NX(a[0],a[a.length-1],r??10,n)},t.nice=function(r){r==null&&(r=10);var n=e(),a=0,i=n.length-1,o=n[a],s=n[i],l,f,d=10;for(s0;){if(f=Xx(o,s,r),f===l)return n[a]=o,n[i]=s,e(n);if(f>0)o=Math.floor(o/f)*f,s=Math.ceil(s/f)*f;else if(f<0)o=Math.ceil(o*f)/f,s=Math.floor(s*f)/f;else break;l=f}return t},t}function EN(){var t=_X();return t.copy=function(){return o_(t,EN())},Zh.apply(t,arguments),f_(t)}function BX(t,e){t=t.slice();var r=0,n=t.length-1,a=t[r],i=t[n],o;return iMath.pow(t,e)}function VX(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Kk(t){return(e,r)=>-t(-e,r)}function $X(t){const e=t(Yk,Xk),r=e.domain;let n=10,a,i;function o(){return a=VX(n),i=IX(n),r()[0]<0?(a=Kk(a),i=Kk(i),t(qX,PX)):t(Yk,Xk),e}return e.base=function(s){return arguments.length?(n=+s,o()):n},e.domain=function(s){return arguments.length?(r(s),o()):r()},e.ticks=s=>{const l=r();let f=l[0],d=l[l.length-1];const h=d0){for(;g<=p;++g)for(y=1;yd)break;x.push(b)}}else for(;g<=p;++g)for(y=n-1;y>=1;--y)if(b=g>0?y/i(-g):y*i(g),!(bd)break;x.push(b)}x.length*2{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=$l(l)).precision==null&&(l.trim=!0),l=l_(l)),s===1/0)return l;const f=Math.max(1,n*s/e.ticks().length);return d=>{let h=d/i(Math.round(a(d)));return h*nr(BX(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),e}function SN(){const t=$X(u_()).domain([1,10]);return t.copy=()=>o_(t,SN()).base(t.base()),Zh.apply(t,arguments),t}function jk(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function FX(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function HX(t){return t<0?-t*t:t*t}function UX(t){var e=t(Rn,Rn),r=1;function n(){return r===1?t(Rn,Rn):r===.5?t(FX,HX):t(jk(r),jk(1/r))}return e.exponent=function(a){return arguments.length?(r=+a,n()):r},f_(e)}function TN(){var t=UX(u_());return t.copy=function(){return o_(t,TN()).exponent(t.exponent())},Zh.apply(t,arguments),t}function GX(){return TN.apply(null,arguments).exponent(.5)}function YX(){var t=0,e=1,r,n,a,i,o=Rn,s=!1,l;function f(h){return h==null||isNaN(h=+h)?l:o(a===0?.5:(h=(i(h)-r)*a,s?Math.max(0,Math.min(1,h)):h))}f.domain=function(h){return arguments.length?([t,e]=h,r=i(t=+t),n=i(e=+e),a=r===n?0:1/(n-r),f):[t,e]},f.clamp=function(h){return arguments.length?(s=!!h,f):s},f.interpolator=function(h){return arguments.length?(o=h,f):o};function d(h){return function(g){var p,y;return arguments.length?([p,y]=g,o=h(p,y),f):[o(0),o(1)]}}return f.range=d(jh),f.rangeRound=d(gN),f.unknown=function(h){return arguments.length?(l=h,f):l},function(h){return i=h,r=h(t),n=h(e),a=r===n?0:1/(n-r),f}}function XX(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function CN(){var t=f_(YX()(Rn));return t.copy=function(){return XX(t,CN())},pX.apply(t,arguments)}var jx="http://www.w3.org/1999/xhtml";const Zk={svg:"http://www.w3.org/2000/svg",xhtml:jx,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Qh(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Zk.hasOwnProperty(e)?{space:Zk[e],local:t}:t}function KX(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===jx&&e.documentElement.namespaceURI===jx?e.createElement(t):e.createElementNS(r,t)}}function jX(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function AN(t){var e=Qh(t);return(e.local?jX:KX)(e)}function ZX(){}function c_(t){return t==null?ZX:function(){return this.querySelector(t)}}function QX(t){typeof t!="function"&&(t=c_(t));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a=S&&(S=E+1);!(A=w[S])&&++S=0;)(o=n[a])&&(i&&o.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(o,i),i=o);return this}function _K(t){t||(t=EK);function e(h,g){return h&&g?t(h.__data__,g.__data__):!h-!g}for(var r=this._groups,n=r.length,a=new Array(n),i=0;ie?1:t>=e?0:NaN}function SK(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function TK(){return Array.from(this)}function CK(){for(var t=this._groups,e=0,r=t.length;e1?this.each((e==null?PK:typeof e=="function"?IK:zK)(t,e,r??"")):$u(this.node(),t)}function $u(t,e){return t.style.getPropertyValue(e)||kN(t).getComputedStyle(t,null).getPropertyValue(e)}function $K(t){return function(){delete this[t]}}function FK(t,e){return function(){this[t]=e}}function HK(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function UK(t,e){return arguments.length>1?this.each((e==null?$K:typeof e=="function"?HK:FK)(t,e)):this.node()[t]}function LN(t){return t.trim().split(/^|\s+/)}function d_(t){return t.classList||new NN(t)}function NN(t){this._node=t,this._names=LN(t.getAttribute("class")||"")}NN.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function BN(t,e){for(var r=d_(t),n=-1,a=e.length;++n=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function yj(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,a=e.length,i;r=0&&(n=r.slice(a+1),r=r.slice(0,a)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}wd.prototype=IN.prototype={constructor:wd,on:function(t,e){var r=this._,n=Rj(t+"",r),a,i=-1,o=n.length;if(arguments.length<2){for(;++i0)for(var r=new Array(a),n=0,a,i;n=0&&t._call.call(null,e),t=t._next;--Fu}function Wk(){Co=(Zd=Fl.now())+Wh,Fu=_l=0;try{Dj()}finally{Fu=0,Lj(),Co=0}}function kj(){var t=Fl.now(),e=t-Zd;e>VN&&(Wh-=e,Zd=t)}function Lj(){for(var t,e=jd,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:jd=r);El=t,Zx(n)}function Zx(t){if(!Fu){_l&&(_l=clearTimeout(_l));var e=t-Co;e>24?(t<1/0&&(_l=setTimeout(Wk,t-Fl.now()-Wh)),cl&&(cl=clearInterval(cl))):(cl||(Zd=Fl.now(),cl=setInterval(kj,VN)),Fu=1,$N(Wk))}}function Jk(t,e,r){var n=new Qd;return e=e==null?0:+e,n.restart(function(a){n.stop(),t(a+e)},e,r),n}var Nj=IN("start","end","cancel","interrupt"),Bj=[],HN=0,e4=1,Qx=2,xd=3,t4=4,Wx=5,_d=6;function Jh(t,e,r,n,a,i){var o=t.__transition;if(!o)t.__transition={};else if(r in o)return;qj(t,r,{name:e,index:n,group:a,on:Nj,tween:Bj,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:HN})}function v_(t,e){var r=Yn(t,e);if(r.state>HN)throw new Error("too late; already scheduled");return r}function ya(t,e){var r=Yn(t,e);if(r.state>xd)throw new Error("too late; already running");return r}function Yn(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function qj(t,e,r){var n=t.__transition,a;n[e]=r,r.timer=FN(i,0,r.time);function i(f){r.state=e4,r.timer.restart(o,r.delay,r.time),r.delay<=f&&o(f-r.delay)}function o(f){var d,h,g,p;if(r.state!==e4)return l();for(d in n)if(p=n[d],p.name===r.name){if(p.state===xd)return Jk(o);p.state===t4?(p.state=_d,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete n[d]):+dQx&&n.state>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Wc(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Wc(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Hj.exec(t))?new nn(e[1],e[2],e[3],1):(e=Uj.exec(t))?new nn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Gj.exec(t))?Wc(e[1],e[2],e[3],e[4]):(e=Yj.exec(t))?Wc(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Xj.exec(t))?s4(e[1],e[2]/100,e[3]/100,1):(e=Kj.exec(t))?s4(e[1],e[2]/100,e[3]/100,e[4]):r4.hasOwnProperty(t)?i4(r4[t]):t==="transparent"?new nn(NaN,NaN,NaN,0):null}function i4(t){return new nn(t>>16&255,t>>8&255,t&255,1)}function Wc(t,e,r,n){return n<=0&&(t=e=r=NaN),new nn(t,e,r,n)}function Zj(t){return t instanceof wf||(t=Gl(t)),t?(t=t.rgb(),new nn(t.r,t.g,t.b,t.opacity)):new nn}function Qj(t,e,r,n){return arguments.length===1?Zj(t):new nn(t,e,r,n??1)}function nn(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}p_(nn,Qj,UN(wf,{brighter:function(t){return t=t==null?Wd:Math.pow(Wd,t),new nn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=t==null?Hl:Math.pow(Hl,t),new nn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:o4,formatHex:o4,formatRgb:u4,toString:u4}));function o4(){return"#"+cx(this.r)+cx(this.g)+cx(this.b)}function u4(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(t===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(t===1?")":", "+t+")")}function cx(t){return t=Math.max(0,Math.min(255,Math.round(t)||0)),(t<16?"0":"")+t.toString(16)}function s4(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new ia(t,e,r,n)}function GN(t){if(t instanceof ia)return new ia(t.h,t.s,t.l,t.opacity);if(t instanceof wf||(t=Gl(t)),!t)return new ia;if(t instanceof ia)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,a=Math.min(e,r,n),i=Math.max(e,r,n),o=NaN,s=i-a,l=(i+a)/2;return s?(e===i?o=(r-n)/s+(r0&&l<1?0:o,new ia(o,s,l,t.opacity)}function Wj(t,e,r,n){return arguments.length===1?GN(t):new ia(t,e,r,n??1)}function ia(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}p_(ia,Wj,UN(wf,{brighter:function(t){return t=t==null?Wd:Math.pow(Wd,t),new ia(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=t==null?Hl:Math.pow(Hl,t),new ia(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,a=2*r-n;return new nn(dx(t>=240?t-240:t+120,a,n),dx(t,a,n),dx(t<120?t+240:t-120,a,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(t===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(t===1?")":", "+t+")")}}));function dx(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}function YN(t,e){var r;return(typeof e=="number"?In:e instanceof Gl?Gd:(r=Gl(e))?(e=r,Gd):vN)(t,e)}function Jj(t){return function(){this.removeAttribute(t)}}function eZ(t){return function(){this.removeAttributeNS(t.space,t.local)}}function tZ(t,e,r){var n,a=r+"",i;return function(){var o=this.getAttribute(t);return o===a?null:o===n?i:i=e(n=o,r)}}function rZ(t,e,r){var n,a=r+"",i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===n?i:i=e(n=o,r)}}function nZ(t,e,r){var n,a,i;return function(){var o,s=r(this),l;return s==null?void this.removeAttribute(t):(o=this.getAttribute(t),l=s+"",o===l?null:o===n&&l===a?i:(a=l,i=e(n=o,s)))}}function aZ(t,e,r){var n,a,i;return function(){var o,s=r(this),l;return s==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),l=s+"",o===l?null:o===n&&l===a?i:(a=l,i=e(n=o,s)))}}function iZ(t,e){var r=Qh(t),n=r==="transform"?tX:YN;return this.attrTween(t,typeof e=="function"?(r.local?aZ:nZ)(r,n,g_(this,"attr."+t,e)):e==null?(r.local?eZ:Jj)(r):(r.local?rZ:tZ)(r,n,e))}function oZ(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function uZ(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function sZ(t,e){var r,n;function a(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&uZ(t,i)),r}return a._value=e,a}function lZ(t,e){var r,n;function a(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&oZ(t,i)),r}return a._value=e,a}function fZ(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var n=Qh(t);return this.tween(r,(n.local?sZ:lZ)(n,e))}function cZ(t,e){return function(){v_(this,t).delay=+e.apply(this,arguments)}}function dZ(t,e){return e=+e,function(){v_(this,t).delay=e}}function hZ(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?cZ:dZ)(e,t)):Yn(this.node(),e).delay}function vZ(t,e){return function(){ya(this,t).duration=+e.apply(this,arguments)}}function gZ(t,e){return e=+e,function(){ya(this,t).duration=e}}function pZ(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?vZ:gZ)(e,t)):Yn(this.node(),e).duration}function mZ(t,e){if(typeof e!="function")throw new Error;return function(){ya(this,t).ease=e}}function yZ(t){var e=this._id;return arguments.length?this.each(mZ(e,t)):Yn(this.node(),e).ease}function bZ(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;ya(this,t).ease=r}}function wZ(t){if(typeof t!="function")throw new Error;return this.each(bZ(this._id,t))}function xZ(t){typeof t!="function"&&(t=MN(t));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a=0&&(e=e.slice(0,r)),!e||e==="start"})}function SZ(t,e,r){var n,a,i=EZ(e)?v_:ya;return function(){var o=i(this,t),s=o.on;s!==n&&(a=(n=s).copy()).on(e,r),o.on=a}}function TZ(t,e){var r=this._id;return arguments.length<2?Yn(this.node(),r).on.on(t):this.each(SZ(r,t,e))}function CZ(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function AZ(){return this.on("end.remove",CZ(this._id))}function RZ(t){var e=this._name,r=this._id;typeof t!="function"&&(t=c_(t));for(var n=this._groups,a=n.length,i=new Array(a),o=0;o=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),l4.hasOwnProperty(e)?{space:l4[e],local:t}:t}function JZ(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Jx&&e.documentElement.namespaceURI===Jx?e.createElement(t):e.createElementNS(r,t)}}function eQ(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ZN(t){var e=jN(t);return(e.local?eQ:JZ)(e)}var tQ=0;function f4(){this._="@"+(++tQ).toString(36)}f4.prototype={constructor:f4,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var QN=function(t){return function(){return this.matches(t)}};if(typeof document<"u"){var dl=document.documentElement;if(!dl.matches){var rQ=dl.webkitMatchesSelector||dl.msMatchesSelector||dl.mozMatchesSelector||dl.oMatchesSelector;QN=function(t){return function(){return rQ.call(this,t)}}}}const nQ=QN;var WN={};if(typeof document<"u"){var aQ=document.documentElement;"onmouseenter"in aQ||(WN={mouseenter:"mouseover",mouseleave:"mouseout"})}function iQ(t,e,r){return t=JN(t,e,r),function(n){var a=n.relatedTarget;(!a||a!==this&&!(a.compareDocumentPosition(this)&8))&&t.call(this,n)}}function JN(t,e,r){return function(n){try{t.call(this,this.__data__,e,r)}finally{}}}function oQ(t){return t.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function uQ(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,a=e.length,i;r=S&&(S=E+1);!(A=w[S])&&++S=0;)(o=n[a])&&(i&&i!==o.nextSibling&&i.parentNode.insertBefore(o,i),i=o);return this}function SQ(t){t||(t=TQ);function e(h,g){return h&&g?t(h.__data__,g.__data__):!h-!g}for(var r=this._groups,n=r.length,a=new Array(n),i=0;ie?1:t>=e?0:NaN}function CQ(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function AQ(){var t=new Array(this.size()),e=-1;return this.each(function(){t[++e]=this}),t}function RQ(){for(var t=this._groups,e=0,r=t.length;e1?this.each((e==null?IQ:typeof e=="function"?$Q:VQ)(t,e,r??"")):rB(n=this.node()).getComputedStyle(n,null).getPropertyValue(t)}function HQ(t){return function(){delete this[t]}}function UQ(t,e){return function(){this[t]=e}}function GQ(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function YQ(t,e){return arguments.length>1?this.each((e==null?HQ:typeof e=="function"?GQ:UQ)(t,e)):this.node()[t]}function nB(t){return t.trim().split(/^|\s+/)}function m_(t){return t.classList||new aB(t)}function aB(t){this._node=t,this._names=nB(t.getAttribute("class")||"")}aB.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function iB(t,e){for(var r=m_(t),n=-1,a=e.length;++n1?n[0]+n.slice(2):n,+t.slice(r+1)]}function Hu(t){return t=eh(Math.abs(t)),t?t[1]:NaN}function wW(t,e){return function(r,n){for(var a=r.length,i=[],o=0,s=t[0],l=0;a>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),i.push(r.substring(a-=s,a+s)),!((l+=s+1)>n));)s=t[o=(o+1)%t.length];return i.reverse().join(e)}}function xW(t,e){t=t.toPrecision(e);e:for(var r=t.length,n=1,a=-1,i;n0&&(a=0);break}return a>0?t.slice(0,a)+t.slice(i+1):t}var sB;function _W(t,e){var r=eh(t,e);if(!r)return t+"";var n=r[0],a=r[1],i=a-(sB=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=n.length;return i===o?n:i>o?n+new Array(i-o+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+eh(t,Math.max(0,e+i-1))[0]}function d4(t,e){var r=eh(t,e);if(!r)return t+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const lB={"":xW,"%":function(t,e){return(t*100).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return d4(t*100,e)},r:d4,s:_W,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};var EW=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;function th(t){return new fB(t)}function fB(t){if(!(e=EW.exec(t)))throw new Error("invalid format: "+t);var e,r=e[1]||" ",n=e[2]||">",a=e[3]||"-",i=e[4]||"",o=!!e[5],s=e[6]&&+e[6],l=!!e[7],f=e[8]&&+e[8].slice(1),d=e[9]||"";d==="n"?(l=!0,d="g"):lB[d]||(d=""),(o||r==="0"&&n==="=")&&(o=!0,r="0",n="="),this.fill=r,this.align=n,this.sign=a,this.symbol=i,this.zero=o,this.width=s,this.comma=l,this.precision=f,this.type=d}fB.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width==null?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision==null?"":"."+Math.max(0,this.precision|0))+this.type};var h4=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function SW(t){return t}function cB(t){var e=t.grouping&&t.thousands?wW(t.grouping,t.thousands):SW,r=t.currency,n=t.decimal;function a(o){o=th(o);var s=o.fill,l=o.align,f=o.sign,d=o.symbol,h=o.zero,g=o.width,p=o.comma,y=o.precision,b=o.type,w=d==="$"?r[0]:d==="#"&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x=d==="$"?r[1]:/[%p]/.test(b)?"%":"",E=lB[b],S=!b||/[defgprs%]/.test(b);y=y==null?b?6:12:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function C(A){var D=w,M=x,R,O,B;if(b==="c")M=E(A)+M,A="";else{A=+A;var k=(A<0||1/A<0)&&(A*=-1,!0);if(A=E(A,y),k){for(R=-1,O=A.length,k=!1;++RB||B>57){M=(B===46?n+A.slice(R+1):A.slice(R))+M,A=A.slice(0,R);break}}}p&&!h&&(A=e(A,1/0));var N=D.length+A.length+M.length,L=N>1)+D+A+M+L.slice(N)}return L+D+A+M}return C.toString=function(){return o+""},C}function i(o,s){var l=a((o=th(o),o.type="f",o)),f=Math.max(-8,Math.min(8,Math.floor(Hu(s)/3)))*3,d=Math.pow(10,-f),h=h4[8+f/3];return function(g){return l(d*g)+h}}return{format:a,formatPrefix:i}}var Jc,y_,b_;TW({decimal:".",thousands:",",grouping:[3],currency:["$",""]});function TW(t){return Jc=cB(t),y_=Jc.format,b_=Jc.formatPrefix,Jc}function CW(t){return Math.max(0,-Hu(Math.abs(t)))}function AW(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Hu(e)/3)))*3-Hu(Math.abs(t)))}function RW(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Hu(e)-Hu(t))+1}var MW={value:function(){}};function dB(){for(var t=0,e=arguments.length,r={},n;t=0&&(n=r.slice(a+1),r=r.slice(0,a)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Ed.prototype=dB.prototype={constructor:Ed,on:function(t,e){var r=this._,n=OW(t+"",r),a,i=-1,o=n.length;if(arguments.length<2){for(;++i0)for(var r=new Array(a),n=0,a,i;ne?1:t>=e?0:NaN}function kW(t){return t.length===1&&(t=LW(t)),{left:function(e,r,n,a){for(n==null&&(n=0),a==null&&(a=e.length);n>>1;t(e[i],r)<0?n=i+1:a=i}return n},right:function(e,r,n,a){for(n==null&&(n=0),a==null&&(a=e.length);n>>1;t(e[i],r)>0?a=i:n=i+1}return n}}}function LW(t){return function(e,r){return hB(t(e),r)}}var NW=kW(hB),BW=NW.right;function qW(t,e,r){t=+t,e=+e,r=(a=arguments.length)<2?(e=t,t=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((e-t)/r))|0,i=new Array(a);++n=PW?a*=10:i>=zW?a*=5:i>=IW&&(a*=2),e>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?ed(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?ed(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=UW.exec(t))?new Vr(e[1],e[2],e[3],1):(e=GW.exec(t))?new Vr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=YW.exec(t))?ed(e[1],e[2],e[3],e[4]):(e=XW.exec(t))?ed(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=KW.exec(t))?E4(e[1],e[2]/100,e[3]/100,1):(e=jW.exec(t))?E4(e[1],e[2]/100,e[3]/100,e[4]):m4.hasOwnProperty(t)?w4(m4[t]):t==="transparent"?new Vr(NaN,NaN,NaN,0):null}function w4(t){return new Vr(t>>16&255,t>>8&255,t&255,1)}function ed(t,e,r,n){return n<=0&&(t=e=r=NaN),new Vr(t,e,r,n)}function pB(t){return t instanceof as||(t=Xl(t)),t?(t=t.rgb(),new Vr(t.r,t.g,t.b,t.opacity)):new Vr}function e2(t,e,r,n){return arguments.length===1?pB(t):new Vr(t,e,r,n??1)}function Vr(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}ev(Vr,e2,w_(as,{brighter:function(t){return t=t==null?Uu:Math.pow(Uu,t),new Vr(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=t==null?Ao:Math.pow(Ao,t),new Vr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:x4,formatHex:x4,formatRgb:_4,toString:_4}));function x4(){return"#"+hx(this.r)+hx(this.g)+hx(this.b)}function _4(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(t===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(t===1?")":", "+t+")")}function hx(t){return t=Math.max(0,Math.min(255,Math.round(t)||0)),(t<16?"0":"")+t.toString(16)}function E4(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new oa(t,e,r,n)}function mB(t){if(t instanceof oa)return new oa(t.h,t.s,t.l,t.opacity);if(t instanceof as||(t=Xl(t)),!t)return new oa;if(t instanceof oa)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,a=Math.min(e,r,n),i=Math.max(e,r,n),o=NaN,s=i-a,l=(i+a)/2;return s?(e===i?o=(r-n)/s+(r0&&l<1?0:o,new oa(o,s,l,t.opacity)}function QW(t,e,r,n){return arguments.length===1?mB(t):new oa(t,e,r,n??1)}function oa(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}ev(oa,QW,w_(as,{brighter:function(t){return t=t==null?Uu:Math.pow(Uu,t),new oa(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=t==null?Ao:Math.pow(Ao,t),new oa(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,a=2*r-n;return new Vr(vx(t>=240?t-240:t+120,a,n),vx(t,a,n),vx(t<120?t+240:t-120,a,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(t===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(t===1?")":", "+t+")")}}));function vx(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}var WW=Math.PI/180,JW=180/Math.PI,yB=-.14861,x_=1.78277,__=-.29227,tv=-.90649,Kl=1.97294,S4=Kl*tv,T4=Kl*x_,C4=x_*__-tv*yB;function eJ(t){if(t instanceof wo)return new wo(t.h,t.s,t.l,t.opacity);t instanceof Vr||(t=pB(t));var e=t.r/255,r=t.g/255,n=t.b/255,a=(C4*n+S4*e-T4*r)/(C4+S4-T4),i=n-a,o=(Kl*(r-a)-__*i)/tv,s=Math.sqrt(o*o+i*i)/(Kl*a*(1-a)),l=s?Math.atan2(o,i)*JW-120:NaN;return new wo(l<0?l+360:l,s,a,t.opacity)}function va(t,e,r,n){return arguments.length===1?eJ(t):new wo(t,e,r,n??1)}function wo(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}ev(wo,va,w_(as,{brighter:function(t){return t=t==null?Uu:Math.pow(Uu,t),new wo(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=t==null?Ao:Math.pow(Ao,t),new wo(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*WW,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),a=Math.sin(t);return new Vr(255*(e+r*(yB*n+x_*a)),255*(e+r*(__*n+tv*a)),255*(e+r*(Kl*n)),this.opacity)}}));function rv(t){return function(){return t}}function bB(t,e){return function(r){return t+r*e}}function tJ(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function rJ(t,e){var r=e-t;return r?bB(t,r>180||r<-180?r-360*Math.round(r/360):r):rv(isNaN(t)?e:t)}function nJ(t){return(t=+t)==1?Bu:function(e,r){return r-e?tJ(e,r,t):rv(isNaN(e)?r:e)}}function Bu(t,e){var r=e-t;return r?bB(t,r):rv(isNaN(t)?e:t)}const A4=function t(e){var r=nJ(e);function n(a,i){var o=r((a=e2(a)).r,(i=e2(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),f=Bu(a.opacity,i.opacity);return function(d){return a.r=o(d),a.g=s(d),a.b=l(d),a.opacity=f(d),a+""}}return n.gamma=t,n}(1);function aJ(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),a;return function(i){for(a=0;ar&&(i=e.slice(r,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,l.push({i:o,x:ah(n,a)})),r=gx.lastIndex;return r=r?1:n(a)}}}function pJ(t){return function(e,r){var n=t(e=+e,r=+r);return function(a){return a<=0?e:a>=1?r:n(a)}}}function mJ(t,e,r,n){var a=t[0],i=t[1],o=e[0],s=e[1];return i2?yJ:mJ,s=l=null,d}function d(h){return(s||(s=o(r,n,i?gJ(t):t,a)))(+h)}return d.invert=function(h){return(l||(l=o(n,r,xB,i?pJ(e):e)))(+h)},d.domain=function(h){return arguments.length?(r=FW.call(h,vJ),f()):r.slice()},d.range=function(h){return arguments.length?(n=p4.call(h),f()):n.slice()},d.rangeRound=function(h){return n=p4.call(h),a=dJ,f()},d.clamp=function(h){return arguments.length?(i=!!h,f()):i},d.interpolate=function(h){return arguments.length?(a=h,f()):a},f()}function xJ(t,e,r){var n=t[0],a=t[t.length-1],i=rh(n,a,e??10),o;switch(r=th(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(n),Math.abs(a));return r.precision==null&&!isNaN(o=AW(i,s))&&(r.precision=o),b_(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=RW(i,Math.max(Math.abs(n),Math.abs(a))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=CW(i))&&(r.precision=o-(r.type==="%")*2);break}}return y_(r)}function _J(t){var e=t.domain;return t.ticks=function(r){var n=e();return VW(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){return xJ(e(),r,n)},t.nice=function(r){var n=e(),a=n.length-1,i=r??10,o=n[0],s=n[a],l=rh(o,s,i);return l&&(l=rh(Math.floor(o/l)*l,Math.ceil(s/l)*l,i),n[0]=Math.floor(o/l)*l,n[a]=Math.ceil(s/l)*l,e(n)),t},t}function _B(){var t=wJ(xB,ah);return t.copy=function(){return bJ(t,_B())},_J(t)}function zi(t){return t.match(/.{6}/g).map(function(e){return"#"+e})}zi("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");zi("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6");zi("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9");zi("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5");S_(va(300,.5,0),va(-240,.5,1));S_(va(-100,.75,.35),va(80,1.5,.8));S_(va(260,.75,.35),va(80,1.5,.8));va();function nv(t){var e=t.length;return function(r){return t[Math.max(0,Math.min(e-1,Math.floor(r*e)))]}}nv(zi("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));nv(zi("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf"));nv(zi("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4"));nv(zi("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));var EJ=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},EB=function(e){return e},M4=function(e){for(var r=[],n=0,a=e.length;nr&&o.length>1&&(o.pop(),f.text(o.join(" ")),o=[i],f=n.append("tspan").attr("x",0).attr("dy",s+l+"em").text(i))})},SJ=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments[1],n=arguments[2],a=arguments[3],i=arguments[4];if((typeof r>"u"?"undefined":EJ(r))==="object"){if(r.length===0)return e;for(var o=r.length;o1)a=r;else for(var i=e.domain(),o=(i[i.length-1]-i[0])/(r-1),s=0;s1||R>=2)&&(o=R),M):o},M.cellFilter=function(R){return arguments.length?(s=R,M):s},M.shape=function(R,O){return arguments.length?((R=="rect"||R=="circle"||R=="line"||R=="path"&&typeof O=="string")&&(e=R,C=O),M):e},M.shapeWidth=function(R){return arguments.length?(r=+R,M):r},M.shapeHeight=function(R){return arguments.length?(n=+R,M):n},M.shapeRadius=function(R){return arguments.length?(a=+R,M):a},M.shapePadding=function(R){return arguments.length?(i=+R,M):i},M.labels=function(R){return arguments.length?(l=R,M):l},M.labelAlign=function(R){return arguments.length?((R=="start"||R=="end"||R=="middle")&&(b=R),M):b},M.locale=function(R){return arguments.length?(g=cB(R),M):g},M.labelFormat=function(R){return arguments.length?(p=th(R),M):M.locale().format(p)},M.labelOffset=function(R){return arguments.length?(y=+R,M):y},M.labelDelimiter=function(R){return arguments.length?(w=R,M):w},M.labelWrap=function(R){return arguments.length?(x=R,M):x},M.useClass=function(R){return arguments.length?((R===!0||R===!1)&&(d=R),M):d},M.orient=function(R){return arguments.length?(R=R.toLowerCase(),(R=="horizontal"||R=="vertical")&&(E=R),M):E},M.ascending=function(R){return arguments.length?(S=!!R,M):S},M.classPrefix=function(R){return arguments.length?(f=R,M):f},M.title=function(R){return arguments.length?(h=R,M):h},M.titleWidth=function(R){return arguments.length?(A=R,M):A},M.textWrap=function(R){return arguments.length?(textWrap=R,M):textWrap},M.on=function(){var R=D.on.apply(D,arguments);return R===D?M:R},M}const kJ=new Set(["id","type","library_name","pipeline_tag"]),LJ=new Set(["downloads","likes","downloads","downloads_all_time","trending_score","used_storage"]);function SB(t){return kJ.has(t)}function NJ(t){return LJ.has(t)}function BJ(t,e){if(SB(e)){const r=new Set(t.filter(a=>a.group==="nodes").map(a=>a.data[e]));return wN(r,TY)}else if(NJ(e)){const r=t.map(i=>i.data[e]).filter(i=>isNaN(i)===!1),n=[Math.min(...r),Math.max(...r)];return CN(n,yN)}}function qJ(t,e){const r=t.map(i=>i.data[e]).filter(i=>isNaN(i)===!1),n=[Math.min(...r),Math.max(...r)],a=[5,30];return GX().domain(n).range(a)}function PJ({layout:t,label:e,edgeScale:r,nodeColor:n,nodeSize:a,colorLegendId:i,sizeLegendId:o}){const s=O9,l=Ee.useRef(sa({}));return Ee.useEffect(()=>{sa.use(hY),sa.use(SY);const f=document.getElementById("cyContainer"),d=document.getElementById("cy");d&&f&&(d.style.height=`${f.clientHeight}px`);const h=typeof t=="string"?{name:t}:t;l.current=window.cy=sa({container:d,elements:s,layout:h}),l.current.style().selector("node").style({"font-size":8}).update()},[s,t]),Ee.useEffect(()=>{if(!l.current)return;const f=r==="linear"?EN:SN,d=s.filter(g=>g.group==="edges").map(g=>g.data.weight),h=f().domain([Math.min(...d),Math.max(...d)]).range([.1,1.5]);l.current.style().selector("edge").style({width:g=>h(g.data("weight"))}).update()},[r,s,t]),Ee.useEffect(()=>{if(!l.current)return;const f=a?qJ(s,a):void 0;l.current.style().selector("node").style({width:d=>f?f(d.data(a)):20,height:d=>f?f(d.data(a)):20}).update()},[a,s,t,o]),Ee.useEffect(()=>{if(!l.current)return;const f=n?BJ(s,n):void 0;if(l.current.style().selector("node").style({"background-color":d=>f?f(d.data(n)):yN(.5)}).update(),i&&n){const d=Cj(`#${i}`);d.selectAll("*").remove();const h=SB(n)?"legendOrdinal":"legendQuant";d.append("g").attr("class",h).attr("transform","translate(3, 10)");const g=DJ().scale(f);d.select(`.${h}`).call(g)}},[n,s,t,i]),Ee.useEffect(()=>{l.current&&l.current.style().selector("node").style({label:f=>e?f.data("id").replace(/(.*?\/){2}/,""):"","font-size":5}).update()},[e]),Ee.useEffect(()=>{if(!l.current)return;const f=typeof t=="string"?{name:t}:t;l.current.layout(f).run(),l.current.fit()},[t]),vt.jsx("div",{children:vt.jsx("div",{id:"cy",style:{width:"100%",height:"800px"}})})}function Ro(t){"@babel/helpers - typeof";return Ro=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ro(t)}function zJ(t,e){if(Ro(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Ro(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function TB(t){var e=zJ(t,"string");return Ro(e)=="symbol"?e:e+""}function Sl(t,e,r){return(e=TB(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function D4(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ye(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=Array(e);r0?Tr(is,--Zr):0,Gu--,er===10&&(Gu=1,iv--),er}function on(){return er=Zr2||Zl(er)>3?"":" "}function hee(t,e){for(;--e&&on()&&!(er<48||er>102||er>57&&er<65||er>70&&er<97););return xf(t,Sd()+(e<6&&da()==32&&on()==32))}function i2(t){for(;on();)switch(er){case t:return Zr;case 34:case 39:t!==34&&t!==39&&i2(er);break;case 40:t===41&&i2(t);break;case 92:on();break}return Zr}function vee(t,e){for(;on()&&t+er!==57;)if(t+er===84&&da()===47)break;return"/*"+xf(e,Zr-1)+"*"+av(t===47?t:on())}function gee(t){for(;!Zl(da());)on();return xf(t,Zr)}function pee(t){return LB(Cd("",null,null,null,[""],t=kB(t),0,[0],t))}function Cd(t,e,r,n,a,i,o,s,l){for(var f=0,d=0,h=o,g=0,p=0,y=0,b=1,w=1,x=1,E=0,S="",C=a,A=i,D=n,M=S;w;)switch(y=E,E=on()){case 40:if(y!=108&&Tr(M,h-1)==58){a2(M+=gt(Td(E),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:M+=Td(E);break;case 9:case 10:case 13:case 32:M+=dee(y);break;case 92:M+=hee(Sd()-1,7);continue;case 47:switch(da()){case 42:case 47:td(mee(vee(on(),Sd()),e,r),l);break;default:M+="/"}break;case 123*b:s[f++]=na(M)*x;case 125*b:case 59:case 0:switch(E){case 0:case 125:w=0;case 59+d:x==-1&&(M=gt(M,/\f/g,"")),p>0&&na(M)-h&&td(p>32?N4(M+";",n,r,h-1):N4(gt(M," ","")+";",n,r,h-2),l);break;case 59:M+=";";default:if(td(D=L4(M,e,r,f,d,a,s,S,C=[],A=[],h),i),E===123)if(d===0)Cd(M,e,D,D,C,i,h,s,A);else switch(g===99&&Tr(M,3)===110?100:g){case 100:case 108:case 109:case 115:Cd(t,D,D,n&&td(L4(t,D,D,0,0,a,s,S,a,C=[],h),A),a,A,h,s,n?C:A);break;default:Cd(M,D,D,D,[""],A,0,s,A)}}f=d=p=0,b=x=1,S=M="",h=o;break;case 58:h=1+na(M),p=y;default:if(b<1){if(E==123)--b;else if(E==125&&b++==0&&cee()==125)continue}switch(M+=av(E),E*b){case 38:x=d>0?1:(M+="\f",-1);break;case 44:s[f++]=(na(M)-1)*x,x=1;break;case 64:da()===45&&(M+=Td(on())),g=da(),d=h=na(S=M+=gee(Sd())),E++;break;case 45:y===45&&na(M)==2&&(b=0)}}return i}function L4(t,e,r,n,a,i,o,s,l,f,d){for(var h=a-1,g=a===0?i:[""],p=R_(g),y=0,b=0,w=0;y0?g[x]+" "+E:gt(E,/&\f/g,g[x])))&&(l[w++]=S);return ov(t,e,r,a===0?C_:s,l,f,d)}function mee(t,e,r){return ov(t,e,r,RB,av(fee()),jl(t,2,-2),0)}function N4(t,e,r,n){return ov(t,e,r,A_,jl(t,0,n),jl(t,n+1,-1),n)}function qu(t,e){for(var r="",n=R_(t),a=0;a6)switch(Tr(t,e+1)){case 109:if(Tr(t,e+4)!==45)break;case 102:return gt(t,/(.+:)(.+)-([^]+)/,"$1"+ht+"$2-$3$1"+oh+(Tr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~a2(t,"stretch")?NB(gt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Tr(t,e+1)!==115)break;case 6444:switch(Tr(t,na(t)-3-(~a2(t,"!important")&&10))){case 107:return gt(t,":",":"+ht)+t;case 101:return gt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ht+(Tr(t,14)===45?"inline-":"")+"box$3$1"+ht+"$2$3$1"+Lr+"$2box$3")+t}break;case 5936:switch(Tr(t,e+11)){case 114:return ht+t+Lr+gt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return ht+t+Lr+gt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return ht+t+Lr+gt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return ht+t+Lr+t+t}return t}var Aee=function(e,r,n,a){if(e.length>-1&&!e.return)switch(e.type){case A_:e.return=NB(e.value,e.length);break;case MB:return qu([hl(e,{value:gt(e.value,"@","@"+ht)})],a);case C_:if(e.length)return lee(e.props,function(i){switch(see(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return qu([hl(e,{props:[gt(i,/:(read-\w+)/,":"+oh+"$1")]})],a);case"::placeholder":return qu([hl(e,{props:[gt(i,/:(plac\w+)/,":"+ht+"input-$1")]}),hl(e,{props:[gt(i,/:(plac\w+)/,":"+oh+"$1")]}),hl(e,{props:[gt(i,/:(plac\w+)/,Lr+"input-$1")]})],a)}return""})}},Ree=[Aee],Mee=function(e){var r=e.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(b){var w=b.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(b),b.setAttribute("data-s",""))})}var a=e.stylisPlugins||Ree,i={},o,s=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(b){for(var w=b.getAttribute("data-emotion").split(" "),x=1;x=4;++n,a-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(a){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Pee={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},zee=/[A-Z]|^ms/g,Iee=/_EMO_([^_]+?)_([^]*?)_EMO_/g,qB=function(e){return e.charCodeAt(1)===45},I4=function(e){return e!=null&&typeof e!="boolean"},yx=xee(function(t){return qB(t)?t:t.replace(zee,"-$&").toLowerCase()}),V4=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(Iee,function(n,a,i){return aa={name:a,styles:i,next:aa},a})}return Pee[e]!==1&&!qB(e)&&typeof r=="number"&&r!==0?r+"px":r};function Ql(t,e,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var a=r;if(a.anim===1)return aa={name:a.name,styles:a.styles,next:aa},a.name;var i=r;if(i.styles!==void 0){var o=i.next;if(o!==void 0)for(;o!==void 0;)aa={name:o.name,styles:o.styles,next:aa},o=o.next;var s=i.styles+";";return s}return Vee(t,e,r)}case"function":{if(t!==void 0){var l=aa,f=r(t);return aa=l,Ql(t,e,f)}break}}var d=r;return d}function Vee(t,e,r){var n="";if(Array.isArray(r))for(var a=0;a({x:t,y:t});function tte(t){const{x:e,y:r,width:n,height:a}=t;return{width:n,height:a,top:r,left:e,right:e+n,bottom:r+a,x:e,y:r}}function uv(){return typeof window<"u"}function IB(t){return $B(t)?(t.nodeName||"").toLowerCase():"#document"}function Ya(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function VB(t){var e;return(e=($B(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function $B(t){return uv()?t instanceof Node||t instanceof Ya(t).Node:!1}function rte(t){return uv()?t instanceof Element||t instanceof Ya(t).Element:!1}function D_(t){return uv()?t instanceof HTMLElement||t instanceof Ya(t).HTMLElement:!1}function F4(t){return!uv()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ya(t).ShadowRoot}function FB(t){const{overflow:e,overflowX:r,overflowY:n,display:a}=k_(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(a)}function nte(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ate(t){return["html","body","#document"].includes(IB(t))}function k_(t){return Ya(t).getComputedStyle(t)}function ite(t){if(IB(t)==="html")return t;const e=t.assignedSlot||t.parentNode||F4(t)&&t.host||VB(t);return F4(e)?e.host:e}function HB(t){const e=ite(t);return ate(e)?t.ownerDocument?t.ownerDocument.body:t.body:D_(e)&&FB(e)?e:HB(e)}function lh(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const a=HB(t),i=a===((n=t.ownerDocument)==null?void 0:n.body),o=Ya(a);if(i){const s=u2(o);return e.concat(o,o.visualViewport||[],FB(a)?a:[],s&&r?lh(s):[])}return e.concat(a,lh(a,[],r))}function u2(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ote(t){const e=k_(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const a=D_(t),i=a?t.offsetWidth:r,o=a?t.offsetHeight:n,s=uh(r)!==i||uh(n)!==o;return s&&(r=i,n=o),{width:r,height:n,$:s}}function L_(t){return rte(t)?t:t.contextElement}function H4(t){const e=L_(t);if(!D_(e))return sh(1);const r=e.getBoundingClientRect(),{width:n,height:a,$:i}=ote(e);let o=(i?uh(r.width):r.width)/n,s=(i?uh(r.height):r.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const ute=sh(0);function ste(t){const e=Ya(t);return!nte()||!e.visualViewport?ute:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function lte(t,e,r){return!1}function U4(t,e,r,n){e===void 0&&(e=!1);const a=t.getBoundingClientRect(),i=L_(t);let o=sh(1);e&&(o=H4(t));const s=lte()?ste(i):sh(0);let l=(a.left+s.x)/o.x,f=(a.top+s.y)/o.y,d=a.width/o.x,h=a.height/o.y;if(i){const g=Ya(i),p=n;let y=g,b=u2(y);for(;b&&n&&p!==y;){const w=H4(b),x=b.getBoundingClientRect(),E=k_(b),S=x.left+(b.clientLeft+parseFloat(E.paddingLeft))*w.x,C=x.top+(b.clientTop+parseFloat(E.paddingTop))*w.y;l*=w.x,f*=w.y,d*=w.x,h*=w.y,l+=S,f+=C,y=Ya(b),b=u2(y)}}return tte({width:d,height:h,x:l,y:f})}function UB(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function fte(t,e){let r=null,n;const a=VB(t);function i(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const f=t.getBoundingClientRect(),{left:d,top:h,width:g,height:p}=f;if(s||e(),!g||!p)return;const y=rd(h),b=rd(a.clientWidth-(d+g)),w=rd(a.clientHeight-(h+p)),x=rd(d),S={rootMargin:-y+"px "+-b+"px "+-w+"px "+-x+"px",threshold:ete(0,Jee(1,l))||1};let C=!0;function A(D){const M=D[0].intersectionRatio;if(M!==l){if(!C)return o();M?o(!1,M):n=setTimeout(()=>{o(!1,1e-7)},1e3)}M===1&&!UB(f,t.getBoundingClientRect())&&o(),C=!1}try{r=new IntersectionObserver(A,{...S,root:a.ownerDocument})}catch{r=new IntersectionObserver(A,S)}r.observe(t)}return o(!0),i}function cte(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,f=L_(t),d=a||i?[...f?lh(f):[],...lh(e)]:[];d.forEach(x=>{a&&x.addEventListener("scroll",r,{passive:!0}),i&&x.addEventListener("resize",r)});const h=f&&s?fte(f,r):null;let g=-1,p=null;o&&(p=new ResizeObserver(x=>{let[E]=x;E&&E.target===f&&p&&(p.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(e)})),r()}),f&&!l&&p.observe(f),p.observe(e));let y,b=l?U4(t):null;l&&w();function w(){const x=U4(t);b&&!UB(b,x)&&r(),b=x,y=requestAnimationFrame(w)}return r(),()=>{var x;d.forEach(E=>{a&&E.removeEventListener("scroll",r),i&&E.removeEventListener("resize",r)}),h==null||h(),(x=p)==null||x.disconnect(),p=null,l&&cancelAnimationFrame(y)}}var s2=Ee.useLayoutEffect,dte=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],fh=function(){};function hte(t,e){return e?e[0]==="-"?t+e:t+"__"+e:t}function vte(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),a=2;a-1}function gte(t){return sv(t)?window.innerHeight:t.clientHeight}function YB(t){return sv(t)?window.pageYOffset:t.scrollTop}function ch(t,e){if(sv(t)){window.scrollTo(0,e);return}t.scrollTop=e}function pte(t){var e=getComputedStyle(t),r=e.position==="absolute",n=/(auto|scroll)/;if(e.position==="fixed")return document.documentElement;for(var a=t;a=a.parentElement;)if(e=getComputedStyle(a),!(r&&e.position==="static")&&n.test(e.overflow+e.overflowY+e.overflowX))return a;return document.documentElement}function mte(t,e,r,n){return r*((t=t/n-1)*t*t+1)+e}function nd(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:fh,a=YB(t),i=e-a,o=10,s=0;function l(){s+=o;var f=mte(s,a,i,r);ch(t,f),sr.bottom?ch(t,Math.min(e.offsetTop+e.clientHeight-t.offsetHeight+a,t.scrollHeight)):n.top-a1?r-1:0),a=1;a=y)return{placement:"bottom",maxHeight:e};if(O>=y&&!o)return i&&nd(l,B,N),{placement:"bottom",maxHeight:e};if(!o&&O>=n||o&&M>=n){i&&nd(l,B,N);var L=o?M-C:O-C;return{placement:"bottom",maxHeight:L}}if(a==="auto"||o){var q=e,V=o?D:R;return V>=n&&(q=Math.min(V-C-s,e)),{placement:"top",maxHeight:q}}if(a==="bottom")return i&&ch(l,B),{placement:"bottom",maxHeight:e};break;case"top":if(D>=y)return{placement:"top",maxHeight:e};if(R>=y&&!o)return i&&nd(l,k,N),{placement:"top",maxHeight:e};if(!o&&R>=n||o&&D>=n){var P=e;return(!o&&R>=n||o&&D>=n)&&(P=o?D-A:R-A),i&&nd(l,k,N),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(a,'".'))}return f}function Rte(t){var e={bottom:"top",top:"bottom"};return t?e[t]:"bottom"}var KB=function(e){return e==="auto"?"bottom":e},Mte=function(e,r){var n,a=e.placement,i=e.theme,o=i.borderRadius,s=i.spacing,l=i.colors;return Ye((n={label:"menu"},Sl(n,Rte(a),"100%"),Sl(n,"position","absolute"),Sl(n,"width","100%"),Sl(n,"zIndex",1),n),r?{}:{backgroundColor:l.neutral0,borderRadius:o,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},jB=Ee.createContext(null),Ote=function(e){var r=e.children,n=e.minMenuHeight,a=e.maxMenuHeight,i=e.menuPlacement,o=e.menuPosition,s=e.menuShouldScrollIntoView,l=e.theme,f=Ee.useContext(jB)||{},d=f.setPortalPlacement,h=Ee.useRef(null),g=Ee.useState(a),p=Fa(g,2),y=p[0],b=p[1],w=Ee.useState(null),x=Fa(w,2),E=x[0],S=x[1],C=l.spacing.controlHeight;return s2(function(){var A=h.current;if(A){var D=o==="fixed",M=s&&!D,R=Ate({maxHeight:a,menuEl:A,minHeight:n,placement:i,shouldScroll:M,isFixedPosition:D,controlHeight:C});b(R.maxHeight),S(R.placement),d==null||d(R.placement)}},[a,i,o,s,n,d,C]),r({ref:h,placerProps:Ye(Ye({},e),{},{placement:E||KB(i),maxHeight:y})})},Dte=function(e){var r=e.children,n=e.innerRef,a=e.innerProps;return He("div",je({},Ft(e,"menu",{menu:!0}),{ref:n},a),r)},kte=Dte,Lte=function(e,r){var n=e.maxHeight,a=e.theme.spacing.baseUnit;return Ye({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},r?{}:{paddingBottom:a,paddingTop:a})},Nte=function(e){var r=e.children,n=e.innerProps,a=e.innerRef,i=e.isMulti;return He("div",je({},Ft(e,"menuList",{"menu-list":!0,"menu-list--is-multi":i}),{ref:a},n),r)},ZB=function(e,r){var n=e.theme,a=n.spacing.baseUnit,i=n.colors;return Ye({textAlign:"center"},r?{}:{color:i.neutral40,padding:"".concat(a*2,"px ").concat(a*3,"px")})},Bte=ZB,qte=ZB,Pte=function(e){var r=e.children,n=r===void 0?"No options":r,a=e.innerProps,i=Qa(e,Tte);return He("div",je({},Ft(Ye(Ye({},i),{},{children:n,innerProps:a}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),a),n)},zte=function(e){var r=e.children,n=r===void 0?"Loading...":r,a=e.innerProps,i=Qa(e,Cte);return He("div",je({},Ft(Ye(Ye({},i),{},{children:n,innerProps:a}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),a),n)},Ite=function(e){var r=e.rect,n=e.offset,a=e.position;return{left:r.left,position:a,top:n,width:r.width,zIndex:1}},Vte=function(e){var r=e.appendTo,n=e.children,a=e.controlElement,i=e.innerProps,o=e.menuPlacement,s=e.menuPosition,l=Ee.useRef(null),f=Ee.useRef(null),d=Ee.useState(KB(o)),h=Fa(d,2),g=h[0],p=h[1],y=Ee.useMemo(function(){return{setPortalPlacement:p}},[]),b=Ee.useState(null),w=Fa(b,2),x=w[0],E=w[1],S=Ee.useCallback(function(){if(a){var M=yte(a),R=s==="fixed"?0:window.pageYOffset,O=M[g]+R;(O!==(x==null?void 0:x.offset)||M.left!==(x==null?void 0:x.rect.left)||M.width!==(x==null?void 0:x.rect.width))&&E({offset:O,rect:M})}},[a,s,g,x==null?void 0:x.offset,x==null?void 0:x.rect.left,x==null?void 0:x.rect.width]);s2(function(){S()},[S]);var C=Ee.useCallback(function(){typeof f.current=="function"&&(f.current(),f.current=null),a&&l.current&&(f.current=cte(a,l.current,S,{elementResize:"ResizeObserver"in window}))},[a,S]);s2(function(){C()},[C]);var A=Ee.useCallback(function(M){l.current=M,C()},[C]);if(!r&&s!=="fixed"||!x)return null;var D=He("div",je({ref:A},Ft(Ye(Ye({},e),{},{offset:x.offset,position:s,rect:x.rect}),"menuPortal",{"menu-portal":!0}),i),n);return He(jB.Provider,{value:y},r?Wee.createPortal(D,r):D)},$te=function(e){var r=e.isDisabled,n=e.isRtl;return{label:"container",direction:n?"rtl":void 0,pointerEvents:r?"none":void 0,position:"relative"}},Fte=function(e){var r=e.children,n=e.innerProps,a=e.isDisabled,i=e.isRtl;return He("div",je({},Ft(e,"container",{"--is-disabled":a,"--is-rtl":i}),n),r)},Hte=function(e,r){var n=e.theme.spacing,a=e.isMulti,i=e.hasValue,o=e.selectProps.controlShouldRenderValue;return Ye({alignItems:"center",display:a&&i&&o?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},r?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(n.baseUnit*2,"px")})},Ute=function(e){var r=e.children,n=e.innerProps,a=e.isMulti,i=e.hasValue;return He("div",je({},Ft(e,"valueContainer",{"value-container":!0,"value-container--is-multi":a,"value-container--has-value":i}),n),r)},Gte=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Yte=function(e){var r=e.children,n=e.innerProps;return He("div",je({},Ft(e,"indicatorsContainer",{indicators:!0}),n),r)},K4,Xte=["size"],Kte=["innerProps","isRtl","size"],jte={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},QB=function(e){var r=e.size,n=Qa(e,Xte);return He("svg",je({height:r,width:r,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:jte},n))},N_=function(e){return He(QB,je({size:20},e),He("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},WB=function(e){return He(QB,je({size:20},e),He("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},JB=function(e,r){var n=e.isFocused,a=e.theme,i=a.spacing.baseUnit,o=a.colors;return Ye({label:"indicatorContainer",display:"flex",transition:"color 150ms"},r?{}:{color:n?o.neutral60:o.neutral20,padding:i*2,":hover":{color:n?o.neutral80:o.neutral40}})},Zte=JB,Qte=function(e){var r=e.children,n=e.innerProps;return He("div",je({},Ft(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),r||He(WB,null))},Wte=JB,Jte=function(e){var r=e.children,n=e.innerProps;return He("div",je({},Ft(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),r||He(N_,null))},ere=function(e,r){var n=e.isDisabled,a=e.theme,i=a.spacing.baseUnit,o=a.colors;return Ye({label:"indicatorSeparator",alignSelf:"stretch",width:1},r?{}:{backgroundColor:n?o.neutral10:o.neutral20,marginBottom:i*2,marginTop:i*2})},tre=function(e){var r=e.innerProps;return He("span",je({},r,Ft(e,"indicatorSeparator",{"indicator-separator":!0})))},rre=Zee(K4||(K4=Qee([` 0%, 80%, 100% { opacity: 0; } 40% { opacity: 1; } `]))),nre=function(e,r){var n=e.isFocused,a=e.size,i=e.theme,o=i.colors,s=i.spacing.baseUnit;return Ye({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:a,lineHeight:1,marginRight:a,textAlign:"center",verticalAlign:"middle"},r?{}:{color:n?o.neutral60:o.neutral20,padding:s*2})},bx=function(e){var r=e.delay,n=e.offset;return He("span",{css:O_({animation:"".concat(rre," 1s ease-in-out ").concat(r,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},are=function(e){var r=e.innerProps,n=e.isRtl,a=e.size,i=a===void 0?4:a,o=Qa(e,Kte);return He("div",je({},Ft(Ye(Ye({},o),{},{innerProps:r,isRtl:n,size:i}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),r),He(bx,{delay:0,offset:n}),He(bx,{delay:160,offset:!0}),He(bx,{delay:320,offset:!n}))},ire=function(e,r){var n=e.isDisabled,a=e.isFocused,i=e.theme,o=i.colors,s=i.borderRadius,l=i.spacing;return Ye({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},r?{}:{backgroundColor:n?o.neutral5:o.neutral0,borderColor:n?o.neutral10:a?o.primary:o.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:a?"0 0 0 1px ".concat(o.primary):void 0,"&:hover":{borderColor:a?o.primary:o.neutral30}})},ore=function(e){var r=e.children,n=e.isDisabled,a=e.isFocused,i=e.innerRef,o=e.innerProps,s=e.menuIsOpen;return He("div",je({ref:i},Ft(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":a,"control--menu-is-open":s}),o,{"aria-disabled":n||void 0}),r)},ure=ore,sre=["data"],lre=function(e,r){var n=e.theme.spacing;return r?{}:{paddingBottom:n.baseUnit*2,paddingTop:n.baseUnit*2}},fre=function(e){var r=e.children,n=e.cx,a=e.getStyles,i=e.getClassNames,o=e.Heading,s=e.headingProps,l=e.innerProps,f=e.label,d=e.theme,h=e.selectProps;return He("div",je({},Ft(e,"group",{group:!0}),l),He(o,je({},s,{selectProps:h,theme:d,getStyles:a,getClassNames:i,cx:n}),f),He("div",null,r))},cre=function(e,r){var n=e.theme,a=n.colors,i=n.spacing;return Ye({label:"group",cursor:"default",display:"block"},r?{}:{color:a.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:i.baseUnit*3,paddingRight:i.baseUnit*3,textTransform:"uppercase"})},dre=function(e){var r=GB(e);r.data;var n=Qa(r,sre);return He("div",je({},Ft(e,"groupHeading",{"group-heading":!0}),n))},hre=fre,vre=["innerRef","isDisabled","isHidden","inputClassName"],gre=function(e,r){var n=e.isDisabled,a=e.value,i=e.theme,o=i.spacing,s=i.colors;return Ye(Ye({visibility:n?"hidden":"visible",transform:a?"translateZ(0)":""},pre),r?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:s.neutral80})},eq={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},pre={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Ye({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},eq)},mre=function(e){return Ye({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},eq)},yre=function(e){var r=e.cx,n=e.value,a=GB(e),i=a.innerRef,o=a.isDisabled,s=a.isHidden,l=a.inputClassName,f=Qa(a,vre);return He("div",je({},Ft(e,"input",{"input-container":!0}),{"data-value":n||""}),He("input",je({className:r({input:!0},l),ref:i,style:mre(s),disabled:o},f)))},bre=yre,wre=function(e,r){var n=e.theme,a=n.spacing,i=n.borderRadius,o=n.colors;return Ye({label:"multiValue",display:"flex",minWidth:0},r?{}:{backgroundColor:o.neutral10,borderRadius:i/2,margin:a.baseUnit/2})},xre=function(e,r){var n=e.theme,a=n.borderRadius,i=n.colors,o=e.cropWithEllipsis;return Ye({overflow:"hidden",textOverflow:o||o===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},r?{}:{borderRadius:a/2,color:i.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},_re=function(e,r){var n=e.theme,a=n.spacing,i=n.borderRadius,o=n.colors,s=e.isFocused;return Ye({alignItems:"center",display:"flex"},r?{}:{borderRadius:i/2,backgroundColor:s?o.dangerLight:void 0,paddingLeft:a.baseUnit,paddingRight:a.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}})},tq=function(e){var r=e.children,n=e.innerProps;return He("div",n,r)},Ere=tq,Sre=tq;function Tre(t){var e=t.children,r=t.innerProps;return He("div",je({role:"button"},r),e||He(N_,{size:14}))}var Cre=function(e){var r=e.children,n=e.components,a=e.data,i=e.innerProps,o=e.isDisabled,s=e.removeProps,l=e.selectProps,f=n.Container,d=n.Label,h=n.Remove;return He(f,{data:a,innerProps:Ye(Ye({},Ft(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),i),selectProps:l},He(d,{data:a,innerProps:Ye({},Ft(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},r),He(h,{data:a,innerProps:Ye(Ye({},Ft(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(r||"option")},s),selectProps:l}))},Are=Cre,Rre=function(e,r){var n=e.isDisabled,a=e.isFocused,i=e.isSelected,o=e.theme,s=o.spacing,l=o.colors;return Ye({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},r?{}:{backgroundColor:i?l.primary:a?l.primary25:"transparent",color:n?l.neutral20:i?l.neutral0:"inherit",padding:"".concat(s.baseUnit*2,"px ").concat(s.baseUnit*3,"px"),":active":{backgroundColor:n?void 0:i?l.primary:l.primary50}})},Mre=function(e){var r=e.children,n=e.isDisabled,a=e.isFocused,i=e.isSelected,o=e.innerRef,s=e.innerProps;return He("div",je({},Ft(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":a,"option--is-selected":i}),{ref:o,"aria-disabled":n},s),r)},Ore=Mre,Dre=function(e,r){var n=e.theme,a=n.spacing,i=n.colors;return Ye({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},r?{}:{color:i.neutral50,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2})},kre=function(e){var r=e.children,n=e.innerProps;return He("div",je({},Ft(e,"placeholder",{placeholder:!0}),n),r)},Lre=kre,Nre=function(e,r){var n=e.isDisabled,a=e.theme,i=a.spacing,o=a.colors;return Ye({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},r?{}:{color:n?o.neutral40:o.neutral80,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},Bre=function(e){var r=e.children,n=e.isDisabled,a=e.innerProps;return He("div",je({},Ft(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),a),r)},qre=Bre,Pre={ClearIndicator:Jte,Control:ure,DropdownIndicator:Qte,DownChevron:WB,CrossIcon:N_,Group:hre,GroupHeading:dre,IndicatorsContainer:Yte,IndicatorSeparator:tre,Input:bre,LoadingIndicator:are,Menu:kte,MenuList:Nte,MenuPortal:Vte,LoadingMessage:zte,NoOptionsMessage:Pte,MultiValue:Are,MultiValueContainer:Ere,MultiValueLabel:Sre,MultiValueRemove:Tre,Option:Ore,Placeholder:Lre,SelectContainer:Fte,SingleValue:qre,ValueContainer:Ute},zre=function(e){return Ye(Ye({},Pre),e.components)},j4=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function Ire(t,e){return!!(t===e||j4(t)&&j4(e))}function Vre(t,e){if(t.length!==e.length)return!1;for(var r=0;r1?"s":""," ").concat(i.join(","),", selected.");case"select-option":return o?"option ".concat(a," is disabled. Select another option."):"option ".concat(a,", selected.");default:return""}},onFocus:function(e){var r=e.context,n=e.focused,a=e.options,i=e.label,o=i===void 0?"":i,s=e.selectValue,l=e.isDisabled,f=e.isSelected,d=e.isAppleDevice,h=function(b,w){return b&&b.length?"".concat(b.indexOf(w)+1," of ").concat(b.length):""};if(r==="value"&&s)return"value ".concat(o," focused, ").concat(h(s,n),".");if(r==="menu"&&d){var g=l?" disabled":"",p="".concat(f?" selected":"").concat(g);return"".concat(o).concat(p,", ").concat(h(a,n),".")}return""},onFilter:function(e){var r=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(r?" for search term "+r:"",".")}},Gre=function(e){var r=e.ariaSelection,n=e.focusedOption,a=e.focusedValue,i=e.focusableOptions,o=e.isFocused,s=e.selectValue,l=e.selectProps,f=e.id,d=e.isAppleDevice,h=l.ariaLiveMessages,g=l.getOptionLabel,p=l.inputValue,y=l.isMulti,b=l.isOptionDisabled,w=l.isSearchable,x=l.menuIsOpen,E=l.options,S=l.screenReaderStatus,C=l.tabSelectsValue,A=l.isLoading,D=l["aria-label"],M=l["aria-live"],R=Ee.useMemo(function(){return Ye(Ye({},Ure),h||{})},[h]),O=Ee.useMemo(function(){var V="";if(r&&R.onChange){var P=r.option,$=r.options,F=r.removedValue,Y=r.removedValues,z=r.value,H=function(ne){return Array.isArray(ne)?null:ne},Z=F||P||H(z),J=Z?g(Z):"",U=$||Y||void 0,K=U?U.map(g):[],j=Ye({isDisabled:Z&&b(Z,s),label:J,labels:K},r);V=R.onChange(j)}return V},[r,R,b,s,g]),B=Ee.useMemo(function(){var V="",P=n||a,$=!!(n&&s&&s.includes(n));if(P&&R.onFocus){var F={focused:P,label:g(P),isDisabled:b(P,s),isSelected:$,options:i,context:P===n?"menu":"value",selectValue:s,isAppleDevice:d};V=R.onFocus(F)}return V},[n,a,g,b,R,i,s,d]),k=Ee.useMemo(function(){var V="";if(x&&E.length&&!A&&R.onFilter){var P=S({count:i.length});V=R.onFilter({inputValue:p,resultsMessage:P})}return V},[i,p,x,R,E,S,A]),N=(r==null?void 0:r.action)==="initial-input-focus",L=Ee.useMemo(function(){var V="";if(R.guidance){var P=a?"value":x?"menu":"input";V=R.guidance({"aria-label":D,context:P,isDisabled:n&&b(n,s),isMulti:y,isSearchable:w,tabSelectsValue:C,isInitialFocus:N})}return V},[D,n,a,y,b,w,x,R,s,C,N]),q=He(Ee.Fragment,null,He("span",{id:"aria-selection"},O),He("span",{id:"aria-focused"},B),He("span",{id:"aria-results"},k),He("span",{id:"aria-guidance"},L));return He(Ee.Fragment,null,He(Z4,{id:f},N&&q),He(Z4,{"aria-live":M,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},o&&!N&&q))},Yre=Gre,l2=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Xre=new RegExp("["+l2.map(function(t){return t.letters}).join("")+"]","g"),rq={};for(var wx=0;wx-1}},Qre=["innerRef"];function Wre(t){var e=t.innerRef,r=Qa(t,Qre),n=Ste(r,"onExited","in","enter","exit","appear");return He("input",je({ref:e},n,{css:O_({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Jre=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};function ene(t){var e=t.isEnabled,r=t.onBottomArrive,n=t.onBottomLeave,a=t.onTopArrive,i=t.onTopLeave,o=Ee.useRef(!1),s=Ee.useRef(!1),l=Ee.useRef(0),f=Ee.useRef(null),d=Ee.useCallback(function(w,x){if(f.current!==null){var E=f.current,S=E.scrollTop,C=E.scrollHeight,A=E.clientHeight,D=f.current,M=x>0,R=C-A-S,O=!1;R>x&&o.current&&(n&&n(w),o.current=!1),M&&s.current&&(i&&i(w),s.current=!1),M&&x>R?(r&&!o.current&&r(w),D.scrollTop=C,O=!0,o.current=!0):!M&&-x>S&&(a&&!s.current&&a(w),D.scrollTop=0,O=!0,s.current=!0),O&&Jre(w)}},[r,n,a,i]),h=Ee.useCallback(function(w){d(w,w.deltaY)},[d]),g=Ee.useCallback(function(w){l.current=w.changedTouches[0].clientY},[]),p=Ee.useCallback(function(w){var x=l.current-w.changedTouches[0].clientY;d(w,x)},[d]),y=Ee.useCallback(function(w){if(w){var x=xte?{passive:!1}:!1;w.addEventListener("wheel",h,x),w.addEventListener("touchstart",g,x),w.addEventListener("touchmove",p,x)}},[p,g,h]),b=Ee.useCallback(function(w){w&&(w.removeEventListener("wheel",h,!1),w.removeEventListener("touchstart",g,!1),w.removeEventListener("touchmove",p,!1))},[p,g,h]);return Ee.useEffect(function(){if(e){var w=f.current;return y(w),function(){b(w)}}},[e,y,b]),function(w){f.current=w}}var W4=["boxSizing","height","overflow","paddingRight","position"],J4={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function eL(t){t.cancelable&&t.preventDefault()}function tL(t){t.stopPropagation()}function rL(){var t=this.scrollTop,e=this.scrollHeight,r=t+this.offsetHeight;t===0?this.scrollTop=1:r===e&&(this.scrollTop=t-1)}function nL(){return"ontouchstart"in window||navigator.maxTouchPoints}var aL=!!(typeof window<"u"&&window.document&&window.document.createElement),vl=0,Eu={capture:!1,passive:!1};function tne(t){var e=t.isEnabled,r=t.accountForScrollbars,n=r===void 0?!0:r,a=Ee.useRef({}),i=Ee.useRef(null),o=Ee.useCallback(function(l){if(aL){var f=document.body,d=f&&f.style;if(n&&W4.forEach(function(y){var b=d&&d[y];a.current[y]=b}),n&&vl<1){var h=parseInt(a.current.paddingRight,10)||0,g=document.body?document.body.clientWidth:0,p=window.innerWidth-g+h||0;Object.keys(J4).forEach(function(y){var b=J4[y];d&&(d[y]=b)}),d&&(d.paddingRight="".concat(p,"px"))}f&&nL()&&(f.addEventListener("touchmove",eL,Eu),l&&(l.addEventListener("touchstart",rL,Eu),l.addEventListener("touchmove",tL,Eu))),vl+=1}},[n]),s=Ee.useCallback(function(l){if(aL){var f=document.body,d=f&&f.style;vl=Math.max(vl-1,0),n&&vl<1&&W4.forEach(function(h){var g=a.current[h];d&&(d[h]=g)}),f&&nL()&&(f.removeEventListener("touchmove",eL,Eu),l&&(l.removeEventListener("touchstart",rL,Eu),l.removeEventListener("touchmove",tL,Eu)))}},[n]);return Ee.useEffect(function(){if(e){var l=i.current;return o(l),function(){s(l)}}},[e,o,s]),function(l){i.current=l}}var rne=function(e){var r=e.target;return r.ownerDocument.activeElement&&r.ownerDocument.activeElement.blur()},nne={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function ane(t){var e=t.children,r=t.lockEnabled,n=t.captureEnabled,a=n===void 0?!0:n,i=t.onBottomArrive,o=t.onBottomLeave,s=t.onTopArrive,l=t.onTopLeave,f=ene({isEnabled:a,onBottomArrive:i,onBottomLeave:o,onTopArrive:s,onTopLeave:l}),d=tne({isEnabled:r}),h=function(p){f(p),d(p)};return He(Ee.Fragment,null,r&&He("div",{onClick:rne,css:nne}),e(h))}var ine={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},one=function(e){var r=e.name,n=e.onFocus;return He("input",{required:!0,name:r,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:ine,value:"",onChange:function(){}})},une=one;function B_(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function sne(){return B_(/^iPhone/i)}function aq(){return B_(/^Mac/i)}function lne(){return B_(/^iPad/i)||aq()&&navigator.maxTouchPoints>1}function fne(){return sne()||lne()}function cne(){return aq()||fne()}var dne=function(e){return e.label},hne=function(e){return e.label},vne=function(e){return e.value},gne=function(e){return!!e.isDisabled},pne={clearIndicator:Wte,container:$te,control:ire,dropdownIndicator:Zte,group:lre,groupHeading:cre,indicatorsContainer:Gte,indicatorSeparator:ere,input:gre,loadingIndicator:nre,loadingMessage:qte,menu:Mte,menuList:Lte,menuPortal:Ite,multiValue:wre,multiValueLabel:xre,multiValueRemove:_re,noOptionsMessage:Bte,option:Rre,placeholder:Dre,singleValue:Nre,valueContainer:Hte},mne={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},yne=4,iq=4,bne=38,wne=iq*2,xne={baseUnit:iq,controlHeight:bne,menuGutter:wne},Ex={borderRadius:yne,colors:mne,spacing:xne},_ne={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:X4(),captureMenuScroll:!X4(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:Zre(),formatGroupLabel:dne,getOptionLabel:hne,getOptionValue:vne,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:gne,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!bte(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var r=e.count;return"".concat(r," result").concat(r!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function iL(t,e,r,n){var a=sq(t,e,r),i=lq(t,e,r),o=uq(t,e),s=dh(t,e);return{type:"option",data:e,isDisabled:a,isSelected:i,label:o,value:s,index:n}}function Ad(t,e){return t.options.map(function(r,n){if("options"in r){var a=r.options.map(function(o,s){return iL(t,o,e,s)}).filter(function(o){return uL(t,o)});return a.length>0?{type:"group",data:r,options:a,index:n}:void 0}var i=iL(t,r,e,n);return uL(t,i)?i:void 0}).filter(_te)}function oq(t){return t.reduce(function(e,r){return r.type==="group"?e.push.apply(e,T_(r.options.map(function(n){return n.data}))):e.push(r.data),e},[])}function oL(t,e){return t.reduce(function(r,n){return n.type==="group"?r.push.apply(r,T_(n.options.map(function(a){return{data:a.data,id:"".concat(e,"-").concat(n.index,"-").concat(a.index)}}))):r.push({data:n.data,id:"".concat(e,"-").concat(n.index)}),r},[])}function Ene(t,e){return oq(Ad(t,e))}function uL(t,e){var r=t.inputValue,n=r===void 0?"":r,a=e.data,i=e.isSelected,o=e.label,s=e.value;return(!cq(t)||!i)&&fq(t,{label:o,value:s,data:a},n)}function Sne(t,e){var r=t.focusedValue,n=t.selectValue,a=n.indexOf(r);if(a>-1){var i=e.indexOf(r);if(i>-1)return r;if(a-1?r:e[0]}var Sx=function(e,r){var n,a=(n=e.find(function(i){return i.data===r}))===null||n===void 0?void 0:n.id;return a||null},uq=function(e,r){return e.getOptionLabel(r)},dh=function(e,r){return e.getOptionValue(r)};function sq(t,e,r){return typeof t.isOptionDisabled=="function"?t.isOptionDisabled(e,r):!1}function lq(t,e,r){if(r.indexOf(e)>-1)return!0;if(typeof t.isOptionSelected=="function")return t.isOptionSelected(e,r);var n=dh(t,e);return r.some(function(a){return dh(t,a)===n})}function fq(t,e,r){return t.filterOption?t.filterOption(e,r):!0}var cq=function(e){var r=e.hideSelectedOptions,n=e.isMulti;return r===void 0?n:r},Cne=1,dq=function(t){XJ(r,t);var e=ZJ(r);function r(n){var a;if(GJ(this,r),a=e.call(this,n),a.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},a.blockOptionHover=!1,a.isComposing=!1,a.commonProps=void 0,a.initialTouchX=0,a.initialTouchY=0,a.openAfterFocus=!1,a.scrollToFocusedOptionOnUpdate=!1,a.userIsDragging=void 0,a.isAppleDevice=cne(),a.controlRef=null,a.getControlRef=function(l){a.controlRef=l},a.focusedOptionRef=null,a.getFocusedOptionRef=function(l){a.focusedOptionRef=l},a.menuListRef=null,a.getMenuListRef=function(l){a.menuListRef=l},a.inputRef=null,a.getInputRef=function(l){a.inputRef=l},a.focus=a.focusInput,a.blur=a.blurInput,a.onChange=function(l,f){var d=a.props,h=d.onChange,g=d.name;f.name=g,a.ariaOnChange(l,f),h(l,f)},a.setValue=function(l,f,d){var h=a.props,g=h.closeMenuOnSelect,p=h.isMulti,y=h.inputValue;a.onInputChange("",{action:"set-value",prevInputValue:y}),g&&(a.setState({inputIsHiddenAfterUpdate:!p}),a.onMenuClose()),a.setState({clearFocusValueOnUpdate:!0}),a.onChange(l,{action:f,option:d})},a.selectOption=function(l){var f=a.props,d=f.blurInputOnSelect,h=f.isMulti,g=f.name,p=a.state.selectValue,y=h&&a.isOptionSelected(l,p),b=a.isOptionDisabled(l,p);if(y){var w=a.getOptionValue(l);a.setValue(p.filter(function(x){return a.getOptionValue(x)!==w}),"deselect-option",l)}else if(!b)h?a.setValue([].concat(T_(p),[l]),"select-option",l):a.setValue(l,"select-option");else{a.ariaOnChange(l,{action:"select-option",option:l,name:g});return}d&&a.blurInput()},a.removeValue=function(l){var f=a.props.isMulti,d=a.state.selectValue,h=a.getOptionValue(l),g=d.filter(function(y){return a.getOptionValue(y)!==h}),p=id(f,g,g[0]||null);a.onChange(p,{action:"remove-value",removedValue:l}),a.focusInput()},a.clearValue=function(){var l=a.state.selectValue;a.onChange(id(a.props.isMulti,[],null),{action:"clear",removedValues:l})},a.popValue=function(){var l=a.props.isMulti,f=a.state.selectValue,d=f[f.length-1],h=f.slice(0,f.length-1),g=id(l,h,h[0]||null);d&&a.onChange(g,{action:"pop-value",removedValue:d})},a.getFocusedOptionId=function(l){return Sx(a.state.focusableOptionsWithIds,l)},a.getFocusableOptionsWithIds=function(){return oL(Ad(a.props,a.state.selectValue),a.getElementId("option"))},a.getValue=function(){return a.state.selectValue},a.cx=function(){for(var l=arguments.length,f=new Array(l),d=0;dp||g>p}},a.onTouchEnd=function(l){a.userIsDragging||(a.controlRef&&!a.controlRef.contains(l.target)&&a.menuListRef&&!a.menuListRef.contains(l.target)&&a.blurInput(),a.initialTouchX=0,a.initialTouchY=0)},a.onControlTouchEnd=function(l){a.userIsDragging||a.onControlMouseDown(l)},a.onClearIndicatorTouchEnd=function(l){a.userIsDragging||a.onClearIndicatorMouseDown(l)},a.onDropdownIndicatorTouchEnd=function(l){a.userIsDragging||a.onDropdownIndicatorMouseDown(l)},a.handleInputChange=function(l){var f=a.props.inputValue,d=l.currentTarget.value;a.setState({inputIsHiddenAfterUpdate:!1}),a.onInputChange(d,{action:"input-change",prevInputValue:f}),a.props.menuIsOpen||a.onMenuOpen()},a.onInputFocus=function(l){a.props.onFocus&&a.props.onFocus(l),a.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(a.openAfterFocus||a.props.openMenuOnFocus)&&a.openMenu("first"),a.openAfterFocus=!1},a.onInputBlur=function(l){var f=a.props.inputValue;if(a.menuListRef&&a.menuListRef.contains(document.activeElement)){a.inputRef.focus();return}a.props.onBlur&&a.props.onBlur(l),a.onInputChange("",{action:"input-blur",prevInputValue:f}),a.onMenuClose(),a.setState({focusedValue:null,isFocused:!1})},a.onOptionHover=function(l){if(!(a.blockOptionHover||a.state.focusedOption===l)){var f=a.getFocusableOptions(),d=f.indexOf(l);a.setState({focusedOption:l,focusedOptionId:d>-1?a.getFocusedOptionId(l):null})}},a.shouldHideSelectedOptions=function(){return cq(a.props)},a.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),a.focus()},a.onKeyDown=function(l){var f=a.props,d=f.isMulti,h=f.backspaceRemovesValue,g=f.escapeClearsValue,p=f.inputValue,y=f.isClearable,b=f.isDisabled,w=f.menuIsOpen,x=f.onKeyDown,E=f.tabSelectsValue,S=f.openMenuOnFocus,C=a.state,A=C.focusedOption,D=C.focusedValue,M=C.selectValue;if(!b&&!(typeof x=="function"&&(x(l),l.defaultPrevented))){switch(a.blockOptionHover=!0,l.key){case"ArrowLeft":if(!d||p)return;a.focusValue("previous");break;case"ArrowRight":if(!d||p)return;a.focusValue("next");break;case"Delete":case"Backspace":if(p)return;if(D)a.removeValue(D);else{if(!h)return;d?a.popValue():y&&a.clearValue()}break;case"Tab":if(a.isComposing||l.shiftKey||!w||!E||!A||S&&a.isOptionSelected(A,M))return;a.selectOption(A);break;case"Enter":if(l.keyCode===229)break;if(w){if(!A||a.isComposing)return;a.selectOption(A);break}return;case"Escape":w?(a.setState({inputIsHiddenAfterUpdate:!1}),a.onInputChange("",{action:"menu-close",prevInputValue:p}),a.onMenuClose()):y&&g&&a.clearValue();break;case" ":if(p)return;if(!w){a.openMenu("first");break}if(!A)return;a.selectOption(A);break;case"ArrowUp":w?a.focusOption("up"):a.openMenu("last");break;case"ArrowDown":w?a.focusOption("down"):a.openMenu("first");break;case"PageUp":if(!w)return;a.focusOption("pageup");break;case"PageDown":if(!w)return;a.focusOption("pagedown");break;case"Home":if(!w)return;a.focusOption("first");break;case"End":if(!w)return;a.focusOption("last");break;default:return}l.preventDefault()}},a.state.instancePrefix="react-select-"+(a.props.instanceId||++Cne),a.state.selectValue=G4(n.value),n.menuIsOpen&&a.state.selectValue.length){var i=a.getFocusableOptionsWithIds(),o=a.buildFocusableOptions(),s=o.indexOf(a.state.selectValue[0]);a.state.focusableOptionsWithIds=i,a.state.focusedOption=o[s],a.state.focusedOptionId=Sx(i,o[s])}return a}return YJ(r,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Y4(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(a){var i=this.props,o=i.isDisabled,s=i.menuIsOpen,l=this.state.isFocused;(l&&!o&&a.isDisabled||l&&s&&!a.menuIsOpen)&&this.focusInput(),l&&o&&!a.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!o&&a.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Y4(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(a,i){this.props.onInputChange(a,i)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(a){var i=this,o=this.state,s=o.selectValue,l=o.isFocused,f=this.buildFocusableOptions(),d=a==="first"?0:f.length-1;if(!this.props.isMulti){var h=f.indexOf(s[0]);h>-1&&(d=h)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:f[d],focusedOptionId:this.getFocusedOptionId(f[d])},function(){return i.onMenuOpen()})}},{key:"focusValue",value:function(a){var i=this.state,o=i.selectValue,s=i.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=o.indexOf(s);s||(l=-1);var f=o.length-1,d=-1;if(o.length){switch(a){case"previous":l===0?d=0:l===-1?d=f:d=l-1;break;case"next":l>-1&&l0&&arguments[0]!==void 0?arguments[0]:"first",i=this.props.pageSize,o=this.state.focusedOption,s=this.getFocusableOptions();if(s.length){var l=0,f=s.indexOf(o);o||(f=-1),a==="up"?l=f>0?f-1:s.length-1:a==="down"?l=(f+1)%s.length:a==="pageup"?(l=f-i,l<0&&(l=0)):a==="pagedown"?(l=f+i,l>s.length-1&&(l=s.length-1)):a==="last"&&(l=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(s[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Ex):Ye(Ye({},Ex),this.props.theme):Ex}},{key:"getCommonProps",value:function(){var a=this.clearValue,i=this.cx,o=this.getStyles,s=this.getClassNames,l=this.getValue,f=this.selectOption,d=this.setValue,h=this.props,g=h.isMulti,p=h.isRtl,y=h.options,b=this.hasValue();return{clearValue:a,cx:i,getStyles:o,getClassNames:s,getValue:l,hasValue:b,isMulti:g,isRtl:p,options:y,selectOption:f,selectProps:h,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var a=this.state.selectValue;return a.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var a=this.props,i=a.isClearable,o=a.isMulti;return i===void 0?o:i}},{key:"isOptionDisabled",value:function(a,i){return sq(this.props,a,i)}},{key:"isOptionSelected",value:function(a,i){return lq(this.props,a,i)}},{key:"filterOption",value:function(a,i){return fq(this.props,a,i)}},{key:"formatOptionLabel",value:function(a,i){if(typeof this.props.formatOptionLabel=="function"){var o=this.props.inputValue,s=this.state.selectValue;return this.props.formatOptionLabel(a,{context:i,inputValue:o,selectValue:s})}else return this.getOptionLabel(a)}},{key:"formatGroupLabel",value:function(a){return this.props.formatGroupLabel(a)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var a=this.props,i=a.isDisabled,o=a.isSearchable,s=a.inputId,l=a.inputValue,f=a.tabIndex,d=a.form,h=a.menuIsOpen,g=a.required,p=this.getComponents(),y=p.Input,b=this.state,w=b.inputIsHidden,x=b.ariaSelection,E=this.commonProps,S=s||this.getElementId("input"),C=Ye(Ye(Ye({"aria-autocomplete":"list","aria-expanded":h,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":g,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},h&&{"aria-controls":this.getElementId("listbox")}),!o&&{"aria-readonly":!0}),this.hasValue()?(x==null?void 0:x.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return o?Ee.createElement(y,je({},E,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:S,innerRef:this.getInputRef,isDisabled:i,isHidden:w,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:f,form:d,type:"text",value:l},C)):Ee.createElement(Wre,je({id:S,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:fh,onFocus:this.onInputFocus,disabled:i,tabIndex:f,inputMode:"none",form:d,value:""},C))}},{key:"renderPlaceholderOrValue",value:function(){var a=this,i=this.getComponents(),o=i.MultiValue,s=i.MultiValueContainer,l=i.MultiValueLabel,f=i.MultiValueRemove,d=i.SingleValue,h=i.Placeholder,g=this.commonProps,p=this.props,y=p.controlShouldRenderValue,b=p.isDisabled,w=p.isMulti,x=p.inputValue,E=p.placeholder,S=this.state,C=S.selectValue,A=S.focusedValue,D=S.isFocused;if(!this.hasValue()||!y)return x?null:Ee.createElement(h,je({},g,{key:"placeholder",isDisabled:b,isFocused:D,innerProps:{id:this.getElementId("placeholder")}}),E);if(w)return C.map(function(R,O){var B=R===A,k="".concat(a.getOptionLabel(R),"-").concat(a.getOptionValue(R));return Ee.createElement(o,je({},g,{components:{Container:s,Label:l,Remove:f},isFocused:B,isDisabled:b,key:k,index:O,removeProps:{onClick:function(){return a.removeValue(R)},onTouchEnd:function(){return a.removeValue(R)},onMouseDown:function(L){L.preventDefault()}},data:R}),a.formatOptionLabel(R,"value"))});if(x)return null;var M=C[0];return Ee.createElement(d,je({},g,{data:M,isDisabled:b}),this.formatOptionLabel(M,"value"))}},{key:"renderClearIndicator",value:function(){var a=this.getComponents(),i=a.ClearIndicator,o=this.commonProps,s=this.props,l=s.isDisabled,f=s.isLoading,d=this.state.isFocused;if(!this.isClearable()||!i||l||!this.hasValue()||f)return null;var h={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return Ee.createElement(i,je({},o,{innerProps:h,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var a=this.getComponents(),i=a.LoadingIndicator,o=this.commonProps,s=this.props,l=s.isDisabled,f=s.isLoading,d=this.state.isFocused;if(!i||!f)return null;var h={"aria-hidden":"true"};return Ee.createElement(i,je({},o,{innerProps:h,isDisabled:l,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var a=this.getComponents(),i=a.DropdownIndicator,o=a.IndicatorSeparator;if(!i||!o)return null;var s=this.commonProps,l=this.props.isDisabled,f=this.state.isFocused;return Ee.createElement(o,je({},s,{isDisabled:l,isFocused:f}))}},{key:"renderDropdownIndicator",value:function(){var a=this.getComponents(),i=a.DropdownIndicator;if(!i)return null;var o=this.commonProps,s=this.props.isDisabled,l=this.state.isFocused,f={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return Ee.createElement(i,je({},o,{innerProps:f,isDisabled:s,isFocused:l}))}},{key:"renderMenu",value:function(){var a=this,i=this.getComponents(),o=i.Group,s=i.GroupHeading,l=i.Menu,f=i.MenuList,d=i.MenuPortal,h=i.LoadingMessage,g=i.NoOptionsMessage,p=i.Option,y=this.commonProps,b=this.state.focusedOption,w=this.props,x=w.captureMenuScroll,E=w.inputValue,S=w.isLoading,C=w.loadingMessage,A=w.minMenuHeight,D=w.maxMenuHeight,M=w.menuIsOpen,R=w.menuPlacement,O=w.menuPosition,B=w.menuPortalTarget,k=w.menuShouldBlockScroll,N=w.menuShouldScrollIntoView,L=w.noOptionsMessage,q=w.onMenuScrollToTop,V=w.onMenuScrollToBottom;if(!M)return null;var P=function(J,U){var K=J.type,j=J.data,re=J.isDisabled,ne=J.isSelected,ee=J.label,W=J.value,te=b===j,ce=re?void 0:function(){return a.onOptionHover(j)},de=re?void 0:function(){return a.selectOption(j)},ye="".concat(a.getElementId("option"),"-").concat(U),we={id:ye,onClick:de,onMouseMove:ce,onMouseOver:ce,tabIndex:-1,role:"option","aria-selected":a.isAppleDevice?void 0:ne};return Ee.createElement(p,je({},y,{innerProps:we,data:j,isDisabled:re,isSelected:ne,key:ye,label:ee,type:K,value:W,isFocused:te,innerRef:te?a.getFocusedOptionRef:void 0}),a.formatOptionLabel(J.data,"menu"))},$;if(this.hasOptions())$=this.getCategorizedOptions().map(function(Z){if(Z.type==="group"){var J=Z.data,U=Z.options,K=Z.index,j="".concat(a.getElementId("group"),"-").concat(K),re="".concat(j,"-heading");return Ee.createElement(o,je({},y,{key:j,data:J,options:U,Heading:s,headingProps:{id:re,data:Z.data},label:a.formatGroupLabel(Z.data)}),Z.options.map(function(ne){return P(ne,"".concat(K,"-").concat(ne.index))}))}else if(Z.type==="option")return P(Z,"".concat(Z.index))});else if(S){var F=C({inputValue:E});if(F===null)return null;$=Ee.createElement(h,y,F)}else{var Y=L({inputValue:E});if(Y===null)return null;$=Ee.createElement(g,y,Y)}var z={minMenuHeight:A,maxMenuHeight:D,menuPlacement:R,menuPosition:O,menuShouldScrollIntoView:N},H=Ee.createElement(Ote,je({},y,z),function(Z){var J=Z.ref,U=Z.placerProps,K=U.placement,j=U.maxHeight;return Ee.createElement(l,je({},y,z,{innerRef:J,innerProps:{onMouseDown:a.onMenuMouseDown,onMouseMove:a.onMenuMouseMove},isLoading:S,placement:K}),Ee.createElement(ane,{captureEnabled:x,onTopArrive:q,onBottomArrive:V,lockEnabled:k},function(re){return Ee.createElement(f,je({},y,{innerRef:function(ee){a.getMenuListRef(ee),re(ee)},innerProps:{role:"listbox","aria-multiselectable":y.isMulti,id:a.getElementId("listbox")},isLoading:S,maxHeight:j,focusedOption:b}),$)}))});return B||O==="fixed"?Ee.createElement(d,je({},y,{appendTo:B,controlElement:this.controlRef,menuPlacement:R,menuPosition:O}),H):H}},{key:"renderFormField",value:function(){var a=this,i=this.props,o=i.delimiter,s=i.isDisabled,l=i.isMulti,f=i.name,d=i.required,h=this.state.selectValue;if(d&&!this.hasValue()&&!s)return Ee.createElement(une,{name:f,onFocus:this.onValueInputFocus});if(!(!f||s))if(l)if(o){var g=h.map(function(b){return a.getOptionValue(b)}).join(o);return Ee.createElement("input",{name:f,type:"hidden",value:g})}else{var p=h.length>0?h.map(function(b,w){return Ee.createElement("input",{key:"i-".concat(w),name:f,type:"hidden",value:a.getOptionValue(b)})}):Ee.createElement("input",{name:f,type:"hidden",value:""});return Ee.createElement("div",null,p)}else{var y=h[0]?this.getOptionValue(h[0]):"";return Ee.createElement("input",{name:f,type:"hidden",value:y})}}},{key:"renderLiveRegion",value:function(){var a=this.commonProps,i=this.state,o=i.ariaSelection,s=i.focusedOption,l=i.focusedValue,f=i.isFocused,d=i.selectValue,h=this.getFocusableOptions();return Ee.createElement(Yre,je({},a,{id:this.getElementId("live-region"),ariaSelection:o,focusedOption:s,focusedValue:l,isFocused:f,selectValue:d,focusableOptions:h,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var a=this.getComponents(),i=a.Control,o=a.IndicatorsContainer,s=a.SelectContainer,l=a.ValueContainer,f=this.props,d=f.className,h=f.id,g=f.isDisabled,p=f.menuIsOpen,y=this.state.isFocused,b=this.commonProps=this.getCommonProps();return Ee.createElement(s,je({},b,{className:d,innerProps:{id:h,onKeyDown:this.onKeyDown},isDisabled:g,isFocused:y}),this.renderLiveRegion(),Ee.createElement(i,je({},b,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:g,isFocused:y,menuIsOpen:p}),Ee.createElement(l,je({},b,{isDisabled:g}),this.renderPlaceholderOrValue(),this.renderInput()),Ee.createElement(o,je({},b,{isDisabled:g}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(a,i){var o=i.prevProps,s=i.clearFocusValueOnUpdate,l=i.inputIsHiddenAfterUpdate,f=i.ariaSelection,d=i.isFocused,h=i.prevWasFocused,g=i.instancePrefix,p=a.options,y=a.value,b=a.menuIsOpen,w=a.inputValue,x=a.isMulti,E=G4(y),S={};if(o&&(y!==o.value||p!==o.options||b!==o.menuIsOpen||w!==o.inputValue)){var C=b?Ene(a,E):[],A=b?oL(Ad(a,E),"".concat(g,"-option")):[],D=s?Sne(i,E):null,M=Tne(i,C),R=Sx(A,M);S={selectValue:E,focusedOption:M,focusedOptionId:R,focusableOptionsWithIds:A,focusedValue:D,clearFocusValueOnUpdate:!1}}var O=l!=null&&a!==o?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},B=f,k=d&&h;return d&&!k&&(B={value:id(x,E,E[0]||null),options:E,action:"initial-input-focus"},k=!h),(f==null?void 0:f.action)==="initial-input-focus"&&(B=null),Ye(Ye(Ye({},S),O),{},{prevProps:a,ariaSelection:B,prevWasFocused:k})}}]),r}(Ee.Component);dq.defaultProps=_ne;var Ane=Ee.forwardRef(function(t,e){var r=UJ(t);return Ee.createElement(dq,je({ref:e},r))}),sL=Ane;const lL=[{value:"",label:"None"},{value:"library_name",label:"Library Name"},{value:"pipeline_tag",label:"Pipeline Tag"},{value:"type",label:"Type"}],fL=[{value:"",label:"None"},{value:"downloads_all_time",label:"Downloads"},{value:"likes",label:"Likes"},{value:"trending_score",label:"Trending Score"},{value:"used_storage",label:"Used Storage"}];function Rne(){const[t,e]=Ee.useState("used_storage"),[r,n]=Ee.useState("library_name"),[a,i]=Ee.useState(!1),o=vt.jsx(vt.Fragment,{children:vt.jsxs("div",{id:"controls",style:{display:"flex",flexDirection:"column",gap:"2em"},children:[vt.jsxs("div",{style:{width:"200px"},children:[vt.jsx("label",{htmlFor:"nodeSize",style:{fontWeight:"bold"},children:"Node Size"}),vt.jsx(sL,{options:fL,name:"nodeSize",defaultValue:fL[4],onChange:s=>{e((s==null?void 0:s.value)===""||s==null?void 0:s.value)}})]}),vt.jsxs("div",{style:{width:"200px"},children:[vt.jsx("label",{htmlFor:"nodeColor",style:{fontWeight:"bold"},children:"Node Color"}),vt.jsx(sL,{options:lL,name:"nodeColor",defaultValue:lL[1],onChange:s=>{n((s==null?void 0:s.value)===""||s==null?void 0:s.value)}})]}),vt.jsxs("div",{children:[vt.jsx("label",{htmlFor:"showLabels",style:{fontWeight:"bold"},children:"Show Labels"}),vt.jsx("br",{}),vt.jsxs("label",{className:"switch",children:[vt.jsx("input",{type:"checkbox",name:"showLabels",onChange:s=>{console.log(s.target.checked),i(s.target.checked)}}),vt.jsx("span",{className:"slider round"})]})]})]})});return vt.jsx(vt.Fragment,{children:vt.jsx("div",{id:"content",style:{width:"100vw",height:"100vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:vt.jsxs("div",{id:"inner",style:{width:"100vw",height:"100vh",display:"flex",flexDirection:"row"},children:[vt.jsxs("div",{style:{borderTop:"1px solid #ccc",borderBottom:"1px solid #ccc",padding:"2em"},children:[vt.jsx("h3",{children:"Xet Repository Graph"}),o,vt.jsx("div",{children:r&&vt.jsxs("div",{children:[vt.jsx("p",{className:"controlLabel",children:"Color Legend"}),vt.jsx("svg",{id:"colorLegend",width:"200px",height:"400px"})]})})]}),vt.jsx("div",{id:"cyContainer",style:{flexGrow:1,borderLeft:"1px solid #ccc"},children:vt.jsx(PJ,{colorLegendId:"colorLegend",sizeLegendId:"sizeLegend",layout:"cose",label:a,edgeScale:"log",nodeColor:r,nodeSize:t})})]})})})}M9.createRoot(document.getElementById("root")).render(vt.jsx(Ee.StrictMode,{children:vt.jsx(Rne,{})}));