function E9(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 Lc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function h2(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 fC;function S9(){if(fC)return el;fC=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 cC;function T9(){return cC||(cC=1,hp.exports=S9()),hp.exports}var Ve=T9(),vp={exports:{}},tt={};/** * @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 dC;function C9(){if(dC)return tt;dC=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,j){this.props=z,this.context=H,this.refs=b,this.updater=j||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 _(z,H,j){this.props=z,this.context=H,this.refs=b,this.updater=j||p}var S=_.prototype=new x;S.constructor=_,y(S,w.prototype),S.isPureReactComponent=!0;var A=Array.isArray,C={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function M(z,H,j,J,U,K){return j=K.ref,{$$typeof:t,type:z,key:H,ref:j!==void 0?j: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 N(z){var H={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(j){return H[j]})}var L=/\/+/g;function B(z,H){return typeof z=="object"&&z!==null&&z.key!=null?N(""+z.key):H.toString(36)}function k(){}function q(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(k,k):(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,j,J,U){var K=typeof z;(K==="undefined"||K==="boolean")&&(z=null);var Z=!1;if(z===null)Z=!0;else switch(K){case"bigint":case"string":case"number":Z=!0;break;case"object":switch(z.$$typeof){case t:case e:Z=!0;break;case d:return Z=z._init,V(Z(z._payload),H,j,J,U)}}if(Z)return U=U(z),Z=J===""?"."+B(z,0):J,A(U)?(j="",Z!=null&&(j=Z.replace(L,"$&/")+"/"),V(U,H,j,"",function(ee){return ee})):U!=null&&(O(U)&&(U=R(U,j+(U.key==null||z&&z.key===U.key?"":(""+U.key).replace(L,"$&/")+"/")+Z)),H.push(U)),1;Z=0;var re=J===""?".":J+":";if(A(z))for(var ne=0;ne>>1,z=P[G];if(0>>1;Ga(J,F))Ua(K,J)?(P[G]=K,P[U]=F,G=U):(P[G]=J,P[j]=F,G=j);else if(Ua(K,F))P[G]=K,P[U]=F,G=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,_=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 A(P){if(b=!1,S(P),!y)if(r(l)!==null)y=!0,q();else{var $=r(f);$!==null&&V(A,$.startTime-P)}}var C=!1,D=-1,M=5,R=-1;function O(){return!(t.unstable_now()-RP&&O());){var G=h.callback;if(typeof G=="function"){h.callback=null,g=h.priorityLevel;var z=G(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(A,H.startTime-P),$=!1}}break e}finally{h=null,g=F,p=!1}$=void 0}}finally{$?L():C=!1}}}var L;if(typeof _=="function")L=function(){_(N)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,k=B.port2;B.port1.onmessage=N,L=function(){k.postMessage(null)}}else L=function(){w(N,0)};function q(){C||(C=!0,L())}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||125G?(P.sortIndex=F,e(f,P),r(l)===null&&P===r(f)&&(b?(x(D),D=-1):b=!0,V(A,F-G))):(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 pC;function M9(){return pC||(pC=1,pp.exports=R9()),pp.exports}var yp={exports:{}},kr={};/** * @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 mC;function O9(){if(mC)return kr;mC=1;var t=v2();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=O9(),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 bC;function D9(){if(bC)return tl;bC=1;var t=M9(),e=v2(),r=mL();function n(u){var c="https://react.dev/errors/"+u;if(1)":-1E||Q[m]!==ie[E]){var me=` `+Q[m].replace(" at new "," at ");return u.displayName&&me.includes("")&&(me=me.replace("",u.displayName)),me}while(1<=m&&0<=E);break}}}finally{q=!1,Error.prepareStackTrace=v}return(v=u?u.displayName||u.name:"")?k(v):""}function P(u){switch(u.tag){case 26:case 27:case 5:return k(u.type);case 16:return k("Lazy");case 13:return k("Suspense");case 19:return k("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 G(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 E=v.return;if(E===null)break;var T=E.alternate;if(T===null){if(m=E.return,m!==null){v=m;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===v)return z(E),u;if(T===m)return z(E),c;T=T.sibling}throw Error(n(188))}if(v.return!==m.return)v=E,m=T;else{for(var I=!1,Y=E.child;Y;){if(Y===v){I=!0,v=E,m=T;break}if(Y===m){I=!0,m=E,v=T;break}Y=Y.sibling}if(!I){for(Y=T.child;Y;){if(Y===v){I=!0,v=T,m=E;break}if(Y===m){I=!0,m=T,v=E;break}Y=Y.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 j(u){var c=u.tag;if(c===5||c===26||c===27||c===6)return u;for(u=u.child;u!==null;){if(c=j(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},Z=[],re=-1;function ne(u){return{current:u}}function ee(u){0>re||(u.current=Z[re],Z[re]=null,re--)}function W(u,c){re++,Z[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)?IT(c):0;break;default:if(u=u===8?c.parentNode:c,c=u.tagName,u=u.namespaceURI)u=IT(u),c=VT(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=VT(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,Fe=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Ne=t.unstable_requestPaint,ze=t.unstable_now,et=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 He(u){if(Se&&typeof Se.onCommitFiberRoot=="function")try{Se.onCommitFiberRoot(ge,u,void 0,(u.current.flags&128)===128)}catch{}}function Ge(u){if(typeof fe=="function"&&Ae(u),Se&&typeof Se.setStrictMode=="function")try{Se.setStrictMode(ge,u)}catch{}}var Oe=Math.clz32?Math.clz32:Ye,Qe=Math.log,We=Math.LN2;function Ye(u){return u>>>=0,u===0?32:31-(Qe(u)/We|0)|0}var ht=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 hr(u,c){var v=u.pendingLanes;if(v===0)return 0;var m=0,E=u.suspendedLanes,T=u.pingedLanes,I=u.warmLanes;u=u.finishedLanes!==0;var Y=v&134217727;return Y!==0?(v=Y&~E,v!==0?m=Ut(v):(T&=Y,T!==0?m=Ut(T):u||(I=Y&~I,I!==0&&(m=Ut(I))))):(Y=v&~E,Y!==0?m=Ut(Y):T!==0?m=Ut(T):u||(I=v&~I,I!==0&&(m=Ut(I)))),m===0?0:c!==0&&c!==m&&(c&E)===0&&(E=m&-m,I=c&-c,E>=I||E===32&&(I&4194176)!==0)?c:m}function Mt(u,c){return(u.pendingLanes&~(u.suspendedLanes&~u.pingedLanes)&c)===0}function Zt(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=ht;return ht<<=1,(ht&4194176)===0&&(ht=128),u}function vr(){var u=bt;return bt<<=1,(bt&62914560)===0&&(bt=4194304),u}function nr(u){for(var c=[],v=0;31>v;v++)c.push(u);return c}function Or(u,c){u.pendingLanes|=c,c!==268435456&&(u.suspendedLanes=0,u.pingedLanes=0,u.warmLanes=0)}function Hr(u,c,v,m,E,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 Y=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]*$"),Ur={},Tf={};function mq(u){return Ce.call(Tf,u)?!0:Ce.call(Ur,u)?!1:Vi.test(u)?Tf[u]=!0:(Ur[u]=!0,!1)}function Cf(u,c,v){if(mq(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 Af(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 hn(u){switch(typeof u){case"bigint":case"boolean":case"number":case"string":case"undefined":return u;case"object":return u;default:return""}}function F_(u){var c=u.type;return(u=u.nodeName)&&u.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function yq(u){var c=F_(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 E=v.get,T=v.set;return Object.defineProperty(u,c,{configurable:!0,get:function(){return E.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 Rf(u){u._valueTracker||(u._valueTracker=yq(u))}function H_(u){if(!u)return!1;var c=u._valueTracker;if(!c)return!0;var v=c.getValue(),m="";return u&&(m=F_(u)?u.checked?"true":"false":u.value),u=m,u!==v?(c.setValue(u),!0):!1}function Mf(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 bq=/[\n"\\]/g;function vn(u){return u.replace(bq,function(c){return"\\"+c.charCodeAt(0).toString(16)+" "})}function cv(u,c,v,m,E,T,I,Y){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=""+hn(c)):u.value!==""+hn(c)&&(u.value=""+hn(c)):I!=="submit"&&I!=="reset"||u.removeAttribute("value"),c!=null?dv(u,I,hn(c)):v!=null?dv(u,I,hn(v)):m!=null&&u.removeAttribute("value"),E==null&&T!=null&&(u.defaultChecked=!!T),E!=null&&(u.checked=E&&typeof E!="function"&&typeof E!="symbol"),Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"?u.name=""+hn(Y):u.removeAttribute("name")}function U_(u,c,v,m,E,T,I,Y){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?""+hn(v):"",c=c!=null?""+hn(c):v,Y||c===u.value||(u.value=c),u.defaultValue=c}m=m??E,m=typeof m!="function"&&typeof m!="symbol"&&!!m,u.checked=Y?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"&&Mf(u.ownerDocument)===u||u.defaultValue===""+v||(u.defaultValue=""+v)}function Bo(u,c,v,m){if(u=u.options,c){c={};for(var E=0;E=hs),nE=" ",aE=!1;function iE(u,c){switch(u){case"keyup":return Xq.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oE(u){return u=u.detail,typeof u=="object"&&"data"in u?u.data:null}var Io=!1;function jq(u,c){switch(u){case"compositionend":return oE(c);case"keypress":return c.which!==32?null:(aE=!0,nE);case"textInput":return u=c.data,u===nE&&aE?null:u;default:return null}}function Zq(u,c){if(Io)return u==="compositionend"||!Ev&&iE(u,c)?(u=Q_(),Df=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=vE(v)}}function pE(u,c){return u&&c?u===c?!0:u&&u.nodeType===3?!1:c&&c.nodeType===3?pE(u,c.parentNode):"contains"in u?u.contains(c):u.compareDocumentPosition?!!(u.compareDocumentPosition(c)&16):!1:!1}function mE(u){u=u!=null&&u.ownerDocument!=null&&u.ownerDocument.defaultView!=null?u.ownerDocument.defaultView:window;for(var c=Mf(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=Mf(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 aP(u,c){var v=mE(c);c=u.focusedElem;var m=u.selectionRange;if(v!==c&&c&&c.ownerDocument&&pE(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 E=c.textContent.length,T=Math.min(m.start,E);m=m.end===void 0?T:Math.min(m.end,E),!v.extend&&T>m&&(E=m,m=T,T=E),E=gE(c,T);var I=gE(c,m);E&&I&&(v.rangeCount!==1||v.anchorNode!==E.node||v.anchorOffset!==E.offset||v.focusNode!==I.node||v.focusOffset!==I.offset)&&(u=u.createRange(),u.setStart(E.node,E.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 yE(u,c,v){var m=v.window===v?v.document:v.nodeType===9?v:v.ownerDocument;Rv||Vo==null||Vo!==Mf(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=yc(Av,"onSelect"),0>=I,E-=I,Ea=1<<32-Oe(c)+E|v<je?(mr=Ie,Ie=null):mr=Ie.sibling;var ct=he(se,Ie,le[je],be);if(ct===null){Ie===null&&(Ie=mr);break}u&&Ie&&ct.alternate===null&&c(se,Ie),ae=T(ct,ae,je),at===null?ke=ct:at.sibling=ct,at=ct,Ie=mr}if(je===le.length)return v(se,Ie),ft&&Gi(se,je),ke;if(Ie===null){for(;jeje?(mr=Ie,Ie=null):mr=Ie.sibling;var yi=he(se,Ie,ct.value,be);if(yi===null){Ie===null&&(Ie=mr);break}u&&Ie&&yi.alternate===null&&c(se,Ie),ae=T(yi,ae,je),at===null?ke=yi:at.sibling=yi,at=yi,Ie=mr}if(ct.done)return v(se,Ie),ft&&Gi(se,je),ke;if(Ie===null){for(;!ct.done;je++,ct=le.next())ct=_e(se,ct.value,be),ct!==null&&(ae=T(ct,ae,je),at===null?ke=ct:at.sibling=ct,at=ct);return ft&&Gi(se,je),ke}for(Ie=m(Ie);!ct.done;je++,ct=le.next())ct=pe(Ie,se,je,ct.value,be),ct!==null&&(u&&ct.alternate!==null&&Ie.delete(ct.key===null?je:ct.key),ae=T(ct,ae,je),at===null?ke=ct:at.sibling=ct,at=ct);return u&&Ie.forEach(function(_9){return c(se,_9)}),ft&&Gi(se,je),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=E(ae,le.props.children),be.return=se,se=be;break e}}else if(ae.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===_&&BE(ke)===ae.type){v(se,ae.sibling),be=E(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=sc(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=E(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 _: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),Je(se,ae,le,be)}if(typeof le.then=="function")return $t(se,ae,Hf(le),be);if(le.$$typeof===p)return $t(se,ae,ic(se,le),be);Uf(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=E(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 at=_n(29,Ie,null,se.mode);return at.lanes=be,at.return=se,at}finally{}}}var Xi=qE(!0),PE=qE(!1),Xo=ne(null),Gf=ne(0);function zE(u,c){u=Ba,W(Gf,u),W(Xo,c),Ba=u|c.baseLanes}function qv(){W(Gf,Ba),W(Xo,Xo.current)}function Pv(){Ba=Gf.current,ee(Xo),ee(Gf)}var bn=ne(null),Zn=null;function ei(u){var c=u.alternate;W(or,or.current&1),W(bn,u),Zn===null&&(c===null||Xo.current!==null||c.memoizedState!==null)&&(Zn=u)}function IE(u){if(u.tag===22){if(W(or,or.current),W(bn,u),Zn===null){var c=u.alternate;c!==null&&c.memoizedState!==null&&(Zn=u)}}else ti()}function ti(){W(or,or.current),W(bn,bn.current)}function Ta(u){ee(bn),Zn===u&&(Zn=null),ee(or)}var or=ne(0);function Yf(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 lP=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()})}},fP=t.unstable_scheduleCallback,cP=t.unstable_NormalPriority,ur={$$typeof:p,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zv(){return{controller:new lP,data:new Map,refCount:0}}function Ts(u){u.refCount--,u.refCount===0&&fP(cP,function(){u.controller.abort()})}var Cs=null,Iv=0,Ko=0,jo=null;function dP(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(VE,VE),c}function VE(){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,Y={};O.T=Y,rg(u,!1,c,v);try{var Q=E(),ie=O.S;if(ie!==null&&ie(Y,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var me=hP(Q,m);Ms(u,c,me,nn(u))}else Ms(u,c,m,nn(u))}catch(_e){Ms(u,c,{then:function(){},status:"rejected",reason:_e},nn())}finally{U.p=T,O.T=I}}function yP(){}function eg(u,c,v,m){if(u.tag!==5)throw Error(n(476));var E=mS(u).queue;pS(u,E,c,K,v===null?yP:function(){return yS(u),v(m)})}function mS(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 yS(u){var c=mS(u).next.queue;Ms(u,c,{},nn())}function tg(){return Dr(js)}function bS(){return Jt().memoizedState}function wS(){return Jt().memoizedState}function bP(u){for(var c=u.return;c!==null;){switch(c.tag){case 24:case 3:var v=nn();u=oi(v);var m=ui(c,u,v);m!==null&&(Ir(m,c,v),ks(m,c,v)),c={cache:zv()},u.payload=c;return}c=c.return}}function wP(u,c,v){var m=nn();v={lane:m,revertLane:0,action:v,hasEagerState:!1,eagerState:null,next:null},tc(u)?_S(c,v):(v=Dv(u,c,v,m),v!==null&&(Ir(v,u,m),ES(v,c,m)))}function xS(u,c,v){var m=nn();Ms(u,c,v,m)}function Ms(u,c,v,m){var E={lane:m,revertLane:0,action:v,hasEagerState:!1,eagerState:null,next:null};if(tc(u))_S(c,E);else{var T=u.alternate;if(u.lanes===0&&(T===null||T.lanes===0)&&(T=c.lastRenderedReducer,T!==null))try{var I=c.lastRenderedState,Y=T(I,v);if(E.hasEagerState=!0,E.eagerState=Y,Jr(Y,I))return zf(u,c,E,0),Tt===null&&Pf(),!1}catch{}finally{}if(v=Dv(u,c,E,m),v!==null)return Ir(v,u,m),ES(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},tc(u)){if(c)throw Error(n(479))}else c=Dv(u,v,m,2),c!==null&&Ir(c,u,2)}function tc(u){var c=u.alternate;return u===rt||c!==null&&c===rt}function _S(u,c){Zo=Kf=!0;var v=u.pending;v===null?c.next=c:(c.next=v.next,v.next=c),u.pending=c}function ES(u,c,v){if((v&4194176)!==0){var m=c.lanes;m&=u.pendingLanes,v|=m,c.lanes=v,ln(u,v)}}var Qn={readContext:Dr,use:Qf,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};Qn.useCacheRefresh=Kt,Qn.useMemoCache=Kt,Qn.useHostTransitionStatus=Kt,Qn.useFormState=Kt,Qn.useActionState=Kt,Qn.useOptimistic=Kt;var Zi={readContext:Dr,use:Qf,useCallback:function(u,c){return Yr().memoizedState=[u,c===void 0?null:c],u},useContext:Dr,useEffect:sS,useImperativeHandle:function(u,c,v){v=v!=null?v.concat([u]):null,Jf(4194308,4,cS.bind(null,c,u),v)},useLayoutEffect:function(u,c){return Jf(4194308,4,u,c)},useInsertionEffect:function(u,c){Jf(4,2,u,c)},useMemo:function(u,c){var v=Yr();c=c===void 0?null:c;var m=u();if(ji){Ge(!0);try{u()}finally{Ge(!1)}}return v.memoizedState=[m,c],m},useReducer:function(u,c,v){var m=Yr();if(v!==void 0){var E=v(c);if(ji){Ge(!0);try{v(c)}finally{Ge(!1)}}}else E=c;return m.memoizedState=m.baseState=E,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:E},m.queue=u,u=u.dispatch=wP.bind(null,rt,u),[m.memoizedState,u]},useRef:function(u){var c=Yr();return u={current:u},c.memoizedState=u},useState:function(u){u=jv(u);var c=u.queue,v=xS.bind(null,rt,c);return c.dispatch=v,[u.memoizedState,v]},useDebugValue:Wv,useDeferredValue:function(u,c){var v=Yr();return Jv(v,u,c)},useTransition:function(){var u=jv(!1);return u=pS.bind(null,rt,u.queue,!0,!1),Yr().memoizedState=u,[!1,u]},useSyncExternalStore:function(u,c,v){var m=rt,E=Yr();if(ft){if(v===void 0)throw Error(n(407));v=v()}else{if(v=c(),Tt===null)throw Error(n(349));(ut&60)!==0||YE(m,c,v)}E.memoizedState=v;var T={value:v,getSnapshot:c};return E.queue=T,sS(KE.bind(null,m,T,u),[u]),m.flags|=2048,Wo(9,XE.bind(null,m,T,v,c),{destroy:void 0},null),v},useId:function(){var u=Yr(),c=Tt.identifierPrefix;if(ft){var v=Sa,m=Ea;v=(m&~(1<<32-Oe(m)-1)).toString(32)+v,c=":"+c+"R"+v,v=jf++,0 title"))),Sr(T,m,v),T[Yt]=u,Xt(T),m=T;break e;case"link":var I=ZT("link","href",E).get(m+(v.href||""));if(I){for(var Y=0;Y<\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof m.is=="string"?E.createElement("select",{is:m.is}):E.createElement("select"),m.multiple?u.multiple=!0:m.size&&(u.size=m.size);break;default:u=typeof m.is=="string"?E.createElement(v,{is:m.is}):E.createElement(v)}}u[Yt]=c,u[Ot]=m;e:for(E=c.child;E!==null;){if(E.tag===5||E.tag===6)u.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===c)break e;for(;E.sibling===null;){if(E.return===null||E.return===c)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}c.stateNode=u;e:switch(Sr(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,E=zr,E!==null)switch(E.tag){case 27:case 5:m=E.memoizedProps}u[Yt]=c,u=!!(u.nodeValue===v||m!==null&&m.suppressHydrationWarning===!0||zT(u.nodeValue,v)),u||Yi(c)}else u=wc(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(E=ys(c),m!==null&&m.dehydrated!==null){if(u===null){if(!E)throw Error(n(318));if(E=c.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(n(317));E[Yt]=c}else bs(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;Bt(c),E=!1}else Bn!==null&&(zg(Bn),Bn=null),E=!0;if(!E)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,E=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(E=m.alternate.memoizedState.cachePool.pool);var T=null;m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(T=m.memoizedState.cachePool.pool),T!==E&&(m.flags|=2048)}return v!==u&&v&&(c.child.flags|=8192),lc(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(or),E=c.memoizedState,E===null)return Bt(c),null;if(m=(c.flags&128)!==0,T=E.rendering,T===null)if(m)Is(E,!1);else{if(Vt!==0||u!==null&&(u.flags&128)!==0)for(u=c.child;u!==null;){if(T=Yf(u),T!==null){for(c.flags|=128,Is(E,!1),u=T.updateQueue,c.updateQueue=u,lc(c,u),c.subtreeFlags=0,u=v,v=c.child;v!==null;)dT(v,u),v=v.sibling;return W(or,or.current&1|2),c.child}u=u.sibling}E.tail!==null&&ze()>fc&&(c.flags|=128,m=!0,Is(E,!1),c.lanes=4194304)}else{if(!m)if(u=Yf(T),u!==null){if(c.flags|=128,m=!0,u=u.updateQueue,c.updateQueue=u,lc(c,u),Is(E,!0),E.tail===null&&E.tailMode==="hidden"&&!T.alternate&&!ft)return Bt(c),null}else 2*ze()-E.renderingStartTime>fc&&v!==536870912&&(c.flags|=128,m=!0,Is(E,!1),c.lanes=4194304);E.isBackwards?(T.sibling=c.child,c.child=T):(u=E.last,u!==null?u.sibling=T:c.child=T,E.last=T)}return E.tail!==null?(c=E.tail,E.rendering=c,E.tail=c.sibling,E.renderingStartTime=ze(),c.sibling=null,u=or.current,W(or,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&&lc(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(ur),Bt(c),null;case 25:return null}throw Error(n(156,c.tag))}function AP(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(ur),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(or),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(ur),null;case 25:return null;default:return null}}function gT(u,c){switch(Lv(c),c.tag){case 3:Ma(ur),Pe();break;case 26:case 27:case 5:Te(c);break;case 4:Pe();break;case 13:Ta(c);break;case 19:ee(or);break;case 10:Ma(c.type);break;case 22:case 23:Ta(c),Pv(),u!==null&&ee(Ki);break;case 24:Ma(ur)}}var RP={getCacheForType:function(u){var c=Dr(ur),v=c.data.get(u);return v===void 0&&(v=u(),c.data.set(u,v)),v}},MP=typeof WeakMap=="function"?WeakMap:Map,qt=0,Tt=null,it=null,ut=0,Ct=0,rn=null,Na=!1,ru=!1,Dg=!1,Ba=0,Vt=0,di=0,no=0,kg=0,En=0,nu=0,Vs=null,Wn=null,Lg=!1,Ng=0,fc=1/0,cc=null,hi=null,dc=!1,ao=null,$s=0,Bg=0,qg=null,Fs=0,Pg=null;function nn(){if((qt&2)!==0&&ut!==0)return ut&-ut;if(O.T!==null){var u=Ko;return u!==0?u:Gg()}return ar()}function pT(){En===0&&(En=(ut&536870912)===0||ft?Gt():536870912);var u=bn.current;return u!==null&&(u.flags|=32),En}function Ir(u,c,v){(u===Tt&&Ct===2||u.cancelPendingCommit!==null)&&(au(u,0),qa(u,ut,En,!1)),Or(u,v),((qt&2)===0||u!==Tt)&&(u===Tt&&((qt&2)===0&&(no|=v),Vt===4&&qa(u,ut,En,!1)),Jn(u))}function mT(u,c,v){if((qt&6)!==0)throw Error(n(327));var m=!v&&(c&60)===0&&(c&u.expiredLanes)===0||Mt(u,c),E=m?kP(u,c):$g(u,c,!0),T=m;do{if(E===0){ru&&!m&&qa(u,c,0,!1);break}else if(E===6)qa(u,c,0,!Na);else{if(v=u.current.alternate,T&&!OP(v)){E=$g(u,c,!1),T=!1;continue}if(E===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 Y=u;E=Vs;var Q=Y.current.memoizedState.isDehydrated;if(Q&&(au(Y,I).flags|=256),I=$g(Y,I,!1),I!==2){if(Dg&&!Q){Y.errorRecoveryDisabledLanes|=T,no|=T,E=4;break e}T=Wn,Wn=E,T!==null&&zg(T)}E=I}if(T=!1,E!==2)continue}}if(E===1){au(u,0),qa(u,c,0,!0);break}e:{switch(m=u,E){case 0:case 1:throw Error(n(345));case 4:if((c&4194176)===c){qa(m,c,En,!Na);break e}break;case 2:Wn=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,Y=$s;if(ao=null,$s=0,(qt&6)!==0)throw Error(n(331));var Q=qt;if(qt|=4,fT(I.current),uT(I,I.current,Y,v),qt=Q,Hs(0,!1),Se&&typeof Se.onPostCommitFiberRoot=="function")try{Se.onPostCommitFiberRoot(ge,I)}catch{}T=!0}return T}finally{U.p=E,O.T=m,CT(u,c)}}return!1}function AT(u,c,v){c=pn(v,c),c=ig(u.stateNode,c,2),u=ui(u,c,2),u!==null&&(Or(u,2),Jn(u))}function Et(u,c,v){if(u.tag===3)AT(u,u,v);else for(;c!==null;){if(c.tag===3){AT(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=pn(v,u),v=OS(2),m=ui(c,v,2),m!==null&&(DS(v,m,c,u),Or(m,2),Jn(m));break}}c=c.return}}function Fg(u,c,v){var m=u.pingCache;if(m===null){m=u.pingCache=new MP;var E=new Set;m.set(c,E)}else E=m.get(c),E===void 0&&(E=new Set,m.set(c,E));E.has(v)||(Dg=!0,E.add(v),u=BP.bind(null,u,c,v),c.then(u,u))}function BP(u,c,v){var m=u.pingCache;m!==null&&m.delete(c),u.pingedLanes|=u.suspendedLanes&v,u.warmLanes&=~v,Tt===u&&(ut&v)===v&&(Vt===4||Vt===3&&(ut&62914560)===ut&&300>ze()-Ng?(qt&2)===0&&au(u,0):kg|=v,nu===ut&&(nu=0)),Jn(u)}function RT(u,c){c===0&&(c=vr()),u=Ja(u,c),u!==null&&(Or(u,c),Jn(u))}function qP(u){var c=u.memoizedState,v=0;c!==null&&(v=c.retryLane),RT(u,v)}function PP(u,c){var v=0;switch(u.tag){case 13:var m=u.stateNode,E=u.memoizedState;E!==null&&(v=E.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),RT(u,v)}function zP(u,c){return Be(u,c)}var gc=null,uu=null,Hg=!1,pc=!1,Ug=!1,io=0;function Jn(u){u!==uu&&u.next===null&&(uu===null?gc=uu=u:uu=uu.next=u),pc=!0,Hg||(Hg=!0,VP(IP))}function Hs(u,c){if(!Ug&&pc){Ug=!0;do for(var v=!1,m=gc;m!==null;){if(u!==0){var E=m.pendingLanes;if(E===0)var T=0;else{var I=m.suspendedLanes,Y=m.pingedLanes;T=(1<<31-Oe(42|u)+1)-1,T&=E&~(I&~Y),T=T&201326677?T&201326677|1:T?T|2:0}T!==0&&(v=!0,DT(m,T))}else T=ut,T=hr(m,m===Tt?T:0),(T&3)===0||Mt(m,T)||(v=!0,DT(m,T));m=m.next}while(v);Ug=!1}}function IP(){pc=Hg=!1;var u=0;io!==0&&(KP()&&(u=io),io=0);for(var c=ze(),v=null,m=gc;m!==null;){var E=m.next,T=MT(m,c);T===0?(m.next=null,v===null?gc=E:v.next=E,E===null&&(uu=v)):(v=m,(u!==0||(T&3)!==0)&&(pc=!0)),m=E}Hs(u)}function MT(u,c){for(var v=u.suspendedLanes,m=u.pingedLanes,E=u.expirationTimes,T=u.pendingLanes&-62914561;0"u"?null:document;function YT(u,c,v){var m=lu;if(m&&typeof c=="string"&&c){var E=vn(c);E='link[rel="'+u+'"][href="'+E+'"]',typeof v=="string"&&(E+='[crossorigin="'+v+'"]'),GT.has(E)||(GT.add(E),u={rel:u,crossOrigin:v,href:c},m.querySelector(E)===null&&(c=m.createElement("link"),Sr(c,"link",u),Xt(c),m.head.appendChild(c)))}}function r9(u){Pa.D(u),YT("dns-prefetch",u,null)}function n9(u,c){Pa.C(u,c),YT("preconnect",u,c)}function a9(u,c,v){Pa.L(u,c,v);var m=lu;if(m&&u&&c){var E='link[rel="preload"][as="'+vn(c)+'"]';c==="image"&&v&&v.imageSrcSet?(E+='[imagesrcset="'+vn(v.imageSrcSet)+'"]',typeof v.imageSizes=="string"&&(E+='[imagesizes="'+vn(v.imageSizes)+'"]')):E+='[href="'+vn(u)+'"]';var T=E;switch(c){case"style":T=fu(u);break;case"script":T=cu(u)}Sn.has(T)||(u=N({rel:"preload",href:c==="image"&&v&&v.imageSrcSet?void 0:u,as:c},v),Sn.set(T,u),m.querySelector(E)!==null||c==="style"&&m.querySelector(Ys(T))||c==="script"&&m.querySelector(Xs(T))||(c=m.createElement("link"),Sr(c,"link",u),Xt(c),m.head.appendChild(c)))}}function i9(u,c){Pa.m(u,c);var v=lu;if(v&&u){var m=c&&typeof c.as=="string"?c.as:"script",E='link[rel="modulepreload"][as="'+vn(m)+'"][href="'+vn(u)+'"]',T=E;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=cu(u)}if(!Sn.has(T)&&(u=N({rel:"modulepreload",href:u},c),Sn.set(T,u),v.querySelector(E)===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"),Sr(m,"link",u),Xt(m),v.head.appendChild(m)}}}function o9(u,c,v){Pa.S(u,c,v);var m=lu;if(m&&u){var E=Ln(m).hoistableStyles,T=fu(u);c=c||"default";var I=E.get(T);if(!I){var Y={loading:0,preload:null};if(I=m.querySelector(Ys(T)))Y.loading=5;else{u=N({rel:"stylesheet",href:u,"data-precedence":c},v),(v=Sn.get(T))&&ap(u,v);var Q=I=m.createElement("link");Xt(Q),Sr(Q,"link",u),Q._p=new Promise(function(ie,me){Q.onload=ie,Q.onerror=me}),Q.addEventListener("load",function(){Y.loading|=1}),Q.addEventListener("error",function(){Y.loading|=2}),Y.loading|=4,_c(I,c,m)}I={type:"stylesheet",instance:I,count:1,state:Y},E.set(T,I)}}}function u9(u,c){Pa.X(u,c);var v=lu;if(v&&u){var m=Ln(v).hoistableScripts,E=cu(u),T=m.get(E);T||(T=v.querySelector(Xs(E)),T||(u=N({src:u,async:!0},c),(c=Sn.get(E))&&ip(u,c),T=v.createElement("script"),Xt(T),Sr(T,"link",u),v.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},m.set(E,T))}}function s9(u,c){Pa.M(u,c);var v=lu;if(v&&u){var m=Ln(v).hoistableScripts,E=cu(u),T=m.get(E);T||(T=v.querySelector(Xs(E)),T||(u=N({src:u,async:!0,type:"module"},c),(c=Sn.get(E))&&ip(u,c),T=v.createElement("script"),Xt(T),Sr(T,"link",u),v.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},m.set(E,T))}}function XT(u,c,v,m){var E=(E=de.current)?xc(E):null;if(!E)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=Ln(E).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=Ln(E).hoistableStyles,I=T.get(u);if(I||(E=E.ownerDocument||E,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(u,I),(T=E.querySelector(Ys(u)))&&!T._p&&(I.instance=T,I.state.loading=5),Sn.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},Sn.set(u,v),T||l9(E,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=Ln(E).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="'+vn(u)+'"'}function Ys(u){return'link[rel="stylesheet"]['+u+"]"}function KT(u){return N({},u,{"data-precedence":u.precedence,precedence:null})}function l9(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}),Sr(c,"link",v),Xt(c),u.head.appendChild(c))}function cu(u){return'[src="'+vn(u)+'"]'}function Xs(u){return"script[async]"+u}function jT(u,c,v){if(c.count++,c.instance===null)switch(c.type){case"style":var m=u.querySelector('style[data-href~="'+vn(v.href)+'"]');if(m)return c.instance=m,Xt(m),m;var E=N({},v,{"data-href":v.href,"data-precedence":v.precedence,href:null,precedence:null});return m=(u.ownerDocument||u).createElement("style"),Xt(m),Sr(m,"style",E),_c(m,v.precedence,u),c.instance=m;case"stylesheet":E=fu(v.href);var T=u.querySelector(Ys(E));if(T)return c.state.loading|=4,c.instance=T,Xt(T),T;m=KT(v),(E=Sn.get(E))&&ap(m,E),T=(u.ownerDocument||u).createElement("link"),Xt(T);var I=T;return I._p=new Promise(function(Y,Q){I.onload=Y,I.onerror=Q}),Sr(T,"link",m),c.state.loading|=4,_c(T,v.precedence,u),c.instance=T;case"script":return T=cu(v.src),(E=u.querySelector(Xs(T)))?(c.instance=E,Xt(E),E):(m=v,(E=Sn.get(T))&&(m=N({},v),ip(m,E)),u=u.ownerDocument||u,E=u.createElement("script"),Xt(E),Sr(E,"link",m),u.head.appendChild(E),c.instance=E);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,_c(m,v.precedence,u));return c.instance}function _c(u,c,v){for(var m=v.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),E=m.length?m[m.length-1]:null,T=E,I=0;I title"):null)}function f9(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 WT(u){return!(u.type==="stylesheet"&&(u.state.loading&3)===0)}var Ks=null;function c9(){}function d9(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 E=fu(v.href),T=u.querySelector(Ys(E));if(T){u=T._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(m.count++,m=Sc.bind(m),u.then(m,m)),c.state.loading|=4,c.instance=T,Xt(T);return}T=u.ownerDocument||u,v=KT(v),(E=Sn.get(E))&&ap(v,E),T=T.createElement("link"),Xt(T);var I=T;I._p=new Promise(function(Y,Q){I.onload=Y,I.onerror=Q}),Sr(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=Sc.bind(m),u.addEventListener("load",c),u.addEventListener("error",c))}}function h9(){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=D9(),gp.exports}var L9=k9();const N9=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 yL(t,e,r){return(e=wL(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function z9(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function I9(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 V9(){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 $9(){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 br(t,e){return B9(t)||I9(t,e)||g2(t,e)||V9()}function bL(t){return q9(t)||z9(t)||g2(t)||$9()}function F9(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 wL(t){var e=F9(t,"string");return typeof e=="symbol"?e:e+""}function fr(t){"@babel/helpers - typeof";return fr=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},fr(t)}function g2(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 sr=typeof window>"u"?null:window,xC=sr?sr.navigator:null;sr&&sr.document;var H9=fr(""),xL=fr({}),U9=fr(function(){}),G9=typeof HTMLElement>"u"?"undefined":fr(HTMLElement),Jl=function(e){return e&&e.instanceString&&zt(e.instanceString)?e.instanceString():null},$e=function(e){return e!=null&&fr(e)==H9},zt=function(e){return e!=null&&fr(e)===U9},St=function(e){return!on(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},lt=function(e){return e!=null&&fr(e)===xL&&!St(e)&&e.constructor===Object},Y9=function(e){return e!=null&&fr(e)===xL},Me=function(e){return e!=null&&fr(e)===fr(1)&&!isNaN(e)},X9=function(e){return Me(e)&&Math.floor(e)===e},Md=function(e){if(G9!=="undefined")return e!=null&&e instanceof HTMLElement},on=function(e){return ef(e)||_L(e)},ef=function(e){return Jl(e)==="collection"&&e._private.single},_L=function(e){return Jl(e)==="collection"&&!e._private.single},p2=function(e){return Jl(e)==="core"},EL=function(e){return Jl(e)==="stylesheet"},K9=function(e){return Jl(e)==="event"},Ai=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},j9=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},Z9=function(e){return lt(e)&&Me(e.x1)&&Me(e.x2)&&Me(e.y1)&&Me(e.y2)},Q9=function(e){return Y9(e)&&zt(e.then)},W9=function(){return xC&&xC.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},i7=function(e,r){return-1*TL(e,r)},Ke=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("^"+t7+"$").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},s7=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},l7=function(e){return f7[e.toLowerCase()]},CL=function(e){return(St(e)?e:null)||l7(e)||o7(e)||s7(e)||u7(e)},f7={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]},AL=function(e){for(var r=e.map,n=e.keys,a=n.length,i=0;i=l||q<0||_&&V>=g}function R(){var k=e();if(M(k))return O(k);y=setTimeout(R,D(k))}function O(k){return y=void 0,S&&d?A(k):(d=h=void 0,p)}function N(){y!==void 0&&clearTimeout(y),w=0,d=b=h=y=void 0}function L(){return y===void 0?p:O(e())}function B(){var k=e(),q=M(k);if(d=arguments,h=this,b=k,q){if(y===void 0)return C(b);if(_)return clearTimeout(y),y=setTimeout(R,l),A(b)}return y===void 0&&(y=setTimeout(R,l)),p}return B.cancel=N,B.flush=L,B}return kp=o,kp}var w7=b7(),af=tf(w7),Lp=sr?sr.performance:null,OL=Lp&&Lp.now?function(){return Lp.now()}:function(){return Date.now()},x7=function(){if(sr){if(sr.requestAnimationFrame)return function(t){sr.requestAnimationFrame(t)};if(sr.mozRequestAnimationFrame)return function(t){sr.mozRequestAnimationFrame(t)};if(sr.webkitRequestAnimationFrame)return function(t){sr.webkitRequestAnimationFrame(t)};if(sr.msRequestAnimationFrame)return function(t){sr.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(OL())},1e3/60)}}(),Od=function(e){return x7(e)},Ha=OL,Su=9261,DL=65599,gl=5381,kL=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*DL+a.value|0;return n},Ml=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Su;return r*DL+e|0},Ol=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gl;return(r<<5)+r+e|0},_7=function(e,r){return e*2097152+r},bi=function(e){return e[0]*2097152+e[1]},Bc=function(e,r){return[Ml(e[0],r[0]),Ol(e[1],r[1])]},E7=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)},x2=function(e){e.splice(0,e.length)},O7=function(e,r){for(var n=0;n"u"?"undefined":fr(Set))!==k7?Set:L7,gh=function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!p2(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:$e(r.classes)&&(f=r.classes.split(/\s+/));for(var d=0,h=f.length;d_?1:0},d=function(x,_,S,A,C){var D;if(S==null&&(S=0),C==null&&(C=n),S<0)throw new Error("lo must be non-negative");for(A==null&&(A=x.length);SN;0<=N?O++:O--)R.push(O);return R}).apply(this).reverse(),M=[],A=0,C=D.length;AL;0<=L?++R:--R)B.push(o(x,S));return B},b=function(x,_,S,A){var C,D,M;for(A==null&&(A=n),C=x[S];S>_;){if(M=S-1>>1,D=x[M],A(C,D)<0){x[S]=D,S=M;continue}break}return x[S]=C},w=function(x,_,S){var A,C,D,M,R;for(S==null&&(S=n),C=x.length,R=_,D=x[_],A=2*_+1;A0;){var D=_.pop(),M=w(D),R=D.id();if(g[R]=M,M!==1/0)for(var O=D.neighborhood().intersect(y),N=0;N0)for(F.unshift($);h[z];){var H=h[z];F.unshift(H.edge),F.unshift(H.node),G=H.node,z=G.id()}return s.spawn(F)}}}},V7={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(A){for(var C=0;C0;){if(C(),M++,A===d){for(var R=[],O=i,N=d,L=x[N];R.unshift(O),L!=null&&R.unshift(L),O=w[N],O!=null;)N=O.id(),L=x[N];return{found:!0,distance:h[A],path:this.spawn(R),steps:M}}p[A]=!0;for(var B=S._private.edges,k=0;kL&&(y[N]=L,_[N]=O,S[N]=C),!i){var B=O*d+R;!i&&y[B]>L&&(y[B]=L,_[B]=R,S[B]=C)}}}for(var k=0;k1&&arguments[1]!==void 0?arguments[1]:o,Be=S(Te),Fe=[],Le=Be;;){if(Le==null)return r.spawn();var Ne=_(Le),ze=Ne.edge,et=Ne.pred;if(Fe.unshift(Le[0]),Le.same(Ce)&&Fe.length>0)break;ze!=null&&Fe.unshift(ze),Le=et}return l.spawn(Fe)},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=K7(i,e,r),n--}return r},j7={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/X7);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},tz=function(e){return Math.PI*e/180},qc=function(e,r){return Math.atan2(r,e)-Math.PI/2},_2=Math.log2||function(t){return Math.log(t)/Math.log(2)},IL=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},rz=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}}},az=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},iz=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},oz=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}},VL=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},uz=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},sd=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},ld=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=br(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},FC=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},E2=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},sz=function(e,r){return Pu(e,r.x,r.y)},$L=function(e,r){return Pu(e,r.x1,r.y1)&&Pu(e,r.x2,r.y2)},FL=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,_=w;if(y=Si(e,r,n,a,b,w,x,_,!1),y.length>0)return y}if(p){var S=n+d+s,A=a-h+f-s,C=S,D=a+h-f+s;if(y=Si(e,r,n,a,S,A,C,D,!1),y.length>0)return y}if(g){var M=n-d+f-s,R=a+h+s,O=n+d-f+s,N=R;if(y=Si(e,r,n,a,M,R,O,N,!1),y.length>0)return y}if(p){var L=n-d-s,B=a-h+f-s,k=L,q=a+h-f+s;if(y=Si(e,r,n,a,L,B,k,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,G=a-h+f;if(V=pl(e,r,n,a,F,G,f+s),V.length>0&&V[0]>=F&&V[1]<=G)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 j=n-d+f,J=a+h-f;if(V=pl(e,r,n,a,j,J,f+s),V.length>0&&V[0]<=j&&V[1]>=J)return[V[0],V[1]]}return[]},lz=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},fz=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)},cz=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]},dz=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)},hz=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=[];dz(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,_,S,A,C=0;C=0?Af?(e-i)*(e-i)+(r-o)*(r-o):d-g},Xr=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=Ld(d,-f);b=kd(w)}else b=d;return Xr(e,r,b)},gz=function(e,r,n,a,i,o,s,l){for(var f=new Array(n.length*2),d=0;d=0&&w<=1&&_.push(w),x>=0&&x<=1&&_.push(x),_.length===0)return[];var S=_[0]*l[0]+e,A=_[0]*l[1]+r;if(_.length>1){if(_[0]==_[1])return[S,A];var C=_[1]*l[0]+e,D=_[1]*l[1]+r;return[S,A,C,D]}else return[S,A]},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,_=b*h-g*y;if(_!==0){var S=w/_,A=x/_,C=.001,D=0-C,M=1+C;return D<=S&&S<=M&&D<=A&&A<=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=Ld(h,-l);p=kd(b)}else p=h}else p=n;for(var w,x,_,S,A=0;A2){for(var y=[d[0],d[1]],b=Math.pow(y[0]-e,2)+Math.pow(y[1]-r,2),w=1;wd&&(d=A)},get:function(S){return f[S]}},g=0;g0?V=q.edgesTo(k)[0]:V=k.edgesTo(q)[0];var P=a(V);k=k.id(),M[k]>M[L]+P&&(M[k]=M[L]+P,R.nodes.indexOf(k)<0?R.push(k):R.updateItem(k),D[k]=0,C[k]=[]),M[k]==M[L]+P&&(D[k]=D[k]+D[L],C[k].push(L))}else for(var $=0;$0;){for(var H=A.pop(),j=0;j0&&s.push(n[l]);s.length!==0&&i.push(a.collection(s))}return i},Dz=function(e,r){for(var n=0;n5&&arguments[5]!==void 0?arguments[5]:Nz,s=a,l,f,d=0;d=2?rl(e,r,n,0,XC,Bz):rl(e,r,n,0,YC)},squaredEuclidean:function(e,r,n){return rl(e,r,n,0,XC)},manhattan:function(e,r,n){return rl(e,r,n,0,YC)},max:function(e,r,n){return rl(e,r,n,-1/0,qz)}};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 Pz=cr({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),T2=function(e){return Pz(e)},Nd=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},Vz=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][_.key]&&(l=n[b.key][_.key])):i.linkage==="max"?(l=n[y.key][_.key],n[y.key][_.key]0&&a.push(i);return a},JC=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=JC(e,r,n),a},eA=function(e){for(var r=this.cy(),n=this.nodes(),a=Wz(e),i={},o=0;o=L?(B=L,L=q,k=V):q>B&&(B=q);for(var P=0;P0?1:0;M[O%a.minIterations*s+j]=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]=[],_.outgoers().forEach(function(R){R.isEdge()&&h[S].push(R.id())})}else g[S]=[void 0,_.target().id()]}):o.forEach(function(_){var S=_.id();if(_.isNode()){var A=_.degree(!0);A%2&&(l?f?s=!0:f=S:l=S),h[S]=[],_.connectedEdges().forEach(function(C){return h[S].push(C.id())})}else g[S]=[_.source().id(),_.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 A=S,C=[S],D,M,R;h[A].length;)D=h[A].shift(),M=g[D][0],R=g[D][1],A!=R?(h[R]=h[R].filter(function(O){return O!=D}),A=R):!i&&A!=M&&(h[M]=h[M].filter(function(O){return O!=D}),A=M),C.unshift(D),C.unshift(A);return C},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}},zc=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 _=x.connectedNodes().intersection(e);w.merge(x),_.forEach(function(S){var A=S.id(),C=S.connectedEdges().intersection(e);w.merge(S),r[A].cutVertex?w.merge(C.filter(function(D){return D.isLoop()})):w.merge(C)})}),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,_,S;b.forEach(function(A){w=A.source().id(),x=A.target().id(),_=w===p?x:w,_!==y&&(S=A.id(),s[S]||(s[S]=!0,o.push({x:p,y:_,edge:A})),_ in r?r[p].low=Math.min(r[p].low,r[_].id):(f(g,_,p),r[p].low=Math.min(r[p].low,r[_].low),r[p].id<=r[_].low&&(r[p].cutVertex=!0,l(p,_))))})}};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}},oI={hopcroftTarjanBiconnected:zc,htbc:zc,htb:zc,hopcroftTarjanBiconnectedComponents:zc},Ic=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}},uI={tarjanStronglyConnected:Ic,tsc:Ic,tscc:Ic,tarjanStronglyConnectedComponents:Ic},jL={};[Dl,I7,V7,F7,U7,Y7,j7,wz,Mu,Ou,Rx,Lz,Yz,Zz,nI,iI,oI,uI].forEach(function(t){Ke(jL,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 ZL=0,QL=1,WL=2,Un=function(e){if(!(this instanceof Un))return new Un(e);this.id="Thenable/1.0.7",this.state=ZL,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))};Un.prototype={fulfill:function(e){return tA(this,QL,"fulfillValue",e)},reject:function(e){return tA(this,WL,"rejectReason",e)},then:function(e,r){var n=this,a=new Un;return n.onFulfilled.push(nA(e,a,"fulfill")),n.onRejected.push(nA(r,a,"reject")),JL(n),a.proxy}};var tA=function(e,r,n,a){return e.state===ZL&&(e.state=r,e[n]=a,JL(e)),e},JL=function(e){e.state===QL?rA(e,"onFulfilled",e.fulfillValue):e.state===WL&&rA(e,"onRejected",e.rejectReason)},rA=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,CA;function CI(){if(CA)return om;CA=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,AA;function AI(){if(AA)return um;AA=1;var t=_I(),e=EI(),r=SI(),n=TI(),a=CI();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}};fd.className=fd.classNames=fd.classes;var st={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:lr,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};st.variable="(?:[\\w-.]|(?:\\\\"+st.metaChar+"))+";st.className="(?:[\\w-]|(?:\\\\"+st.metaChar+"))+";st.value=st.string+"|"+st.number;st.id=st.variable;(function(){var t,e,r;for(t=st.comparatorOp.split("|"),r=0;r=0)&&e!=="="&&(st.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 i7(t.selector,e.selector)}),aV=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},fV=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(d){return d??""},r=function(d){return $e(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,_=d.field;return"["+e(x)+_+"]"}case De.DATA_EXIST:{var S=d.field;return"["+S+"]"}case De.META_COMPARE:{var A=d.operator,C=d.field;return"[["+C+n(e(A))+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 u8(t,e,r){if(r.isParent())for(var n=r._private.children,a=0;a1&&arguments[1]!==void 0?arguments[1]:!0;return M2(this,t,e,u8)};function s8(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 M2(this,t,e,s8)};function yV(t,e,r){s8(t,e,r),u8(t,e,r)}Iu.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return M2(this,t,e,yV)};Iu.ancestors=Iu.parents;var Nl,l8;Nl=l8={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 bV=l8,_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})});Ke(_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 _=x?b.position():{x:0,y:0};return i={x:y.x-_.x,y:y.y-_.y},e===void 0?i:i[e]}else if(!o)return;return this}};Hn.modelPosition=Hn.point=Hn.position;Hn.modelPositions=Hn.points=Hn.positions;Hn.renderedPoint=Hn.renderedPosition;Hn.relativePoint=Hn.relativePosition;var wV=f8,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,N,L){var B=0,k=0,q=N+L;return O>0&&q>0&&(B=N/q*O,k=L/q*O),{biasDiff:B,biasComplementDiff:k}}function y(O,N,L,B){if(L.units==="%")switch(B){case"width":return O>0?L.pfValue*O:0;case"height":return N>0?L.pfValue*N:0;case"average":return O>0&&N>0?L.pfValue*(O+N)/2:0;case"min":return O>0&&N>0?O>N?L.pfValue*N:L.pfValue*O:0;case"max":return O>0&&N>0?O>N?L.pfValue*O:L.pfValue*N:0;default:return 0}else return L.units==="px"?L.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 _=d.height.bottom.value;d.height.bottom.units==="px"&&d.height.val>0&&(_=_*100/d.height.val);var S=p(d.width.val-h.w,b,w),A=S.biasDiff,C=S.biasComplementDiff,D=p(d.height.val-h.h,x,_),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=(-A+h.x1+h.x2+C)/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:zn(e,r.x1,r.y1,r.x2,r.y2)},nl=function(e,r,n){return In(e,r,n)},Vc=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,sd(h,1),zn(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"),_=r.pstyle("text-outline-width").pfValue,S=r.pstyle("text-border-width").pfValue,A=S/2,C=r.pstyle("text-background-padding").pfValue,D=2,M=h,R=d,O=R/2,N=M/2,L,B,k,q;if(w)L=g-O,B=g+O,k=p-N,q=p+N;else{switch(l.value){case"left":L=g-R,B=g;break;case"center":L=g-O,B=g+O;break;case"right":L=g,B=g+R;break}switch(f.value){case"top":k=p-M,q=p;break;case"center":k=p-N,q=p+N;break;case"bottom":k=p,q=p+M;break}}var V=y-Math.max(_,A)-C-D,P=y+Math.max(_,A)+C+D,$=b-Math.max(_,A)-C-D,F=b+Math.max(_,A)+C+D;L+=V,B+=P,k+=$,q+=F;var G=n||"main",z=i.labelBounds,H=z[G]=z[G]||{};H.x1=L,H.y1=k,H.x2=B,H.y2=q,H.w=B-L,H.h=q-k,H.leftPad=V,H.rightPad=P,H.topPad=$,H.botPad=F;var j=w&&x.strValue==="autorotate",J=x.pfValue!=null&&x.pfValue!==0;if(j||J){var U=j?nl(i.rstyle,"labelAngle",n):x.pfValue,K=Math.cos(U),Z=Math.sin(U),re=(L+B)/2,ne=(k+q)/2;if(!w){switch(l.value){case"left":re=B;break;case"right":re=L;break}switch(f.value){case"top":ne=q;break;case"bottom":ne=k;break}}var ee=function(Re,Te){return Re=Re-re,Te=Te-ne,{x:Re*K-Te*Z+re,y:Re*Z+Te*K+ne}},W=ee(L,k),te=ee(L,q),ce=ee(B,k),de=ee(B,q);L=Math.min(W.x,te.x,ce.x,de.x),B=Math.max(W.x,te.x,ce.x,de.x),k=Math.min(W.y,te.y,ce.y,de.y),q=Math.max(W.y,te.y,ce.y,de.y)}var ye=G+"Rot",we=z[ye]=z[ye]||{};we.x1=L,we.y1=k,we.x2=B,we.y2=q,we.w=B-L,we.h=q-k,zn(e,L,k,B,q),zn(i.labelBounds.all,L,k,B,q)}return e}},xV=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(ld(e,[Math.ceil(g/2),Math.ceil(p/2)]),d!=0||h!==0){var y=oz(e,d,h);VL(e,y)}}}},_V=function(e,r){var n=e._private.cy,a=n.styleEnabled(),i=n.headless(),o=Zr(),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],_=function(Pe){return Pe.pstyle("display").value!=="none"},S=!a||_(e)&&(!f||_(e.source())&&_(e.target()));if(S){var A=0,C=0;a&&r.includeOverlays&&(A=e.pstyle("overlay-opacity").value,A!==0&&(C=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(C,M),O=0,N=0;if(a&&(O=e.pstyle("width").pfValue,N=O/2),l&&r.includeNodes){var L=e.position();y=L.x,b=L.y;var B=e.outerWidth(),k=B/2,q=e.outerHeight(),V=q/2;d=y-k,h=y+k,g=b-V,p=b+V,zn(o,d,g,h,p),a&&r.includeOutlines&&xV(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-=N,h+=N,g-=N,p+=N,zn(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 G=g;g=p,p=G}zn(o,d-N,g-N,h+N,p+N)}}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-=N,h+=N,g-=N,p+=N,zn(o,d,g,h,p)}if(a&&r.includeEdges&&f&&(Vc(o,e,"mid-source"),Vc(o,e,"mid-target"),Vc(o,e,"source"),Vc(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;zn(o,o.x1+W,o.y1+te,o.x2+W,o.y2+te)}}var ce=s.bodyBounds=s.bodyBounds||{};FC(ce,o),ld(ce,x),sd(ce,1),a&&(d=o.x1,h=o.x2,g=o.y1,p=o.y2,zn(o,d-R,g-R,h+R,p+R));var de=s.overlayBounds=s.overlayBounds||{};FC(de,o),ld(de,x),sd(de,1);var ye=s.labelBounds=s.labelBounds||{};ye.all!=null?iz(ye.all):ye.all=Zr(),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=An(o.x1),o.y1=An(o.y1),o.x2=An(o.x2),o.y2=An(o.y2),o.w=An(o.x2-o.x1),o.h=An(o.y2-o.y1),o.w>0&&o.h>0&&S&&(ld(o,x),sd(o,1)),o},d8=function(e){var r=0,n=function(o){return(o?1:0)<0&&arguments[0]!==void 0?arguments[0]:PV,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]),zV(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===qV)&&i.eventMatches(i.context,d,o)){var h=[o];e!=null&&O7(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&&$e(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":fr(Symbol))!=e&&fr(Symbol.iterator)!=e;r&&(Bd[Symbol.iterator]=function(){var n=this,a={value:void 0,done:!1},i=0,o=this.length;return yL({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(lt(e)){var o=e;i.applyBypass(this,o,a),this.emitAndNotify("style")}else if($e(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)}});Br.neighbourhood=Br.neighborhood;Br.closedNeighbourhood=Br.closedNeighborhood;Br.openNeighbourhood=Br.openNeighborhood;Ke(Br,{source:Rn(function(e){var r=this[0],n;return r&&(n=r._private.source||r.cy().collection()),n&&e?n.filter(e):n},"source"),target:Rn(function(e){var r=this[0],n;return r&&(n=r._private.target||r.cy().collection()),n&&e?n.filter(e):n},"target"),sources:dR({attr:"source"}),targets:dR({attr:"target"})});function dR(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]}});Br.componentsOf=Br.components;var Rr=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&<(r[0])&&!ef(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 G=s.length===r.length?r:new Rr(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?L.emitAndNotify("remove"):e&&L.emit("remove"));for(var B=0;B0?B=q:L=q;while(Math.abs(k)>o&&++V=i?_(N,V):P===0?V:A(N,L,L+f)}var D=!1;function M(){D=!0,(t!==e||r!==n)&&S()}var R=function(L){return D||M(),t===e&&r===n?L:L===0?0:L===1?1:w(C(L),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 jV=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=KV(e,r,n,a);return function(o,s,l){return o+(s-o)*i(l)}},dd={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 dd.linear;var a=jV(e,r,n);return function(i,o,s){return i+(o-i)*a(s)}},"cubic-bezier":At};function gR(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 pR(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=pR(t,a),s=pR(e,a);if(Me(o)&&Me(s))return gR(i,o,s,r,n);if(St(o)&&St(s)){for(var l=[],f=0;f0?(p==="spring"&&y.push(o.duration),o.easingImpl=dd[p].apply(null,y)):o.easingImpl=dd[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,_=o.position;if(_&&a&&!t.locked()){var S={};il(x.x,_.x)&&(S.x=vu(x.x,_.x,w,b)),il(x.y,_.y)&&(S.y=vu(x.y,_.y,w,b)),t.position(S)}var A=o.startPan,C=o.pan,D=i.pan,M=C!=null&&n;M&&(il(A.x,C.x)&&(D.x=vu(A.x,C.x,w,b)),il(A.y,C.y)&&(D.y=vu(A.y,C.y,w,b)),t.emit("pan"));var R=o.startZoom,O=o.zoom,N=O!=null&&n;N&&(il(R,O)&&(i.zoom=kl(i.minZoom,vu(R,O,w,b),i.maxZoom)),t.emit("zoom")),(M||N)&&t.emit("viewport");var L=o.style;if(L&&L.length>0&&a){for(var B=0;B=0;M--){var R=D[M];R()}D.splice(0,D.length)},_=p.length-1;_>=0;_--){var S=p[_],A=S._private;if(A.stopped){p.splice(_,1),A.hooked=!1,A.playing=!1,A.started=!1,x(A.frames);continue}!A.playing&&!A.applying||(A.playing&&A.applying&&(A.applying=!1),A.started||QV(d,S,t),ZV(d,S,t,h),A.applying&&(A.applying=!1),x(A.frames),A.step!=null&&A.step(t),S.completed()&&(p.splice(_,1),A.hooked=!1,A.playing=!1,A.started=!1,x(A.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 WV={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&&Od(function(i){mR(i,e),r()})}var n=e.renderer();n&&n.beforeRender?n.beforeRender(function(i,o){mR(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&&ef(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}},Hc=function(e){return $e(e)?new Oi(e):e},E8={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,Hc(r),n),this},removeListener:function(e,r,n){return this.emitter().removeListener(e,Hc(r),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,r,n){return this.emitter().one(e,Hc(r),n),this},once:function(e,r,n){return this.emitter().one(e,Hc(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(E8);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 hd={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;$e(e.eles)?i=r.$(e.eles):i=e.eles!=null?e.eles:r.$();var o=new a(Ke({},e,{cy:r,eles:i}));return o}};hd.createLayout=hd.makeLayout=hd.layout;var e$={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 vd={collection:function(e,r){return $e(e)?this.$(e):on(e)?e.collection():St(e)?(r||(r={}),new Rr(this,e,r.unique,r.removed)):new Rr(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}};vd.elements=vd.filter=vd.$;var xr={},Tl="t",r$="f";xr.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&&(A=1),s.color){var D=n.valueMin[0],M=n.valueMax[0],R=n.valueMin[1],O=n.valueMax[1],N=n.valueMin[2],L=n.valueMax[2],B=n.valueMin[3]==null?1:n.valueMin[3],k=n.valueMax[3]==null?1:n.valueMax[3],q=[Math.round(D+(M-D)*A),Math.round(R+(O-R)*A),Math.round(N+(L-N)*A),Math.round(B+(k-B)*A)];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)*A;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)};xr.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)};xr.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)})};xr.checkBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(a){return a.triggersBounds},function(a){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})};xr.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()})})};xr.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()})})};xr.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 sf={};sf.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 _=x[1],S=x[2],A=e.properties[_];if(!A){yt("Skipping property: Invalid property name in: "+o),l();continue}var C=r.parse(_,S);if(!C){yt("Skipping property: Invalid property definition in: "+o),l();continue}b.push({name:_,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,_=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(_)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 A=[],C=[],D=[],M="",R=!1,O=0;O0?" ":"")+N.strValue}return f.validate&&!f.validate(A,C)?null:f.singleEnum&&R?A.length===1&&$e(A[0])?{name:t,value:A[0],strValue:A[0],bypass:r}:null:{name:t,value:A,pfValue:D,strValue:M,bypass:r,units:C}}var L=function(){for(var ee=0;eef.max||f.strictMax&&e===f.max))return null;var P={name:t,value:e,strValue:""+e+(B||""),units:B,bypass:r};return f.unitless||B!=="px"&&B!=="em"?P.pfValue=e:P.pfValue=B==="px"||!B?e:this.getEmSizeInPixels()*e,(B==="ms"||B==="s")&&(P.pfValue=B==="ms"?e:1e3*e),(B==="deg"||B==="rad")&&(P.pfValue=B==="rad"?e:tz(e)),B==="%"&&(P.pfValue=e/100),P}else if(f.propList){var $=[],F=""+e;if(F!=="none"){for(var G=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:lt(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($e(e)){var n=e;e=this.mutableElements().filter(n)}else on(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=Ke({},e);var n=e.container;n&&!Md(n)&&Md(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=sr!==void 0&&n!==void 0&&!e.headless,s=e;s.layout=Ke({name:o?"grid":"null"},s.layout),s.renderer=Ke({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 Rr(this),listeners:[],aniEles:new Rr(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:lt(s.pan)&&Me(s.pan.x)?s.pan.x:0,y:lt(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(Q9);if(w)return Xu.all(y).then(b);b(y)};f.styleEnabled&&r.setStyle([]);var h=Ke({},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&&(lt(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 _=Ke({},r._private.options.layout);_.eles=r.elements(),r.layout(_).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=Zr(s?t.boundingBox:{x1:l.x1,y1:l.y1,w:l.w,h:l.h}),d;if(on(t.roots))d=t.roots;else if(St(t.roots)){for(var h=[],g=0;g0;){var V=q(),P=N(V,B);if(P)V.outgoers().filter(function(Te){return Te.isNode()&&r.has(Te)}).forEach(k);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&&_[0].length<=3?Ne/2:0),et=2*Math.PI/_[Fe].length*Le;return Fe===0&&_[0].length===1&&(ze=1),{x:de.x+ze*Math.cos(et),y:de.y+ze*Math.sin(et)}}else{var xe=_[Fe].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+(Fe+1-(Z+1)/2)*we};return oe}};return r.nodes().layoutPositions(this,t,Re),this};var u$={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 T8(t){this.options=Ke({},u$,t)}T8.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=Zr(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),_=Math.sin(f)-Math.sin(0),S=Math.sqrt(h*h/(x*x+_*_));d=Math.max(S,d)}var A=function(D,M){var R=e.startAngle+M*f*(a?1:-1),O=d*Math.cos(R),N=d*Math.sin(R),L={x:s.x+O,y:s.y+N};return L};return n.nodes().layoutPositions(this,e,A),this};var s$={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 C8(t){this.options=Ke({},s$,t)}C8.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=Zr(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 C=Math.abs(_[0].value-A.value);C>=w&&(_=[],x.push(_))}_.push(A)}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 N=0,L=0;L1&&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));N=Math.max($,N)}B.r=N,N+=D}if(e.equidistant){for(var F=0,G=0,z=0;z=t.numIter||(g$(n,t),n.temperature=n.temperature*t.coolingFactor,n.temperature=t.animationThreshold&&i(),Od(d)}};d()}else{for(;f;)f=o(l),l++;wR(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 f$=function(e,r,n){for(var a=n.eles.edges(),i=n.eles.nodes(),o=Zr(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},A8=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=Pd(e,s,l),w=Pd(r,-1*s,-1*l),x=w.x-b.x,_=w.y-b.y,S=x*x+_*_,g=Math.sqrt(S),h=(e.nodeRepulsion+r.nodeRepulsion)/S,p=h*x/g,y=h*_/g;e.isLocked||(e.offsetX-=p,e.offsetY-=y),r.isLocked||(r.offsetX+=p,r.offsetY+=y)}},y$=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},Pd=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)},b$=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}}}}},x$=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},M8=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)}}},S$={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 O8(t){this.options=Ke({},S$,t)}O8.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=Zr(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 _=i.w/f,S=i.h/l;if(e.condense&&(_=0,S=0),e.avoidOverlap)for(var A=0;A=f&&(V=0,q++)},$={},F=0;F(V=vz(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=hz(t,e,P[$],P[$+1],P[$+2],P[$+3],P[$+4],P[$+5])))return w(M,V),!0}for(var F=F||R.source,G=G||R.target,z=a.getArrowWidth(N,L),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(G))}function S(M,R,O){return In(M,R,O)}function A(M,R){var O=M._private,N=g,L;R?L=R+"-":L="",M.boundingBox();var B=O.labelBounds[R||"main"],k=M.pstyle(L+"label").value,q=M.pstyle("text-events").strValue==="yes";if(!(!q||!k)){var V=S(O.rscratch,"labelX",R),P=S(O.rscratch,"labelY",R),$=S(O.rscratch,"labelAngle",R),F=M.pstyle(L+"text-margin-x").pfValue,G=M.pstyle(L+"text-margin-y").pfValue,z=B.x1-N-F,H=B.x2+N-F,j=B.y1-N-G,J=B.y2+N-G;if($){var U=Math.cos($),K=Math.sin($),Z=function(de,ye){return de=de-V,ye=ye-P,{x:de*U-ye*K+V,y:de*K+ye*U+P}},re=Z(z,j),ne=Z(z,J),ee=Z(H,j),W=Z(H,J),te=[re.x+F,re.y+G,ee.x+F,ee.y+G,W.x+F,W.y+G,ne.x+F,ne.y+G];if(Xr(t,e,te))return w(M),!0}else if(Pu(B,t,e))return w(M),!0}}for(var C=o.length-1;C>=0;C--){var D=o[C];D.isNode()?x(D)||A(D):_(D)||A(D)||A(D,"source")||A(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=Zr({x1:t,y1:e,x2:r,y2:n}),h=0;h0?-(Math.PI-e.ang):Math.PI+e.ang},O$=function(e,r,n,a,i){if(e!==TR?CR(r,e,ra):M$(Tn,ra),CR(r,n,Tn),ER=ra.nx*Tn.ny-ra.ny*Tn.nx,SR=ra.nx*Tn.nx-ra.ny*-Tn.ny,za=Math.asin(Math.max(-1,Math.min(1,ER))),Math.abs(za)<1e-6){qx=r.x,Px=r.y,go=pu=0;return}po=1,gd=!1,SR<0?za<0?za=Math.PI+za:(za=Math.PI-za,po=-1,gd=!0):za>0&&(po=-1,gd=!0),r.radius!==void 0?pu=r.radius:pu=a,oo=za/2,Uc=Math.min(ra.len/2,Tn.len/2),i?(ea=Math.abs(Math.cos(oo)*pu/Math.sin(oo)),ea>Uc?(ea=Uc,go=Math.abs(ea*Math.sin(oo)/Math.cos(oo))):go=pu):(ea=Math.min(Uc,pu),go=Math.abs(ea*Math.sin(oo)/Math.cos(oo))),zx=r.x+Tn.nx*ea,Ix=r.y+Tn.ny*ea,qx=zx-Tn.ny*go*po,Px=Ix+Tn.nx*go*po,N8=r.x+ra.nx*ea,B8=r.y+ra.ny*ea,TR=r};function q8(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 B2(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}:(O$(t,e,r,n,a),{cx:qx,cy:Px,radius:go,startX:N8,startY:B8,stopX:zx,stopY:Ix,startAngle:ra.ang+Math.PI/2*po,endAngle:Tn.ang-Math.PI/2*po,counterClockwise:gd})}var Pr={};Pr.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(C,D,M,R){var O=R-D,N=M-C,L=Math.sqrt(N*N+O*O);return{x:-O/L,y:N/L}},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=br(h,2),p=g[0],y=g[1],b=this.manualEndptToPx(t.target()[0],s),w=br(b,2),x=w[0],_=w[1],S={x1:p,y1:y,x2:x,y2:_};a=f(p,y,x,_),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}};Pr.findHaystackPoints=function(t){for(var e=0;e0?Math.max(ge-Se,0):Math.min(ge+Se,0)},k=B(N,R),q=B(L,O),V=!1;_===f?x=Math.abs(k)>Math.abs(q)?a:n:_===l||_===s?(x=n,V=!0):(_===i||_===o)&&(x=a,V=!0);var P=x===n,$=P?q:k,F=P?L:N,G=IL(F),z=!1;!(V&&(A||D))&&(_===s&&F<0||_===l&&F>0||_===i&&F>0||_===o&&F<0)&&(G*=-1,$=G*Math.abs($),z=!0);var H;if(A){var j=C<0?1+C:C;H=j*$}else{var J=C<0?$:0;H=J+C*G}var U=function(ge){return Math.abs(ge)=Math.abs($)},K=U(H),Z=U(Math.abs($)-Math.abs(H)),re=K||Z;if(re&&!z)if(P){var ne=Math.abs(F)<=g/2,ee=Math.abs(N)<=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(L)<=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 Fe=(d.x1+d.x2)/2,Le=d.y1,Ne=d.y2;r.segpts=[Fe,Le,Fe,Ne]}else r.segpts=[d.x2,d.y1]}else if(P){var ze=d.y1+H+(w?g/2*G:0),et=d.x1,xe=d.x2;r.segpts=[et,ze,xe,ze]}else{var X=d.x1+H+(w?h/2*G: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)}};Pr.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),_=!Me(r.arrowEndX)||!Me(r.arrowEndY),S=3,A=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,C=S*A,D=xo({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),M=DF.poolIndex()){var G=$;$=F,F=G}var z=k.srcPos=$.position(),H=k.tgtPos=F.position(),j=k.srcW=$.outerWidth(),J=k.srcH=$.outerHeight(),U=k.tgtW=F.outerWidth(),K=k.tgtH=F.outerHeight(),Z=k.srcShape=r.nodeShapes[e.getNodeShape($)],re=k.tgtShape=r.nodeShapes[e.getNodeShape(F)],ne=k.srcCornerRadius=$.pstyle("corner-radius").value==="auto"?"auto":$.pstyle("corner-radius").pfValue,ee=k.tgtCornerRadius=F.pstyle("corner-radius").value==="auto"?"auto":F.pstyle("corner-radius").pfValue,W=k.tgtRs=F._private.rscratch,te=k.srcRs=$._private.rscratch;k.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:A,segment:D};break}}if(w)break}var R=w.cp,O=w.segment,N=(y-x)/O.length,L=O.t1-O.t0,B=p?O.t0+L*N:O.t1-L*N;B=kl(0,B,1),e=Ru(R.p0,R.p1,R.p2,B),g=k$(R.p0,R.p1,R.p2,B);break}case"straight":case"segments":case"haystack":{for(var k=0,q,V,P,$,F=n.allpts.length,G=0;G+3=y));G+=2);var z=y-V,H=z/q;H=kl(0,H,1),e=nz(P,$,H),g=I8(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=In(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):In(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 C=x.matchAll(b),D="",M=0,R=Fn(C),O;try{for(R.s();!(O=R.n()).done;){var N=O.value,L=N[0],B=x.substring(M,N.index);M=N.index+L.length;var k=D.length===0?B:D+B+L,q=this.calculateLabelDimensions(t,k),V=q.width;V<=h?D+=B+L:(D&&y.push(D),D=B+L)}}catch(j){R.e(j)}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="…",G=!1;if(this.calculateLabelDimensions(t,a).widthP)break;$+=a[z],z===a.length-1&&(G=!0)}return G||($+=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.split(` `),S=0;S<_.length;S++){var A=_[S],C=y.measureText(A),D=Math.ceil(C.width),M=d;w=Math.max(D,w),x+=M}return w+=l,x+=l,o[i]={width:w,height:x}};ga.calculateLabelAngle=function(t,e){var r=t._private,n=r.rscratch,a=t.isEdge(),i=e?e+"-":"",o=t.pstyle(i+"text-rotation"),s=o.strValue;return s==="none"?0:a&&s==="autorotate"?n.labelAutoAngle:s==="autorotate"?0:o.pfValue};ga.calculateLabelAngles=function(t){var e=this,r=t.isEdge(),n=t._private,a=n.rscratch;a.labelAngle=e.calculateLabelAngle(t),r&&(a.sourceLabelAngle=e.calculateLabelAngle(t,"source"),a.targetLabelAngle=e.calculateLabelAngle(t,"target"))};var V8={},AR=28,RR=!1;V8.getNodeShape=function(t){var e=this,r=t.pstyle("shape").value;if(r==="cutrectangle"&&(t.width()1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(o),s)for(var l=0;l=t.desktopTapThreshold2}var vr=i(X);bt&&(t.hoverData.tapholdCancelled=!0);var nr=function(){var Ot=t.hoverData.dragDelta=t.hoverData.dragDelta||[];Ot.length===0?(Ot.push(Ye[0]),Ot.push(Ye[1])):(Ot[0]+=Ye[0],Ot[1]+=Ye[1])};ve=!0,a(Oe,["mousemove","vmousemove","tapdrag"],X,{x:ge[0],y:ge[1]});var Or=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||ue.emit({originalEvent:X,type:"boxstart",position:{x:ge[0],y:ge[1]}}),Ge[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(t.hoverData.which===3){if(bt){var Hr={originalEvent:X,type:"cxtdrag",position:{x:ge[0],y:ge[1]}};We?We.emit(Hr):ue.emit(Hr),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 Wr;if(t.hoverData.justStartedPan){var ln=t.hoverData.mdownPos;Wr={x:(ge[0]-ln[0])*fe,y:(ge[1]-ln[1])*fe},t.hoverData.justStartedPan=!1}else Wr={x:Ye[0]*fe,y:Ye[1]*fe};ue.panBy(Wr),ue.emit("dragpan"),t.hoverData.dragged=!0}ge=t.projectIntoViewport(X.clientX,X.clientY)}else if(Ge[4]==1&&(We==null||We.pannable())){if(bt){if(!t.hoverData.dragging&&ue.boxSelectionEnabled()&&(vr||!ue.panningEnabled()||!ue.userPanningEnabled()))Or();else if(!t.hoverData.selecting&&ue.panningEnabled()&&ue.userPanningEnabled()){var fn=o(We,t.hoverData.downs);fn&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,Ge[4]=0,t.data.bgActivePosistion=Tu(Se),t.redrawHint("select",!0),t.redraw())}We&&We.pannable()&&We.active()&&We.unactivate()}}else{if(We&&We.pannable()&&We.active()&&We.unactivate(),(!We||!We.grabbed())&&Oe!=Qe&&(Qe&&a(Qe,["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),We)if(bt){if(ue.boxSelectionEnabled()&&vr)We&&We.grabbed()&&(x(ht),We.emit("freeon"),ht.emit("free"),t.dragData.didDrag&&(We.emit("dragfreeon"),ht.emit("dragfree"))),Or();else if(We&&We.grabbed()&&t.nodeIsDraggable(We)){var ar=!t.dragData.didDrag;ar&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||b(ht,{inDragLayer:!0});var Qt={x:0,y:0};if(Me(Ye[0])&&Me(Ye[1])&&(Qt.x+=Ye[0],Qt.y+=Ye[1],ar)){var Nt=t.hoverData.dragDelta;Nt&&Me(Nt[0])&&Me(Nt[1])&&(Qt.x+=Nt[0],Qt.y+=Nt[1])}t.hoverData.draggingEles=!0,ht.silentShift(Qt).emit("position drag"),t.redrawHint("drag",!0),t.redraw()}}else nr();ve=!0}if(Ge[2]=ge[0],Ge[3]=ge[1],ve)return X.stopPropagation&&X.stopPropagation(),X.preventDefault&&X.preventDefault(),!1}},!1);var B,k,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,He=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 Ge={originalEvent:X,type:"cxttapend",position:{x:ue[0],y:ue[1]}};if(Se?Se.emit(Ge):ve.emit(Ge),!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]}),k=!1,X.timeStamp-q<=ve.multiClickDebounceTime()?(B&&clearTimeout(B),k=!0,q=null,a(Se,["dblclick","dbltap","vdblclick"],X,{x:ue[0],y:ue[1]})):(B=setTimeout(function(){k||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"||He?Ae.selected()?Ae.unselect(["tapunselect"]):Ae.select(["tapselect"]):He||(ve.$(r).unmerge(Ae).unselect(["tapunselect"]),Ae.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var Qe=ve.collection(t.getAllInBox(fe[0],fe[1],fe[2],fe[3]));t.redrawHint("select",!0),Qe.length>0&&t.redrawHint("eles",!0),ve.emit({type:"boxend",originalEvent:X,position:{x:ue[0],y:ue[1]}});var We=function(bt){return bt.selectable()&&!bt.selected()};ve.selectionType()==="additive"||He||ve.$(r).unmerge(Qe).unselect(),Qe.emit("box").stdFilter(We).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 Ye=Se&&Se.grabbed();x(ge),Ye&&(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 He=oe.zoom()*Math.pow(10,ge);X.type==="gesturechange"&&(He=t.gestureStartZoom*X.scale),oe.zoom({level:He,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,G,z,H,j,J,U,K,Z,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,!!N(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],Z=Ae[2],re=Ae[3],P=X.touches[0].clientX-U,$=X.touches[0].clientY-K,F=X.touches[1].clientX-U,G=X.touches[1].clientY-K,ne=0<=P&&P<=Z&&0<=F&&F<=Z&&0<=$&&$<=re&&0<=G&&G<=re;var ge=oe.pan(),Se=oe.zoom();z=ee(P,$,F,G),H=W(P,$,F,G),j=[(P+F)/2,($+G)/2],J=[(j[0]-ge.x)/Se,(j[1]-ge.y)/Se];var He=200,Ge=He*He;if(H=1){for(var hr=t.touchData.startPosition=[null,null,null,null,null,null],Mt=0;Mt=t.touchTapThreshold2}if(oe&&t.touchData.cxt){X.preventDefault();var hr=X.touches[0].clientX-U,Mt=X.touches[0].clientY-K,Zt=X.touches[1].clientX-U,Gt=X.touches[1].clientY-K,vr=W(hr,Mt,Zt,Gt),nr=vr/H,Or=150,Hr=Or*Or,Wr=1.5,ln=Wr*Wr;if(nr>=ln||vr>=Hr){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var fn={originalEvent:X,type:"cxttapend",position:{x:fe[0],y:fe[1]}};t.touchData.start?(t.touchData.start.unactivate().emit(fn),t.touchData.start=null):ue.emit(fn)}}if(oe&&t.touchData.cxt){var fn={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(fn):ue.emit(fn),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var ar=t.findNearestElement(fe[0],fe[1],!0,!0);(!t.touchData.cxtOver||ar!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit({originalEvent:X,type:"cxtdragout",position:{x:fe[0],y:fe[1]}}),t.touchData.cxtOver=ar,ar&&ar.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 Qt=t.dragData.touchDragEles;if(Qt){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 He=t.projectIntoViewport(X.touches[0].clientX,X.touches[0].clientY);ge[0]=He[0],ge[1]=He[1]}if(X.touches[1]){var He=t.projectIntoViewport(X.touches[1].clientX,X.touches[1].clientY);ge[2]=He[0],ge[3]=He[1]}if(X.touches[2]){var He=t.projectIntoViewport(X.touches[2].clientX,X.touches[2].clientY);ge[4]=He[0],ge[5]=He[1]}oe&&oe.unactivate();var Ge;if(t.touchData.cxt){if(Ge={originalEvent:X,type:"cxttapend",position:{x:ge[0],y:ge[1]}},oe?oe.emit(Ge):fe.emit(Ge),!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 Qe=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 We=function(Hr){return Hr.selectable()&&!Hr.selected()};Qe.emit("box").stdFilter(We).select().emit("boxselect"),Qe.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 Ye=t.dragData.touchDragEles;if(oe!=null){var ht=oe._private.grabbed;x(Ye),t.redrawHint("drag",!0),t.redrawHint("eles",!0),ht&&(oe.emit("freeon"),Ye.emit("free"),t.dragData.didDrag&&(oe.emit("dragfreeon"),Ye.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],hr=Ut*Ut,Mt=t.touchData.startPosition[1]-ge[1],Zt=Mt*Mt,Gt=hr+Zt,vr=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&&vr"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)}},Fe=function(X){Te.push(Be(X))},Le=function(X){for(var oe=0;oe0)return j[0]}return null},y=Object.keys(g),b=0;b0?p:FL(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!!(Xr(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",Vr(3,0)),this.generateRoundPolygon("round-triangle",Vr(3,0)),this.generatePolygon("rectangle",Vr(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",Vr(5,0)),this.generateRoundPolygon("round-pentagon",Vr(5,0)),this.generatePolygon("hexagon",Vr(6,0)),this.generateRoundPolygon("round-hexagon",Vr(6,0)),this.generatePolygon("heptagon",Vr(7,0)),this.generateRoundPolygon("round-heptagon",Vr(7,0)),this.generatePolygon("octagon",Vr(8,0)),this.generateRoundPolygon("round-octagon",Vr(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*A)break}else if(f){if(_>=e.deqCost*p||_>=e.deqAvgCost*g)break}else if(S>=e.deqNoDrawCost*Im)break;var C=e.deq(n,w,b);if(C.length>0)for(var D=0;D0&&(e.onDeqd(n,y),!f&&e.shouldRedraw(n,y,w,b)&&i())},s=e.priority||w2;a.beforeRender(o,s(n))}}}},N$=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Dd;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}}])}(),OR=25,Gc=50,pd=-4,Vx=3,G8=7.99,B$=8,q$=1024,P$=1024,z$=1024,I$=.2,V$=.8,$$=10,F$=.15,H$=.1,U$=.9,G$=.9,Y$=100,X$=1,Au={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},K$=cr({getKey:null,doesEleInvalidateKey:Dd,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:NL,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),yl=function(e,r){var n=this;n.renderer=e,n.onDequeues=[];var a=K$(r);Ke(n,a),n.lookup=new N$(a.getKey,a.doesEleInvalidateKey),n.setupDequeueing()},dr=yl.prototype;dr.reasons=Au;dr.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]};dr.getRetiredTextureQueue=function(t){var e=this,r=e.eleImgCaches.retired=e.eleImgCaches.retired||{},n=r[t]=r[t]||[];return n};dr.getElementQueue=function(){var t=this,e=t.eleCacheQueue=t.eleCacheQueue||new of(function(r,n){return n.reqs-r.reqs});return e};dr.getElementKeyToQueue=function(){var t=this,e=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return e};dr.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(_2(s*r))),n=G8||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<=OR?y=OR:d<=Gc?y=Gc:y=Math.ceil(d/Gc)*Gc,d>z$||h>P$)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;L--)O=i.getElement(t,e,r,L,Au.downscale);N()}else return i.queueElement(t,D.level-1),D;else{var B;if(!S&&!A&&!C)for(var k=n-1;k>=pd;k--){var q=l.get(t,k);if(q){B=q;break}}if(_(B))return i.queueElement(t,n),B;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+B$),w.eleCaches.push(p),l.set(t,n,p),i.checkTextureFullness(w),p};dr.invalidateElements=function(t){for(var e=0;e=I$*t.width&&this.retireTexture(t)};dr.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>V$&&t.fullnessChecks>=$$?Mi(r,t):t.fullnessChecks++};dr.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,x2(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}};dr.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}};dr.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};dr.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=b2,r.updateItem(i),r.pop(),n[a]=null):i.eles.unmerge(t))};dr.onDequeue=function(t){this.onDequeues.push(t)};dr.offDequeue=function(t){Mi(this.onDequeues,t)};dr.setupDequeueing=U8.setupDequeueing({deqRedrawThreshold:Y$,deqCost:F$,deqAvgCost:H$,deqNoDrawCost:U$,deqFastCost:G$,deq:function(e,r,n){return e.dequeue(r,n)},onDeqd:function(e,r){for(var n=0;n=Z$||r>Id)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 N=function(V){if(n.validateLayersElesOrdering(V,t),n.levelIsComplete(V,t))return p=l[V],!0},L=function(V){if(!p)for(var P=r+V;Cl<=P&&P<=Id&&!N(P);P+=V);};L(1),L(-1);for(var B=d.length-1;B>=0;B--){var k=d[B];k.invalid&&Mi(d,k)}};if(!g)y();else return d;var b=function(){if(!h){h=Zr();for(var N=0;NkR||k>kR)return null;var q=B*k;if(q>aF)return null;var V=n.makeLayer(h,r);if(L!=null){var P=d.indexOf(L)+1;d.splice(P,0,V)}else(N.insert===void 0||N.insert)&&d.unshift(V);return V};if(n.skipping&&!s)return null;for(var x=null,_=t.length/j$,S=!s,A=0;A=_||!$L(x.bb,C.boundingBox()))&&(x=w({insert:!0,after:x}),!x))return null;p||S?n.queueLayer(x,C):n.drawEleInLayer(x,C,r,e),x.eles.push(C),M[r]=x}return p||(S?null:d)};Mr.getEleLevelForLayerLevel=function(t,e){return t};Mr.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,iF),i.setImgSmoothing(o,!0))};Mr.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};Mr.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n0){e=!0;break}}return e};Mr.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)}))};Mr.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,_=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")},A=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")},C=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]:_;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 N=e.pstyle("ghost-offset-x").pfValue,L=e.pstyle("ghost-offset-y").pfValue,B=e.pstyle("ghost-opacity").value,k=x*B;t.translate(N,L),S(k),M(k),t.translate(-N,-L)}else A();D(),S(),M(),C(),R(),r&&t.translate(l.x1,l.y1)}};var K8=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=K8("overlay");Ka.drawEdgeUnderlay=K8("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=In(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=In(o,"labelX",r),f=In(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=In(o,"labelWidth",r),b=In(o,"labelHeight",r),w=e.pstyle(p+"text-margin-x").pfValue,x=e.pstyle(p+"text-margin-y").pfValue,_=e.isEdge(),S=e.pstyle("text-halign").value,A=e.pstyle("text-valign").value;_&&(S="center",A="center"),l+=w,f+=x;var C;switch(n?C=this.getTextAngle(e,r):C=0,C!==0&&(d=l,h=f,t.translate(d,h),t.rotate(C),l=0,f=0),A){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,N=e.pstyle("text-background-shape").strValue,L=N.indexOf("round")===0,B=2;if(D>0||R>0&&M>0){var k=l-O;switch(S){case"left":k-=y;break;case"center":k-=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+")",L?$m(t,k,q,V,P,B):t.fillRect(k,q,V,P),t.fillStyle=$}if(R>0&&M>0){var G=t.strokeStyle,z=t.lineWidth,H=e.pstyle("text-border-color").value,j=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+H[0]+","+H[1]+","+H[2]+","+M*s+")",t.lineWidth=R,t.setLineDash)switch(j){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(L?$m(t,k,q,V,P,B,"stroke"):t.strokeRect(k,q,V,P),j==="double"){var J=R/2;L?$m(t,k+J,q+J,V-J*2,P-J*2,B,"stroke"):t.strokeRect(k+J,q+J,V-J*2,P-J*2)}t.setLineDash&&t.setLineDash([]),t.lineWidth=z,t.strokeStyle=G}}var U=2*e.pstyle("text-outline-width").pfValue;if(U>0&&(t.lineWidth=U),e.pstyle("text-wrap").value==="wrap"){var K=In(o,"labelWrapCachedLines",r),Z=In(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))),A){case"top":f-=(K.length-1)*Z;break;case"center":case"bottom":f-=(K.length-1)*Z;break}for(var ee=0;ee0&&t.strokeText(K[ee],l,f),t.fillText(K[ee],l,f),f+=Z}else U>0&&t.strokeText(g,l,f),t.fillText(g,l,f);C!==0&&(t.rotate(-C),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.pstyle("background-image"),S=_.value,A=new Array(S.length),C=new Array(S.length),D=0,M=0;M0&&arguments[0]!==void 0?arguments[0]:k;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||[],He=LL(Ae==="polygon"?Ae+","+ge.join(","):Ae,""+fe,""+ue,""+re),Ge=Se[He],Oe,Qe=!1;return Ge!=null?(Oe=Ge,Qe=!0,d.pathCache=Oe):(Oe=new Path2D,Se[He]=d.pathCache=Oe),{path:Oe,cacheHit:Qe}},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=(L>0?L:-L)*ue,Ae=L>0?0:255;L!==0&&(o.colorFillStyle(t,Ae,Ae,Ae,fe),p?t.fill(y):t.fill())},Ce=function(){if(B>0){if(t.lineWidth=B,t.lineCap=$,t.lineJoin=P,t.setLineDash)switch(V){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(G),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-B,-l/2-B,s+2*B,l+2*B),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=B/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(j>0){if(t.lineWidth=j,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=B;F==="inside"&&(Ae=0),F==="outside"&&(Ae*=2);var ge=(s+Ae+(j+Z))/s,Se=(l+Ae+(j+Z))/l,He=s*ge,Ge=l*Se,Oe=o.nodeShapes[fe].points,Qe;if(p){var We=te(He,Ge,fe,Oe);Qe=We.path}if(fe==="ellipse")o.drawEllipsePath(Qe||t,ue.x,ue.y,He,Ge);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(fe)){var Ye=0,ht=0,bt=0;fe==="round-diamond"?Ye=(Ae+Z+j)*1.4:fe==="round-heptagon"?(Ye=(Ae+Z+j)*1.075,bt=-(Ae/2+Z+j)/35):fe==="round-hexagon"?Ye=(Ae+Z+j)*1.12:fe==="round-pentagon"?(Ye=(Ae+Z+j)*1.13,bt=-(Ae/2+Z+j)/15):fe==="round-tag"?(Ye=(Ae+Z+j)*1.12,ht=(Ae/2+j+Z)*.07):fe==="round-triangle"&&(Ye=(Ae+Z+j)*(Math.PI/2),bt=-(Ae+Z/2+j)/Math.PI),Ye!==0&&(ge=(s+Ye)/s,He=s*ge,["round-hexagon","round-tag"].includes(fe)||(Se=(l+Ye)/l,Ge=l*Se)),re=re==="auto"?UL(He,Ge):re;for(var Ut=He/2,hr=Ge/2,Mt=re+(Ae+j+Z)/2,Zt=new Array(Oe.length/2),Gt=new Array(Oe.length/2),vr=0;vr0){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=j8("overlay");Wu.drawNodeUnderlay=j8("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 _=1.5*Math.PI+2*Math.PI*h,S=2*Math.PI*x,A=_+S;y===0||h>=1||h+x>1||(t.beginPath(),t.moveTo(o,s),t.arc(o,s,d,_,A),t.closePath(),this.colorFillStyle(t,b[0],b[1],b[2],w),t.fill(),h+=x)}};var Fr={},pF=100;Fr.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};Fr.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 _=r.style(),S=r.zoom(),A=o!==void 0?o:S,C=r.pan(),D={x:C.x,y:C.y},M={zoom:S,pan:{x:C.x,y:C.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),A*=l,D.x*=l,D.y*=l;var N=e.getCachedZSortedEles();function L(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 B(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:C.x*p,y:C.y*p},ce=S*p,de=e.canvasWidth*p,ye=e.canvasHeight*p):(te=D,ce=A,de=e.canvasWidth,ye=e.canvasHeight),ee.setTransform(1,0,0,1,0,0),W==="motionBlur"?L(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 k=e.data.bufferContexts[e.TEXTURE_BUFFER];k.setTransform(1,0,0,1,0,0),k.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:k,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?L(q,0,0,M.width,M.height):q.clearRect(0,0,M.width,M.height);var P=_.core("outside-texture-bg-color").value,$=_.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();B(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(),G=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),z=e.hideEdgesOnViewport&&G,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 j=g&&!H[e.NODE]&&p!==1,q=n||(j?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:f.contexts[e.NODE]),J=g&&!j?"motionBlur":void 0;B(q,J),z?e.drawCachedNodes(q,N.nondrag,l,F):e.drawLayeredElements(q,N.nondrag,l,F),e.debug&&e.drawDebugPoints(q,N.nondrag),!a&&!g&&(d[e.NODE]=!1)}if(!i&&(d[e.DRAG]||a||H[e.DRAG])){var j=g&&!H[e.DRAG]&&p!==1,q=n||(j?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:f.contexts[e.DRAG]);B(q,g&&!j?"motionBlur":void 0),z?e.drawCachedNodes(q,N.drag,l,F):e.drawCachedElements(q,N.drag,l,F),e.debug&&e.drawDebugPoints(q,N.drag),!a&&!g&&(d[e.DRAG]=!1)}if(this.drawSelectionRectangle(t,B),g&&p!==1){var U=f.contexts[e.NODE],K=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],Z=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):L(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(Z,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()},pF)),n||r.emit("render")};var ol;Fr.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 _=60;d.strokeRect(0,ol+10,250,20),d.fillRect(0,ol+10,250*Math.min(b/_,1),20)}s||(l[r.SELECT_BOX]=!1)}};function qR(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 mF(t,e,r){var n=qR(t,t.VERTEX_SHADER,e),a=qR(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 yF(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 z2(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 bF(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 wF(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function xF(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 Z8(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 Q8(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r)}}function _F(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 EF(t,e,r,n){var a=Z8(t,e),i=br(a,2),o=i[0],s=i[1],l=Q8(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=Z8(t,r),i=br(a,3),o=i[0],s=i[1],l=i[2],f=Q8(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,A){if(a&&A){var C=A.context,D=S.x,M=S.row,R=D,O=l*M;C.save(),C.translate(R,O),C.scale(d,d),a(C,n),C.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,A=i.canvas;S.clear(),y({x:0,row:0},S);var C=o-i.freePointer.x,D=h-C,M=l;{var R=i.freePointer.x,O=i.freePointer.row*l,N=C;A.context.drawImage(S,0,0,N,M,R,O,N,M),p[0]={x:R,y:O,w:N,h:g}}{var L=C,B=(i.freePointer.row+1)*l,k=D;A&&A.context.drawImage(S,L,0,k,M,0,B,k,M),p[1]={x:0,y:B,w:k,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=Fn(r),p;try{for(g.s();!(p=g.n()).done;){var y=p.value;if(s(y)){var b=Fn(this.renderTypes.values()),w;try{for(b.s();!(w=b.n()).done;){var x=w.value,_=x.type;if(f(_)){var S=x.getKey(y),A=this.collections.get(x.collection);if(i)A.markKeyForGC(S),h=!0;else{var C=x.getID?x.getID(y):y.id(),D=this._key(_,C),M=this.typeAndIdToKey.get(D);M!==void 0&&M!==S&&(this.typeAndIdToKey.delete(D),A.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=Fn(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=br(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;W8(r);var l=a.getRotation?a.getRotation(i):0;if(l!==0){var f=a.getRotationPoint(i),d=f.x,h=f.y;Vd(r,r,[d,h]),J8(r,r,l);var g=a.getRotationOffset(i);o=g.x+n.xOffset,s=g.y}else o=n.x1,s=n.y1;Vd(r,r,[o,s]),I2(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=Fn(this.collections),a;try{for(n.s();!(a=n.n()).done;){var i=br(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}}])}(),Yc=0,IR=1,VR=2,Fm=3,$R=4,kF=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=yF,this.atlasManager=new DF(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(Yc,`) { 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($R,`) { gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); vColor = aColor; } else if(aVertType == `).concat(IR,`) { 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(VR,`) { 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(Yc,`) { `).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=mF(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||md()}},{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]=Yc;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]=$R;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,_=this.transformBuffer.getMatrixView(x);W8(_),Vd(_,_,[o,s]),I2(_,_,[w,w]),J8(_,_,l),this.vertTypeBuffer.getView(x)[0]=Fm;var S=this.indexBuffer.getView(x);mu(n,S);var A=this.colorBuffer.getView(x);ul(d,p,A),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]=IR;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=FR(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()}}}])}(),e6={};e6.initWebgl=function(t,e){var r=this,n=r.data.contexts[r.WEBGL];t.bgColor=NF(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=TF(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 kF(r,n,t);var o=new LF(r);r.drawing.addAtlasCollection("node",zR({texRows:t.webglTexRowsNodes})),r.drawing.addAtlasCollection("label",zR({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=af(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()}),BF(r)};function NF(t){var e=t.cy.container(),r=e&&e.style&&e.style.backgroundColor||"white";return CL(r)}function BF(t){{var e=t.render;t.render=function(i){i=i||{};var o=t.cy;t.webgl&&(o.zoom()>G8?(qF(t),e.call(t,i)):(PF(t),r6(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 HF(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 qF(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function PF(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 zF(t){var e=t.canvasWidth,r=t.canvasHeight,n=z2(t),a=n.pan,i=n.zoom,o=md();Vd(o,o,[a.x,a.y]),I2(o,o,[i,i]);var s=md();AF(s,e,r);var l=md();return CF(l,s,o),l}function t6(t,e){var r=t.canvasWidth,n=t.canvasHeight,a=z2(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 IF(t,e){t.drawSelectionRectangle(e,function(r){return t6(t,r)})}function VF(t){var e=t.data.contexts[t.NODE];e.save(),t6(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 $F(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&&A.add(M)}return A}function HF(t,e,r){var n=FF(t,e,r),a=t.getCachedZSortedEles(),i,o,s=Fn(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 UF(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"),UF(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 r6(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]&&IF(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=zF(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 GF(t,e){for(var r=atob(t),n=new ArrayBuffer(r.length),a=new Uint8Array(n),i=0;i"u"?"undefined":fr(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};[X8,pa,Ka,P2,Oo,Wu,Fr,e6,qi,cf,i6].forEach(function(t){Ke(nt,t)});var KF=[{name:"null",impl:L8},{name:"base",impl:H8},{name:"canvas",impl:YF}],jF=[{type:"layout",extensions:R$},{type:"renderer",extensions:KF}],u6={},s6={};function l6(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(Rr.prototype[e])return a(e);Rr.prototype[e]=r}else if(t==="layout"){for(var i=function(R){this.options=R,r.call(this,R),lt(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,WR;function nH(){if(WR)return Zm;WR=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,JR;function kh(){if(JR)return Qm;JR=1;var t=JF(),e=eH(),r=tH(),n=rH(),a=nH();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,ZM;function OH(){if(ZM)return Xy;ZM=1;var t=Do(),e=U2(),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]",_="[object Float32Array]",S="[object Float64Array]",A="[object Int8Array]",C="[object Int16Array]",D="[object Int32Array]",M="[object Uint8Array]",R="[object Uint8ClampedArray]",O="[object Uint16Array]",N="[object Uint32Array]",L={};L[_]=L[S]=L[A]=L[C]=L[D]=L[M]=L[R]=L[O]=L[N]=!0,L[n]=L[a]=L[w]=L[i]=L[x]=L[o]=L[s]=L[l]=L[f]=L[d]=L[h]=L[g]=L[p]=L[y]=L[b]=!1;function B(k){return r(k)&&e(k.length)&&!!L[t(k)]}return Xy=B,Xy}var Ky,QM;function Ih(){if(QM)return Ky;QM=1;function t(e){return function(r){return e(r)}}return Ky=t,Ky}var wl={exports:{}};wl.exports;var WM;function G2(){return WM||(WM=1,function(t,e){var r=c6(),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,JM;function gf(){if(JM)return jy;JM=1;var t=OH(),e=Ih(),r=G2(),n=r&&r.isTypedArray,a=n?e(n):t;return jy=a,jy}var Zy,e5;function v6(){if(e5)return Zy;e5=1;var t=AH(),e=vf(),r=rr(),n=ts(),a=zh(),i=gf(),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 _ in f)(d||s.call(f,_))&&!(b&&(_=="length"||p&&(_=="offset"||_=="parent")||y&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||a(_,x)))&&w.push(_);return w}return Zy=l,Zy}var Qy,t5;function Vh(){if(t5)return Qy;t5=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,r5;function g6(){if(r5)return Wy;r5=1;function t(e,r){return function(n){return e(r(n))}}return Wy=t,Wy}var Jy,n5;function DH(){if(n5)return Jy;n5=1;var t=g6(),e=t(Object.keys,Object);return Jy=e,Jy}var e0,a5;function Y2(){if(a5)return e0;a5=1;var t=Vh(),e=DH(),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,i5;function ja(){if(i5)return t0;i5=1;var t=df(),e=U2();function r(n){return n!=null&&e(n.length)&&!t(n)}return t0=r,t0}var r0,o5;function Pi(){if(o5)return r0;o5=1;var t=v6(),e=Y2(),r=ja();function n(a){return r(a)?t(a):e(a)}return r0=n,r0}var n0,u5;function kH(){if(u5)return n0;u5=1;var t=hf(),e=Pi();function r(n,a){return n&&t(a,e(a),n)}return n0=r,n0}var a0,s5;function LH(){if(s5)return a0;s5=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,l5;function NH(){if(l5)return i0;l5=1;var t=Dn(),e=Vh(),r=LH(),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,f5;function Lo(){if(f5)return o0;f5=1;var t=v6(),e=NH(),r=ja();function n(a){return r(a)?t(a,!0):e(a)}return o0=n,o0}var u0,c5;function BH(){if(c5)return u0;c5=1;var t=hf(),e=Lo();function r(n,a){return n&&t(a,e(a),n)}return u0=r,u0}var xl={exports:{}};xl.exports;var d5;function p6(){return d5||(d5=1,function(t,e){var r=Yn(),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,h5;function m6(){if(h5)return s0;h5=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,_=!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,iD;function kU(){if(iD)return e1;iD=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,oD;function K6(){if(oD)return t1;oD=1;var t=kU(),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,lD;function j6(){if(lD)return a1;lD=1;var t=LU(),e=NU(),r=e(t);return a1=r,a1}var i1,fD;function Yh(){if(fD)return i1;fD=1;var t=No(),e=K6(),r=j6();function n(a,i){return r(e(a,i,t),a+"")}return i1=n,i1}var o1,cD;function Z6(){if(cD)return o1;cD=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,pD;function IU(){if(pD)return c1;pD=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,CD;function GU(){return CD||(CD=1,x1="2.1.8"),x1}var _1,AD;function YU(){return AD||(AD=1,_1={Graph:r_(),version:GU()}),_1}var E1,RD;function XU(){if(RD)return E1;RD=1;var t=kn(),e=r_();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,MD;function KU(){if(MD)return S1;MD=1;var t=kn();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,OD;function J6(){if(OD)return T1;OD=1;var t=kn();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,kD;function jU(){if(kD)return A1;kD=1;var t=eN(),e=kn();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,LD;function tN(){if(LD)return R1;LD=1;var t=kn();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,ND;function ZU(){if(ND)return M1;ND=1;var t=kn(),e=tN();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,BD;function QU(){if(BD)return O1;BD=1;var t=kn();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,FD;function rG(){return FD||(FD=1,P1={components:KU(),dijkstra:eN(),dijkstraAll:jU(),findCycles:ZU(),floydWarshall:QU(),isAcyclic:WU(),postorder:JU(),preorder:eG(),prim:tG(),tarjan:tN(),topsort:rN()}),P1}var z1,HD;function nG(){if(HD)return z1;HD=1;var t=YU();return z1={Graph:t.Graph,json:XU(),alg:rG(),version:t.version},z1}var I1,UD;function Gn(){if(UD)return I1;UD=1;var t;if(typeof V2=="function")try{t=nG()}catch{}return t||(t=window.graphlib),I1=t,I1}var V1,GD;function aG(){if(GD)return V1;GD=1;var t=R6(),e=1,r=4;function n(a){return t(a,e|r)}return V1=n,V1}var $1,YD;function Xh(){if(YD)return $1;YD=1;var t=Ju(),e=ja(),r=zh(),n=Dn();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,XD;function iG(){if(XD)return F1;XD=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,jD;function uG(){if(jD)return U1;jD=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,ZD;function sG(){if(ZD)return G1;ZD=1;var t=uG(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return G1=r,G1}var Y1,QD;function lG(){if(QD)return Y1;QD=1;var t=sG(),e=Dn(),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,WD;function aN(){if(WD)return X1;WD=1;var t=lG(),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,JD;function fG(){if(JD)return K1;JD=1;var t=aN();function e(r){var n=t(r),a=n%1;return n===n?a?n-a:n:0}return K1=e,K1}var j1,e3;function cG(){if(e3)return j1;e3=1;var t=Z6(),e=Za(),r=fG(),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,t3;function dG(){if(t3)return Z1;t3=1;var t=oG(),e=cG(),r=t(e);return Z1=r,Z1}var Q1,r3;function iN(){if(r3)return Q1;r3=1;var t=t_();function e(r){var n=r==null?0:r.length;return n?t(r,1):[]}return Q1=e,Q1}var W1,n3;function hG(){if(n3)return W1;n3=1;var t=Q2(),e=M6(),r=Lo();function n(a,i){return a==null?a:t(a,e(i),r)}return W1=n,W1}var J1,a3;function vG(){if(a3)return J1;a3=1;function t(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}return J1=t,J1}var ew,i3;function gG(){if(i3)return ew;i3=1;var t=qh(),e=W2(),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,o3;function n_(){if(o3)return tw;o3=1;var t=ns();function e(r,n,a){for(var i=-1,o=r.length;++ir}return rw=t,rw}var nw,s3;function mG(){if(s3)return nw;s3=1;var t=n_(),e=pG(),r=No();function n(a){return a&&a.length?t(a,r,e):void 0}return nw=n,nw}var aw,l3;function oN(){if(l3)return aw;l3=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,f3;function yG(){if(f3)return iw;f3=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,c3;function uN(){if(c3)return ow;c3=1;function t(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}return ow=t,ow}var uw,h3;function bG(){if(h3)return uw;h3=1;var t=hf(),e=Lo();function r(n){return t(n,e(n))}return uw=r,uw}var sw,v3;function wG(){if(v3)return sw;v3=1;var t=oN(),e=p6(),r=T6(),n=m6(),a=A6(),i=vf(),o=rr(),s=Q6(),l=ts(),f=df(),d=Dn(),h=yG(),g=gf(),p=uN(),y=bG();function b(w,x,_,S,A,C,D){var M=p(w,_),R=p(x,_),O=D.get(R);if(O){t(w,_,O);return}var N=C?C(M,R,_+"",w,x,D):void 0,L=N===void 0;if(L){var B=o(R),k=!B&&l(R),q=!B&&!k&&g(R);N=R,B||k||q?o(M)?N=M:s(M)?N=n(M):k?(L=!1,N=e(R,!0)):q?(L=!1,N=r(R,!0)):N=[]:h(R)||i(R)?(N=M,i(M)?N=y(M):(!d(M)||f(M))&&(N=a(R))):L=!1}L&&(D.set(R,N),A(N,R,S,C,D),D.delete(R)),t(w,_,N)}return sw=b,sw}var lw,g3;function xG(){if(g3)return lw;g3=1;var t=Bh(),e=oN(),r=Q2(),n=wG(),a=Dn(),i=Lo(),o=uN();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,p3;function _G(){if(p3)return fw;p3=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,L3;function zG(){if(L3)return Aw;L3=1;var t=Hh(),e=Gh(),r=Za(),n=G6(),a=BG(),i=Ih(),o=PG(),s=No(),l=rr();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 _=t(h,function(S){return S(b)});return{criteria:_,index:++p,value:b}});return a(y,function(b,w){return o(b,w,g)})}return Aw=f,Aw}var Rw,N3;function IG(){if(N3)return Rw;N3=1;var t=t_(),e=zG(),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,B3;function VG(){if(B3)return Mw;B3=1;var t=z6(),e=0;function r(n){var a=++e;return t(n)+a}return Mw=r,Mw}var Ow,q3;function $G(){if(q3)return Ow;q3=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,_=f.node(x);_.in-=w,l(d,h,_)}),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,_=d(w),S=x+_;h.setEdge(w.v,w.w,S),p=Math.max(p,h.node(w.v).out+=_),g=Math.max(g,h.node(w.w).in+=_)});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,$3;function GG(){if($3)return Bw;$3=1;var t=Lt(),e=UG();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,F3;function jr(){if(F3)return qw;F3=1;var t=Lt(),e=Gn().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,_,S){var A;do A=t.uniqueId(S);while(w.hasNode(A));return _.dummy=x,w.setNode(A,_),A}function n(w){var x=new e().setGraph(w.graph());return t.forEach(w.nodes(),function(_){x.setNode(_,w.node(_))}),t.forEach(w.edges(),function(_){var S=x.edge(_.v,_.w)||{weight:0,minlen:1},A=w.edge(_);x.setEdge(_.v,_.w,{weight:S.weight+A.weight,minlen:Math.max(S.minlen,A.minlen)})}),x}function a(w){var x=new e({multigraph:w.isMultigraph()}).setGraph(w.graph());return t.forEach(w.nodes(),function(_){w.children(_).length||x.setNode(_,w.node(_))}),t.forEach(w.edges(),function(_){x.setEdge(_,w.edge(_))}),x}function i(w){var x=t.map(w.nodes(),function(_){var S={};return t.forEach(w.outEdges(_),function(A){S[A.w]=(S[A.w]||0)+w.edge(A).weight}),S});return t.zipObject(w.nodes(),x)}function o(w){var x=t.map(w.nodes(),function(_){var S={};return t.forEach(w.inEdges(_),function(A){S[A.v]=(S[A.v]||0)+w.edge(A).weight}),S});return t.zipObject(w.nodes(),x)}function s(w,x){var _=w.x,S=w.y,A=x.x-_,C=x.y-S,D=w.width/2,M=w.height/2;if(!A&&!C)throw new Error("Not possible to find intersection inside of the rectangle");var R,O;return Math.abs(C)*D>Math.abs(A)*M?(C<0&&(M=-M),R=M*A/C,O=M):(A<0&&(D=-D),R=D,O=D*C/A),{x:_+R,y:S+O}}function l(w){var x=t.map(t.range(g(w)+1),function(){return[]});return t.forEach(w.nodes(),function(_){var S=w.node(_),A=S.rank;t.isUndefined(A)||(x[A][S.order]=_)}),x}function f(w){var x=t.min(t.map(w.nodes(),function(_){return w.node(_).rank}));t.forEach(w.nodes(),function(_){var S=w.node(_);t.has(S,"rank")&&(S.rank-=x)})}function d(w){var x=t.min(t.map(w.nodes(),function(C){return w.node(C).rank})),_=[];t.forEach(w.nodes(),function(C){var D=w.node(C).rank-x;_[D]||(_[D]=[]),_[D].push(C)});var S=0,A=w.graph().nodeRankFactor;t.forEach(_,function(C,D){t.isUndefined(C)&&D%A!==0?--S:S&&t.forEach(C,function(M){w.node(M).rank+=S})})}function h(w,x,_,S){var A={width:0,height:0};return arguments.length>=4&&(A.rank=_,A.order=S),r(w,"border",A,x)}function g(w){return t.max(t.map(w.nodes(),function(x){var _=w.node(x).rank;if(!t.isUndefined(_))return _}))}function p(w,x){var _={lhs:[],rhs:[]};return t.forEach(w,function(S){x(S)?_.lhs.push(S):_.rhs.push(S)}),_}function y(w,x){var _=t.now();try{return x()}finally{console.log(w+" time: "+(t.now()-_)+"ms")}}function b(w,x){return x()}return qw}var Pw,H3;function YG(){if(H3)return Pw;H3=1;var t=Lt(),e=jr();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&&(N=O,L=!0);var B=t.filter(A.edges(),function(k){return L===_(S,S.node(k.v),N)&&L!==_(S,S.node(k.w),N)});return t.minBy(B,function(k){return r(A,k)})}function b(S,A,C,D){var M=C.v,R=C.w;S.removeEdge(M,R),S.setEdge(D.v,D.w,{}),h(S),l(S,A),w(S,A)}function w(S,A){var C=t.find(S.nodes(),function(M){return!A.node(M).parent}),D=a(S,C);D=D.slice(1),t.forEach(D,function(M){var R=S.node(M).parent,O=A.edge(M,R),N=!1;O||(O=A.edge(R,M),N=!0),A.node(M).rank=A.node(R).rank+(N?O.minlen:-O.minlen)})}function x(S,A,C){return S.hasEdge(A,C)}function _(S,A,C){return C.low<=A.lim&&A.lim<=C.lim}return Vw}var $w,X3;function KG(){if(X3)return $w;X3=1;var t=Fd(),e=t.longestPath,r=lN(),n=XG();$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,K3;function jG(){if(K3)return Fw;K3=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,j3;function ZG(){if(j3)return Hw;j3=1;var t=Lt(),e=jr();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(_){n(s,l,f,d,h,g,_);var S=s.node(_),A=S.borderTop?S.borderTop:_,C=S.borderBottom?S.borderBottom:_,D=S.borderTop?d:2*d,M=A!==C?1:h-g[p]+1;s.setEdge(b,A,{weight:D,minlen:M,nestingEdge:!0}),s.setEdge(C,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,Z3;function QG(){if(Z3)return Uw;Z3=1;var t=Lt(),e=jr();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,ek;function tY(){if(ek)return Kw;ek=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,tk;function rY(){if(tk)return jw;tk=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,rk;function nY(){if(rk)return Zw;rk=1;var t=Lt(),e=jr();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,nk;function aY(){if(nk)return Qw;nk=1;var t=Lt(),e=tY(),r=rY(),n=nY();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(C){return C!==p&&C!==y}));var w=e(s,h);t.forEach(w,function(C){if(s.children(C.v).length){var D=a(s,C.v,f,d);b[C.v]=D,t.has(D,"barycenter")&&o(C,D)}});var x=r(w,f);i(x,b);var _=n(x,d);if(p&&(_.vs=t.flatten([p,_.vs,y],!0),s.predecessors(p).length)){var S=s.node(s.predecessors(p)[0]),A=s.node(s.predecessors(y)[0]);t.has(_,"barycenter")||(_.barycenter=0,_.weight=0),_.barycenter=(_.barycenter*_.weight+S.order+A.order)/(_.weight+2),_.weight+=2}return _}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,ak;function iY(){if(ak)return Ww;ak=1;var t=Lt(),e=Gn().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,ik;function oY(){if(ik)return Jw;ik=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,ok;function uY(){if(ok)return ex;ok=1;var t=Lt(),e=JG(),r=eY(),n=aY(),a=iY(),i=oY(),o=Gn().Graph,s=jr();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,_,S=0,A=0;A<4;++S,++A){d(S%2?y:b,S%4>=2),w=s.buildLayerMatrix(g);var C=r(g,w);CN)&&o(S,k,L)})})}function C(D,M){var R=-1,O,N=0;return t.forEach(M,function(L,B){if(x.node(L).dummy==="border"){var k=x.predecessors(L);k.length&&(O=x.node(k[0]).order,A(M,N,B,R,O),N=B,R=O)}A(M,N,M.length,O,D.length)}),M}return t.reduce(_,C),S}function i(x,_){if(x.node(_).dummy)return t.find(x.predecessors(_),function(S){return x.node(S).dummy})}function o(x,_,S){if(_>S){var A=_;_=S,S=A}var C=x[_];C||(x[_]=C={}),C[S]=!0}function s(x,_,S){if(_>S){var A=_;_=S,S=A}return t.has(x[_],S)}function l(x,_,S,A){var C={},D={},M={};return t.forEach(_,function(R){t.forEach(R,function(O,N){C[O]=O,D[O]=O,M[O]=N})}),t.forEach(_,function(R){var O=-1;t.forEach(R,function(N){var L=A(N);if(L.length){L=t.sortBy(L,function(P){return M[P]});for(var B=(L.length-1)/2,k=Math.floor(B),q=Math.ceil(B);k<=q;++k){var V=L[k];D[N]===N&&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(_){var S=w[_];typeof S=="number"&&(w[_]=l[S])};x("source"),x("target")}),{groups:b,powerEdges:y}}return Ia.getGroups=s,Ia}var so={},gk;function a_(){if(gk)return so;gk=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),_=p[w],S=p[x];_!==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 N=0,L=O.out;N"u"?(b(B),O.lowlink=Math.min(O.lowlink,B.lowlink)):B.onStack&&(O.lowlink=Math.min(O.lowlink,B.index))}if(O.lowlink===O.index){for(var k=[];p.length&&(B=p.pop(),B.onStack=!1,k.push(B),B!==O););y.push(k.map(function(q){return q.id}))}}for(var w=0;w"u"&&b(R)}return y}return so.stronglyConnectedComponents=s,so}var wu={},pk;function i_(){if(pk)return wu;pk=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&&_>S||!isFinite(S)){for(s=0;s1&&(A=1);var C=S*S,D=2*A*(_-S)/(C*_),M=_*_*_,R=2*-A/(C*M);for(isFinite(D)||console.log(D),s=0;s0?q-($+1)*N:q-($-1)*N;-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 Lr={},ta={},mk;function o_(){if(mk)return ta;mk=1,Object.defineProperty(ta,"__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}();ta.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}();ta.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}();ta.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}();ta.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 _=h.right===d;o.is_red(x.get_child(y))?h.set_child(_,o.double_rotate(d,y)):o.is_red(x.get_child(!y))&&h.set_child(_,o.single_rotate(d,y));var S=h.get_child(_);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 bk;function mf(){if(bk)return Lr;bk=1;var t=Lr&&Lr.__extends||function(){var R=function(O,N){return R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,B){L.__proto__=B}||function(L,B){for(var k in B)B.hasOwnProperty(k)&&(L[k]=B[k])},R(O,N)};return function(O,N){R(O,N);function L(){this.constructor=O}O.prototype=N===null?Object.create(N):(L.prototype=N.prototype,new L)}}();Object.defineProperty(Lr,"__esModule",{value:!0});var e=o_(),r=cN();function n(R){return R.bounds=typeof R.leaves<"u"?R.leaves.reduce(function(O,N){return N.bounds.union(O)},a.empty()):a.empty(),typeof R.groups<"u"&&(R.bounds=R.groups.reduce(function(O,N){return n(N).union(O)},R.bounds)),R.bounds=R.bounds.inflate(R.padding),R.bounds}Lr.computeGroupBounds=n;var a=function(){function R(O,N,L,B){this.x=O,this.X=N,this.y=L,this.Y=B}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 N=this.cx(),L=O.cx();return N<=L&&O.x0?L[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,N,L,B,k,q,V,P){var $=L-O,F=V-k,G=B-N,z=P-q,H=z*$-F*G;if(H==0)return null;var j=O-k,J=N-q,U=F*J-z*j,K=U/H,Z=$*J-G*j,re=Z/H;return K>=0&&K<=1&&re>=0&&re<=1?{x:O+K*$,y:N+K*G}:null},R.prototype.inflate=function(O){return new R(this.x-O,this.X+O,this.y-O,this.Y+O)},R}();Lr.Rectangle=a;function i(R,O,N){var L=R.rayIntersection(O.cx(),O.cy())||{x:R.cx(),y:R.cy()},B=O.rayIntersection(R.cx(),R.cy())||{x:O.cx(),y:O.cy()},k=B.x-L.x,q=B.y-L.y,V=Math.sqrt(k*k+q*q),P=V-N;return{sourceIntersection:L,targetIntersection:B,arrowStart:{x:L.x+P*k/V,y:L.y+P*q/V}}}Lr.makeEdgeBetween=i;function o(R,O,N){var L=O.rayIntersection(R.x,R.y);L||(L={x:O.cx(),y:O.cy()});var B=L.x-R.x,k=L.y-R.y,q=Math.sqrt(B*B+k*k);return{x:L.x-N*B/q,y:L.y-N*k/q}}Lr.makeEdgeTo=o;var s=function(){function R(O,N,L){this.v=O,this.r=N,this.pos=L,this.prev=d(),this.next=d()}return R}(),l=function(){function R(O,N,L){this.isOpen=O,this.v=N,this.pos=L}return R}();function f(R,O){return R.pos>O.pos?1:R.pos=k);var V=new Array(q);for(B=0;B0&&(R[L].insert(k),k[B].insert(R))};N("next","prev"),N("prev","next")}function x(R,O){return y(R,O,h,1e-6)}Lr.generateXConstraints=x;function _(R,O){return y(R,O,g,1e-6)}Lr.generateYConstraints=_;function S(R){return p(R,h,1e-6)}Lr.generateXGroupConstraints=S;function A(R){return p(R,g,1e-6)}Lr.generateYGroupConstraints=A;function C(R){var O=R.map(function(B){return new e.Variable(B.cx())}),N=x(R,O),L=new e.Solver(O,N);L.solve(),O.forEach(function(B,k){return R[k].setXCentre(B.position())}),O=R.map(function(B){return new e.Variable(B.cy())}),N=_(R,O),L=new e.Solver(O,N),L.solve(),O.forEach(function(B,k){return R[k].setYCentre(B.position())})}Lr.removeOverlaps=C;var D=function(R){t(O,R);function O(N,L){var B=R.call(this,0,L)||this;return B.index=N,B}return O}(e.Variable);Lr.IndexedVariable=D;var M=function(){function R(O,N,L,B,k){var q=this;if(L===void 0&&(L=null),B===void 0&&(B=null),k===void 0&&(k=!1),this.nodes=O,this.groups=N,this.rootGroup=L,this.avoidOverlaps=k,this.variables=O.map(function(P,$){return P.variable=new D($,1)}),B&&this.createConstraints(B),k&&L&&typeof L.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(L);var V=O.length;N.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 N=this;if(this.avoidOverlaps){var L="x",B="width";O.axis==="x"&&(L="y",B="height");var k=O.offsets.map(function(V){return N.nodes[V.node]}).sort(function(V,P){return V[L]-P[L]}),q=null;k.forEach(function(V){if(q){var P=q[L]+q[B];P>V[L]&&(V[L]=P)}q=V})}},R.prototype.createAlignment=function(O){var N=this,L=this.nodes[O.offsets[0].node].variable;this.makeFeasible(O);var B=O.axis==="x"?this.xConstraints:this.yConstraints;O.offsets.slice(1).forEach(function(k){var q=N.nodes[k.node].variable;B.push(new e.Constraint(L,q,k.offset,!0))})},R.prototype.createConstraints=function(O){var N=this,L=function(B){return typeof B.type>"u"||B.type==="separation"};this.xConstraints=O.filter(function(B){return B.axis==="x"&&L(B)}).map(function(B){return N.createSeparation(B)}),this.yConstraints=O.filter(function(B){return B.axis==="y"&&L(B)}).map(function(B){return N.createSeparation(B)}),O.filter(function(B){return B.type==="alignment"}).forEach(function(B){return N.createAlignment(B)})},R.prototype.setupVariablesAndBounds=function(O,N,L,B){this.nodes.forEach(function(k,q){k.fixed?(k.variable.weight=k.fixedWeight?k.fixedWeight:1e3,L[q]=B(k)):k.variable.weight=1;var V=(k.width||0)/2,P=(k.height||0)/2,$=O[q],F=N[q];k.bounds=new a($-V,$+V,F-P,F+P)})},R.prototype.xProject=function(O,N,L){!this.rootGroup&&!(this.avoidOverlaps||this.xConstraints)||this.project(O,N,O,L,function(B){return B.px},this.xConstraints,S,function(B){return B.bounds.setXCentre(L[B.variable.index]=B.variable.position())},function(B){var k=L[B.minVar.index]=B.minVar.position(),q=L[B.maxVar.index]=B.maxVar.position(),V=B.padding/2;B.bounds.x=k-V,B.bounds.X=q+V})},R.prototype.yProject=function(O,N,L){!this.rootGroup&&!this.yConstraints||this.project(O,N,N,L,function(B){return B.py},this.yConstraints,A,function(B){return B.bounds.setYCentre(L[B.variable.index]=B.variable.position())},function(B){var k=L[B.minVar.index]=B.minVar.position(),q=L[B.maxVar.index]=B.maxVar.position(),V=B.padding/2;B.bounds.y=k-V,B.bounds.Y=q+V})},R.prototype.projectFunctions=function(){var O=this;return[function(N,L,B){return O.xProject(N,L,B)},function(N,L,B){return O.yProject(N,L,B)}]},R.prototype.project=function(O,N,L,B,k,q,V,P,$){this.setupVariablesAndBounds(O,N,B,k),this.rootGroup&&this.avoidOverlaps&&(n(this.rootGroup),q=q.concat(V(this.rootGroup))),this.solve(this.variables,q,L,B),this.nodes.forEach(P),this.rootGroup&&this.avoidOverlaps&&(this.groups.forEach($),n(this.rootGroup))},R.prototype.solve=function(O,N,L,B){var k=new e.Solver(O,N);k.setStartingPositions(L),k.setDesiredPositions(B),k.solve()},R}();return Lr.Projection=M,Lr}var Xc={},sl={},wk;function dN(){if(wk)return sl;wk=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(_,S){return _.q=S}))}}return d},i}();return Xc.Calculator=a,Xc}var kt={},_k;function hN(){if(_k)return kt;_k=1;var t=kt&&kt.__extends||function(){var k=function(q,V){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,$){P.__proto__=$}||function(P,$){for(var F in $)$.hasOwnProperty(F)&&(P[F]=$[F])},k(q,V)};return function(q,V){k(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=mf(),r=function(){function k(){}return k}();kt.Point=r;var n=function(){function k(q,V,P,$){this.x1=q,this.y1=V,this.x2=P,this.y2=$}return k}();kt.LineSegment=n;var a=function(k){t(q,k);function q(){return k!==null&&k.apply(this,arguments)||this}return q}(r);kt.PolyPoint=a;function i(k,q,V){return(q.x-k.x)*(V.y-k.y)-(V.x-k.x)*(q.y-k.y)}kt.isLeft=i;function o(k,q,V){return i(k,q,V)>0}function s(k,q,V){return i(k,q,V)<0}function l(k){var q=k.slice(0).sort(function(K,Z){return K.x!==Z.x?Z.x-K.x:Z.y-K.y}),V=k.length,P,$=0,F=q[0].x;for(P=1;P=0&&q[P].x===J;P--);for(H=P+1,P=G;++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])}j!=H&&z.push(q[j]);var U=z.length;for(P=H;--P>=G;)if(!(i(q[j],q[G],q[P])>=0&&P>G)){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(k,q,V){q.slice(0).sort(function(P,$){return Math.atan2(P.y-k.y,P.x-k.x)-Math.atan2($.y-k.y,$.x-k.x)}).forEach(V)}kt.clockwiseRadialSweep=f;function d(k,q){var V=q.slice(0);return V.push(q[0]),{rtan:h(k,V),ltan:g(k,V)}}function h(k,q){var V=q.length-1,P,$,F,G,z;if(s(k,q[1],q[0])&&!o(k,q[V-1],q[0]))return 0;for(P=0,$=V;;){if($-P===1)return o(k,q[P],q[$])?P:$;if(F=Math.floor((P+$)/2),z=s(k,q[F+1],q[F]),z&&!o(k,q[F-1],q[F]))return F;G=o(k,q[P+1],q[P]),G?z||o(k,q[P],q[F])?$=F:P=F:z&&s(k,q[P],q[F])?$=F:P=F}}function g(k,q){var V=q.length-1,P,$,F,G,z;if(o(k,q[V-1],q[0])&&!s(k,q[1],q[0]))return 0;for(P=0,$=V;;){if($-P===1)return s(k,q[P],q[$])?P:$;if(F=Math.floor((P+$)/2),z=s(k,q[F+1],q[F]),o(k,q[F-1],q[F])&&!z)return F;G=s(k,q[P+1],q[P]),G?z?s(k,q[P],q[F])?$=F:P=F:$=F:z?P=F:o(k,q[P],q[F])?$=F:P=F}}function p(k,q,V,P,$,F){var G,z;G=V(q[0],k),z=P(k[G],q);for(var H=!1;!H;){for(H=!0;G===k.length-1&&(G=0),!$(q[z],k[G],k[G+1]);)++G;for(;z===0&&(z=q.length-1),!F(k[G],q[z],q[z-1]);)--z,H=!1}return{t1:G,t2:z}}kt.tangent_PolyPolyC=p;function y(k,q){var V=b(q,k);return{t1:V.t2,t2:V.t1}}kt.LRtangent_PolyPolyC=y;function b(k,q){return p(k,q,h,g,o,s)}kt.RLtangent_PolyPolyC=b;function w(k,q){return p(k,q,g,g,s,s)}kt.LLtangent_PolyPolyC=w;function x(k,q){return p(k,q,h,h,o,o)}kt.RRtangent_PolyPolyC=x;var _=function(){function k(q,V){this.t1=q,this.t2=V}return k}();kt.BiTangent=_;var S=function(){function k(){}return k}();kt.BiTangents=S;var A=function(k){t(q,k);function q(){return k!==null&&k.apply(this,arguments)||this}return q}(r);kt.TVGPoint=A;var C=function(){function k(q,V,P,$){this.id=q,this.polyid=V,this.polyvertid=P,this.p=$,$.vv=this}return k}();kt.VisibilityVertex=C;var D=function(){function k(q,V){this.source=q,this.target=V}return k.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)},k}();kt.VisibilityEdge=D;var M=function(){function k(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[G-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},k}();kt.TangentVisibilityGraph=M;function R(k,q){for(var V=[],P=1,$=q.length;P<$;++P){var F=e.Rectangle.lineIntersection(k.x1,k.y1,k.x2,k.y2,q[P-1].x,q[P-1].y,q[P].x,q[P].y);F&&V.push(F)}return V}function O(k,q){for(var V=k.length-1,P=q.length-1,$=new S,F=0;F=0&&re>=0&&ne<0&&ee>=0&&W>=0&&te<0?$.ll=new _(F,G):Z<=0&&re<=0&&ne>0&&ee<=0&&W<=0&&te>0?$.rr=new _(F,G):Z<=0&&re>0&&ne<=0&&ee>=0&&W<0&&te>=0?$.rl=new _(F,G):Z>=0&&re<0&&ne>=0&&ee<=0&&W>0&&te<=0&&($.lr=new _(F,G))}return $}kt.tangents=O;function N(k,q){for(var V=1,P=q.length;V0)return!0}return!1}return kt.polysOverlap=B,kt}var ll={},Ek;function vN(){if(Ek)return ll;Ek=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,_=0,S=[];if(n.length==0)return;A(n),D(n),l&&C(n);function A(L){L.forEach(function(k){B(k)});function B(k){var q=Number.MAX_VALUE,V=Number.MAX_VALUE,P=0,$=0;k.array.forEach(function(F){var G=typeof F.width<"u"?F.width:y,z=typeof F.height<"u"?F.height:y;G/=2,z/=2,P=Math.max(F.x+G,P),q=Math.min(F.x-G,q),$=Math.max(F.y+z,$),V=Math.min(F.y-z,V)}),k.width=P-q,k.height=$-V}}function C(L){L.forEach(function(B){var k={x:0,y:0};B.array.forEach(function(P){k.x+=P.x,k.y+=P.y}),k.x/=B.array.length,k.y/=B.array.length;var q={x:k.x-B.width/2,y:k.y-B.height/2},V={x:B.x-q.x+h/2-b/2,y:B.y-q.y+g/2-w/2};B.array.forEach(function(P){P.x+=V.x,P.y+=V.y})})}function D(L,B){var k=Number.POSITIVE_INFINITY,q=0;L.sort(function(K,Z){return Z.height-K.height}),x=L.reduce(function(K,Z){return K.widthx||j>t.FLOAT_EPSILON;){if(z!=1)var J=P-(P-V)/t.GOLDEN_SECTION,F=M(L,J);if(z!=0)var U=V+(P-V)/t.GOLDEN_SECTION,G=M(L,U);if(H=Math.abs(J-U),j=Math.abs(F-G),FG?(V=J,J=U,F=G,z=1):(P=U,U=J,G=F,z=0),$++>100)break}M(L,q)}function M(L,B){S=[],b=0,w=0,_=d;for(var k=0;k=L.height&&S[q].x+S[q].width+L.width+t.PADDING-B<=t.FLOAT_EPSILON){k=S[q];break}S.push(L),k!==void 0?(L.x=k.x+k.width+t.PADDING,L.y=k.bottom,L.space_left=L.height,L.bottom=L.y,k.space_left-=L.height+t.PADDING,k.bottom+=L.height+t.PADDING):(L.y=_,_+=L.height+t.PADDING,L.x=f,L.bottom=L.y,L.space_left=L.height),L.y+L.height-w>-1e-4&&(w=L.y+L.height-d),L.x+L.width-b>-1e-4&&(b=L.x+L.width-f)}function O(L){var B=0;return L.forEach(function(k){return B+=k.width+t.PADDING}),B}function N(){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 _=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,A=this.nodes().length,C=A+2*this._groups.length;this._links.length;var D=this._canvasSize[0],M=this._canvasSize[1],R=new Array(C),O=new Array(C),N=null,L=this._avoidOverlaps;this._nodes.forEach(function(G,z){G.index=z,typeof G.x>"u"&&(G.x=D/2,G.y=M/2),R[z]=G.x,O[z]=G.y}),this._linkLengthCalculator&&this._linkLengthCalculator();var B;this._distanceMatrix?B=this._distanceMatrix:(B=new i.Calculator(C,this._links,h.getSourceIndex,h.getTargetIndex,function(G){return _.getLinkLength(G)}).DistanceMatrix(),N=n.Descent.createSquareMatrix(C,function(){return 2}),this._links.forEach(function(G){typeof G.source=="number"&&(G.source=_._nodes[G.source]),typeof G.target=="number"&&(G.target=_._nodes[G.target])}),this._links.forEach(function(G){var z=h.getSourceIndex(G),H=h.getTargetIndex(G);N[z][H]=N[H][z]=G.weight||1}));var k=n.Descent.createSquareMatrix(C,function(G,z){return B[G][z]});if(this._rootGroup&&typeof this._rootGroup.groups<"u"){var S=A,q=function(z,H,j,J){N[z][H]=N[H][z]=j,k[z][H]=k[H][z]=J};this._groups.forEach(function(z){q(S,S+1,_._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(A,this._links,this._directedLinkConstraints.axis,this.linkAccessor))),this.avoidOverlaps(!1),this._descent=new n.Descent([R,O],k),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(L),L&&(this._nodes.forEach(function(G,z){G.x=R[z],G.y=O[z]}),this._descent.project=new a.Projection(this._nodes,this._groups,this._rootGroup,V,!0).projectFunctions(),this._nodes.forEach(function(G,z){R[z]=G.x,O[z]=G.y})),this._descent.G=N,this._descent.run(y),b){this._descent.snapStrength=1e3,this._descent.snapGridSize=this._nodes[0].width,this._descent.numGridSnapNodes=A,this._descent.scaleSnapByMaxH=A!=C;var F=n.Descent.createSquareMatrix(C,function(G,z){return G>=A||z>=A?N[G][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(_){return{source:_.source.index,target:_.target.index}}),x=this._nodes.map(function(_){return{index:_.index}});this._groups.forEach(function(_,S){x.push({index:_.index=b+S})}),this._groups.forEach(function(_,S){typeof _.leaves<"u"&&_.leaves.forEach(function(A){return w.push({source:_.index,target:A.index})}),typeof _.groups<"u"&&_.groups.forEach(function(A){return w.push({source:_.index,target:A.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(_){p[_.index]=x[_.index].x,y[_.index]=x[_.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,A){S.x=w[A],S.y=x[A]});var _=s.separateGraphs(this._nodes,this._links);s.applyPacking(_,g,p,this._defaultNodeSize,1,y),this._nodes.forEach(function(S,A){b._descent.x[0][A]=S.x,b._descent.x[1][A]=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},_={x:g.target.x,y:g.target.y},S=w.addPoint(x,g.source.index),A=w.addPoint(_,g.target.index);w.addEdgeIfVisible(x,_,g.source.index,g.target.index),typeof y<"u"&&y(w);var C=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,C,D,M),O=R.PathFromNodeToNode(S.id,A.id);if(O.length===1||O.length===w.V.length){var N=a.makeEdgeBetween(g.source.innerBounds,g.target.innerBounds,p);b=[N.sourceIntersection,N.arrowStart]}else{for(var L=O.length-2,B=w.V[O[L]].p,k=w.V[O[0]].p,b=[g.source.innerBounds.rayIntersection(B.x,B.y)],q=L;q>=0;--q)b.push(w.V[O[q]].p);b.push(a.makeEdgeTo(k,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 Tk;function yY(){if(Tk)return uo;Tk=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=yf(),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 Kc={},lo={},Ck;function bY(){if(Ck)return lo;Ck=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=yf(),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={},Ak;function wY(){if(Ak)return xu;Ak=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=yf(),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 Rk;function xY(){if(Rk)return Kc;Rk=1,Object.defineProperty(Kc,"__esModule",{value:!0});var t=bY(),e=wY();function r(a){return!a||n(a)?new t.D3StyleLayoutAdaptor:new e.D3StyleLayoutAdaptor(a)}Kc.d3adaptor=r;function n(a){var i=/^3\./;return a.version&&a.version.match(i)!==null}return Kc}var fo={},Mk;function gN(){if(Mk)return fo;Mk=1,Object.defineProperty(fo,"__esModule",{value:!0});var t=mf(),e=o_(),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],_=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}})),A=this.cols.map(function(D){return{x1:D.pos,x2:D.pos,y1:x,y2:_}}).concat(p.map(function(D){return{x1:D,x2:D,y1:x,y2:_}})),C=S.concat(A);C.forEach(function(D){return D.verts=[]}),this.verts=[],this.edges=[],S.forEach(function(D){return A.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 N=h.backToFront[O],L=N.rect,B=Math.abs(R.x-L.cx()),k=Math.abs(R.y-L.cy());if(B0;){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)&&(_={pos:b[0][f],segments:[]},x.push(_)),_.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(N){return new e.Variable(N[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(N,L){var B=h[L],k=N.position();B[0][l]=B[1][l]=k;var q=d[B.edgeid];B.i>0&&(q[B.i-1][1][l]=k),B.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,_){return Math.abs((x.x-w.x)*(_.y-w.y)-(x.y-w.y)*(_.x-w.x))<.001},h=[],g=f(l[0]),p=1;p1&&V>1?1e3:0},D=A.PathFromNodeToNodeWithPrevCost(h.ports[0].id,g.ports[0].id,C),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-=_/Math.abs(_)*f,g.routepath+="L "+b+" "+w+" ";var S=l[p+1],A=S[0].x,C=S[0].y,D=S[1].x,M=S[1].y;x=D-A,_=M-C;var R=s.angleBetween2Lines(y,S)<0?1:0,O,N;Math.abs(x)>0?(O=A+x/Math.abs(x)*f,N=C):(O=A,N=C+_/Math.abs(_)*f);var L=Math.abs(O-b),B=Math.abs(N-w);g.routepath+="A "+L+" "+B+" 0 0 "+R+" "+O+" "+N+" "}else{var k=[b,w],q,V;Math.abs(x)>0?(b-=x/Math.abs(x)*h,q=[b,w+d],V=[b,w-d]):(w-=_/Math.abs(_)*h,q=[b+d,w],V=[b-d,w]),g.routepath+="L "+b+" "+w+" ",h>0&&(g.arrowpath="M "+k[0]+" "+k[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,_=w-y[0].y,k=[b,w],q,V;Math.abs(x)>0?(b-=x/Math.abs(x)*h,q=[b,w+d],V=[b,w-d]):(w-=_/Math.abs(_)*h,q=[b+d,w],V=[b-d,w]),g.routepath+="L "+b+" "+w+" ",h>0&&(g.arrowpath="M "+k[0]+" "+k[1]+" L "+q[0]+" "+q[1]+" L "+V[0]+" "+V[1])}return g},s}();return fo.GridRouter=o,fo}var _u={},Ok;function _Y(){if(Ok)return _u;Ok=1,Object.defineProperty(_u,"__esModule",{value:!0});var t=Kh(),e=i_(),r=mf(),n=a_(),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[_]=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(_){return _.length*=d.idealLinkLength});var p=new t.Calculator(h,this.links,function(_){return _.source},function(_){return _.target},function(_){return _.length}).DistanceMatrix(),y=e.Descent.createSquareMatrix(h,function(_,S){return p[_][S]}),b=e.Descent.createSquareMatrix(h,function(){return 2});this.links.forEach(function(_){var S=_.source,A=_.target;return b[S][A]=b[A][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,A){if(y(S)){var C=S;return C.apply(A,[A])}else return S};function x(_){this.options=s({},l,_)}x.prototype.run=function(){var _=this,S=this.options;_.manuallyStopped=!1;var A=S.cy,C=S.eles,D=C.nodes(),M=C.edges(),R=!1,O=function(ce){return ce.isParent()},N=D.filter(O),L=D.subtract(N),B=S.boundingBox||{x1:0,y1:0,w:A.width(),h:A.height()};B.x2===void 0&&(B.x2=B.x1+B.w),B.w===void 0&&(B.w=B.x2-B.x1),B.y2===void 0&&(B.y2=B.y1+B.h),B.h===void 0&&(B.h=B.y2-B.y1);var k=function(){for(var ce=0;ce0&&$.constraints(j),$.groups(N.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(L).map(function(Ce){return Ce[0].scratch().cola.index}),fixed:te.locked()},te}).map(function(te){return te.scratch().cola.groups=te.children().intersection(N).map(function(ce){return ce.scratch().cola.index}),te.scratch().cola}));var K=void 0,Z=void 0;S.edgeLength!=null?(K=S.edgeLength,Z="linkDistance"):S.edgeSymDiffLength!=null?(K=S.edgeSymDiffLength,Z="symmetricDiffLinkLengths"):S.edgeJaccardLength!=null?(K=S.edgeJaccardLength,Z="jaccardLinkLengths"):(K=100,Z="linkDistance");var re=function(ce){return ce.calcLength};if($.links(M.stdFilter(function(te){return L.contains(te.source())&&L.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([B.w,B.h]),K!=null&&$[Z](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 _.trigger({type:"layoutstart",layout:_}),$.avoidOverlaps(S.avoidOverlap).handleDisconnected(S.handleDisconnected).start(S.unconstrIter,S.userConstIter,S.allConstIter,void 0,void 0,S.centerGraph),S.infinite||setTimeout(function(){_.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}])})}(bd)),bd.exports}var AY=CY();const RY=h2(AY);function pN(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?jc(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?jc(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=DY.exec(t))?new Kr(e[1],e[2],e[3],1):(e=kY.exec(t))?new Kr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=LY.exec(t))?jc(e[1],e[2],e[3],e[4]):(e=NY.exec(t))?jc(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=BY.exec(t))?Vk(e[1],e[2]/100,e[3]/100,1):(e=qY.exec(t))?Vk(e[1],e[2]/100,e[3]/100,e[4]):Nk.hasOwnProperty(t)?Pk(Nk[t]):t==="transparent"?new Kr(NaN,NaN,NaN,0):null}function Pk(t){return new Kr(t>>16&255,t>>8&255,t&255,1)}function jc(t,e,r,n){return n<=0&&(t=e=r=NaN),new Kr(t,e,r,n)}function IY(t){return t instanceof bf||(t=Vl(t)),t?(t=t.rgb(),new Kr(t.r,t.g,t.b,t.opacity)):new Kr}function Ud(t,e,r,n){return arguments.length===1?IY(t):new Kr(t,e,r,n??1)}function Kr(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}u_(Kr,Ud,mN(bf,{brighter(t){return t=t==null?Hd:Math.pow(Hd,t),new Kr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?zl:Math.pow(zl,t),new Kr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Kr(bo(this.r),bo(this.g),bo(this.b),Gd(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:zk,formatHex:zk,formatHex8:VY,formatRgb:Ik,toString:Ik}));function zk(){return`#${yo(this.r)}${yo(this.g)}${yo(this.b)}`}function VY(){return`#${yo(this.r)}${yo(this.g)}${yo(this.b)}${yo((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ik(){const t=Gd(this.opacity);return`${t===1?"rgb(":"rgba("}${bo(this.r)}, ${bo(this.g)}, ${bo(this.b)}${t===1?")":`, ${t})`}`}function Gd(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 Vk(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new $n(t,e,r,n)}function yN(t){if(t instanceof $n)return new $n(t.h,t.s,t.l,t.opacity);if(t instanceof bf||(t=Vl(t)),!t)return new $n;if(t instanceof $n)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 $n(o,s,l,t.opacity)}function $Y(t,e,r,n){return arguments.length===1?yN(t):new $n(t,e,r,n??1)}function $n(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}u_($n,$Y,mN(bf,{brighter(t){return t=t==null?Hd:Math.pow(Hd,t),new $n(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?zl:Math.pow(zl,t),new $n(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 Kr(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 $n($k(this.h),Zc(this.s),Zc(this.l),Gd(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=Gd(this.opacity);return`${t===1?"hsl(":"hsla("}${$k(this.h)}, ${Zc(this.s)*100}%, ${Zc(this.l)*100}%${t===1?")":`, ${t})`}`}}));function $k(t){return t=(t||0)%360,t<0?t+360:t}function Zc(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 FY(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 HY(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 UY(t,e){return function(r){return t+r*e}}function GY(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 YY(t){return(t=+t)==1?bN:function(e,r){return r-e?GY(e,r,t):s_(isNaN(e)?r:e)}}function bN(t,e){var r=e-t;return r?UY(t,r):s_(isNaN(t)?e:t)}const Yd=function t(e){var r=YY(e);function n(a,i){var o=r((a=Ud(a)).r,(i=Ud(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),f=bN(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 XY(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:Vn(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:Vn(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:Vn(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:Vn(f,h)},{i:b-2,x:Vn(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;++yKY(t[t.length-1]);var uX=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(pN);const SN=oX(uX);function wd(t,e){return t==null||e==null?NaN:te?1:t>=e?0:NaN}function sX(t,e){return t==null||e==null?NaN:et?1:e>=t?0:NaN}function TN(t){let e,r,n;t.length!==2?(e=wd,r=(s,l)=>wd(t(s),l),n=(s,l)=>t(s)-l):(e=t===wd||t===sX?t:lX,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 lX(){return 0}function fX(t){return t===null?NaN:+t}const cX=TN(wd),dX=cX.right;TN(fX).center;class Hk extends Map{constructor(e,r=gX){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(Uk(this,e))}has(e){return super.has(Uk(this,e))}set(e,r){return super.set(hX(this,e),r)}delete(e){return super.delete(vX(this,e))}}function Uk({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function hX({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function vX({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function gX(t){return t!==null&&typeof t=="object"?t.valueOf():t}const pX=Math.sqrt(50),mX=Math.sqrt(10),yX=Math.sqrt(2);function Xd(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>=pX?10:i>=mX?5:i>=yX?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 SX(t,e,r){var n=t[0],a=t[1],i=e[0],o=e[1];return a2?TX:SX,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),Vn)))(g)))},h.domain=function(g){return arguments.length?(t=Array.from(g,_X),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=xN,d()},h.clamp=function(g){return arguments.length?(o=g?!0:Mn,d()):o!==Mn},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 CX(){return f_()(Mn,Mn)}function AX(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Kd(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=Kd(Math.abs(t)),t?t[1]:NaN}function RX(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 MX(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var OX=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $l(t){if(!(e=OX.exec(t)))throw new Error("invalid format: "+t);var e;return new c_({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=c_.prototype;function c_(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+""}c_.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 DX(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 AN;function kX(t,e){var r=Kd(t,e);if(!r)return t+"";var n=r[0],a=r[1],i=a-(AN=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")+Kd(t,Math.max(0,e+i-1))[0]}function Xk(t,e){var r=Kd(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 Kk={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:AX,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)=>Xk(t*100,e),r:Xk,s:kX,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function jk(t){return t}var Zk=Array.prototype.map,Qk=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function LX(t){var e=t.grouping===void 0||t.thousands===void 0?jk:RX(Zk.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?jk:MX(Zk.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,_=h.comma,S=h.precision,A=h.trim,C=h.type;C==="n"?(_=!0,C="g"):Kk[C]||(S===void 0&&(S=12),A=!0,C="g"),(w||g==="0"&&p==="=")&&(w=!0,g="0",p="=");var D=b==="$"?r:b==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():"",M=b==="$"?n:/[%p]/.test(C)?o:"",R=Kk[C],O=/[defgprs%]/.test(C);S=S===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function N(L){var B=D,k=M,q,V,P;if(C==="c")k=R(L)+k,L="";else{L=+L;var $=L<0||1/L<0;if(L=isNaN(L)?l:R(Math.abs(L),S),A&&(L=DX(L)),$&&+L==0&&y!=="+"&&($=!1),B=($?y==="("?y:s:y==="-"||y==="("?"":y)+B,k=(C==="s"?Qk[8+AN/3]:"")+k+($&&y==="("?")":""),O){for(q=-1,V=L.length;++qP||P>57){k=(P===46?a+L.slice(q+1):L.slice(q))+k,L=L.slice(0,q);break}}}_&&!w&&(L=e(L,1/0));var F=B.length+L.length+k.length,G=F>1)+B+L+k+G.slice(F);break;default:L=G+B+L+k;break}return i(L)}return N.toString=function(){return h+""},N}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=Qk[8+y/3];return function(x){return p(b*x)+w}}return{format:f,formatPrefix:d}}var Wc,d_,RN;NX({thousands:",",grouping:[3],currency:["$",""]});function NX(t){return Wc=LX(t),d_=Wc.format,RN=Wc.formatPrefix,Wc}function BX(t){return Math.max(0,-Vu(Math.abs(t)))}function qX(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Vu(e)/3)))*3-Vu(Math.abs(t)))}function PX(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Vu(e)-Vu(t))+1}function zX(t,e,r,n){var a=bX(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=qX(a,o))&&(n.precision=i),RN(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=PX(a,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=BX(a))&&(n.precision=i-(n.type==="%")*2);break}}return d_(n)}function h_(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 zX(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 MN(){var t=CX();return t.copy=function(){return l_(t,MN())},Zh.apply(t,arguments),h_(t)}function IX(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 UX(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 e4(t){return(e,r)=>-t(-e,r)}function GX(t){const e=t(Wk,Jk),r=e.domain;let n=10,a,i;function o(){return a=UX(n),i=HX(n),r()[0]<0?(a=e4(a),i=e4(i),t(VX,$X)):t(Wk,Jk),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=d_(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(IX(r(),{floor:s=>i(Math.floor(a(s))),ceil:s=>i(Math.ceil(a(s)))})),e}function ON(){const t=GX(f_()).domain([1,10]);return t.copy=()=>l_(t,ON()).base(t.base()),Zh.apply(t,arguments),t}function t4(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function YX(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function XX(t){return t<0?-t*t:t*t}function KX(t){var e=t(Mn,Mn),r=1;function n(){return r===1?t(Mn,Mn):r===.5?t(YX,XX):t(t4(r),t4(1/r))}return e.exponent=function(a){return arguments.length?(r=+a,n()):r},h_(e)}function DN(){var t=KX(f_());return t.copy=function(){return l_(t,DN()).exponent(t.exponent())},Zh.apply(t,arguments),t}function jX(){return DN.apply(null,arguments).exponent(.5)}function ZX(){var t=0,e=1,r,n,a,i,o=Mn,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(xN),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 QX(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function kN(){var t=h_(ZX()(Mn));return t.copy=function(){return QX(t,kN())},wX.apply(t,arguments)}var jx="http://www.w3.org/1999/xhtml";const r4={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)),r4.hasOwnProperty(e)?{space:r4[e],local:t}:t}function WX(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 LN(t){var e=Qh(t);return(e.local?JX:WX)(e)}function eK(){}function v_(t){return t==null?eK:function(){return this.querySelector(t)}}function tK(t){typeof t!="function"&&(t=v_(t));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a=S&&(S=_+1);!(C=w[S])&&++S=0;)(o=n[a])&&(i&&o.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(o,i),i=o);return this}function CK(t){t||(t=AK);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 RK(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function MK(){return Array.from(this)}function OK(){for(var t=this._groups,e=0,r=t.length;e1?this.each((e==null?$K:typeof e=="function"?HK:FK)(t,e,r??"")):$u(this.node(),t)}function $u(t,e){return t.style.getPropertyValue(e)||zN(t).getComputedStyle(t,null).getPropertyValue(e)}function GK(t){return function(){delete this[t]}}function YK(t,e){return function(){this[t]=e}}function XK(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function KK(t,e){return arguments.length>1?this.each((e==null?GK:typeof e=="function"?XK:YK)(t,e)):this.node()[t]}function IN(t){return t.trim().split(/^|\s+/)}function g_(t){return t.classList||new VN(t)}function VN(t){this._node=t,this._names=IN(t.getAttribute("class")||"")}VN.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 $N(t,e){for(var r=g_(t),n=-1,a=e.length;++n=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function _j(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}})}xd.prototype=GN.prototype={constructor:xd,on:function(t,e){var r=this._,n=Dj(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 i4(){Co=(Qd=Fl.now())+Wh,Fu=_l=0;try{Nj()}finally{Fu=0,qj(),Co=0}}function Bj(){var t=Fl.now(),e=t-Qd;e>YN&&(Wh-=e,Qd=t)}function qj(){for(var t,e=Zd,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:Zd=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(i4,t-Fl.now()-Wh)),cl&&(cl=clearInterval(cl))):(cl||(Qd=Fl.now(),cl=setInterval(Bj,YN)),Fu=1,XN(i4))}}function o4(t,e,r){var n=new Wd;return e=e==null?0:+e,n.restart(function(a){n.stop(),t(a+e)},e,r),n}var Pj=GN("start","end","cancel","interrupt"),zj=[],jN=0,u4=1,Qx=2,_d=3,s4=4,Wx=5,Ed=6;function Jh(t,e,r,n,a,i){var o=t.__transition;if(!o)t.__transition={};else if(r in o)return;Ij(t,r,{name:e,index:n,group:a,on:Pj,tween:zj,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:jN})}function m_(t,e){var r=Xn(t,e);if(r.state>jN)throw new Error("too late; already scheduled");return r}function ya(t,e){var r=Xn(t,e);if(r.state>_d)throw new Error("too late; already running");return r}function Xn(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function Ij(t,e,r){var n=t.__transition,a;n[e]=r,r.timer=KN(i,0,r.time);function i(f){r.state=u4,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!==u4)return l();for(d in n)if(p=n[d],p.name===r.name){if(p.state===_d)return o4(o);p.state===s4?(p.state=Ed,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?Jc(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Jc(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=Yj.exec(t))?new an(e[1],e[2],e[3],1):(e=Xj.exec(t))?new an(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Kj.exec(t))?Jc(e[1],e[2],e[3],e[4]):(e=jj.exec(t))?Jc(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Zj.exec(t))?g4(e[1],e[2]/100,e[3]/100,1):(e=Qj.exec(t))?g4(e[1],e[2]/100,e[3]/100,e[4]):l4.hasOwnProperty(t)?d4(l4[t]):t==="transparent"?new an(NaN,NaN,NaN,0):null}function d4(t){return new an(t>>16&255,t>>8&255,t&255,1)}function Jc(t,e,r,n){return n<=0&&(t=e=r=NaN),new an(t,e,r,n)}function Jj(t){return t instanceof xf||(t=Gl(t)),t?(t=t.rgb(),new an(t.r,t.g,t.b,t.opacity)):new an}function eZ(t,e,r,n){return arguments.length===1?Jj(t):new an(t,e,r,n??1)}function an(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}b_(an,eZ,ZN(xf,{brighter:function(t){return t=t==null?Jd:Math.pow(Jd,t),new an(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=t==null?Hl:Math.pow(Hl,t),new an(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:h4,formatHex:h4,formatRgb:v4,toString:v4}));function h4(){return"#"+cx(this.r)+cx(this.g)+cx(this.b)}function v4(){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 g4(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 QN(t){if(t instanceof ia)return new ia(t.h,t.s,t.l,t.opacity);if(t instanceof xf||(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 tZ(t,e,r,n){return arguments.length===1?QN(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}b_(ia,tZ,ZN(xf,{brighter:function(t){return t=t==null?Jd:Math.pow(Jd,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 an(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 WN(t,e){var r;return(typeof e=="number"?Vn:e instanceof Gl?Yd:(r=Gl(e))?(e=r,Yd):wN)(t,e)}function rZ(t){return function(){this.removeAttribute(t)}}function nZ(t){return function(){this.removeAttributeNS(t.space,t.local)}}function aZ(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 iZ(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 oZ(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 uZ(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 sZ(t,e){var r=Qh(t),n=r==="transform"?iX:WN;return this.attrTween(t,typeof e=="function"?(r.local?uZ:oZ)(r,n,y_(this,"attr."+t,e)):e==null?(r.local?nZ:rZ)(r):(r.local?iZ:aZ)(r,n,e))}function lZ(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function fZ(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function cZ(t,e){var r,n;function a(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&fZ(t,i)),r}return a._value=e,a}function dZ(t,e){var r,n;function a(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&lZ(t,i)),r}return a._value=e,a}function hZ(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?cZ:dZ)(n,e))}function vZ(t,e){return function(){m_(this,t).delay=+e.apply(this,arguments)}}function gZ(t,e){return e=+e,function(){m_(this,t).delay=e}}function pZ(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?vZ:gZ)(e,t)):Xn(this.node(),e).delay}function mZ(t,e){return function(){ya(this,t).duration=+e.apply(this,arguments)}}function yZ(t,e){return e=+e,function(){ya(this,t).duration=e}}function bZ(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?mZ:yZ)(e,t)):Xn(this.node(),e).duration}function wZ(t,e){if(typeof e!="function")throw new Error;return function(){ya(this,t).ease=e}}function xZ(t){var e=this._id;return arguments.length?this.each(wZ(e,t)):Xn(this.node(),e).ease}function _Z(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;ya(this,t).ease=r}}function EZ(t){if(typeof t!="function")throw new Error;return this.each(_Z(this._id,t))}function SZ(t){typeof t!="function"&&(t=BN(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 AZ(t,e,r){var n,a,i=CZ(e)?m_:ya;return function(){var o=i(this,t),s=o.on;s!==n&&(a=(n=s).copy()).on(e,r),o.on=a}}function RZ(t,e){var r=this._id;return arguments.length<2?Xn(this.node(),r).on.on(t):this.each(AZ(r,t,e))}function MZ(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function OZ(){return this.on("end.remove",MZ(this._id))}function DZ(t){var e=this._name,r=this._id;typeof t!="function"&&(t=v_(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)),p4.hasOwnProperty(e)?{space:p4[e],local:t}:t}function rQ(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 nQ(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function rB(t){var e=tB(t);return(e.local?nQ:rQ)(e)}var aQ=0;function m4(){this._="@"+(++aQ).toString(36)}m4.prototype={constructor:m4,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 nB=function(t){return function(){return this.matches(t)}};if(typeof document<"u"){var dl=document.documentElement;if(!dl.matches){var iQ=dl.webkitMatchesSelector||dl.msMatchesSelector||dl.mozMatchesSelector||dl.oMatchesSelector;nB=function(t){return function(){return iQ.call(this,t)}}}}const oQ=nB;var aB={};if(typeof document<"u"){var uQ=document.documentElement;"onmouseenter"in uQ||(aB={mouseenter:"mouseover",mouseleave:"mouseout"})}function sQ(t,e,r){return t=iB(t,e,r),function(n){var a=n.relatedTarget;(!a||a!==this&&!(a.compareDocumentPosition(this)&8))&&t.call(this,n)}}function iB(t,e,r){return function(n){try{t.call(this,this.__data__,e,r)}finally{}}}function lQ(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 fQ(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,a=e.length,i;r=S&&(S=_+1);!(C=w[S])&&++S=0;)(o=n[a])&&(i&&i!==o.nextSibling&&i.parentNode.insertBefore(o,i),i=o);return this}function AQ(t){t||(t=RQ);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 MQ(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function OQ(){var t=new Array(this.size()),e=-1;return this.each(function(){t[++e]=this}),t}function DQ(){for(var t=this._groups,e=0,r=t.length;e1?this.each((e==null?FQ:typeof e=="function"?UQ:HQ)(t,e,r??"")):sB(n=this.node()).getComputedStyle(n,null).getPropertyValue(t)}function YQ(t){return function(){delete this[t]}}function XQ(t,e){return function(){this[t]=e}}function KQ(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function jQ(t,e){return arguments.length>1?this.each((e==null?YQ:typeof e=="function"?KQ:XQ)(t,e)):this.node()[t]}function lB(t){return t.trim().split(/^|\s+/)}function w_(t){return t.classList||new fB(t)}function fB(t){this._node=t,this._names=lB(t.getAttribute("class")||"")}fB.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 cB(t,e){for(var r=w_(t),n=-1,a=e.length;++n1?n[0]+n.slice(2):n,+t.slice(r+1)]}function Hu(t){return t=th(Math.abs(t)),t?t[1]:NaN}function EW(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 SW(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 vB;function TW(t,e){var r=th(t,e);if(!r)return t+"";var n=r[0],a=r[1],i=a-(vB=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")+th(t,Math.max(0,e+i-1))[0]}function b4(t,e){var r=th(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 gB={"":SW,"%":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 b4(t*100,e)},r:b4,s:TW,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};var CW=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;function Yl(t){return new pB(t)}function pB(t){if(!(e=CW.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"):gB[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}pB.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 w4=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function AW(t){return t}function x_(t){var e=t.grouping&&t.thousands?EW(t.grouping,t.thousands):AW,r=t.currency,n=t.decimal;function a(o){o=Yl(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)?"%":"",_=gB[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 A(C){var D=w,M=x,R,O,N;if(b==="c")M=_(C)+M,C="";else{C=+C;var L=(C<0||1/C<0)&&(C*=-1,!0);if(C=_(C,y),L){for(R=-1,O=C.length,L=!1;++RN||N>57){M=(N===46?n+C.slice(R+1):C.slice(R))+M,C=C.slice(0,R);break}}}p&&!h&&(C=e(C,1/0));var B=D.length+C.length+M.length,k=B>1)+D+C+M+k.slice(B)}return k+D+C+M}return A.toString=function(){return o+""},A}function i(o,s){var l=a((o=Yl(o),o.type="f",o)),f=Math.max(-8,Math.min(8,Math.floor(Hu(s)/3)))*3,d=Math.pow(10,-f),h=w4[8+f/3];return function(g){return l(d*g)+h}}return{format:a,formatPrefix:i}}var ed,__,E_;RW({decimal:".",thousands:",",grouping:[3],currency:["$",""]});function RW(t){return ed=x_(t),__=ed.format,E_=ed.formatPrefix,ed}function MW(t){return Math.max(0,-Hu(Math.abs(t)))}function OW(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Hu(e)/3)))*3-Hu(Math.abs(t)))}function DW(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Hu(e)-Hu(t))+1}var kW={value:function(){}};function S_(){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}})}Sd.prototype=S_.prototype={constructor:Sd,on:function(t,e){var r=this._,n=LW(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 BW(t){return t.length===1&&(t=qW(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 qW(t){return function(e,r){return mB(t(e),r)}}var PW=BW(mB),zW=PW.right;function IW(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=VW?a*=10:i>=$W?a*=5:i>=FW&&(a*=2),e=i){a=i;break}for(;++ra&&(a=i)}else{for(;++r=i){a=i;break}for(;++ra&&(a=i)}return a}function e2(t,e){var r=0,n=t.length,a,i=-1;if(e==null)for(;++i>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?td(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?td(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=YW.exec(t))?new $r(e[1],e[2],e[3],1):(e=XW.exec(t))?new $r(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=KW.exec(t))?td(e[1],e[2],e[3],e[4]):(e=jW.exec(t))?td(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=ZW.exec(t))?D4(e[1],e[2]/100,e[3]/100,1):(e=QW.exec(t))?D4(e[1],e[2]/100,e[3]/100,e[4]):T4.hasOwnProperty(t)?R4(T4[t]):t==="transparent"?new $r(NaN,NaN,NaN,0):null}function R4(t){return new $r(t>>16&255,t>>8&255,t&255,1)}function td(t,e,r,n){return n<=0&&(t=e=r=NaN),new $r(t,e,r,n)}function wB(t){return t instanceof as||(t=Kl(t)),t?(t=t.rgb(),new $r(t.r,t.g,t.b,t.opacity)):new $r}function t2(t,e,r,n){return arguments.length===1?wB(t):new $r(t,e,r,n??1)}function $r(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}ev($r,t2,T_(as,{brighter:function(t){return t=t==null?Uu:Math.pow(Uu,t),new $r(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=t==null?Ao:Math.pow(Ao,t),new $r(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:M4,formatHex:M4,formatRgb:O4,toString:O4}));function M4(){return"#"+hx(this.r)+hx(this.g)+hx(this.b)}function O4(){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 D4(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 xB(t){if(t instanceof oa)return new oa(t.h,t.s,t.l,t.opacity);if(t instanceof as||(t=Kl(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 JW(t,e,r,n){return arguments.length===1?xB(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,JW,T_(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 $r(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 eJ=Math.PI/180,tJ=180/Math.PI,_B=-.14861,C_=1.78277,A_=-.29227,tv=-.90649,jl=1.97294,k4=jl*tv,L4=jl*C_,N4=C_*A_-tv*_B;function rJ(t){if(t instanceof wo)return new wo(t.h,t.s,t.l,t.opacity);t instanceof $r||(t=wB(t));var e=t.r/255,r=t.g/255,n=t.b/255,a=(N4*n+k4*e-L4*r)/(N4+k4-L4),i=n-a,o=(jl*(r-a)-A_*i)/tv,s=Math.sqrt(o*o+i*i)/(jl*a*(1-a)),l=s?Math.atan2(o,i)*tJ-120:NaN;return new wo(l<0?l+360:l,s,a,t.opacity)}function va(t,e,r,n){return arguments.length===1?rJ(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,T_(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)*eJ,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),a=Math.sin(t);return new $r(255*(e+r*(_B*n+C_*a)),255*(e+r*(A_*n+tv*a)),255*(e+r*(jl*n)),this.opacity)}}));function rv(t){return function(){return t}}function EB(t,e){return function(r){return t+r*e}}function nJ(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 aJ(t,e){var r=e-t;return r?EB(t,r>180||r<-180?r-360*Math.round(r/360):r):rv(isNaN(t)?e:t)}function iJ(t){return(t=+t)==1?Bu:function(e,r){return r-e?nJ(e,r,t):rv(isNaN(e)?r:e)}}function Bu(t,e){var r=e-t;return r?EB(t,r):rv(isNaN(t)?e:t)}const B4=function t(e){var r=iJ(e);function n(a,i){var o=r((a=t2(a)).r,(i=t2(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 oJ(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 yJ(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 bJ(t,e,r,n){var a=t[0],i=t[1],o=e[0],s=e[1];return i2?wJ:bJ,s=l=null,d}function d(h){return(s||(s=o(r,n,i?mJ(t):t,a)))(+h)}return d.invert=function(h){return(l||(l=o(n,r,TB,i?yJ(e):e)))(+h)},d.domain=function(h){return arguments.length?(r=UW.call(h,pJ),f()):r.slice()},d.range=function(h){return arguments.length?(n=S4.call(h),f()):n.slice()},d.rangeRound=function(h){return n=S4.call(h),a=vJ,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 EJ(t,e,r){var n=t[0],a=t[t.length-1],i=rh(n,a,e??10),o;switch(r=Yl(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(n),Math.abs(a));return r.precision==null&&!isNaN(o=OW(i,s))&&(r.precision=o),E_(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=DW(i,Math.max(Math.abs(n),Math.abs(a))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=MW(i))&&(r.precision=o-(r.type==="%")*2);break}}return __(r)}function SJ(t){var e=t.domain;return t.ticks=function(r){var n=e();return HW(n[0],n[n.length-1],r??10)},t.tickFormat=function(r,n){return EJ(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 O_(){var t=_J(TB,ah);return t.copy=function(){return xJ(t,O_())},SJ(t)}function zi(t){return t.match(/.{6}/g).map(function(e){return"#"+e})}zi("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");zi("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6");zi("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9");zi("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5");M_(va(300,.5,0),va(-240,.5,1));M_(va(-100,.75,.35),va(80,1.5,.8));M_(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 TJ=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},CB=function(e){return e},P4=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))})},CJ=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":TJ(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,A=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=x_(R),M):g},M.labelFormat=function(R){return arguments.length?(p=Yl(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")&&(_=R),M):_},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?(C=R,M):C},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}function NJ(){var t=O_(),e="rect",r=15,n=2,a=[5],i=void 0,o=[],s="",l="",f=jt.d3_defaultLocale,d=jt.d3_defaultFormatSpecifier,h=10,g="middle",p=jt.d3_defaultDelimiter,y=void 0,b="vertical",w=!1,x=void 0,_=void 0,S=S_("cellover","cellout","cellclick");function A(C){var D=jt.d3_calcType(t,w,a,o,f.format(d),p),M=C.selectAll("g").data([t]);i&&jt.d3_filterCells(D,i),M.enter().append("g").attr("class",s+"legendCells");var R=C.select("."+s+"legendCells").selectAll("."+s+"cell").data(D.data),O=R.enter().append("g").attr("class",s+"cell");O.append(e).attr("class",s+"swatch");var N=C.selectAll("g."+s+"cell "+e+"."+s+"swatch");jt.d3_addEvents(O,S),R.exit().transition().style("opacity",0).remove(),N.exit().transition().style("opacity",0).remove(),N=N.merge(N),e==="line"?(jt.d3_drawShapes(e,N,0,r),N.attr("stroke-width",D.feature)):jt.d3_drawShapes(e,N,D.feature,D.feature,D.feature,x);var L=jt.d3_addText(C,O,D.labels,s,y);R=O.merge(R);var B=L.nodes().map(function(G){return G.getBBox()}),k=N.nodes().map(function(G,z){var H=G.getBBox(),j=t(D.data[z]);return e==="line"&&b==="horizontal"?H.height=H.height+j:e==="line"&&b==="vertical"&&(H.width=H.width),H}),q=_4(k,function(G){return G.height+G.y}),V=_4(k,function(G){return G.width+G.x}),P=void 0,$=void 0,F=g=="start"?0:g=="middle"?.5:1;b==="vertical"?function(){var G=B.map(function(H,j){return Math.max(H.height,k[j].height)}),z=e=="circle"||e=="line"?k[0].height/2:0;P=function(j,J){var U=e2(G.slice(0,J));return"translate(0, "+(z+U+J*n)+")"},$=function(j,J){return"translate( "+(V+h)+`, `+(k[J].y+k[J].height/2+5)+")"}}():b==="horizontal"&&function(){P=function(H,j){var J=e2(k.slice(0,j),function(K){return K.width}),U=e=="circle"||e=="line"?q/2:0;return"translate("+(J+j*n)+", "+U+")"};var G=e=="line"?q/2:q;$=function(H,j){return"translate( "+(k[j].width*F+k[j].x)+`, `+(G+h)+")"}}(),jt.d3_placement(b,R,P,L,$,g),jt.d3_title(C,l,s,_),R.transition().style("opacity",1)}return A.scale=function(C){return arguments.length?(t=C,A):t},A.cells=function(C){return arguments.length?((C.length>1||C>=2)&&(a=C),A):a},A.cellFilter=function(C){return arguments.length?(i=C,A):i},A.shape=function(C,D){return arguments.length?((C=="rect"||C=="circle"||C=="line")&&(e=C,x=D),A):e},A.shapeWidth=function(C){return arguments.length?(r=+C,A):r},A.shapePadding=function(C){return arguments.length?(n=+C,A):n},A.labels=function(C){return arguments.length?(o=C,A):o},A.labelAlign=function(C){return arguments.length?((C=="start"||C=="end"||C=="middle")&&(g=C),A):g},A.locale=function(C){return arguments.length?(f=x_(C),A):f},A.labelFormat=function(C){return arguments.length?(d=Yl(C),A):A.locale().format(d)},A.labelOffset=function(C){return arguments.length?(h=+C,A):h},A.labelDelimiter=function(C){return arguments.length?(p=C,A):p},A.labelWrap=function(C){return arguments.length?(y=C,A):y},A.orient=function(C){return arguments.length?(C=C.toLowerCase(),(C=="horizontal"||C=="vertical")&&(b=C),A):b},A.ascending=function(C){return arguments.length?(w=!!C,A):w},A.classPrefix=function(C){return arguments.length?(s=C,A):s},A.title=function(C){return arguments.length?(l=C,A):l},A.titleWidth=function(C){return arguments.length?(_=C,A):_},A.on=function(){var C=S.on.apply(S,arguments);return C===S?A:C},A}const BJ=new Set(["id","type","library_name","pipeline_tag"]),qJ=new Set(["downloads","likes","downloads","downloads_all_time","trending_score","used_storage"]);function AB(t){return BJ.has(t)}function PJ(t){return qJ.has(t)}function zJ(t,e){if(AB(e)){const r=new Set(t.filter(a=>a.group==="nodes").map(a=>a.data[e]));return CN(r,MY)}else if(PJ(e)){const r=t.map(i=>i.data[e]).filter(i=>isNaN(i)===!1),n=[Math.min(...r),Math.max(...r)];return kN(n,SN)}}function IJ(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 jX().domain(n).range(a)}function VJ({layout:t,label:e,edgeScale:r,nodeColor:n,nodeSize:a,colorLegendId:i,sizeLegendId:o,edgeLegendId:s}){const[l,f]=Ee.useState(null),d=N9,h=Ee.useRef(sa({}));Ee.useEffect(()=>{sa.use(mY),sa.use(RY);const p=document.getElementById("cyContainer"),y=document.getElementById("cy");y&&p&&(y.style.height=`${p.clientHeight}px`);const b=typeof t=="string"?{name:t}:t;h.current=window.cy=sa({container:y,elements:d,layout:b}),h.current.style().selector("node").style({"font-size":8}).update(),h.current.on("mouseover","node",w=>{const x=w.target;x.style("border-width",.5),x.style("border-color","black"),f(x)}),h.current.on("mouseout","node",w=>{w.target.style("border-width",0),f(null)})},[d,t]),Ee.useEffect(()=>{if(!h.current)return;const p=r==="linear"?MN:ON,y=d.filter(_=>_.group==="edges").map(_=>_.data.weight),b=Math.min(...y),w=Math.max(...y);console.log("max",w,"min",b);const x=p().domain([b,w]).range([.2,2]);if(h.current.style().selector("edge").style({width:_=>x(_.data("weight")),opacity:.8}).update(),s){const _=Math.sqrt(b*w),S=n4(`#${s}`);S.selectAll("*").remove();const A="legendSizeLine";S.append("g").attr("class",A).attr("transform","translate(7, 10)").attr("font-size","0.85em");const C=M=>parseFloat(M.toPrecision(1)).toLocaleString(),D=NJ().shape("line").cells([b,_,w]).labels([C(b),C(_),C(w)]).scale(x);S.select(`.${A}`).call(D).selectAll("line").attr("stroke","gray")}},[r,d,t,s]),Ee.useEffect(()=>{if(!h.current)return;const p=a?IJ(d,a):void 0;h.current.style().selector("node").style({width:y=>p?p(y.data(a)):20,height:y=>p?p(y.data(a)):20}).update()},[a,d,t,o]),Ee.useEffect(()=>{if(!h.current)return;const p=n?zJ(d,n):void 0;if(h.current.style().selector("node").style({"background-color":y=>p?p(y.data(n)):SN(.5)}).update(),i&&n){const y=n4(`#${i}`);y.selectAll("*").remove();const b=AB(n)?"legendOrdinal":"legendQuant";y.append("g").attr("class",b).attr("transform","translate(8, 10)").attr("font-size","0.85em");const w=LJ().shapeRadius(7).shape("circle").scale(p);y.select(`.${b}`).call(w)}},[n,d,t,i]),Ee.useEffect(()=>{h.current&&h.current.style().selector("node").style({label:p=>e?$J(p.data("id")):"","font-size":5}).update()},[e]),Ee.useEffect(()=>{if(!h.current)return;const p=typeof t=="string"?{name:t}:t;h.current.layout(p).run(),h.current.fit()},[t]);let g=Ve.jsx(Ve.Fragment,{});if(l){const p=l.renderedPosition();g=Ve.jsxs("div",{id:"popOver",style:{borderRadius:"4px",border:"1px solid lightgray",width:"175px",height:"250px",position:"absolute",top:p.y,left:p.x,zIndex:10,backgroundColor:"white",padding:"1em",fontSize:"0.8em",overflowWrap:"break-word",background:"rgba(255, 255, 255, 0.95)"},children:[Ve.jsx("strong",{style:{marginBottom:"0.4em",display:"block"},children:Ve.jsx("a",{href:FJ(l),target:"_blank",rel:"noreferrer",children:RB(l.data("id"))})}),Ve.jsx("strong",{children:"Type:"})," ",l.data("type"),Ve.jsx("br",{}),Ve.jsx("strong",{children:"Storage:"})," ",HJ(l.data("used_storage")),Ve.jsx("br",{}),Ve.jsx("strong",{children:"Downloads:"})," ",l.data("downloads_all_time").toLocaleString(),Ve.jsx("br",{}),Ve.jsx("strong",{children:"Likes:"})," ",l.data("likes").toLocaleString(),Ve.jsx("br",{}),Ve.jsx("strong",{children:"Trending:"})," ",l.data("trending_score").toLocaleString(),Ve.jsx("br",{}),Ve.jsx("strong",{children:"Library:"})," ",l.data("library_name"),Ve.jsx("br",{}),Ve.jsx("strong",{children:"Pipeline:"})," ",l.data("pipeline_tag"),Ve.jsx("br",{})]})}return Ve.jsxs("div",{style:{position:"relative"},children:[g,Ve.jsx("div",{id:"cy",style:{width:"100%",height:"800px"}})]})}function $J(t){return t.replace(/(.*?\/){2}/,"")}function RB(t){return t.replace(/(.*?\/){1}/,"")}function FJ(t){const e=t.data("id");return`https://huggingface.co/${t.data("type")==="model"?RB(e):e}`}function HJ(t){if(t===0)return"0 Bytes";const e=["Bytes","KB","MB","GB","TB"],r=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,r)).toFixed(2))+" "+e[r]}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 UJ(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 MB(t){var e=UJ(t,"string");return Ro(e)=="symbol"?e:e+""}function Sl(t,e,r){return(e=MB(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function I4(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 Xe(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=Array(e);r0?Cr(is,--Qr):0,Gu--,tr===10&&(Gu=1,iv--),tr}function un(){return tr=Qr2||Ql(tr)>3?"":" "}function bee(t,e){for(;--e&&un()&&!(tr<48||tr>102||tr>57&&tr<65||tr>70&&tr<97););return _f(t,Td()+(e<6&&da()==32&&un()==32))}function o2(t){for(;un();)switch(tr){case t:return Qr;case 34:case 39:t!==34&&t!==39&&o2(tr);break;case 40:t===41&&o2(t);break;case 92:un();break}return Qr}function wee(t,e){for(;un()&&t+tr!==57;)if(t+tr===84&&da()===47)break;return"/*"+_f(e,Qr-1)+"*"+av(t===47?t:un())}function xee(t){for(;!Ql(da());)un();return _f(t,Qr)}function _ee(t){return PB(Ad("",null,null,null,[""],t=qB(t),0,[0],t))}function Ad(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,_=0,S="",A=a,C=i,D=n,M=S;w;)switch(y=_,_=un()){case 40:if(y!=108&&Cr(M,h-1)==58){i2(M+=gt(Cd(_),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:M+=Cd(_);break;case 9:case 10:case 13:case 32:M+=yee(y);break;case 92:M+=bee(Td()-1,7);continue;case 47:switch(da()){case 42:case 47:rd(Eee(wee(un(),Td()),e,r),l);break;default:M+="/"}break;case 123*b:s[f++]=na(M)*x;case 125*b:case 59:case 0:switch(_){case 0:case 125:w=0;case 59+d:x==-1&&(M=gt(M,/\f/g,"")),p>0&&na(M)-h&&rd(p>32?F4(M+";",n,r,h-1):F4(gt(M," ","")+";",n,r,h-2),l);break;case 59:M+=";";default:if(rd(D=$4(M,e,r,f,d,a,s,S,A=[],C=[],h),i),_===123)if(d===0)Ad(M,e,D,D,A,i,h,s,C);else switch(g===99&&Cr(M,3)===110?100:g){case 100:case 108:case 109:case 115:Ad(t,D,D,n&&rd($4(t,D,D,0,0,a,s,S,a,A=[],h),C),a,C,h,s,n?A:C);break;default:Ad(M,D,D,D,[""],C,0,s,C)}}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(_==123)--b;else if(_==125&&b++==0&&mee()==125)continue}switch(M+=av(_),_*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+=Cd(un())),g=da(),d=h=na(S=M+=xee(Td())),_++;break;case 45:y===45&&na(M)==2&&(b=0)}}return i}function $4(t,e,r,n,a,i,o,s,l,f,d){for(var h=a-1,g=a===0?i:[""],p=N_(g),y=0,b=0,w=0;y0?g[x]+" "+_:gt(_,/&\f/g,g[x])))&&(l[w++]=S);return ov(t,e,r,a===0?k_:s,l,f,d)}function Eee(t,e,r){return ov(t,e,r,kB,av(pee()),Zl(t,2,-2),0)}function F4(t,e,r,n){return ov(t,e,r,L_,Zl(t,0,n),Zl(t,n+1,-1),n)}function qu(t,e){for(var r="",n=N_(t),a=0;a6)switch(Cr(t,e+1)){case 109:if(Cr(t,e+4)!==45)break;case 102:return gt(t,/(.+:)(.+)-([^]+)/,"$1"+vt+"$2-$3$1"+oh+(Cr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~i2(t,"stretch")?zB(gt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Cr(t,e+1)!==115)break;case 6444:switch(Cr(t,na(t)-3-(~i2(t,"!important")&&10))){case 107:return gt(t,":",":"+vt)+t;case 101:return gt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+vt+(Cr(t,14)===45?"inline-":"")+"box$3$1"+vt+"$2$3$1"+Nr+"$2box$3")+t}break;case 5936:switch(Cr(t,e+11)){case 114:return vt+t+Nr+gt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return vt+t+Nr+gt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return vt+t+Nr+gt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return vt+t+Nr+t+t}return t}var Lee=function(e,r,n,a){if(e.length>-1&&!e.return)switch(e.type){case L_:e.return=zB(e.value,e.length);break;case LB:return qu([hl(e,{value:gt(e.value,"@","@"+vt)})],a);case k_:if(e.length)return gee(e.props,function(i){switch(vee(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+)/,":"+vt+"input-$1")]}),hl(e,{props:[gt(i,/:(plac\w+)/,":"+oh+"$1")]}),hl(e,{props:[gt(i,/:(plac\w+)/,Nr+"input-$1")]})],a)}return""})}},Nee=[Lee],Bee=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||Nee,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 Hee={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},Uee=/[A-Z]|^ms/g,Gee=/_EMO_([^_]+?)_([^]*?)_EMO_/g,VB=function(e){return e.charCodeAt(1)===45},X4=function(e){return e!=null&&typeof e!="boolean"},yx=Aee(function(t){return VB(t)?t:t.replace(Uee,"-$&").toLowerCase()}),K4=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(Gee,function(n,a,i){return aa={name:a,styles:i,next:aa},a})}return Hee[e]!==1&&!VB(e)&&typeof r=="number"&&r!==0?r+"px":r};function Wl(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 Yee(t,e,r)}case"function":{if(t!==void 0){var l=aa,f=r(t);return aa=l,Wl(t,e,f)}break}}var d=r;return d}function Yee(t,e,r){var n="";if(Array.isArray(r))for(var a=0;a({x:t,y:t});function ute(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 HB(t){return GB(t)?(t.nodeName||"").toLowerCase():"#document"}function Ya(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function UB(t){var e;return(e=(GB(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function GB(t){return uv()?t instanceof Node||t instanceof Ya(t).Node:!1}function ste(t){return uv()?t instanceof Element||t instanceof Ya(t).Element:!1}function P_(t){return uv()?t instanceof HTMLElement||t instanceof Ya(t).HTMLElement:!1}function Z4(t){return!uv()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ya(t).ShadowRoot}function YB(t){const{overflow:e,overflowX:r,overflowY:n,display:a}=z_(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!["inline","contents"].includes(a)}function lte(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function fte(t){return["html","body","#document"].includes(HB(t))}function z_(t){return Ya(t).getComputedStyle(t)}function cte(t){if(HB(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Z4(t)&&t.host||UB(t);return Z4(e)?e.host:e}function XB(t){const e=cte(t);return fte(e)?t.ownerDocument?t.ownerDocument.body:t.body:P_(e)&&YB(e)?e:XB(e)}function lh(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const a=XB(t),i=a===((n=t.ownerDocument)==null?void 0:n.body),o=Ya(a);if(i){const s=s2(o);return e.concat(o,o.visualViewport||[],YB(a)?a:[],s&&r?lh(s):[])}return e.concat(a,lh(a,[],r))}function s2(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function dte(t){const e=z_(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const a=P_(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 I_(t){return ste(t)?t:t.contextElement}function Q4(t){const e=I_(t);if(!P_(e))return sh(1);const r=e.getBoundingClientRect(),{width:n,height:a,$:i}=dte(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 hte=sh(0);function vte(t){const e=Ya(t);return!lte()||!e.visualViewport?hte:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function gte(t,e,r){return!1}function W4(t,e,r,n){e===void 0&&(e=!1);const a=t.getBoundingClientRect(),i=I_(t);let o=sh(1);e&&(o=Q4(t));const s=gte()?vte(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=s2(y);for(;b&&n&&p!==y;){const w=Q4(b),x=b.getBoundingClientRect(),_=z_(b),S=x.left+(b.clientLeft+parseFloat(_.paddingLeft))*w.x,A=x.top+(b.clientTop+parseFloat(_.paddingTop))*w.y;l*=w.x,f*=w.y,d*=w.x,h*=w.y,l+=S,f+=A,y=Ya(b),b=s2(y)}}return ute({width:d,height:h,x:l,y:f})}function KB(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function pte(t,e){let r=null,n;const a=UB(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=nd(h),b=nd(a.clientWidth-(d+g)),w=nd(a.clientHeight-(h+p)),x=nd(d),S={rootMargin:-y+"px "+-b+"px "+-w+"px "+-x+"px",threshold:ote(0,ite(1,l))||1};let A=!0;function C(D){const M=D[0].intersectionRatio;if(M!==l){if(!A)return o();M?o(!1,M):n=setTimeout(()=>{o(!1,1e-7)},1e3)}M===1&&!KB(f,t.getBoundingClientRect())&&o(),A=!1}try{r=new IntersectionObserver(C,{...S,root:a.ownerDocument})}catch{r=new IntersectionObserver(C,S)}r.observe(t)}return o(!0),i}function mte(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=I_(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?pte(f,r):null;let g=-1,p=null;o&&(p=new ResizeObserver(x=>{let[_]=x;_&&_.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?W4(t):null;l&&w();function w(){const x=W4(t);b&&!KB(b,x)&&r(),b=x,y=requestAnimationFrame(w)}return r(),()=>{var x;d.forEach(_=>{a&&_.removeEventListener("scroll",r),i&&_.removeEventListener("resize",r)}),h==null||h(),(x=p)==null||x.disconnect(),p=null,l&&cancelAnimationFrame(y)}}var l2=Ee.useLayoutEffect,yte=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],fh=function(){};function bte(t,e){return e?e[0]==="-"?t+e:t+"__"+e:t}function wte(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),a=2;a-1}function xte(t){return sv(t)?window.innerHeight:t.clientHeight}function ZB(t){return sv(t)?window.pageYOffset:t.scrollTop}function ch(t,e){if(sv(t)){window.scrollTo(0,e);return}t.scrollTop=e}function _te(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 Ete(t,e,r,n){return r*((t=t/n-1)*t*t+1)+e}function ad(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=ZB(t),i=e-a,o=10,s=0;function l(){s+=o;var f=Ete(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&&ad(l,N,B),{placement:"bottom",maxHeight:e};if(!o&&O>=n||o&&M>=n){i&&ad(l,N,B);var k=o?M-A:O-A;return{placement:"bottom",maxHeight:k}}if(a==="auto"||o){var q=e,V=o?D:R;return V>=n&&(q=Math.min(V-A-s,e)),{placement:"top",maxHeight:q}}if(a==="bottom")return i&&ch(l,N),{placement:"bottom",maxHeight:e};break;case"top":if(D>=y)return{placement:"top",maxHeight:e};if(R>=y&&!o)return i&&ad(l,L,B),{placement:"top",maxHeight:e};if(!o&&R>=n||o&&D>=n){var P=e;return(!o&&R>=n||o&&D>=n)&&(P=o?D-C:R-C),i&&ad(l,L,B),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(a,'".'))}return f}function Nte(t){var e={bottom:"top",top:"bottom"};return t?e[t]:"bottom"}var WB=function(e){return e==="auto"?"bottom":e},Bte=function(e,r){var n,a=e.placement,i=e.theme,o=i.borderRadius,s=i.spacing,l=i.colors;return Xe((n={label:"menu"},Sl(n,Nte(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),qte=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),_=x[0],S=x[1],A=l.spacing.controlHeight;return l2(function(){var C=h.current;if(C){var D=o==="fixed",M=s&&!D,R=Lte({maxHeight:a,menuEl:C,minHeight:n,placement:i,shouldScroll:M,isFixedPosition:D,controlHeight:A});b(R.maxHeight),S(R.placement),d==null||d(R.placement)}},[a,i,o,s,n,d,A]),r({ref:h,placerProps:Xe(Xe({},e),{},{placement:_||WB(i),maxHeight:y})})},Pte=function(e){var r=e.children,n=e.innerRef,a=e.innerProps;return Ue("div",Ze({},Ft(e,"menu",{menu:!0}),{ref:n},a),r)},zte=Pte,Ite=function(e,r){var n=e.maxHeight,a=e.theme.spacing.baseUnit;return Xe({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},r?{}:{paddingBottom:a,paddingTop:a})},Vte=function(e){var r=e.children,n=e.innerProps,a=e.innerRef,i=e.isMulti;return Ue("div",Ze({},Ft(e,"menuList",{"menu-list":!0,"menu-list--is-multi":i}),{ref:a},n),r)},eq=function(e,r){var n=e.theme,a=n.spacing.baseUnit,i=n.colors;return Xe({textAlign:"center"},r?{}:{color:i.neutral40,padding:"".concat(a*2,"px ").concat(a*3,"px")})},$te=eq,Fte=eq,Hte=function(e){var r=e.children,n=r===void 0?"No options":r,a=e.innerProps,i=Qa(e,Dte);return Ue("div",Ze({},Ft(Xe(Xe({},i),{},{children:n,innerProps:a}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),a),n)},Ute=function(e){var r=e.children,n=r===void 0?"Loading...":r,a=e.innerProps,i=Qa(e,kte);return Ue("div",Ze({},Ft(Xe(Xe({},i),{},{children:n,innerProps:a}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),a),n)},Gte=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}},Yte=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(WB(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],_=w[1],S=Ee.useCallback(function(){if(a){var M=Ste(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))&&_({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]);l2(function(){S()},[S]);var A=Ee.useCallback(function(){typeof f.current=="function"&&(f.current(),f.current=null),a&&l.current&&(f.current=mte(a,l.current,S,{elementResize:"ResizeObserver"in window}))},[a,S]);l2(function(){A()},[A]);var C=Ee.useCallback(function(M){l.current=M,A()},[A]);if(!r&&s!=="fixed"||!x)return null;var D=Ue("div",Ze({ref:C},Ft(Xe(Xe({},e),{},{offset:x.offset,position:s,rect:x.rect}),"menuPortal",{"menu-portal":!0}),i),n);return Ue(JB.Provider,{value:y},r?ate.createPortal(D,r):D)},Xte=function(e){var r=e.isDisabled,n=e.isRtl;return{label:"container",direction:n?"rtl":void 0,pointerEvents:r?"none":void 0,position:"relative"}},Kte=function(e){var r=e.children,n=e.innerProps,a=e.isDisabled,i=e.isRtl;return Ue("div",Ze({},Ft(e,"container",{"--is-disabled":a,"--is-rtl":i}),n),r)},jte=function(e,r){var n=e.theme.spacing,a=e.isMulti,i=e.hasValue,o=e.selectProps.controlShouldRenderValue;return Xe({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")})},Zte=function(e){var r=e.children,n=e.innerProps,a=e.isMulti,i=e.hasValue;return Ue("div",Ze({},Ft(e,"valueContainer",{"value-container":!0,"value-container--is-multi":a,"value-container--has-value":i}),n),r)},Qte=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Wte=function(e){var r=e.children,n=e.innerProps;return Ue("div",Ze({},Ft(e,"indicatorsContainer",{indicators:!0}),n),r)},rL,Jte=["size"],ere=["innerProps","isRtl","size"],tre={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},tq=function(e){var r=e.size,n=Qa(e,Jte);return Ue("svg",Ze({height:r,width:r,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:tre},n))},V_=function(e){return Ue(tq,Ze({size:20},e),Ue("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"}))},rq=function(e){return Ue(tq,Ze({size:20},e),Ue("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"}))},nq=function(e,r){var n=e.isFocused,a=e.theme,i=a.spacing.baseUnit,o=a.colors;return Xe({label:"indicatorContainer",display:"flex",transition:"color 150ms"},r?{}:{color:n?o.neutral60:o.neutral20,padding:i*2,":hover":{color:n?o.neutral80:o.neutral40}})},rre=nq,nre=function(e){var r=e.children,n=e.innerProps;return Ue("div",Ze({},Ft(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),r||Ue(rq,null))},are=nq,ire=function(e){var r=e.children,n=e.innerProps;return Ue("div",Ze({},Ft(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),r||Ue(V_,null))},ore=function(e,r){var n=e.isDisabled,a=e.theme,i=a.spacing.baseUnit,o=a.colors;return Xe({label:"indicatorSeparator",alignSelf:"stretch",width:1},r?{}:{backgroundColor:n?o.neutral10:o.neutral20,marginBottom:i*2,marginTop:i*2})},ure=function(e){var r=e.innerProps;return Ue("span",Ze({},r,Ft(e,"indicatorSeparator",{"indicator-separator":!0})))},sre=rte(rL||(rL=nte([` 0%, 80%, 100% { opacity: 0; } 40% { opacity: 1; } `]))),lre=function(e,r){var n=e.isFocused,a=e.size,i=e.theme,o=i.colors,s=i.spacing.baseUnit;return Xe({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 Ue("span",{css:q_({animation:"".concat(sre," 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"},"","")})},fre=function(e){var r=e.innerProps,n=e.isRtl,a=e.size,i=a===void 0?4:a,o=Qa(e,ere);return Ue("div",Ze({},Ft(Xe(Xe({},o),{},{innerProps:r,isRtl:n,size:i}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),r),Ue(bx,{delay:0,offset:n}),Ue(bx,{delay:160,offset:!0}),Ue(bx,{delay:320,offset:!n}))},cre=function(e,r){var n=e.isDisabled,a=e.isFocused,i=e.theme,o=i.colors,s=i.borderRadius,l=i.spacing;return Xe({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}})},dre=function(e){var r=e.children,n=e.isDisabled,a=e.isFocused,i=e.innerRef,o=e.innerProps,s=e.menuIsOpen;return Ue("div",Ze({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)},hre=dre,vre=["data"],gre=function(e,r){var n=e.theme.spacing;return r?{}:{paddingBottom:n.baseUnit*2,paddingTop:n.baseUnit*2}},pre=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 Ue("div",Ze({},Ft(e,"group",{group:!0}),l),Ue(o,Ze({},s,{selectProps:h,theme:d,getStyles:a,getClassNames:i,cx:n}),f),Ue("div",null,r))},mre=function(e,r){var n=e.theme,a=n.colors,i=n.spacing;return Xe({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"})},yre=function(e){var r=jB(e);r.data;var n=Qa(r,vre);return Ue("div",Ze({},Ft(e,"groupHeading",{"group-heading":!0}),n))},bre=pre,wre=["innerRef","isDisabled","isHidden","inputClassName"],xre=function(e,r){var n=e.isDisabled,a=e.value,i=e.theme,o=i.spacing,s=i.colors;return Xe(Xe({visibility:n?"hidden":"visible",transform:a?"translateZ(0)":""},_re),r?{}:{margin:o.baseUnit/2,paddingBottom:o.baseUnit/2,paddingTop:o.baseUnit/2,color:s.neutral80})},aq={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},_re={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Xe({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},aq)},Ere=function(e){return Xe({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},aq)},Sre=function(e){var r=e.cx,n=e.value,a=jB(e),i=a.innerRef,o=a.isDisabled,s=a.isHidden,l=a.inputClassName,f=Qa(a,wre);return Ue("div",Ze({},Ft(e,"input",{"input-container":!0}),{"data-value":n||""}),Ue("input",Ze({className:r({input:!0},l),ref:i,style:Ere(s),disabled:o},f)))},Tre=Sre,Cre=function(e,r){var n=e.theme,a=n.spacing,i=n.borderRadius,o=n.colors;return Xe({label:"multiValue",display:"flex",minWidth:0},r?{}:{backgroundColor:o.neutral10,borderRadius:i/2,margin:a.baseUnit/2})},Are=function(e,r){var n=e.theme,a=n.borderRadius,i=n.colors,o=e.cropWithEllipsis;return Xe({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})},Rre=function(e,r){var n=e.theme,a=n.spacing,i=n.borderRadius,o=n.colors,s=e.isFocused;return Xe({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}})},iq=function(e){var r=e.children,n=e.innerProps;return Ue("div",n,r)},Mre=iq,Ore=iq;function Dre(t){var e=t.children,r=t.innerProps;return Ue("div",Ze({role:"button"},r),e||Ue(V_,{size:14}))}var kre=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 Ue(f,{data:a,innerProps:Xe(Xe({},Ft(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":o})),i),selectProps:l},Ue(d,{data:a,innerProps:Xe({},Ft(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},r),Ue(h,{data:a,innerProps:Xe(Xe({},Ft(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(r||"option")},s),selectProps:l}))},Lre=kre,Nre=function(e,r){var n=e.isDisabled,a=e.isFocused,i=e.isSelected,o=e.theme,s=o.spacing,l=o.colors;return Xe({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}})},Bre=function(e){var r=e.children,n=e.isDisabled,a=e.isFocused,i=e.isSelected,o=e.innerRef,s=e.innerProps;return Ue("div",Ze({},Ft(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":a,"option--is-selected":i}),{ref:o,"aria-disabled":n},s),r)},qre=Bre,Pre=function(e,r){var n=e.theme,a=n.spacing,i=n.colors;return Xe({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},r?{}:{color:i.neutral50,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2})},zre=function(e){var r=e.children,n=e.innerProps;return Ue("div",Ze({},Ft(e,"placeholder",{placeholder:!0}),n),r)},Ire=zre,Vre=function(e,r){var n=e.isDisabled,a=e.theme,i=a.spacing,o=a.colors;return Xe({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})},$re=function(e){var r=e.children,n=e.isDisabled,a=e.innerProps;return Ue("div",Ze({},Ft(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),a),r)},Fre=$re,Hre={ClearIndicator:ire,Control:hre,DropdownIndicator:nre,DownChevron:rq,CrossIcon:V_,Group:bre,GroupHeading:yre,IndicatorsContainer:Wte,IndicatorSeparator:ure,Input:Tre,LoadingIndicator:fre,Menu:zte,MenuList:Vte,MenuPortal:Yte,LoadingMessage:Ute,NoOptionsMessage:Hte,MultiValue:Lre,MultiValueContainer:Mre,MultiValueLabel:Ore,MultiValueRemove:Dre,Option:qre,Placeholder:Ire,SelectContainer:Kte,SingleValue:Fre,ValueContainer:Zte},Ure=function(e){return Xe(Xe({},Hre),e.components)},nL=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function Gre(t,e){return!!(t===e||nL(t)&&nL(e))}function Yre(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:"",".")}},Qre=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,_=l.options,S=l.screenReaderStatus,A=l.tabSelectsValue,C=l.isLoading,D=l["aria-label"],M=l["aria-live"],R=Ee.useMemo(function(){return Xe(Xe({},Zre),h||{})},[h]),O=Ee.useMemo(function(){var V="";if(r&&R.onChange){var P=r.option,$=r.options,F=r.removedValue,G=r.removedValues,z=r.value,H=function(ne){return Array.isArray(ne)?null:ne},j=F||P||H(z),J=j?g(j):"",U=$||G||void 0,K=U?U.map(g):[],Z=Xe({isDisabled:j&&b(j,s),label:J,labels:K},r);V=R.onChange(Z)}return V},[r,R,b,s,g]),N=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]),L=Ee.useMemo(function(){var V="";if(x&&_.length&&!C&&R.onFilter){var P=S({count:i.length});V=R.onFilter({inputValue:p,resultsMessage:P})}return V},[i,p,x,R,_,S,C]),B=(r==null?void 0:r.action)==="initial-input-focus",k=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:A,isInitialFocus:B})}return V},[D,n,a,y,b,w,x,R,s,A,B]),q=Ue(Ee.Fragment,null,Ue("span",{id:"aria-selection"},O),Ue("span",{id:"aria-focused"},N),Ue("span",{id:"aria-results"},L),Ue("span",{id:"aria-guidance"},k));return Ue(Ee.Fragment,null,Ue(aL,{id:f},B&&q),Ue(aL,{"aria-live":M,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},o&&!B&&q))},Wre=Qre,f2=[{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źẑżžẓẕƶȥɀⱬꝣ"}],Jre=new RegExp("["+f2.map(function(t){return t.letters}).join("")+"]","g"),oq={};for(var wx=0;wx-1}},nne=["innerRef"];function ane(t){var e=t.innerRef,r=Qa(t,nne),n=Ote(r,"onExited","in","enter","exit","appear");return Ue("input",Ze({ref:e},n,{css:q_({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 ine=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};function one(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 _=f.current,S=_.scrollTop,A=_.scrollHeight,C=_.clientHeight,D=f.current,M=x>0,R=A-C-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=A,O=!0,o.current=!0):!M&&-x>S&&(a&&!s.current&&a(w),D.scrollTop=0,O=!0,s.current=!0),O&&ine(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=Ate?{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 oL=["boxSizing","height","overflow","paddingRight","position"],uL={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function sL(t){t.cancelable&&t.preventDefault()}function lL(t){t.stopPropagation()}function fL(){var t=this.scrollTop,e=this.scrollHeight,r=t+this.offsetHeight;t===0?this.scrollTop=1:r===e&&(this.scrollTop=t-1)}function cL(){return"ontouchstart"in window||navigator.maxTouchPoints}var dL=!!(typeof window<"u"&&window.document&&window.document.createElement),vl=0,Eu={capture:!1,passive:!1};function une(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(dL){var f=document.body,d=f&&f.style;if(n&&oL.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(uL).forEach(function(y){var b=uL[y];d&&(d[y]=b)}),d&&(d.paddingRight="".concat(p,"px"))}f&&cL()&&(f.addEventListener("touchmove",sL,Eu),l&&(l.addEventListener("touchstart",fL,Eu),l.addEventListener("touchmove",lL,Eu))),vl+=1}},[n]),s=Ee.useCallback(function(l){if(dL){var f=document.body,d=f&&f.style;vl=Math.max(vl-1,0),n&&vl<1&&oL.forEach(function(h){var g=a.current[h];d&&(d[h]=g)}),f&&cL()&&(f.removeEventListener("touchmove",sL,Eu),l&&(l.removeEventListener("touchstart",fL,Eu),l.removeEventListener("touchmove",lL,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 sne=function(e){var r=e.target;return r.ownerDocument.activeElement&&r.ownerDocument.activeElement.blur()},lne={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function fne(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=one({isEnabled:a,onBottomArrive:i,onBottomLeave:o,onTopArrive:s,onTopLeave:l}),d=une({isEnabled:r}),h=function(p){f(p),d(p)};return Ue(Ee.Fragment,null,r&&Ue("div",{onClick:sne,css:lne}),e(h))}var cne={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},dne=function(e){var r=e.name,n=e.onFocus;return Ue("input",{required:!0,name:r,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:cne,value:"",onChange:function(){}})},hne=dne;function $_(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 vne(){return $_(/^iPhone/i)}function sq(){return $_(/^Mac/i)}function gne(){return $_(/^iPad/i)||sq()&&navigator.maxTouchPoints>1}function pne(){return vne()||gne()}function mne(){return sq()||pne()}var yne=function(e){return e.label},bne=function(e){return e.label},wne=function(e){return e.value},xne=function(e){return!!e.isDisabled},_ne={clearIndicator:are,container:Xte,control:cre,dropdownIndicator:rre,group:gre,groupHeading:mre,indicatorsContainer:Qte,indicatorSeparator:ore,input:xre,loadingIndicator:lre,loadingMessage:Fte,menu:Bte,menuList:Ite,menuPortal:Gte,multiValue:Cre,multiValueLabel:Are,multiValueRemove:Rre,noOptionsMessage:$te,option:Nre,placeholder:Pre,singleValue:Vre,valueContainer:jte},Ene={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%)"},Sne=4,lq=4,Tne=38,Cne=lq*2,Ane={baseUnit:lq,controlHeight:Tne,menuGutter:Cne},Ex={borderRadius:Sne,colors:Ene,spacing:Ane},Rne={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:tL(),captureMenuScroll:!tL(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:rne(),formatGroupLabel:yne,getOptionLabel:bne,getOptionValue:wne,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:xne,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!Tte(),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 hL(t,e,r,n){var a=dq(t,e,r),i=hq(t,e,r),o=cq(t,e),s=dh(t,e);return{type:"option",data:e,isDisabled:a,isSelected:i,label:o,value:s,index:n}}function Rd(t,e){return t.options.map(function(r,n){if("options"in r){var a=r.options.map(function(o,s){return hL(t,o,e,s)}).filter(function(o){return gL(t,o)});return a.length>0?{type:"group",data:r,options:a,index:n}:void 0}var i=hL(t,r,e,n);return gL(t,i)?i:void 0}).filter(Rte)}function fq(t){return t.reduce(function(e,r){return r.type==="group"?e.push.apply(e,D_(r.options.map(function(n){return n.data}))):e.push(r.data),e},[])}function vL(t,e){return t.reduce(function(r,n){return n.type==="group"?r.push.apply(r,D_(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 Mne(t,e){return fq(Rd(t,e))}function gL(t,e){var r=t.inputValue,n=r===void 0?"":r,a=e.data,i=e.isSelected,o=e.label,s=e.value;return(!gq(t)||!i)&&vq(t,{label:o,value:s,data:a},n)}function One(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},cq=function(e,r){return e.getOptionLabel(r)},dh=function(e,r){return e.getOptionValue(r)};function dq(t,e,r){return typeof t.isOptionDisabled=="function"?t.isOptionDisabled(e,r):!1}function hq(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 vq(t,e,r){return t.filterOption?t.filterOption(e,r):!0}var gq=function(e){var r=e.hideSelectedOptions,n=e.isMulti;return r===void 0?n:r},kne=1,pq=function(t){JJ(r,t);var e=ree(r);function r(n){var a;if(QJ(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=mne(),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(D_(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=od(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(od(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=od(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 vL(Rd(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 gq(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,_=f.tabSelectsValue,S=f.openMenuOnFocus,A=a.state,C=A.focusedOption,D=A.focusedValue,M=A.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||!_||!C||S&&a.isOptionSelected(C,M))return;a.selectOption(C);break;case"Enter":if(l.keyCode===229)break;if(w){if(!C||a.isComposing)return;a.selectOption(C);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(!C)return;a.selectOption(C);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||++kne),a.state.selectValue=J4(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 WJ(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&&eL(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&&(eL(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):Xe(Xe({},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 dq(this.props,a,i)}},{key:"isOptionSelected",value:function(a,i){return hq(this.props,a,i)}},{key:"filterOption",value:function(a,i){return vq(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,_=this.commonProps,S=s||this.getElementId("input"),A=Xe(Xe(Xe({"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,Ze({},_,{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},A)):Ee.createElement(ane,Ze({id:S,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:fh,onFocus:this.onInputFocus,disabled:i,tabIndex:f,inputMode:"none",form:d,value:""},A))}},{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,_=p.placeholder,S=this.state,A=S.selectValue,C=S.focusedValue,D=S.isFocused;if(!this.hasValue()||!y)return x?null:Ee.createElement(h,Ze({},g,{key:"placeholder",isDisabled:b,isFocused:D,innerProps:{id:this.getElementId("placeholder")}}),_);if(w)return A.map(function(R,O){var N=R===C,L="".concat(a.getOptionLabel(R),"-").concat(a.getOptionValue(R));return Ee.createElement(o,Ze({},g,{components:{Container:s,Label:l,Remove:f},isFocused:N,isDisabled:b,key:L,index:O,removeProps:{onClick:function(){return a.removeValue(R)},onTouchEnd:function(){return a.removeValue(R)},onMouseDown:function(k){k.preventDefault()}},data:R}),a.formatOptionLabel(R,"value"))});if(x)return null;var M=A[0];return Ee.createElement(d,Ze({},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,Ze({},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,Ze({},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,Ze({},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,Ze({},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,_=w.inputValue,S=w.isLoading,A=w.loadingMessage,C=w.minMenuHeight,D=w.maxMenuHeight,M=w.menuIsOpen,R=w.menuPlacement,O=w.menuPosition,N=w.menuPortalTarget,L=w.menuShouldBlockScroll,B=w.menuShouldScrollIntoView,k=w.noOptionsMessage,q=w.onMenuScrollToTop,V=w.onMenuScrollToBottom;if(!M)return null;var P=function(J,U){var K=J.type,Z=J.data,re=J.isDisabled,ne=J.isSelected,ee=J.label,W=J.value,te=b===Z,ce=re?void 0:function(){return a.onOptionHover(Z)},de=re?void 0:function(){return a.selectOption(Z)},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,Ze({},y,{innerProps:we,data:Z,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(j){if(j.type==="group"){var J=j.data,U=j.options,K=j.index,Z="".concat(a.getElementId("group"),"-").concat(K),re="".concat(Z,"-heading");return Ee.createElement(o,Ze({},y,{key:Z,data:J,options:U,Heading:s,headingProps:{id:re,data:j.data},label:a.formatGroupLabel(j.data)}),j.options.map(function(ne){return P(ne,"".concat(K,"-").concat(ne.index))}))}else if(j.type==="option")return P(j,"".concat(j.index))});else if(S){var F=A({inputValue:_});if(F===null)return null;$=Ee.createElement(h,y,F)}else{var G=k({inputValue:_});if(G===null)return null;$=Ee.createElement(g,y,G)}var z={minMenuHeight:C,maxMenuHeight:D,menuPlacement:R,menuPosition:O,menuShouldScrollIntoView:B},H=Ee.createElement(qte,Ze({},y,z),function(j){var J=j.ref,U=j.placerProps,K=U.placement,Z=U.maxHeight;return Ee.createElement(l,Ze({},y,z,{innerRef:J,innerProps:{onMouseDown:a.onMenuMouseDown,onMouseMove:a.onMenuMouseMove},isLoading:S,placement:K}),Ee.createElement(fne,{captureEnabled:x,onTopArrive:q,onBottomArrive:V,lockEnabled:L},function(re){return Ee.createElement(f,Ze({},y,{innerRef:function(ee){a.getMenuListRef(ee),re(ee)},innerProps:{role:"listbox","aria-multiselectable":y.isMulti,id:a.getElementId("listbox")},isLoading:S,maxHeight:Z,focusedOption:b}),$)}))});return N||O==="fixed"?Ee.createElement(d,Ze({},y,{appendTo:N,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(hne,{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(Wre,Ze({},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,Ze({},b,{className:d,innerProps:{id:h,onKeyDown:this.onKeyDown},isDisabled:g,isFocused:y}),this.renderLiveRegion(),Ee.createElement(i,Ze({},b,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:g,isFocused:y,menuIsOpen:p}),Ee.createElement(l,Ze({},b,{isDisabled:g}),this.renderPlaceholderOrValue(),this.renderInput()),Ee.createElement(o,Ze({},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,_=J4(y),S={};if(o&&(y!==o.value||p!==o.options||b!==o.menuIsOpen||w!==o.inputValue)){var A=b?Mne(a,_):[],C=b?vL(Rd(a,_),"".concat(g,"-option")):[],D=s?One(i,_):null,M=Dne(i,A),R=Sx(C,M);S={selectValue:_,focusedOption:M,focusedOptionId:R,focusableOptionsWithIds:C,focusedValue:D,clearFocusValueOnUpdate:!1}}var O=l!=null&&a!==o?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},N=f,L=d&&h;return d&&!L&&(N={value:od(x,_,_[0]||null),options:_,action:"initial-input-focus"},L=!h),(f==null?void 0:f.action)==="initial-input-focus"&&(N=null),Xe(Xe(Xe({},S),O),{},{prevProps:a,ariaSelection:N,prevWasFocused:L})}}]),r}(Ee.Component);pq.defaultProps=Rne;var Lne=Ee.forwardRef(function(t,e){var r=ZJ(t);return Ee.createElement(pq,Ze({ref:e},r))}),pL=Lne;const c2=[{value:"",label:"None"},{value:"library_name",label:"Library Name"},{value:"pipeline_tag",label:"Pipeline Tag"},{value:"type",label:"Type"}],d2=[{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 Nne(t){for(const e of d2)if(e.value===t)return e.label;for(const e of c2)if(e.value===t)return e.label;return t}function Bne(){const[t,e]=Ee.useState("used_storage"),[r,n]=Ee.useState("library_name"),[a,i]=Ee.useState(!1),o=Ve.jsx(Ve.Fragment,{children:Ve.jsxs("div",{id:"controls",style:{display:"flex",flexDirection:"column",gap:"2em"},children:[Ve.jsxs("div",{style:{width:"200px"},children:[Ve.jsx("label",{htmlFor:"nodeSize",style:{fontWeight:"bold"},children:"Node Size"}),Ve.jsx(pL,{options:d2,name:"nodeSize",defaultValue:d2[4],onChange:s=>{e((s==null?void 0:s.value)===""||s==null?void 0:s.value)}})]}),Ve.jsxs("div",{style:{width:"200px"},children:[Ve.jsx("label",{htmlFor:"nodeColor",style:{fontWeight:"bold"},children:"Node Color"}),Ve.jsx(pL,{options:c2,name:"nodeColor",defaultValue:c2[1],onChange:s=>{n((s==null?void 0:s.value)===""||s==null?void 0:s.value)}})]}),Ve.jsxs("div",{children:[Ve.jsx("label",{htmlFor:"showLabels",style:{fontWeight:"bold"},children:"Show Labels"}),Ve.jsx("br",{}),Ve.jsxs("label",{className:"switch",children:[Ve.jsx("input",{type:"checkbox",name:"showLabels",onChange:s=>{console.log(s.target.checked),i(s.target.checked)}}),Ve.jsx("span",{className:"slider round"})]})]})]})});return Ve.jsx(Ve.Fragment,{children:Ve.jsx("div",{id:"content",style:{width:"100vw",height:"100vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:Ve.jsxs("div",{id:"inner",style:{width:"100vw",height:"100vh",display:"flex",flexDirection:"row"},children:[Ve.jsxs("div",{style:{borderTop:"1px solid #ccc",borderBottom:"1px solid #ccc",padding:"0.5em 2em"},children:[Ve.jsx("h3",{children:"Xet Repository Graph"}),o,Ve.jsxs("div",{children:[Ve.jsxs("div",{children:[Ve.jsx("p",{className:"controlLabel",children:"Edge Width*"}),Ve.jsx("p",{className:"controlCaption",children:"# of shared chunks"}),Ve.jsx("svg",{id:"edgeLegend",width:"200px",height:"55px"}),Ve.jsx("p",{className:"controlCaption",style:{fontSize:10},children:"*zoom factor is unnacounted for"})]}),r&&Ve.jsxs("div",{children:[Ve.jsx("p",{className:"controlLabel",children:"Color Legend"}),Ve.jsx("p",{className:"controlCaption",children:Nne(r)}),Ve.jsx("svg",{id:"colorLegend",width:"200px",height:"400px"})]})]})]}),Ve.jsx("div",{id:"cyContainer",style:{flexGrow:1,borderLeft:"1px solid #ccc"},children:Ve.jsx(VJ,{colorLegendId:"colorLegend",edgeLegendId:"edgeLegend",sizeLegendId:"sizeLegend",layout:"cose",label:a,edgeScale:"log",nodeColor:r,nodeSize:t})})]})})})}L9.createRoot(document.getElementById("root")).render(Ve.jsx(Ee.StrictMode,{children:Ve.jsx(Bne,{})}));