@nuxt/devtools 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/module-main.mjs +53 -1
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/__inspecting/index.html +2 -2
- package/dist/client/_nuxt/Badge.4f16da14.js +1 -0
- package/dist/client/_nuxt/{FilepathItem.vue.70457130.js → FilepathItem.vue.235fa07d.js} +1 -1
- package/dist/client/_nuxt/LaunchPage.vue.86f00e85.js +1 -0
- package/dist/client/_nuxt/NButton.vue.76dccbb9.js +100 -0
- package/dist/client/_nuxt/NCheckbox.vue.60126ccb.js +1 -0
- package/dist/client/_nuxt/NMarkdown.vue.abb154b8.js +1 -0
- package/dist/client/_nuxt/NSectionBlock.58837776.js +1 -0
- package/dist/client/_nuxt/NTextInput.vue.1fd15b74.js +1 -0
- package/dist/client/_nuxt/NuxtLogo.8111403f.js +1 -0
- package/dist/client/_nuxt/PanelLeftRight.vue.56b5906c.js +1 -0
- package/dist/client/_nuxt/StateEditor.vue.bdb7e5c8.js +1 -0
- package/dist/client/_nuxt/TabIcon.vue.30ae65eb.js +1 -0
- package/dist/client/_nuxt/{__inspecting.3eb70499.js → __inspecting.8819ade8.js} +1 -1
- package/dist/client/_nuxt/asyncData.103aad72.js +1 -0
- package/dist/client/_nuxt/client.9c41f495.js +1 -0
- package/dist/client/_nuxt/components.43dee80b.js +1 -0
- package/dist/client/_nuxt/{context.c1f50e17.js → context.55688cca.js} +1 -1
- package/dist/client/_nuxt/custom-_name_.8832be9d.js +1 -0
- package/dist/client/_nuxt/default.c29c3e74.js +1 -0
- package/dist/client/_nuxt/editor.66e59505.js +1 -0
- package/dist/client/_nuxt/entry.3a404c59.css +1 -0
- package/dist/client/_nuxt/entry.883bcfe6.js +11 -0
- package/dist/client/_nuxt/error-404.d027ece6.js +1 -0
- package/dist/client/_nuxt/error-500.8f6cefc5.js +1 -0
- package/dist/client/_nuxt/error-component.ee11a8ba.js +3 -0
- package/dist/client/_nuxt/hooks.427abdcd.js +1 -0
- package/dist/client/_nuxt/imports.2dc7174b.js +1 -0
- package/dist/client/_nuxt/index.0d6abd2a.js +1 -0
- package/dist/client/_nuxt/{StateEditor.vue.b4b0d299.js → json-editor-vue.a65019ca.js} +50 -50
- package/dist/client/_nuxt/layouts.4db8e1e6.js +1 -0
- package/dist/client/_nuxt/{middleware.671f87b6.js → middleware.c4f2a57b.js} +1 -1
- package/dist/client/_nuxt/modules.a2209d2d.js +1 -0
- package/dist/client/_nuxt/none.394b52e6.js +1 -0
- package/dist/client/_nuxt/nuxt-link.a34a1045.js +1 -0
- package/dist/client/_nuxt/overview.5053fd45.js +1 -0
- package/dist/client/_nuxt/pages.9a1a9ac3.js +1 -0
- package/dist/client/_nuxt/payload.ed4c5688.js +1 -0
- package/dist/client/_nuxt/plugins.95c9e3e6.js +1 -0
- package/dist/client/_nuxt/runtime-configs.7ebddf6f.js +1 -0
- package/dist/client/_nuxt/{server-routes.7c4496d9.js → server-routes.5337ffc6.js} +1 -1
- package/dist/client/_nuxt/state.1f523208.js +1 -0
- package/dist/client/_nuxt/storage.4459d7bf.js +1 -0
- package/dist/client/_nuxt/{unocss-runtime.6f823b2d.js → unocss-runtime.daeb320e.js} +1 -1
- package/dist/client/_nuxt/virtual-files.a15894d9.js +3 -0
- package/dist/client/index.html +2 -2
- package/dist/client/modules/components/index.html +2 -2
- package/dist/client/modules/hooks/index.html +2 -2
- package/dist/client/modules/imports/index.html +2 -2
- package/dist/client/modules/layouts/index.html +2 -2
- package/dist/client/modules/middleware/index.html +2 -2
- package/dist/client/modules/modules/index.html +2 -2
- package/dist/client/modules/overview/index.html +2 -2
- package/dist/client/modules/pages/index.html +2 -2
- package/dist/client/modules/payload/index.html +2 -2
- package/dist/client/modules/plugins/index.html +2 -2
- package/dist/client/modules/runtime-configs/index.html +2 -2
- package/dist/client/modules/server-routes/index.html +2 -2
- package/dist/client/modules/storage/index.html +7 -0
- package/dist/client/modules/virtual-files/index.html +2 -2
- package/dist/iframe-client.d.ts +2 -0
- package/dist/iframe-client.mjs +15 -13
- package/dist/module.d.ts +2 -0
- package/dist/module.json +1 -1
- package/dist/shared/{devtools.b6178134.mjs → devtools.258c6e2e.mjs} +1 -1
- package/dist/types.d.ts +12 -0
- package/package.json +17 -17
- package/dist/client/_nuxt/Badge.35e3d75f.js +0 -1
- package/dist/client/_nuxt/LaunchPage.vue.15ef3f8b.js +0 -1
- package/dist/client/_nuxt/NButton.vue.1aeb67fb.js +0 -113
- package/dist/client/_nuxt/NCheckbox.vue.7252d00f.js +0 -1
- package/dist/client/_nuxt/NIcon.vue.6416325d.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.7c35c1a8.js +0 -1
- package/dist/client/_nuxt/NTextInput.vue.0fd513ee.js +0 -1
- package/dist/client/_nuxt/NuxtLogo.3b286105.js +0 -1
- package/dist/client/_nuxt/StateEditor.ce27b0a9.css +0 -1
- package/dist/client/_nuxt/StateEditor.vue.4b3d62c1.js +0 -1
- package/dist/client/_nuxt/TabIcon.vue.dd710d5f.js +0 -1
- package/dist/client/_nuxt/_plugin-vue_export-helper.c27b6911.js +0 -1
- package/dist/client/_nuxt/asyncData.f4eab2cf.js +0 -1
- package/dist/client/_nuxt/components.b8fa7f92.js +0 -1
- package/dist/client/_nuxt/composables.8ff5f6b6.js +0 -1
- package/dist/client/_nuxt/custom-_name_.681ffd04.js +0 -1
- package/dist/client/_nuxt/default.2963fb37.js +0 -1
- package/dist/client/_nuxt/editor.b5249ede.js +0 -1
- package/dist/client/_nuxt/entry.27ee4abf.css +0 -1
- package/dist/client/_nuxt/entry.53ee6248.js +0 -5
- package/dist/client/_nuxt/error-404.4d908286.js +0 -1
- package/dist/client/_nuxt/error-500.e65c4924.js +0 -1
- package/dist/client/_nuxt/error-component.1a84e289.js +0 -3
- package/dist/client/_nuxt/hooks.b85de4f3.js +0 -1
- package/dist/client/_nuxt/imports.48d7ddd5.js +0 -1
- package/dist/client/_nuxt/index.747f17a4.js +0 -1
- package/dist/client/_nuxt/layouts.8029422d.js +0 -1
- package/dist/client/_nuxt/modules.56768ce2.js +0 -1
- package/dist/client/_nuxt/none.fa32461d.js +0 -1
- package/dist/client/_nuxt/nuxt-link.bdfe480b.js +0 -1
- package/dist/client/_nuxt/overview.71ae3521.js +0 -1
- package/dist/client/_nuxt/pages.611146bd.js +0 -1
- package/dist/client/_nuxt/payload.e24f2347.js +0 -1
- package/dist/client/_nuxt/plugins.a24c21cb.js +0 -1
- package/dist/client/_nuxt/runtime-configs.9225ca28.js +0 -1
- package/dist/client/_nuxt/state.647f0c35.js +0 -1
- package/dist/client/_nuxt/virtual-files.33ac3fab.js +0 -9
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import{_ as g_}from"./NIcon.vue.6416325d.js";import{q as y_,_ as m_,a as b_,c as ac,w as $_,X as w_,B as __,u as E_,o as oc,r as sc,m as S_}from"./entry.53ee6248.js";import{_ as O_}from"./nuxt-link.bdfe480b.js";/* empty css */import"./StateEditor.vue.b4b0d299.js";/**
|
|
2
|
-
* vis-data
|
|
3
|
-
* http://visjs.org/
|
|
4
|
-
*
|
|
5
|
-
* Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.
|
|
6
|
-
*
|
|
7
|
-
* @version 7.1.4
|
|
8
|
-
* @date 2022-03-15T15:23:59.245Z
|
|
9
|
-
*
|
|
10
|
-
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
11
|
-
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
|
12
|
-
*
|
|
13
|
-
* @license
|
|
14
|
-
* vis.js is dual licensed under both
|
|
15
|
-
*
|
|
16
|
-
* 1. The Apache 2.0 License
|
|
17
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
-
*
|
|
19
|
-
* and
|
|
20
|
-
*
|
|
21
|
-
* 2. The MIT License
|
|
22
|
-
* http://opensource.org/licenses/MIT
|
|
23
|
-
*
|
|
24
|
-
* vis.js may be distributed under either license.
|
|
25
|
-
*/function ks(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}var uc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Lm={exports:{}},uo=function(i){return i&&i.Math==Math&&i},q=uo(typeof globalThis=="object"&&globalThis)||uo(typeof window=="object"&&window)||uo(typeof self=="object"&&self)||uo(typeof uc=="object"&&uc)||function(){return this}()||Function("return this")(),pe=function(i){try{return!!i()}catch{return!0}},T_=pe,ha=!T_(function(){var i=function(){}.bind();return typeof i!="function"||i.hasOwnProperty("prototype")}),k_=ha,zm=Function.prototype,lc=zm.apply,hc=zm.call,on=typeof Reflect=="object"&&Reflect.apply||(k_?hc.bind(lc):function(){return hc.apply(lc,arguments)}),jm=ha,Hm=Function.prototype,I_=Hm.bind,Oh=Hm.call,P_=jm&&I_.bind(Oh,Oh),he=jm?function(i){return i&&P_(i)}:function(i){return i&&function(){return Oh.apply(i,arguments)}},Ge=function(i){return typeof i=="function"},da={},C_=pe,Le=!C_(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),A_=ha,lo=Function.prototype.call,Xt=A_?lo.bind(lo):function(){return lo.apply(lo,arguments)},fa={},Wm={}.propertyIsEnumerable,Vm=Object.getOwnPropertyDescriptor,x_=Vm&&!Wm.call({1:2},1);fa.f=x_?function(n){var e=Vm(this,n);return!!e&&e.enumerable}:Wm;var ca=function(i,n){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:n}},Um=he,M_=Um({}.toString),D_=Um("".slice),yi=function(i){return D_(M_(i),8,-1)},R_=q,F_=he,N_=pe,B_=yi,Iu=R_.Object,L_=F_("".split),Is=N_(function(){return!Iu("z").propertyIsEnumerable(0)})?function(i){return B_(i)=="String"?L_(i,""):Iu(i)}:Iu,z_=q,j_=z_.TypeError,va=function(i){if(i==null)throw j_("Can't call method on "+i);return i},H_=Is,W_=va,Ft=function(i){return H_(W_(i))},V_=Ge,rt=function(i){return typeof i=="object"?i!==null:V_(i)},be={},Pu=be,Cu=q,U_=Ge,dc=function(i){return U_(i)?i:void 0},vr=function(i,n){return arguments.length<2?dc(Pu[i])||dc(Cu[i]):Pu[i]&&Pu[i][n]||Cu[i]&&Cu[i][n]},G_=he,ze=G_({}.isPrototypeOf),K_=vr,pa=K_("navigator","userAgent")||"",Gm=q,Au=pa,fc=Gm.process,cc=Gm.Deno,vc=fc&&fc.versions||cc&&cc.version,pc=vc&&vc.v8,It,ts;pc&&(It=pc.split("."),ts=It[0]>0&&It[0]<4?1:+(It[0]+It[1]));!ts&&Au&&(It=Au.match(/Edge\/(\d+)/),(!It||It[1]>=74)&&(It=Au.match(/Chrome\/(\d+)/),It&&(ts=+It[1])));var ga=ts,gc=ga,q_=pe,Rd=!!Object.getOwnPropertySymbols&&!q_(function(){var i=Symbol();return!String(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&gc&&gc<41}),Y_=Rd,Km=Y_&&!Symbol.sham&&typeof Symbol.iterator=="symbol",X_=q,Q_=vr,Z_=Ge,J_=ze,eE=Km,tE=X_.Object,Fd=eE?function(i){return typeof i=="symbol"}:function(i){var n=Q_("Symbol");return Z_(n)&&J_(n.prototype,tE(i))},rE=q,iE=rE.String,Ps=function(i){try{return iE(i)}catch{return"Object"}},nE=q,aE=Ge,oE=Ps,sE=nE.TypeError,mi=function(i){if(aE(i))return i;throw sE(oE(i)+" is not a function")},uE=mi,Nd=function(i,n){var e=i[n];return e==null?void 0:uE(e)},lE=q,xu=Xt,Mu=Ge,Du=rt,hE=lE.TypeError,dE=function(i,n){var e,t;if(n==="string"&&Mu(e=i.toString)&&!Du(t=xu(e,i))||Mu(e=i.valueOf)&&!Du(t=xu(e,i))||n!=="string"&&Mu(e=i.toString)&&!Du(t=xu(e,i)))return t;throw hE("Can't convert object to primitive value")},Cs={exports:{}},yc=q,fE=Object.defineProperty,cE=function(i,n){try{fE(yc,i,{value:n,configurable:!0,writable:!0})}catch{yc[i]=n}return n},vE=q,pE=cE,mc="__core-js_shared__",gE=vE[mc]||pE(mc,{}),Bd=gE,bc=Bd;(Cs.exports=function(i,n){return bc[i]||(bc[i]=n!==void 0?n:{})})("versions",[]).push({version:"3.21.1",mode:"pure",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",source:"https://github.com/zloirock/core-js"});var yE=q,mE=va,bE=yE.Object,ct=function(i){return bE(mE(i))},$E=he,wE=ct,_E=$E({}.hasOwnProperty),Ye=Object.hasOwn||function(n,e){return _E(wE(n),e)},EE=he,SE=0,OE=Math.random(),TE=EE(1 .toString),As=function(i){return"Symbol("+(i===void 0?"":i)+")_"+TE(++SE+OE,36)},kE=q,IE=Cs.exports,$c=Ye,PE=As,wc=Rd,qm=Km,ki=IE("wks"),Jr=kE.Symbol,_c=Jr&&Jr.for,CE=qm?Jr:Jr&&Jr.withoutSetter||PE,De=function(i){if(!$c(ki,i)||!(wc||typeof ki[i]=="string")){var n="Symbol."+i;wc&&$c(Jr,i)?ki[i]=Jr[i]:qm&&_c?ki[i]=_c(n):ki[i]=CE(n)}return ki[i]},AE=q,xE=Xt,Ec=rt,Sc=Fd,ME=Nd,DE=dE,RE=De,FE=AE.TypeError,NE=RE("toPrimitive"),BE=function(i,n){if(!Ec(i)||Sc(i))return i;var e=ME(i,NE),t;if(e){if(n===void 0&&(n="default"),t=xE(e,i,n),!Ec(t)||Sc(t))return t;throw FE("Can't convert object to primitive value")}return n===void 0&&(n="number"),DE(i,n)},LE=BE,zE=Fd,xs=function(i){var n=LE(i,"string");return zE(n)?n:n+""},jE=q,Oc=rt,Th=jE.document,HE=Oc(Th)&&Oc(Th.createElement),Ym=function(i){return HE?Th.createElement(i):{}},WE=Le,VE=pe,UE=Ym,Xm=!WE&&!VE(function(){return Object.defineProperty(UE("div"),"a",{get:function(){return 7}}).a!=7}),GE=Le,KE=Xt,qE=fa,YE=ca,XE=Ft,QE=xs,ZE=Ye,JE=Xm,Tc=Object.getOwnPropertyDescriptor;da.f=GE?Tc:function(n,e){if(n=XE(n),e=QE(e),JE)try{return Tc(n,e)}catch{}if(ZE(n,e))return YE(!KE(qE.f,n,e),n[e])};var eS=pe,tS=Ge,rS=/#|\.prototype\./,ya=function(i,n){var e=nS[iS(i)];return e==oS?!0:e==aS?!1:tS(n)?eS(n):!!n},iS=ya.normalize=function(i){return String(i).replace(rS,".").toLowerCase()},nS=ya.data={},aS=ya.NATIVE="N",oS=ya.POLYFILL="P",sS=ya,kc=he,uS=mi,lS=ha,hS=kc(kc.bind),sn=function(i,n){return uS(i),n===void 0?i:lS?hS(i,n):function(){return i.apply(n,arguments)}},gt={},dS=Le,fS=pe,Qm=dS&&fS(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),Zm=q,cS=rt,vS=Zm.String,pS=Zm.TypeError,Nt=function(i){if(cS(i))return i;throw pS(vS(i)+" is not an object")},gS=q,yS=Le,mS=Xm,bS=Qm,ho=Nt,Ic=xs,$S=gS.TypeError,Ru=Object.defineProperty,wS=Object.getOwnPropertyDescriptor,Fu="enumerable",Nu="configurable",Bu="writable";gt.f=yS?bS?function(n,e,t){if(ho(n),e=Ic(e),ho(t),typeof n=="function"&&e==="prototype"&&"value"in t&&Bu in t&&!t[Bu]){var r=wS(n,e);r&&r[Bu]&&(n[e]=t.value,t={configurable:Nu in t?t[Nu]:r[Nu],enumerable:Fu in t?t[Fu]:r[Fu],writable:!1})}return Ru(n,e,t)}:Ru:function(n,e,t){if(ho(n),e=Ic(e),ho(t),mS)try{return Ru(n,e,t)}catch{}if("get"in t||"set"in t)throw $S("Accessors not supported");return"value"in t&&(n[e]=t.value),n};var _S=Le,ES=gt,SS=ca,un=_S?function(i,n,e){return ES.f(i,n,SS(1,e))}:function(i,n,e){return i[n]=e,i},fo=q,OS=on,TS=he,kS=Ge,IS=da.f,PS=sS,Ii=be,CS=sn,Pi=un,Pc=Ye,AS=function(i){var n=function(e,t,r){if(this instanceof n){switch(arguments.length){case 0:return new i;case 1:return new i(e);case 2:return new i(e,t)}return new i(e,t,r)}return OS(i,this,arguments)};return n.prototype=i.prototype,n},J=function(i,n){var e=i.target,t=i.global,r=i.stat,a=i.proto,o=t?fo:r?fo[e]:(fo[e]||{}).prototype,s=t?Ii:Ii[e]||Pi(Ii,e,{})[e],u=s.prototype,l,h,d,f,c,v,g,b,p;for(f in n)l=PS(t?f:e+(r?".":"#")+f,i.forced),h=!l&&o&&Pc(o,f),v=s[f],h&&(i.noTargetGet?(p=IS(o,f),g=p&&p.value):g=o[f]),c=h&&g?g:n[f],!(h&&typeof v==typeof c)&&(i.bind&&h?b=CS(c,fo):i.wrap&&h?b=AS(c):a&&kS(c)?b=TS(c):b=c,(i.sham||c&&c.sham||v&&v.sham)&&Pi(b,"sham",!0),Pi(s,f,b),a&&(d=e+"Prototype",Pc(Ii,d)||Pi(Ii,d,{}),Pi(Ii[d],f,c),i.real&&u&&!u[f]&&Pi(u,f,c)))},xS=J,MS=Le,Cc=gt.f;xS({target:"Object",stat:!0,forced:Object.defineProperty!==Cc,sham:!MS},{defineProperty:Cc});var DS=be,Jm=DS.Object,RS=Lm.exports=function(n,e,t){return Jm.defineProperty(n,e,t)};Jm.defineProperty.sham&&(RS.sham=!0);var FS=Lm.exports,eb=FS,NS=eb,BS=NS,LS=BS,zS=LS,Ms=zS;function Ac(i,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Ms(i,t.key,t)}}function Ds(i,n,e){return n&&Ac(i.prototype,n),e&&Ac(i,e),Ms(i,"prototype",{writable:!1}),i}function Ee(i,n,e){return n in i?Ms(i,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[n]=e,i}var jS=he,Rs=jS([].slice),HS=q,tb=he,WS=mi,VS=rt,US=Ye,xc=Rs,GS=ha,rb=HS.Function,KS=tb([].concat),qS=tb([].join),Lu={},YS=function(i,n,e){if(!US(Lu,n)){for(var t=[],r=0;r<n;r++)t[r]="a["+r+"]";Lu[n]=rb("C,a","return new C("+qS(t,",")+")")}return Lu[n](i,e)},ib=GS?rb.bind:function(n){var e=WS(this),t=e.prototype,r=xc(arguments,1),a=function(){var s=KS(r,xc(arguments));return this instanceof a?YS(e,s.length,s):e.apply(n,s)};return VS(t)&&(a.prototype=t),a},XS=J,Mc=ib;XS({target:"Function",proto:!0,forced:Function.bind!==Mc},{bind:Mc});var QS=be,xe=function(i){return QS[i+"Prototype"]},ZS=xe,JS=ZS("Function").bind,eO=ze,tO=JS,zu=Function.prototype,rO=function(i){var n=i.bind;return i===zu||eO(zu,i)&&n===zu.bind?tO:n},iO=rO,nO=iO,nb=nO,aO=Math.ceil,oO=Math.floor,Fs=function(i){var n=+i;return n!==n||n===0?0:(n>0?oO:aO)(n)},sO=Fs,uO=Math.min,lO=function(i){return i>0?uO(sO(i),9007199254740991):0},hO=lO,yt=function(i){return hO(i.length)},dO=q,fO=mi,cO=ct,vO=Is,pO=yt,gO=dO.TypeError,Dc=function(i){return function(n,e,t,r){fO(e);var a=cO(n),o=vO(a),s=pO(a),u=i?s-1:0,l=i?-1:1;if(t<2)for(;;){if(u in o){r=o[u],u+=l;break}if(u+=l,i?u<0:s<=u)throw gO("Reduce of empty array with no initial value")}for(;i?u>=0:s>u;u+=l)u in o&&(r=e(r,o[u],u,a));return r}},yO={left:Dc(!1),right:Dc(!0)},mO=pe,ma=function(i,n){var e=[][i];return!!e&&mO(function(){e.call(null,n||function(){return 1},1)})},bO=yi,$O=q,wO=bO($O.process)=="process",_O=J,EO=yO.left,SO=ma,Rc=ga,OO=wO,TO=SO("reduce"),kO=!OO&&Rc>79&&Rc<83;_O({target:"Array",proto:!0,forced:!TO||kO},{reduce:function(n){var e=arguments.length;return EO(this,n,e,e>1?arguments[1]:void 0)}});var IO=xe,PO=IO("Array").reduce,CO=ze,AO=PO,ju=Array.prototype,xO=function(i){var n=i.reduce;return i===ju||CO(ju,i)&&n===ju.reduce?AO:n},MO=xO,DO=MO,RO=DO,FO=yi,bi=Array.isArray||function(n){return FO(n)=="Array"},NO=De,BO=NO("toStringTag"),ab={};ab[BO]="z";var Ld=String(ab)==="[object z]",LO=q,zO=Ld,jO=Ge,zo=yi,HO=De,WO=HO("toStringTag"),VO=LO.Object,UO=zo(function(){return arguments}())=="Arguments",GO=function(i,n){try{return i[n]}catch{}},pr=zO?zo:function(i){var n,e,t;return i===void 0?"Undefined":i===null?"Null":typeof(e=GO(n=VO(i),WO))=="string"?e:UO?zo(n):(t=zo(n))=="Object"&&jO(n.callee)?"Arguments":t},KO=he,qO=Ge,kh=Bd,YO=KO(Function.toString);qO(kh.inspectSource)||(kh.inspectSource=function(i){return YO(i)});var ob=kh.inspectSource,XO=he,QO=pe,sb=Ge,ZO=pr,JO=vr,eT=ob,ub=function(){},tT=[],lb=JO("Reflect","construct"),zd=/^\s*(?:class|function)\b/,rT=XO(zd.exec),iT=!zd.exec(ub),kn=function(n){if(!sb(n))return!1;try{return lb(ub,tT,n),!0}catch{return!1}},hb=function(n){if(!sb(n))return!1;switch(ZO(n)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return iT||!!rT(zd,eT(n))}catch{return!0}};hb.sham=!0;var Ns=!lb||QO(function(){var i;return kn(kn.call)||!kn(Object)||!kn(function(){i=!0})||i})?hb:kn,nT=q,Fc=bi,aT=Ns,oT=rt,sT=De,uT=sT("species"),Nc=nT.Array,lT=function(i){var n;return Fc(i)&&(n=i.constructor,aT(n)&&(n===Nc||Fc(n.prototype))?n=void 0:oT(n)&&(n=n[uT],n===null&&(n=void 0))),n===void 0?Nc:n},hT=lT,Bs=function(i,n){return new(hT(i))(n===0?0:n)},dT=sn,fT=he,cT=Is,vT=ct,pT=yt,gT=Bs,Bc=fT([].push),mr=function(i){var n=i==1,e=i==2,t=i==3,r=i==4,a=i==6,o=i==7,s=i==5||a;return function(u,l,h,d){for(var f=vT(u),c=cT(f),v=dT(l,h),g=pT(c),b=0,p=d||gT,$=n?p(u,g):e||o?p(u,0):void 0,y,m;g>b;b++)if((s||b in c)&&(y=c[b],m=v(y,b,f),i))if(n)$[b]=m;else if(m)switch(i){case 3:return!0;case 5:return y;case 6:return b;case 2:Bc($,y)}else switch(i){case 4:return!1;case 7:Bc($,y)}return a?-1:t||r?r:$}},ln={forEach:mr(0),map:mr(1),filter:mr(2),some:mr(3),every:mr(4),find:mr(5),findIndex:mr(6),filterReject:mr(7)},yT=pe,mT=De,bT=ga,$T=mT("species"),ba=function(i){return bT>=51||!yT(function(){var n=[],e=n.constructor={};return e[$T]=function(){return{foo:1}},n[i](Boolean).foo!==1})},wT=J,_T=ln.filter,ET=ba,ST=ET("filter");wT({target:"Array",proto:!0,forced:!ST},{filter:function(n){return _T(this,n,arguments.length>1?arguments[1]:void 0)}});var OT=xe,TT=OT("Array").filter,kT=ze,IT=TT,Hu=Array.prototype,PT=function(i){var n=i.filter;return i===Hu||kT(Hu,i)&&n===Hu.filter?IT:n},CT=PT,AT=CT,Li=AT,xT=J,MT=ln.map,DT=ba,RT=DT("map");xT({target:"Array",proto:!0,forced:!RT},{map:function(n){return MT(this,n,arguments.length>1?arguments[1]:void 0)}});var FT=xe,NT=FT("Array").map,BT=ze,LT=NT,Wu=Array.prototype,zT=function(i){var n=i.map;return i===Wu||BT(Wu,i)&&n===Wu.map?LT:n},jT=zT,HT=jT,Pt=HT,WT=q,VT=bi,UT=yt,GT=sn,KT=WT.TypeError,db=function(i,n,e,t,r,a,o,s){for(var u=r,l=0,h=o?GT(o,s):!1,d,f;l<t;){if(l in e){if(d=h?h(e[l],l,n):e[l],a>0&&VT(d))f=UT(d),u=db(i,n,d,f,u,a-1)-1;else{if(u>=9007199254740991)throw KT("Exceed the acceptable array length");i[u]=d}u++}l++}return u},qT=db,YT=J,XT=qT,QT=mi,ZT=ct,JT=yt,ek=Bs;YT({target:"Array",proto:!0},{flatMap:function(n){var e=ZT(this),t=JT(e),r;return QT(n),r=ek(e,0),r.length=XT(r,e,e,t,0,1,n,arguments.length>1?arguments[1]:void 0),r}});var tk=xe;tk("Array").flatMap;var rk=q,ik=pr,nk=rk.String,$i=function(i){if(ik(i)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return nk(i)},jd=he,ak=Fs,ok=$i,sk=va,uk=jd("".charAt),Lc=jd("".charCodeAt),lk=jd("".slice),zc=function(i){return function(n,e){var t=ok(sk(n)),r=ak(e),a=t.length,o,s;return r<0||r>=a?i?"":void 0:(o=Lc(t,r),o<55296||o>56319||r+1===a||(s=Lc(t,r+1))<56320||s>57343?i?uk(t,r):o:i?lk(t,r,r+2):(o-55296<<10)+(s-56320)+65536)}},hk={codeAt:zc(!1),charAt:zc(!0)},dk=q,fk=Ge,ck=ob,jc=dk.WeakMap,vk=fk(jc)&&/native code/.test(ck(jc)),pk=Cs.exports,gk=As,Hc=pk("keys"),Ls=function(i){return Hc[i]||(Hc[i]=gk(i))},$a={},yk=vk,fb=q,Vu=he,mk=rt,bk=un,Uu=Ye,Gu=Bd,$k=Ls,wk=$a,Wc="Object already initialized",Ih=fb.TypeError,_k=fb.WeakMap,rs,qn,is,Ek=function(i){return is(i)?qn(i):rs(i,{})},Sk=function(i){return function(n){var e;if(!mk(n)||(e=qn(n)).type!==i)throw Ih("Incompatible receiver, "+i+" required");return e}};if(yk||Gu.state){var Ur=Gu.state||(Gu.state=new _k),Ok=Vu(Ur.get),Vc=Vu(Ur.has),Tk=Vu(Ur.set);rs=function(i,n){if(Vc(Ur,i))throw new Ih(Wc);return n.facade=i,Tk(Ur,i,n),n},qn=function(i){return Ok(Ur,i)||{}},is=function(i){return Vc(Ur,i)}}else{var Ci=$k("state");wk[Ci]=!0,rs=function(i,n){if(Uu(i,Ci))throw new Ih(Wc);return n.facade=i,bk(i,Ci,n),n},qn=function(i){return Uu(i,Ci)?i[Ci]:{}},is=function(i){return Uu(i,Ci)}}var wa={set:rs,get:qn,has:is,enforce:Ek,getterFor:Sk},Ph=Le,kk=Ye,cb=Function.prototype,Ik=Ph&&Object.getOwnPropertyDescriptor,Hd=kk(cb,"name"),Pk=Hd&&function(){}.name==="something",Ck=Hd&&(!Ph||Ph&&Ik(cb,"name").configurable),vb={EXISTS:Hd,PROPER:Pk,CONFIGURABLE:Ck},zs={},Ak=Fs,xk=Math.max,Mk=Math.min,_a=function(i,n){var e=Ak(i);return e<0?xk(e+n,0):Mk(e,n)},Dk=Ft,Rk=_a,Fk=yt,Uc=function(i){return function(n,e,t){var r=Dk(n),a=Fk(r),o=Rk(t,a),s;if(i&&e!=e){for(;a>o;)if(s=r[o++],s!=s)return!0}else for(;a>o;o++)if((i||o in r)&&r[o]===e)return i||o||0;return!i&&-1}},Wd={includes:Uc(!0),indexOf:Uc(!1)},Nk=he,Ku=Ye,Bk=Ft,Lk=Wd.indexOf,zk=$a,Gc=Nk([].push),pb=function(i,n){var e=Bk(i),t=0,r=[],a;for(a in e)!Ku(zk,a)&&Ku(e,a)&&Gc(r,a);for(;n.length>t;)Ku(e,a=n[t++])&&(~Lk(r,a)||Gc(r,a));return r},Vd=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],jk=pb,Hk=Vd,Ea=Object.keys||function(n){return jk(n,Hk)},Wk=Le,Vk=Qm,Uk=gt,Gk=Nt,Kk=Ft,qk=Ea;zs.f=Wk&&!Vk?Object.defineProperties:function(n,e){Gk(n);for(var t=Kk(e),r=qk(e),a=r.length,o=0,s;a>o;)Uk.f(n,s=r[o++],t[s]);return n};var Yk=vr,Xk=Yk("document","documentElement"),Qk=Nt,Zk=zs,Kc=Vd,Jk=$a,eI=Xk,tI=Ym,rI=Ls,qc=">",Yc="<",Ch="prototype",Ah="script",gb=rI("IE_PROTO"),qu=function(){},yb=function(i){return Yc+Ah+qc+i+Yc+"/"+Ah+qc},Xc=function(i){i.write(yb("")),i.close();var n=i.parentWindow.Object;return i=null,n},iI=function(){var i=tI("iframe"),n="java"+Ah+":",e;return i.style.display="none",eI.appendChild(i),i.src=String(n),e=i.contentWindow.document,e.open(),e.write(yb("document.F=Object")),e.close(),e.F},co,jo=function(){try{co=new ActiveXObject("htmlfile")}catch{}jo=typeof document<"u"?document.domain&&co?Xc(co):iI():Xc(co);for(var i=Kc.length;i--;)delete jo[Ch][Kc[i]];return jo()};Jk[gb]=!0;var hn=Object.create||function(n,e){var t;return n!==null?(qu[Ch]=Qk(n),t=new qu,qu[Ch]=null,t[gb]=n):t=jo(),e===void 0?t:Zk.f(t,e)},nI=pe,mb=!nI(function(){function i(){}return i.prototype.constructor=null,Object.getPrototypeOf(new i)!==i.prototype}),aI=q,oI=Ye,sI=Ge,uI=ct,lI=Ls,hI=mb,Qc=lI("IE_PROTO"),xh=aI.Object,dI=xh.prototype,Ud=hI?xh.getPrototypeOf:function(i){var n=uI(i);if(oI(n,Qc))return n[Qc];var e=n.constructor;return sI(e)&&n instanceof e?e.prototype:n instanceof xh?dI:null},fI=un,js=function(i,n,e,t){t&&t.enumerable?i[n]=e:fI(i,n,e)},cI=pe,vI=Ge,pI=hn,Zc=Ud,gI=js,yI=De,Mh=yI("iterator"),bb=!1,Jt,Yu,Xu;[].keys&&(Xu=[].keys(),"next"in Xu?(Yu=Zc(Zc(Xu)),Yu!==Object.prototype&&(Jt=Yu)):bb=!0);var mI=Jt==null||cI(function(){var i={};return Jt[Mh].call(i)!==i});mI?Jt={}:Jt=pI(Jt);vI(Jt[Mh])||gI(Jt,Mh,function(){return this});var $b={IteratorPrototype:Jt,BUGGY_SAFARI_ITERATORS:bb},bI=Ld,$I=pr,wI=bI?{}.toString:function(){return"[object "+$I(this)+"]"},_I=Ld,EI=gt.f,SI=un,OI=Ye,TI=wI,kI=De,Jc=kI("toStringTag"),Sa=function(i,n,e,t){if(i){var r=e?i:i.prototype;OI(r,Jc)||EI(r,Jc,{configurable:!0,value:n}),t&&!_I&&SI(r,"toString",TI)}},dn={},II=$b.IteratorPrototype,PI=hn,CI=ca,AI=Sa,xI=dn,MI=function(){return this},DI=function(i,n,e,t){var r=n+" Iterator";return i.prototype=PI(II,{next:CI(+!t,e)}),AI(i,r,!1,!0),xI[r]=MI,i},wb=q,RI=Ge,FI=wb.String,NI=wb.TypeError,BI=function(i){if(typeof i=="object"||RI(i))return i;throw NI("Can't set "+FI(i)+" as a prototype")},LI=he,zI=Nt,jI=BI,HI=Object.setPrototypeOf||("__proto__"in{}?function(){var i=!1,n={},e;try{e=LI(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),e(n,[]),i=n instanceof Array}catch{}return function(r,a){return zI(r),jI(a),i?e(r,a):r.__proto__=a,r}}():void 0),WI=J,VI=Xt,UI=vb,GI=DI,KI=Ud,qI=Sa,ev=js,YI=De,tv=dn,XI=$b,QI=UI.PROPER,vo=XI.BUGGY_SAFARI_ITERATORS,Qu=YI("iterator"),rv="keys",po="values",iv="entries",ZI=function(){return this},Gd=function(i,n,e,t,r,a,o){GI(e,n,t);var s=function(p){if(p===r&&f)return f;if(!vo&&p in h)return h[p];switch(p){case rv:return function(){return new e(this,p)};case po:return function(){return new e(this,p)};case iv:return function(){return new e(this,p)}}return function(){return new e(this)}},u=n+" Iterator",l=!1,h=i.prototype,d=h[Qu]||h["@@iterator"]||r&&h[r],f=!vo&&d||s(r),c=n=="Array"&&h.entries||d,v,g,b;if(c&&(v=KI(c.call(new i)),v!==Object.prototype&&v.next&&(qI(v,u,!0,!0),tv[u]=ZI)),QI&&r==po&&d&&d.name!==po&&(l=!0,f=function(){return VI(d,this)}),r)if(g={values:s(po),keys:a?f:s(rv),entries:s(iv)},o)for(b in g)(vo||l||!(b in h))&&ev(h,b,g[b]);else WI({target:n,proto:!0,forced:vo||l},g);return o&&h[Qu]!==f&&ev(h,Qu,f,{name:r}),tv[n]=f,g},JI=hk.charAt,eP=$i,_b=wa,tP=Gd,Eb="String Iterator",rP=_b.set,iP=_b.getterFor(Eb);tP(String,"String",function(i){rP(this,{type:Eb,string:eP(i),index:0})},function(){var n=iP(this),e=n.string,t=n.index,r;return t>=e.length?{value:void 0,done:!0}:(r=JI(e,t),n.index+=r.length,{value:r,done:!1})});var nP=Xt,nv=Nt,aP=Nd,Sb=function(i,n,e){var t,r;nv(i);try{if(t=aP(i,"return"),!t){if(n==="throw")throw e;return e}t=nP(t,i)}catch(a){r=!0,t=a}if(n==="throw")throw e;if(r)throw t;return nv(t),e},oP=Nt,sP=Sb,uP=function(i,n,e,t){try{return t?n(oP(e)[0],e[1]):n(e)}catch(r){sP(i,"throw",r)}},lP=De,hP=dn,dP=lP("iterator"),fP=Array.prototype,Ob=function(i){return i!==void 0&&(hP.Array===i||fP[dP]===i)},cP=xs,vP=gt,pP=ca,fn=function(i,n,e){var t=cP(n);t in i?vP.f(i,t,pP(0,e)):i[t]=e},gP=pr,av=Nd,yP=dn,mP=De,bP=mP("iterator"),Hs=function(i){if(i!=null)return av(i,bP)||av(i,"@@iterator")||yP[gP(i)]},$P=q,wP=Xt,_P=mi,EP=Nt,SP=Ps,OP=Hs,TP=$P.TypeError,Kd=function(i,n){var e=arguments.length<2?OP(i):n;if(_P(e))return EP(wP(e,i));throw TP(SP(i)+" is not iterable")},kP=q,IP=sn,PP=Xt,CP=ct,AP=uP,xP=Ob,MP=Ns,DP=yt,ov=fn,RP=Kd,FP=Hs,sv=kP.Array,NP=function(n){var e=CP(n),t=MP(this),r=arguments.length,a=r>1?arguments[1]:void 0,o=a!==void 0;o&&(a=IP(a,r>2?arguments[2]:void 0));var s=FP(e),u=0,l,h,d,f,c,v;if(s&&!(this==sv&&xP(s)))for(f=RP(e,s),c=f.next,h=t?new this:[];!(d=PP(c,f)).done;u++)v=o?AP(f,a,[d.value,u],!0):d.value,ov(h,u,v);else for(l=DP(e),h=t?new this(l):sv(l);l>u;u++)v=o?a(e[u],u):e[u],ov(h,u,v);return h.length=u,h},BP=De,Tb=BP("iterator"),kb=!1;try{var LP=0,uv={next:function(){return{done:!!LP++}},return:function(){kb=!0}};uv[Tb]=function(){return this},Array.from(uv,function(){throw 2})}catch{}var zP=function(i,n){if(!n&&!kb)return!1;var e=!1;try{var t={};t[Tb]=function(){return{next:function(){return{done:e=!0}}}},i(t)}catch{}return e},jP=J,HP=NP,WP=zP,VP=!WP(function(i){Array.from(i)});jP({target:"Array",stat:!0,forced:VP},{from:HP});var UP=be,GP=UP.Array.from,KP=GP,Ib=KP,qd=Ib,qP=Ft,lv=dn,Pb=wa;gt.f;var YP=Gd,Cb="Array Iterator",XP=Pb.set,QP=Pb.getterFor(Cb);YP(Array,"Array",function(i,n){XP(this,{type:Cb,target:qP(i),index:0,kind:n})},function(){var i=QP(this),n=i.target,e=i.kind,t=i.index++;return!n||t>=n.length?(i.target=void 0,{value:void 0,done:!0}):e=="keys"?{value:t,done:!1}:e=="values"?{value:n[t],done:!1}:{value:[t,n[t]],done:!1}},"values");lv.Arguments=lv.Array;var ZP=Hs,JP=ZP,eC={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},tC=eC,rC=q,iC=pr,nC=un,hv=dn,aC=De,dv=aC("toStringTag");for(var Zu in tC){var fv=rC[Zu],Ju=fv&&fv.prototype;Ju&&iC(Ju)!==dv&&nC(Ju,dv,Zu),hv[Zu]=hv.Array}var oC=JP,sC=oC,uC=sC,lC=uC,hC=lC,dC=hC,Oa=dC,Ta={},fC=pb,cC=Vd,vC=cC.concat("length","prototype");Ta.f=Object.getOwnPropertyNames||function(n){return fC(n,vC)};var Yd={},pC=q,cv=_a,gC=yt,yC=fn,mC=pC.Array,bC=Math.max,Ab=function(i,n,e){for(var t=gC(i),r=cv(n,t),a=cv(e===void 0?t:e,t),o=mC(bC(a-r,0)),s=0;r<a;r++,s++)yC(o,s,i[r]);return o.length=s,o},$C=yi,wC=Ft,xb=Ta.f,_C=Ab,Mb=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],EC=function(i){try{return xb(i)}catch{return _C(Mb)}};Yd.f=function(n){return Mb&&$C(n)=="Window"?EC(n):xb(wC(n))};var Ws={};Ws.f=Object.getOwnPropertySymbols;var Vs={},SC=De;Vs.f=SC;var vv=be,OC=Ye,TC=Vs,kC=gt.f,Oe=function(i){var n=vv.Symbol||(vv.Symbol={});OC(n,i)||kC(n,i,{value:TC.f(i)})},cn=J,Xd=q,IC=vr,PC=on,ka=Xt,CC=he,Yi=Le,si=Rd,Qd=pe,ke=Ye,AC=bi,xC=Ge,MC=rt,DC=ze,Dh=Fd,Rh=Nt,RC=ct,Us=Ft,Zd=xs,Db=$i,Fh=ca,Yn=hn,Rb=Ea,FC=Ta,Fb=Yd,Nh=Ws,Nb=da,Bb=gt,NC=zs,Lb=fa,BC=Rs,Bh=js,Ia=Cs.exports,LC=Ls,zb=$a,pv=As,jb=De,zC=Vs,jC=Oe,HC=Sa,Hb=wa,Gs=ln.forEach,ot=LC("hidden"),Ks="Symbol",Xn="prototype",gv=jb("toPrimitive"),WC=Hb.set,yv=Hb.getterFor(Ks),xt=Object[Xn],er=Xd.Symbol,kr=er&&er[Xn],Wb=Xd.TypeError,el=Xd.QObject,In=IC("JSON","stringify"),Vb=Nb.f,Sr=Bb.f,Ub=Fb.f,VC=Lb.f,Gb=CC([].push),hr=Ia("symbols"),Pa=Ia("op-symbols"),tl=Ia("string-to-symbol-registry"),rl=Ia("symbol-to-string-registry"),UC=Ia("wks"),Lh=!el||!el[Xn]||!el[Xn].findChild,zh=Yi&&Qd(function(){return Yn(Sr({},"a",{get:function(){return Sr(this,"a",{value:7}).a}})).a!=7})?function(i,n,e){var t=Vb(xt,n);t&&delete xt[n],Sr(i,n,e),t&&i!==xt&&Sr(xt,n,t)}:Sr,il=function(i,n){var e=hr[i]=Yn(kr);return WC(e,{type:Ks,tag:i,description:n}),Yi||(e.description=n),e},qs=function(n,e,t){n===xt&&qs(Pa,e,t),Rh(n);var r=Zd(e);return Rh(t),ke(hr,r)?(t.enumerable?(ke(n,ot)&&n[ot][r]&&(n[ot][r]=!1),t=Yn(t,{enumerable:Fh(0,!1)})):(ke(n,ot)||Sr(n,ot,Fh(1,{})),n[ot][r]=!0),zh(n,r,t)):Sr(n,r,t)},Jd=function(n,e){Rh(n);var t=Us(e),r=Rb(t).concat(ef(t));return Gs(r,function(a){(!Yi||ka(Kb,t,a))&&qs(n,a,t[a])}),n},GC=function(n,e){return e===void 0?Yn(n):Jd(Yn(n),e)},Kb=function(n){var e=Zd(n),t=ka(VC,this,e);return this===xt&&ke(hr,e)&&!ke(Pa,e)?!1:t||!ke(this,e)||!ke(hr,e)||ke(this,ot)&&this[ot][e]?t:!0},qb=function(n,e){var t=Us(n),r=Zd(e);if(!(t===xt&&ke(hr,r)&&!ke(Pa,r))){var a=Vb(t,r);return a&&ke(hr,r)&&!(ke(t,ot)&&t[ot][r])&&(a.enumerable=!0),a}},Yb=function(n){var e=Ub(Us(n)),t=[];return Gs(e,function(r){!ke(hr,r)&&!ke(zb,r)&&Gb(t,r)}),t},ef=function(n){var e=n===xt,t=Ub(e?Pa:Us(n)),r=[];return Gs(t,function(a){ke(hr,a)&&(!e||ke(xt,a))&&Gb(r,hr[a])}),r};si||(er=function(){if(DC(kr,this))throw Wb("Symbol is not a constructor");var n=!arguments.length||arguments[0]===void 0?void 0:Db(arguments[0]),e=pv(n),t=function(r){this===xt&&ka(t,Pa,r),ke(this,ot)&&ke(this[ot],e)&&(this[ot][e]=!1),zh(this,e,Fh(1,r))};return Yi&&Lh&&zh(xt,e,{configurable:!0,set:t}),il(e,n)},kr=er[Xn],Bh(kr,"toString",function(){return yv(this).tag}),Bh(er,"withoutSetter",function(i){return il(pv(i),i)}),Lb.f=Kb,Bb.f=qs,NC.f=Jd,Nb.f=qb,FC.f=Fb.f=Yb,Nh.f=ef,zC.f=function(i){return il(jb(i),i)},Yi&&Sr(kr,"description",{configurable:!0,get:function(){return yv(this).description}}));cn({global:!0,wrap:!0,forced:!si,sham:!si},{Symbol:er});Gs(Rb(UC),function(i){jC(i)});cn({target:Ks,stat:!0,forced:!si},{for:function(i){var n=Db(i);if(ke(tl,n))return tl[n];var e=er(n);return tl[n]=e,rl[e]=n,e},keyFor:function(n){if(!Dh(n))throw Wb(n+" is not a symbol");if(ke(rl,n))return rl[n]},useSetter:function(){Lh=!0},useSimple:function(){Lh=!1}});cn({target:"Object",stat:!0,forced:!si,sham:!Yi},{create:GC,defineProperty:qs,defineProperties:Jd,getOwnPropertyDescriptor:qb});cn({target:"Object",stat:!0,forced:!si},{getOwnPropertyNames:Yb,getOwnPropertySymbols:ef});cn({target:"Object",stat:!0,forced:Qd(function(){Nh.f(1)})},{getOwnPropertySymbols:function(n){return Nh.f(RC(n))}});if(In){var KC=!si||Qd(function(){var i=er();return In([i])!="[null]"||In({a:i})!="{}"||In(Object(i))!="{}"});cn({target:"JSON",stat:!0,forced:KC},{stringify:function(n,e,t){var r=BC(arguments),a=e;if(!(!MC(e)&&n===void 0||Dh(n)))return AC(e)||(e=function(o,s){if(xC(a)&&(s=ka(a,this,o,s)),!Dh(s))return s}),r[1]=e,PC(In,null,r)}})}if(!kr[gv]){var qC=kr.valueOf;Bh(kr,gv,function(i){return ka(qC,this)})}HC(er,Ks);zb[ot]=!0;var YC=be,XC=YC.Object.getOwnPropertySymbols,QC=XC,ZC=QC,mv=ZC,Xb={exports:{}},JC=J,eA=pe,tA=Ft,Qb=da.f,Zb=Le,rA=eA(function(){Qb(1)}),iA=!Zb||rA;JC({target:"Object",stat:!0,forced:iA,sham:!Zb},{getOwnPropertyDescriptor:function(n,e){return Qb(tA(n),e)}});var nA=be,Jb=nA.Object,aA=Xb.exports=function(n,e){return Jb.getOwnPropertyDescriptor(n,e)};Jb.getOwnPropertyDescriptor.sham&&(aA.sham=!0);var oA=Xb.exports,sA=oA,e$=sA,uA=vr,lA=he,hA=Ta,dA=Ws,fA=Nt,cA=lA([].concat),t$=uA("Reflect","ownKeys")||function(n){var e=hA.f(fA(n)),t=dA.f;return t?cA(e,t(n)):e},vA=J,pA=Le,gA=t$,yA=Ft,mA=da,bA=fn;vA({target:"Object",stat:!0,sham:!pA},{getOwnPropertyDescriptors:function(n){for(var e=yA(n),t=mA.f,r=gA(e),a={},o=0,s,u;r.length>o;)u=t(e,s=r[o++]),u!==void 0&&bA(a,s,u);return a}});var $A=be,wA=$A.Object.getOwnPropertyDescriptors,_A=wA,EA=_A,bv=EA,r$={exports:{}},SA=J,OA=Le,$v=zs.f;SA({target:"Object",stat:!0,forced:Object.defineProperties!==$v,sham:!OA},{defineProperties:$v});var TA=be,i$=TA.Object,kA=r$.exports=function(n,e){return i$.defineProperties(n,e)};i$.defineProperties.sham&&(kA.sham=!0);var IA=r$.exports,PA=IA,CA=PA,AA=eb,xA=J,MA=bi;xA({target:"Array",stat:!0},{isArray:MA});var DA=be,RA=DA.Array.isArray,FA=RA,n$=FA,NA=n$,BA=NA,LA=BA,zA=LA,a$=zA;function jA(i){if(a$(i))return i}var HA=J,WA=q,VA=pe,UA=bi,GA=rt,KA=ct,qA=yt,wv=fn,YA=Bs,XA=ba,QA=De,ZA=ga,o$=QA("isConcatSpreadable"),_v=9007199254740991,Ev="Maximum allowed index exceeded",Sv=WA.TypeError,JA=ZA>=51||!VA(function(){var i=[];return i[o$]=!1,i.concat()[0]!==i}),ex=XA("concat"),tx=function(i){if(!GA(i))return!1;var n=i[o$];return n!==void 0?!!n:UA(i)},rx=!JA||!ex;HA({target:"Array",proto:!0,forced:rx},{concat:function(n){var e=KA(this),t=YA(e,0),r=0,a,o,s,u,l;for(a=-1,s=arguments.length;a<s;a++)if(l=a===-1?e:arguments[a],tx(l)){if(u=qA(l),r+u>_v)throw Sv(Ev);for(o=0;o<u;o++,r++)o in l&&wv(t,r,l[o])}else{if(r>=_v)throw Sv(Ev);wv(t,r++,l)}return t.length=r,t}});var ix=Oe;ix("asyncIterator");var nx=Oe;nx("hasInstance");var ax=Oe;ax("isConcatSpreadable");var ox=Oe;ox("iterator");var sx=Oe;sx("match");var ux=Oe;ux("matchAll");var lx=Oe;lx("replace");var hx=Oe;hx("search");var dx=Oe;dx("species");var fx=Oe;fx("split");var cx=Oe;cx("toPrimitive");var vx=Oe;vx("toStringTag");var px=Oe;px("unscopables");var gx=q,yx=Sa;yx(gx.JSON,"JSON",!0);var mx=be,bx=mx.Symbol,$x=bx,s$=$x,wx=s$,_x=wx,Ex=Oe;Ex("asyncDispose");var Sx=Oe;Sx("dispose");var Ox=Oe;Ox("matcher");var Tx=Oe;Tx("metadata");var kx=Oe;kx("observable");var Ix=Oe;Ix("patternMatch");var Px=Oe;Px("replaceAll");var Cx=_x,Ax=Cx,zi=Ax;function xx(i,n){var e=i==null?null:typeof zi<"u"&&Oa(i)||i["@@iterator"];if(e!=null){var t=[],r=!0,a=!1,o,s;try{for(e=e.call(i);!(r=(o=e.next()).done)&&(t.push(o.value),!(n&&t.length===n));r=!0);}catch(u){a=!0,s=u}finally{try{!r&&e.return!=null&&e.return()}finally{if(a)throw s}}return t}}var Mx=J,Dx=q,Ov=bi,Rx=Ns,Fx=rt,Tv=_a,Nx=yt,Bx=Ft,Lx=fn,zx=De,jx=ba,Hx=Rs,Wx=jx("slice"),Vx=zx("species"),nl=Dx.Array,Ux=Math.max;Mx({target:"Array",proto:!0,forced:!Wx},{slice:function(n,e){var t=Bx(this),r=Nx(t),a=Tv(n,r),o=Tv(e===void 0?r:e,r),s,u,l;if(Ov(t)&&(s=t.constructor,Rx(s)&&(s===nl||Ov(s.prototype))?s=void 0:Fx(s)&&(s=s[Vx],s===null&&(s=void 0)),s===nl||s===void 0))return Hx(t,a,o);for(u=new(s===void 0?nl:s)(Ux(o-a,0)),l=0;a<o;a++,l++)a in t&&Lx(u,l,t[a]);return u.length=l,u}});var Gx=xe,Kx=Gx("Array").slice,qx=ze,Yx=Kx,al=Array.prototype,Xx=function(i){var n=i.slice;return i===al||qx(al,i)&&n===al.slice?Yx:n},Qx=Xx,u$=Qx,Zx=u$,Jx=Zx,eM=Jx,tM=eM,rM=tM,iM=Ib,nM=iM,aM=nM,oM=aM,l$=oM;function jh(i,n){(n==null||n>i.length)&&(n=i.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=i[e];return t}function h$(i,n){var e;if(i){if(typeof i=="string")return jh(i,n);var t=rM(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return l$(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return jh(i,n)}}function sM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
26
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function it(i,n){return jA(i)||xx(i,n)||h$(i,n)||sM()}var uM=Vs,lM=uM.f("iterator"),hM=lM,d$=hM,dM=d$,fM=dM,cM=fM,vM=cM,pM=vM;function lt(i){return lt=typeof zi=="function"&&typeof pM=="symbol"?function(n){return typeof n}:function(n){return n&&typeof zi=="function"&&n.constructor===zi&&n!==zi.prototype?"symbol":typeof n},lt(i)}function gM(i){if(a$(i))return jh(i)}function yM(i){if(typeof zi<"u"&&Oa(i)!=null||i["@@iterator"]!=null)return l$(i)}function mM(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
27
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function st(i){return gM(i)||yM(i)||h$(i)||mM()}var Ys=s$,bM=xe,$M=bM("Array").concat,wM=ze,_M=$M,ol=Array.prototype,EM=function(i){var n=i.concat;return i===ol||wM(ol,i)&&n===ol.concat?_M:n},SM=EM,OM=SM,Xs=OM,Qs=u$,TM=J,kM=t$;TM({target:"Reflect",stat:!0},{ownKeys:kM});var IM=be,PM=IM.Reflect.ownKeys,CM=PM,AM=CM,xM=AM,pt=n$,MM=J,DM=ct,f$=Ea,RM=pe,FM=RM(function(){f$(1)});MM({target:"Object",stat:!0,forced:FM},{keys:function(n){return f$(DM(n))}});var NM=be,BM=NM.Object.keys,LM=BM,zM=LM,tf=zM,jM=J,HM=q,WM=he,c$=HM.Date,VM=WM(c$.prototype.getTime);jM({target:"Date",stat:!0},{now:function(){return VM(new c$)}});var UM=be;UM.Date.now;var GM=ln.forEach,KM=ma,qM=KM("forEach"),YM=qM?[].forEach:function(n){return GM(this,n,arguments.length>1?arguments[1]:void 0)},XM=J,kv=YM;XM({target:"Array",proto:!0,forced:[].forEach!=kv},{forEach:kv});var QM=xe,ZM=QM("Array").forEach,JM=ZM,eD=JM,tD=pr,rD=Ye,iD=ze,nD=eD,sl=Array.prototype,aD={DOMTokenList:!0,NodeList:!0},oD=function(i){var n=i.forEach;return i===sl||iD(sl,i)&&n===sl.forEach||rD(aD,tD(i))?nD:n},ui=oD,sD=J,uD=he,lD=bi,hD=uD([].reverse),Iv=[1,2];sD({target:"Array",proto:!0,forced:String(Iv)===String(Iv.reverse())},{reverse:function(){return lD(this)&&(this.length=this.length),hD(this)}});var dD=xe,fD=dD("Array").reverse,cD=ze,vD=fD,ul=Array.prototype,pD=function(i){var n=i.reverse;return i===ul||cD(ul,i)&&n===ul.reverse?vD:n},gD=pD,yD=gD,mD=yD,bD=J,$D=q,wD=_a,_D=Fs,ED=yt,SD=ct,OD=Bs,TD=fn,kD=ba,ID=kD("splice"),PD=$D.TypeError,CD=Math.max,AD=Math.min,xD=9007199254740991,MD="Maximum allowed length exceeded";bD({target:"Array",proto:!0,forced:!ID},{splice:function(n,e){var t=SD(this),r=ED(t),a=wD(n,r),o=arguments.length,s,u,l,h,d,f;if(o===0?s=u=0:o===1?(s=0,u=r-a):(s=o-2,u=AD(CD(_D(e),0),r-a)),r+s-u>xD)throw PD(MD);for(l=OD(t,u),h=0;h<u;h++)d=a+h,d in t&&TD(l,h,t[d]);if(l.length=u,s<u){for(h=a;h<r-u;h++)d=h+u,f=h+s,d in t?t[f]=t[d]:delete t[f];for(h=r;h>r-u+s;h--)delete t[h-1]}else if(s>u)for(h=r-u;h>a;h--)d=h+u-1,f=h+s-1,d in t?t[f]=t[d]:delete t[f];for(h=0;h<s;h++)t[h+a]=arguments[h+2];return t.length=r-u+s,l}});var DD=xe,RD=DD("Array").splice,FD=ze,ND=RD,ll=Array.prototype,BD=function(i){var n=i.splice;return i===ll||FD(ll,i)&&n===ll.splice?ND:n},LD=BD,zD=LD,v$=zD,Pv=Le,jD=he,HD=Xt,WD=pe,hl=Ea,VD=Ws,UD=fa,GD=ct,KD=Is,Ai=Object.assign,Cv=Object.defineProperty,qD=jD([].concat),YD=!Ai||WD(function(){if(Pv&&Ai({b:1},Ai(Cv({},"a",{enumerable:!0,get:function(){Cv(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var i={},n={},e=Symbol(),t="abcdefghijklmnopqrst";return i[e]=7,t.split("").forEach(function(r){n[r]=r}),Ai({},i)[e]!=7||hl(Ai({},n)).join("")!=t})?function(n,e){for(var t=GD(n),r=arguments.length,a=1,o=VD.f,s=UD.f;r>a;)for(var u=KD(arguments[a++]),l=o?qD(hl(u),o(u)):hl(u),h=l.length,d=0,f;h>d;)f=l[d++],(!Pv||HD(s,u,f))&&(t[f]=u[f]);return t}:Ai,XD=J,Av=YD;XD({target:"Object",stat:!0,forced:Object.assign!==Av},{assign:Av});var QD=be,ZD=QD.Object.assign,JD=ZD,eR=JD,tR=eR,rR=J,iR=Wd.includes;rR({target:"Array",proto:!0},{includes:function(n){return iR(this,n,arguments.length>1?arguments[1]:void 0)}});var nR=xe;nR("Array").includes;var aR=rt,oR=yi,sR=De,uR=sR("match"),lR=function(i){var n;return aR(i)&&((n=i[uR])!==void 0?!!n:oR(i)=="RegExp")},hR=q,dR=lR,fR=hR.TypeError,cR=function(i){if(dR(i))throw fR("The method doesn't accept regular expressions");return i},vR=De,pR=vR("match"),gR=function(i){var n=/./;try{"/./"[i](n)}catch{try{return n[pR]=!1,"/./"[i](n)}catch{}}return!1},yR=J,mR=he,bR=cR,$R=va,xv=$i,wR=gR,_R=mR("".indexOf);yR({target:"String",proto:!0,forced:!wR("includes")},{includes:function(n){return!!~_R(xv($R(this)),xv(bR(n)),arguments.length>1?arguments[1]:void 0)}});var ER=xe;ER("String").includes;var SR=J,OR=pe,TR=ct,p$=Ud,kR=mb,IR=OR(function(){p$(1)});SR({target:"Object",stat:!0,forced:IR,sham:!kR},{getPrototypeOf:function(n){return p$(TR(n))}});var PR=be,CR=PR.Object.getPrototypeOf,AR=CR,xR=AR,MR=Le,g$=he,DR=Ea,RR=Ft,FR=fa.f,NR=g$(FR),BR=g$([].push),Mv=function(i){return function(n){for(var e=RR(n),t=DR(e),r=t.length,a=0,o=[],s;r>a;)s=t[a++],(!MR||NR(e,s))&&BR(o,i?[s,e[s]]:e[s]);return o}},LR={entries:Mv(!0),values:Mv(!1)},zR=J,jR=LR.values;zR({target:"Object",stat:!0},{values:function(n){return jR(n)}});var HR=be;HR.Object.values;var rf=`
|
|
28
|
-
\v\f\r \u2028\u2029\uFEFF`,WR=he,VR=va,UR=$i,GR=rf,Dv=WR("".replace),ns="["+GR+"]",KR=RegExp("^"+ns+ns+"*"),qR=RegExp(ns+ns+"*$"),dl=function(i){return function(n){var e=UR(VR(n));return i&1&&(e=Dv(e,KR,"")),i&2&&(e=Dv(e,qR,"")),e}},y$={start:dl(1),end:dl(2),trim:dl(3)},m$=q,YR=pe,XR=he,QR=$i,ZR=y$.trim,Rv=rf,Ln=m$.parseInt,Fv=m$.Symbol,Nv=Fv&&Fv.iterator,b$=/^[+-]?0x/i,JR=XR(b$.exec),eF=Ln(Rv+"08")!==8||Ln(Rv+"0x16")!==22||Nv&&!YR(function(){Ln(Object(Nv))}),tF=eF?function(n,e){var t=ZR(QR(n));return Ln(t,e>>>0||(JR(b$,t)?16:10))}:Ln,rF=J,Bv=tF;rF({global:!0,forced:parseInt!=Bv},{parseInt:Bv});var iF=be;iF.parseInt;var nF=J,aF=he,oF=Wd.indexOf,sF=ma,Hh=aF([].indexOf),Lv=!!Hh&&1/Hh([1],1,-0)<0,uF=sF("indexOf");nF({target:"Array",proto:!0,forced:Lv||!uF},{indexOf:function(n){var e=arguments.length>1?arguments[1]:void 0;return Lv?Hh(this,n,e)||0:oF(this,n,e)}});var lF=xe;lF("Array").indexOf;var hF=vb.PROPER,dF=pe,zv=rf,jv="
",fF=function(i){return dF(function(){return!!zv[i]()||jv[i]()!==jv||hF&&zv[i].name!==i})},cF=J,vF=y$.trim,pF=fF;cF({target:"String",proto:!0,forced:pF("trim")},{trim:function(){return vF(this)}});var gF=xe;gF("String").trim;var yF=J,mF=Le,bF=hn;yF({target:"Object",stat:!0,sham:!mF},{create:bF});var $F=be,wF=$F.Object,_F=function(n,e){return wF.create(n,e)},EF=_F,$$=EF,SF=$$,OF=J,TF=q,kF=vr,IF=on,Ca=he,PF=pe,CF=TF.Array,as=kF("JSON","stringify"),go=Ca(/./.exec),Hv=Ca("".charAt),AF=Ca("".charCodeAt),xF=Ca("".replace),MF=Ca(1 .toString),DF=/[\uD800-\uDFFF]/g,Wv=/^[\uD800-\uDBFF]$/,Vv=/^[\uDC00-\uDFFF]$/,RF=function(i,n,e){var t=Hv(e,n-1),r=Hv(e,n+1);return go(Wv,i)&&!go(Vv,r)||go(Vv,i)&&!go(Wv,t)?"\\u"+MF(AF(i,0),16):i},FF=PF(function(){return as("\uDF06\uD834")!=='"\\udf06\\ud834"'||as("\uDEAD")!=='"\\udead"'});as&&OF({target:"JSON",stat:!0,forced:FF},{stringify:function(n,e,t){for(var r=0,a=arguments.length,o=CF(a);r<a;r++)o[r]=arguments[r];var s=IF(as,null,o);return typeof s=="string"?xF(s,DF,RF):s}});var Wh=be,NF=on;Wh.JSON||(Wh.JSON={stringify:JSON.stringify});var BF=function(n,e,t){return NF(Wh.JSON.stringify,null,arguments)},LF=BF,zF=LF,jF=zF,HF=q,WF=HF.TypeError,VF=function(i,n){if(i<n)throw WF("Not enough arguments");return i},UF=J,Vh=q,GF=on,KF=Ge,qF=pa,YF=Rs,XF=VF,QF=/MSIE .\./.test(qF),ZF=Vh.Function,Uv=function(i){return function(n,e){var t=XF(arguments.length,1)>2,r=KF(n)?n:ZF(n),a=t?YF(arguments,2):void 0;return i(t?function(){GF(r,this,a)}:r,e)}};UF({global:!0,bind:!0,forced:QF},{setTimeout:Uv(Vh.setTimeout),setInterval:Uv(Vh.setInterval)});var JF=be,e2=JF.setTimeout,t2=e2,r2=ct,Gv=_a,i2=yt,n2=function(n){for(var e=r2(this),t=i2(e),r=arguments.length,a=Gv(r>1?arguments[1]:void 0,t),o=r>2?arguments[2]:void 0,s=o===void 0?t:Gv(o,t);s>a;)e[a++]=n;return e},a2=J,o2=n2;a2({target:"Array",proto:!0},{fill:o2});var s2=xe;s2("Array").fill;var w$={exports:{}};(function(i){i.exports=n;function n(t){if(t)return e(t)}function e(t){for(var r in n.prototype)t[r]=n.prototype[r];return t}n.prototype.on=n.prototype.addEventListener=function(t,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(r),this},n.prototype.once=function(t,r){function a(){this.off(t,a),r.apply(this,arguments)}return a.fn=r,this.on(t,a),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,r){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+t];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,s=0;s<a.length;s++)if(o=a[s],o===r||o.fn===r){a.splice(s,1);break}return a.length===0&&delete this._callbacks["$"+t],this},n.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var r=new Array(arguments.length-1),a=this._callbacks["$"+t],o=1;o<arguments.length;o++)r[o-1]=arguments[o];if(a){a=a.slice(0);for(var o=0,s=a.length;o<s;++o)a[o].apply(this,r)}return this},n.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},n.prototype.hasListeners=function(t){return!!this.listeners(t).length}})(w$);var u2=w$.exports;/*! Hammer.JS - v2.0.17-rc - 2019-12-16
|
|
29
|
-
* http://naver.github.io/egjs
|
|
30
|
-
*
|
|
31
|
-
* Forked By Naver egjs
|
|
32
|
-
* Copyright (c) hammerjs
|
|
33
|
-
* Licensed under the MIT license */function Dt(){return Dt=Object.assign||function(i){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])}return i},Dt.apply(this,arguments)}function Tt(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,i.__proto__=n}function yo(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}var Uh;typeof Object.assign!="function"?Uh=function(n){if(n==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(n),t=1;t<arguments.length;t++){var r=arguments[t];if(r!=null)for(var a in r)r.hasOwnProperty(a)&&(e[a]=r[a])}return e}:Uh=Object.assign;var li=Uh,Kv=["","webkit","Moz","MS","ms","o"],l2=typeof document>"u"?{style:{}}:document.createElement("div"),h2="function",ji=Math.round,hi=Math.abs,nf=Date.now;function Zs(i,n){for(var e,t,r=n[0].toUpperCase()+n.slice(1),a=0;a<Kv.length;){if(e=Kv[a],t=e?e+r:n,t in i)return t;a++}}var tr;typeof window>"u"?tr={}:tr=window;var _$=Zs(l2.style,"touchAction"),E$=_$!==void 0;function d2(){if(!E$)return!1;var i={},n=tr.CSS&&tr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return i[e]=n?tr.CSS.supports("touch-action",e):!0}),i}var S$="compute",O$="auto",Gh="manipulation",ei="none",Qn="pan-x",Zn="pan-y",mo=d2(),f2=/mobile|tablet|ip(ad|hone|od)|android/i,T$="ontouchstart"in tr,c2=Zs(tr,"PointerEvent")!==void 0,v2=T$&&f2.test(navigator.userAgent),Aa="touch",p2="pen",af="mouse",g2="kinect",y2=25,et=1,wi=2,Pe=4,dt=8,os=1,xa=2,Ma=4,Da=8,Xi=16,Gt=xa|Ma,ti=Da|Xi,k$=Gt|ti,I$=["x","y"],ss=["clientX","clientY"];function rr(i,n,e){var t;if(i)if(i.forEach)i.forEach(n,e);else if(i.length!==void 0)for(t=0;t<i.length;)n.call(e,i[t],t,i),t++;else for(t in i)i.hasOwnProperty(t)&&n.call(e,i[t],t,i)}function Js(i,n){return typeof i===h2?i.apply(n&&n[0]||void 0,n):i}function Xr(i,n){return i.indexOf(n)>-1}function m2(i){if(Xr(i,ei))return ei;var n=Xr(i,Qn),e=Xr(i,Zn);return n&&e?ei:n||e?n?Qn:Zn:Xr(i,Gh)?Gh:O$}var P$=function(){function i(e,t){this.manager=e,this.set(t)}var n=i.prototype;return n.set=function(t){t===S$&&(t=this.compute()),E$&&this.manager.element.style&&mo[t]&&(this.manager.element.style[_$]=t),this.actions=t.toLowerCase().trim()},n.update=function(){this.set(this.manager.options.touchAction)},n.compute=function(){var t=[];return rr(this.manager.recognizers,function(r){Js(r.options.enable,[r])&&(t=t.concat(r.getTouchAction()))}),m2(t.join(" "))},n.preventDefaults=function(t){var r=t.srcEvent,a=t.offsetDirection;if(this.manager.session.prevented){r.preventDefault();return}var o=this.actions,s=Xr(o,ei)&&!mo[ei],u=Xr(o,Zn)&&!mo[Zn],l=Xr(o,Qn)&&!mo[Qn];if(s){var h=t.pointers.length===1,d=t.distance<2,f=t.deltaTime<250;if(h&&d&&f)return}if(!(l&&u)&&(s||u&&a&Gt||l&&a&ti))return this.preventSrc(r)},n.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},i}();function of(i,n){for(;i;){if(i===n)return!0;i=i.parentNode}return!1}function C$(i){var n=i.length;if(n===1)return{x:ji(i[0].clientX),y:ji(i[0].clientY)};for(var e=0,t=0,r=0;r<n;)e+=i[r].clientX,t+=i[r].clientY,r++;return{x:ji(e/n),y:ji(t/n)}}function qv(i){for(var n=[],e=0;e<i.pointers.length;)n[e]={clientX:ji(i.pointers[e].clientX),clientY:ji(i.pointers[e].clientY)},e++;return{timeStamp:nf(),pointers:n,center:C$(n),deltaX:i.deltaX,deltaY:i.deltaY}}function us(i,n,e){e||(e=I$);var t=n[e[0]]-i[e[0]],r=n[e[1]]-i[e[1]];return Math.sqrt(t*t+r*r)}function Kh(i,n,e){e||(e=I$);var t=n[e[0]]-i[e[0]],r=n[e[1]]-i[e[1]];return Math.atan2(r,t)*180/Math.PI}function A$(i,n){return i===n?os:hi(i)>=hi(n)?i<0?xa:Ma:n<0?Da:Xi}function b2(i,n){var e=n.center,t=i.offsetDelta||{},r=i.prevDelta||{},a=i.prevInput||{};(n.eventType===et||a.eventType===Pe)&&(r=i.prevDelta={x:a.deltaX||0,y:a.deltaY||0},t=i.offsetDelta={x:e.x,y:e.y}),n.deltaX=r.x+(e.x-t.x),n.deltaY=r.y+(e.y-t.y)}function x$(i,n,e){return{x:n/i||0,y:e/i||0}}function $2(i,n){return us(n[0],n[1],ss)/us(i[0],i[1],ss)}function w2(i,n){return Kh(n[1],n[0],ss)+Kh(i[1],i[0],ss)}function _2(i,n){var e=i.lastInterval||n,t=n.timeStamp-e.timeStamp,r,a,o,s;if(n.eventType!==dt&&(t>y2||e.velocity===void 0)){var u=n.deltaX-e.deltaX,l=n.deltaY-e.deltaY,h=x$(t,u,l);a=h.x,o=h.y,r=hi(h.x)>hi(h.y)?h.x:h.y,s=A$(u,l),i.lastInterval=n}else r=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;n.velocity=r,n.velocityX=a,n.velocityY=o,n.direction=s}function E2(i,n){var e=i.session,t=n.pointers,r=t.length;e.firstInput||(e.firstInput=qv(n)),r>1&&!e.firstMultiple?e.firstMultiple=qv(n):r===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=n.center=C$(t);n.timeStamp=nf(),n.deltaTime=n.timeStamp-a.timeStamp,n.angle=Kh(s,u),n.distance=us(s,u),b2(e,n),n.offsetDirection=A$(n.deltaX,n.deltaY);var l=x$(n.deltaTime,n.deltaX,n.deltaY);n.overallVelocityX=l.x,n.overallVelocityY=l.y,n.overallVelocity=hi(l.x)>hi(l.y)?l.x:l.y,n.scale=o?$2(o.pointers,t):1,n.rotation=o?w2(o.pointers,t):0,n.maxPointers=e.prevInput?n.pointers.length>e.prevInput.maxPointers?n.pointers.length:e.prevInput.maxPointers:n.pointers.length,_2(e,n);var h=i.element,d=n.srcEvent,f;d.composedPath?f=d.composedPath()[0]:d.path?f=d.path[0]:f=d.target,of(f,h)&&(h=f),n.target=h}function S2(i,n,e){var t=e.pointers.length,r=e.changedPointers.length,a=n&et&&t-r===0,o=n&(Pe|dt)&&t-r===0;e.isFirst=!!a,e.isFinal=!!o,a&&(i.session={}),e.eventType=n,E2(i,e),i.emit("hammer.input",e),i.recognize(e),i.session.prevInput=e}function Jn(i){return i.trim().split(/\s+/g)}function zn(i,n,e){rr(Jn(n),function(t){i.addEventListener(t,e,!1)})}function jn(i,n,e){rr(Jn(n),function(t){i.removeEventListener(t,e,!1)})}function Yv(i){var n=i.ownerDocument||i;return n.defaultView||n.parentWindow||window}var vn=function(){function i(e,t){var r=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){Js(e.options.enable,[e])&&r.handler(a)},this.init()}var n=i.prototype;return n.handler=function(){},n.init=function(){this.evEl&&zn(this.element,this.evEl,this.domHandler),this.evTarget&&zn(this.target,this.evTarget,this.domHandler),this.evWin&&zn(Yv(this.element),this.evWin,this.domHandler)},n.destroy=function(){this.evEl&&jn(this.element,this.evEl,this.domHandler),this.evTarget&&jn(this.target,this.evTarget,this.domHandler),this.evWin&&jn(Yv(this.element),this.evWin,this.domHandler)},i}();function di(i,n,e){if(i.indexOf&&!e)return i.indexOf(n);for(var t=0;t<i.length;){if(e&&i[t][e]==n||!e&&i[t]===n)return t;t++}return-1}var O2={pointerdown:et,pointermove:wi,pointerup:Pe,pointercancel:dt,pointerout:dt},T2={2:Aa,3:p2,4:af,5:g2},M$="pointerdown",D$="pointermove pointerup pointercancel";tr.MSPointerEvent&&!tr.PointerEvent&&(M$="MSPointerDown",D$="MSPointerMove MSPointerUp MSPointerCancel");var R$=function(i){Tt(n,i);function n(){var t,r=n.prototype;return r.evEl=M$,r.evWin=D$,t=i.apply(this,arguments)||this,t.store=t.manager.session.pointerEvents=[],t}var e=n.prototype;return e.handler=function(r){var a=this.store,o=!1,s=r.type.toLowerCase().replace("ms",""),u=O2[s],l=T2[r.pointerType]||r.pointerType,h=l===Aa,d=di(a,r.pointerId,"pointerId");u&et&&(r.button===0||h)?d<0&&(a.push(r),d=a.length-1):u&(Pe|dt)&&(o=!0),!(d<0)&&(a[d]=r,this.callback(this.manager,u,{pointers:a,changedPointers:[r],pointerType:l,srcEvent:r}),o&&a.splice(d,1))},n}(vn);function ea(i){return Array.prototype.slice.call(i,0)}function sf(i,n,e){for(var t=[],r=[],a=0;a<i.length;){var o=n?i[a][n]:i[a];di(r,o)<0&&t.push(i[a]),r[a]=o,a++}return e&&(n?t=t.sort(function(s,u){return s[n]>u[n]}):t=t.sort()),t}var k2={touchstart:et,touchmove:wi,touchend:Pe,touchcancel:dt},I2="touchstart touchmove touchend touchcancel",uf=function(i){Tt(n,i);function n(){var t;return n.prototype.evTarget=I2,t=i.apply(this,arguments)||this,t.targetIds={},t}var e=n.prototype;return e.handler=function(r){var a=k2[r.type],o=P2.call(this,r,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Aa,srcEvent:r})},n}(vn);function P2(i,n){var e=ea(i.touches),t=this.targetIds;if(n&(et|wi)&&e.length===1)return t[e[0].identifier]=!0,[e,e];var r,a,o=ea(i.changedTouches),s=[],u=this.target;if(a=e.filter(function(l){return of(l.target,u)}),n===et)for(r=0;r<a.length;)t[a[r].identifier]=!0,r++;for(r=0;r<o.length;)t[o[r].identifier]&&s.push(o[r]),n&(Pe|dt)&&delete t[o[r].identifier],r++;if(s.length)return[sf(a.concat(s),"identifier",!0),s]}var C2={mousedown:et,mousemove:wi,mouseup:Pe},A2="mousedown",x2="mousemove mouseup",lf=function(i){Tt(n,i);function n(){var t,r=n.prototype;return r.evEl=A2,r.evWin=x2,t=i.apply(this,arguments)||this,t.pressed=!1,t}var e=n.prototype;return e.handler=function(r){var a=C2[r.type];a&et&&r.button===0&&(this.pressed=!0),a&wi&&r.which!==1&&(a=Pe),this.pressed&&(a&Pe&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[r],changedPointers:[r],pointerType:af,srcEvent:r}))},n}(vn),M2=2500,Xv=25;function Qv(i){var n=i.changedPointers,e=n[0];if(e.identifier===this.primaryTouch){var t={x:e.clientX,y:e.clientY},r=this.lastTouches;this.lastTouches.push(t);var a=function(){var s=r.indexOf(t);s>-1&&r.splice(s,1)};setTimeout(a,M2)}}function D2(i,n){i&et?(this.primaryTouch=n.changedPointers[0].identifier,Qv.call(this,n)):i&(Pe|dt)&&Qv.call(this,n)}function R2(i){for(var n=i.srcEvent.clientX,e=i.srcEvent.clientY,t=0;t<this.lastTouches.length;t++){var r=this.lastTouches[t],a=Math.abs(n-r.x),o=Math.abs(e-r.y);if(a<=Xv&&o<=Xv)return!0}return!1}var F$=function(){var i=function(n){Tt(e,n);function e(r,a){var o;return o=n.call(this,r,a)||this,o.handler=function(s,u,l){var h=l.pointerType===Aa,d=l.pointerType===af;if(!(d&&l.sourceCapabilities&&l.sourceCapabilities.firesTouchEvents)){if(h)D2.call(yo(yo(o)),u,l);else if(d&&R2.call(yo(yo(o)),l))return;o.callback(s,u,l)}},o.touch=new uf(o.manager,o.handler),o.mouse=new lf(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}var t=e.prototype;return t.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(vn);return i}();function F2(i){var n,e=i.options.inputClass;return e?n=e:c2?n=R$:v2?n=uf:T$?n=F$:n=lf,new n(i,S2)}function Hi(i,n,e){return Array.isArray(i)?(rr(i,e[n],e),!0):!1}var Ho=1,St=2,Qi=4,xr=8,ir=xr,ta=16,Wt=32,N2=1;function B2(){return N2++}function bo(i,n){var e=n.manager;return e?e.get(i):i}function Zv(i){return i&ta?"cancel":i&xr?"end":i&Qi?"move":i&St?"start":""}var Ra=function(){function i(e){e===void 0&&(e={}),this.options=Dt({enable:!0},e),this.id=B2(),this.manager=null,this.state=Ho,this.simultaneous={},this.requireFail=[]}var n=i.prototype;return n.set=function(t){return li(this.options,t),this.manager&&this.manager.touchAction.update(),this},n.recognizeWith=function(t){if(Hi(t,"recognizeWith",this))return this;var r=this.simultaneous;return t=bo(t,this),r[t.id]||(r[t.id]=t,t.recognizeWith(this)),this},n.dropRecognizeWith=function(t){return Hi(t,"dropRecognizeWith",this)?this:(t=bo(t,this),delete this.simultaneous[t.id],this)},n.requireFailure=function(t){if(Hi(t,"requireFailure",this))return this;var r=this.requireFail;return t=bo(t,this),di(r,t)===-1&&(r.push(t),t.requireFailure(this)),this},n.dropRequireFailure=function(t){if(Hi(t,"dropRequireFailure",this))return this;t=bo(t,this);var r=di(this.requireFail,t);return r>-1&&this.requireFail.splice(r,1),this},n.hasRequireFailures=function(){return this.requireFail.length>0},n.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},n.emit=function(t){var r=this,a=this.state;function o(s){r.manager.emit(s,t)}a<xr&&o(r.options.event+Zv(a)),o(r.options.event),t.additionalEvent&&o(t.additionalEvent),a>=xr&&o(r.options.event+Zv(a))},n.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=Wt},n.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(Wt|Ho)))return!1;t++}return!0},n.recognize=function(t){var r=li({},t);if(!Js(this.options.enable,[this,r])){this.reset(),this.state=Wt;return}this.state&(ir|ta|Wt)&&(this.state=Ho),this.state=this.process(r),this.state&(St|Qi|xr|ta)&&this.tryEmit(r)},n.process=function(t){},n.getTouchAction=function(){},n.reset=function(){},i}(),qh=function(i){Tt(n,i);function n(t){var r;return t===void 0&&(t={}),r=i.call(this,Dt({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,r.pTime=!1,r.pCenter=!1,r._timer=null,r._input=null,r.count=0,r}var e=n.prototype;return e.getTouchAction=function(){return[Gh]},e.process=function(r){var a=this,o=this.options,s=r.pointers.length===o.pointers,u=r.distance<o.threshold,l=r.deltaTime<o.time;if(this.reset(),r.eventType&et&&this.count===0)return this.failTimeout();if(u&&l&&s){if(r.eventType!==Pe)return this.failTimeout();var h=this.pTime?r.timeStamp-this.pTime<o.interval:!0,d=!this.pCenter||us(this.pCenter,r.center)<o.posThreshold;this.pTime=r.timeStamp,this.pCenter=r.center,!d||!h?this.count=1:this.count+=1,this._input=r;var f=this.count%o.taps;if(f===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){a.state=ir,a.tryEmit()},o.interval),St):ir}return Wt},e.failTimeout=function(){var r=this;return this._timer=setTimeout(function(){r.state=Wt},this.options.interval),Wt},e.reset=function(){clearTimeout(this._timer)},e.emit=function(){this.state===ir&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},n}(Ra),Zi=function(i){Tt(n,i);function n(t){return t===void 0&&(t={}),i.call(this,Dt({pointers:1},t))||this}var e=n.prototype;return e.attrTest=function(r){var a=this.options.pointers;return a===0||r.pointers.length===a},e.process=function(r){var a=this.state,o=r.eventType,s=a&(St|Qi),u=this.attrTest(r);return s&&(o&dt||!u)?a|ta:s||u?o&Pe?a|xr:a&St?a|Qi:St:Wt},n}(Ra);function N$(i){return i===Xi?"down":i===Da?"up":i===xa?"left":i===Ma?"right":""}var hf=function(i){Tt(n,i);function n(t){var r;return t===void 0&&(t={}),r=i.call(this,Dt({event:"pan",threshold:10,pointers:1,direction:k$},t))||this,r.pX=null,r.pY=null,r}var e=n.prototype;return e.getTouchAction=function(){var r=this.options.direction,a=[];return r&Gt&&a.push(Zn),r&ti&&a.push(Qn),a},e.directionTest=function(r){var a=this.options,o=!0,s=r.distance,u=r.direction,l=r.deltaX,h=r.deltaY;return u&a.direction||(a.direction&Gt?(u=l===0?os:l<0?xa:Ma,o=l!==this.pX,s=Math.abs(r.deltaX)):(u=h===0?os:h<0?Da:Xi,o=h!==this.pY,s=Math.abs(r.deltaY))),r.direction=u,o&&s>a.threshold&&u&a.direction},e.attrTest=function(r){return Zi.prototype.attrTest.call(this,r)&&(this.state&St||!(this.state&St)&&this.directionTest(r))},e.emit=function(r){this.pX=r.deltaX,this.pY=r.deltaY;var a=N$(r.direction);a&&(r.additionalEvent=this.options.event+a),i.prototype.emit.call(this,r)},n}(Zi),B$=function(i){Tt(n,i);function n(t){return t===void 0&&(t={}),i.call(this,Dt({event:"swipe",threshold:10,velocity:.3,direction:Gt|ti,pointers:1},t))||this}var e=n.prototype;return e.getTouchAction=function(){return hf.prototype.getTouchAction.call(this)},e.attrTest=function(r){var a=this.options.direction,o;return a&(Gt|ti)?o=r.overallVelocity:a&Gt?o=r.overallVelocityX:a&ti&&(o=r.overallVelocityY),i.prototype.attrTest.call(this,r)&&a&r.offsetDirection&&r.distance>this.options.threshold&&r.maxPointers===this.options.pointers&&hi(o)>this.options.velocity&&r.eventType&Pe},e.emit=function(r){var a=N$(r.offsetDirection);a&&this.manager.emit(this.options.event+a,r),this.manager.emit(this.options.event,r)},n}(Zi),L$=function(i){Tt(n,i);function n(t){return t===void 0&&(t={}),i.call(this,Dt({event:"pinch",threshold:0,pointers:2},t))||this}var e=n.prototype;return e.getTouchAction=function(){return[ei]},e.attrTest=function(r){return i.prototype.attrTest.call(this,r)&&(Math.abs(r.scale-1)>this.options.threshold||this.state&St)},e.emit=function(r){if(r.scale!==1){var a=r.scale<1?"in":"out";r.additionalEvent=this.options.event+a}i.prototype.emit.call(this,r)},n}(Zi),z$=function(i){Tt(n,i);function n(t){return t===void 0&&(t={}),i.call(this,Dt({event:"rotate",threshold:0,pointers:2},t))||this}var e=n.prototype;return e.getTouchAction=function(){return[ei]},e.attrTest=function(r){return i.prototype.attrTest.call(this,r)&&(Math.abs(r.rotation)>this.options.threshold||this.state&St)},n}(Zi),j$=function(i){Tt(n,i);function n(t){var r;return t===void 0&&(t={}),r=i.call(this,Dt({event:"press",pointers:1,time:251,threshold:9},t))||this,r._timer=null,r._input=null,r}var e=n.prototype;return e.getTouchAction=function(){return[O$]},e.process=function(r){var a=this,o=this.options,s=r.pointers.length===o.pointers,u=r.distance<o.threshold,l=r.deltaTime>o.time;if(this._input=r,!u||!s||r.eventType&(Pe|dt)&&!l)this.reset();else if(r.eventType&et)this.reset(),this._timer=setTimeout(function(){a.state=ir,a.tryEmit()},o.time);else if(r.eventType&Pe)return ir;return Wt},e.reset=function(){clearTimeout(this._timer)},e.emit=function(r){this.state===ir&&(r&&r.eventType&Pe?this.manager.emit(this.options.event+"up",r):(this._input.timeStamp=nf(),this.manager.emit(this.options.event,this._input)))},n}(Ra),H$={domEvents:!1,touchAction:S$,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Jv=[[z$,{enable:!1}],[L$,{enable:!1},["rotate"]],[B$,{direction:Gt}],[hf,{direction:Gt},["swipe"]],[qh],[qh,{event:"doubletap",taps:2},["tap"]],[j$]],L2=1,ep=2;function tp(i,n){var e=i.element;if(e.style){var t;rr(i.options.cssProps,function(r,a){t=Zs(e.style,a),n?(i.oldCssProps[t]=e.style[t],e.style[t]=r):e.style[t]=i.oldCssProps[t]||""}),n||(i.oldCssProps={})}}function z2(i,n){var e=document.createEvent("Event");e.initEvent(i,!0,!0),e.gesture=n,n.target.dispatchEvent(e)}var rp=function(){function i(e,t){var r=this;this.options=li({},H$,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=F2(this),this.touchAction=new P$(this,this.options.touchAction),tp(this,!0),rr(this.options.recognizers,function(a){var o=r.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var n=i.prototype;return n.set=function(t){return li(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},n.stop=function(t){this.session.stopped=t?ep:L2},n.recognize=function(t){var r=this.session;if(!r.stopped){this.touchAction.preventDefaults(t);var a,o=this.recognizers,s=r.curRecognizer;(!s||s&&s.state&ir)&&(r.curRecognizer=null,s=null);for(var u=0;u<o.length;)a=o[u],r.stopped!==ep&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(t):a.reset(),!s&&a.state&(St|Qi|xr)&&(r.curRecognizer=a,s=a),u++}},n.get=function(t){if(t instanceof Ra)return t;for(var r=this.recognizers,a=0;a<r.length;a++)if(r[a].options.event===t)return r[a];return null},n.add=function(t){if(Hi(t,"add",this))return this;var r=this.get(t.options.event);return r&&this.remove(r),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},n.remove=function(t){if(Hi(t,"remove",this))return this;var r=this.get(t);if(t){var a=this.recognizers,o=di(a,r);o!==-1&&(a.splice(o,1),this.touchAction.update())}return this},n.on=function(t,r){if(t===void 0||r===void 0)return this;var a=this.handlers;return rr(Jn(t),function(o){a[o]=a[o]||[],a[o].push(r)}),this},n.off=function(t,r){if(t===void 0)return this;var a=this.handlers;return rr(Jn(t),function(o){r?a[o]&&a[o].splice(di(a[o],r),1):delete a[o]}),this},n.emit=function(t,r){this.options.domEvents&&z2(t,r);var a=this.handlers[t]&&this.handlers[t].slice();if(!(!a||!a.length)){r.type=t,r.preventDefault=function(){r.srcEvent.preventDefault()};for(var o=0;o<a.length;)a[o](r),o++}},n.destroy=function(){this.element&&tp(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},i}(),j2={touchstart:et,touchmove:wi,touchend:Pe,touchcancel:dt},H2="touchstart",W2="touchstart touchmove touchend touchcancel",V2=function(i){Tt(n,i);function n(){var t,r=n.prototype;return r.evTarget=H2,r.evWin=W2,t=i.apply(this,arguments)||this,t.started=!1,t}var e=n.prototype;return e.handler=function(r){var a=j2[r.type];if(a===et&&(this.started=!0),!!this.started){var o=U2.call(this,r,a);a&(Pe|dt)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:Aa,srcEvent:r})}},n}(vn);function U2(i,n){var e=ea(i.touches),t=ea(i.changedTouches);return n&(Pe|dt)&&(e=sf(e.concat(t),"identifier",!0)),[e,t]}function W$(i,n,e){var t="DEPRECATED METHOD: "+n+`
|
|
34
|
-
`+e+` AT
|
|
35
|
-
`;return function(){var r=new Error("get-stack-trace"),a=r&&r.stack?r.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,t,a),i.apply(this,arguments)}}var V$=W$(function(i,n,e){for(var t=Object.keys(n),r=0;r<t.length;)(!e||e&&i[t[r]]===void 0)&&(i[t[r]]=n[t[r]]),r++;return i},"extend","Use `assign`."),G2=W$(function(i,n){return V$(i,n,!0)},"merge","Use `assign`.");function K2(i,n,e){var t=n.prototype,r;r=i.prototype=Object.create(t),r.constructor=i,r._super=t,e&&li(r,e)}function ip(i,n){return function(){return i.apply(n,arguments)}}var q2=function(){var i=function(e,t){return t===void 0&&(t={}),new rp(e,Dt({recognizers:Jv.concat()},t))};return i.VERSION="2.0.17-rc",i.DIRECTION_ALL=k$,i.DIRECTION_DOWN=Xi,i.DIRECTION_LEFT=xa,i.DIRECTION_RIGHT=Ma,i.DIRECTION_UP=Da,i.DIRECTION_HORIZONTAL=Gt,i.DIRECTION_VERTICAL=ti,i.DIRECTION_NONE=os,i.DIRECTION_DOWN=Xi,i.INPUT_START=et,i.INPUT_MOVE=wi,i.INPUT_END=Pe,i.INPUT_CANCEL=dt,i.STATE_POSSIBLE=Ho,i.STATE_BEGAN=St,i.STATE_CHANGED=Qi,i.STATE_ENDED=xr,i.STATE_RECOGNIZED=ir,i.STATE_CANCELLED=ta,i.STATE_FAILED=Wt,i.Manager=rp,i.Input=vn,i.TouchAction=P$,i.TouchInput=uf,i.MouseInput=lf,i.PointerEventInput=R$,i.TouchMouseInput=F$,i.SingleTouchInput=V2,i.Recognizer=Ra,i.AttrRecognizer=Zi,i.Tap=qh,i.Pan=hf,i.Swipe=B$,i.Pinch=L$,i.Rotate=z$,i.Press=j$,i.on=zn,i.off=jn,i.each=rr,i.merge=G2,i.extend=V$,i.bindFn=ip,i.assign=li,i.inherit=K2,i.bindFn=ip,i.prefixed=Zs,i.toArray=ea,i.inArray=di,i.uniqueArray=sf,i.splitStr=Jn,i.boolOrFn=Js,i.hasParent=of,i.addEventListeners=zn,i.removeEventListeners=jn,i.defaults=li({},H$,{preset:Jv}),i}(),Y2=q2;function U$(i,n){var e=typeof Ys<"u"&&Oa(i)||i["@@iterator"];if(!e){if(pt(i)||(e=X2(i))||n&&i&&typeof i.length=="number"){e&&(i=e);var t=0,r=function(){};return{s:r,n:function(){return t>=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
36
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function X2(i,n){var e;if(i){if(typeof i=="string")return np(i,n);var t=Qs(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return qd(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return np(i,n)}}function np(i,n){(n==null||n>i.length)&&(n=i.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=i[e];return t}var G$=Ys("DELETE");function Q2(i){for(var n,e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return K$.apply(void 0,Xs(n=[{},i]).call(n,t))}function K$(){var i=ls.apply(void 0,arguments);return Y$(i),i}function ls(){for(var i=arguments.length,n=new Array(i),e=0;e<i;e++)n[e]=arguments[e];if(n.length<2)return n[0];if(n.length>2){var t;return ls.apply(void 0,Xs(t=[K$(n[0],n[1])]).call(t,st(Qs(n).call(n,2))))}var r=n[0],a=n[1],o=U$(xM(a)),s;try{for(o.s();!(s=o.n()).done;){var u=s.value;Object.prototype.propertyIsEnumerable.call(a,u)&&(a[u]===G$?delete r[u]:r[u]!==null&&a[u]!==null&<(r[u])==="object"&<(a[u])==="object"&&!pt(r[u])&&!pt(a[u])?r[u]=ls(r[u],a[u]):r[u]=q$(a[u]))}}catch(l){o.e(l)}finally{o.f()}return r}function q$(i){return pt(i)?Pt(i).call(i,function(n){return q$(n)}):lt(i)==="object"&&i!==null?ls({},i):i}function Y$(i){for(var n=0,e=tf(i);n<e.length;n++){var t=e[n];i[t]===G$?delete i[t]:lt(i[t])==="object"&&i[t]!==null&&Y$(i[t])}}function Z2(){var i=function(){};return{on:i,off:i,destroy:i,emit:i,get:function(){return{set:i}}}}var J2=typeof window<"u"?window.Hammer||Y2:function(){return Z2()};function Zt(i){var n=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:i,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){n._dom.overlay.parentNode.removeChild(n._dom.overlay)});var t=J2(this._dom.overlay);t.on("tap",nb(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){t.destroy()});var r=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];ui(r).call(r,function(a){t.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){eN(a.target,i)||n.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",n._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&n.deactivate()}}u2(Zt.prototype);Zt.current=null;Zt.prototype.destroy=function(){var i,n;this.deactivate();var e=U$(mD(i=v$(n=this._cleanupQueue).call(n,0)).call(i)),t;try{for(e.s();!(t=e.n()).done;){var r=t.value;r()}}catch(a){e.e(a)}finally{e.f()}};Zt.prototype.activate=function(){Zt.current&&Zt.current.deactivate(),Zt.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};Zt.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};Zt.prototype._onTapOverlay=function(i){this.activate(),i.srcEvent.stopPropagation()};function eN(i,n){for(;i;){if(i===n)return!0;i=i.parentNode}return!1}var tN=q,rN=Ns,iN=Ps,nN=tN.TypeError,aN=function(i){if(rN(i))return i;throw nN(iN(i)+" is not a constructor")},oN=J,sN=vr,fl=on,uN=ib,ap=aN,lN=Nt,op=rt,hN=hn,X$=pe,df=sN("Reflect","construct"),dN=Object.prototype,fN=[].push,Q$=X$(function(){function i(){}return!(df(function(){},[],i)instanceof i)}),Z$=!X$(function(){df(function(){})}),sp=Q$||Z$;oN({target:"Reflect",stat:!0,forced:sp,sham:sp},{construct:function(n,e){ap(n),lN(e);var t=arguments.length<3?n:ap(arguments[2]);if(Z$&&!Q$)return df(n,e,t);if(n==t){switch(e.length){case 0:return new n;case 1:return new n(e[0]);case 2:return new n(e[0],e[1]);case 3:return new n(e[0],e[1],e[2]);case 4:return new n(e[0],e[1],e[2],e[3])}var r=[null];return fl(fN,r,e),new(fl(uN,n,r))}var a=t.prototype,o=hN(op(a)?a:dN),s=fl(n,o,e);return op(s)?s:o}});var cN=be,vN=cN.Reflect.construct,pN=vN,gN=pN,Wo=gN;function Kr(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}var yN=$$,mN=yN,bN=mN,$N=bN,wN=$N,_N=J,EN=HI;_N({target:"Object",stat:!0},{setPrototypeOf:EN});var SN=be,ON=SN.Object.setPrototypeOf,TN=ON,kN=TN,IN=kN,PN=IN,CN=PN,AN=CN,J$=AN;function Yh(i,n){return Yh=J$||function(t,r){return t.__proto__=r,t},Yh(i,n)}function xN(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=wN(n&&n.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Ms(i,"prototype",{writable:!1}),n&&Yh(i,n)}function MN(i,n){if(n&&(lt(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Kr(i)}var DN=xR,RN=DN,FN=RN,NN=FN,up=NN;function hs(i){return hs=J$?up:function(e){return e.__proto__||up(e)},hs(i)}var e1={exports:{}};(function(i){var n=function(e){var t=Object.prototype,r=t.hasOwnProperty,a,o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function h(C,I,N){return Object.defineProperty(C,I,{value:N,enumerable:!0,configurable:!0,writable:!0}),C[I]}try{h({},"")}catch{h=function(I,N,V){return I[N]=V}}function d(C,I,N,V){var B=I&&I.prototype instanceof $?I:$,Q=Object.create(B.prototype),ie=new X(V||[]);return Q._invoke=F(C,N,ie),Q}e.wrap=d;function f(C,I,N){try{return{type:"normal",arg:C.call(I,N)}}catch(V){return{type:"throw",arg:V}}}var c="suspendedStart",v="suspendedYield",g="executing",b="completed",p={};function $(){}function y(){}function m(){}var _={};h(_,s,function(){return this});var O=Object.getPrototypeOf,k=O&&O(O(te([])));k&&k!==t&&r.call(k,s)&&(_=k);var S=m.prototype=$.prototype=Object.create(_);y.prototype=m,h(S,"constructor",m),h(m,"constructor",y),y.displayName=h(m,l,"GeneratorFunction");function w(C){["next","throw","return"].forEach(function(I){h(C,I,function(N){return this._invoke(I,N)})})}e.isGeneratorFunction=function(C){var I=typeof C=="function"&&C.constructor;return I?I===y||(I.displayName||I.name)==="GeneratorFunction":!1},e.mark=function(C){return Object.setPrototypeOf?Object.setPrototypeOf(C,m):(C.__proto__=m,h(C,l,"GeneratorFunction")),C.prototype=Object.create(S),C},e.awrap=function(C){return{__await:C}};function E(C,I){function N(Q,ie,le,Fe){var $e=f(C[Q],C,ie);if($e.type==="throw")Fe($e.arg);else{var qe=$e.arg,Wr=qe.value;return Wr&&typeof Wr=="object"&&r.call(Wr,"__await")?I.resolve(Wr.__await).then(function(Vr){N("next",Vr,le,Fe)},function(Vr){N("throw",Vr,le,Fe)}):I.resolve(Wr).then(function(Vr){qe.value=Vr,le(qe)},function(Vr){return N("throw",Vr,le,Fe)})}}var V;function B(Q,ie){function le(){return new I(function(Fe,$e){N(Q,ie,Fe,$e)})}return V=V?V.then(le,le):le()}this._invoke=B}w(E.prototype),h(E.prototype,u,function(){return this}),e.AsyncIterator=E,e.async=function(C,I,N,V,B){B===void 0&&(B=Promise);var Q=new E(d(C,I,N,V),B);return e.isGeneratorFunction(I)?Q:Q.next().then(function(ie){return ie.done?ie.value:Q.next()})};function F(C,I,N){var V=c;return function(Q,ie){if(V===g)throw new Error("Generator is already running");if(V===b){if(Q==="throw")throw ie;return ne()}for(N.method=Q,N.arg=ie;;){var le=N.delegate;if(le){var Fe=H(le,N);if(Fe){if(Fe===p)continue;return Fe}}if(N.method==="next")N.sent=N._sent=N.arg;else if(N.method==="throw"){if(V===c)throw V=b,N.arg;N.dispatchException(N.arg)}else N.method==="return"&&N.abrupt("return",N.arg);V=g;var $e=f(C,I,N);if($e.type==="normal"){if(V=N.done?b:v,$e.arg===p)continue;return{value:$e.arg,done:N.done}}else $e.type==="throw"&&(V=b,N.method="throw",N.arg=$e.arg)}}}function H(C,I){var N=C.iterator[I.method];if(N===a){if(I.delegate=null,I.method==="throw"){if(C.iterator.return&&(I.method="return",I.arg=a,H(C,I),I.method==="throw"))return p;I.method="throw",I.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var V=f(N,C.iterator,I.arg);if(V.type==="throw")return I.method="throw",I.arg=V.arg,I.delegate=null,p;var B=V.arg;if(!B)return I.method="throw",I.arg=new TypeError("iterator result is not an object"),I.delegate=null,p;if(B.done)I[C.resultName]=B.value,I.next=C.nextLoc,I.method!=="return"&&(I.method="next",I.arg=a);else return B;return I.delegate=null,p}w(S),h(S,l,"Generator"),h(S,s,function(){return this}),h(S,"toString",function(){return"[object Generator]"});function z(C){var I={tryLoc:C[0]};1 in C&&(I.catchLoc=C[1]),2 in C&&(I.finallyLoc=C[2],I.afterLoc=C[3]),this.tryEntries.push(I)}function K(C){var I=C.completion||{};I.type="normal",delete I.arg,C.completion=I}function X(C){this.tryEntries=[{tryLoc:"root"}],C.forEach(z,this),this.reset(!0)}e.keys=function(C){var I=[];for(var N in C)I.push(N);return I.reverse(),function V(){for(;I.length;){var B=I.pop();if(B in C)return V.value=B,V.done=!1,V}return V.done=!0,V}};function te(C){if(C){var I=C[s];if(I)return I.call(C);if(typeof C.next=="function")return C;if(!isNaN(C.length)){var N=-1,V=function B(){for(;++N<C.length;)if(r.call(C,N))return B.value=C[N],B.done=!1,B;return B.value=a,B.done=!0,B};return V.next=V}}return{next:ne}}e.values=te;function ne(){return{value:a,done:!0}}return X.prototype={constructor:X,reset:function(C){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(K),!C)for(var I in this)I.charAt(0)==="t"&&r.call(this,I)&&!isNaN(+I.slice(1))&&(this[I]=a)},stop:function(){this.done=!0;var C=this.tryEntries[0],I=C.completion;if(I.type==="throw")throw I.arg;return this.rval},dispatchException:function(C){if(this.done)throw C;var I=this;function N(Fe,$e){return Q.type="throw",Q.arg=C,I.next=Fe,$e&&(I.method="next",I.arg=a),!!$e}for(var V=this.tryEntries.length-1;V>=0;--V){var B=this.tryEntries[V],Q=B.completion;if(B.tryLoc==="root")return N("end");if(B.tryLoc<=this.prev){var ie=r.call(B,"catchLoc"),le=r.call(B,"finallyLoc");if(ie&&le){if(this.prev<B.catchLoc)return N(B.catchLoc,!0);if(this.prev<B.finallyLoc)return N(B.finallyLoc)}else if(ie){if(this.prev<B.catchLoc)return N(B.catchLoc,!0)}else if(le){if(this.prev<B.finallyLoc)return N(B.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(C,I){for(var N=this.tryEntries.length-1;N>=0;--N){var V=this.tryEntries[N];if(V.tryLoc<=this.prev&&r.call(V,"finallyLoc")&&this.prev<V.finallyLoc){var B=V;break}}B&&(C==="break"||C==="continue")&&B.tryLoc<=I&&I<=B.finallyLoc&&(B=null);var Q=B?B.completion:{};return Q.type=C,Q.arg=I,B?(this.method="next",this.next=B.finallyLoc,p):this.complete(Q)},complete:function(C,I){if(C.type==="throw")throw C.arg;return C.type==="break"||C.type==="continue"?this.next=C.arg:C.type==="return"?(this.rval=this.arg=C.arg,this.method="return",this.next="end"):C.type==="normal"&&I&&(this.next=I),p},finish:function(C){for(var I=this.tryEntries.length-1;I>=0;--I){var N=this.tryEntries[I];if(N.finallyLoc===C)return this.complete(N.completion,N.afterLoc),K(N),p}},catch:function(C){for(var I=this.tryEntries.length-1;I>=0;--I){var N=this.tryEntries[I];if(N.tryLoc===C){var V=N.completion;if(V.type==="throw"){var B=V.arg;K(N)}return B}}throw new Error("illegal catch attempt")},delegateYield:function(C,I,N){return this.delegate={iterator:te(C),resultName:I,nextLoc:N},this.method==="next"&&(this.arg=a),p}},e}(i.exports);try{regeneratorRuntime=n}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}})(e1);var nt=e1.exports,ff={exports:{}},BN=pe,LN=BN(function(){if(typeof ArrayBuffer=="function"){var i=new ArrayBuffer(8);Object.isExtensible(i)&&Object.defineProperty(i,"a",{value:8})}}),zN=pe,jN=rt,HN=yi,lp=LN,Vo=Object.isExtensible,WN=zN(function(){Vo(1)}),VN=WN||lp?function(n){return!jN(n)||lp&&HN(n)=="ArrayBuffer"?!1:Vo?Vo(n):!0}:Vo,UN=pe,GN=!UN(function(){return Object.isExtensible(Object.preventExtensions({}))}),KN=J,qN=he,YN=$a,XN=rt,cf=Ye,QN=gt.f,hp=Ta,ZN=Yd,vf=VN,JN=As,eB=GN,t1=!1,dr=JN("meta"),tB=0,pf=function(i){QN(i,dr,{value:{objectID:"O"+tB++,weakData:{}}})},rB=function(i,n){if(!XN(i))return typeof i=="symbol"?i:(typeof i=="string"?"S":"P")+i;if(!cf(i,dr)){if(!vf(i))return"F";if(!n)return"E";pf(i)}return i[dr].objectID},iB=function(i,n){if(!cf(i,dr)){if(!vf(i))return!0;if(!n)return!1;pf(i)}return i[dr].weakData},nB=function(i){return eB&&t1&&vf(i)&&!cf(i,dr)&&pf(i),i},aB=function(){oB.enable=function(){},t1=!0;var i=hp.f,n=qN([].splice),e={};e[dr]=1,i(e).length&&(hp.f=function(t){for(var r=i(t),a=0,o=r.length;a<o;a++)if(r[a]===dr){n(r,a,1);break}return r},KN({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:ZN.f}))},oB=ff.exports={enable:aB,fastKey:rB,getWeakData:iB,onFreeze:nB};YN[dr]=!0;var sB=q,uB=sn,lB=Xt,hB=Nt,dB=Ps,fB=Ob,cB=yt,dp=ze,vB=Kd,pB=Hs,fp=Sb,gB=sB.TypeError,Uo=function(i,n){this.stopped=i,this.result=n},cp=Uo.prototype,r1=function(i,n,e){var t=e&&e.that,r=!!(e&&e.AS_ENTRIES),a=!!(e&&e.IS_ITERATOR),o=!!(e&&e.INTERRUPTED),s=uB(n,t),u,l,h,d,f,c,v,g=function(p){return u&&fp(u,"normal",p),new Uo(!0,p)},b=function(p){return r?(hB(p),o?s(p[0],p[1],g):s(p[0],p[1])):o?s(p,g):s(p)};if(a)u=i;else{if(l=pB(i),!l)throw gB(dB(i)+" is not iterable");if(fB(l)){for(h=0,d=cB(i);d>h;h++)if(f=b(i[h]),f&&dp(cp,f))return f;return new Uo(!1)}u=vB(i,l)}for(c=u.next;!(v=lB(c,u)).done;){try{f=b(v.value)}catch(p){fp(u,"throw",p)}if(typeof f=="object"&&f&&dp(cp,f))return f}return new Uo(!1)},yB=q,mB=ze,bB=yB.TypeError,i1=function(i,n){if(mB(n,i))return i;throw bB("Incorrect invocation")},$B=J,wB=q,_B=ff.exports,EB=pe,SB=un,OB=r1,TB=i1,kB=Ge,IB=rt,PB=Sa,CB=gt.f,AB=ln.forEach,xB=Le,n1=wa,MB=n1.set,DB=n1.getterFor,a1=function(i,n,e){var t=i.indexOf("Map")!==-1,r=i.indexOf("Weak")!==-1,a=t?"set":"add",o=wB[i],s=o&&o.prototype,u={},l;if(!xB||!kB(o)||!(r||s.forEach&&!EB(function(){new o().entries().next()})))l=e.getConstructor(n,i,t,a),_B.enable();else{l=n(function(f,c){MB(TB(f,h),{type:i,collection:new o}),c!=null&&OB(c,f[a],{that:f,AS_ENTRIES:t})});var h=l.prototype,d=DB(i);AB(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(f){var c=f=="add"||f=="set";f in s&&!(r&&f=="clear")&&SB(h,f,function(v,g){var b=d(this).collection;if(!c&&r&&!IB(v))return f=="get"?void 0:!1;var p=b[f](v===0?0:v,g);return c?this:p})}),r||CB(h,"size",{configurable:!0,get:function(){return d(this).collection.size}})}return PB(l,i,!1,!0),u[i]=l,$B({global:!0,forced:!0},u),r||e.setStrong(l,i,t),l},RB=js,FB=function(i,n,e){for(var t in n)e&&e.unsafe&&i[t]?i[t]=n[t]:RB(i,t,n[t],e);return i},NB=vr,BB=gt,LB=De,zB=Le,vp=LB("species"),jB=function(i){var n=NB(i),e=BB.f;zB&&n&&!n[vp]&&e(n,vp,{configurable:!0,get:function(){return this}})},HB=gt.f,WB=hn,pp=FB,VB=sn,UB=i1,GB=r1,KB=Gd,qB=jB,Pn=Le,gp=ff.exports.fastKey,o1=wa,yp=o1.set,cl=o1.getterFor,s1={getConstructor:function(i,n,e,t){var r=i(function(l,h){UB(l,a),yp(l,{type:n,index:WB(null),first:void 0,last:void 0,size:0}),Pn||(l.size=0),h!=null&&GB(h,l[t],{that:l,AS_ENTRIES:e})}),a=r.prototype,o=cl(n),s=function(l,h,d){var f=o(l),c=u(l,h),v,g;return c?c.value=d:(f.last=c={index:g=gp(h,!0),key:h,value:d,previous:v=f.last,next:void 0,removed:!1},f.first||(f.first=c),v&&(v.next=c),Pn?f.size++:l.size++,g!=="F"&&(f.index[g]=c)),l},u=function(l,h){var d=o(l),f=gp(h),c;if(f!=="F")return d.index[f];for(c=d.first;c;c=c.next)if(c.key==h)return c};return pp(a,{clear:function(){for(var h=this,d=o(h),f=d.index,c=d.first;c;)c.removed=!0,c.previous&&(c.previous=c.previous.next=void 0),delete f[c.index],c=c.next;d.first=d.last=void 0,Pn?d.size=0:h.size=0},delete:function(l){var h=this,d=o(h),f=u(h,l);if(f){var c=f.next,v=f.previous;delete d.index[f.index],f.removed=!0,v&&(v.next=c),c&&(c.previous=v),d.first==f&&(d.first=c),d.last==f&&(d.last=v),Pn?d.size--:h.size--}return!!f},forEach:function(h){for(var d=o(this),f=VB(h,arguments.length>1?arguments[1]:void 0),c;c=c?c.next:d.first;)for(f(c.value,c.key,this);c&&c.removed;)c=c.previous},has:function(h){return!!u(this,h)}}),pp(a,e?{get:function(h){var d=u(this,h);return d&&d.value},set:function(h,d){return s(this,h===0?0:h,d)}}:{add:function(h){return s(this,h=h===0?0:h,h)}}),Pn&&HB(a,"size",{get:function(){return o(this).size}}),r},setStrong:function(i,n,e){var t=n+" Iterator",r=cl(n),a=cl(t);KB(i,n,function(o,s){yp(this,{type:t,target:o,state:r(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,u=o.last;u&&u.removed;)u=u.previous;return!o.target||!(o.last=u=u?u.next:o.state.first)?(o.target=void 0,{value:void 0,done:!0}):s=="keys"?{value:u.key,done:!1}:s=="values"?{value:u.value,done:!1}:{value:[u.key,u.value],done:!1}},e?"entries":"values",!e,!0),qB(n)}},YB=a1,XB=s1;YB("Map",function(i){return function(){return i(this,arguments.length?arguments[0]:void 0)}},XB);var QB=be,ZB=QB.Map,JB=ZB,eL=JB,u1=eL,tL=J,rL=ln.some,iL=ma,nL=iL("some");tL({target:"Array",proto:!0,forced:!nL},{some:function(n){return rL(this,n,arguments.length>1?arguments[1]:void 0)}});var aL=xe,oL=aL("Array").some,sL=ze,uL=oL,vl=Array.prototype,lL=function(i){var n=i.some;return i===vl||sL(vl,i)&&n===vl.some?uL:n},hL=lL,dL=hL,fL=dL,cL=xe,vL=cL("Array").keys,pL=vL,gL=pL,yL=pr,mL=Ye,bL=ze,$L=gL,pl=Array.prototype,wL={DOMTokenList:!0,NodeList:!0},_L=function(i){var n=i.keys;return i===pl||bL(pl,i)&&n===pl.keys||mL(wL,yL(i))?$L:n},xi=_L,mp=Ab,EL=Math.floor,Xh=function(i,n){var e=i.length,t=EL(e/2);return e<8?SL(i,n):OL(i,Xh(mp(i,0,t),n),Xh(mp(i,t),n),n)},SL=function(i,n){for(var e=i.length,t=1,r,a;t<e;){for(a=t,r=i[t];a&&n(i[a-1],r)>0;)i[a]=i[--a];a!==t++&&(i[a]=r)}return i},OL=function(i,n,e,t){for(var r=n.length,a=e.length,o=0,s=0;o<r||s<a;)i[o+s]=o<r&&s<a?t(n[o],e[s])<=0?n[o++]:e[s++]:o<r?n[o++]:e[s++];return i},TL=Xh,kL=pa,bp=kL.match(/firefox\/(\d+)/i),IL=!!bp&&+bp[1],PL=pa,CL=/MSIE|Trident/.test(PL),AL=pa,$p=AL.match(/AppleWebKit\/(\d+)\./),xL=!!$p&&+$p[1],ML=J,l1=he,DL=mi,RL=ct,FL=yt,wp=$i,gf=pe,NL=TL,BL=ma,_p=IL,LL=CL,Ep=ga,Sp=xL,Ir=[],Op=l1(Ir.sort),zL=l1(Ir.push),jL=gf(function(){Ir.sort(void 0)}),HL=gf(function(){Ir.sort(null)}),WL=BL("sort"),h1=!gf(function(){if(Ep)return Ep<70;if(!(_p&&_p>3)){if(LL)return!0;if(Sp)return Sp<603;var i="",n,e,t,r;for(n=65;n<76;n++){switch(e=String.fromCharCode(n),n){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(r=0;r<47;r++)Ir.push({k:e+r,v:t})}for(Ir.sort(function(a,o){return o.v-a.v}),r=0;r<Ir.length;r++)e=Ir[r].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return i!=="DGBEFHACIJK"}}),VL=jL||!HL||!WL||!h1,UL=function(i){return function(n,e){return e===void 0?-1:n===void 0?1:i!==void 0?+i(n,e)||0:wp(n)>wp(e)?1:-1}};ML({target:"Array",proto:!0,forced:VL},{sort:function(n){n!==void 0&&DL(n);var e=RL(this);if(h1)return n===void 0?Op(e):Op(e,n);var t=[],r=FL(e),a,o;for(o=0;o<r;o++)o in e&&zL(t,e[o]);for(NL(t,UL(n)),a=t.length,o=0;o<a;)e[o]=t[o++];for(;o<r;)delete e[o++];return e}});var GL=xe,KL=GL("Array").sort,qL=ze,YL=KL,gl=Array.prototype,XL=function(i){var n=i.sort;return i===gl||qL(gl,i)&&n===gl.sort?YL:n},QL=XL,ZL=QL,Qh=ZL,JL=xe,ez=JL("Array").values,tz=ez,rz=tz,iz=pr,nz=Ye,az=ze,oz=rz,yl=Array.prototype,sz={DOMTokenList:!0,NodeList:!0},uz=function(i){var n=i.values;return i===yl||az(yl,i)&&n===yl.values||nz(sz,iz(i))?oz:n},Tp=uz,Gi=d$,lz=xe,hz=lz("Array").entries,dz=hz,fz=dz,cz=pr,vz=Ye,pz=ze,gz=fz,ml=Array.prototype,yz={DOMTokenList:!0,NodeList:!0},mz=function(i){var n=i.entries;return i===ml||pz(ml,i)&&n===ml.entries||vz(yz,cz(i))?gz:n},bz=mz,$o,$z=new Uint8Array(16);function wz(){if(!$o&&($o=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!$o))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $o($z)}var _z=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Ez(i){return typeof i=="string"&&_z.test(i)}var Ve=[];for(var bl=0;bl<256;++bl)Ve.push((bl+256).toString(16).substr(1));function Sz(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=(Ve[i[n+0]]+Ve[i[n+1]]+Ve[i[n+2]]+Ve[i[n+3]]+"-"+Ve[i[n+4]]+Ve[i[n+5]]+"-"+Ve[i[n+6]]+Ve[i[n+7]]+"-"+Ve[i[n+8]]+Ve[i[n+9]]+"-"+Ve[i[n+10]]+Ve[i[n+11]]+Ve[i[n+12]]+Ve[i[n+13]]+Ve[i[n+14]]+Ve[i[n+15]]).toLowerCase();if(!Ez(e))throw TypeError("Stringified UUID is invalid");return e}function Oz(i,n,e){i=i||{};var t=i.random||(i.rng||wz)();if(t[6]=t[6]&15|64,t[8]=t[8]&63|128,n){e=e||0;for(var r=0;r<16;++r)n[e+r]=t[r];return n}return Sz(t)}function kp(i){return typeof i=="string"||typeof i=="number"}var Tz=function(){function i(n){ks(this,i),Ee(this,"delay",void 0),Ee(this,"max",void 0),Ee(this,"_queue",[]),Ee(this,"_timeout",null),Ee(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(n)}return Ds(i,[{key:"setOptions",value:function(e){e&&typeof e.delay<"u"&&(this.delay=e.delay),e&&typeof e.max<"u"&&(this.max=e.max),this._flushIfNeeded()}},{key:"destroy",value:function(){if(this.flush(),this._extended){for(var e=this._extended.object,t=this._extended.methods,r=0;r<t.length;r++){var a=t[r];a.original?e[a.name]=a.original:delete e[a.name]}this._extended=null}}},{key:"replace",value:function(e,t){var r=this,a=e[t];if(!a)throw new Error("Method "+t+" undefined");e[t]=function(){for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];r.queue({args:s,fn:a,context:this})}}},{key:"queue",value:function(e){typeof e=="function"?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}},{key:"_flushIfNeeded",value:function(){var e=this;this._queue.length>this.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=t2(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e,t;ui(e=v$(t=this._queue).call(t,0)).call(e,function(r){r.fn.apply(r.context||r.fn,r.args||[])})}}],[{key:"extend",value:function(e,t){var r=new i(t);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=function(){r.flush()};var a=[{name:"flush",original:void 0}];if(t&&t.replace)for(var o=0;o<t.replace.length;o++){var s=t.replace[o];a.push({name:s,original:e[s]}),r.replace(e,s)}return r._extended={object:e,methods:a},r}}]),i}(),kz=function(){function i(){ks(this,i),Ee(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),Ee(this,"subscribe",i.prototype.on),Ee(this,"unsubscribe",i.prototype.off)}return Ds(i,[{key:"_trigger",value:function(e,t,r){var a,o;if(e==="*")throw new Error("Cannot trigger event *");ui(a=Xs(o=[]).call(o,st(this._subscribers[e]),st(this._subscribers["*"]))).call(a,function(s){s(e,t,r??null)})}},{key:"on",value:function(e,t){typeof t=="function"&&this._subscribers[e].push(t)}},{key:"off",value:function(e,t){var r;this._subscribers[e]=Li(r=this._subscribers[e]).call(r,function(a){return a!==t})}}]),i}(),Iz=a1,Pz=s1;Iz("Set",function(i){return function(){return i(this,arguments.length?arguments[0]:void 0)}},Pz);var Cz=be,Az=Cz.Set,xz=Az,Mz=xz,$l=Mz,Dz=Kd,Rz=Dz,Fz=Rz,Nz=Fz,Bz=Nz,Lz=Bz,zz=Lz,jz=zz,wl=jz,d1;function jt(i,n){var e=typeof Ys<"u"&&Oa(i)||i["@@iterator"];if(!e){if(pt(i)||(e=Hz(i))||n&&i&&typeof i.length=="number"){e&&(i=e);var t=0,r=function(){};return{s:r,n:function(){return t>=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
37
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Hz(i,n){var e;if(i){if(typeof i=="string")return Ip(i,n);var t=Qs(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return qd(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ip(i,n)}}function Ip(i,n){(n==null||n>i.length)&&(n=i.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=i[e];return t}d1=Gi;var Pp=function(){function i(n){ks(this,i),Ee(this,"_pairs",void 0),this._pairs=n}return Ds(i,[{key:d1,value:nt.mark(function n(){var e,t,r,a,o;return nt.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:e=jt(this._pairs),u.prev=1,e.s();case 3:if((t=e.n()).done){u.next=9;break}return r=it(t.value,2),a=r[0],o=r[1],u.next=7,[a,o];case 7:u.next=3;break;case 9:u.next=14;break;case 11:u.prev=11,u.t0=u.catch(1),e.e(u.t0);case 14:return u.prev=14,e.f(),u.finish(14);case 17:case"end":return u.stop()}},n,this,[[1,11,14,17]])})},{key:"entries",value:nt.mark(function n(){var e,t,r,a,o;return nt.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:e=jt(this._pairs),u.prev=1,e.s();case 3:if((t=e.n()).done){u.next=9;break}return r=it(t.value,2),a=r[0],o=r[1],u.next=7,[a,o];case 7:u.next=3;break;case 9:u.next=14;break;case 11:u.prev=11,u.t0=u.catch(1),e.e(u.t0);case 14:return u.prev=14,e.f(),u.finish(14);case 17:case"end":return u.stop()}},n,this,[[1,11,14,17]])})},{key:"keys",value:nt.mark(function n(){var e,t,r,a;return nt.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=jt(this._pairs),s.prev=1,e.s();case 3:if((t=e.n()).done){s.next=9;break}return r=it(t.value,1),a=r[0],s.next=7,a;case 7:s.next=3;break;case 9:s.next=14;break;case 11:s.prev=11,s.t0=s.catch(1),e.e(s.t0);case 14:return s.prev=14,e.f(),s.finish(14);case 17:case"end":return s.stop()}},n,this,[[1,11,14,17]])})},{key:"values",value:nt.mark(function n(){var e,t,r,a;return nt.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=jt(this._pairs),s.prev=1,e.s();case 3:if((t=e.n()).done){s.next=9;break}return r=it(t.value,2),a=r[1],s.next=7,a;case 7:s.next=3;break;case 9:s.next=14;break;case 11:s.prev=11,s.t0=s.catch(1),e.e(s.t0);case 14:return s.prev=14,e.f(),s.finish(14);case 17:case"end":return s.stop()}},n,this,[[1,11,14,17]])})},{key:"toIdArray",value:function(){var e;return Pt(e=st(this._pairs)).call(e,function(t){return t[0]})}},{key:"toItemArray",value:function(){var e;return Pt(e=st(this._pairs)).call(e,function(t){return t[1]})}},{key:"toEntryArray",value:function(){return st(this._pairs)}},{key:"toObjectMap",value:function(){var e=SF(null),t=jt(this._pairs),r;try{for(t.s();!(r=t.n()).done;){var a=it(r.value,2),o=a[0],s=a[1];e[o]=s}}catch(u){t.e(u)}finally{t.f()}return e}},{key:"toMap",value:function(){return new u1(this._pairs)}},{key:"toIdSet",value:function(){return new $l(this.toIdArray())}},{key:"toItemSet",value:function(){return new $l(this.toItemArray())}},{key:"cache",value:function(){return new i(st(this._pairs))}},{key:"distinct",value:function(e){var t=new $l,r=jt(this._pairs),a;try{for(r.s();!(a=r.n()).done;){var o=it(a.value,2),s=o[0],u=o[1];t.add(e(u,s))}}catch(l){r.e(l)}finally{r.f()}return t}},{key:"filter",value:function(e){var t=this._pairs;return new i(Ee({},Gi,nt.mark(function r(){var a,o,s,u,l;return nt.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:a=jt(t),d.prev=1,a.s();case 3:if((o=a.n()).done){d.next=10;break}if(s=it(o.value,2),u=s[0],l=s[1],!e(l,u)){d.next=8;break}return d.next=8,[u,l];case 8:d.next=3;break;case 10:d.next=15;break;case 12:d.prev=12,d.t0=d.catch(1),a.e(d.t0);case 15:return d.prev=15,a.f(),d.finish(15);case 18:case"end":return d.stop()}},r,null,[[1,12,15,18]])})))}},{key:"forEach",value:function(e){var t=jt(this._pairs),r;try{for(t.s();!(r=t.n()).done;){var a=it(r.value,2),o=a[0],s=a[1];e(s,o)}}catch(u){t.e(u)}finally{t.f()}}},{key:"map",value:function(e){var t=this._pairs;return new i(Ee({},Gi,nt.mark(function r(){var a,o,s,u,l;return nt.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:a=jt(t),d.prev=1,a.s();case 3:if((o=a.n()).done){d.next=9;break}return s=it(o.value,2),u=s[0],l=s[1],d.next=7,[u,e(l,u)];case 7:d.next=3;break;case 9:d.next=14;break;case 11:d.prev=11,d.t0=d.catch(1),a.e(d.t0);case 14:return d.prev=14,a.f(),d.finish(14);case 17:case"end":return d.stop()}},r,null,[[1,11,14,17]])})))}},{key:"max",value:function(e){var t=wl(this._pairs),r=t.next();if(r.done)return null;for(var a=r.value[1],o=e(r.value[1],r.value[0]);!(r=t.next()).done;){var s=it(r.value,2),u=s[0],l=s[1],h=e(l,u);h>o&&(o=h,a=l)}return a}},{key:"min",value:function(e){var t=wl(this._pairs),r=t.next();if(r.done)return null;for(var a=r.value[1],o=e(r.value[1],r.value[0]);!(r=t.next()).done;){var s=it(r.value,2),u=s[0],l=s[1],h=e(l,u);h<o&&(o=h,a=l)}return a}},{key:"reduce",value:function(e,t){var r=jt(this._pairs),a;try{for(r.s();!(a=r.n()).done;){var o=it(a.value,2),s=o[0],u=o[1];t=e(t,u,s)}}catch(l){r.e(l)}finally{r.f()}return t}},{key:"sort",value:function(e){var t=this;return new i(Ee({},Gi,function(){var r;return wl(Qh(r=st(t._pairs)).call(r,function(a,o){var s=it(a,2),u=s[0],l=s[1],h=it(o,2),d=h[0],f=h[1];return e(l,f,u,d)}))}))}}]),i}();function Cp(i,n){var e=tf(i);if(mv){var t=mv(i);n&&(t=Li(t).call(t,function(r){return e$(i,r).enumerable})),e.push.apply(e,t)}return e}function Ap(i){for(var n=1;n<arguments.length;n++){var e,t,r=arguments[n]!=null?arguments[n]:{};n%2?ui(e=Cp(Object(r),!0)).call(e,function(a){Ee(i,a,r[a])}):bv?CA(i,bv(r)):ui(t=Cp(Object(r))).call(t,function(a){AA(i,a,e$(r,a))})}return i}function _l(i,n){var e=typeof Ys<"u"&&Oa(i)||i["@@iterator"];if(!e){if(pt(i)||(e=Wz(i))||n&&i&&typeof i.length=="number"){e&&(i=e);var t=0,r=function(){};return{s:r,n:function(){return t>=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
38
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Wz(i,n){var e;if(i){if(typeof i=="string")return xp(i,n);var t=Qs(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return qd(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return xp(i,n)}}function xp(i,n){(n==null||n>i.length)&&(n=i.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=i[e];return t}function Vz(i){var n=Uz();return function(){var t=hs(i),r;if(n){var a=hs(this).constructor;r=Wo(t,arguments,a)}else r=t.apply(this,arguments);return MN(this,r)}}function Uz(){if(typeof Reflect>"u"||!Wo||Wo.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Wo(Boolean,[],function(){})),!0}catch{return!1}}function Gz(i,n){return i[n]==null&&(i[n]=Oz()),i}var ds=function(i){xN(e,i);var n=Vz(e);function e(t,r){var a;return ks(this,e),a=n.call(this),Ee(Kr(a),"flush",void 0),Ee(Kr(a),"length",void 0),Ee(Kr(a),"_options",void 0),Ee(Kr(a),"_data",void 0),Ee(Kr(a),"_idProp",void 0),Ee(Kr(a),"_queue",null),t&&!pt(t)&&(r=t,t=[]),a._options=r||{},a._data=new u1,a.length=0,a._idProp=a._options.fieldId||"id",t&&t.length&&a.add(t),a.setOptions(r),a}return Ds(e,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(r){r&&r.queue!==void 0&&(r.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=Tz.extend(this,{replace:["add","update","remove"]})),r.queue&<(r.queue)==="object"&&this._queue.setOptions(r.queue)))}},{key:"add",value:function(r,a){var o=this,s=[],u;if(pt(r)){var l=Pt(r).call(r,function(f){return f[o._idProp]});if(fL(l).call(l,function(f){return o._data.has(f)}))throw new Error("A duplicate id was found in the parameter array.");for(var h=0,d=r.length;h<d;h++)u=this._addItem(r[h]),s.push(u)}else if(r&<(r)==="object")u=this._addItem(r),s.push(u);else throw new Error("Unknown dataType");return s.length&&this._trigger("add",{items:s},a),s}},{key:"update",value:function(r,a){var o=this,s=[],u=[],l=[],h=[],d=this._idProp,f=function(p){var $=p[d];if($!=null&&o._data.has($)){var y=p,m=tR({},o._data.get($)),_=o._updateItem(y);u.push(_),h.push(y),l.push(m)}else{var O=o._addItem(p);s.push(O)}};if(pt(r))for(var c=0,v=r.length;c<v;c++)r[c]&<(r[c])==="object"?f(r[c]):console.warn("Ignoring input item, which is not an object at index "+c);else if(r&<(r)==="object")f(r);else throw new Error("Unknown dataType");if(s.length&&this._trigger("add",{items:s},a),u.length){var g={items:u,oldData:l,data:h};this._trigger("update",g,a)}return Xs(s).call(s,u)}},{key:"updateOnly",value:function(r,a){var o,s=this;pt(r)||(r=[r]);var u=Pt(o=Pt(r).call(r,function(h){var d=s._data.get(h[s._idProp]);if(d==null)throw new Error("Updating non-existent items is not allowed.");return{oldData:d,update:h}})).call(o,function(h){var d=h.oldData,f=h.update,c=d[s._idProp],v=Q2(d,f);return s._data.set(c,v),{id:c,oldData:d,updatedData:v}});if(u.length){var l={items:Pt(u).call(u,function(h){return h.id}),oldData:Pt(u).call(u,function(h){return h.oldData}),data:Pt(u).call(u,function(h){return h.updatedData})};return this._trigger("update",l,a),l.items}else return[]}},{key:"get",value:function(r,a){var o=void 0,s=void 0,u=void 0;kp(r)?(o=r,u=a):pt(r)?(s=r,u=a):u=r;var l=u&&u.returnType==="Object"?"Object":"Array",h=u&&Li(u),d=[],f=void 0,c=void 0,v=void 0;if(o!=null)f=this._data.get(o),f&&h&&!h(f)&&(f=void 0);else if(s!=null)for(var g=0,b=s.length;g<b;g++)f=this._data.get(s[g]),f!=null&&(!h||h(f))&&d.push(f);else{var p;c=st(xi(p=this._data).call(p));for(var $=0,y=c.length;$<y;$++)v=c[$],f=this._data.get(v),f!=null&&(!h||h(f))&&d.push(f)}if(u&&u.order&&o==null&&this._sort(d,u.order),u&&u.fields){var m=u.fields;if(o!=null&&f!=null)f=this._filterFields(f,m);else for(var _=0,O=d.length;_<O;_++)d[_]=this._filterFields(d[_],m)}if(l=="Object"){for(var k={},S=0,w=d.length;S<w;S++){var E=d[S],F=E[this._idProp];k[F]=E}return k}else if(o!=null){var H;return(H=f)!==null&&H!==void 0?H:null}else return d}},{key:"getIds",value:function(r){var a=this._data,o=r&&Li(r),s=r&&r.order,u=st(xi(a).call(a)),l=[];if(o)if(s){for(var h=[],d=0,f=u.length;d<f;d++){var c=u[d],v=this._data.get(c);v!=null&&o(v)&&h.push(v)}this._sort(h,s);for(var g=0,b=h.length;g<b;g++)l.push(h[g][this._idProp])}else for(var p=0,$=u.length;p<$;p++){var y=u[p],m=this._data.get(y);m!=null&&o(m)&&l.push(m[this._idProp])}else if(s){for(var _=[],O=0,k=u.length;O<k;O++){var S=u[O];_.push(a.get(S))}this._sort(_,s);for(var w=0,E=_.length;w<E;w++)l.push(_[w][this._idProp])}else for(var F=0,H=u.length;F<H;F++){var z=u[F],K=a.get(z);K!=null&&l.push(K[this._idProp])}return l}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(r,a){var o=a&&Li(a),s=this._data,u=st(xi(s).call(s));if(a&&a.order)for(var l=this.get(a),h=0,d=l.length;h<d;h++){var f=l[h],c=f[this._idProp];r(f,c)}else for(var v=0,g=u.length;v<g;v++){var b=u[v],p=this._data.get(b);p!=null&&(!o||o(p))&&r(p,b)}}},{key:"map",value:function(r,a){for(var o=a&&Li(a),s=[],u=this._data,l=st(xi(u).call(u)),h=0,d=l.length;h<d;h++){var f=l[h],c=this._data.get(f);c!=null&&(!o||o(c))&&s.push(r(c,f))}return a&&a.order&&this._sort(s,a.order),s}},{key:"_filterFields",value:function(r,a){var o;return r&&RO(o=pt(a)?a:tf(a)).call(o,function(s,u){return s[u]=r[u],s},{})}},{key:"_sort",value:function(r,a){if(typeof a=="string"){var o=a;Qh(r).call(r,function(s,u){var l=s[o],h=u[o];return l>h?1:l<h?-1:0})}else if(typeof a=="function")Qh(r).call(r,a);else throw new TypeError("Order must be a function or a string")}},{key:"remove",value:function(r,a){for(var o=[],s=[],u=pt(r)?r:[r],l=0,h=u.length;l<h;l++){var d=this._remove(u[l]);if(d){var f=d[this._idProp];f!=null&&(o.push(f),s.push(d))}}return o.length&&this._trigger("remove",{items:o,oldData:s},a),o}},{key:"_remove",value:function(r){var a;if(kp(r)?a=r:r&<(r)==="object"&&(a=r[this._idProp]),a!=null&&this._data.has(a)){var o=this._data.get(a)||null;return this._data.delete(a),--this.length,o}return null}},{key:"clear",value:function(r){for(var a,o=st(xi(a=this._data).call(a)),s=[],u=0,l=o.length;u<l;u++)s.push(this._data.get(o[u]));return this._data.clear(),this.length=0,this._trigger("remove",{items:o,oldData:s},r),o}},{key:"max",value:function(r){var a,o=null,s=null,u=_l(Tp(a=this._data).call(a)),l;try{for(u.s();!(l=u.n()).done;){var h=l.value,d=h[r];typeof d=="number"&&(s==null||d>s)&&(o=h,s=d)}}catch(f){u.e(f)}finally{u.f()}return o||null}},{key:"min",value:function(r){var a,o=null,s=null,u=_l(Tp(a=this._data).call(a)),l;try{for(u.s();!(l=u.n()).done;){var h=l.value,d=h[r];typeof d=="number"&&(s==null||d<s)&&(o=h,s=d)}}catch(f){u.e(f)}finally{u.f()}return o||null}},{key:"distinct",value:function(r){for(var a=this._data,o=st(xi(a).call(a)),s=[],u=0,l=0,h=o.length;l<h;l++){for(var d=o[l],f=a.get(d),c=f[r],v=!1,g=0;g<u;g++)if(s[g]==c){v=!0;break}!v&&c!==void 0&&(s[u]=c,u++)}return s}},{key:"_addItem",value:function(r){var a=Gz(r,this._idProp),o=a[this._idProp];if(this._data.has(o))throw new Error("Cannot add item: item with id "+o+" already exists");return this._data.set(o,a),++this.length,o}},{key:"_updateItem",value:function(r){var a=r[this._idProp];if(a==null)throw new Error("Cannot update item: item has no id (item: "+jF(r)+")");var o=this._data.get(a);if(!o)throw new Error("Cannot update item: no item with id "+a+" found");return this._data.set(a,Ap(Ap({},o),r)),a}},{key:"stream",value:function(r){if(r){var a=this._data;return new Pp(Ee({},Gi,nt.mark(function s(){var u,l,h,d;return nt.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:u=_l(r),c.prev=1,u.s();case 3:if((l=u.n()).done){c.next=11;break}if(h=l.value,d=a.get(h),d==null){c.next=9;break}return c.next=9,[h,d];case 9:c.next=3;break;case 11:c.next=16;break;case 13:c.prev=13,c.t0=c.catch(1),u.e(c.t0);case 16:return c.prev=16,u.f(),c.finish(16);case 19:case"end":return c.stop()}},s,null,[[1,13,16,19]])})))}else{var o;return new Pp(Ee({},Gi,nb(o=bz(this._data)).call(o,this._data)))}}}]),e}(kz);function Kz(i,n){return lt(n)==="object"&&n!==null&&i===n.idProp&&typeof n.add=="function"&&typeof n.clear=="function"&&typeof n.distinct=="function"&&typeof ui(n)=="function"&&typeof n.get=="function"&&typeof n.getDataSet=="function"&&typeof n.getIds=="function"&&typeof n.length=="number"&&typeof Pt(n)=="function"&&typeof n.max=="function"&&typeof n.min=="function"&&typeof n.off=="function"&&typeof n.on=="function"&&typeof n.remove=="function"&&typeof n.setOptions=="function"&&typeof n.stream=="function"&&typeof n.update=="function"&&typeof n.updateOnly=="function"}function f1(i,n){return lt(n)==="object"&&n!==null&&i===n.idProp&&typeof ui(n)=="function"&&typeof n.get=="function"&&typeof n.getDataSet=="function"&&typeof n.getIds=="function"&&typeof n.length=="number"&&typeof Pt(n)=="function"&&typeof n.off=="function"&&typeof n.on=="function"&&typeof n.stream=="function"&&Kz(i,n.getDataSet())}/**
|
|
39
|
-
* vis-network
|
|
40
|
-
* https://visjs.github.io/vis-network/
|
|
41
|
-
*
|
|
42
|
-
* A dynamic, browser-based visualization library.
|
|
43
|
-
*
|
|
44
|
-
* @version 9.1.2
|
|
45
|
-
* @date 2022-03-28T20:13:51.046Z
|
|
46
|
-
*
|
|
47
|
-
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
48
|
-
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
|
49
|
-
*
|
|
50
|
-
* @license
|
|
51
|
-
* vis.js is dual licensed under both
|
|
52
|
-
*
|
|
53
|
-
* 1. The Apache 2.0 License
|
|
54
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
55
|
-
*
|
|
56
|
-
* and
|
|
57
|
-
*
|
|
58
|
-
* 2. The MIT License
|
|
59
|
-
* http://opensource.org/licenses/MIT
|
|
60
|
-
*
|
|
61
|
-
* vis.js may be distributed under either license.
|
|
62
|
-
*/var Zh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},wo=function(i){return i&&i.Math==Math&&i},G=wo(typeof globalThis=="object"&&globalThis)||wo(typeof window=="object"&&window)||wo(typeof self=="object"&&self)||wo(typeof Zh=="object"&&Zh)||function(){return this}()||Function("return this")(),de=function(i){try{return!!i()}catch{return!0}},qz=de,Fa=!qz(function(){var i=function(){}.bind();return typeof i!="function"||i.hasOwnProperty("prototype")}),Yz=Fa,c1=Function.prototype,Mp=c1.apply,Dp=c1.call,pn=typeof Reflect=="object"&&Reflect.apply||(Yz?Dp.bind(Mp):function(){return Dp.apply(Mp,arguments)}),v1=Fa,p1=Function.prototype,Xz=p1.bind,Jh=p1.call,Qz=v1&&Xz.bind(Jh,Jh),oe=v1?function(i){return i&&Qz(i)}:function(i){return i&&function(){return Jh.apply(i,arguments)}},Ke=function(i){return typeof i=="function"},gn={},Zz=de,je=!Zz(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Jz=Fa,_o=Function.prototype.call,Bt=Jz?_o.bind(_o):function(){return _o.apply(_o,arguments)},Na={},g1={}.propertyIsEnumerable,y1=Object.getOwnPropertyDescriptor,ej=y1&&!g1.call({1:2},1);Na.f=ej?function(n){var e=y1(this,n);return!!e&&e.enumerable}:g1;var Ba=function(i,n){return{enumerable:!(i&1),configurable:!(i&2),writable:!(i&4),value:n}},m1=oe,tj=m1({}.toString),rj=m1("".slice),_i=function(i){return rj(tj(i),8,-1)},ij=G,nj=oe,aj=de,oj=_i,El=ij.Object,sj=nj("".split),eu=aj(function(){return!El("z").propertyIsEnumerable(0)})?function(i){return oj(i)=="String"?sj(i,""):El(i)}:El,uj=G,lj=uj.TypeError,La=function(i){if(i==null)throw lj("Can't call method on "+i);return i},hj=eu,dj=La,Lt=function(i){return hj(dj(i))},fj=Ke,He=function(i){return typeof i=="object"?i!==null:fj(i)},re={},Sl=re,Ol=G,cj=Ke,Rp=function(i){return cj(i)?i:void 0},gr=function(i,n){return arguments.length<2?Rp(Sl[i])||Rp(Ol[i]):Sl[i]&&Sl[i][n]||Ol[i]&&Ol[i][n]},vj=oe,Me=vj({}.isPrototypeOf),pj=gr,za=pj("navigator","userAgent")||"",b1=G,Tl=za,Fp=b1.process,Np=b1.Deno,Bp=Fp&&Fp.versions||Np&&Np.version,Lp=Bp&&Bp.v8,Ct,fs;Lp&&(Ct=Lp.split("."),fs=Ct[0]>0&&Ct[0]<4?1:+(Ct[0]+Ct[1]));!fs&&Tl&&(Ct=Tl.match(/Edge\/(\d+)/),(!Ct||Ct[1]>=74)&&(Ct=Tl.match(/Chrome\/(\d+)/),Ct&&(fs=+Ct[1])));var ja=fs,zp=ja,gj=de,yf=!!Object.getOwnPropertySymbols&&!gj(function(){var i=Symbol();return!String(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&zp&&zp<41}),yj=yf,$1=yj&&!Symbol.sham&&typeof Symbol.iterator=="symbol",mj=G,bj=gr,$j=Ke,wj=Me,_j=$1,Ej=mj.Object,mf=_j?function(i){return typeof i=="symbol"}:function(i){var n=bj("Symbol");return $j(n)&&wj(n.prototype,Ej(i))},Sj=G,Oj=Sj.String,tu=function(i){try{return Oj(i)}catch{return"Object"}},Tj=G,kj=Ke,Ij=tu,Pj=Tj.TypeError,yn=function(i){if(kj(i))return i;throw Pj(Ij(i)+" is not a function")},Cj=yn,bf=function(i,n){var e=i[n];return e==null?void 0:Cj(e)},Aj=G,kl=Bt,Il=Ke,Pl=He,xj=Aj.TypeError,Mj=function(i,n){var e,t;if(n==="string"&&Il(e=i.toString)&&!Pl(t=kl(e,i))||Il(e=i.valueOf)&&!Pl(t=kl(e,i))||n!=="string"&&Il(e=i.toString)&&!Pl(t=kl(e,i)))return t;throw xj("Can't convert object to primitive value")},ru={exports:{}},jp=G,Dj=Object.defineProperty,Rj=function(i,n){try{Dj(jp,i,{value:n,configurable:!0,writable:!0})}catch{jp[i]=n}return n},Fj=G,Nj=Rj,Hp="__core-js_shared__",Bj=Fj[Hp]||Nj(Hp,{}),$f=Bj,Wp=$f;(ru.exports=function(i,n){return Wp[i]||(Wp[i]=n!==void 0?n:{})})("versions",[]).push({version:"3.21.1",mode:"pure",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Lj=G,zj=La,jj=Lj.Object,mt=function(i){return jj(zj(i))},Hj=oe,Wj=mt,Vj=Hj({}.hasOwnProperty),Xe=Object.hasOwn||function(n,e){return Vj(Wj(n),e)},Uj=oe,Gj=0,Kj=Math.random(),qj=Uj(1 .toString),iu=function(i){return"Symbol("+(i===void 0?"":i)+")_"+qj(++Gj+Kj,36)},Yj=G,Xj=ru.exports,Vp=Xe,Qj=iu,Up=yf,w1=$1,Mi=Xj("wks"),ri=Yj.Symbol,Gp=ri&&ri.for,Zj=w1?ri:ri&&ri.withoutSetter||Qj,Re=function(i){if(!Vp(Mi,i)||!(Up||typeof Mi[i]=="string")){var n="Symbol."+i;Up&&Vp(ri,i)?Mi[i]=ri[i]:w1&&Gp?Mi[i]=Gp(n):Mi[i]=Zj(n)}return Mi[i]},Jj=G,e3=Bt,Kp=He,qp=mf,t3=bf,r3=Mj,i3=Re,n3=Jj.TypeError,a3=i3("toPrimitive"),o3=function(i,n){if(!Kp(i)||qp(i))return i;var e=t3(i,a3),t;if(e){if(n===void 0&&(n="default"),t=e3(e,i,n),!Kp(t)||qp(t))return t;throw n3("Can't convert object to primitive value")}return n===void 0&&(n="number"),r3(i,n)},s3=o3,u3=mf,nu=function(i){var n=s3(i,"string");return u3(n)?n:n+""},l3=G,Yp=He,ed=l3.document,h3=Yp(ed)&&Yp(ed.createElement),_1=function(i){return h3?ed.createElement(i):{}},d3=je,f3=de,c3=_1,E1=!d3&&!f3(function(){return Object.defineProperty(c3("div"),"a",{get:function(){return 7}}).a!=7}),v3=je,p3=Bt,g3=Na,y3=Ba,m3=Lt,b3=nu,$3=Xe,w3=E1,Xp=Object.getOwnPropertyDescriptor;gn.f=v3?Xp:function(n,e){if(n=m3(n),e=b3(e),w3)try{return Xp(n,e)}catch{}if($3(n,e))return y3(!p3(g3.f,n,e),n[e])};var _3=de,E3=Ke,S3=/#|\.prototype\./,Ha=function(i,n){var e=T3[O3(i)];return e==I3?!0:e==k3?!1:E3(n)?_3(n):!!n},O3=Ha.normalize=function(i){return String(i).replace(S3,".").toLowerCase()},T3=Ha.data={},k3=Ha.NATIVE="N",I3=Ha.POLYFILL="P",P3=Ha,Qp=oe,C3=yn,A3=Fa,x3=Qp(Qp.bind),Wa=function(i,n){return C3(i),n===void 0?i:A3?x3(i,n):function(){return i.apply(n,arguments)}},bt={},M3=je,D3=de,S1=M3&&D3(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),O1=G,R3=He,F3=O1.String,N3=O1.TypeError,$t=function(i){if(R3(i))return i;throw N3(F3(i)+" is not an object")},B3=G,L3=je,z3=E1,j3=S1,Eo=$t,Zp=nu,H3=B3.TypeError,Cl=Object.defineProperty,W3=Object.getOwnPropertyDescriptor,Al="enumerable",xl="configurable",Ml="writable";bt.f=L3?j3?function(n,e,t){if(Eo(n),e=Zp(e),Eo(t),typeof n=="function"&&e==="prototype"&&"value"in t&&Ml in t&&!t[Ml]){var r=W3(n,e);r&&r[Ml]&&(n[e]=t.value,t={configurable:xl in t?t[xl]:r[xl],enumerable:Al in t?t[Al]:r[Al],writable:!1})}return Cl(n,e,t)}:Cl:function(n,e,t){if(Eo(n),e=Zp(e),Eo(t),z3)try{return Cl(n,e,t)}catch{}if("get"in t||"set"in t)throw H3("Accessors not supported");return"value"in t&&(n[e]=t.value),n};var V3=je,U3=bt,G3=Ba,mn=V3?function(i,n,e){return U3.f(i,n,G3(1,e))}:function(i,n,e){return i[n]=e,i},So=G,K3=pn,q3=oe,Y3=Ke,X3=gn.f,Q3=P3,Di=re,Z3=Wa,Ri=mn,Jp=Xe,J3=function(i){var n=function(e,t,r){if(this instanceof n){switch(arguments.length){case 0:return new i;case 1:return new i(e);case 2:return new i(e,t)}return new i(e,t,r)}return K3(i,this,arguments)};return n.prototype=i.prototype,n},Y=function(i,n){var e=i.target,t=i.global,r=i.stat,a=i.proto,o=t?So:r?So[e]:(So[e]||{}).prototype,s=t?Di:Di[e]||Ri(Di,e,{})[e],u=s.prototype,l,h,d,f,c,v,g,b,p;for(f in n)l=Q3(t?f:e+(r?".":"#")+f,i.forced),h=!l&&o&&Jp(o,f),v=s[f],h&&(i.noTargetGet?(p=X3(o,f),g=p&&p.value):g=o[f]),c=h&&g?g:n[f],!(h&&typeof v==typeof c)&&(i.bind&&h?b=Z3(c,So):i.wrap&&h?b=J3(c):a&&Y3(c)?b=q3(c):b=c,(i.sham||c&&c.sham||v&&v.sham)&&Ri(b,"sham",!0),Ri(s,f,b),a&&(d=e+"Prototype",Jp(Di,d)||Ri(Di,d,{}),Ri(Di[d],f,c),i.real&&u&&!u[f]&&Ri(u,f,c)))},e5=Math.ceil,t5=Math.floor,au=function(i){var n=+i;return n!==n||n===0?0:(n>0?t5:e5)(n)},r5=au,i5=Math.max,n5=Math.min,Va=function(i,n){var e=r5(i);return e<0?i5(e+n,0):n5(e,n)},a5=au,o5=Math.min,s5=function(i){return i>0?o5(a5(i),9007199254740991):0},u5=s5,zt=function(i){return u5(i.length)},l5=Lt,h5=Va,d5=zt,eg=function(i){return function(n,e,t){var r=l5(n),a=d5(r),o=h5(t,a),s;if(i&&e!=e){for(;a>o;)if(s=r[o++],s!=s)return!0}else for(;a>o;o++)if((i||o in r)&&r[o]===e)return i||o||0;return!i&&-1}},wf={includes:eg(!0),indexOf:eg(!1)},Ua={},f5=oe,Dl=Xe,c5=Lt,v5=wf.indexOf,p5=Ua,tg=f5([].push),T1=function(i,n){var e=c5(i),t=0,r=[],a;for(a in e)!Dl(p5,a)&&Dl(e,a)&&tg(r,a);for(;n.length>t;)Dl(e,a=n[t++])&&(~v5(r,a)||tg(r,a));return r},_f=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],g5=T1,y5=_f,Ga=Object.keys||function(n){return g5(n,y5)},ou={};ou.f=Object.getOwnPropertySymbols;var rg=je,m5=oe,b5=Bt,$5=de,Rl=Ga,w5=ou,_5=Na,E5=mt,S5=eu,Fi=Object.assign,ig=Object.defineProperty,O5=m5([].concat),T5=!Fi||$5(function(){if(rg&&Fi({b:1},Fi(ig({},"a",{enumerable:!0,get:function(){ig(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var i={},n={},e=Symbol(),t="abcdefghijklmnopqrst";return i[e]=7,t.split("").forEach(function(r){n[r]=r}),Fi({},i)[e]!=7||Rl(Fi({},n)).join("")!=t})?function(n,e){for(var t=E5(n),r=arguments.length,a=1,o=w5.f,s=_5.f;r>a;)for(var u=S5(arguments[a++]),l=o?O5(Rl(u),o(u)):Rl(u),h=l.length,d=0,f;h>d;)f=l[d++],(!rg||b5(s,u,f))&&(t[f]=u[f]);return t}:Fi,k5=Y,ng=T5;k5({target:"Object",stat:!0,forced:Object.assign!==ng},{assign:ng});var I5=re,P5=I5.Object.assign,C5=P5,A5=C5,Ce=A5,x5=oe,su=x5([].slice),M5=G,k1=oe,D5=yn,R5=He,F5=Xe,ag=su,N5=Fa,I1=M5.Function,B5=k1([].concat),L5=k1([].join),Fl={},z5=function(i,n,e){if(!F5(Fl,n)){for(var t=[],r=0;r<n;r++)t[r]="a["+r+"]";Fl[n]=I1("C,a","return new C("+L5(t,",")+")")}return Fl[n](i,e)},P1=N5?I1.bind:function(n){var e=D5(this),t=e.prototype,r=ag(arguments,1),a=function(){var s=B5(r,ag(arguments));return this instanceof a?z5(e,s.length,s):e.apply(n,s)};return R5(t)&&(a.prototype=t),a},j5=Y,og=P1;j5({target:"Function",proto:!0,forced:Function.bind!==og},{bind:og});var H5=re,We=function(i){return H5[i+"Prototype"]},W5=We,V5=W5("Function").bind,U5=Me,G5=V5,Nl=Function.prototype,K5=function(i){var n=i.bind;return i===Nl||U5(Nl,i)&&n===Nl.bind?G5:n},q5=K5,Y5=q5,x=Y5;function Ef(i,n,e,t){i.beginPath(),i.arc(n,e,t,0,2*Math.PI,!1),i.closePath()}function X5(i,n,e,t){i.beginPath(),i.rect(n-t,e-t,t*2,t*2),i.closePath()}function Q5(i,n,e,t){i.beginPath(),t*=1.15,e+=.275*t;var r=t*2,a=r/2,o=Math.sqrt(3)/6*r,s=Math.sqrt(r*r-a*a);i.moveTo(n,e-(s-o)),i.lineTo(n+a,e+o),i.lineTo(n-a,e+o),i.lineTo(n,e-(s-o)),i.closePath()}function Z5(i,n,e,t){i.beginPath(),t*=1.15,e-=.275*t;var r=t*2,a=r/2,o=Math.sqrt(3)/6*r,s=Math.sqrt(r*r-a*a);i.moveTo(n,e+(s-o)),i.lineTo(n+a,e-o),i.lineTo(n-a,e-o),i.lineTo(n,e+(s-o)),i.closePath()}function J5(i,n,e,t){i.beginPath(),t*=.82,e+=.1*t;for(var r=0;r<10;r++){var a=r%2===0?t*1.3:t*.5;i.lineTo(n+a*Math.sin(r*2*Math.PI/10),e-a*Math.cos(r*2*Math.PI/10))}i.closePath()}function eH(i,n,e,t){i.beginPath(),i.lineTo(n,e+t),i.lineTo(n+t,e),i.lineTo(n,e-t),i.lineTo(n-t,e),i.closePath()}function C1(i,n,e,t,r,a){var o=Math.PI/180;t-2*a<0&&(a=t/2),r-2*a<0&&(a=r/2),i.beginPath(),i.moveTo(n+a,e),i.lineTo(n+t-a,e),i.arc(n+t-a,e+a,a,o*270,o*360,!1),i.lineTo(n+t,e+r-a),i.arc(n+t-a,e+r-a,a,0,o*90,!1),i.lineTo(n+a,e+r),i.arc(n+a,e+r-a,a,o*90,o*180,!1),i.lineTo(n,e+a),i.arc(n+a,e+a,a,o*180,o*270,!1),i.closePath()}function td(i,n,e,t,r){var a=.5522848,o=t/2*a,s=r/2*a,u=n+t,l=e+r,h=n+t/2,d=e+r/2;i.beginPath(),i.moveTo(n,d),i.bezierCurveTo(n,d-s,h-o,e,h,e),i.bezierCurveTo(h+o,e,u,d-s,u,d),i.bezierCurveTo(u,d+s,h+o,l,h,l),i.bezierCurveTo(h-o,l,n,d+s,n,d),i.closePath()}function A1(i,n,e,t,r){var a=.3333333333333333,o=t,s=r*a,u=.5522848,l=o/2*u,h=s/2*u,d=n+o,f=e+s,c=n+o/2,v=e+s/2,g=e+(r-s/2),b=e+r;i.beginPath(),i.moveTo(d,v),i.bezierCurveTo(d,v+h,c+l,f,c,f),i.bezierCurveTo(c-l,f,n,v+h,n,v),i.bezierCurveTo(n,v-h,c-l,e,c,e),i.bezierCurveTo(c+l,e,d,v-h,d,v),i.lineTo(d,g),i.bezierCurveTo(d,g+h,c+l,b,c,b),i.bezierCurveTo(c-l,b,n,g+h,n,g),i.lineTo(n,v)}function x1(i,n,e,t,r,a){i.beginPath(),i.moveTo(n,e);for(var o=a.length,s=t-n,u=r-e,l=u/s,h=Math.sqrt(s*s+u*u),d=0,f=!0,c=0,v=+a[0];h>=.1;)v=+a[d++%o],v>h&&(v=h),c=Math.sqrt(v*v/(1+l*l)),c=s<0?-c:c,n+=c,e+=l*c,f===!0?i.lineTo(n,e):i.moveTo(n,e),h-=v,f=!f}function tH(i,n,e,t){i.beginPath();var r=6,a=Math.PI*2/r;i.moveTo(n+t,e);for(var o=1;o<r;o++)i.lineTo(n+t*Math.cos(a*o),e+t*Math.sin(a*o));i.closePath()}var sg={circle:Ef,dashedLine:x1,database:A1,diamond:eH,ellipse:td,ellipse_vis:td,hexagon:tH,roundRect:C1,square:X5,star:J5,triangle:Q5,triangleDown:Z5};function rH(i){return Object.prototype.hasOwnProperty.call(sg,i)?sg[i]:function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];CanvasRenderingContext2D.prototype[i].call(n,t)}}var M1={exports:{}};(function(i){i.exports=n;function n(t){if(t)return e(t)}function e(t){for(var r in n.prototype)t[r]=n.prototype[r];return t}n.prototype.on=n.prototype.addEventListener=function(t,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(r),this},n.prototype.once=function(t,r){function a(){this.off(t,a),r.apply(this,arguments)}return a.fn=r,this.on(t,a),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,r){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+t];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,s=0;s<a.length;s++)if(o=a[s],o===r||o.fn===r){a.splice(s,1);break}return a.length===0&&delete this._callbacks["$"+t],this},n.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var r=new Array(arguments.length-1),a=this._callbacks["$"+t],o=1;o<arguments.length;o++)r[o-1]=arguments[o];if(a){a=a.slice(0);for(var o=0,s=a.length;o<s;++o)a[o].apply(this,r)}return this},n.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},n.prototype.hasListeners=function(t){return!!this.listeners(t).length}})(M1);var D1=M1.exports,iH=Re,nH=iH("toStringTag"),R1={};R1[nH]="z";var Sf=String(R1)==="[object z]",aH=G,oH=Sf,sH=Ke,Go=_i,uH=Re,lH=uH("toStringTag"),hH=aH.Object,dH=Go(function(){return arguments}())=="Arguments",fH=function(i,n){try{return i[n]}catch{}},Ei=oH?Go:function(i){var n,e,t;return i===void 0?"Undefined":i===null?"Null":typeof(e=fH(n=hH(i),lH))=="string"?e:dH?Go(n):(t=Go(n))=="Object"&&sH(n.callee)?"Arguments":t},cH=G,vH=Ei,pH=cH.String,Br=function(i){if(vH(i)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return pH(i)},Of=oe,gH=au,yH=Br,mH=La,bH=Of("".charAt),ug=Of("".charCodeAt),$H=Of("".slice),lg=function(i){return function(n,e){var t=yH(mH(n)),r=gH(e),a=t.length,o,s;return r<0||r>=a?i?"":void 0:(o=ug(t,r),o<55296||o>56319||r+1===a||(s=ug(t,r+1))<56320||s>57343?i?bH(t,r):o:i?$H(t,r,r+2):(o-55296<<10)+(s-56320)+65536)}},wH={codeAt:lg(!1),charAt:lg(!0)},_H=oe,EH=Ke,rd=$f,SH=_H(Function.toString);EH(rd.inspectSource)||(rd.inspectSource=function(i){return SH(i)});var F1=rd.inspectSource,OH=G,TH=Ke,kH=F1,hg=OH.WeakMap,N1=TH(hg)&&/native code/.test(kH(hg)),IH=ru.exports,PH=iu,dg=IH("keys"),uu=function(i){return dg[i]||(dg[i]=PH(i))},CH=N1,B1=G,Bl=oe,AH=He,xH=mn,Ll=Xe,zl=$f,MH=uu,DH=Ua,fg="Object already initialized",id=B1.TypeError,RH=B1.WeakMap,cs,ra,vs,FH=function(i){return vs(i)?ra(i):cs(i,{})},NH=function(i){return function(n){var e;if(!AH(n)||(e=ra(n)).type!==i)throw id("Incompatible receiver, "+i+" required");return e}};if(CH||zl.state){var Gr=zl.state||(zl.state=new RH),BH=Bl(Gr.get),cg=Bl(Gr.has),LH=Bl(Gr.set);cs=function(i,n){if(cg(Gr,i))throw new id(fg);return n.facade=i,LH(Gr,i,n),n},ra=function(i){return BH(Gr,i)||{}},vs=function(i){return cg(Gr,i)}}else{var Ni=MH("state");DH[Ni]=!0,cs=function(i,n){if(Ll(i,Ni))throw new id(fg);return n.facade=i,xH(i,Ni,n),n},ra=function(i){return Ll(i,Ni)?i[Ni]:{}},vs=function(i){return Ll(i,Ni)}}var Si={set:cs,get:ra,has:vs,enforce:FH,getterFor:NH},nd=je,zH=Xe,L1=Function.prototype,jH=nd&&Object.getOwnPropertyDescriptor,Tf=zH(L1,"name"),HH=Tf&&function(){}.name==="something",WH=Tf&&(!nd||nd&&jH(L1,"name").configurable),z1={EXISTS:Tf,PROPER:HH,CONFIGURABLE:WH},lu={},VH=je,UH=S1,GH=bt,KH=$t,qH=Lt,YH=Ga;lu.f=VH&&!UH?Object.defineProperties:function(n,e){KH(n);for(var t=qH(e),r=YH(e),a=r.length,o=0,s;a>o;)GH.f(n,s=r[o++],t[s]);return n};var XH=gr,QH=XH("document","documentElement"),ZH=$t,JH=lu,vg=_f,e4=Ua,t4=QH,r4=_1,i4=uu,pg=">",gg="<",ad="prototype",od="script",j1=i4("IE_PROTO"),jl=function(){},H1=function(i){return gg+od+pg+i+gg+"/"+od+pg},yg=function(i){i.write(H1("")),i.close();var n=i.parentWindow.Object;return i=null,n},n4=function(){var i=r4("iframe"),n="java"+od+":",e;return i.style.display="none",t4.appendChild(i),i.src=String(n),e=i.contentWindow.document,e.open(),e.write(H1("document.F=Object")),e.close(),e.F},Oo,Ko=function(){try{Oo=new ActiveXObject("htmlfile")}catch{}Ko=typeof document<"u"?document.domain&&Oo?yg(Oo):n4():yg(Oo);for(var i=vg.length;i--;)delete Ko[ad][vg[i]];return Ko()};e4[j1]=!0;var bn=Object.create||function(n,e){var t;return n!==null?(jl[ad]=ZH(n),t=new jl,jl[ad]=null,t[j1]=n):t=Ko(),e===void 0?t:JH.f(t,e)},a4=de,W1=!a4(function(){function i(){}return i.prototype.constructor=null,Object.getPrototypeOf(new i)!==i.prototype}),o4=G,s4=Xe,u4=Ke,l4=mt,h4=uu,d4=W1,mg=h4("IE_PROTO"),sd=o4.Object,f4=sd.prototype,hu=d4?sd.getPrototypeOf:function(i){var n=l4(i);if(s4(n,mg))return n[mg];var e=n.constructor;return u4(e)&&n instanceof e?e.prototype:n instanceof sd?f4:null},c4=mn,du=function(i,n,e,t){t&&t.enumerable?i[n]=e:c4(i,n,e)},v4=de,p4=Ke,g4=bn,bg=hu,y4=du,m4=Re,ud=m4("iterator"),V1=!1,nr,Hl,Wl;[].keys&&(Wl=[].keys(),"next"in Wl?(Hl=bg(bg(Wl)),Hl!==Object.prototype&&(nr=Hl)):V1=!0);var b4=nr==null||v4(function(){var i={};return nr[ud].call(i)!==i});b4?nr={}:nr=g4(nr);p4(nr[ud])||y4(nr,ud,function(){return this});var U1={IteratorPrototype:nr,BUGGY_SAFARI_ITERATORS:V1},$4=Sf,w4=Ei,_4=$4?{}.toString:function(){return"[object "+w4(this)+"]"},E4=Sf,S4=bt.f,O4=mn,T4=Xe,k4=_4,I4=Re,$g=I4("toStringTag"),Ka=function(i,n,e,t){if(i){var r=e?i:i.prototype;T4(r,$g)||S4(r,$g,{configurable:!0,value:n}),t&&!E4&&O4(r,"toString",k4)}},$n={},P4=U1.IteratorPrototype,C4=bn,A4=Ba,x4=Ka,M4=$n,D4=function(){return this},R4=function(i,n,e,t){var r=n+" Iterator";return i.prototype=C4(P4,{next:A4(+!t,e)}),x4(i,r,!1,!0),M4[r]=D4,i},G1=G,F4=Ke,N4=G1.String,B4=G1.TypeError,L4=function(i){if(typeof i=="object"||F4(i))return i;throw B4("Can't set "+N4(i)+" as a prototype")},z4=oe,j4=$t,H4=L4,W4=Object.setPrototypeOf||("__proto__"in{}?function(){var i=!1,n={},e;try{e=z4(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),e(n,[]),i=n instanceof Array}catch{}return function(r,a){return j4(r),H4(a),i?e(r,a):r.__proto__=a,r}}():void 0),V4=Y,U4=Bt,G4=z1,K4=R4,q4=hu,Y4=Ka,wg=du,X4=Re,_g=$n,Q4=U1,Z4=G4.PROPER,To=Q4.BUGGY_SAFARI_ITERATORS,Vl=X4("iterator"),Eg="keys",ko="values",Sg="entries",J4=function(){return this},kf=function(i,n,e,t,r,a,o){K4(e,n,t);var s=function(p){if(p===r&&f)return f;if(!To&&p in h)return h[p];switch(p){case Eg:return function(){return new e(this,p)};case ko:return function(){return new e(this,p)};case Sg:return function(){return new e(this,p)}}return function(){return new e(this)}},u=n+" Iterator",l=!1,h=i.prototype,d=h[Vl]||h["@@iterator"]||r&&h[r],f=!To&&d||s(r),c=n=="Array"&&h.entries||d,v,g,b;if(c&&(v=q4(c.call(new i)),v!==Object.prototype&&v.next&&(Y4(v,u,!0,!0),_g[u]=J4)),Z4&&r==ko&&d&&d.name!==ko&&(l=!0,f=function(){return U4(d,this)}),r)if(g={values:s(ko),keys:a?f:s(Eg),entries:s(Sg)},o)for(b in g)(To||l||!(b in h))&&wg(h,b,g[b]);else V4({target:n,proto:!0,forced:To||l},g);return o&&h[Vl]!==f&&wg(h,Vl,f,{name:r}),_g[n]=f,g},eW=wH.charAt,tW=Br,K1=Si,rW=kf,q1="String Iterator",iW=K1.set,nW=K1.getterFor(q1);rW(String,"String",function(i){iW(this,{type:q1,string:tW(i),index:0})},function(){var n=nW(this),e=n.string,t=n.index,r;return t>=e.length?{value:void 0,done:!0}:(r=eW(e,t),n.index+=r.length,{value:r,done:!1})});var aW=Bt,Og=$t,oW=bf,Y1=function(i,n,e){var t,r;Og(i);try{if(t=oW(i,"return"),!t){if(n==="throw")throw e;return e}t=aW(t,i)}catch(a){r=!0,t=a}if(n==="throw")throw e;if(r)throw t;return Og(t),e},sW=$t,uW=Y1,lW=function(i,n,e,t){try{return t?n(sW(e)[0],e[1]):n(e)}catch(r){uW(i,"throw",r)}},hW=Re,dW=$n,fW=hW("iterator"),cW=Array.prototype,X1=function(i){return i!==void 0&&(dW.Array===i||cW[fW]===i)},vW=oe,pW=de,Q1=Ke,gW=Ei,yW=gr,mW=F1,Z1=function(){},bW=[],J1=yW("Reflect","construct"),If=/^\s*(?:class|function)\b/,$W=vW(If.exec),wW=!If.exec(Z1),Cn=function(n){if(!Q1(n))return!1;try{return J1(Z1,bW,n),!0}catch{return!1}},e0=function(n){if(!Q1(n))return!1;switch(gW(n)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return wW||!!$W(If,mW(n))}catch{return!0}};e0.sham=!0;var fu=!J1||pW(function(){var i;return Cn(Cn.call)||!Cn(Object)||!Cn(function(){i=!0})||i})?e0:Cn,_W=nu,EW=bt,SW=Ba,wn=function(i,n,e){var t=_W(n);t in i?EW.f(i,t,SW(0,e)):i[t]=e},OW=Ei,Tg=bf,TW=$n,kW=Re,IW=kW("iterator"),cu=function(i){if(i!=null)return Tg(i,IW)||Tg(i,"@@iterator")||TW[OW(i)]},PW=G,CW=Bt,AW=yn,xW=$t,MW=tu,DW=cu,RW=PW.TypeError,t0=function(i,n){var e=arguments.length<2?DW(i):n;if(AW(e))return xW(CW(e,i));throw RW(MW(i)+" is not iterable")},FW=G,NW=Wa,BW=Bt,LW=mt,zW=lW,jW=X1,HW=fu,WW=zt,kg=wn,VW=t0,UW=cu,Ig=FW.Array,GW=function(n){var e=LW(n),t=HW(this),r=arguments.length,a=r>1?arguments[1]:void 0,o=a!==void 0;o&&(a=NW(a,r>2?arguments[2]:void 0));var s=UW(e),u=0,l,h,d,f,c,v;if(s&&!(this==Ig&&jW(s)))for(f=VW(e,s),c=f.next,h=t?new this:[];!(d=BW(c,f)).done;u++)v=o?zW(f,a,[d.value,u],!0):d.value,kg(h,u,v);else for(l=WW(e),h=t?new this(l):Ig(l);l>u;u++)v=o?a(e[u],u):e[u],kg(h,u,v);return h.length=u,h},KW=Re,r0=KW("iterator"),i0=!1;try{var qW=0,Pg={next:function(){return{done:!!qW++}},return:function(){i0=!0}};Pg[r0]=function(){return this},Array.from(Pg,function(){throw 2})}catch{}var YW=function(i,n){if(!n&&!i0)return!1;var e=!1;try{var t={};t[r0]=function(){return{next:function(){return{done:e=!0}}}},i(t)}catch{}return e},XW=Y,QW=GW,ZW=YW,JW=!ZW(function(i){Array.from(i)});XW({target:"Array",stat:!0,forced:JW},{from:QW});var e6=re,t6=e6.Array.from,r6=t6,n0=r6,Lr=n0,i6=Lt,Cg=$n,a0=Si;bt.f;var n6=kf,o0="Array Iterator",a6=a0.set,o6=a0.getterFor(o0);n6(Array,"Array",function(i,n){a6(this,{type:o0,target:i6(i),index:0,kind:n})},function(){var i=o6(this),n=i.target,e=i.kind,t=i.index++;return!n||t>=n.length?(i.target=void 0,{value:void 0,done:!0}):e=="keys"?{value:t,done:!1}:e=="values"?{value:n[t],done:!1}:{value:[t,n[t]],done:!1}},"values");Cg.Arguments=Cg.Array;var s6=cu,u6=s6,l6={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},h6=l6,d6=G,f6=Ei,c6=mn,Ag=$n,v6=Re,xg=v6("toStringTag");for(var Ul in h6){var Mg=d6[Ul],Gl=Mg&&Mg.prototype;Gl&&f6(Gl)!==xg&&c6(Gl,xg,Ul),Ag[Ul]=Ag.Array}var p6=u6,g6=p6,y6=g6,m6=y6,b6=m6,$6=b6,Qt=$6,w6=_i,_n=Array.isArray||function(n){return w6(n)=="Array"},qa={},_6=T1,E6=_f,S6=E6.concat("length","prototype");qa.f=Object.getOwnPropertyNames||function(n){return _6(n,S6)};var vu={},O6=G,Dg=Va,T6=zt,k6=wn,I6=O6.Array,P6=Math.max,s0=function(i,n,e){for(var t=T6(i),r=Dg(n,t),a=Dg(e===void 0?t:e,t),o=I6(P6(a-r,0)),s=0;r<a;r++,s++)k6(o,s,i[r]);return o.length=s,o},C6=_i,A6=Lt,u0=qa.f,x6=s0,l0=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],M6=function(i){try{return u0(i)}catch{return x6(l0)}};vu.f=function(n){return l0&&C6(n)=="Window"?M6(n):u0(A6(n))};var pu={},D6=Re;pu.f=D6;var Rg=re,R6=Xe,F6=pu,N6=bt.f,Te=function(i){var n=Rg.Symbol||(Rg.Symbol={});R6(n,i)||N6(n,i,{value:F6.f(i)})},B6=G,Fg=_n,L6=fu,z6=He,j6=Re,H6=j6("species"),Ng=B6.Array,W6=function(i){var n;return Fg(i)&&(n=i.constructor,L6(n)&&(n===Ng||Fg(n.prototype))?n=void 0:z6(n)&&(n=n[H6],n===null&&(n=void 0))),n===void 0?Ng:n},V6=W6,Pf=function(i,n){return new(V6(i))(n===0?0:n)},U6=Wa,G6=oe,K6=eu,q6=mt,Y6=zt,X6=Pf,Bg=G6([].push),br=function(i){var n=i==1,e=i==2,t=i==3,r=i==4,a=i==6,o=i==7,s=i==5||a;return function(u,l,h,d){for(var f=q6(u),c=K6(f),v=U6(l,h),g=Y6(c),b=0,p=d||X6,$=n?p(u,g):e||o?p(u,0):void 0,y,m;g>b;b++)if((s||b in c)&&(y=c[b],m=v(y,b,f),i))if(n)$[b]=m;else if(m)switch(i){case 3:return!0;case 5:return y;case 6:return b;case 2:Bg($,y)}else switch(i){case 4:return!1;case 7:Bg($,y)}return a?-1:t||r?r:$}},zr={forEach:br(0),map:br(1),filter:br(2),some:br(3),every:br(4),find:br(5),findIndex:br(6),filterReject:br(7)},En=Y,Cf=G,Q6=gr,Z6=pn,Ya=Bt,J6=oe,Ji=je,fi=yf,Af=de,Ie=Xe,eV=_n,tV=Ke,rV=He,iV=Me,ld=mf,hd=$t,nV=mt,gu=Lt,xf=nu,h0=Br,dd=Ba,ia=bn,d0=Ga,aV=qa,f0=vu,fd=ou,c0=gn,v0=bt,oV=lu,p0=Na,sV=su,cd=du,Xa=ru.exports,uV=uu,g0=Ua,Lg=iu,y0=Re,lV=pu,hV=Te,dV=Ka,m0=Si,yu=zr.forEach,ut=uV("hidden"),mu="Symbol",na="prototype",zg=y0("toPrimitive"),fV=m0.set,jg=m0.getterFor(mu),Mt=Object[na],ar=Cf.Symbol,Pr=ar&&ar[na],b0=Cf.TypeError,Kl=Cf.QObject,An=Q6("JSON","stringify"),$0=c0.f,Or=v0.f,w0=f0.f,cV=p0.f,_0=J6([].push),fr=Xa("symbols"),Qa=Xa("op-symbols"),ql=Xa("string-to-symbol-registry"),Yl=Xa("symbol-to-string-registry"),vV=Xa("wks"),vd=!Kl||!Kl[na]||!Kl[na].findChild,pd=Ji&&Af(function(){return ia(Or({},"a",{get:function(){return Or(this,"a",{value:7}).a}})).a!=7})?function(i,n,e){var t=$0(Mt,n);t&&delete Mt[n],Or(i,n,e),t&&i!==Mt&&Or(Mt,n,t)}:Or,Xl=function(i,n){var e=fr[i]=ia(Pr);return fV(e,{type:mu,tag:i,description:n}),Ji||(e.description=n),e},bu=function(n,e,t){n===Mt&&bu(Qa,e,t),hd(n);var r=xf(e);return hd(t),Ie(fr,r)?(t.enumerable?(Ie(n,ut)&&n[ut][r]&&(n[ut][r]=!1),t=ia(t,{enumerable:dd(0,!1)})):(Ie(n,ut)||Or(n,ut,dd(1,{})),n[ut][r]=!0),pd(n,r,t)):Or(n,r,t)},Mf=function(n,e){hd(n);var t=gu(e),r=d0(t).concat(Df(t));return yu(r,function(a){(!Ji||Ya(E0,t,a))&&bu(n,a,t[a])}),n},pV=function(n,e){return e===void 0?ia(n):Mf(ia(n),e)},E0=function(n){var e=xf(n),t=Ya(cV,this,e);return this===Mt&&Ie(fr,e)&&!Ie(Qa,e)?!1:t||!Ie(this,e)||!Ie(fr,e)||Ie(this,ut)&&this[ut][e]?t:!0},S0=function(n,e){var t=gu(n),r=xf(e);if(!(t===Mt&&Ie(fr,r)&&!Ie(Qa,r))){var a=$0(t,r);return a&&Ie(fr,r)&&!(Ie(t,ut)&&t[ut][r])&&(a.enumerable=!0),a}},O0=function(n){var e=w0(gu(n)),t=[];return yu(e,function(r){!Ie(fr,r)&&!Ie(g0,r)&&_0(t,r)}),t},Df=function(n){var e=n===Mt,t=w0(e?Qa:gu(n)),r=[];return yu(t,function(a){Ie(fr,a)&&(!e||Ie(Mt,a))&&_0(r,fr[a])}),r};fi||(ar=function(){if(iV(Pr,this))throw b0("Symbol is not a constructor");var n=!arguments.length||arguments[0]===void 0?void 0:h0(arguments[0]),e=Lg(n),t=function(r){this===Mt&&Ya(t,Qa,r),Ie(this,ut)&&Ie(this[ut],e)&&(this[ut][e]=!1),pd(this,e,dd(1,r))};return Ji&&vd&&pd(Mt,e,{configurable:!0,set:t}),Xl(e,n)},Pr=ar[na],cd(Pr,"toString",function(){return jg(this).tag}),cd(ar,"withoutSetter",function(i){return Xl(Lg(i),i)}),p0.f=E0,v0.f=bu,oV.f=Mf,c0.f=S0,aV.f=f0.f=O0,fd.f=Df,lV.f=function(i){return Xl(y0(i),i)},Ji&&Or(Pr,"description",{configurable:!0,get:function(){return jg(this).description}}));En({global:!0,wrap:!0,forced:!fi,sham:!fi},{Symbol:ar});yu(d0(vV),function(i){hV(i)});En({target:mu,stat:!0,forced:!fi},{for:function(i){var n=h0(i);if(Ie(ql,n))return ql[n];var e=ar(n);return ql[n]=e,Yl[e]=n,e},keyFor:function(n){if(!ld(n))throw b0(n+" is not a symbol");if(Ie(Yl,n))return Yl[n]},useSetter:function(){vd=!0},useSimple:function(){vd=!1}});En({target:"Object",stat:!0,forced:!fi,sham:!Ji},{create:pV,defineProperty:bu,defineProperties:Mf,getOwnPropertyDescriptor:S0});En({target:"Object",stat:!0,forced:!fi},{getOwnPropertyNames:O0,getOwnPropertySymbols:Df});En({target:"Object",stat:!0,forced:Af(function(){fd.f(1)})},{getOwnPropertySymbols:function(n){return fd.f(nV(n))}});if(An){var gV=!fi||Af(function(){var i=ar();return An([i])!="[null]"||An({a:i})!="{}"||An(Object(i))!="{}"});En({target:"JSON",stat:!0,forced:gV},{stringify:function(n,e,t){var r=sV(arguments),a=e;if(!(!rV(e)&&n===void 0||ld(n)))return eV(e)||(e=function(o,s){if(tV(a)&&(s=Ya(a,this,o,s)),!ld(s))return s}),r[1]=e,Z6(An,null,r)}})}if(!Pr[zg]){var yV=Pr.valueOf;cd(Pr,zg,function(i){return Ya(yV,this)})}dV(ar,mu);g0[ut]=!0;var mV=re,bV=mV.Object.getOwnPropertySymbols,$V=bV,wV=$V,Rr=wV,T0={exports:{}},_V=Y,EV=de,SV=Lt,k0=gn.f,I0=je,OV=EV(function(){k0(1)}),TV=!I0||OV;_V({target:"Object",stat:!0,forced:TV,sham:!I0},{getOwnPropertyDescriptor:function(n,e){return k0(SV(n),e)}});var kV=re,P0=kV.Object,IV=T0.exports=function(n,e){return P0.getOwnPropertyDescriptor(n,e)};P0.getOwnPropertyDescriptor.sham&&(IV.sham=!0);var PV=T0.exports,C0=PV,jr=C0,CV=gr,AV=oe,xV=qa,MV=ou,DV=$t,RV=AV([].concat),A0=CV("Reflect","ownKeys")||function(n){var e=xV.f(DV(n)),t=MV.f;return t?RV(e,t(n)):e},FV=Y,NV=je,BV=A0,LV=Lt,zV=gn,jV=wn;FV({target:"Object",stat:!0,sham:!NV},{getOwnPropertyDescriptors:function(n){for(var e=LV(n),t=zV.f,r=BV(e),a={},o=0,s,u;r.length>o;)u=t(e,s=r[o++]),u!==void 0&&jV(a,s,u);return a}});var HV=re,WV=HV.Object.getOwnPropertyDescriptors,VV=WV,UV=VV,Fr=UV,x0={exports:{}},GV=Y,KV=je,Hg=lu.f;GV({target:"Object",stat:!0,forced:Object.defineProperties!==Hg,sham:!KV},{defineProperties:Hg});var qV=re,M0=qV.Object,YV=x0.exports=function(n,e){return M0.defineProperties(n,e)};M0.defineProperties.sham&&(YV.sham=!0);var XV=x0.exports,QV=XV,$u=QV,D0={exports:{}},ZV=Y,JV=je,Wg=bt.f;ZV({target:"Object",stat:!0,forced:Object.defineProperty!==Wg,sham:!JV},{defineProperty:Wg});var e8=re,R0=e8.Object,t8=D0.exports=function(n,e,t){return R0.defineProperty(n,e,t)};R0.defineProperty.sham&&(t8.sham=!0);var r8=D0.exports,F0=r8,wu=F0;function D(i,n){if(!(i instanceof n))throw new TypeError("Cannot call a class as a function")}var i8=F0,n8=i8,a8=n8,o8=a8,_u=o8;function Vg(i,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),_u(i,t.key,t)}}function R(i,n,e){return n&&Vg(i.prototype,n),e&&Vg(i,e),_u(i,"prototype",{writable:!1}),i}function Eu(i,n,e){return n in i?_u(i,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[n]=e,i}var s8=Y,u8=_n;s8({target:"Array",stat:!0},{isArray:u8});var l8=re,h8=l8.Array.isArray,d8=h8,N0=d8,f8=N0,c8=f8,v8=c8,p8=v8,B0=p8;function g8(i){if(B0(i))return i}var y8=de,m8=Re,b8=ja,$8=m8("species"),Za=function(i){return b8>=51||!y8(function(){var n=[],e=n.constructor={};return e[$8]=function(){return{foo:1}},n[i](Boolean).foo!==1})},w8=Y,_8=G,E8=de,S8=_n,O8=He,T8=mt,k8=zt,Ug=wn,I8=Pf,P8=Za,C8=Re,A8=ja,L0=C8("isConcatSpreadable"),Gg=9007199254740991,Kg="Maximum allowed index exceeded",qg=_8.TypeError,x8=A8>=51||!E8(function(){var i=[];return i[L0]=!1,i.concat()[0]!==i}),M8=P8("concat"),D8=function(i){if(!O8(i))return!1;var n=i[L0];return n!==void 0?!!n:S8(i)},R8=!x8||!M8;w8({target:"Array",proto:!0,forced:R8},{concat:function(n){var e=T8(this),t=I8(e,0),r=0,a,o,s,u,l;for(a=-1,s=arguments.length;a<s;a++)if(l=a===-1?e:arguments[a],D8(l)){if(u=k8(l),r+u>Gg)throw qg(Kg);for(o=0;o<u;o++,r++)o in l&&Ug(t,r,l[o])}else{if(r>=Gg)throw qg(Kg);Ug(t,r++,l)}return t.length=r,t}});var F8=Te;F8("asyncIterator");var N8=Te;N8("hasInstance");var B8=Te;B8("isConcatSpreadable");var L8=Te;L8("iterator");var z8=Te;z8("match");var j8=Te;j8("matchAll");var H8=Te;H8("replace");var W8=Te;W8("search");var V8=Te;V8("species");var U8=Te;U8("split");var G8=Te;G8("toPrimitive");var K8=Te;K8("toStringTag");var q8=Te;q8("unscopables");var Y8=G,X8=Ka;X8(Y8.JSON,"JSON",!0);var Q8=re,Z8=Q8.Symbol,J8=Z8,z0=J8,e9=z0,t9=e9,r9=Te;r9("asyncDispose");var i9=Te;i9("dispose");var n9=Te;n9("matcher");var a9=Te;a9("metadata");var o9=Te;o9("observable");var s9=Te;s9("patternMatch");var u9=Te;u9("replaceAll");var l9=t9,h9=l9,Wi=h9;function d9(i,n){var e=i==null?null:typeof Wi<"u"&&Qt(i)||i["@@iterator"];if(e!=null){var t=[],r=!0,a=!1,o,s;try{for(e=e.call(i);!(r=(o=e.next()).done)&&(t.push(o.value),!(n&&t.length===n));r=!0);}catch(u){a=!0,s=u}finally{try{!r&&e.return!=null&&e.return()}finally{if(a)throw s}}return t}}var f9=Y,c9=G,Yg=_n,v9=fu,p9=He,Xg=Va,g9=zt,y9=Lt,m9=wn,b9=Re,$9=Za,w9=su,_9=$9("slice"),E9=b9("species"),Ql=c9.Array,S9=Math.max;f9({target:"Array",proto:!0,forced:!_9},{slice:function(n,e){var t=y9(this),r=g9(t),a=Xg(n,r),o=Xg(e===void 0?r:e,r),s,u,l;if(Yg(t)&&(s=t.constructor,v9(s)&&(s===Ql||Yg(s.prototype))?s=void 0:p9(s)&&(s=s[E9],s===null&&(s=void 0)),s===Ql||s===void 0))return w9(t,a,o);for(u=new(s===void 0?Ql:s)(S9(o-a,0)),l=0;a<o;a++,l++)a in t&&m9(u,l,t[a]);return u.length=l,u}});var O9=We,T9=O9("Array").slice,k9=Me,I9=T9,Zl=Array.prototype,P9=function(i){var n=i.slice;return i===Zl||k9(Zl,i)&&n===Zl.slice?I9:n},C9=P9,j0=C9,A9=j0,x9=A9,M9=x9,D9=M9,R9=D9,F9=n0,N9=F9,B9=N9,L9=B9,H0=L9;function gd(i,n){(n==null||n>i.length)&&(n=i.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=i[e];return t}function W0(i,n){var e;if(i){if(typeof i=="string")return gd(i,n);var t=R9(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return H0(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return gd(i,n)}}function z9(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
63
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _e(i,n){return g8(i)||d9(i,n)||W0(i,n)||z9()}var j9=pu,H9=j9.f("iterator"),W9=H9,V9=W9,U9=V9,G9=U9,K9=G9,q9=K9,Y9=q9;function ce(i){return ce=typeof Wi=="function"&&typeof Y9=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Wi=="function"&&n.constructor===Wi&&n!==Wi.prototype?"symbol":typeof n},ce(i)}function X9(i){if(B0(i))return gd(i)}function Q9(i){if(typeof Wi<"u"&&Qt(i)!=null||i["@@iterator"]!=null)return H0(i)}function Z9(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
64
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ht(i){return X9(i)||Q9(i)||W0(i)||Z9()}var yr=z0,J9=We,eU=J9("Array").concat,tU=Me,rU=eU,Jl=Array.prototype,iU=function(i){var n=i.concat;return i===Jl||tU(Jl,i)&&n===Jl.concat?rU:n},nU=iU,aU=nU,Rf=aU,Be=j0,oU=Y,sU=A0;oU({target:"Reflect",stat:!0},{ownKeys:sU});var uU=re;uU.Reflect.ownKeys;var ue=N0,lU=Y,hU=zr.map,dU=Za,fU=dU("map");lU({target:"Array",proto:!0,forced:!fU},{map:function(n){return hU(this,n,arguments.length>1?arguments[1]:void 0)}});var cU=We,vU=cU("Array").map,pU=Me,gU=vU,eh=Array.prototype,yU=function(i){var n=i.map;return i===eh||pU(eh,i)&&n===eh.map?gU:n},mU=yU,bU=mU,en=bU,$U=Y,wU=mt,V0=Ga,_U=de,EU=_U(function(){V0(1)});$U({target:"Object",stat:!0,forced:EU},{keys:function(n){return V0(wU(n))}});var SU=re,OU=SU.Object.keys,TU=OU,kU=TU,we=kU,IU=Y,PU=G,CU=oe,U0=PU.Date,AU=CU(U0.prototype.getTime);IU({target:"Date",stat:!0},{now:function(){return AU(new U0)}});var xU=re,MU=xU.Date.now,DU=MU,RU=DU,ps=RU,FU=de,Sn=function(i,n){var e=[][i];return!!e&&FU(function(){e.call(null,n||function(){return 1},1)})},NU=zr.forEach,BU=Sn,LU=BU("forEach"),zU=LU?[].forEach:function(n){return NU(this,n,arguments.length>1?arguments[1]:void 0)},jU=Y,Qg=zU;jU({target:"Array",proto:!0,forced:[].forEach!=Qg},{forEach:Qg});var HU=We,WU=HU("Array").forEach,VU=WU,UU=VU,GU=Ei,KU=Xe,qU=Me,YU=UU,th=Array.prototype,XU={DOMTokenList:!0,NodeList:!0},QU=function(i){var n=i.forEach;return i===th||qU(th,i)&&n===th.forEach||KU(XU,GU(i))?YU:n},ve=QU,ZU=Y,JU=oe,eG=_n,tG=JU([].reverse),Zg=[1,2];ZU({target:"Array",proto:!0,forced:String(Zg)===String(Zg.reverse())},{reverse:function(){return eG(this)&&(this.length=this.length),tG(this)}});var rG=We,iG=rG("Array").reverse,nG=Me,aG=iG,rh=Array.prototype,oG=function(i){var n=i.reverse;return i===rh||nG(rh,i)&&n===rh.reverse?aG:n},sG=oG,uG=sG,ii=uG,lG=Y,hG=G,dG=Va,fG=au,cG=zt,vG=mt,pG=Pf,gG=wn,yG=Za,mG=yG("splice"),bG=hG.TypeError,$G=Math.max,wG=Math.min,_G=9007199254740991,EG="Maximum allowed length exceeded";lG({target:"Array",proto:!0,forced:!mG},{splice:function(n,e){var t=vG(this),r=cG(t),a=dG(n,r),o=arguments.length,s,u,l,h,d,f;if(o===0?s=u=0:o===1?(s=0,u=r-a):(s=o-2,u=wG($G(fG(e),0),r-a)),r+s-u>_G)throw bG(EG);for(l=pG(t,u),h=0;h<u;h++)d=a+h,d in t&&gG(l,h,t[d]);if(l.length=u,s<u){for(h=a;h<r-u;h++)d=h+u,f=h+s,d in t?t[f]=t[d]:delete t[f];for(h=r;h>r-u+s;h--)delete t[h-1]}else if(s>u)for(h=r-u;h>a;h--)d=h+u-1,f=h+s-1,d in t?t[f]=t[d]:delete t[f];for(h=0;h<s;h++)t[h+a]=arguments[h+2];return t.length=r-u+s,l}});var SG=We,OG=SG("Array").splice,TG=Me,kG=OG,ih=Array.prototype,IG=function(i){var n=i.splice;return i===ih||TG(ih,i)&&n===ih.splice?kG:n},PG=IG,CG=PG,or=CG,AG=Y,xG=wf.includes;AG({target:"Array",proto:!0},{includes:function(n){return xG(this,n,arguments.length>1?arguments[1]:void 0)}});var MG=We,DG=MG("Array").includes,RG=He,FG=_i,NG=Re,BG=NG("match"),LG=function(i){var n;return RG(i)&&((n=i[BG])!==void 0?!!n:FG(i)=="RegExp")},zG=G,jG=LG,HG=zG.TypeError,WG=function(i){if(jG(i))throw HG("The method doesn't accept regular expressions");return i},VG=Re,UG=VG("match"),GG=function(i){var n=/./;try{"/./"[i](n)}catch{try{return n[UG]=!1,"/./"[i](n)}catch{}}return!1},KG=Y,qG=oe,YG=WG,XG=La,Jg=Br,QG=GG,ZG=qG("".indexOf);KG({target:"String",proto:!0,forced:!QG("includes")},{includes:function(n){return!!~ZG(Jg(XG(this)),Jg(YG(n)),arguments.length>1?arguments[1]:void 0)}});var JG=We,e7=JG("String").includes,ey=Me,t7=DG,r7=e7,nh=Array.prototype,ah=String.prototype,i7=function(i){var n=i.includes;return i===nh||ey(nh,i)&&n===nh.includes?t7:typeof i=="string"||i===ah||ey(ah,i)&&n===ah.includes?r7:n},n7=i7,a7=n7,Kt=a7,o7=Y,s7=de,u7=mt,G0=hu,l7=W1,h7=s7(function(){G0(1)});o7({target:"Object",stat:!0,forced:h7,sham:!l7},{getPrototypeOf:function(n){return G0(u7(n))}});var d7=re,f7=d7.Object.getPrototypeOf,c7=f7,K0=c7,ty=K0,v7=Y,p7=zr.filter,g7=Za,y7=g7("filter");v7({target:"Array",proto:!0,forced:!y7},{filter:function(n){return p7(this,n,arguments.length>1?arguments[1]:void 0)}});var m7=We,b7=m7("Array").filter,$7=Me,w7=b7,oh=Array.prototype,_7=function(i){var n=i.filter;return i===oh||$7(oh,i)&&n===oh.filter?w7:n},E7=_7,S7=E7,ht=S7,O7=je,q0=oe,T7=Ga,k7=Lt,I7=Na.f,P7=q0(I7),C7=q0([].push),ry=function(i){return function(n){for(var e=k7(n),t=T7(e),r=t.length,a=0,o=[],s;r>a;)s=t[a++],(!O7||P7(e,s))&&C7(o,i?[s,e[s]]:e[s]);return o}},A7={entries:ry(!0),values:ry(!1)},x7=Y,M7=A7.values;x7({target:"Object",stat:!0},{values:function(n){return M7(n)}});var D7=re;D7.Object.values;var Su=`
|
|
65
|
-
\v\f\r \u2028\u2029\uFEFF`,R7=oe,F7=La,N7=Br,B7=Su,iy=R7("".replace),gs="["+B7+"]",L7=RegExp("^"+gs+gs+"*"),z7=RegExp(gs+gs+"*$"),sh=function(i){return function(n){var e=N7(F7(n));return i&1&&(e=iy(e,L7,"")),i&2&&(e=iy(e,z7,"")),e}},Ff={start:sh(1),end:sh(2),trim:sh(3)},Y0=G,j7=de,H7=oe,W7=Br,V7=Ff.trim,ny=Su,Hn=Y0.parseInt,ay=Y0.Symbol,oy=ay&&ay.iterator,X0=/^[+-]?0x/i,U7=H7(X0.exec),G7=Hn(ny+"08")!==8||Hn(ny+"0x16")!==22||oy&&!j7(function(){Hn(Object(oy))}),K7=G7?function(n,e){var t=V7(W7(n));return Hn(t,e>>>0||(U7(X0,t)?16:10))}:Hn,q7=Y,sy=K7;q7({global:!0,forced:parseInt!=sy},{parseInt:sy});var Y7=re,X7=Y7.parseInt,Q7=X7,Z7=Q7,At=Z7,J7=Y,eK=oe,tK=wf.indexOf,rK=Sn,yd=eK([].indexOf),uy=!!yd&&1/yd([1],1,-0)<0,iK=rK("indexOf");J7({target:"Array",proto:!0,forced:uy||!iK},{indexOf:function(n){var e=arguments.length>1?arguments[1]:void 0;return uy?yd(this,n,e)||0:tK(this,n,e)}});var nK=We,aK=nK("Array").indexOf,oK=Me,sK=aK,uh=Array.prototype,uK=function(i){var n=i.indexOf;return i===uh||oK(uh,i)&&n===uh.indexOf?sK:n},lK=uK,hK=lK,ae=hK,dK=z1.PROPER,fK=de,ly=Su,hy="
",cK=function(i){return fK(function(){return!!ly[i]()||hy[i]()!==hy||dK&&ly[i].name!==i})},vK=Y,pK=Ff.trim,gK=cK;vK({target:"String",proto:!0,forced:gK("trim")},{trim:function(){return pK(this)}});var yK=We;yK("String").trim;var mK=Y,bK=je,$K=bn;mK({target:"Object",stat:!0,sham:!bK},{create:$K});var wK=re,_K=wK.Object,EK=function(n,e){return _K.create(n,e)},SK=EK,Q0=SK,ni=Q0,OK=Y,TK=G,kK=gr,IK=pn,Ja=oe,PK=de,CK=TK.Array,ys=kK("JSON","stringify"),Io=Ja(/./.exec),dy=Ja("".charAt),AK=Ja("".charCodeAt),xK=Ja("".replace),MK=Ja(1 .toString),DK=/[\uD800-\uDFFF]/g,fy=/^[\uD800-\uDBFF]$/,cy=/^[\uDC00-\uDFFF]$/,RK=function(i,n,e){var t=dy(e,n-1),r=dy(e,n+1);return Io(fy,i)&&!Io(cy,r)||Io(cy,i)&&!Io(fy,t)?"\\u"+MK(AK(i,0),16):i},FK=PK(function(){return ys("\uDF06\uD834")!=='"\\udf06\\ud834"'||ys("\uDEAD")!=='"\\udead"'});ys&&OK({target:"JSON",stat:!0,forced:FK},{stringify:function(n,e,t){for(var r=0,a=arguments.length,o=CK(a);r<a;r++)o[r]=arguments[r];var s=IK(ys,null,o);return typeof s=="string"?xK(s,DK,RK):s}});var md=re,NK=pn;md.JSON||(md.JSON={stringify:JSON.stringify});var BK=function(n,e,t){return NK(md.JSON.stringify,null,arguments)},LK=BK,zK=LK,eo=zK,jK=G,HK=jK.TypeError,WK=function(i,n){if(i<n)throw HK("Not enough arguments");return i},VK=Y,bd=G,UK=pn,GK=Ke,KK=za,qK=su,YK=WK,XK=/MSIE .\./.test(KK),QK=bd.Function,vy=function(i){return function(n,e){var t=YK(arguments.length,1)>2,r=GK(n)?n:QK(n),a=t?qK(arguments,2):void 0;return i(t?function(){UK(r,this,a)}:r,e)}};VK({global:!0,bind:!0,forced:XK},{setTimeout:vy(bd.setTimeout),setInterval:vy(bd.setInterval)});var ZK=re,JK=ZK.setTimeout,qt=JK,eq=mt,py=Va,tq=zt,rq=function(n){for(var e=eq(this),t=tq(e),r=arguments.length,a=py(r>1?arguments[1]:void 0,t),o=r>2?arguments[2]:void 0,s=o===void 0?t:py(o,t);s>a;)e[a++]=n;return e},iq=Y,nq=rq;iq({target:"Array",proto:!0},{fill:nq});var aq=We,oq=aq("Array").fill,sq=Me,uq=oq,lh=Array.prototype,lq=function(i){var n=i.fill;return i===lh||sq(lh,i)&&n===lh.fill?uq:n},hq=lq,dq=hq,to=dq;/*! Hammer.JS - v2.0.17-rc - 2019-12-16
|
|
66
|
-
* http://naver.github.io/egjs
|
|
67
|
-
*
|
|
68
|
-
* Forked By Naver egjs
|
|
69
|
-
* Copyright (c) hammerjs
|
|
70
|
-
* Licensed under the MIT license */function Rt(){return Rt=Object.assign||function(i){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])}return i},Rt.apply(this,arguments)}function kt(i,n){i.prototype=Object.create(n.prototype),i.prototype.constructor=i,i.__proto__=n}function Po(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}var $d;typeof Object.assign!="function"?$d=function(n){if(n==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(n),t=1;t<arguments.length;t++){var r=arguments[t];if(r!=null)for(var a in r)r.hasOwnProperty(a)&&(e[a]=r[a])}return e}:$d=Object.assign;var ci=$d,gy=["","webkit","Moz","MS","ms","o"],fq=typeof document>"u"?{style:{}}:document.createElement("div"),cq="function",Vi=Math.round,vi=Math.abs,Nf=Date.now;function Ou(i,n){for(var e,t,r=n[0].toUpperCase()+n.slice(1),a=0;a<gy.length;){if(e=gy[a],t=e?e+r:n,t in i)return t;a++}}var sr;typeof window>"u"?sr={}:sr=window;var Z0=Ou(fq.style,"touchAction"),J0=Z0!==void 0;function vq(){if(!J0)return!1;var i={},n=sr.CSS&&sr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return i[e]=n?sr.CSS.supports("touch-action",e):!0}),i}var ew="compute",tw="auto",wd="manipulation",ai="none",aa="pan-x",oa="pan-y",Co=vq(),pq=/mobile|tablet|ip(ad|hone|od)|android/i,rw="ontouchstart"in sr,gq=Ou(sr,"PointerEvent")!==void 0,yq=rw&&pq.test(navigator.userAgent),ro="touch",mq="pen",Bf="mouse",bq="kinect",$q=25,tt=1,Oi=2,Ae=4,ft=8,ms=1,io=2,no=4,ao=8,tn=16,Yt=io|no,oi=ao|tn,iw=Yt|oi,nw=["x","y"],bs=["clientX","clientY"];function ur(i,n,e){var t;if(i)if(i.forEach)i.forEach(n,e);else if(i.length!==void 0)for(t=0;t<i.length;)n.call(e,i[t],t,i),t++;else for(t in i)i.hasOwnProperty(t)&&n.call(e,i[t],t,i)}function Tu(i,n){return typeof i===cq?i.apply(n&&n[0]||void 0,n):i}function Qr(i,n){return i.indexOf(n)>-1}function wq(i){if(Qr(i,ai))return ai;var n=Qr(i,aa),e=Qr(i,oa);return n&&e?ai:n||e?n?aa:oa:Qr(i,wd)?wd:tw}var aw=function(){function i(e,t){this.manager=e,this.set(t)}var n=i.prototype;return n.set=function(t){t===ew&&(t=this.compute()),J0&&this.manager.element.style&&Co[t]&&(this.manager.element.style[Z0]=t),this.actions=t.toLowerCase().trim()},n.update=function(){this.set(this.manager.options.touchAction)},n.compute=function(){var t=[];return ur(this.manager.recognizers,function(r){Tu(r.options.enable,[r])&&(t=t.concat(r.getTouchAction()))}),wq(t.join(" "))},n.preventDefaults=function(t){var r=t.srcEvent,a=t.offsetDirection;if(this.manager.session.prevented){r.preventDefault();return}var o=this.actions,s=Qr(o,ai)&&!Co[ai],u=Qr(o,oa)&&!Co[oa],l=Qr(o,aa)&&!Co[aa];if(s){var h=t.pointers.length===1,d=t.distance<2,f=t.deltaTime<250;if(h&&d&&f)return}if(!(l&&u)&&(s||u&&a&Yt||l&&a&oi))return this.preventSrc(r)},n.preventSrc=function(t){this.manager.session.prevented=!0,t.preventDefault()},i}();function Lf(i,n){for(;i;){if(i===n)return!0;i=i.parentNode}return!1}function ow(i){var n=i.length;if(n===1)return{x:Vi(i[0].clientX),y:Vi(i[0].clientY)};for(var e=0,t=0,r=0;r<n;)e+=i[r].clientX,t+=i[r].clientY,r++;return{x:Vi(e/n),y:Vi(t/n)}}function yy(i){for(var n=[],e=0;e<i.pointers.length;)n[e]={clientX:Vi(i.pointers[e].clientX),clientY:Vi(i.pointers[e].clientY)},e++;return{timeStamp:Nf(),pointers:n,center:ow(n),deltaX:i.deltaX,deltaY:i.deltaY}}function $s(i,n,e){e||(e=nw);var t=n[e[0]]-i[e[0]],r=n[e[1]]-i[e[1]];return Math.sqrt(t*t+r*r)}function _d(i,n,e){e||(e=nw);var t=n[e[0]]-i[e[0]],r=n[e[1]]-i[e[1]];return Math.atan2(r,t)*180/Math.PI}function sw(i,n){return i===n?ms:vi(i)>=vi(n)?i<0?io:no:n<0?ao:tn}function _q(i,n){var e=n.center,t=i.offsetDelta||{},r=i.prevDelta||{},a=i.prevInput||{};(n.eventType===tt||a.eventType===Ae)&&(r=i.prevDelta={x:a.deltaX||0,y:a.deltaY||0},t=i.offsetDelta={x:e.x,y:e.y}),n.deltaX=r.x+(e.x-t.x),n.deltaY=r.y+(e.y-t.y)}function uw(i,n,e){return{x:n/i||0,y:e/i||0}}function Eq(i,n){return $s(n[0],n[1],bs)/$s(i[0],i[1],bs)}function Sq(i,n){return _d(n[1],n[0],bs)+_d(i[1],i[0],bs)}function Oq(i,n){var e=i.lastInterval||n,t=n.timeStamp-e.timeStamp,r,a,o,s;if(n.eventType!==ft&&(t>$q||e.velocity===void 0)){var u=n.deltaX-e.deltaX,l=n.deltaY-e.deltaY,h=uw(t,u,l);a=h.x,o=h.y,r=vi(h.x)>vi(h.y)?h.x:h.y,s=sw(u,l),i.lastInterval=n}else r=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;n.velocity=r,n.velocityX=a,n.velocityY=o,n.direction=s}function Tq(i,n){var e=i.session,t=n.pointers,r=t.length;e.firstInput||(e.firstInput=yy(n)),r>1&&!e.firstMultiple?e.firstMultiple=yy(n):r===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=n.center=ow(t);n.timeStamp=Nf(),n.deltaTime=n.timeStamp-a.timeStamp,n.angle=_d(s,u),n.distance=$s(s,u),_q(e,n),n.offsetDirection=sw(n.deltaX,n.deltaY);var l=uw(n.deltaTime,n.deltaX,n.deltaY);n.overallVelocityX=l.x,n.overallVelocityY=l.y,n.overallVelocity=vi(l.x)>vi(l.y)?l.x:l.y,n.scale=o?Eq(o.pointers,t):1,n.rotation=o?Sq(o.pointers,t):0,n.maxPointers=e.prevInput?n.pointers.length>e.prevInput.maxPointers?n.pointers.length:e.prevInput.maxPointers:n.pointers.length,Oq(e,n);var h=i.element,d=n.srcEvent,f;d.composedPath?f=d.composedPath()[0]:d.path?f=d.path[0]:f=d.target,Lf(f,h)&&(h=f),n.target=h}function kq(i,n,e){var t=e.pointers.length,r=e.changedPointers.length,a=n&tt&&t-r===0,o=n&(Ae|ft)&&t-r===0;e.isFirst=!!a,e.isFinal=!!o,a&&(i.session={}),e.eventType=n,Tq(i,e),i.emit("hammer.input",e),i.recognize(e),i.session.prevInput=e}function sa(i){return i.trim().split(/\s+/g)}function Wn(i,n,e){ur(sa(n),function(t){i.addEventListener(t,e,!1)})}function Vn(i,n,e){ur(sa(n),function(t){i.removeEventListener(t,e,!1)})}function my(i){var n=i.ownerDocument||i;return n.defaultView||n.parentWindow||window}var On=function(){function i(e,t){var r=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){Tu(e.options.enable,[e])&&r.handler(a)},this.init()}var n=i.prototype;return n.handler=function(){},n.init=function(){this.evEl&&Wn(this.element,this.evEl,this.domHandler),this.evTarget&&Wn(this.target,this.evTarget,this.domHandler),this.evWin&&Wn(my(this.element),this.evWin,this.domHandler)},n.destroy=function(){this.evEl&&Vn(this.element,this.evEl,this.domHandler),this.evTarget&&Vn(this.target,this.evTarget,this.domHandler),this.evWin&&Vn(my(this.element),this.evWin,this.domHandler)},i}();function pi(i,n,e){if(i.indexOf&&!e)return i.indexOf(n);for(var t=0;t<i.length;){if(e&&i[t][e]==n||!e&&i[t]===n)return t;t++}return-1}var Iq={pointerdown:tt,pointermove:Oi,pointerup:Ae,pointercancel:ft,pointerout:ft},Pq={2:ro,3:mq,4:Bf,5:bq},lw="pointerdown",hw="pointermove pointerup pointercancel";sr.MSPointerEvent&&!sr.PointerEvent&&(lw="MSPointerDown",hw="MSPointerMove MSPointerUp MSPointerCancel");var dw=function(i){kt(n,i);function n(){var t,r=n.prototype;return r.evEl=lw,r.evWin=hw,t=i.apply(this,arguments)||this,t.store=t.manager.session.pointerEvents=[],t}var e=n.prototype;return e.handler=function(r){var a=this.store,o=!1,s=r.type.toLowerCase().replace("ms",""),u=Iq[s],l=Pq[r.pointerType]||r.pointerType,h=l===ro,d=pi(a,r.pointerId,"pointerId");u&tt&&(r.button===0||h)?d<0&&(a.push(r),d=a.length-1):u&(Ae|ft)&&(o=!0),!(d<0)&&(a[d]=r,this.callback(this.manager,u,{pointers:a,changedPointers:[r],pointerType:l,srcEvent:r}),o&&a.splice(d,1))},n}(On);function ua(i){return Array.prototype.slice.call(i,0)}function zf(i,n,e){for(var t=[],r=[],a=0;a<i.length;){var o=n?i[a][n]:i[a];pi(r,o)<0&&t.push(i[a]),r[a]=o,a++}return e&&(n?t=t.sort(function(s,u){return s[n]>u[n]}):t=t.sort()),t}var Cq={touchstart:tt,touchmove:Oi,touchend:Ae,touchcancel:ft},Aq="touchstart touchmove touchend touchcancel",jf=function(i){kt(n,i);function n(){var t;return n.prototype.evTarget=Aq,t=i.apply(this,arguments)||this,t.targetIds={},t}var e=n.prototype;return e.handler=function(r){var a=Cq[r.type],o=xq.call(this,r,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:ro,srcEvent:r})},n}(On);function xq(i,n){var e=ua(i.touches),t=this.targetIds;if(n&(tt|Oi)&&e.length===1)return t[e[0].identifier]=!0,[e,e];var r,a,o=ua(i.changedTouches),s=[],u=this.target;if(a=e.filter(function(l){return Lf(l.target,u)}),n===tt)for(r=0;r<a.length;)t[a[r].identifier]=!0,r++;for(r=0;r<o.length;)t[o[r].identifier]&&s.push(o[r]),n&(Ae|ft)&&delete t[o[r].identifier],r++;if(s.length)return[zf(a.concat(s),"identifier",!0),s]}var Mq={mousedown:tt,mousemove:Oi,mouseup:Ae},Dq="mousedown",Rq="mousemove mouseup",Hf=function(i){kt(n,i);function n(){var t,r=n.prototype;return r.evEl=Dq,r.evWin=Rq,t=i.apply(this,arguments)||this,t.pressed=!1,t}var e=n.prototype;return e.handler=function(r){var a=Mq[r.type];a&tt&&r.button===0&&(this.pressed=!0),a&Oi&&r.which!==1&&(a=Ae),this.pressed&&(a&Ae&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[r],changedPointers:[r],pointerType:Bf,srcEvent:r}))},n}(On),Fq=2500,by=25;function $y(i){var n=i.changedPointers,e=n[0];if(e.identifier===this.primaryTouch){var t={x:e.clientX,y:e.clientY},r=this.lastTouches;this.lastTouches.push(t);var a=function(){var s=r.indexOf(t);s>-1&&r.splice(s,1)};setTimeout(a,Fq)}}function Nq(i,n){i&tt?(this.primaryTouch=n.changedPointers[0].identifier,$y.call(this,n)):i&(Ae|ft)&&$y.call(this,n)}function Bq(i){for(var n=i.srcEvent.clientX,e=i.srcEvent.clientY,t=0;t<this.lastTouches.length;t++){var r=this.lastTouches[t],a=Math.abs(n-r.x),o=Math.abs(e-r.y);if(a<=by&&o<=by)return!0}return!1}var fw=function(){var i=function(n){kt(e,n);function e(r,a){var o;return o=n.call(this,r,a)||this,o.handler=function(s,u,l){var h=l.pointerType===ro,d=l.pointerType===Bf;if(!(d&&l.sourceCapabilities&&l.sourceCapabilities.firesTouchEvents)){if(h)Nq.call(Po(Po(o)),u,l);else if(d&&Bq.call(Po(Po(o)),l))return;o.callback(s,u,l)}},o.touch=new jf(o.manager,o.handler),o.mouse=new Hf(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}var t=e.prototype;return t.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(On);return i}();function Lq(i){var n,e=i.options.inputClass;return e?n=e:gq?n=dw:yq?n=jf:rw?n=fw:n=Hf,new n(i,kq)}function Ui(i,n,e){return Array.isArray(i)?(ur(i,e[n],e),!0):!1}var qo=1,Ot=2,rn=4,Mr=8,lr=Mr,la=16,Vt=32,zq=1;function jq(){return zq++}function Ao(i,n){var e=n.manager;return e?e.get(i):i}function wy(i){return i&la?"cancel":i&Mr?"end":i&rn?"move":i&Ot?"start":""}var oo=function(){function i(e){e===void 0&&(e={}),this.options=Rt({enable:!0},e),this.id=jq(),this.manager=null,this.state=qo,this.simultaneous={},this.requireFail=[]}var n=i.prototype;return n.set=function(t){return ci(this.options,t),this.manager&&this.manager.touchAction.update(),this},n.recognizeWith=function(t){if(Ui(t,"recognizeWith",this))return this;var r=this.simultaneous;return t=Ao(t,this),r[t.id]||(r[t.id]=t,t.recognizeWith(this)),this},n.dropRecognizeWith=function(t){return Ui(t,"dropRecognizeWith",this)?this:(t=Ao(t,this),delete this.simultaneous[t.id],this)},n.requireFailure=function(t){if(Ui(t,"requireFailure",this))return this;var r=this.requireFail;return t=Ao(t,this),pi(r,t)===-1&&(r.push(t),t.requireFailure(this)),this},n.dropRequireFailure=function(t){if(Ui(t,"dropRequireFailure",this))return this;t=Ao(t,this);var r=pi(this.requireFail,t);return r>-1&&this.requireFail.splice(r,1),this},n.hasRequireFailures=function(){return this.requireFail.length>0},n.canRecognizeWith=function(t){return!!this.simultaneous[t.id]},n.emit=function(t){var r=this,a=this.state;function o(s){r.manager.emit(s,t)}a<Mr&&o(r.options.event+wy(a)),o(r.options.event),t.additionalEvent&&o(t.additionalEvent),a>=Mr&&o(r.options.event+wy(a))},n.tryEmit=function(t){if(this.canEmit())return this.emit(t);this.state=Vt},n.canEmit=function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(Vt|qo)))return!1;t++}return!0},n.recognize=function(t){var r=ci({},t);if(!Tu(this.options.enable,[this,r])){this.reset(),this.state=Vt;return}this.state&(lr|la|Vt)&&(this.state=qo),this.state=this.process(r),this.state&(Ot|rn|Mr|la)&&this.tryEmit(r)},n.process=function(t){},n.getTouchAction=function(){},n.reset=function(){},i}(),Ed=function(i){kt(n,i);function n(t){var r;return t===void 0&&(t={}),r=i.call(this,Rt({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,r.pTime=!1,r.pCenter=!1,r._timer=null,r._input=null,r.count=0,r}var e=n.prototype;return e.getTouchAction=function(){return[wd]},e.process=function(r){var a=this,o=this.options,s=r.pointers.length===o.pointers,u=r.distance<o.threshold,l=r.deltaTime<o.time;if(this.reset(),r.eventType&tt&&this.count===0)return this.failTimeout();if(u&&l&&s){if(r.eventType!==Ae)return this.failTimeout();var h=this.pTime?r.timeStamp-this.pTime<o.interval:!0,d=!this.pCenter||$s(this.pCenter,r.center)<o.posThreshold;this.pTime=r.timeStamp,this.pCenter=r.center,!d||!h?this.count=1:this.count+=1,this._input=r;var f=this.count%o.taps;if(f===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){a.state=lr,a.tryEmit()},o.interval),Ot):lr}return Vt},e.failTimeout=function(){var r=this;return this._timer=setTimeout(function(){r.state=Vt},this.options.interval),Vt},e.reset=function(){clearTimeout(this._timer)},e.emit=function(){this.state===lr&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},n}(oo),nn=function(i){kt(n,i);function n(t){return t===void 0&&(t={}),i.call(this,Rt({pointers:1},t))||this}var e=n.prototype;return e.attrTest=function(r){var a=this.options.pointers;return a===0||r.pointers.length===a},e.process=function(r){var a=this.state,o=r.eventType,s=a&(Ot|rn),u=this.attrTest(r);return s&&(o&ft||!u)?a|la:s||u?o&Ae?a|Mr:a&Ot?a|rn:Ot:Vt},n}(oo);function cw(i){return i===tn?"down":i===ao?"up":i===io?"left":i===no?"right":""}var Wf=function(i){kt(n,i);function n(t){var r;return t===void 0&&(t={}),r=i.call(this,Rt({event:"pan",threshold:10,pointers:1,direction:iw},t))||this,r.pX=null,r.pY=null,r}var e=n.prototype;return e.getTouchAction=function(){var r=this.options.direction,a=[];return r&Yt&&a.push(oa),r&oi&&a.push(aa),a},e.directionTest=function(r){var a=this.options,o=!0,s=r.distance,u=r.direction,l=r.deltaX,h=r.deltaY;return u&a.direction||(a.direction&Yt?(u=l===0?ms:l<0?io:no,o=l!==this.pX,s=Math.abs(r.deltaX)):(u=h===0?ms:h<0?ao:tn,o=h!==this.pY,s=Math.abs(r.deltaY))),r.direction=u,o&&s>a.threshold&&u&a.direction},e.attrTest=function(r){return nn.prototype.attrTest.call(this,r)&&(this.state&Ot||!(this.state&Ot)&&this.directionTest(r))},e.emit=function(r){this.pX=r.deltaX,this.pY=r.deltaY;var a=cw(r.direction);a&&(r.additionalEvent=this.options.event+a),i.prototype.emit.call(this,r)},n}(nn),vw=function(i){kt(n,i);function n(t){return t===void 0&&(t={}),i.call(this,Rt({event:"swipe",threshold:10,velocity:.3,direction:Yt|oi,pointers:1},t))||this}var e=n.prototype;return e.getTouchAction=function(){return Wf.prototype.getTouchAction.call(this)},e.attrTest=function(r){var a=this.options.direction,o;return a&(Yt|oi)?o=r.overallVelocity:a&Yt?o=r.overallVelocityX:a&oi&&(o=r.overallVelocityY),i.prototype.attrTest.call(this,r)&&a&r.offsetDirection&&r.distance>this.options.threshold&&r.maxPointers===this.options.pointers&&vi(o)>this.options.velocity&&r.eventType&Ae},e.emit=function(r){var a=cw(r.offsetDirection);a&&this.manager.emit(this.options.event+a,r),this.manager.emit(this.options.event,r)},n}(nn),pw=function(i){kt(n,i);function n(t){return t===void 0&&(t={}),i.call(this,Rt({event:"pinch",threshold:0,pointers:2},t))||this}var e=n.prototype;return e.getTouchAction=function(){return[ai]},e.attrTest=function(r){return i.prototype.attrTest.call(this,r)&&(Math.abs(r.scale-1)>this.options.threshold||this.state&Ot)},e.emit=function(r){if(r.scale!==1){var a=r.scale<1?"in":"out";r.additionalEvent=this.options.event+a}i.prototype.emit.call(this,r)},n}(nn),gw=function(i){kt(n,i);function n(t){return t===void 0&&(t={}),i.call(this,Rt({event:"rotate",threshold:0,pointers:2},t))||this}var e=n.prototype;return e.getTouchAction=function(){return[ai]},e.attrTest=function(r){return i.prototype.attrTest.call(this,r)&&(Math.abs(r.rotation)>this.options.threshold||this.state&Ot)},n}(nn),yw=function(i){kt(n,i);function n(t){var r;return t===void 0&&(t={}),r=i.call(this,Rt({event:"press",pointers:1,time:251,threshold:9},t))||this,r._timer=null,r._input=null,r}var e=n.prototype;return e.getTouchAction=function(){return[tw]},e.process=function(r){var a=this,o=this.options,s=r.pointers.length===o.pointers,u=r.distance<o.threshold,l=r.deltaTime>o.time;if(this._input=r,!u||!s||r.eventType&(Ae|ft)&&!l)this.reset();else if(r.eventType&tt)this.reset(),this._timer=setTimeout(function(){a.state=lr,a.tryEmit()},o.time);else if(r.eventType&Ae)return lr;return Vt},e.reset=function(){clearTimeout(this._timer)},e.emit=function(r){this.state===lr&&(r&&r.eventType&Ae?this.manager.emit(this.options.event+"up",r):(this._input.timeStamp=Nf(),this.manager.emit(this.options.event,this._input)))},n}(oo),mw={domEvents:!1,touchAction:ew,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},_y=[[gw,{enable:!1}],[pw,{enable:!1},["rotate"]],[vw,{direction:Yt}],[Wf,{direction:Yt},["swipe"]],[Ed],[Ed,{event:"doubletap",taps:2},["tap"]],[yw]],Hq=1,Ey=2;function Sy(i,n){var e=i.element;if(e.style){var t;ur(i.options.cssProps,function(r,a){t=Ou(e.style,a),n?(i.oldCssProps[t]=e.style[t],e.style[t]=r):e.style[t]=i.oldCssProps[t]||""}),n||(i.oldCssProps={})}}function Wq(i,n){var e=document.createEvent("Event");e.initEvent(i,!0,!0),e.gesture=n,n.target.dispatchEvent(e)}var Oy=function(){function i(e,t){var r=this;this.options=ci({},mw,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=Lq(this),this.touchAction=new aw(this,this.options.touchAction),Sy(this,!0),ur(this.options.recognizers,function(a){var o=r.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var n=i.prototype;return n.set=function(t){return ci(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},n.stop=function(t){this.session.stopped=t?Ey:Hq},n.recognize=function(t){var r=this.session;if(!r.stopped){this.touchAction.preventDefaults(t);var a,o=this.recognizers,s=r.curRecognizer;(!s||s&&s.state&lr)&&(r.curRecognizer=null,s=null);for(var u=0;u<o.length;)a=o[u],r.stopped!==Ey&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(t):a.reset(),!s&&a.state&(Ot|rn|Mr)&&(r.curRecognizer=a,s=a),u++}},n.get=function(t){if(t instanceof oo)return t;for(var r=this.recognizers,a=0;a<r.length;a++)if(r[a].options.event===t)return r[a];return null},n.add=function(t){if(Ui(t,"add",this))return this;var r=this.get(t.options.event);return r&&this.remove(r),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},n.remove=function(t){if(Ui(t,"remove",this))return this;var r=this.get(t);if(t){var a=this.recognizers,o=pi(a,r);o!==-1&&(a.splice(o,1),this.touchAction.update())}return this},n.on=function(t,r){if(t===void 0||r===void 0)return this;var a=this.handlers;return ur(sa(t),function(o){a[o]=a[o]||[],a[o].push(r)}),this},n.off=function(t,r){if(t===void 0)return this;var a=this.handlers;return ur(sa(t),function(o){r?a[o]&&a[o].splice(pi(a[o],r),1):delete a[o]}),this},n.emit=function(t,r){this.options.domEvents&&Wq(t,r);var a=this.handlers[t]&&this.handlers[t].slice();if(!(!a||!a.length)){r.type=t,r.preventDefault=function(){r.srcEvent.preventDefault()};for(var o=0;o<a.length;)a[o](r),o++}},n.destroy=function(){this.element&&Sy(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},i}(),Vq={touchstart:tt,touchmove:Oi,touchend:Ae,touchcancel:ft},Uq="touchstart",Gq="touchstart touchmove touchend touchcancel",Kq=function(i){kt(n,i);function n(){var t,r=n.prototype;return r.evTarget=Uq,r.evWin=Gq,t=i.apply(this,arguments)||this,t.started=!1,t}var e=n.prototype;return e.handler=function(r){var a=Vq[r.type];if(a===tt&&(this.started=!0),!!this.started){var o=qq.call(this,r,a);a&(Ae|ft)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:ro,srcEvent:r})}},n}(On);function qq(i,n){var e=ua(i.touches),t=ua(i.changedTouches);return n&(Ae|ft)&&(e=zf(e.concat(t),"identifier",!0)),[e,t]}function bw(i,n,e){var t="DEPRECATED METHOD: "+n+`
|
|
71
|
-
`+e+` AT
|
|
72
|
-
`;return function(){var r=new Error("get-stack-trace"),a=r&&r.stack?r.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,t,a),i.apply(this,arguments)}}var $w=bw(function(i,n,e){for(var t=Object.keys(n),r=0;r<t.length;)(!e||e&&i[t[r]]===void 0)&&(i[t[r]]=n[t[r]]),r++;return i},"extend","Use `assign`."),Yq=bw(function(i,n){return $w(i,n,!0)},"merge","Use `assign`.");function Xq(i,n,e){var t=n.prototype,r;r=i.prototype=Object.create(t),r.constructor=i,r._super=t,e&&ci(r,e)}function Ty(i,n){return function(){return i.apply(n,arguments)}}var Qq=function(){var i=function(e,t){return t===void 0&&(t={}),new Oy(e,Rt({recognizers:_y.concat()},t))};return i.VERSION="2.0.17-rc",i.DIRECTION_ALL=iw,i.DIRECTION_DOWN=tn,i.DIRECTION_LEFT=io,i.DIRECTION_RIGHT=no,i.DIRECTION_UP=ao,i.DIRECTION_HORIZONTAL=Yt,i.DIRECTION_VERTICAL=oi,i.DIRECTION_NONE=ms,i.DIRECTION_DOWN=tn,i.INPUT_START=tt,i.INPUT_MOVE=Oi,i.INPUT_END=Ae,i.INPUT_CANCEL=ft,i.STATE_POSSIBLE=qo,i.STATE_BEGAN=Ot,i.STATE_CHANGED=rn,i.STATE_ENDED=Mr,i.STATE_RECOGNIZED=lr,i.STATE_CANCELLED=la,i.STATE_FAILED=Vt,i.Manager=Oy,i.Input=On,i.TouchAction=aw,i.TouchInput=jf,i.MouseInput=Hf,i.PointerEventInput=dw,i.TouchMouseInput=fw,i.SingleTouchInput=Kq,i.Recognizer=oo,i.AttrRecognizer=nn,i.Tap=Ed,i.Pan=Wf,i.Swipe=vw,i.Pinch=pw,i.Rotate=gw,i.Press=yw,i.on=Wn,i.off=Vn,i.each=ur,i.merge=Yq,i.extend=$w,i.bindFn=Ty,i.assign=ci,i.inherit=Xq,i.bindFn=Ty,i.prefixed=Ou,i.toArray=ua,i.inArray=pi,i.uniqueArray=zf,i.splitStr=sa,i.boolOrFn=Tu,i.hasParent=Lf,i.addEventListeners=Wn,i.removeEventListeners=Vn,i.defaults=ci({},mw,{preset:_y}),i}(),Zq=Qq;function ww(i,n){var e=typeof yr<"u"&&Qt(i)||i["@@iterator"];if(!e){if(ue(i)||(e=Jq(i))||n&&i&&typeof i.length=="number"){e&&(i=e);var t=0,r=function(){};return{s:r,n:function(){return t>=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
73
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Jq(i,n){var e;if(i){if(typeof i=="string")return ky(i,n);var t=Be(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Lr(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ky(i,n)}}function ky(i,n){(n==null||n>i.length)&&(n=i.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=i[e];return t}yr("DELETE");function ku(){for(var i=arguments.length,n=new Array(i),e=0;e<i;e++)n[e]=arguments[e];return eY(n.length?n:[ps()])}function eY(i){var n=tY(i),e=_e(n,3),t=e[0],r=e[1],a=e[2],o=1,s=function(){var l=2091639*t+o*23283064365386963e-26;return t=r,r=a,a=l-(o=l|0)};return s.uint32=function(){return s()*4294967296},s.fract53=function(){return s()+(s()*2097152|0)*11102230246251565e-32},s.algorithm="Alea",s.seed=i,s.version="0.9",s}function tY(){for(var i=rY(),n=i(" "),e=i(" "),t=i(" "),r=0;r<arguments.length;r++)n-=i(r<0||arguments.length<=r?void 0:arguments[r]),n<0&&(n+=1),e-=i(r<0||arguments.length<=r?void 0:arguments[r]),e<0&&(e+=1),t-=i(r<0||arguments.length<=r?void 0:arguments[r]),t<0&&(t+=1);return[n,e,t]}function rY(){var i=4022871197;return function(n){for(var e=n.toString(),t=0;t<e.length;t++){i+=e.charCodeAt(t);var r=.02519603282416938*i;i=r>>>0,r-=i,r*=i,i=r>>>0,r-=i,i+=r*4294967296}return(i>>>0)*23283064365386963e-26}}function iY(){var i=function(){};return{on:i,off:i,destroy:i,emit:i,get:function(){return{set:i}}}}var Vf=typeof window<"u"?window.Hammer||Zq:function(){return iY()};function Ut(i){var n=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:i,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){n._dom.overlay.parentNode.removeChild(n._dom.overlay)});var t=Vf(this._dom.overlay);t.on("tap",x(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){t.destroy()});var r=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];ve(r).call(r,function(a){t.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){nY(a.target,i)||n.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",n._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&n.deactivate()}}D1(Ut.prototype);Ut.current=null;Ut.prototype.destroy=function(){var i,n;this.deactivate();var e=ww(ii(i=or(n=this._cleanupQueue).call(n,0)).call(i)),t;try{for(e.s();!(t=e.n()).done;){var r=t.value;r()}}catch(a){e.e(a)}finally{e.f()}};Ut.prototype.activate=function(){Ut.current&&Ut.current.deactivate(),Ut.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};Ut.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};Ut.prototype._onTapOverlay=function(i){this.activate(),i.srcEvent.stopPropagation()};function nY(i,n){for(;i;){if(i===n)return!0;i=i.parentNode}return!1}var aY=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,oY=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,sY=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,uY=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function _r(i){if(i)for(;i.hasChildNodes()===!0;){var n=i.firstChild;n&&(_r(n),i.removeChild(n))}}function Tr(i){return i instanceof String||typeof i=="string"}function Iy(i){return ce(i)==="object"&&i!==null}function gi(i,n,e,t){var r=!1;t===!0&&(r=n[e]===null&&i[e]!==void 0),r?delete i[e]:i[e]=n[e]}function _w(i,n){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(var t in i)if(n[t]!==void 0)if(n[t]===null||ce(n[t])!=="object")gi(i,n,t,e);else{var r=i[t],a=n[t];Iy(r)&&Iy(a)&&_w(r,a,e)}}function Tn(i,n,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(ue(e))throw new TypeError("Arrays are not supported by deepExtend");for(var r=0;r<i.length;r++){var a=i[r];if(Object.prototype.hasOwnProperty.call(e,a))if(e[a]&&e[a].constructor===Object)n[a]===void 0&&(n[a]={}),n[a].constructor===Object?ye(n[a],e[a],!1,t):gi(n,e,a,t);else{if(ue(e[a]))throw new TypeError("Arrays are not supported by deepExtend");gi(n,e,a,t)}}return n}function ws(i,n,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(ue(e))throw new TypeError("Arrays are not supported by deepExtend");for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&!Kt(i).call(i,r))if(e[r]&&e[r].constructor===Object)n[r]===void 0&&(n[r]={}),n[r].constructor===Object?ye(n[r],e[r]):gi(n,e,r,t);else if(ue(e[r])){n[r]=[];for(var a=0;a<e[r].length;a++)n[r].push(e[r][a])}else gi(n,e,r,t);return n}function ye(i,n){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)||e===!0)if(ce(n[r])==="object"&&n[r]!==null&&ty(n[r])===Object.prototype)i[r]===void 0?i[r]=ye({},n[r],e):ce(i[r])==="object"&&i[r]!==null&&ty(i[r])===Object.prototype?ye(i[r],n[r],e):gi(i,n,r,t);else if(ue(n[r])){var a;i[r]=Be(a=n[r]).call(a)}else gi(i,n,r,t);return i}function _s(i,n){var e;return Rf(e=[]).call(e,Ht(i),[n])}function lY(i){return Be(i).call(i)}function hY(i){return i.getBoundingClientRect().left}function dY(i){return i.getBoundingClientRect().top}function ee(i,n){if(ue(i))for(var e=i.length,t=0;t<e;t++)n(i[t],t,i);else for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&n(i[r],r,i)}function fY(i,n,e,t){if(i.addEventListener){var r;t===void 0&&(t=!1),n==="mousewheel"&&Kt(r=navigator.userAgent).call(r,"Firefox")&&(n="DOMMouseScroll"),i.addEventListener(n,e,t)}else i.attachEvent("on"+n,e)}function cY(i,n,e,t){if(i.removeEventListener){var r;t===void 0&&(t=!1),n==="mousewheel"&&Kt(r=navigator.userAgent).call(r,"Firefox")&&(n="DOMMouseScroll"),i.removeEventListener(n,e,t)}else i.detachEvent("on"+n,e)}function Uf(i){var n;switch(i.length){case 3:case 4:return n=oY.exec(i),n?{r:At(n[1]+n[1],16),g:At(n[2]+n[2],16),b:At(n[3]+n[3],16)}:null;case 6:case 7:return n=aY.exec(i),n?{r:At(n[1],16),g:At(n[2],16),b:At(n[3],16)}:null;default:return null}}function Et(i,n){if(Kt(i).call(i,"rgba"))return i;if(Kt(i).call(i,"rgb")){var e=i.substr(ae(i).call(i,"(")+1).replace(")","").split(",");return"rgba("+e[0]+","+e[1]+","+e[2]+","+n+")"}else{var t=Uf(i);return t==null?i:"rgba("+t.r+","+t.g+","+t.b+","+n+")"}}function Ew(i,n,e){var t;return"#"+Be(t=((1<<24)+(i<<16)+(n<<8)+e).toString(16)).call(t,1)}function Sd(i,n){if(Tr(i)){var e=i;if(Ow(e)){var t,r=en(t=e.substr(4).substr(0,e.length-5).split(",")).call(t,function(f){return At(f)});e=Ew(r[0],r[1],r[2])}if(Sw(e)===!0){var a=vY(e),o={h:a.h,s:a.s*.8,v:Math.min(1,a.v*1.02)},s={h:a.h,s:Math.min(1,a.s*1.25),v:a.v*.8},u=Od(s.h,s.s,s.v),l=Od(o.h,o.s,o.v);return{background:e,border:u,highlight:{background:l,border:u},hover:{background:l,border:u}}}else return{background:e,border:e,highlight:{background:e,border:e},hover:{background:e,border:e}}}else if(n){var h={background:i.background||n.background,border:i.border||n.border,highlight:Tr(i.highlight)?{border:i.highlight,background:i.highlight}:{background:i.highlight&&i.highlight.background||n.highlight.background,border:i.highlight&&i.highlight.border||n.highlight.border},hover:Tr(i.hover)?{border:i.hover,background:i.hover}:{border:i.hover&&i.hover.border||n.hover.border,background:i.hover&&i.hover.background||n.hover.background}};return h}else{var d={background:i.background||void 0,border:i.border||void 0,highlight:Tr(i.highlight)?{border:i.highlight,background:i.highlight}:{background:i.highlight&&i.highlight.background||void 0,border:i.highlight&&i.highlight.border||void 0},hover:Tr(i.hover)?{border:i.hover,background:i.hover}:{border:i.hover&&i.hover.border||void 0,background:i.hover&&i.hover.background||void 0}};return d}}function Nn(i,n,e){i=i/255,n=n/255,e=e/255;var t=Math.min(i,Math.min(n,e)),r=Math.max(i,Math.max(n,e));if(t===r)return{h:0,s:0,v:t};var a=i===t?n-e:e===t?i-n:e-i,o=i===t?3:e===t?1:5,s=60*(o-a/(r-t))/360,u=(r-t)/r,l=r;return{h:s,s:u,v:l}}function Yo(i,n,e){var t,r,a,o=Math.floor(i*6),s=i*6-o,u=e*(1-n),l=e*(1-s*n),h=e*(1-(1-s)*n);switch(o%6){case 0:t=e,r=h,a=u;break;case 1:t=l,r=e,a=u;break;case 2:t=u,r=e,a=h;break;case 3:t=u,r=l,a=e;break;case 4:t=h,r=u,a=e;break;case 5:t=e,r=u,a=l;break}return{r:Math.floor(t*255),g:Math.floor(r*255),b:Math.floor(a*255)}}function Od(i,n,e){var t=Yo(i,n,e);return Ew(t.r,t.g,t.b)}function vY(i){var n=Uf(i);if(!n)throw new TypeError("'".concat(i,"' is not a valid color."));return Nn(n.r,n.g,n.b)}function Sw(i){var n=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(i);return n}function Ow(i){return sY.test(i)}function pY(i){return uY.test(i)}function Dr(i){if(i===null||ce(i)!=="object")return null;if(i instanceof Element)return i;var n=ni(i);for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&ce(i[e])=="object"&&(n[e]=Dr(i[e]));return n}function _t(i,n,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},r=function(v){return v!=null},a=function(v){return v!==null&&ce(v)==="object"},o=function(v){for(var g in v)if(Object.prototype.hasOwnProperty.call(v,g))return!1;return!0};if(!a(i))throw new Error("Parameter mergeTarget must be an object");if(!a(n))throw new Error("Parameter options must be an object");if(!r(e))throw new Error("Parameter option must have a value");if(!a(t))throw new Error("Parameter globalOptions must be an object");var s=function(v,g,b){a(v[b])||(v[b]={});var p=g[b],$=v[b];for(var y in p)Object.prototype.hasOwnProperty.call(p,y)&&($[y]=p[y])},u=n[e],l=a(t)&&!o(t),h=l?t[e]:void 0,d=h?h.enabled:void 0;if(u!==void 0){if(typeof u=="boolean"){a(i[e])||(i[e]={}),i[e].enabled=u;return}if(u===null&&!a(i[e]))if(r(h))i[e]=ni(h);else return;if(a(u)){var f=!0;u.enabled!==void 0?f=u.enabled:d!==void 0&&(f=h.enabled),s(i,n,e),i[e].enabled=f}}}var gY={linear:function(n){return n},easeInQuad:function(n){return n*n},easeOutQuad:function(n){return n*(2-n)},easeInOutQuad:function(n){return n<.5?2*n*n:-1+(4-2*n)*n},easeInCubic:function(n){return n*n*n},easeOutCubic:function(n){return--n*n*n+1},easeInOutCubic:function(n){return n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1},easeInQuart:function(n){return n*n*n*n},easeOutQuart:function(n){return 1- --n*n*n*n},easeInOutQuart:function(n){return n<.5?8*n*n*n*n:1-8*--n*n*n*n},easeInQuint:function(n){return n*n*n*n*n},easeOutQuint:function(n){return 1+--n*n*n*n*n},easeInOutQuint:function(n){return n<.5?16*n*n*n*n*n:1+16*--n*n*n*n*n}};function Er(i,n){var e;ue(n)||(n=[n]);var t=ww(i),r;try{for(t.s();!(r=t.n()).done;){var a=r.value;if(a){e=a[n[0]];for(var o=1;o<n.length;o++)e&&(e=e[n[o]]);if(typeof e<"u")break}}}catch(s){t.e(s)}finally{t.f()}return e}var yY={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"},mY=function(){function i(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;D(this,i),this.pixelRatio=n,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return R(i,[{key:"insertTo",value:function(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(e){if(typeof e=="function")this.updateCallback=e;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}},{key:"setCloseCallback",value:function(e){if(typeof e=="function")this.closeCallback=e;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}},{key:"_isColorString",value:function(e){if(typeof e=="string")return yY[e]}},{key:"setColor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e!=="none"){var r,a=this._isColorString(e);if(a!==void 0&&(e=a),Tr(e)===!0){if(Ow(e)===!0){var o=e.substr(4).substr(0,e.length-5).split(",");r={r:o[0],g:o[1],b:o[2],a:1}}else if(pY(e)===!0){var s=e.substr(5).substr(0,e.length-6).split(",");r={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(Sw(e)===!0){var u=Uf(e);r={r:u.r,g:u.g,b:u.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){var l=e.a!==void 0?e.a:"1.0";r={r:e.r,g:e.g,b:e.b,a:l}}if(r===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+eo(e));this._setColor(r,t)}}},{key:"show",value:function(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;t===!0&&(this.previousColor=Ce({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",qt(function(){e.closeCallback!==void 0&&(e.closeCallback(),e.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;t===!0&&(this.initialColor=Ce({},e)),this.color=e;var r=Nn(e.r,e.g,e.b),a=2*Math.PI,o=this.r*r.s,s=this.centerCoordinates.x+o*Math.sin(a*r.h),u=this.centerCoordinates.y+o*Math.cos(a*r.h);this.colorPickerSelector.style.left=s-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}},{key:"_setOpacity",value:function(e){this.color.a=e/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(e){var t=Nn(this.color.r,this.color.g,this.color.b);t.v=e/100;var r=Yo(t.h,t.s,t.v);r.a=this.color.a,this.color=r,this._updatePicker()}},{key:"_updatePicker",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=Nn(e.r,e.g,e.b),r=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1)),r.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var a=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;r.clearRect(0,0,a,o),r.putImageData(this.hueCircle,0,0),r.fillStyle="rgba(0,0,0,"+(1-t.v)+")",r.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),to(r).call(r),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var e,t,r,a;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){var s=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(s.webkitBackingStorePixelRatio||s.mozBackingStorePixelRatio||s.msBackingStorePixelRatio||s.oBackingStorePixelRatio||s.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{var o=document.createElement("DIV");o.style.color="red",o.style.fontWeight="bold",o.style.padding="10px",o.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(o)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var u=this;this.opacityRange.onchange=function(){u._setOpacity(this.value)},this.opacityRange.oninput=function(){u._setOpacity(this.value)},this.brightnessRange.onchange=function(){u._setBrightness(this.value)},this.brightnessRange.oninput=function(){u._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=x(e=this._hide).call(e,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=x(t=this._apply).call(t,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=x(r=this._save).call(r,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=x(a=this._loadLast).call(a,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var e=this;this.drag={},this.pinch={},this.hammer=new Vf(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",function(t){t.isFirst&&e._moveSelector(t)}),this.hammer.on("tap",function(t){e._moveSelector(t)}),this.hammer.on("panstart",function(t){e._moveSelector(t)}),this.hammer.on("panmove",function(t){e._moveSelector(t)}),this.hammer.on("panend",function(t){e._moveSelector(t)})}},{key:"_generateHueCircle",value:function(){if(this.generated===!1){var e=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var t=this.colorPickerCanvas.clientWidth,r=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,r);var a,o,s,u;this.centerCoordinates={x:t*.5,y:r*.5},this.r=.49*t;var l=2*Math.PI/360,h=1/360,d=1/this.r,f;for(s=0;s<360;s++)for(u=0;u<this.r;u++)a=this.centerCoordinates.x+u*Math.sin(l*s),o=this.centerCoordinates.y+u*Math.cos(l*s),f=Yo(s*h,u*d,1),e.fillStyle="rgb("+f.r+","+f.g+","+f.b+")",e.fillRect(a-.5,o-.5,2,2);e.strokeStyle="rgba(0,0,0,1)",e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,t,r)}this.generated=!0}},{key:"_moveSelector",value:function(e){var t=this.colorPickerDiv.getBoundingClientRect(),r=e.center.x-t.left,a=e.center.y-t.top,o=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,u=r-s,l=a-o,h=Math.atan2(u,l),d=.98*Math.min(Math.sqrt(u*u+l*l),s),f=Math.cos(h)*d+o,c=Math.sin(h)*d+s;this.colorPickerSelector.style.top=f-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=c-.5*this.colorPickerSelector.clientWidth+"px";var v=h/(2*Math.PI);v=v<0?v+1:v;var g=d/this.r,b=Nn(this.color.r,this.color.g,this.color.b);b.h=v,b.s=g;var p=Yo(b.h,b.s,b.v);p.a=this.color.a,this.color=p,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]),i}();function Td(){for(var i=arguments.length,n=new Array(i),e=0;e<i;e++)n[e]=arguments[e];if(n.length<1)throw new TypeError("Invalid arguments.");if(n.length===1)return document.createTextNode(n[0]);var t=document.createElement(n[0]);return t.appendChild(Td.apply(void 0,Ht(Be(n).call(n,1)))),t}var bY=function(){function i(n,e,t){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){return!1};D(this,i),this.parent=n,this.changedOptions=[],this.container=e,this.allowCreation=!1,this.hideOption=a,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Ce(this.options,this.defaultOptions),this.configureOptions=t,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new mY(r),this.wrapper=void 0}return R(i,[{key:"setOptions",value:function(e){if(e!==void 0){this.popupHistory={},this._removePopup();var t=!0;if(typeof e=="string")this.options.filter=e;else if(ue(e))this.options.filter=e.join();else if(ce(e)==="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),ht(e)!==void 0&&(this.options.filter=ht(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e=="boolean"?(this.options.filter=!0,t=e):typeof e=="function"&&(this.options.filter=e,t=!0);ht(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}},{key:"setModuleOptions",value:function(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var e=ht(this.options),t=0,r=!1;for(var a in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,a)&&(this.allowCreation=!1,r=!1,typeof e=="function"?(r=e(a,[]),r=r||this._handleObject(this.configureOptions[a],[a],!0)):(e===!0||ae(e).call(e,a)!==-1)&&(r=!0),r!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(a),this._handleObject(this.configureOptions[a],[a])),t++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}},{key:"_clean",value:function(){for(var e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);this.wrapper!==void 0&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}},{key:"_getValue",value:function(e){for(var t=this.moduleOptions,r=0;r<e.length;r++)if(t[e[r]]!==void 0)t=t[e[r]];else{t=void 0;break}return t}},{key:"_makeItem",value:function(e){if(this.allowCreation===!0){var t=document.createElement("div");t.className="vis-configuration vis-config-item vis-config-s"+e.length;for(var r=arguments.length,a=new Array(r>1?r-1:0),o=1;o<r;o++)a[o-1]=arguments[o];return ve(a).call(a,function(s){t.appendChild(s)}),this.domElements.push(t),this.domElements.length}return 0}},{key:"_makeHeader",value:function(e){var t=document.createElement("div");t.className="vis-configuration vis-config-header",t.innerText=e,this._makeItem([],t)}},{key:"_makeLabel",value:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=document.createElement("div");if(a.className="vis-configuration vis-config-label vis-config-s"+t.length,r===!0){for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(Td("i","b",e))}else a.innerText=e+":";return a}},{key:"_makeDropdown",value:function(e,t,r){var a=document.createElement("select");a.className="vis-configuration vis-config-select";var o=0;t!==void 0&&ae(e).call(e,t)!==-1&&(o=ae(e).call(e,t));for(var s=0;s<e.length;s++){var u=document.createElement("option");u.value=e[s],s===o&&(u.selected="selected"),u.innerText=e[s],a.appendChild(u)}var l=this;a.onchange=function(){l._update(this.value,r)};var h=this._makeLabel(r[r.length-1],r);this._makeItem(r,h,a)}},{key:"_makeRange",value:function(e,t,r){var a=e[0],o=e[1],s=e[2],u=e[3],l=document.createElement("input");l.className="vis-configuration vis-config-range";try{l.type="range",l.min=o,l.max=s}catch{}l.step=u;var h="",d=0;if(t!==void 0){var f=1.2;t<0&&t*f<o?(l.min=Math.ceil(t*f),d=l.min,h="range increased"):t/f<o&&(l.min=Math.ceil(t/f),d=l.min,h="range increased"),t*f>s&&s!==1&&(l.max=Math.ceil(t*f),d=l.max,h="range increased"),l.value=t}else l.value=a;var c=document.createElement("input");c.className="vis-configuration vis-config-rangeinput",c.value=l.value;var v=this;l.onchange=function(){c.value=this.value,v._update(Number(this.value),r)},l.oninput=function(){c.value=this.value};var g=this._makeLabel(r[r.length-1],r),b=this._makeItem(r,g,l,c);h!==""&&this.popupHistory[b]!==d&&(this.popupHistory[b]=d,this._setupPopup(h,b))}},{key:"_makeButton",value:function(){var e=this;if(this.options.showButton===!0){var t=document.createElement("div");t.className="vis-configuration vis-config-button",t.innerText="generate options",t.onclick=function(){e._printOptions()},t.onmouseover=function(){t.className="vis-configuration vis-config-button hover"},t.onmouseout=function(){t.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(t)}}},{key:"_setupPopup",value:function(e,t){var r=this;if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){var a=document.createElement("div");a.id="vis-configuration-popup",a.className="vis-configuration-popup",a.innerText=e,a.onclick=function(){r._removePopup()},this.popupCounter+=1,this.popupDiv={html:a,index:t}}}},{key:"_removePopup",value:function(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}},{key:"_showPopupIfNeeded",value:function(){var e=this;if(this.popupDiv.html!==void 0){var t=this.domElements[this.popupDiv.index],r=t.getBoundingClientRect();this.popupDiv.html.style.left=r.left+"px",this.popupDiv.html.style.top=r.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=qt(function(){e.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=qt(function(){e._removePopup()},1800)}}},{key:"_makeCheckbox",value:function(e,t,r){var a=document.createElement("input");a.type="checkbox",a.className="vis-configuration vis-config-checkbox",a.checked=e,t!==void 0&&(a.checked=t,t!==e&&(ce(e)==="object"?t!==e.enabled&&this.changedOptions.push({path:r,value:t}):this.changedOptions.push({path:r,value:t})));var o=this;a.onchange=function(){o._update(this.checked,r)};var s=this._makeLabel(r[r.length-1],r);this._makeItem(r,s,a)}},{key:"_makeTextInput",value:function(e,t,r){var a=document.createElement("input");a.type="text",a.className="vis-configuration vis-config-text",a.value=t,t!==e&&this.changedOptions.push({path:r,value:t});var o=this;a.onchange=function(){o._update(this.value,r)};var s=this._makeLabel(r[r.length-1],r);this._makeItem(r,s,a)}},{key:"_makeColorField",value:function(e,t,r){var a=this,o=e[1],s=document.createElement("div");t=t===void 0?o:t,t!=="none"?(s.className="vis-configuration vis-config-colorBlock",s.style.backgroundColor=t):s.className="vis-configuration vis-config-colorBlock none",t=t===void 0?o:t,s.onclick=function(){a._showColorPicker(t,s,r)};var u=this._makeLabel(r[r.length-1],r);this._makeItem(r,u,s)}},{key:"_showColorPicker",value:function(e,t,r){var a=this;t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(function(o){var s="rgba("+o.r+","+o.g+","+o.b+","+o.a+")";t.style.backgroundColor=s,a._update(s,r)}),this.colorPicker.setCloseCallback(function(){t.onclick=function(){a._showColorPicker(e,t,r)}})}},{key:"_handleObject",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=!1,o=ht(this.options),s=!1;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){a=!0;var l=e[u],h=_s(t,u);if(typeof o=="function"&&(a=o(u,t),a===!1&&!ue(l)&&typeof l!="string"&&typeof l!="boolean"&&l instanceof Object&&(this.allowCreation=!1,a=this._handleObject(l,h,!0),this.allowCreation=r===!1)),a!==!1){s=!0;var d=this._getValue(h);if(ue(l))this._handleArray(l,d,h);else if(typeof l=="string")this._makeTextInput(l,d,h);else if(typeof l=="boolean")this._makeCheckbox(l,d,h);else if(l instanceof Object){if(!this.hideOption(t,u,this.moduleOptions))if(l.enabled!==void 0){var f=_s(h,"enabled"),c=this._getValue(f);if(c===!0){var v=this._makeLabel(u,h,!0);this._makeItem(h,v),s=this._handleObject(l,h)||s}else this._makeCheckbox(l,c,h)}else{var g=this._makeLabel(u,h,!0);this._makeItem(h,g),s=this._handleObject(l,h)||s}}else console.error("dont know how to handle",l,u,h)}}return s}},{key:"_handleArray",value:function(e,t,r){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,t,r),e[1]!==t&&this.changedOptions.push({path:r,value:t})):typeof e[0]=="string"?(this._makeDropdown(e,t,r),e[0]!==t&&this.changedOptions.push({path:r,value:t})):typeof e[0]=="number"&&(this._makeRange(e,t,r),e[0]!==t&&this.changedOptions.push({path:r,value:Number(t)}))}},{key:"_update",value:function(e,t){var r=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",r),this.initialized=!0,this.parent.setOptions(r)}},{key:"_constructOptions",value:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=r;e=e==="true"?!0:e,e=e==="false"?!1:e;for(var o=0;o<t.length;o++)t[o]!=="global"&&(a[t[o]]===void 0&&(a[t[o]]={}),o!==t.length-1?a=a[t[o]]:a[t[o]]=e);return r}},{key:"_printOptions",value:function(){for(var e=this.getOptions();this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(Td("pre","const options = "+eo(e,null,2)))}},{key:"getOptions",value:function(){for(var e={},t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}}]),i}(),$Y=function(){function i(n,e){D(this,i),this.container=n,this.overflowMethod=e||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}return R(i,[{key:"setPosition",value:function(e,t){this.x=At(e),this.y=At(t)}},{key:"setText",value:function(e){if(e instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(e)}else this.frame.innerText=e}},{key:"show",value:function(e){if(e===void 0&&(e=!0),e===!0){var t=this.frame.clientHeight,r=this.frame.clientWidth,a=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth,s=0,u=0;if(this.overflowMethod=="flip"){var l=!1,h=!0;this.y-t<this.padding&&(h=!1),this.x+r>o-this.padding&&(l=!0),l?s=this.x-r:s=this.x,h?u=this.y-t:u=this.y}else u=this.y-t,u+t+this.padding>a&&(u=a-t-this.padding),u<this.padding&&(u=this.padding),s=this.x,s+r+this.padding>o&&(s=o-r-this.padding),s<this.padding&&(s=this.padding);this.frame.style.left=s+"px",this.frame.style.top=u+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}},{key:"hide",value:function(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}},{key:"destroy",value:function(){this.frame.parentNode.removeChild(this.frame)}}]),i}(),xn=!1,Py,kd="background: #FFeeee; color: #dd0000",wY=function(){function i(){D(this,i)}return R(i,null,[{key:"validate",value:function(e,t,r){xn=!1,Py=t;var a=t;return r!==void 0&&(a=t[r]),i.parse(e,a,[]),xn}},{key:"parse",value:function(e,t,r){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&i.check(a,e,t,r)}},{key:"check",value:function(e,t,r,a){if(r[e]===void 0&&r.__any__===void 0){i.getSuggestion(e,r,a);return}var o=e,s=!0;r[e]===void 0&&r.__any__!==void 0&&(o="__any__",s=i.getType(t[e])==="object");var u=r[o];s&&u.__type__!==void 0&&(u=u.__type__),i.checkFields(e,t,r,o,u,a)}},{key:"checkFields",value:function(e,t,r,a,o,s){var u=function(f){console.error("%c"+f+i.printLocation(s,e),kd)},l=i.getType(t[e]),h=o[l];h!==void 0?i.getType(h)==="array"&&ae(h).call(h,t[e])===-1?(u('Invalid option detected in "'+e+'". Allowed values are:'+i.print(h)+' not "'+t[e]+'". '),xn=!0):l==="object"&&a!=="__any__"&&(s=_s(s,e),i.parse(t[e],r[a],s)):o.any===void 0&&(u('Invalid type received for "'+e+'". Expected: '+i.print(we(o))+". Received ["+l+'] "'+t[e]+'"'),xn=!0)}},{key:"getType",value:function(e){var t=ce(e);return t==="object"?e===null?"null":e instanceof Boolean?"boolean":e instanceof Number?"number":e instanceof String?"string":ue(e)?"array":e instanceof Date?"date":e.nodeType!==void 0?"dom":e._isAMomentObject===!0?"moment":"object":t==="number"?"number":t==="boolean"?"boolean":t==="string"?"string":t===void 0?"undefined":t}},{key:"getSuggestion",value:function(e,t,r){var a=i.findInOptions(e,t,r,!1),o=i.findInOptions(e,Py,[],!0),s=8,u=4,l;a.indexMatch!==void 0?l=" in "+i.printLocation(a.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+a.indexMatch+`"?
|
|
74
|
-
|
|
75
|
-
`:o.distance<=u&&a.distance>o.distance?l=" in "+i.printLocation(a.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+i.printLocation(o.path,o.closestMatch,""):a.distance<=s?l='. Did you mean "'+a.closestMatch+'"?'+i.printLocation(a.path,e):l=". Did you mean one of these: "+i.print(we(t))+i.printLocation(r,e),console.error('%cUnknown option detected: "'+e+'"'+l,kd),xn=!0}},{key:"findInOptions",value:function(e,t,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=1e9,s="",u=[],l=e.toLowerCase(),h=void 0;for(var d in t){var f=void 0;if(t[d].__type__!==void 0&&a===!0){var c=i.findInOptions(e,t[d],_s(r,d));o>c.distance&&(s=c.closestMatch,u=c.path,o=c.distance,h=c.indexMatch)}else{var v;ae(v=d.toLowerCase()).call(v,l)!==-1&&(h=d),f=i.levenshteinDistance(e,d),o>f&&(s=d,u=lY(r),o=f)}}return{closestMatch:s,path:u,distance:o,indexMatch:h}}},{key:"printLocation",value:function(e,t){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:
|
|
76
|
-
`,a=`
|
|
77
|
-
|
|
78
|
-
`+r+`options = {
|
|
79
|
-
`,o=0;o<e.length;o++){for(var s=0;s<o+1;s++)a+=" ";a+=e[o]+`: {
|
|
80
|
-
`}for(var u=0;u<e.length+1;u++)a+=" ";a+=t+`
|
|
81
|
-
`;for(var l=0;l<e.length+1;l++){for(var h=0;h<e.length-l;h++)a+=" ";a+=`}
|
|
82
|
-
`}return a+`
|
|
83
|
-
|
|
84
|
-
`}},{key:"print",value:function(e){return eo(e).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}},{key:"levenshteinDistance",value:function(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;var r=[],a;for(a=0;a<=t.length;a++)r[a]=[a];var o;for(o=0;o<=e.length;o++)r[0][o]=o;for(a=1;a<=t.length;a++)for(o=1;o<=e.length;o++)t.charAt(a-1)==e.charAt(o-1)?r[a][o]=r[a-1][o-1]:r[a][o]=Math.min(r[a-1][o-1]+1,Math.min(r[a][o-1]+1,r[a-1][o]+1));return r[t.length][e.length]}}]),i}(),_Y=Ut,EY=bY,Ki=Vf,SY=$Y,Tw=kd,OY=wY;function TY(i){return Cr=i,CY()}var kw={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},Gf=ni(kw);Gf.color="color.color";Gf.style="dashes";var Qe={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},Cy={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},Cr="",an=0,Z="",U="",at=Qe.NULL;function kY(){an=0,Z=Cr.charAt(0)}function Ne(){an++,Z=Cr.charAt(an)}function Bi(){return Cr.charAt(an+1)}function Ay(i){var n=i.charCodeAt(0);return n<47?n===35||n===46:n<59?n>47:n<91?n>64:n<96?n===95:n<123?n>96:!1}function Nr(i,n){if(i||(i={}),n)for(var e in n)n.hasOwnProperty(e)&&(i[e]=n[e]);return i}function IY(i,n,e){for(var t=n.split("."),r=i;t.length;){var a=t.shift();t.length?(r[a]||(r[a]={}),r=r[a]):r[a]=e}}function Iw(i,n){for(var e,t,r=null,a=[i],o=i;o.parent;)a.push(o.parent),o=o.parent;if(o.nodes){for(e=0,t=o.nodes.length;e<t;e++)if(n.id===o.nodes[e].id){r=o.nodes[e];break}}for(r||(r={id:n.id},i.node&&(r.attr=Nr(r.attr,i.node))),e=a.length-1;e>=0;e--){var s,u=a[e];u.nodes||(u.nodes=[]),ae(s=u.nodes).call(s,r)===-1&&u.nodes.push(r)}n.attr&&(r.attr=Nr(r.attr,n.attr))}function PY(i,n){if(i.edges||(i.edges=[]),i.edges.push(n),i.edge){var e=Nr({},i.edge);n.attr=Nr(e,n.attr)}}function Pw(i,n,e,t,r){var a={from:n,to:e,type:t};return i.edge&&(a.attr=Nr({},i.edge)),a.attr=Nr(a.attr||{},r),r!=null&&r.hasOwnProperty("arrows")&&r.arrows!=null&&(a.arrows={to:{enabled:!0,type:r.arrows.type}},r.arrows=null),a}function me(){for(at=Qe.NULL,U="";Z===" "||Z===" "||Z===`
|
|
85
|
-
`||Z==="\r";)Ne();do{var i=!1;if(Z==="#"){for(var n=an-1;Cr.charAt(n)===" "||Cr.charAt(n)===" ";)n--;if(Cr.charAt(n)===`
|
|
86
|
-
`||Cr.charAt(n)===""){for(;Z!=""&&Z!=`
|
|
87
|
-
`;)Ne();i=!0}}if(Z==="/"&&Bi()==="/"){for(;Z!=""&&Z!=`
|
|
88
|
-
`;)Ne();i=!0}if(Z==="/"&&Bi()==="*"){for(;Z!="";)if(Z==="*"&&Bi()==="/"){Ne(),Ne();break}else Ne();i=!0}for(;Z===" "||Z===" "||Z===`
|
|
89
|
-
`||Z==="\r";)Ne()}while(i);if(Z===""){at=Qe.DELIMITER;return}var e=Z+Bi();if(Cy[e]){at=Qe.DELIMITER,U=e,Ne(),Ne();return}if(Cy[Z]){at=Qe.DELIMITER,U=Z,Ne();return}if(Ay(Z)||Z==="-"){for(U+=Z,Ne();Ay(Z);)U+=Z,Ne();U==="false"?U=!1:U==="true"?U=!0:isNaN(Number(U))||(U=Number(U)),at=Qe.IDENTIFIER;return}if(Z==='"'){for(Ne();Z!=""&&(Z!='"'||Z==='"'&&Bi()==='"');)Z==='"'?(U+=Z,Ne()):Z==="\\"&&Bi()==="n"?(U+=`
|
|
90
|
-
`,Ne()):U+=Z,Ne();if(Z!='"')throw Ze('End of string " expected');Ne(),at=Qe.IDENTIFIER;return}for(at=Qe.UNKNOWN;Z!="";)U+=Z,Ne();throw new SyntaxError('Syntax error in part "'+Mw(U,30)+'"')}function CY(){var i={};if(kY(),me(),U==="strict"&&(i.strict=!0,me()),(U==="graph"||U==="digraph")&&(i.type=U,me()),at===Qe.IDENTIFIER&&(i.id=U,me()),U!="{")throw Ze("Angle bracket { expected");if(me(),Cw(i),U!="}")throw Ze("Angle bracket } expected");if(me(),U!=="")throw Ze("End of file expected");return me(),delete i.node,delete i.edge,delete i.graph,i}function Cw(i){for(;U!==""&&U!="}";)AY(i),U===";"&&me()}function AY(i){var n=Aw(i);if(n){xw(i,n);return}var e=xY(i);if(!e){if(at!=Qe.IDENTIFIER)throw Ze("Identifier expected");var t=U;if(me(),U==="="){if(me(),at!=Qe.IDENTIFIER)throw Ze("Identifier expected");i[t]=U,me()}else MY(i,t)}}function Aw(i){var n=null;if(U==="subgraph"&&(n={},n.type="subgraph",me(),at===Qe.IDENTIFIER&&(n.id=U,me())),U==="{"){if(me(),n||(n={}),n.parent=i,n.node=i.node,n.edge=i.edge,n.graph=i.graph,Cw(n),U!="}")throw Ze("Angle bracket } expected");me(),delete n.node,delete n.edge,delete n.graph,delete n.parent,i.subgraphs||(i.subgraphs=[]),i.subgraphs.push(n)}return n}function xY(i){return U==="node"?(me(),i.node=Un(),"node"):U==="edge"?(me(),i.edge=Un(),"edge"):U==="graph"?(me(),i.graph=Un(),"graph"):null}function MY(i,n){var e={id:n},t=Un();t&&(e.attr=t),Iw(i,e),xw(i,n)}function xw(i,n){for(;U==="->"||U==="--";){var e,t=U;me();var r=Aw(i);if(r)e=r;else{if(at!=Qe.IDENTIFIER)throw Ze("Identifier or subgraph expected");e=U,Iw(i,{id:e}),me()}var a=Un(),o=Pw(i,n,e,t,a);PY(i,o),n=e}}function Un(){for(var i,n=null,e={dashed:!0,solid:!1,dotted:[1,5]},t={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},r=new Array,a=new Array;U==="[";){for(me(),n={};U!==""&&U!="]";){if(at!=Qe.IDENTIFIER)throw Ze("Attribute name expected");var o=U;if(me(),U!="=")throw Ze("Equal sign = expected");if(me(),at!=Qe.IDENTIFIER)throw Ze("Attribute value expected");var s=U;o==="style"&&(s=e[s]);var u;o==="arrowhead"&&(u=t[s],o="arrows",s={to:{enabled:!0,type:u}}),o==="arrowtail"&&(u=t[s],o="arrows",s={from:{enabled:!0,type:u}}),r.push({attr:n,name:o,value:s}),a.push(o),me(),U==","&&me()}if(U!="]")throw Ze("Bracket ] expected");me()}if(Kt(a).call(a,"dir")){var l={};for(l.arrows={},i=0;i<r.length;i++)if(r[i].name==="arrows")if(r[i].value.to!=null)l.arrows.to=i;else if(r[i].value.from!=null)l.arrows.from=i;else throw Ze("Invalid value of arrows");else r[i].name==="dir"&&(l.dir=i);var h=r[l.dir].value;if(!Kt(a).call(a,"arrows"))if(h==="both")r.push({attr:r[l.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),l.arrows.to=r.length-1,r.push({attr:r[l.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),l.arrows.from=r.length-1;else if(h==="forward")r.push({attr:r[l.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),l.arrows.to=r.length-1;else if(h==="back")r.push({attr:r[l.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),l.arrows.from=r.length-1;else if(h==="none")r.push({attr:r[l.dir].attr,name:"arrows",value:""}),l.arrows.to=r.length-1;else throw Ze('Invalid dir type "'+h+'"');var d,f;if(h==="both")l.arrows.to&&l.arrows.from?(f=r[l.arrows.to].value.to.type,d=r[l.arrows.from].value.from.type,r[l.arrows.to]={attr:r[l.arrows.to].attr,name:r[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}},or(r).call(r,l.arrows.from,1)):l.arrows.to?(f=r[l.arrows.to].value.to.type,d="arrow",r[l.arrows.to]={attr:r[l.arrows.to].attr,name:r[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}):l.arrows.from&&(f="arrow",d=r[l.arrows.from].value.from.type,r[l.arrows.from]={attr:r[l.arrows.from].attr,name:r[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}});else if(h==="back")l.arrows.to&&l.arrows.from?(f="",d=r[l.arrows.from].value.from.type,r[l.arrows.from]={attr:r[l.arrows.from].attr,name:r[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}):l.arrows.to?(f="",d="arrow",l.arrows.from=l.arrows.to,r[l.arrows.from]={attr:r[l.arrows.from].attr,name:r[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}):l.arrows.from&&(f="",d=r[l.arrows.from].value.from.type,r[l.arrows.to]={attr:r[l.arrows.from].attr,name:r[l.arrows.from].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}),r[l.arrows.from]={attr:r[l.arrows.from].attr,name:r[l.arrows.from].name,value:{from:{enabled:!0,type:r[l.arrows.from].value.from.type}}};else if(h==="none"){var c;l.arrows.to?c=l.arrows.to:c=l.arrows.from,r[c]={attr:r[c].attr,name:r[c].name,value:""}}else if(h==="forward")l.arrows.to&&l.arrows.from?(f=r[l.arrows.to].value.to.type,d="",r[l.arrows.to]={attr:r[l.arrows.to].attr,name:r[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}):l.arrows.to?(f=r[l.arrows.to].value.to.type,d="",r[l.arrows.to]={attr:r[l.arrows.to].attr,name:r[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}):l.arrows.from&&(f="arrow",d="",l.arrows.to=l.arrows.from,r[l.arrows.to]={attr:r[l.arrows.to].attr,name:r[l.arrows.to].name,value:{to:{enabled:!0,type:f},from:{enabled:!0,type:d}}}),r[l.arrows.to]={attr:r[l.arrows.to].attr,name:r[l.arrows.to].name,value:{to:{enabled:!0,type:r[l.arrows.to].value.to.type}}};else throw Ze('Invalid dir type "'+h+'"');or(r).call(r,l.dir,1)}var v;if(Kt(a).call(a,"penwidth")){var g=[];for(v=r.length,i=0;i<v;i++)r[i].name!=="width"&&(r[i].name==="penwidth"&&(r[i].name="width"),g.push(r[i]));r=g}for(v=r.length,i=0;i<v;i++)IY(r[i].attr,r[i].name,r[i].value);return n}function Ze(i){return new SyntaxError(i+', got "'+Mw(U,30)+'" (char '+an+")")}function Mw(i,n){return i.length<=n?i:i.substr(0,27)+"..."}function DY(i,n,e){ue(i)?ve(i).call(i,function(t){ue(n)?ve(n).call(n,function(r){e(t,r)}):e(t,n)}):ue(n)?ve(n).call(n,function(t){e(i,t)}):e(i,n)}function hh(i,n,e){for(var t=n.split("."),r=t.pop(),a=i,o=0;o<t.length;o++){var s=t[o];s in a||(a[s]={}),a=a[s]}return a[r]=e,i}function xy(i,n){var e={};for(var t in i)if(i.hasOwnProperty(t)){var r=n[t];ue(r)?ve(r).call(r,function(a){hh(e,a,i[t])}):typeof r=="string"?hh(e,r,i[t]):hh(e,t,i[t])}return e}function RY(i){var n=TY(i),e={nodes:[],edges:[],options:{}};if(n.nodes){var t;ve(t=n.nodes).call(t,function(o){var s={id:o.id,label:String(o.label||o.id)};Nr(s,xy(o.attr,kw)),s.image&&(s.shape="image"),e.nodes.push(s)})}if(n.edges){var r,a=function(s){var u={from:s.from,to:s.to};return Nr(u,xy(s.attr,Gf)),u.arrows==null&&s.type==="->"&&(u.arrows="to"),u};ve(r=n.edges).call(r,function(o){var s,u;if(o.from instanceof Object?s=o.from.nodes:s={id:o.from},o.to instanceof Object?u=o.to.nodes:u={id:o.to},o.from instanceof Object&&o.from.edges){var l;ve(l=o.from.edges).call(l,function(d){var f=a(d);e.edges.push(f)})}if(DY(s,u,function(d,f){var c=Pw(e,d.id,f.id,o.type,o.attr),v=a(c);e.edges.push(v)}),o.to instanceof Object&&o.to.edges){var h;ve(h=o.to.edges).call(h,function(d){var f=a(d);e.edges.push(f)})}})}return n.attr&&(e.options=n.attr),e}function FY(i,n){var e,t={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};n!=null&&(n.fixed!=null&&(t.nodes.fixed=n.fixed),n.parseColor!=null&&(t.nodes.parseColor=n.parseColor),n.inheritColor!=null&&(t.edges.inheritColor=n.inheritColor));var r=i.edges,a=en(r).call(r,function(s){var u={from:s.source,id:s.id,to:s.target};return s.attributes!=null&&(u.attributes=s.attributes),s.label!=null&&(u.label=s.label),s.attributes!=null&&s.attributes.title!=null&&(u.title=s.attributes.title),s.type==="Directed"&&(u.arrows="to"),s.color&&t.edges.inheritColor===!1&&(u.color=s.color),u}),o=en(e=i.nodes).call(e,function(s){var u={id:s.id,fixed:t.nodes.fixed&&s.x!=null&&s.y!=null};return s.attributes!=null&&(u.attributes=s.attributes),s.label!=null&&(u.label=s.label),s.size!=null&&(u.size=s.size),s.attributes!=null&&s.attributes.title!=null&&(u.title=s.attributes.title),s.title!=null&&(u.title=s.title),s.x!=null&&(u.x=s.x),s.y!=null&&(u.y=s.y),s.color!=null&&(t.nodes.parseColor===!0?u.color=s.color:u.color={background:s.color,border:s.color,highlight:{background:s.color,border:s.color},hover:{background:s.color,border:s.color}}),u});return{nodes:o,edges:a}}var NY={addDescription:"Click in an empty space to place a new node.",addEdge:"Add Edge",addNode:"Add Node",back:"Back",close:"Close",createEdgeError:"Cannot link edges to a cluster.",del:"Delete selected",deleteClusterError:"Clusters cannot be deleted.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",edit:"Edit",editClusterError:"Clusters cannot be edited.",editEdge:"Edit Edge",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",editNode:"Edit Node"},BY={addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",addEdge:"Kante hinzufügen",addNode:"Knoten hinzufügen",back:"Zurück",close:"Schließen",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",del:"Lösche Auswahl",deleteClusterError:"Cluster können nicht gelöscht werden.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",edit:"Editieren",editClusterError:"Cluster können nicht editiert werden.",editEdge:"Kante editieren",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",editNode:"Knoten editieren"},LY={addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",addEdge:"Añadir arista",addNode:"Añadir nodo",back:"Atrás",close:"Cerrar",createEdgeError:"No se puede conectar una arista a un grupo.",del:"Eliminar selección",deleteClusterError:"No es posible eliminar grupos.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",edit:"Editar",editClusterError:"No es posible editar grupos.",editEdge:"Editar arista",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",editNode:"Editar nodo"},zY={addDescription:"Clicca per aggiungere un nuovo nodo",addEdge:"Aggiungi un vertice",addNode:"Aggiungi un nodo",back:"Indietro",close:"Chiudere",createEdgeError:"Non si possono collegare vertici ad un cluster",del:"Cancella la selezione",deleteClusterError:"I cluster non possono essere cancellati",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",edit:"Modifica",editClusterError:"I clusters non possono essere modificati.",editEdge:"Modifica il vertice",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",editNode:"Modifica il nodo"},jY={addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",addEdge:"Link toevoegen",addNode:"Node toevoegen",back:"Terug",close:"Sluiten",createEdgeError:"Kan geen link maken naar een cluster.",del:"Selectie verwijderen",deleteClusterError:"Clusters kunnen niet worden verwijderd.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",edit:"Wijzigen",editClusterError:"Clusters kunnen niet worden aangepast.",editEdge:"Link wijzigen",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",editNode:"Node wijzigen"},HY={addDescription:"Clique em um espaço em branco para adicionar um novo nó",addEdge:"Adicionar aresta",addNode:"Adicionar nó",back:"Voltar",close:"Fechar",createEdgeError:"Não foi possível linkar arestas a um cluster.",del:"Remover selecionado",deleteClusterError:"Clusters não puderam ser removidos.",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",edit:"Editar",editClusterError:"Clusters não puderam ser editados.",editEdge:"Editar aresta",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",editNode:"Editar nó"},WY={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},VY={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},UY={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},GY={addDescription:"Cliquez dans un endroit vide pour placer un nœud.",addEdge:"Ajouter un lien",addNode:"Ajouter un nœud",back:"Retour",close:"Fermer",createEdgeError:"Impossible de créer un lien vers un cluster.",del:"Effacer la sélection",deleteClusterError:"Les clusters ne peuvent pas être effacés.",edgeDescription:"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.",edit:"Éditer",editClusterError:"Les clusters ne peuvent pas être édités.",editEdge:"Éditer le lien",editEdgeDescription:"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.",editNode:"Éditer le nœud"},KY={addDescription:"Kluknutím do prázdného prostoru můžete přidat nový vrchol.",addEdge:"Přidat hranu",addNode:"Přidat vrchol",back:"Zpět",close:"Zavřít",createEdgeError:"Nelze připojit hranu ke shluku.",del:"Smazat výběr",deleteClusterError:"Nelze mazat shluky.",edgeDescription:"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.",edit:"Upravit",editClusterError:"Nelze upravovat shluky.",editEdge:"Upravit hranu",editEdgeDescription:"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.",editNode:"Upravit vrchol"},qY=Object.freeze({__proto__:null,en:NY,de:BY,es:LY,it:zY,nl:jY,pt:HY,ru:WY,cn:VY,uk:UY,fr:GY,cs:KY});function YY(i,n){try{var e=n.split(/[-_ /]/,2),t=_e(e,2),r=t[0],a=t[1],o=r!=null?r.toLowerCase():null,s=a!=null?a.toUpperCase():null;if(o&&s){var u=o+"-"+s;if(Object.prototype.hasOwnProperty.call(i,u))return u;var l;console.warn(Rf(l="Unknown variant ".concat(s," of language ")).call(l,o,"."))}if(o){var h=o;if(Object.prototype.hasOwnProperty.call(i,h))return h;console.warn("Unknown language ".concat(o))}return console.warn("Unknown locale ".concat(n,", falling back to English.")),"en"}catch(d){return console.error(d),console.warn("Unexpected error while normalizing locale ".concat(n,", falling back to English.")),"en"}}var XY=function(){function i(){D(this,i),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return R(i,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var e=this.image.width,t=this.image.height;this.width=e,this.height=t;var r=Math.floor(t/2),a=Math.floor(t/4),o=Math.floor(t/8),s=Math.floor(t/16),u=Math.floor(e/2),l=Math.floor(e/4),h=Math.floor(e/8),d=Math.floor(e/16);this.canvas.width=3*l,this.canvas.height=r,this.coordinates=[[0,0,u,r],[u,0,l,a],[u,a,h,o],[5*h,a,d,s]],this._fillMipMap()}}},{key:"initialized",value:function(){return this.coordinates!==void 0}},{key:"_fillMipMap",value:function(){var e=this.canvas.getContext("2d"),t=this.coordinates[0];e.drawImage(this.image,t[0],t[1],t[2],t[3]);for(var r=1;r<this.NUM_ITERATIONS;r++){var a=this.coordinates[r-1],o=this.coordinates[r];e.drawImage(this.canvas,a[0],a[1],a[2],a[3],o[0],o[1],o[2],o[3])}}},{key:"drawImageAtPosition",value:function(e,t,r,a,o,s){if(this.initialized())if(t>2){t*=.5;for(var u=0;t>2&&u<this.NUM_ITERATIONS;)t*=.5,u+=1;u>=this.NUM_ITERATIONS&&(u=this.NUM_ITERATIONS-1);var l=this.coordinates[u];e.drawImage(this.canvas,l[0],l[1],l[2],l[3],r,a,o,s)}else e.drawImage(this.image,r,a,o,s)}}]),i}(),QY=function(){function i(n){D(this,i),this.images={},this.imageBroken={},this.callback=n}return R(i,[{key:"_tryloadBrokenUrl",value:function(e,t,r){if(!(e===void 0||r===void 0)){if(t===void 0){console.warn("No broken url image defined");return}r.image.onerror=function(){console.error("Could not load brokenImage:",t)},r.image.src=t}}},{key:"_redrawWithImage",value:function(e){this.callback&&this.callback(e)}},{key:"load",value:function(e,t){var r=this,a=this.images[e];if(a)return a;var o=new XY;return this.images[e]=o,o.image.onload=function(){r._fixImageCoordinates(o.image),o.init(),r._redrawWithImage(o)},o.image.onerror=function(){console.error("Could not load image:",e),r._tryloadBrokenUrl(e,t,o)},o.image.src=e,o}},{key:"_fixImageCoordinates",value:function(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}]),i}(),so={exports:{}},ZY=de,JY=ZY(function(){if(typeof ArrayBuffer=="function"){var i=new ArrayBuffer(8);Object.isExtensible(i)&&Object.defineProperty(i,"a",{value:8})}}),eX=de,tX=He,rX=_i,My=JY,Xo=Object.isExtensible,iX=eX(function(){Xo(1)}),Dw=iX||My?function(n){return!tX(n)||My&&rX(n)=="ArrayBuffer"?!1:Xo?Xo(n):!0}:Xo,nX=de,aX=!nX(function(){return Object.isExtensible(Object.preventExtensions({}))}),oX=Y,sX=oe,uX=Ua,lX=He,Kf=Xe,hX=bt.f,Dy=qa,dX=vu,qf=Dw,fX=iu,cX=aX,Rw=!1,cr=fX("meta"),vX=0,Yf=function(i){hX(i,cr,{value:{objectID:"O"+vX++,weakData:{}}})},pX=function(i,n){if(!lX(i))return typeof i=="symbol"?i:(typeof i=="string"?"S":"P")+i;if(!Kf(i,cr)){if(!qf(i))return"F";if(!n)return"E";Yf(i)}return i[cr].objectID},gX=function(i,n){if(!Kf(i,cr)){if(!qf(i))return!0;if(!n)return!1;Yf(i)}return i[cr].weakData},yX=function(i){return cX&&Rw&&qf(i)&&!Kf(i,cr)&&Yf(i),i},mX=function(){bX.enable=function(){},Rw=!0;var i=Dy.f,n=sX([].splice),e={};e[cr]=1,i(e).length&&(Dy.f=function(t){for(var r=i(t),a=0,o=r.length;a<o;a++)if(r[a]===cr){n(r,a,1);break}return r},oX({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:dX.f}))},bX=so.exports={enable:mX,fastKey:pX,getWeakData:gX,onFreeze:yX};uX[cr]=!0;var $X=G,wX=Wa,_X=Bt,EX=$t,SX=tu,OX=X1,TX=zt,Ry=Me,kX=t0,IX=cu,Fy=Y1,PX=$X.TypeError,Qo=function(i,n){this.stopped=i,this.result=n},Ny=Qo.prototype,Xf=function(i,n,e){var t=e&&e.that,r=!!(e&&e.AS_ENTRIES),a=!!(e&&e.IS_ITERATOR),o=!!(e&&e.INTERRUPTED),s=wX(n,t),u,l,h,d,f,c,v,g=function(p){return u&&Fy(u,"normal",p),new Qo(!0,p)},b=function(p){return r?(EX(p),o?s(p[0],p[1],g):s(p[0],p[1])):o?s(p,g):s(p)};if(a)u=i;else{if(l=IX(i),!l)throw PX(SX(i)+" is not iterable");if(OX(l)){for(h=0,d=TX(i);d>h;h++)if(f=b(i[h]),f&&Ry(Ny,f))return f;return new Qo(!1)}u=kX(i,l)}for(c=u.next;!(v=_X(c,u)).done;){try{f=b(v.value)}catch(p){Fy(u,"throw",p)}if(typeof f=="object"&&f&&Ry(Ny,f))return f}return new Qo(!1)},CX=G,AX=Me,xX=CX.TypeError,Qf=function(i,n){if(AX(n,i))return i;throw xX("Incorrect invocation")},MX=Y,DX=G,RX=so.exports,FX=de,NX=mn,BX=Xf,LX=Qf,zX=Ke,jX=He,HX=Ka,WX=bt.f,VX=zr.forEach,UX=je,Fw=Si,GX=Fw.set,KX=Fw.getterFor,Zf=function(i,n,e){var t=i.indexOf("Map")!==-1,r=i.indexOf("Weak")!==-1,a=t?"set":"add",o=DX[i],s=o&&o.prototype,u={},l;if(!UX||!zX(o)||!(r||s.forEach&&!FX(function(){new o().entries().next()})))l=e.getConstructor(n,i,t,a),RX.enable();else{l=n(function(f,c){GX(LX(f,h),{type:i,collection:new o}),c!=null&&BX(c,f[a],{that:f,AS_ENTRIES:t})});var h=l.prototype,d=KX(i);VX(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(f){var c=f=="add"||f=="set";f in s&&!(r&&f=="clear")&&NX(h,f,function(v,g){var b=d(this).collection;if(!c&&r&&!jX(v))return f=="get"?void 0:!1;var p=b[f](v===0?0:v,g);return c?this:p})}),r||WX(h,"size",{configurable:!0,get:function(){return d(this).collection.size}})}return HX(l,i,!1,!0),u[i]=l,MX({global:!0,forced:!0},u),r||e.setStrong(l,i,t),l},qX=du,Jf=function(i,n,e){for(var t in n)e&&e.unsafe&&i[t]?i[t]=n[t]:qX(i,t,n[t],e);return i},YX=gr,XX=bt,QX=Re,ZX=je,By=QX("species"),JX=function(i){var n=YX(i),e=XX.f;ZX&&n&&!n[By]&&e(n,By,{configurable:!0,get:function(){return this}})},eQ=bt.f,tQ=bn,Ly=Jf,rQ=Wa,iQ=Qf,nQ=Xf,aQ=kf,oQ=JX,Mn=je,zy=so.exports.fastKey,Nw=Si,jy=Nw.set,dh=Nw.getterFor,Bw={getConstructor:function(i,n,e,t){var r=i(function(l,h){iQ(l,a),jy(l,{type:n,index:tQ(null),first:void 0,last:void 0,size:0}),Mn||(l.size=0),h!=null&&nQ(h,l[t],{that:l,AS_ENTRIES:e})}),a=r.prototype,o=dh(n),s=function(l,h,d){var f=o(l),c=u(l,h),v,g;return c?c.value=d:(f.last=c={index:g=zy(h,!0),key:h,value:d,previous:v=f.last,next:void 0,removed:!1},f.first||(f.first=c),v&&(v.next=c),Mn?f.size++:l.size++,g!=="F"&&(f.index[g]=c)),l},u=function(l,h){var d=o(l),f=zy(h),c;if(f!=="F")return d.index[f];for(c=d.first;c;c=c.next)if(c.key==h)return c};return Ly(a,{clear:function(){for(var h=this,d=o(h),f=d.index,c=d.first;c;)c.removed=!0,c.previous&&(c.previous=c.previous.next=void 0),delete f[c.index],c=c.next;d.first=d.last=void 0,Mn?d.size=0:h.size=0},delete:function(l){var h=this,d=o(h),f=u(h,l);if(f){var c=f.next,v=f.previous;delete d.index[f.index],f.removed=!0,v&&(v.next=c),c&&(c.previous=v),d.first==f&&(d.first=c),d.last==f&&(d.last=v),Mn?d.size--:h.size--}return!!f},forEach:function(h){for(var d=o(this),f=rQ(h,arguments.length>1?arguments[1]:void 0),c;c=c?c.next:d.first;)for(f(c.value,c.key,this);c&&c.removed;)c=c.previous},has:function(h){return!!u(this,h)}}),Ly(a,e?{get:function(h){var d=u(this,h);return d&&d.value},set:function(h,d){return s(this,h===0?0:h,d)}}:{add:function(h){return s(this,h=h===0?0:h,h)}}),Mn&&eQ(a,"size",{get:function(){return o(this).size}}),r},setStrong:function(i,n,e){var t=n+" Iterator",r=dh(n),a=dh(t);aQ(i,n,function(o,s){jy(this,{type:t,target:o,state:r(o),kind:s,last:void 0})},function(){for(var o=a(this),s=o.kind,u=o.last;u&&u.removed;)u=u.previous;return!o.target||!(o.last=u=u?u.next:o.state.first)?(o.target=void 0,{value:void 0,done:!0}):s=="keys"?{value:u.key,done:!1}:s=="values"?{value:u.value,done:!1}:{value:[u.key,u.value],done:!1}},e?"entries":"values",!e,!0),oQ(n)}},sQ=Zf,uQ=Bw;sQ("Map",function(i){return function(){return i(this,arguments.length?arguments[0]:void 0)}},uQ);var lQ=re,hQ=lQ.Map,dQ=hQ,fQ=dQ,Lw=fQ,cQ=function(){function i(){D(this,i),this.clear(),this._defaultIndex=0,this._groupIndex=0,this._defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},Ce(this.options,this.defaultOptions)}return R(i,[{key:"setOptions",value:function(e){var t=["useDefaultGroups"];if(e!==void 0){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&ae(t).call(t,r)===-1){var a=e[r];this.add(r,a)}}}},{key:"clear",value:function(){this._groups=new Lw,this._groupNames=[]}},{key:"get",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this._groups.get(e);if(r===void 0&&t)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){var a=this._groupIndex%this._groupNames.length;++this._groupIndex,r={},r.color=this._groups.get(this._groupNames[a]),this._groups.set(e,r)}else{var o=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,r={},r.color=this._defaultGroups[o],this._groups.set(e,r)}return r}},{key:"add",value:function(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}}]),i}(),vQ=Y;vQ({target:"Number",stat:!0},{isNaN:function(n){return n!=n}});var pQ=re,gQ=pQ.Number.isNaN,yQ=gQ,mQ=yQ,Id=mQ,bQ=G,$Q=bQ.isFinite,wQ=Number.isFinite||function(n){return typeof n=="number"&&$Q(n)},_Q=Y,EQ=wQ;_Q({target:"Number",stat:!0},{isFinite:EQ});var SQ=re,OQ=SQ.Number.isFinite,TQ=OQ,kQ=TQ,Zr=kQ,IQ=Y,PQ=zr.some,CQ=Sn,AQ=CQ("some");IQ({target:"Array",proto:!0,forced:!AQ},{some:function(n){return PQ(this,n,arguments.length>1?arguments[1]:void 0)}});var xQ=We,MQ=xQ("Array").some,DQ=Me,RQ=MQ,fh=Array.prototype,FQ=function(i){var n=i.some;return i===fh||DQ(fh,i)&&n===fh.some?RQ:n},NQ=FQ,BQ=NQ,LQ=BQ,zw=G,zQ=de,jQ=oe,HQ=Br,WQ=Ff.trim,VQ=Su,UQ=jQ("".charAt),Es=zw.parseFloat,Hy=zw.Symbol,Wy=Hy&&Hy.iterator,GQ=1/Es(VQ+"-0")!==-1/0||Wy&&!zQ(function(){Es(Object(Wy))}),KQ=GQ?function(n){var e=WQ(HQ(n)),t=Es(e);return t===0&&UQ(e,0)=="-"?-0:t}:Es,qQ=Y,Vy=KQ;qQ({global:!0,forced:parseFloat!=Vy},{parseFloat:Vy});var YQ=re,XQ=YQ.parseFloat,QQ=XQ,ZQ=QQ,jw=ZQ,JQ=Y,eZ=de,tZ=vu.f,rZ=eZ(function(){return!Object.getOwnPropertyNames(1)});JQ({target:"Object",stat:!0,forced:rZ},{getOwnPropertyNames:tZ});var iZ=re,nZ=iZ.Object,aZ=function(n){return nZ.getOwnPropertyNames(n)},oZ=aZ,sZ=oZ,uZ=sZ;function ec(i,n){var e=["node","edge","label"],t=!0,r=Er(n,"chosen");if(typeof r=="boolean")t=r;else if(ce(r)==="object"){if(ae(e).call(e,i)===-1)throw new Error("choosify: subOption '"+i+"' should be one of '"+e.join("', '")+"'");var a=Er(n,["chosen",i]);(typeof a=="boolean"||typeof a=="function")&&(t=a)}return t}function Pd(i,n,e){if(i.width<=0||i.height<=0)return!1;if(e!==void 0){var t={x:n.x-e.x,y:n.y-e.y};if(e.angle!==0){var r=-e.angle,a={x:Math.cos(r)*t.x-Math.sin(r)*t.y,y:Math.sin(r)*t.x+Math.cos(r)*t.y};n=a}else n=t}var o=i.x+i.width,s=i.y+i.width;return i.left<n.x&&o>n.x&&i.top<n.y&&s>n.y}function Ss(i){return typeof i=="string"&&i!==""}function Hw(i,n,e,t){var r=t.x,a=t.y;if(typeof t.distanceToBorder=="function"){var o=t.distanceToBorder(i,n),s=Math.sin(n)*o,u=Math.cos(n)*o;u===o?(r+=o,a=t.y):s===o?(r=t.x,a-=o):(r+=u,a-=s)}else t.shape.width>t.shape.height?(r=t.x+t.shape.width*.5,a=t.y-e):(r=t.x+e,a=t.y-t.shape.height*.5);return{x:r,y:a}}var lZ=We,hZ=lZ("Array").values,dZ=hZ,fZ=dZ,cZ=Ei,vZ=Xe,pZ=Me,gZ=fZ,ch=Array.prototype,yZ={DOMTokenList:!0,NodeList:!0},mZ=function(i){var n=i.values;return i===ch||pZ(ch,i)&&n===ch.values||vZ(yZ,cZ(i))?gZ:n},Ww=mZ,bZ=function(){function i(n){D(this,i),this.measureText=n,this.current=0,this.width=0,this.height=0,this.lines=[]}return R(i,[{key:"_add",value:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});var a=t;(t===void 0||t==="")&&(a=" ");var o=this.measureText(a,r),s=Ce({},Ww(o));s.text=t,s.width=o.width,s.mod=r,(t===void 0||t==="")&&(s.width=0),this.lines[e].blocks.push(s),this.lines[e].width+=s.width}},{key:"curWidth",value:function(){var e=this.lines[this.current];return e===void 0?0:e.width}},{key:"append",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t)}},{key:"newLine",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,t),this.current++}},{key:"determineLineHeights",value:function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e],r=0;if(t.blocks!==void 0)for(var a=0;a<t.blocks.length;a++){var o=t.blocks[a];r<o.height&&(r=o.height)}t.height=r}}},{key:"determineLabelSize",value:function(){for(var e=0,t=0,r=0;r<this.lines.length;r++){var a=this.lines[r];a.width>e&&(e=a.width),t+=a.height}this.width=e,this.height=t}},{key:"removeEmptyBlocks",value:function(){for(var e=[],t=0;t<this.lines.length;t++){var r=this.lines[t];if(r.blocks.length!==0&&!(t===this.lines.length-1&&r.width===0)){var a={};Ce(a,r),a.blocks=[];for(var o=void 0,s=[],u=0;u<r.blocks.length;u++){var l=r.blocks[u];l.width!==0?s.push(l):o===void 0&&(o=l)}s.length===0&&o!==void 0&&s.push(o),a.blocks=s,e.push(a)}}return e}},{key:"finalize",value:function(){this.determineLineHeights(),this.determineLabelSize();var e=this.removeEmptyBlocks();return{width:this.width,height:this.height,lines:e}}}]),i}(),$Z={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},Uy=function(){function i(n){D(this,i),this.text=n,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return R(i,[{key:"mod",value:function(){return this.modStack.length===0?"normal":this.modStack[0]}},{key:"modName",value:function(){if(this.modStack.length===0)return"normal";if(this.modStack[0]==="mono")return"mono";if(this.bold&&this.ital)return"boldital";if(this.bold)return"bold";if(this.ital)return"ital"}},{key:"emitBlock",value:function(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}},{key:"add",value:function(e){e===" "&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1),e!=" "&&(this.buffer+=e)}},{key:"parseWS",value:function(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}},{key:"setTag",value:function(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}},{key:"unsetTag",value:function(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}},{key:"parseStartTag",value:function(e,t){return!this.mono&&!this[e]&&this.match(t)?(this.setTag(e),!0):!1}},{key:"match",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this.prepareRegExp(e),a=_e(r,2),o=a[0],s=a[1],u=o.test(this.text.substr(this.position,s));return u&&t&&(this.position+=s-1),u}},{key:"parseEndTag",value:function(e,t,r){var a=this.mod()===e;return e==="mono"?a=a&&this.mono:a=a&&!this.mono,a&&this.match(t)?(r!==void 0?(this.position===this.text.length-1||this.match(r,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}},{key:"replace",value:function(e,t){return this.match(e)?(this.add(t),this.position+=length-1,!0):!1}},{key:"prepareRegExp",value:function(e){var t,r;if(e instanceof RegExp)r=e,t=1;else{var a=$Z[e];a!==void 0?r=a:r=new RegExp(e),t=e.length}return[r,t]}}]),i}(),wZ=function(){function i(n,e,t,r){var a=this;D(this,i),this.ctx=n,this.parent=e,this.selected=t,this.hover=r;var o=function(u,l){if(u===void 0)return 0;var h=a.parent.getFormattingValues(n,t,r,l),d=0;if(u!==""){var f=a.ctx.measureText(u);d=f.width}return{width:d,values:h}};this.lines=new bZ(o)}return R(i,[{key:"process",value:function(e){if(!Ss(e))return this.lines.finalize();var t=this.parent.fontOptions;e=e.replace(/\r\n/g,`
|
|
91
|
-
`),e=e.replace(/\r/g,`
|
|
92
|
-
`);var r=String(e).split(`
|
|
93
|
-
`),a=r.length;if(t.multi)for(var o=0;o<a;o++){var s=this.splitBlocks(r[o],t.multi);if(s!==void 0){if(s.length===0){this.lines.newLine("");continue}if(t.maxWdt>0)for(var u=0;u<s.length;u++){var l=s[u].mod,h=s[u].text;this.splitStringIntoLines(h,l,!0)}else for(var d=0;d<s.length;d++){var f=s[d].mod,c=s[d].text;this.lines.append(c,f)}this.lines.newLine()}}else if(t.maxWdt>0)for(var v=0;v<a;v++)this.splitStringIntoLines(r[v]);else for(var g=0;g<a;g++)this.lines.newLine(r[g]);return this.lines.finalize()}},{key:"decodeMarkupSystem",value:function(e){var t="none";return e==="markdown"||e==="md"?t="markdown":(e===!0||e==="html")&&(t="html"),t}},{key:"splitHtmlBlocks",value:function(e){for(var t=new Uy(e),r=function(u){if(/&/.test(u)){var l=t.replace(t.text,"<","<")||t.replace(t.text,"&","&");return l||t.add("&"),!0}return!1};t.position<t.text.length;){var a=t.text.charAt(t.position),o=t.parseWS(a)||/</.test(a)&&(t.parseStartTag("bold","<b>")||t.parseStartTag("ital","<i>")||t.parseStartTag("mono","<code>")||t.parseEndTag("bold","</b>")||t.parseEndTag("ital","</i>")||t.parseEndTag("mono","</code>"))||r(a);o||t.add(a),t.position++}return t.emitBlock(),t.blocks}},{key:"splitMarkdownBlocks",value:function(e){for(var t=this,r=new Uy(e),a=!0,o=function(h){return/\\/.test(h)?(r.position<t.text.length+1&&(r.position++,h=t.text.charAt(r.position),/ \t/.test(h)?r.spacing=!0:(r.add(h),a=!1)),!0):!1};r.position<r.text.length;){var s=r.text.charAt(r.position),u=r.parseWS(s)||o(s)||(a||r.spacing)&&(r.parseStartTag("bold","*")||r.parseStartTag("ital","_")||r.parseStartTag("mono","`"))||r.parseEndTag("bold","*","afterBold")||r.parseEndTag("ital","_","afterItal")||r.parseEndTag("mono","`","afterMono");u||(r.add(s),a=!1),r.position++}return r.emitBlock(),r.blocks}},{key:"splitBlocks",value:function(e,t){var r=this.decodeMarkupSystem(t);if(r==="none")return[{text:e,mod:"normal"}];if(r==="markdown")return this.splitMarkdownBlocks(e);if(r==="html")return this.splitHtmlBlocks(e)}},{key:"overMaxWidth",value:function(e){var t=this.ctx.measureText(e).width;return this.lines.curWidth()+t>this.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(e){for(var t="",r=0;r<e.length;){var a=t===""?"":" ",o=t+a+e[r];if(this.overMaxWidth(o))break;t=o,r++}return r}},{key:"getLongestFitWord",value:function(e){for(var t=0;t<e.length&&!this.overMaxWidth(Be(e).call(e,0,t));)t++;return t}},{key:"splitStringIntoLines",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");for(var a=e.split("\r");a.length>0;){var o=this.getLongestFit(a);if(o===0){var s=a[0],u=this.getLongestFitWord(s);this.lines.newLine(Be(s).call(s,0,u),t),a[0]=Be(s).call(s,u)}else{var l=o;a[o-1]===" "?o--:a[l]===" "&&l++;var h=Be(a).call(a,0,o).join("");o==a.length&&r?this.lines.append(h,t):this.lines.newLine(h,t),a=Be(a).call(a,l)}}}}]),i}(),Dn=["bold","ital","boldital","mono"],Vw=function(){function i(n,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;D(this,i),this.body=n,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(e),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=t}return R(i,[{key:"setOptions",value:function(e){if(this.elementOptions=e,this.initFontOptions(e.font),Ss(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font=="string")this.baseSize=this.fontOptions.size;else if(ce(e.font)==="object"){var t=e.font.size;t!==void 0&&(this.baseSize=t)}}}},{key:"initFontOptions",value:function(e){var t=this;if(ee(Dn,function(r){t.fontOptions[r]={}}),i.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}ee(e,function(r,a){r!=null&&ce(r)!=="object"&&(t.fontOptions[a]=r)})}},{key:"constrain",value:function(e){var t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},r=Er(e,"widthConstraint");if(typeof r=="number")t.maxWdt=Number(r),t.minWdt=Number(r);else if(ce(r)==="object"){var a=Er(e,["widthConstraint","maximum"]);typeof a=="number"&&(t.maxWdt=Number(a));var o=Er(e,["widthConstraint","minimum"]);typeof o=="number"&&(t.minWdt=Number(o))}var s=Er(e,"heightConstraint");if(typeof s=="number")t.minHgt=Number(s);else if(ce(s)==="object"){var u=Er(e,["heightConstraint","minimum"]);typeof u=="number"&&(t.minHgt=Number(u));var l=Er(e,["heightConstraint","valign"]);typeof l=="string"&&(l==="top"||l==="bottom")&&(t.valign=l)}return t}},{key:"update",value:function(e,t){this.setOptions(e,!0),this.propagateFonts(t),ye(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=ec("label",t)}},{key:"adjustSizes",value:function(e){var t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);var r=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=r)}},{key:"addFontOptionsToPile",value:function(e,t){for(var r=0;r<t.length;++r)this.addFontToPile(e,t[r])}},{key:"addFontToPile",value:function(e,t){if(t!==void 0&&!(t.font===void 0||t.font===null)){var r=t.font;e.push(r)}}},{key:"getBasicOptions",value:function(e){for(var t={},r=0;r<e.length;++r){var a=e[r],o={};i.parseFontString(o,a)&&(a=o),ee(a,function(s,u){s!==void 0&&(Object.prototype.hasOwnProperty.call(t,u)||(ae(Dn).call(Dn,u)!==-1?t[u]={}:t[u]=s))})}return t}},{key:"getFontOption",value:function(e,t,r){for(var a,o=0;o<e.length;++o){var s=e[o];if(Object.prototype.hasOwnProperty.call(s,t)){if(a=s[t],a==null)continue;var u={};if(i.parseFontString(u,a)&&(a=u),Object.prototype.hasOwnProperty.call(a,r))return a[r]}}if(Object.prototype.hasOwnProperty.call(this.fontOptions,r))return this.fontOptions[r];throw new Error("Did not find value for multi-font for property: '"+r+"'")}},{key:"getFontOptions",value:function(e,t){for(var r={},a=["color","size","face","mod","vadjust"],o=0;o<a.length;++o){var s=a[o];r[s]=this.getFontOption(e,t,s)}return r}},{key:"propagateFonts",value:function(e){var t=this,r=[];this.addFontOptionsToPile(r,e),this.fontOptions=this.getBasicOptions(r);for(var a=function(u){var l=Dn[u],h=t.fontOptions[l],d=t.getFontOptions(r,l);ee(d,function(f,c){h[c]=f}),h.size=Number(h.size),h.vadjust=Number(h.vadjust)},o=0;o<Dn.length;++o)a(o)}},{key:"draw",value:function(e,t,r,a,o){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label!==void 0){var u=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&u<this.elementOptions.scaling.label.drawThreshold-1||(u>=this.elementOptions.scaling.label.maxVisible&&(u=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,a,o,t,r,s),this._drawBackground(e),this._drawText(e,t,this.size.yLine,s,u))}}},{key:"_drawBackground",value:function(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;var t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}},{key:"_drawText",value:function(e,t,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",o=arguments.length>4?arguments[4]:void 0,s=this._setAlignment(e,t,r,a),u=_e(s,2);t=u[0],r=u[1],e.textAlign="left",t=t-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(r-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(r+=(this.size.height-this.size.labelHeight)/2));for(var l=0;l<this.lineCount;l++){var h=this.lines[l];if(h&&h.blocks){var d=0;this.isEdgeLabel||this.fontOptions.align==="center"?d+=(this.size.width-h.width)/2:this.fontOptions.align==="right"&&(d+=this.size.width-h.width);for(var f=0;f<h.blocks.length;f++){var c=h.blocks[f];e.font=c.font;var v=this._getColor(c.color,o,c.strokeColor),g=_e(v,2),b=g[0],p=g[1];c.strokeWidth>0&&(e.lineWidth=c.strokeWidth,e.strokeStyle=p,e.lineJoin="round"),e.fillStyle=b,c.strokeWidth>0&&e.strokeText(c.text,t+d,r+c.vadjust),e.fillText(c.text,t+d,r+c.vadjust),d+=c.width}r+=h.height}}}},{key:"_setAlignment",value:function(e,t,r,a){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){t=0,r=0;var o=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",r-=2*o):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",r+=2*o):e.textBaseline="middle"}else e.textBaseline=a;return[t,r]}},{key:"_getColor",value:function(e,t,r){var a=e||"#000000",o=r||"#ffffff";if(t<=this.elementOptions.scaling.label.drawThreshold){var s=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));a=Et(a,s),o=Et(o,s)}return[a,o]}},{key:"getTextSize",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,t,r),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var e=2,t=this.size.left,r=this.size.top-.5*e;if(this.isEdgeLabel){var a=-this.size.width*.5;switch(this.fontOptions.align){case"middle":t=a,r=-this.size.height*.5;break;case"top":t=a,r=-(this.size.height+e);break;case"bottom":t=a,r=e;break}}var o={left:t,top:r,width:this.size.width,height:this.size.height};return o}},{key:"calculateLabelSize",value:function(e,t,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,t,r),this.size.left=a-this.size.width*.5,this.size.top=o-this.size.height*.5,this.size.yLine=o+(1-this.lineCount)*.5*this.fontOptions.size,s==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:"getFormattingValues",value:function(e,t,r,a){var o=function(h,d,f){return d==="normal"?f==="mod"?"":h[f]:h[d][f]!==void 0?h[d][f]:h[f]},s={color:o(this.fontOptions,a,"color"),size:o(this.fontOptions,a,"size"),face:o(this.fontOptions,a,"face"),mod:o(this.fontOptions,a,"mod"),vadjust:o(this.fontOptions,a,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||r)&&(a==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?s.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(s,this.elementOptions.id,t,r));var u="";return s.mod!==void 0&&s.mod!==""&&(u+=s.mod+" "),u+=s.size+"px "+s.face,e.font=u.replace(/"/g,""),s.font=e.font,s.height=s.size,s}},{key:"differentState",value:function(e,t){return e!==this.selectedState||t!==this.hoverState}},{key:"_processLabelText",value:function(e,t,r,a){var o=new wZ(e,this,t,r);return o.process(a)}},{key:"_processLabel",value:function(e,t,r){if(!(this.labelDirty===!1&&!this.differentState(t,r))){var a=this._processLabelText(e,t,r,this.elementOptions.label);this.fontOptions.minWdt>0&&a.width<this.fontOptions.minWdt&&(a.width=this.fontOptions.minWdt),this.size.labelHeight=a.height,this.fontOptions.minHgt>0&&a.height<this.fontOptions.minHgt&&(a.height=this.fontOptions.minHgt),this.lines=a.lines,this.lineCount=a.lines.length,this.size.width=a.width,this.size.height=a.height,this.selectedState=t,this.hoverState=r,this.labelDirty=!1}}},{key:"visible",value:function(){if(this.size.width===0||this.size.height===0||this.elementOptions.label===void 0)return!1;var e=this.fontOptions.size*this.body.view.scale;return!(e<this.elementOptions.scaling.label.drawThreshold-1)}}],[{key:"parseFontString",value:function(e,t){if(!t||typeof t!="string")return!1;var r=t.split(" ");return e.size=+r[0].replace("px",""),e.face=r[1],e.color=r[2],!0}}]),i}(),_Z=G,EZ=fu,SZ=tu,OZ=_Z.TypeError,TZ=function(i){if(EZ(i))return i;throw OZ(SZ(i)+" is not a constructor")},kZ=Y,IZ=gr,vh=pn,PZ=P1,Gy=TZ,CZ=$t,Ky=He,AZ=bn,Uw=de,tc=IZ("Reflect","construct"),xZ=Object.prototype,MZ=[].push,Gw=Uw(function(){function i(){}return!(tc(function(){},[],i)instanceof i)}),Kw=!Uw(function(){tc(function(){})}),qy=Gw||Kw;kZ({target:"Reflect",stat:!0,forced:qy,sham:qy},{construct:function(n,e){Gy(n),CZ(e);var t=arguments.length<3?n:Gy(arguments[2]);if(Kw&&!Gw)return tc(n,e,t);if(n==t){switch(e.length){case 0:return new n;case 1:return new n(e[0]);case 2:return new n(e[0],e[1]);case 3:return new n(e[0],e[1],e[2]);case 4:return new n(e[0],e[1],e[2],e[3])}var r=[null];return vh(MZ,r,e),new(vh(PZ,n,r))}var a=t.prototype,o=AZ(Ky(a)?a:xZ),s=vh(n,o,e);return Ky(s)?s:o}});var DZ=re,RZ=DZ.Reflect.construct,FZ=RZ,NZ=FZ,P=NZ,BZ=Q0,LZ=BZ,zZ=LZ,jZ=zZ,HZ=jZ,WZ=Y,VZ=W4;WZ({target:"Object",stat:!0},{setPrototypeOf:VZ});var UZ=re,GZ=UZ.Object.setPrototypeOf,KZ=GZ,qZ=KZ,YZ=qZ,XZ=YZ,QZ=XZ,ZZ=QZ,qw=ZZ;function Cd(i,n){return Cd=qw||function(t,r){return t.__proto__=r,t},Cd(i,n)}function se(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=HZ(n&&n.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),_u(i,"prototype",{writable:!1}),n&&Cd(i,n)}function JZ(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function fe(i,n){if(n&&(ce(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return JZ(i)}var eJ=K0,tJ=eJ,rJ=tJ,iJ=rJ,Yy=iJ;function L(i){return L=qw?Yy:function(e){return e.__proto__||Yy(e)},L(i)}var Ti=function(){function i(n,e,t){D(this,i),this.body=e,this.labelModule=t,this.setOptions(n),this.top=void 0,this.left=void 0,this.height=void 0,this.width=void 0,this.radius=void 0,this.margin=void 0,this.refreshNeeded=!0,this.boundingBox={top:0,left:0,right:0,bottom:0}}return R(i,[{key:"setOptions",value:function(e){this.options=e}},{key:"_setMargins",value:function(e){this.margin={},this.options.margin&&(ce(this.options.margin)=="object"?(this.margin.top=this.options.margin.top,this.margin.right=this.options.margin.right,this.margin.bottom=this.options.margin.bottom,this.margin.left=this.options.margin.left):(this.margin.top=this.options.margin,this.margin.right=this.options.margin,this.margin.bottom=this.options.margin,this.margin.left=this.options.margin)),e.adjustSizes(this.margin)}},{key:"_distanceToBorder",value:function(e,t){var r=this.options.borderWidth;return e&&this.resize(e),Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+r}},{key:"enableShadow",value:function(e,t){t.shadow&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}},{key:"disableShadow",value:function(e,t){t.shadow&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"enableBorderDashes",value:function(e,t){if(t.borderDashes!==!1)if(e.setLineDash!==void 0){var r=t.borderDashes;r===!0&&(r=[5,15]),e.setLineDash(r)}else console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1}},{key:"disableBorderDashes",value:function(e,t){t.borderDashes!==!1&&(e.setLineDash!==void 0?e.setLineDash([0]):(console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1))}},{key:"needsRefresh",value:function(e,t){return this.refreshNeeded===!0?(this.refreshNeeded=!1,!0):this.width===void 0||this.labelModule.differentState(e,t)}},{key:"initContextForDraw",value:function(e,t){var r=t.borderWidth/this.body.view.scale;e.lineWidth=Math.min(this.width,r),e.strokeStyle=t.borderColor,e.fillStyle=t.color}},{key:"performStroke",value:function(e,t){var r=t.borderWidth/this.body.view.scale;e.save(),r>0&&(this.enableBorderDashes(e,t),e.stroke(),this.disableBorderDashes(e,t)),e.restore()}},{key:"performFill",value:function(e,t){e.save(),e.fillStyle=t.color,this.enableShadow(e,t),to(e).call(e),this.disableShadow(e,t),e.restore(),this.performStroke(e,t)}},{key:"_addBoundingBoxMargin",value:function(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}},{key:"_updateBoundingBox",value:function(e,t,r,a,o){r!==void 0&&this.resize(r,a,o),this.left=e-this.width/2,this.top=t-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"updateBoundingBox",value:function(e,t,r,a,o){this._updateBoundingBox(e,t,r,a,o)}},{key:"getDimensionsFromLabel",value:function(e,t,r){this.textSize=this.labelModule.getTextSize(e,t,r);var a=this.textSize.width,o=this.textSize.height,s=14;return a===0&&(a=s,o=s),{width:a,height:o}}}]),i}();function nJ(i){var n=aJ();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function aJ(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var oJ=function(i){se(e,i);var n=nJ(e);function e(t,r,a){var o;return D(this,e),o=n.call(this,t,r,a),o._setMargins(a),o}return R(e,[{key:"resize",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(r,a,o);this.width=s.width+this.margin.right+this.margin.left,this.height=s.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}},{key:"draw",value:function(r,a,o,s,u,l){this.resize(r,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(r,l),C1(r,this.left,this.top,this.width,this.height,l.borderRadius),this.performFill(r,l),this.updateBoundingBox(a,o,r,s,u),this.labelModule.draw(r,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,u)}},{key:"updateBoundingBox",value:function(r,a,o,s,u){this._updateBoundingBox(r,a,o,s,u);var l=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(l)}},{key:"distanceToBorder",value:function(r,a){r&&this.resize(r);var o=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(a)),Math.abs(this.height/2/Math.sin(a)))+o}}]),e}(Ti);function sJ(i){var n=uJ();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function uJ(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var rc=function(i){se(e,i);var n=sJ(e);function e(t,r,a){var o;return D(this,e),o=n.call(this,t,r,a),o.labelOffset=0,o.selected=!1,o}return R(e,[{key:"setOptions",value:function(r,a,o){this.options=r,a===void 0&&o===void 0||this.setImages(a,o)}},{key:"setImages",value:function(r,a){a&&this.selected?(this.imageObj=a,this.imageObjAlt=r):(this.imageObj=r,this.imageObjAlt=a)}},{key:"switchImages",value:function(r){var a=r&&!this.selected||!r&&this.selected;if(this.selected=r,this.imageObjAlt!==void 0&&a){var o=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=o}}},{key:"_getImagePadding",value:function(){var r={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){var a=this.options.imagePadding;ce(a)=="object"?(r.top=a.top,r.right=a.right,r.bottom=a.bottom,r.left=a.left):(r.top=a,r.right=a,r.bottom=a,r.left=a)}return r}},{key:"_resizeImage",value:function(){var r,a;if(this.options.shapeProperties.useImageSize===!1){var o=1,s=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?o=this.imageObj.width/this.imageObj.height:s=this.imageObj.height/this.imageObj.width),r=this.options.size*2*o,a=this.options.size*2*s}else{var u=this._getImagePadding();r=this.imageObj.width+u.left+u.right,a=this.imageObj.height+u.top+u.bottom}this.width=r,this.height=a,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(r,a,o,s){this.initContextForDraw(r,s),Ef(r,a,o,s.size),this.performFill(r,s)}},{key:"_drawImageAtPosition",value:function(r,a){if(this.imageObj.width!=0){r.globalAlpha=a.opacity!==void 0?a.opacity:1,this.enableShadow(r,a);var o=1;this.options.shapeProperties.interpolation===!0&&(o=this.imageObj.width/this.width/this.body.view.scale);var s=this._getImagePadding(),u=this.left+s.left,l=this.top+s.top,h=this.width-s.left-s.right,d=this.height-s.top-s.bottom;this.imageObj.drawImageAtPosition(r,o,u,l,h,d),this.disableShadow(r,a)}}},{key:"_drawImageLabel",value:function(r,a,o,s,u){var l=0;if(this.height!==void 0){l=this.height*.5;var h=this.labelModule.getTextSize(r,s,u);h.lineCount>=1&&(l+=h.height/2)}var d=o+l;this.options.label&&(this.labelOffset=l),this.labelModule.draw(r,a,d,s,u,"hanging")}}]),e}(Ti);function lJ(i){var n=hJ();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function hJ(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var dJ=function(i){se(e,i);var n=lJ(e);function e(t,r,a){var o;return D(this,e),o=n.call(this,t,r,a),o._setMargins(a),o}return R(e,[{key:"resize",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(r,a,o),u=Math.max(s.width+this.margin.right+this.margin.left,s.height+this.margin.top+this.margin.bottom);this.options.size=u/2,this.width=u,this.height=u,this.radius=this.width/2}}},{key:"draw",value:function(r,a,o,s,u,l){this.resize(r,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this._drawRawCircle(r,a,o,l),this.updateBoundingBox(a,o),this.labelModule.draw(r,this.left+this.textSize.width/2+this.margin.left,o,s,u)}},{key:"updateBoundingBox",value:function(r,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=r-this.options.size,this.boundingBox.right=r+this.options.size,this.boundingBox.bottom=a+this.options.size}},{key:"distanceToBorder",value:function(r){return r&&this.resize(r),this.width*.5}}]),e}(rc);function fJ(i){var n=cJ();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function cJ(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var vJ=function(i){se(e,i);var n=fJ(e);function e(t,r,a,o,s){var u;return D(this,e),u=n.call(this,t,r,a),u.setImages(o,s),u}return R(e,[{key:"resize",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(s){var u=this.options.size*2;this.width=u,this.height=u,this.radius=.5*this.width;return}this.needsRefresh(a,o)&&this._resizeImage()}},{key:"draw",value:function(r,a,o,s,u,l){this.switchImages(s),this.resize();var h=a,d=o;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,h+=this.width/2,d+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this._drawRawCircle(r,h,d,l),r.save(),r.clip(),this._drawImageAtPosition(r,l),r.restore(),this._drawImageLabel(r,h,d,s,u),this.updateBoundingBox(a,o)}},{key:"updateBoundingBox",value:function(r,a){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=a,this.boundingBox.left=r,this.boundingBox.right=r+this.options.size*2,this.boundingBox.bottom=a+this.options.size*2):(this.boundingBox.top=a-this.options.size,this.boundingBox.left=r-this.options.size,this.boundingBox.right=r+this.options.size,this.boundingBox.bottom=a+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:"distanceToBorder",value:function(r){return r&&this.resize(r),this.width*.5}}]),e}(rc);function pJ(i){var n=gJ();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function gJ(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Hr=function(i){se(e,i);var n=pJ(e);function e(t,r,a){return D(this,e),n.call(this,t,r,a)}return R(e,[{key:"resize",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(a,o)){var u,l;this.labelModule.getTextSize(r,a,o);var h=2*s.size;this.width=(u=this.customSizeWidth)!==null&&u!==void 0?u:h,this.height=(l=this.customSizeHeight)!==null&&l!==void 0?l:h,this.radius=.5*this.width}}},{key:"_drawShape",value:function(r,a,o,s,u,l,h,d){var f=this;return this.resize(r,l,h,d),this.left=s-this.width/2,this.top=u-this.height/2,this.initContextForDraw(r,d),rH(a)(r,s,u,d.size),this.performFill(r,d),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(r.font=(l?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),r.fillStyle=this.options.icon.color||"black",r.textAlign="center",r.textBaseline="middle",r.fillText(this.options.icon.code,s,u)),{drawExternalLabel:function(){if(f.options.label!==void 0){f.labelModule.calculateLabelSize(r,l,h,s,u,"hanging");var v=u+.5*f.height+.5*f.labelModule.size.height;f.labelModule.draw(r,s,v,l,h,"hanging")}f.updateBoundingBox(s,u)}}}},{key:"updateBoundingBox",value:function(r,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=r-this.options.size,this.boundingBox.right=r+this.options.size,this.boundingBox.bottom=a+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}]),e}(Ti);function Xy(i,n){var e=we(i);if(Rr){var t=Rr(i);n&&(t=ht(t).call(t,function(r){return jr(i,r).enumerable})),e.push.apply(e,t)}return e}function yJ(i){for(var n=1;n<arguments.length;n++){var e,t,r=arguments[n]!=null?arguments[n]:{};n%2?ve(e=Xy(Object(r),!0)).call(e,function(a){Eu(i,a,r[a])}):Fr?$u(i,Fr(r)):ve(t=Xy(Object(r))).call(t,function(a){wu(i,a,jr(r,a))})}return i}function mJ(i){var n=bJ();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function bJ(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var $J=function(i){se(e,i);var n=mJ(e);function e(t,r,a,o){var s;return D(this,e),s=n.call(this,t,r,a,o),s.ctxRenderer=o,s}return R(e,[{key:"draw",value:function(r,a,o,s,u,l){this.resize(r,s,u,l),this.left=a-this.width/2,this.top=o-this.height/2,r.save();var h=this.ctxRenderer({ctx:r,id:this.options.id,x:a,y:o,state:{selected:s,hover:u},style:yJ({},l),label:this.options.label});if(h.drawNode!=null&&h.drawNode(),r.restore(),h.drawExternalLabel){var d=h.drawExternalLabel;h.drawExternalLabel=function(){r.save(),d(),r.restore()}}return h.nodeDimensions&&(this.customSizeWidth=h.nodeDimensions.width,this.customSizeHeight=h.nodeDimensions.height),h}},{key:"distanceToBorder",value:function(r,a){return this._distanceToBorder(r,a)}}]),e}(Hr);function wJ(i){var n=_J();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function _J(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var EJ=function(i){se(e,i);var n=wJ(e);function e(t,r,a){var o;return D(this,e),o=n.call(this,t,r,a),o._setMargins(a),o}return R(e,[{key:"resize",value:function(r,a,o){if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(r,a,o),u=s.width+this.margin.right+this.margin.left;this.width=u,this.height=u,this.radius=this.width/2}}},{key:"draw",value:function(r,a,o,s,u,l){this.resize(r,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(r,l),A1(r,a-this.width/2,o-this.height/2,this.width,this.height),this.performFill(r,l),this.updateBoundingBox(a,o,r,s,u),this.labelModule.draw(r,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,u)}},{key:"distanceToBorder",value:function(r,a){return this._distanceToBorder(r,a)}}]),e}(Ti);function SJ(i){var n=OJ();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function OJ(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var TJ=function(i){se(e,i);var n=SJ(e);function e(t,r,a){return D(this,e),n.call(this,t,r,a)}return R(e,[{key:"draw",value:function(r,a,o,s,u,l){return this._drawShape(r,"diamond",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(r,a){return this._distanceToBorder(r,a)}}]),e}(Hr);function kJ(i){var n=IJ();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function IJ(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var PJ=function(i){se(e,i);var n=kJ(e);function e(t,r,a){return D(this,e),n.call(this,t,r,a)}return R(e,[{key:"draw",value:function(r,a,o,s,u,l){return this._drawShape(r,"circle",2,a,o,s,u,l)}},{key:"distanceToBorder",value:function(r){return r&&this.resize(r),this.options.size}}]),e}(Hr);function CJ(i){var n=AJ();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function AJ(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Qy=function(i){se(e,i);var n=CJ(e);function e(t,r,a){return D(this,e),n.call(this,t,r,a)}return R(e,[{key:"resize",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(r,a,o);this.height=s.height*2,this.width=s.width+s.height,this.radius=.5*this.width}}},{key:"draw",value:function(r,a,o,s,u,l){this.resize(r,s,u),this.left=a-this.width*.5,this.top=o-this.height*.5,this.initContextForDraw(r,l),td(r,this.left,this.top,this.width,this.height),this.performFill(r,l),this.updateBoundingBox(a,o,r,s,u),this.labelModule.draw(r,a,o,s,u)}},{key:"distanceToBorder",value:function(r,a){r&&this.resize(r);var o=this.width*.5,s=this.height*.5,u=Math.sin(a)*o,l=Math.cos(a)*s;return o*s/Math.sqrt(u*u+l*l)}}]),e}(Ti);function xJ(i){var n=MJ();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function MJ(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var DJ=function(i){se(e,i);var n=xJ(e);function e(t,r,a){var o;return D(this,e),o=n.call(this,t,r,a),o._setMargins(a),o}return R(e,[{key:"resize",value:function(r,a,o){this.needsRefresh(a,o)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(r,a,o,s,u,l){var h=this;return this.resize(r,s,u),this.options.icon.size=this.options.icon.size||50,this.left=a-this.width/2,this.top=o-this.height/2,this._icon(r,a,o,s,u,l),{drawExternalLabel:function(){if(h.options.label!==void 0){var f=5;h.labelModule.draw(r,h.left+h.iconSize.width/2+h.margin.left,o+h.height/2+f,s)}h.updateBoundingBox(a,o)}}}},{key:"updateBoundingBox",value:function(r,a){if(this.boundingBox.top=a-this.options.icon.size*.5,this.boundingBox.left=r-this.options.icon.size*.5,this.boundingBox.right=r+this.options.icon.size*.5,this.boundingBox.bottom=a+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0){var o=5;this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+o)}}},{key:"_icon",value:function(r,a,o,s,u,l){var h=Number(this.options.icon.size);this.options.icon.code!==void 0?(r.font=[this.options.icon.weight!=null?this.options.icon.weight:s?"bold":"",(this.options.icon.weight!=null&&s?5:0)+h+"px",this.options.icon.face].join(" "),r.fillStyle=this.options.icon.color||"black",r.textAlign="center",r.textBaseline="middle",this.enableShadow(r,l),r.fillText(this.options.icon.code,a,o),this.disableShadow(r,l)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(r,a){return this._distanceToBorder(r,a)}}]),e}(Ti);function RJ(i){var n=FJ();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function FJ(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var NJ=function(i){se(e,i);var n=RJ(e);function e(t,r,a,o,s){var u;return D(this,e),u=n.call(this,t,r,a),u.setImages(o,s),u}return R(e,[{key:"resize",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,s=this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0;if(s){var u=this.options.size*2;this.width=u,this.height=u;return}this.needsRefresh(a,o)&&this._resizeImage()}},{key:"draw",value:function(r,a,o,s,u,l){r.save(),this.switchImages(s),this.resize();var h=a,d=o;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,h+=this.width/2,d+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){var f=this.options.borderWidth,c=this.options.borderWidthSelected||2*this.options.borderWidth,v=(s?c:f)/this.body.view.scale;r.lineWidth=Math.min(this.width,v),r.beginPath();var g=s?this.options.color.highlight.border:u?this.options.color.hover.border:this.options.color.border,b=s?this.options.color.highlight.background:u?this.options.color.hover.background:this.options.color.background;l.opacity!==void 0&&(g=Et(g,l.opacity),b=Et(b,l.opacity)),r.strokeStyle=g,r.fillStyle=b,r.rect(this.left-.5*r.lineWidth,this.top-.5*r.lineWidth,this.width+r.lineWidth,this.height+r.lineWidth),to(r).call(r),this.performStroke(r,l),r.closePath()}this._drawImageAtPosition(r,l),this._drawImageLabel(r,h,d,s,u),this.updateBoundingBox(a,o),r.restore()}},{key:"updateBoundingBox",value:function(r,a){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=r,this.top=a):(this.left=r-this.width/2,this.top=a-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(r,a){return this._distanceToBorder(r,a)}}]),e}(rc);function BJ(i){var n=LJ();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function LJ(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var zJ=function(i){se(e,i);var n=BJ(e);function e(t,r,a){return D(this,e),n.call(this,t,r,a)}return R(e,[{key:"draw",value:function(r,a,o,s,u,l){return this._drawShape(r,"square",2,a,o,s,u,l)}},{key:"distanceToBorder",value:function(r,a){return this._distanceToBorder(r,a)}}]),e}(Hr);function jJ(i){var n=HJ();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function HJ(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var WJ=function(i){se(e,i);var n=jJ(e);function e(t,r,a){return D(this,e),n.call(this,t,r,a)}return R(e,[{key:"draw",value:function(r,a,o,s,u,l){return this._drawShape(r,"hexagon",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(r,a){return this._distanceToBorder(r,a)}}]),e}(Hr);function VJ(i){var n=UJ();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function UJ(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var GJ=function(i){se(e,i);var n=VJ(e);function e(t,r,a){return D(this,e),n.call(this,t,r,a)}return R(e,[{key:"draw",value:function(r,a,o,s,u,l){return this._drawShape(r,"star",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(r,a){return this._distanceToBorder(r,a)}}]),e}(Hr);function KJ(i){var n=qJ();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function qJ(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var YJ=function(i){se(e,i);var n=KJ(e);function e(t,r,a){var o;return D(this,e),o=n.call(this,t,r,a),o._setMargins(a),o}return R(e,[{key:"resize",value:function(r,a,o){this.needsRefresh(a,o)&&(this.textSize=this.labelModule.getTextSize(r,a,o),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(r,a,o,s,u,l){this.resize(r,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this.enableShadow(r,l),this.labelModule.draw(r,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,u),this.disableShadow(r,l),this.updateBoundingBox(a,o,r,s,u)}},{key:"distanceToBorder",value:function(r,a){return this._distanceToBorder(r,a)}}]),e}(Ti);function XJ(i){var n=QJ();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function QJ(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var ZJ=function(i){se(e,i);var n=XJ(e);function e(t,r,a){return D(this,e),n.call(this,t,r,a)}return R(e,[{key:"draw",value:function(r,a,o,s,u,l){return this._drawShape(r,"triangle",3,a,o,s,u,l)}},{key:"distanceToBorder",value:function(r,a){return this._distanceToBorder(r,a)}}]),e}(Hr);function JJ(i){var n=eee();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function eee(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var tee=function(i){se(e,i);var n=JJ(e);function e(t,r,a){return D(this,e),n.call(this,t,r,a)}return R(e,[{key:"draw",value:function(r,a,o,s,u,l){return this._drawShape(r,"triangleDown",3,a,o,s,u,l)}},{key:"distanceToBorder",value:function(r,a){return this._distanceToBorder(r,a)}}]),e}(Hr);function Zy(i,n){var e=we(i);if(Rr){var t=Rr(i);n&&(t=ht(t).call(t,function(r){return jr(i,r).enumerable})),e.push.apply(e,t)}return e}function Jy(i){for(var n=1;n<arguments.length;n++){var e,t,r=arguments[n]!=null?arguments[n]:{};n%2?ve(e=Zy(Object(r),!0)).call(e,function(a){Eu(i,a,r[a])}):Fr?$u(i,Fr(r)):ve(t=Zy(Object(r))).call(t,function(a){wu(i,a,jr(r,a))})}return i}var vt=function(){function i(n,e,t,r,a,o){D(this,i),this.options=Dr(a),this.globalOptions=a,this.defaultOptions=o,this.body=e,this.edges=[],this.id=void 0,this.imagelist=t,this.grouplist=r,this.x=void 0,this.y=void 0,this.baseSize=this.options.size,this.baseFontSize=this.options.font.size,this.predefinedPosition=!1,this.selected=!1,this.hover=!1,this.labelModule=new Vw(this.body,this.options,!1),this.setOptions(n)}return R(i,[{key:"attachEdge",value:function(e){var t;ae(t=this.edges).call(t,e)===-1&&this.edges.push(e)}},{key:"detachEdge",value:function(e){var t,r=ae(t=this.edges).call(t,e);if(r!=-1){var a;or(a=this.edges).call(a,r,1)}}},{key:"setOptions",value:function(e){var t=this.options.shape;if(e){if(typeof e.color<"u"&&(this._localColor=e.color),e.id!==void 0&&(this.id=e.id),this.id===void 0)throw new Error("Node must have an id");i.checkMass(e,this.id),e.x!==void 0&&(e.x===null?(this.x=void 0,this.predefinedPosition=!1):(this.x=At(e.x),this.predefinedPosition=!0)),e.y!==void 0&&(e.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=At(e.y),this.predefinedPosition=!0)),e.size!==void 0&&(this.baseSize=e.size),e.value!==void 0&&(e.value=jw(e.value)),i.parseOptions(this.options,e,!0,this.globalOptions,this.grouplist);var r=[e,this.options,this.defaultOptions];return this.chooser=ec("node",r),this._load_images(),this.updateLabelModule(e),e.opacity!==void 0&&i.checkOpacity(e.opacity)&&(this.options.opacity=e.opacity),this.updateShape(t),e.hidden!==void 0||e.physics!==void 0}}},{key:"_load_images",value:function(){if((this.options.shape==="circularImage"||this.options.shape==="image")&&this.options.image===void 0)throw new Error("Option image must be defined for node type '"+this.options.shape+"'");if(this.options.image!==void 0){if(this.imagelist===void 0)throw new Error("Internal Error: No images provided");if(typeof this.options.image=="string")this.imageObj=this.imagelist.load(this.options.image,this.options.brokenImage,this.id);else{if(this.options.image.unselected===void 0)throw new Error("No unselected image provided");this.imageObj=this.imagelist.load(this.options.image.unselected,this.options.brokenImage,this.id),this.options.image.selected!==void 0?this.imageObjAlt=this.imagelist.load(this.options.image.selected,this.options.brokenImage,this.id):this.imageObjAlt=void 0}}}},{key:"getFormattingValues",value:function(){var e={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};if(this.selected||this.hover?this.chooser===!0?this.selected?(this.options.borderWidthSelected!=null?e.borderWidth=this.options.borderWidthSelected:e.borderWidth*=2,e.color=this.options.color.highlight.background,e.borderColor=this.options.color.highlight.border,e.shadow=this.options.shadow.enabled):this.hover&&(e.color=this.options.color.hover.background,e.borderColor=this.options.color.hover.border,e.shadow=this.options.shadow.enabled):typeof this.chooser=="function"&&(this.chooser(e,this.options.id,this.selected,this.hover),e.shadow===!1&&(e.shadowColor!==this.options.shadow.color||e.shadowSize!==this.options.shadow.size||e.shadowX!==this.options.shadow.x||e.shadowY!==this.options.shadow.y)&&(e.shadow=!0)):e.shadow=this.options.shadow.enabled,this.options.opacity!==void 0){var t=this.options.opacity;e.borderColor=Et(e.borderColor,t),e.color=Et(e.color,t),e.shadowColor=Et(e.shadowColor,t)}return e}},{key:"updateLabelModule",value:function(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),i.updateGroupOptions(this.options,Jy(Jy({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);var t=this.grouplist.get(this.options.group,!1),r=[e,this.options,t,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,r),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateShape",value:function(e){if(e===this.options.shape&&this.shape)this.shape.setOptions(this.options,this.imageObj,this.imageObjAlt);else switch(this.options.shape){case"box":this.shape=new oJ(this.options,this.body,this.labelModule);break;case"circle":this.shape=new dJ(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new vJ(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new $J(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new EJ(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new TJ(this.options,this.body,this.labelModule);break;case"dot":this.shape=new PJ(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new Qy(this.options,this.body,this.labelModule);break;case"icon":this.shape=new DJ(this.options,this.body,this.labelModule);break;case"image":this.shape=new NJ(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new zJ(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new WJ(this.options,this.body,this.labelModule);break;case"star":this.shape=new GJ(this.options,this.body,this.labelModule);break;case"text":this.shape=new YJ(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new ZJ(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new tee(this.options,this.body,this.labelModule);break;default:this.shape=new Qy(this.options,this.body,this.labelModule);break}this.needsRefresh()}},{key:"select",value:function(){this.selected=!0,this.needsRefresh()}},{key:"unselect",value:function(){this.selected=!1,this.needsRefresh()}},{key:"needsRefresh",value:function(){this.shape.refreshNeeded=!0}},{key:"getTitle",value:function(){return this.options.title}},{key:"distanceToBorder",value:function(e,t){return this.shape.distanceToBorder(e,t)}},{key:"isFixed",value:function(){return this.options.fixed.x&&this.options.fixed.y}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"getLabelSize",value:function(){return this.labelModule.size()}},{key:"setValueRange",value:function(e,t,r){if(this.options.value!==void 0){var a=this.options.scaling.customScalingFunction(e,t,r,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){var s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+a*s}this.options.size=this.options.scaling.min+a*o}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}},{key:"draw",value:function(e){var t=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,t)||{}}},{key:"updateBoundingBox",value:function(e){this.shape.updateBoundingBox(this.x,this.y,e)}},{key:"resize",value:function(e){var t=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,t)}},{key:"getItemsOnPoint",value:function(e){var t=[];return this.labelModule.visible()&&Pd(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),Pd(this.shape.boundingBox,e)&&t.push({nodeId:this.id}),t}},{key:"isOverlappingWith",value:function(e){return this.shape.left<e.right&&this.shape.left+this.shape.width>e.left&&this.shape.top<e.bottom&&this.shape.top+this.shape.height>e.top}},{key:"isBoundingBoxOverlappingWith",value:function(e){return this.shape.boundingBox.left<e.right&&this.shape.boundingBox.right>e.left&&this.shape.boundingBox.top<e.bottom&&this.shape.boundingBox.bottom>e.top}}],[{key:"checkOpacity",value:function(e){return 0<=e&&e<=1}},{key:"checkCoordinateOrigin",value:function(e){return e===void 0||e==="center"||e==="top-left"}},{key:"updateGroupOptions",value:function(e,t,r){var a;if(r!==void 0){var o=e.group;if(t!==void 0&&t.group!==void 0&&o!==t.group)throw new Error("updateGroupOptions: group values in options don't match.");var s=typeof o=="number"||typeof o=="string"&&o!="";if(s){var u=r.get(o);u.opacity!==void 0&&t.opacity===void 0&&(i.checkOpacity(u.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+u.opacity),u.opacity=void 0));var l=ht(a=uZ(t)).call(a,function(h){return t[h]!=null});l.push("font"),ws(l,e,u),e.color=Sd(e.color)}}}},{key:"parseOptions",value:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,s=["color","fixed","shadow"];if(ws(s,e,t,r),i.checkMass(t),e.opacity!==void 0&&(i.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),t.opacity!==void 0&&(i.checkOpacity(t.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity),t.opacity=void 0)),t.shapeProperties&&!i.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),_t(e,t,"shadow",a),t.color!==void 0&&t.color!==null){var u=Sd(t.color);_w(e.color,u)}else r===!0&&t.color===null&&(e.color=Dr(a.color));t.fixed!==void 0&&t.fixed!==null&&(typeof t.fixed=="boolean"?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(t.fixed.x!==void 0&&typeof t.fixed.x=="boolean"&&(e.fixed.x=t.fixed.x),t.fixed.y!==void 0&&typeof t.fixed.y=="boolean"&&(e.fixed.y=t.fixed.y))),r===!0&&t.font===null&&(e.font=Dr(a.font)),i.updateGroupOptions(e,t,o),t.scaling!==void 0&&_t(e.scaling,t.scaling,"label",a.scaling)}},{key:"checkMass",value:function(e,t){if(e.mass!==void 0&&e.mass<=0){var r="";t!==void 0&&(r=" in node id: "+t),console.error("%cNegative or zero mass disallowed"+r+", setting mass to 1.",Tw),e.mass=1}}}]),i}();function ree(i,n){var e=typeof yr<"u"&&Qt(i)||i["@@iterator"];if(!e){if(ue(i)||(e=iee(i))||n&&i&&typeof i.length=="number"){e&&(i=e);var t=0,r=function(){};return{s:r,n:function(){return t>=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
94
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function iee(i,n){var e;if(i){if(typeof i=="string")return em(i,n);var t=Be(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Lr(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return em(i,n)}}function em(i,n){(n==null||n>i.length)&&(n=i.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=i[e];return t}var nee=function(){function i(n,e,t,r){var a,o=this;if(D(this,i),this.body=n,this.images=e,this.groups=t,this.layoutEngine=r,this.body.functions.createNode=x(a=this.create).call(a,this),this.nodesListeners={add:function(u,l){o.add(l.items)},update:function(u,l){o.update(l.items,l.data,l.oldData)},remove:function(u,l){o.remove(l.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:void 0,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},opacity:void 0,fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,imagePadding:{top:0,right:0,bottom:0,left:0},label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(u,l,h,d){if(l===u)return .5;var f=1/(l-u);return Math.max(0,(d-u)*f)}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1,coordinateOrigin:"center"},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=Dr(this.defaultOptions),this.bindEventListeners()}return R(i,[{key:"bindEventListeners",value:function(){var e,t,r=this;this.body.emitter.on("refreshNodes",x(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",x(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",function(){ee(r.nodesListeners,function(a,o){r.body.data.nodes&&r.body.data.nodes.off(o,a)}),delete r.body.functions.createNode,delete r.nodesListeners.add,delete r.nodesListeners.update,delete r.nodesListeners.remove,delete r.nodesListeners})}},{key:"setOptions",value:function(e){if(e!==void 0){if(vt.parseOptions(this.options,e),e.opacity!==void 0&&(Id(e.opacity)||!Zr(e.opacity)||e.opacity<0||e.opacity>1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity):this.options.opacity=e.opacity),e.shape!==void 0)for(var t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(var r=0,a=we(this.body.nodes);r<a.length;r++){var o=a[r];this.body.nodes[o].updateLabelModule(),this.body.nodes[o].needsRefresh()}if(e.size!==void 0)for(var s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&this.body.nodes[s].needsRefresh();(e.hidden!==void 0||e.physics!==void 0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.body.data.nodes;if(f1("id",e))this.body.data.nodes=e;else if(ue(e))this.body.data.nodes=new ds,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new ds;else throw new TypeError("Array or DataSet expected");if(r&&ee(this.nodesListeners,function(s,u){r.off(u,s)}),this.body.nodes={},this.body.data.nodes){var a=this;ee(this.nodesListeners,function(s,u){a.body.data.nodes.on(u,s)});var o=this.body.data.nodes.getIds();this.add(o,!0)}t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r,a=[],o=0;o<e.length;o++){r=e[o];var s=this.body.data.nodes.get(r),u=this.create(s);a.push(u),this.body.nodes[r]=u}this.layoutEngine.positionInitially(a),t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(e,t,r){for(var a=this.body.nodes,o=!1,s=0;s<e.length;s++){var u=e[s],l=a[u],h=t[s];l!==void 0?l.setOptions(h)&&(o=!0):(o=!0,l=this.create(h),a[u]=l)}!o&&r!==void 0&&(o=LQ(t).call(t,function(d,f){var c=r[f];return c&&c.level!==d.level})),o===!0?this.body.emitter.emit("_dataChanged"):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(e){for(var t=this.body.nodes,r=0;r<e.length;r++){var a=e[r];delete t[a]}this.body.emitter.emit("_dataChanged")}},{key:"create",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vt;return new t(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;ee(this.body.nodes,function(r,a){var o=e.body.data.nodes.get(a);o!==void 0&&(t===!0&&r.setOptions({x:null,y:null}),r.setOptions({fixed:!1}),r.setOptions(o))})}},{key:"getPositions",value:function(e){var t={};if(e!==void 0){if(ue(e)===!0){for(var r=0;r<e.length;r++)if(this.body.nodes[e[r]]!==void 0){var a=this.body.nodes[e[r]];t[e[r]]={x:Math.round(a.x),y:Math.round(a.y)}}}else if(this.body.nodes[e]!==void 0){var o=this.body.nodes[e];t[e]={x:Math.round(o.x),y:Math.round(o.y)}}}else for(var s=0;s<this.body.nodeIndices.length;s++){var u=this.body.nodes[this.body.nodeIndices[s]];t[this.body.nodeIndices[s]]={x:Math.round(u.x),y:Math.round(u.y)}}return t}},{key:"getPosition",value:function(e){if(e==null)throw new TypeError("No id was specified for getPosition method.");if(this.body.nodes[e]==null)throw new ReferenceError("NodeId provided for getPosition does not exist. Provided: ".concat(e));return{x:Math.round(this.body.nodes[e].x),y:Math.round(this.body.nodes[e].y)}}},{key:"storePositions",value:function(){var e=[],t=this.body.data.nodes.getDataSet(),r=ree(t.get()),a;try{for(r.s();!(a=r.n()).done;){var o=a.value,s=o.id,u=this.body.nodes[s],l=Math.round(u.x),h=Math.round(u.y);(o.x!==l||o.y!==h)&&e.push({id:s,x:l,y:h})}}catch(d){r.e(d)}finally{r.f()}t.update(e)}},{key:"getBoundingBox",value:function(e){if(this.body.nodes[e]!==void 0)return this.body.nodes[e].shape.boundingBox}},{key:"getConnectedNodes",value:function(e,t){var r=[];if(this.body.nodes[e]!==void 0)for(var a=this.body.nodes[e],o={},s=0;s<a.edges.length;s++){var u=a.edges[s];t!=="to"&&u.toId==a.id?o[u.fromId]===void 0&&(r.push(u.fromId),o[u.fromId]=!0):t!=="from"&&u.fromId==a.id&&o[u.toId]===void 0&&(r.push(u.toId),o[u.toId]=!0)}return r}},{key:"getConnectedEdges",value:function(e){var t=[];if(this.body.nodes[e]!==void 0)for(var r=this.body.nodes[e],a=0;a<r.edges.length;a++)t.push(r.edges[a].id);else console.error("NodeId provided for getConnectedEdges does not exist. Provided: ",e);return t}},{key:"moveNode",value:function(e,t,r){var a=this;this.body.nodes[e]!==void 0?(this.body.nodes[e].x=Number(t),this.body.nodes[e].y=Number(r),qt(function(){a.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}]),i}(),tm=Xe,aee=function(i){return i!==void 0&&(tm(i,"value")||tm(i,"writable"))},oee=Y,see=Bt,uee=He,lee=$t,hee=aee,dee=gn,fee=hu;function Yw(i,n){var e=arguments.length<3?i:arguments[2],t,r;if(lee(i)===e)return i[n];if(t=dee.f(i,n),t)return hee(t)?t.value:t.get===void 0?void 0:see(t.get,e);if(uee(r=fee(i)))return Yw(r,n,e)}oee({target:"Reflect",stat:!0},{get:Yw});var cee=re,vee=cee.Reflect.get,pee=vee,gee=pee,yee=gee,mee=yee,bee=mee,$ee=bee,rm=$ee,wee=C0,_ee=wee,Eee=_ee,See=Eee,Oee=See;function Tee(i,n){for(;!Object.prototype.hasOwnProperty.call(i,n)&&(i=L(i),i!==null););return i}function Zo(){return typeof Reflect<"u"&&rm?Zo=rm:Zo=function(n,e,t){var r=Tee(n,e);if(r){var a=Oee(r,e);return a.get?a.get.call(arguments.length<3?n:t):a.value}},Zo.apply(this,arguments)}var kee=Y,im=Math.hypot,Iee=Math.abs,Pee=Math.sqrt,Cee=!!im&&im(1/0,NaN)!==1/0;kee({target:"Math",stat:!0,forced:Cee},{hypot:function(n,e){for(var t=0,r=0,a=arguments.length,o=0,s,u;r<a;)s=Iee(arguments[r++]),o<s?(u=o/s,t=t*u*u+1,o=s):s>0?(u=s/o,t+=u*u):t+=s;return o===1/0?1/0:o*Pee(t)}});var Aee=re,xee=Aee.Math.hypot,Mee=xee,Dee=Mee,Ree=Dee;function Xw(i){var n=Fee();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function Fee(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Se=function(){function i(){D(this,i)}return R(i,null,[{key:"transform",value:function(e,t){ue(e)||(e=[e]);for(var r=t.point.x,a=t.point.y,o=t.angle,s=t.length,u=0;u<e.length;++u){var l=e[u],h=l.x*Math.cos(o)-l.y*Math.sin(o),d=l.x*Math.sin(o)+l.y*Math.cos(o);l.x=r+s*h,l.y=a+s*d}}},{key:"drawPath",value:function(e,t){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var r=1;r<t.length;++r)e.lineTo(t[r].x,t[r].y);e.closePath()}}]),i}(),Nee=function(i){se(e,i);var n=Xw(e);function e(){return D(this,e),n.apply(this,arguments)}return R(e,null,[{key:"draw",value:function(r,a){if(a.image){r.save(),r.translate(a.point.x,a.point.y),r.rotate(Math.PI/2+a.angle);var o=a.imageWidth!=null?a.imageWidth:a.image.width,s=a.imageHeight!=null?a.imageHeight:a.image.height;a.image.drawImageAtPosition(r,1,-o/2,0,o,s),r.restore()}return!1}}]),e}(Se),Bee=function(i){se(e,i);var n=Xw(e);function e(){return D(this,e),n.apply(this,arguments)}return R(e,null,[{key:"draw",value:function(r,a){var o=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return Se.transform(o,a),Se.drawPath(r,o),!0}}]),e}(Se),Lee=function(){function i(){D(this,i)}return R(i,null,[{key:"draw",value:function(e,t){var r=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return Se.transform(r,t),Se.drawPath(e,r),!0}}]),i}(),zee=function(){function i(){D(this,i)}return R(i,null,[{key:"draw",value:function(e,t){var r={x:-.4,y:0};Se.transform(r,t),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";var a=Math.PI,o=t.angle-a/2,s=t.angle+a/2;return e.beginPath(),e.arc(r.x,r.y,t.length*.4,o,s,!1),e.stroke(),!0}}]),i}(),jee=function(){function i(){D(this,i)}return R(i,null,[{key:"draw",value:function(e,t){var r={x:-.3,y:0};Se.transform(r,t),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";var a=Math.PI,o=t.angle+a/2,s=t.angle+3*a/2;return e.beginPath(),e.arc(r.x,r.y,t.length*.4,o,s,!1),e.stroke(),!0}}]),i}(),Hee=function(){function i(){D(this,i)}return R(i,null,[{key:"draw",value:function(e,t){var r=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return Se.transform(r,t),Se.drawPath(e,r),!0}}]),i}(),Wee=function(){function i(){D(this,i)}return R(i,null,[{key:"draw",value:function(e,t){var r=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return Se.transform(r,t),Se.drawPath(e,r),!0}}]),i}(),Vee=function(){function i(){D(this,i)}return R(i,null,[{key:"draw",value:function(e,t){var r={x:-.4,y:0};return Se.transform(r,t),Ef(e,r.x,r.y,t.length*.4),!0}}]),i}(),Uee=function(){function i(){D(this,i)}return R(i,null,[{key:"draw",value:function(e,t){var r=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return Se.transform(r,t),Se.drawPath(e,r),!0}}]),i}(),Gee=function(){function i(){D(this,i)}return R(i,null,[{key:"draw",value:function(e,t){var r=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return Se.transform(r,t),Se.drawPath(e,r),!0}}]),i}(),Kee=function(){function i(){D(this,i)}return R(i,null,[{key:"draw",value:function(e,t){var r=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return Se.transform(r,t),Se.drawPath(e,r),!0}}]),i}(),qee=function(){function i(){D(this,i)}return R(i,null,[{key:"draw",value:function(e,t){var r=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return Se.transform(r,t),Se.drawPath(e,r),!0}}]),i}(),Qw=function(){function i(){D(this,i)}return R(i,null,[{key:"draw",value:function(e,t){var r;switch(t.type&&(r=t.type.toLowerCase()),r){case"image":return Nee.draw(e,t);case"circle":return Vee.draw(e,t);case"box":return Gee.draw(e,t);case"crow":return Lee.draw(e,t);case"curve":return zee.draw(e,t);case"diamond":return Kee.draw(e,t);case"inv_curve":return jee.draw(e,t);case"triangle":return Hee.draw(e,t);case"inv_triangle":return Wee.draw(e,t);case"bar":return Uee.draw(e,t);case"vee":return qee.draw(e,t);case"arrow":default:return Bee.draw(e,t)}}}]),i}();function nm(i,n){var e=we(i);if(Rr){var t=Rr(i);n&&(t=ht(t).call(t,function(r){return jr(i,r).enumerable})),e.push.apply(e,t)}return e}function am(i){for(var n=1;n<arguments.length;n++){var e,t,r=arguments[n]!=null?arguments[n]:{};n%2?ve(e=nm(Object(r),!0)).call(e,function(a){Eu(i,a,r[a])}):Fr?$u(i,Fr(r)):ve(t=nm(Object(r))).call(t,function(a){wu(i,a,jr(r,a))})}return i}var Zw=function(){function i(n,e,t){D(this,i),this._body=e,this._labelModule=t,this.color={},this.colorDirty=!0,this.hoverWidth=1.5,this.selectionWidth=2,this.setOptions(n),this.fromPoint=this.from,this.toPoint=this.to}return R(i,[{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to]}},{key:"cleanup",value:function(){return!1}},{key:"setOptions",value:function(e){this.options=e,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.id=this.options.id}},{key:"drawLine",value:function(e,t,r,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,t.dashes!==!1?this._drawDashedLine(e,t,o):this._drawLine(e,t,o)}},{key:"_drawLine",value:function(e,t,r,a,o){if(this.from!=this.to)this._line(e,t,r,a,o);else{var s=this._getCircleData(e),u=_e(s,3),l=u[0],h=u[1],d=u[2];this._circle(e,t,l,h,d)}}},{key:"_drawDashedLine",value:function(e,t,r,a,o){e.lineCap="round";var s=ue(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(s),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,r);else{var u=this._getCircleData(e),l=_e(u,3),h=l[0],d=l[1],f=l[2];this._circle(e,t,h,d,f)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)x1(e,this.from.x,this.from.y,this.to.x,this.to.y,s);else{var c=this._getCircleData(e),v=_e(c,3),g=v[0],b=v[1],p=v[2];this._circle(e,t,g,b,p)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}},{key:"findBorderPosition",value:function(e,t,r){return this.from!=this.to?this._findBorderPosition(e,t,r):this._findBorderPositionCircle(e,t,r)}},{key:"findBorderPositions",value:function(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};var t,r=Be(t=this._getCircleData(e)).call(t,0,2),a=_e(r,2),o=a[0],s=a[1];return{from:this._findBorderPositionCircle(this.from,e,{x:o,y:s,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:o,y:s,low:.6,high:.8,direction:1})}}},{key:"_getCircleData",value:function(e){var t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);var r=Hw(e,this.options.selfReference.angle,t,this.from);return[r.x,r.y,t]}},{key:"_pointOnCircle",value:function(e,t,r,a){var o=a*2*Math.PI;return{x:e+r*Math.cos(o),y:t-r*Math.sin(o)}}},{key:"_findBorderPositionCircle",value:function(e,t,r){var a=r.x,o=r.y,s=r.low,u=r.high,l=r.direction,h=10,d=this.options.selfReference.size,f=.05,c,v=(s+u)*.5,g=0;this.options.arrowStrikethrough===!0&&(l===-1?g=this.options.endPointOffset.from:l===1&&(g=this.options.endPointOffset.to));var b=0;do{v=(s+u)*.5,c=this._pointOnCircle(a,o,d,v);var p=Math.atan2(e.y-c.y,e.x-c.x),$=e.distanceToBorder(t,p)+g,y=Math.sqrt(Math.pow(c.x-e.x,2)+Math.pow(c.y-e.y,2)),m=$-y;if(Math.abs(m)<f)break;m>0?l>0?s=v:u=v:l>0?u=v:s=v,++b}while(s<=u&&b<h);return am(am({},c),{},{t:v})}},{key:"getLineWidth",value:function(e,t){return e===!0?Math.max(this.selectionWidth,.3/this._body.view.scale):t===!0?Math.max(this.hoverWidth,.3/this._body.view.scale):Math.max(this.options.width,.3/this._body.view.scale)}},{key:"getColor",value:function(e,t){if(t.inheritsColor!==!1){if(t.inheritsColor==="both"&&this.from.id!==this.to.id){var r=e.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),a=this.from.options.color.highlight.border,o=this.to.options.color.highlight.border;return this.from.selected===!1&&this.to.selected===!1?(a=Et(this.from.options.color.border,t.opacity),o=Et(this.to.options.color.border,t.opacity)):this.from.selected===!0&&this.to.selected===!1?o=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(a=this.from.options.color.border),r.addColorStop(0,a),r.addColorStop(1,o),r}return t.inheritsColor==="to"?Et(this.to.options.color.border,t.opacity):Et(this.from.options.color.border,t.opacity)}else return Et(t.color,t.opacity)}},{key:"_circle",value:function(e,t,r,a,o){this.enableShadow(e,t);var s=0,u=Math.PI*2;if(!this.options.selfReference.renderBehindTheNode){var l=this.options.selfReference.angle,h=this.options.selfReference.angle+Math.PI,d=this._findBorderPositionCircle(this.from,e,{x:r,y:a,low:l,high:h,direction:-1}),f=this._findBorderPositionCircle(this.from,e,{x:r,y:a,low:l,high:h,direction:1});s=Math.atan2(d.y-a,d.x-r),u=Math.atan2(f.y-a,f.x-r)}e.beginPath(),e.arc(r,a,o,s,u,!1),e.stroke(),this.disableShadow(e,t)}},{key:"getDistanceToEdge",value:function(e,t,r,a,o,s){if(this.from!=this.to)return this._getDistanceToEdge(e,t,r,a,o,s);var u=this._getCircleData(void 0),l=_e(u,3),h=l[0],d=l[1],f=l[2],c=h-o,v=d-s;return Math.abs(Math.sqrt(c*c+v*v)-f)}},{key:"_getDistanceToLine",value:function(e,t,r,a,o,s){var u=r-e,l=a-t,h=u*u+l*l,d=((o-e)*u+(s-t)*l)/h;d>1?d=1:d<0&&(d=0);var f=e+d*u,c=t+d*l,v=f-o,g=c-s;return Math.sqrt(v*v+g*g)}},{key:"getArrowData",value:function(e,t,r,a,o,s){var u,l,h,d,f,c,v,g=s.width;t==="from"?(h=this.from,d=this.to,f=s.fromArrowScale<0,c=Math.abs(s.fromArrowScale),v=s.fromArrowType):t==="to"?(h=this.to,d=this.from,f=s.toArrowScale<0,c=Math.abs(s.toArrowScale),v=s.toArrowType):(h=this.to,d=this.from,f=s.middleArrowScale<0,c=Math.abs(s.middleArrowScale),v=s.middleArrowType);var b=15*c+3*g;if(h!=d){var p=Ree(h.x-d.x,h.y-d.y),$=b/p;if(t!=="middle")if(this.options.smooth.enabled===!0){var y=this._findBorderPosition(h,e,{via:r}),m=this.getPoint(y.t+$*(t==="from"?1:-1),r);u=Math.atan2(y.y-m.y,y.x-m.x),l=y}else u=Math.atan2(h.y-d.y,h.x-d.x),l=this._findBorderPosition(h,e);else{var _=(f?-$:$)/2,O=this.getPoint(.5+_,r),k=this.getPoint(.5-_,r);u=Math.atan2(O.y-k.y,O.x-k.x),l=this.getPoint(.5,r)}}else{var S=this._getCircleData(e),w=_e(S,3),E=w[0],F=w[1],H=w[2];if(t==="from"){var z=this.options.selfReference.angle,K=this.options.selfReference.angle+Math.PI,X=this._findBorderPositionCircle(this.from,e,{x:E,y:F,low:z,high:K,direction:-1});u=X.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,l=X}else if(t==="to"){var te=this.options.selfReference.angle,ne=this.options.selfReference.angle+Math.PI,C=this._findBorderPositionCircle(this.from,e,{x:E,y:F,low:te,high:ne,direction:1});u=C.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,l=C}else{var I=this.options.selfReference.angle/(2*Math.PI);l=this._pointOnCircle(E,F,H,I),u=I*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}var N=l.x-b*.9*Math.cos(u),V=l.y-b*.9*Math.sin(u),B={x:N,y:V};return{point:l,core:B,angle:u,length:b,type:v}}},{key:"drawArrowHead",value:function(e,t,r,a,o){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width;var s=Qw.draw(e,o);s&&(this.enableShadow(e,t),to(e).call(e),this.disableShadow(e,t))}},{key:"enableShadow",value:function(e,t){t.shadow===!0&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}},{key:"disableShadow",value:function(e,t){t.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"drawBackground",value:function(e,t){if(t.background!==!1){var r={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=r.strokeStyle,e.lineWidth=r.lineWidth,e.dashes=r.dashes,this.setStrokeDashed(e,t.dashes)}}},{key:"setStrokeDashed",value:function(e,t){if(t!==!1)if(e.setLineDash!==void 0){var r=ue(t)?t:[5,5];e.setLineDash(r)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}]),i}();function om(i,n){var e=we(i);if(Rr){var t=Rr(i);n&&(t=ht(t).call(t,function(r){return jr(i,r).enumerable})),e.push.apply(e,t)}return e}function sm(i){for(var n=1;n<arguments.length;n++){var e,t,r=arguments[n]!=null?arguments[n]:{};n%2?ve(e=om(Object(r),!0)).call(e,function(a){Eu(i,a,r[a])}):Fr?$u(i,Fr(r)):ve(t=om(Object(r))).call(t,function(a){wu(i,a,jr(r,a))})}return i}function Yee(i){var n=Xee();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function Xee(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var ic=function(i){se(e,i);var n=Yee(e);function e(t,r,a){return D(this,e),n.call(this,t,r,a)}return R(e,[{key:"_findBorderPositionBezier",value:function(r,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates(),s=10,u=.2,l=!1,h=1,d=0,f=this.to,c,v,g=this.options.endPointOffset?this.options.endPointOffset.to:0;r.id===this.from.id&&(f=this.from,l=!0,g=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(g=0);var b=0;do{v=(d+h)*.5,c=this.getPoint(v,o);var p=Math.atan2(f.y-c.y,f.x-c.x),$=f.distanceToBorder(a,p)+g,y=Math.sqrt(Math.pow(c.x-f.x,2)+Math.pow(c.y-f.y,2)),m=$-y;if(Math.abs(m)<u)break;m<0?l===!1?d=v:h=v:l===!1?h=v:d=v,++b}while(d<=h&&b<s);return sm(sm({},c),{},{t:v})}},{key:"_getDistanceToBezierEdge",value:function(r,a,o,s,u,l,h){var d=1e9,f,c,v,g,b,p=r,$=a;for(c=1;c<10;c++)v=.1*c,g=Math.pow(1-v,2)*r+2*v*(1-v)*h.x+Math.pow(v,2)*o,b=Math.pow(1-v,2)*a+2*v*(1-v)*h.y+Math.pow(v,2)*s,c>0&&(f=this._getDistanceToLine(p,$,g,b,u,l),d=f<d?f:d),p=g,$=b;return d}},{key:"_bezierCurve",value:function(r,a,o,s){r.beginPath(),r.moveTo(this.fromPoint.x,this.fromPoint.y),o!=null&&o.x!=null?s!=null&&s.x!=null?r.bezierCurveTo(o.x,o.y,s.x,s.y,this.toPoint.x,this.toPoint.y):r.quadraticCurveTo(o.x,o.y,this.toPoint.x,this.toPoint.y):r.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(r,a),this.enableShadow(r,a),r.stroke(),this.disableShadow(r,a)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}}]),e}(Zw);function Qee(i){var n=Zee();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function Zee(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var um=function(i){se(e,i);var n=Qee(e);function e(t,r,a){var o;return D(this,e),o=n.call(this,t,r,a),o.via=o.via,o._boundFunction=function(){o.positionBezierNode()},o._body.emitter.on("_repositionBezierNodes",o._boundFunction),o}return R(e,[{key:"setOptions",value:function(r){Zo(L(e.prototype),"setOptions",this).call(this,r);var a=!1;this.options.physics!==r.physics&&(a=!0),this.options=r,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),a===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}},{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}},{key:"cleanup",value:function(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}},{key:"setupSupportNode",value:function(){if(this.via===void 0){var r="edgeId:"+this.id,a=this._body.functions.createNode({id:r,shape:"circle",physics:!0,hidden:!0});this._body.nodes[r]=a,this.via=a,this.via.parentEdgeId=this.id,this.positionBezierNode()}}},{key:"positionBezierNode",value:function(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}},{key:"_line",value:function(r,a,o){this._bezierCurve(r,a,o)}},{key:"_getViaCoordinates",value:function(){return this.via}},{key:"getViaNode",value:function(){return this.via}},{key:"getPoint",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){var o=this._getCircleData(),s=_e(o,3),u=s[0],l=s[1],h=s[2],d=2*Math.PI*(1-r);return{x:u+h*Math.sin(d),y:l+h-h*(1-Math.cos(d))}}else return{x:Math.pow(1-r,2)*this.fromPoint.x+2*r*(1-r)*a.x+Math.pow(r,2)*this.toPoint.x,y:Math.pow(1-r,2)*this.fromPoint.y+2*r*(1-r)*a.y+Math.pow(r,2)*this.toPoint.y}}},{key:"_findBorderPosition",value:function(r,a){return this._findBorderPositionBezier(r,a,this.via)}},{key:"_getDistanceToEdge",value:function(r,a,o,s,u,l){return this._getDistanceToBezierEdge(r,a,o,s,u,l,this.via)}}]),e}(ic);function Jee(i){var n=ete();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function ete(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var lm=function(i){se(e,i);var n=Jee(e);function e(t,r,a){return D(this,e),n.call(this,t,r,a)}return R(e,[{key:"_line",value:function(r,a,o){this._bezierCurve(r,a,o)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var r=this.options.smooth.roundness,a=this.options.smooth.type,o=Math.abs(this.from.x-this.to.x),s=Math.abs(this.from.y-this.to.y);if(a==="discrete"||a==="diagonalCross"){var u,l;o<=s?u=l=r*s:u=l=r*o,this.from.x>this.to.x&&(u=-u),this.from.y>=this.to.y&&(l=-l);var h=this.from.x+u,d=this.from.y+l;return a==="discrete"&&(o<=s?h=o<r*s?this.from.x:h:d=s<r*o?this.from.y:d),{x:h,y:d}}else if(a==="straightCross"){var f=(1-r)*o,c=(1-r)*s;return o<=s?(f=0,this.from.y<this.to.y&&(c=-c)):(this.from.x<this.to.x&&(f=-f),c=0),{x:this.to.x+f,y:this.to.y+c}}else if(a==="horizontal"){var v=(1-r)*o;return this.from.x<this.to.x&&(v=-v),{x:this.to.x+v,y:this.from.y}}else if(a==="vertical"){var g=(1-r)*s;return this.from.y<this.to.y&&(g=-g),{x:this.from.x,y:this.to.y+g}}else if(a==="curvedCW"){o=this.to.x-this.from.x,s=this.from.y-this.to.y;var b=Math.sqrt(o*o+s*s),p=Math.PI,$=Math.atan2(s,o),y=($+(r*.5+.5)*p)%(2*p);return{x:this.from.x+(r*.5+.5)*b*Math.sin(y),y:this.from.y+(r*.5+.5)*b*Math.cos(y)}}else if(a==="curvedCCW"){o=this.to.x-this.from.x,s=this.from.y-this.to.y;var m=Math.sqrt(o*o+s*s),_=Math.PI,O=Math.atan2(s,o),k=(O+(-r*.5+.5)*_)%(2*_);return{x:this.from.x+(r*.5+.5)*m*Math.sin(k),y:this.from.y+(r*.5+.5)*m*Math.cos(k)}}else{var S,w;o<=s?S=w=r*s:S=w=r*o,this.from.x>this.to.x&&(S=-S),this.from.y>=this.to.y&&(w=-w);var E=this.from.x+S,F=this.from.y+w;return o<=s?this.from.x<=this.to.x?E=this.to.x<E?this.to.x:E:E=this.to.x>E?this.to.x:E:this.from.y>=this.to.y?F=this.to.y>F?this.to.y:F:F=this.to.y<F?this.to.y:F,{x:E,y:F}}}},{key:"_findBorderPosition",value:function(r,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(r,a,o.via)}},{key:"_getDistanceToEdge",value:function(r,a,o,s,u,l){var h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(r,a,o,s,u,l,h)}},{key:"getPoint",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=r,s=Math.pow(1-o,2)*this.fromPoint.x+2*o*(1-o)*a.x+Math.pow(o,2)*this.toPoint.x,u=Math.pow(1-o,2)*this.fromPoint.y+2*o*(1-o)*a.y+Math.pow(o,2)*this.toPoint.y;return{x:s,y:u}}}]),e}(ic);function tte(i){var n=rte();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function rte(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var ite=function(i){se(e,i);var n=tte(e);function e(t,r,a){return D(this,e),n.call(this,t,r,a)}return R(e,[{key:"_getDistanceToBezierEdge2",value:function(r,a,o,s,u,l,h,d){for(var f=1e9,c=r,v=a,g=[0,0,0,0],b=1;b<10;b++){var p=.1*b;g[0]=Math.pow(1-p,3),g[1]=3*p*Math.pow(1-p,2),g[2]=3*Math.pow(p,2)*(1-p),g[3]=Math.pow(p,3);var $=g[0]*r+g[1]*h.x+g[2]*d.x+g[3]*o,y=g[0]*a+g[1]*h.y+g[2]*d.y+g[3]*s;if(b>0){var m=this._getDistanceToLine(c,v,$,y,u,l);f=m<f?m:f}c=$,v=y}return f}}]),e}(ic);function nte(i){var n=ate();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function ate(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var hm=function(i){se(e,i);var n=nte(e);function e(t,r,a){return D(this,e),n.call(this,t,r,a)}return R(e,[{key:"_line",value:function(r,a,o){var s=o[0],u=o[1];this._bezierCurve(r,a,s,u)}},{key:"_getViaCoordinates",value:function(){var r=this.from.x-this.to.x,a=this.from.y-this.to.y,o,s,u,l,h=this.options.smooth.roundness;return(Math.abs(r)>Math.abs(a)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(s=this.from.y,l=this.to.y,o=this.from.x-h*r,u=this.to.x+h*r):(s=this.from.y-h*a,l=this.to.y+h*a,o=this.from.x,u=this.to.x),[{x:o,y:s},{x:u,y:l}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(r,a){return this._findBorderPositionBezier(r,a)}},{key:"_getDistanceToEdge",value:function(r,a,o,s,u,l){var h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates(),d=_e(h,2),f=d[0],c=d[1];return this._getDistanceToBezierEdge2(r,a,o,s,u,l,f,c)}},{key:"getPoint",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=_e(a,2),s=o[0],u=o[1],l=r,h=[Math.pow(1-l,3),3*l*Math.pow(1-l,2),3*Math.pow(l,2)*(1-l),Math.pow(l,3)],d=h[0]*this.fromPoint.x+h[1]*s.x+h[2]*u.x+h[3]*this.toPoint.x,f=h[0]*this.fromPoint.y+h[1]*s.y+h[2]*u.y+h[3]*this.toPoint.y;return{x:d,y:f}}}]),e}(ite);function ote(i){var n=ste();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function ste(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var dm=function(i){se(e,i);var n=ote(e);function e(t,r,a){return D(this,e),n.call(this,t,r,a)}return R(e,[{key:"_line",value:function(r,a){r.beginPath(),r.moveTo(this.fromPoint.x,this.fromPoint.y),r.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(r,a),r.stroke(),this.disableShadow(r,a)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(r){return{x:(1-r)*this.fromPoint.x+r*this.toPoint.x,y:(1-r)*this.fromPoint.y+r*this.toPoint.y}}},{key:"_findBorderPosition",value:function(r,a){var o=this.to,s=this.from;r.id===this.from.id&&(o=this.from,s=this.to);var u=Math.atan2(o.y-s.y,o.x-s.x),l=o.x-s.x,h=o.y-s.y,d=Math.sqrt(l*l+h*h),f=r.distanceToBorder(a,u),c=(d-f)/d;return{x:(1-c)*s.x+c*o.x,y:(1-c)*s.y+c*o.y,t:0}}},{key:"_getDistanceToEdge",value:function(r,a,o,s,u,l){return this._getDistanceToLine(r,a,o,s,u,l)}}]),e}(Zw),qi=function(){function i(n,e,t,r,a){if(D(this,i),e===void 0)throw new Error("No body provided");this.options=Dr(r),this.globalOptions=r,this.defaultOptions=a,this.body=e,this.imagelist=t,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new Vw(this.body,this.options,!0),this.setOptions(n)}return R(i,[{key:"setOptions",value:function(e){if(e){var t=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;i.parseOptions(this.options,e,!0,this.globalOptions),e.id!==void 0&&(this.id=e.id),e.from!==void 0&&(this.fromId=e.from),e.to!==void 0&&(this.toId=e.to),e.title!==void 0&&(this.title=e.title),e.value!==void 0&&(e.value=jw(e.value));var r=[e,this.options,this.defaultOptions];return this.chooser=ec("edge",r),this.updateLabelModule(e),t=this.updateEdgeType()||t,this._setInteractionWidths(),this.connect(),t}}},{key:"getFormattingValues",value:function(){var e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,t=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,r=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,a=this.options.color.inherit,o={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:r,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:t,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:a?void 0:this.options.color.color,inheritsColor:a,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){var s=this.options.selectionWidth;typeof s=="function"?o.width=s(o.width):typeof s=="number"&&(o.width+=s),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.highlight,o.shadow=this.options.shadow.enabled}else if(this.hover){var u=this.options.hoverWidth;typeof u=="function"?o.width=u(o.width):typeof u=="number"&&(o.width+=u),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.hover,o.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(o,this.options.id,this.selected,this.hover),o.color!==void 0&&(o.inheritsColor=!1),o.shadow===!1&&(o.shadowColor!==this.options.shadow.color||o.shadowSize!==this.options.shadow.size||o.shadowX!==this.options.shadow.x||o.shadowY!==this.options.shadow.y)&&(o.shadow=!0));else o.shadow=this.options.shadow.enabled,o.width=Math.max(o.width,.3/this.body.view.scale);return o}},{key:"updateLabelModule",value:function(e){var t=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,t),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var e=this.options.smooth,t=!1,r=!0;return this.edgeType!==void 0&&((this.edgeType instanceof um&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof hm&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof lm&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof dm&&e.type.enabled===!1)&&(r=!1),r===!0&&(t=this.cleanup())),r===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new um(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new hm(this.options,this.body,this.labelModule):this.edgeType=new lm(this.options,this.body,this.labelModule):this.edgeType=new dm(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}},{key:"connect",value:function(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}},{key:"getTitle",value:function(){return this.title}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"setValueRange",value:function(e,t,r){if(this.options.value!==void 0){var a=this.options.scaling.customScalingFunction(e,t,r,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){var s=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+a*s}this.options.width=this.options.scaling.min+a*o}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}},{key:"draw",value:function(e){var t=this.getFormattingValues();if(!t.hidden){var r=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,r),this.drawLabel(e,r)}}},{key:"drawArrows",value:function(e){var t=this.getFormattingValues();if(!t.hidden){var r=this.edgeType.getViaNode(),a={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(a.from=this.edgeType.getArrowData(e,"from",r,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.fromPoint=a.from.core),t.fromArrowSrc&&(a.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(a.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(a.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(a.to=this.edgeType.getArrowData(e,"to",r,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.toPoint=a.to.core),t.toArrowSrc&&(a.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(a.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(a.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(a.middle=this.edgeType.getArrowData(e,"middle",r,this.selected,this.hover,t),t.middleArrowSrc&&(a.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(a.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(a.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,a.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,a.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,a.to)}}},{key:"drawLabel",value:function(e,t){if(this.options.label!==void 0){var r=this.from,a=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);var o;if(r.id!=a.id){this.labelModule.pointToSelf=!1,o=this.edgeType.getPoint(.5,t),e.save();var s=this._getRotation(e);s.angle!=0&&(e.translate(s.x,s.y),e.rotate(s.angle)),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;var u=Hw(e,this.options.selfReference.angle,this.options.selfReference.size,r);o=this._pointOnCircle(u.x,u.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover)}}}},{key:"getItemsOnPoint",value:function(e){var t=[];if(this.labelModule.visible()){var r=this._getRotation();Pd(this.labelModule.getSize(),e,r)&&t.push({edgeId:this.id,labelId:0})}var a={left:e.x,top:e.y};return this.isOverlappingWith(a)&&t.push({edgeId:this.id}),t}},{key:"isOverlappingWith",value:function(e){if(this.connected){var t=10,r=this.from.x,a=this.from.y,o=this.to.x,s=this.to.y,u=e.left,l=e.top,h=this.edgeType.getDistanceToEdge(r,a,o,s,u,l);return h<t}else return!1}},{key:"_getRotation",value:function(e){var t=this.edgeType.getViaNode(),r=this.edgeType.getPoint(.5,t);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,r.x,r.y);var a={x:r.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align==="horizontal")return a;var o=this.from.y-this.to.y,s=this.from.x-this.to.x,u=Math.atan2(o,s);return(u<-1&&s<0||u>0&&s<0)&&(u+=Math.PI),a.angle=u,a}},{key:"_pointOnCircle",value:function(e,t,r,a){return{x:e+r*Math.cos(a),y:t-r*Math.sin(a)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}],[{key:"parseOptions",value:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"];if(Tn(s,e,t,r),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(Zr(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=a.endPointOffset.from!==void 0?a.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(Zr(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=a.endPointOffset.to!==void 0?a.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),Ss(t.label)?e.label=t.label:Ss(e.label)||(e.label=void 0),_t(e,t,"smooth",a),_t(e,t,"shadow",a),_t(e,t,"background",a),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:r===!0&&t.dashes===null&&(e.dashes=ni(a.dashes)),t.scaling!==void 0&&t.scaling!==null?(t.scaling.min!==void 0&&(e.scaling.min=t.scaling.min),t.scaling.max!==void 0&&(e.scaling.max=t.scaling.max),_t(e.scaling,t.scaling,"label",a.scaling)):r===!0&&t.scaling===null&&(e.scaling=ni(a.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){var u=t.arrows.toLowerCase();e.arrows.to.enabled=ae(u).call(u,"to")!=-1,e.arrows.middle.enabled=ae(u).call(u,"middle")!=-1,e.arrows.from.enabled=ae(u).call(u,"from")!=-1}else if(ce(t.arrows)==="object")_t(e.arrows,t.arrows,"to",a.arrows),_t(e.arrows,t.arrows,"middle",a.arrows),_t(e.arrows,t.arrows,"from",a.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+eo(t.arrows));else r===!0&&t.arrows===null&&(e.arrows=ni(a.arrows));if(t.color!==void 0&&t.color!==null){var l=Tr(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,h=e.color;if(o)ye(h,a.color,!1,r);else for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&delete h[d];if(Tr(h))h.color=h,h.highlight=h,h.hover=h,h.inherit=!1,l.opacity===void 0&&(h.opacity=1);else{var f=!1;l.color!==void 0&&(h.color=l.color,f=!0),l.highlight!==void 0&&(h.highlight=l.highlight,f=!0),l.hover!==void 0&&(h.hover=l.hover,f=!0),l.inherit!==void 0&&(h.inherit=l.inherit),l.opacity!==void 0&&(h.opacity=Math.min(1,Math.max(0,l.opacity))),f===!0?h.inherit=!1:h.inherit===void 0&&(h.inherit="from")}}else r===!0&&t.color===null&&(e.color=Dr(a.color));r===!0&&t.font===null&&(e.font=Dr(a.font)),Object.prototype.hasOwnProperty.call(t,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),e.selfReference.size=t.selfReferenceSize)}}]),i}(),ute=function(){function i(n,e,t){var r,a=this;D(this,i),this.body=n,this.images=e,this.groups=t,this.body.functions.createEdge=x(r=this.create).call(r,this),this.edgesListeners={add:function(s,u){a.add(u.items)},update:function(s,u){a.update(u.items)},remove:function(s,u){a.remove(u.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(s,u,l,h){if(u===s)return .5;var d=1/(u-s);return Math.max(0,(h-s)*d)}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},ye(this.options,this.defaultOptions),this.bindEventListeners()}return R(i,[{key:"bindEventListeners",value:function(){var e=this,t,r;this.body.emitter.on("_forceDisableDynamicCurves",function(a){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;a==="dynamic"&&(a="continuous");var s=!1;for(var u in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,u)){var l=e.body.edges[u],h=e.body.data.edges.get(u);if(h!=null){var d=h.smooth;d!==void 0&&d.enabled===!0&&d.type==="dynamic"&&(a===void 0?l.setOptions({smooth:!1}):l.setOptions({smooth:{type:a}}),s=!0)}}o===!0&&s===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",function(){e.reconnectEdges()}),this.body.emitter.on("refreshEdges",x(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",x(r=this.refresh).call(r,this)),this.body.emitter.on("destroy",function(){ee(e.edgesListeners,function(a,o){e.body.data.edges&&e.body.data.edges.off(o,a)}),delete e.body.functions.createEdge,delete e.edgesListeners.add,delete e.edgesListeners.update,delete e.edgesListeners.remove,delete e.edgesListeners})}},{key:"setOptions",value:function(e){if(e!==void 0){qi.parseOptions(this.options,e,!0,this.defaultOptions,!0);var t=!1;if(e.smooth!==void 0)for(var r in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,r)&&(t=this.body.edges[r].updateEdgeType()||t);if(e.font!==void 0)for(var a in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,a)&&this.body.edges[a].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||t===!0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var t=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.body.data.edges;if(f1("id",e))this.body.data.edges=e;else if(ue(e))this.body.data.edges=new ds,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new ds;else throw new TypeError("Array or DataSet expected");if(a&&ee(this.edgesListeners,function(s,u){a.off(u,s)}),this.body.edges={},this.body.data.edges){ee(this.edgesListeners,function(s,u){t.body.data.edges.on(u,s)});var o=this.body.data.edges.getIds();this.add(o,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),r===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.body.edges,a=this.body.data.edges,o=0;o<e.length;o++){var s=e[o],u=r[s];u&&u.disconnect();var l=a.get(s,{showInternalIds:!0});r[s]=this.create(l)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(e){for(var t=this.body.edges,r=this.body.data.edges,a=!1,o=0;o<e.length;o++){var s=e[o],u=r.get(s),l=t[s];l!==void 0?(l.disconnect(),a=l.setOptions(u)||a,l.connect()):(this.body.edges[s]=this.create(u),a=!0)}a===!0?(this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),this.body.emitter.emit("_dataChanged")):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length!==0){var r=this.body.edges;ee(e,function(a){var o=r[a];o!==void 0&&o.remove()}),t&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var e=this;ee(this.body.edges,function(t,r){var a=e.body.data.edges.get(r);a!==void 0&&t.setOptions(a)})}},{key:"create",value:function(e){return new qi(e,this.body,this.images,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var e,t=this.body.nodes,r=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in r)if(Object.prototype.hasOwnProperty.call(r,e)){var a=r[e];a.from=null,a.to=null,a.connect()}}},{key:"getConnectedNodes",value:function(e){var t=[];if(this.body.edges[e]!==void 0){var r=this.body.edges[e];r.fromId!==void 0&&t.push(r.fromId),r.toId!==void 0&&t.push(r.toId)}return t}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var e=this,t=[];ee(this.body.edges,function(r,a){var o=e.body.nodes[r.toId],s=e.body.nodes[r.fromId];o!==void 0&&o.isCluster===!0||s!==void 0&&s.isCluster===!0||(o===void 0||s===void 0)&&t.push(a)}),this.remove(t,!1)}},{key:"_addMissingEdges",value:function(){var e=this.body.data.edges;if(e!=null){var t=this.body.edges,r=[];ve(e).call(e,function(a,o){var s=t[o];s===void 0&&r.push(o)}),this.add(r,!0)}}}]),i}(),Jw=function(){function i(n,e,t){D(this,i),this.body=n,this.physicsBody=e,this.barnesHutTree,this.setOptions(t),this._rng=ku("BARNES HUT SOLVER")}return R(i,[{key:"setOptions",value:function(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}},{key:"solve",value:function(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){var e,t=this.body.nodes,r=this.physicsBody.physicsNodeIndices,a=r.length,o=this._formBarnesHutTree(t,r);this.barnesHutTree=o;for(var s=0;s<a;s++)e=t[r[s]],e.options.mass>0&&this._getForceContributions(o.root,e)}}},{key:"_getForceContributions",value:function(e,t){this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)}},{key:"_getForceContribution",value:function(e,t){if(e.childrenCount>0){var r=e.centerOfMass.x-t.x,a=e.centerOfMass.y-t.y,o=Math.sqrt(r*r+a*a);o*e.calcSize>this.thetaInversed?this._calculateForces(o,r,a,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(o,r,a,t,e)}}},{key:"_calculateForces",value:function(e,t,r,a,o){e===0&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&a.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*a.shape.radius,e-a.shape.radius));var s=this.options.gravitationalConstant*o.mass*a.options.mass/Math.pow(e,3),u=t*s,l=r*s;this.physicsBody.forces[a.id].x+=u,this.physicsBody.forces[a.id].y+=l}},{key:"_formBarnesHutTree",value:function(e,t){for(var r,a=t.length,o=e[t[0]].x,s=e[t[0]].y,u=e[t[0]].x,l=e[t[0]].y,h=1;h<a;h++){var d=e[t[h]],f=d.x,c=d.y;d.options.mass>0&&(f<o&&(o=f),f>u&&(u=f),c<s&&(s=c),c>l&&(l=c))}var v=Math.abs(u-o)-Math.abs(l-s);v>0?(s-=.5*v,l+=.5*v):(o+=.5*v,u-=.5*v);var g=1e-5,b=Math.max(g,Math.abs(u-o)),p=.5*b,$=.5*(o+u),y=.5*(s+l),m={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:$-p,maxX:$+p,minY:y-p,maxY:y+p},size:b,calcSize:1/b,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(m.root);for(var _=0;_<a;_++)r=e[t[_]],r.options.mass>0&&this._placeInTree(m.root,r);return m}},{key:"_updateBranchMass",value:function(e,t){var r=e.centerOfMass,a=e.mass+t.options.mass,o=1/a;r.x=r.x*e.mass+t.x*t.options.mass,r.x*=o,r.y=r.y*e.mass+t.y*t.options.mass,r.y*=o,e.mass=a;var s=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidth<s?s:e.maxWidth}},{key:"_placeInTree",value:function(e,t,r){(r!=!0||r===void 0)&&this._updateBranchMass(e,t);var a=e.children.NW.range,o;a.maxX>t.x?a.maxY>t.y?o="NW":o="SW":a.maxY>t.y?o="NE":o="SE",this._placeInRegion(e,t,o)}},{key:"_placeInRegion",value:function(e,t,r){var a=e.children[r];switch(a.childrenCount){case 0:a.children.data=t,a.childrenCount=1,this._updateBranchMass(a,t);break;case 1:a.children.data.x===t.x&&a.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(a),this._placeInTree(a,t));break;case 4:this._placeInTree(a,t);break}}},{key:"_splitBranch",value:function(e){var t=null;e.childrenCount===1&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),t!=null&&this._placeInTree(e,t)}},{key:"_insertRegion",value:function(e,t){var r,a,o,s,u=.5*e.size;switch(t){case"NW":r=e.range.minX,a=e.range.minX+u,o=e.range.minY,s=e.range.minY+u;break;case"NE":r=e.range.minX+u,a=e.range.maxX,o=e.range.minY,s=e.range.minY+u;break;case"SW":r=e.range.minX,a=e.range.minX+u,o=e.range.minY+u,s=e.range.maxY;break;case"SE":r=e.range.minX+u,a=e.range.maxX,o=e.range.minY+u,s=e.range.maxY;break}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:r,maxX:a,minY:o,maxY:s},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}},{key:"_debug",value:function(e,t){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}},{key:"_drawBranch",value:function(e,t,r){r===void 0&&(r="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=r,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}]),i}(),lte=function(){function i(n,e,t){D(this,i),this._rng=ku("REPULSION SOLVER"),this.body=n,this.physicsBody=e,this.setOptions(t)}return R(i,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,r,a,o,s,u,l,h=this.body.nodes,d=this.physicsBody.physicsNodeIndices,f=this.physicsBody.forces,c=this.options.nodeDistance,v=-2/3/c,g=4/3,b=0;b<d.length-1;b++){u=h[d[b]];for(var p=b+1;p<d.length;p++)l=h[d[p]],e=l.x-u.x,t=l.y-u.y,r=Math.sqrt(e*e+t*t),r===0&&(r=.1*this._rng(),e=r),r<2*c&&(r<.5*c?s=1:s=v*r+g,s=s/r,a=e*s,o=t*s,f[u.id].x-=a,f[u.id].y-=o,f[l.id].x+=a,f[l.id].y+=o)}}}]),i}(),hte=function(){function i(n,e,t){D(this,i),this.body=n,this.physicsBody=e,this.setOptions(t)}return R(i,[{key:"setOptions",value:function(e){this.options=e,this.overlapAvoidanceFactor=Math.max(0,Math.min(1,this.options.avoidOverlap||0))}},{key:"solve",value:function(){for(var e=this.body.nodes,t=this.physicsBody.physicsNodeIndices,r=this.physicsBody.forces,a=this.options.nodeDistance,o=0;o<t.length-1;o++)for(var s=e[t[o]],u=o+1;u<t.length;u++){var l=e[t[u]];if(s.level===l.level){var h=a+this.overlapAvoidanceFactor*((s.shape.radius||0)/2+(l.shape.radius||0)/2),d=l.x-s.x,f=l.y-s.y,c=Math.sqrt(d*d+f*f),v=.05,g=void 0;c<h?g=-Math.pow(v*c,2)+Math.pow(v*h,2):g=0,c!==0&&(g=g/c);var b=d*g,p=f*g;r[s.id].x-=b,r[s.id].y-=p,r[l.id].x+=b,r[l.id].y+=p}}}}]),i}(),ph=function(){function i(n,e,t){D(this,i),this.body=n,this.physicsBody=e,this.setOptions(t)}return R(i,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,r=this.physicsBody.physicsEdgeIndices,a=this.body.edges,o,s,u,l=0;l<r.length;l++)t=a[r[l]],t.connected===!0&&t.toId!==t.fromId&&this.body.nodes[t.toId]!==void 0&&this.body.nodes[t.fromId]!==void 0&&(t.edgeType.via!==void 0?(e=t.options.length===void 0?this.options.springLength:t.options.length,o=t.to,s=t.edgeType.via,u=t.from,this._calculateSpringForce(o,s,.5*e),this._calculateSpringForce(s,u,.5*e)):(e=t.options.length===void 0?this.options.springLength*1.5:t.options.length,this._calculateSpringForce(t.from,t.to,e)))}},{key:"_calculateSpringForce",value:function(e,t,r){var a=e.x-t.x,o=e.y-t.y,s=Math.max(Math.sqrt(a*a+o*o),.01),u=this.options.springConstant*(r-s)/s,l=a*u,h=o*u;this.physicsBody.forces[e.id]!==void 0&&(this.physicsBody.forces[e.id].x+=l,this.physicsBody.forces[e.id].y+=h),this.physicsBody.forces[t.id]!==void 0&&(this.physicsBody.forces[t.id].x-=l,this.physicsBody.forces[t.id].y-=h)}}]),i}(),dte=function(){function i(n,e,t){D(this,i),this.body=n,this.physicsBody=e,this.setOptions(t)}return R(i,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,r,a,o,s,u,l,h=this.body.edges,d=.5,f=this.physicsBody.physicsEdgeIndices,c=this.physicsBody.physicsNodeIndices,v=this.physicsBody.forces,g=0;g<c.length;g++){var b=c[g];v[b].springFx=0,v[b].springFy=0}for(var p=0;p<f.length;p++)t=h[f[p]],t.connected===!0&&(e=t.options.length===void 0?this.options.springLength:t.options.length,r=t.from.x-t.to.x,a=t.from.y-t.to.y,l=Math.sqrt(r*r+a*a),l=l===0?.01:l,u=this.options.springConstant*(e-l)/l,o=r*u,s=a*u,t.to.level!=t.from.level?(v[t.toId]!==void 0&&(v[t.toId].springFx-=o,v[t.toId].springFy-=s),v[t.fromId]!==void 0&&(v[t.fromId].springFx+=o,v[t.fromId].springFy+=s)):(v[t.toId]!==void 0&&(v[t.toId].x-=d*o,v[t.toId].y-=d*s),v[t.fromId]!==void 0&&(v[t.fromId].x+=d*o,v[t.fromId].y+=d*s)));u=1;for(var $,y,m=0;m<c.length;m++){var _=c[m];$=Math.min(u,Math.max(-u,v[_].springFx)),y=Math.min(u,Math.max(-u,v[_].springFy)),v[_].x+=$,v[_].y+=y}for(var O=0,k=0,S=0;S<c.length;S++){var w=c[S];O+=v[w].x,k+=v[w].y}for(var E=O/c.length,F=k/c.length,H=0;H<c.length;H++){var z=c[H];v[z].x-=E,v[z].y-=F}}}]),i}(),Jo=function(){function i(n,e,t){D(this,i),this.body=n,this.physicsBody=e,this.setOptions(t)}return R(i,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,r,a,o=this.body.nodes,s=this.physicsBody.physicsNodeIndices,u=this.physicsBody.forces,l=0;l<s.length;l++){var h=s[l];a=o[h],e=-a.x,t=-a.y,r=Math.sqrt(e*e+t*t),this._calculateForces(r,e,t,u,a)}}},{key:"_calculateForces",value:function(e,t,r,a,o){var s=e===0?0:this.options.centralGravity/e;a[o.id].x=t*s,a[o.id].y=r*s}}]),i}();function fte(i){var n=cte();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function cte(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var vte=function(i){se(e,i);var n=fte(e);function e(t,r,a){var o;return D(this,e),o=n.call(this,t,r,a),o._rng=ku("FORCE ATLAS 2 BASED REPULSION SOLVER"),o}return R(e,[{key:"_calculateForces",value:function(r,a,o,s,u){r===0&&(r=.1*this._rng(),a=r),this.overlapAvoidanceFactor<1&&s.shape.radius&&(r=Math.max(.1+this.overlapAvoidanceFactor*s.shape.radius,r-s.shape.radius));var l=s.edges.length+1,h=this.options.gravitationalConstant*u.mass*s.options.mass*l/Math.pow(r,2),d=a*h,f=o*h;this.physicsBody.forces[s.id].x+=d,this.physicsBody.forces[s.id].y+=f}}]),e}(Jw);function pte(i){var n=gte();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function gte(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var yte=function(i){se(e,i);var n=pte(e);function e(t,r,a){return D(this,e),n.call(this,t,r,a)}return R(e,[{key:"_calculateForces",value:function(r,a,o,s,u){if(r>0){var l=u.edges.length+1,h=this.options.centralGravity*l*u.options.mass;s[u.id].x=a*h,s[u.id].y=o*h}}}]),e}(Jo),mte=function(){function i(n){D(this,i),this.body=n,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},Ce(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return R(i,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("initPhysics",function(){e.initPhysics()}),this.body.emitter.on("_layoutFailed",function(){e.layoutFailed=!0}),this.body.emitter.on("resetPhysics",function(){e.stopSimulation(),e.ready=!1}),this.body.emitter.on("disablePhysics",function(){e.physicsEnabled=!1,e.stopSimulation()}),this.body.emitter.on("restorePhysics",function(){e.setOptions(e.options),e.ready===!0&&e.startSimulation()}),this.body.emitter.on("startSimulation",function(){e.ready===!0&&e.startSimulation()}),this.body.emitter.on("stopSimulation",function(){e.stopSimulation()}),this.body.emitter.on("destroy",function(){e.stopSimulation(!1),e.body.emitter.off()}),this.body.emitter.on("_dataChanged",function(){e.updatePhysicsData()})}},{key:"setOptions",value:function(e){if(e!==void 0)if(e===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(e===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,ws(["stabilization"],this.options,e),_t(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());var t=this.options.wind;t&&((typeof t.x!="number"||Id(t.x))&&(t.x=0),(typeof t.y!="number"||Id(t.y))&&(t.y=0)),this.timestep=this.options.timestep}this.init()}},{key:"init",value:function(){var e;this.options.solver==="forceAtlas2Based"?(e=this.options.forceAtlas2Based,this.nodesSolver=new vte(this.body,this.physicsBody,e),this.edgesSolver=new ph(this.body,this.physicsBody,e),this.gravitySolver=new yte(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new lte(this.body,this.physicsBody,e),this.edgesSolver=new ph(this.body,this.physicsBody,e),this.gravitySolver=new Jo(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new hte(this.body,this.physicsBody,e),this.edgesSolver=new dte(this.body,this.physicsBody,e),this.gravitySolver=new Jo(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new Jw(this.body,this.physicsBody,e),this.edgesSolver=new ph(this.body,this.physicsBody,e),this.gravitySolver=new Jo(this.body,this.physicsBody,e)),this.modelOptions=e}},{key:"initPhysics",value:function(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}},{key:"startSimulation",value:function(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var e;this.viewFunction=x(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,e===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var e=ps();this.physicsTick();var t=ps()-e;(t<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&qt(function(){e.body.emitter.emit("stabilized",{iterations:t}),e.startedStabilization=!1,e.stabilizationIterations=0},0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){var e=1.2;this._evaluateStepQuality()===!0?this.timestep=e*this.timestep:this.timestep/e<this.options.timestep?this.timestep=this.options.timestep:(this.adaptiveCounter=-1,this.timestep=Math.max(this.options.timestep,this.timestep/e))}},{key:"physicsTick",value:function(){if(this._startStabilizing(),this.stabilized!==!0){if(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0){var e=this.adaptiveCounter%this.adaptiveInterval===0;e?(this.timestep=2*this.timestep,this.physicsStep(),this.revert(),this.timestep=.5*this.timestep,this.physicsStep(),this.physicsStep(),this.adjustTimeStep()):this.physicsStep(),this.adaptiveCounter+=1}else this.timestep=this.options.timestep,this.physicsStep();this.stabilized===!0&&this.revert(),this.stabilizationIterations++}}},{key:"updatePhysicsData",value:function(){this.physicsBody.forces={},this.physicsBody.physicsNodeIndices=[],this.physicsBody.physicsEdgeIndices=[];var e=this.body.nodes,t=this.body.edges;for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&e[r].options.physics===!0&&this.physicsBody.physicsNodeIndices.push(e[r].id);for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&t[a].options.physics===!0&&this.physicsBody.physicsEdgeIndices.push(t[a].id);for(var o=0;o<this.physicsBody.physicsNodeIndices.length;o++){var s=this.physicsBody.physicsNodeIndices[o];this.physicsBody.forces[s]={x:0,y:0},this.physicsBody.velocities[s]===void 0&&(this.physicsBody.velocities[s]={x:0,y:0})}for(var u in this.physicsBody.velocities)e[u]===void 0&&delete this.physicsBody.velocities[u]}},{key:"revert",value:function(){var e=we(this.previousStates),t=this.body.nodes,r=this.physicsBody.velocities;this.referenceState={};for(var a=0;a<e.length;a++){var o=e[a];t[o]!==void 0?t[o].options.physics===!0&&(this.referenceState[o]={positions:{x:t[o].x,y:t[o].y}},r[o].x=this.previousStates[o].vx,r[o].y=this.previousStates[o].vy,t[o].x=this.previousStates[o].x,t[o].y=this.previousStates[o].y):delete this.previousStates[o]}}},{key:"_evaluateStepQuality",value:function(){var e,t,r,a=this.body.nodes,o=this.referenceState,s=.3;for(var u in this.referenceState)if(Object.prototype.hasOwnProperty.call(this.referenceState,u)&&a[u]!==void 0&&(e=a[u].x-o[u].positions.x,t=a[u].y-o[u].positions.y,r=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),r>s))return!1;return!0}},{key:"moveNodes",value:function(){for(var e=this.physicsBody.physicsNodeIndices,t=0,r=0,a=5,o=0;o<e.length;o++){var s=e[o],u=this._performStep(s);t=Math.max(t,u),r+=u}this.adaptiveTimestepEnabled=r/e.length<a,this.stabilized=t<this.options.minVelocity}},{key:"calculateComponentVelocity",value:function(e,t,r){var a=this.modelOptions.damping*e,o=(t-a)/r;e+=o*this.timestep;var s=this.options.maxVelocity||1e9;return Math.abs(e)>s&&(e=e>0?s:-s),e}},{key:"_performStep",value:function(e){var t=this.body.nodes[e],r=this.physicsBody.forces[e];this.options.wind&&(r.x+=this.options.wind.x,r.y+=this.options.wind.y);var a=this.physicsBody.velocities[e];this.previousStates[e]={x:t.x,y:t.y,vx:a.x,vy:a.y},t.options.fixed.x===!1?(a.x=this.calculateComponentVelocity(a.x,r.x,t.options.mass),t.x+=a.x*this.timestep):(r.x=0,a.x=0),t.options.fixed.y===!1?(a.y=this.calculateComponentVelocity(a.y,r.y,t.options.mass),t.y+=a.y*this.timestep):(r.y=0,a.y=0);var o=Math.sqrt(Math.pow(a.x,2)+Math.pow(a.y,2));return o}},{key:"_freezeNodes",value:function(){var e=this.body.nodes;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){var r=e[t].options.fixed;this.freezeCache[t]={x:r.x,y:r.y},r.x=!0,r.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var e=this.body.nodes;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.freezeCache[t]!==void 0&&(e[t].options.fixed.x=this.freezeCache[t].x,e[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}},{key:"stabilize",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof t!="number"&&(t=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",t)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=t,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,qt(function(){return e._stabilizationBatch()},0)}},{key:"_startStabilizing",value:function(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}},{key:"_stabilizationBatch",value:function(){var e=this,t=function(){return e.stabilized===!1&&e.stabilizationIterations<e.targetIterations},r=function(){e.body.emitter.emit("stabilizationProgress",{iterations:e.stabilizationIterations,total:e.targetIterations})};this._startStabilizing()&&r();for(var a=0;t()&&a<this.options.stabilization.updateInterval;)this.physicsTick(),a++;if(r(),t()){var o;qt(x(o=this._stabilizationBatch).call(o,this),0)}else this._finalizeStabilization()}},{key:"_finalizeStabilization",value:function(){this.body.emitter.emit("_allowRedraw"),this.options.stabilization.fit===!0&&this.body.emitter.emit("fit"),this.options.stabilization.onlyDynamicEdges===!0&&this._restoreFrozenNodes(),this.body.emitter.emit("stabilizationIterationsDone"),this.body.emitter.emit("_requestRedraw"),this.stabilized===!0?this._emitStabilized():this.startSimulation(),this.ready=!0}},{key:"_drawForces",value:function(e){for(var t=0;t<this.physicsBody.physicsNodeIndices.length;t++){var r=this.physicsBody.physicsNodeIndices[t],a=this.body.nodes[r],o=this.physicsBody.forces[r],s=20,u=.03,l=Math.sqrt(Math.pow(o.x,2)+Math.pow(o.x,2)),h=Math.min(Math.max(5,l),15),d=3*h,f=Od((180-Math.min(1,Math.max(0,u*l))*180)/360,1,1),c={x:a.x+s*o.x,y:a.y+s*o.y};e.lineWidth=h,e.strokeStyle=f,e.beginPath(),e.moveTo(a.x,a.y),e.lineTo(c.x,c.y),e.stroke();var v=Math.atan2(o.y,o.x);e.fillStyle=f,Qw.draw(e,{type:"arrow",point:c,angle:v,length:d}),to(e).call(e)}}}]),i}(),xo,bte=new Uint8Array(16);function $te(){if(!xo&&(xo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!xo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xo(bte)}var wte=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function _te(i){return typeof i=="string"&&wte.test(i)}var Ue=[];for(var gh=0;gh<256;++gh)Ue.push((gh+256).toString(16).substr(1));function Ete(i){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=(Ue[i[n+0]]+Ue[i[n+1]]+Ue[i[n+2]]+Ue[i[n+3]]+"-"+Ue[i[n+4]]+Ue[i[n+5]]+"-"+Ue[i[n+6]]+Ue[i[n+7]]+"-"+Ue[i[n+8]]+Ue[i[n+9]]+"-"+Ue[i[n+10]]+Ue[i[n+11]]+Ue[i[n+12]]+Ue[i[n+13]]+Ue[i[n+14]]+Ue[i[n+15]]).toLowerCase();if(!_te(e))throw TypeError("Stringified UUID is invalid");return e}function Gn(i,n,e){i=i||{};var t=i.random||(i.rng||$te)();if(t[6]=t[6]&15|64,t[8]=t[8]&63|128,n){e=e||0;for(var r=0;r<16;++r)n[e+r]=t[r];return n}return Ete(t)}var Je=function(){function i(){D(this,i)}return R(i,null,[{key:"getRange",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=1e9,a=-1e9,o=1e9,s=-1e9,u;if(t.length>0)for(var l=0;l<t.length;l++)u=e[t[l]],o>u.shape.boundingBox.left&&(o=u.shape.boundingBox.left),s<u.shape.boundingBox.right&&(s=u.shape.boundingBox.right),r>u.shape.boundingBox.top&&(r=u.shape.boundingBox.top),a<u.shape.boundingBox.bottom&&(a=u.shape.boundingBox.bottom);return o===1e9&&s===-1e9&&r===1e9&&a===-1e9&&(r=0,a=0,o=0,s=0),{minX:o,maxX:s,minY:r,maxY:a}}},{key:"getRangeCore",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=1e9,a=-1e9,o=1e9,s=-1e9,u;if(t.length>0)for(var l=0;l<t.length;l++)u=e[t[l]],o>u.x&&(o=u.x),s<u.x&&(s=u.x),r>u.y&&(r=u.y),a<u.y&&(a=u.y);return o===1e9&&s===-1e9&&r===1e9&&a===-1e9&&(r=0,a=0,o=0,s=0),{minX:o,maxX:s,minY:r,maxY:a}}},{key:"findCenter",value:function(e){return{x:.5*(e.maxX+e.minX),y:.5*(e.maxY+e.minY)}}},{key:"cloneOptions",value:function(e,t){var r={};return t===void 0||t==="node"?(ye(r,e.options,!0),r.x=e.x,r.y=e.y,r.amountOfConnections=e.edges.length):ye(r,e.options,!0),r}}]),i}();function Ste(i){var n=Ote();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function Ote(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Tte=function(i){se(e,i);var n=Ste(e);function e(t,r,a,o,s,u){var l;return D(this,e),l=n.call(this,t,r,a,o,s,u),l.isCluster=!0,l.containedNodes={},l.containedEdges={},l}return R(e,[{key:"_openChildCluster",value:function(r){var a=this,o=this.body.nodes[r];if(this.containedNodes[r]===void 0)throw new Error("node with id: "+r+" not in current cluster");if(!o.isCluster)throw new Error("node with id: "+r+" is not a cluster");delete this.containedNodes[r],ee(o.edges,function(s){delete a.containedEdges[s.id]}),ee(o.containedNodes,function(s,u){a.containedNodes[u]=s}),o.containedNodes={},ee(o.containedEdges,function(s,u){a.containedEdges[u]=s}),o.containedEdges={},ee(o.edges,function(s){ee(a.edges,function(u){var l,h,d=ae(l=u.clusteringEdgeReplacingIds).call(l,s.id);d!==-1&&(ee(s.clusteringEdgeReplacingIds,function(f){u.clusteringEdgeReplacingIds.push(f),a.body.edges[f].edgeReplacedById=u.id}),or(h=u.clusteringEdgeReplacingIds).call(h,d,1))})}),o.edges=[]}}]),e}(vt),kte=function(){function i(n){var e=this;D(this,i),this.body=n,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},Ce(this.options,this.defaultOptions),this.body.emitter.on("_resetData",function(){e.clusteredNodes={},e.clusteredEdges={}})}return R(i,[{key:"clusterByHubsize",value:function(e,t){e===void 0?e=this._getHubSize():ce(e)==="object"&&(t=this._checkOptions(e),e=this._getHubSize());for(var r=[],a=0;a<this.body.nodeIndices.length;a++){var o=this.body.nodes[this.body.nodeIndices[a]];o.edges.length>=e&&r.push(o.id)}for(var s=0;s<r.length;s++)this.clusterByConnection(r[s],t,!0);this.body.emitter.emit("_dataChanged")}},{key:"cluster",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(t.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");t=this._checkOptions(t);var a={},o={};ee(this.body.nodes,function(s,u){s.options&&t.joinCondition(s.options)===!0&&(a[u]=s,ee(s.edges,function(l){e.clusteredEdges[l.id]===void 0&&(o[l.id]=l)}))}),this._cluster(a,o,t,r)}},{key:"clusterByEdgeCount",value:function(e,t){var r=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);for(var o=[],s={},u,l,h,d=function(g){var b={},p={},$=r.body.nodeIndices[g],y=r.body.nodes[$];if(s[$]===void 0){h=0,l=[];for(var m=0;m<y.edges.length;m++)u=y.edges[m],r.clusteredEdges[u.id]===void 0&&(u.toId!==u.fromId&&h++,l.push(u));if(h===e){for(var _=function(K){if(t.joinCondition===void 0||t.joinCondition===null)return!0;var X=Je.cloneOptions(K);return t.joinCondition(X)},O=!0,k=0;k<l.length;k++){u=l[k];var S=r._getConnectedId(u,$);if(_(y))p[u.id]=u,b[$]=y,b[S]=r.body.nodes[S],s[$]=!0;else{O=!1;break}}if(we(b).length>0&&we(p).length>0&&O===!0){var w=function(){for(var K=0;K<o.length;++K)for(var X in b)if(o[K].nodes[X]!==void 0)return o[K]},E=w();if(E!==void 0){for(var F in b)E.nodes[F]===void 0&&(E.nodes[F]=b[F]);for(var H in p)E.edges[H]===void 0&&(E.edges[H]=p[H])}else o.push({nodes:b,edges:p})}}}},f=0;f<this.body.nodeIndices.length;f++)d(f);for(var c=0;c<o.length;c++)this._cluster(o[c].nodes,o[c].edges,t,!1);a===!0&&this.body.emitter.emit("_dataChanged")}},{key:"clusterOutliers",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,t)}},{key:"clusterBridges",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,t)}},{key:"clusterByConnection",value:function(e,t){var r,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");var o=this.body.nodes[e];t=this._checkOptions(t,o),t.clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=o.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=o.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=o.options.fixed.x,t.clusterNodeProperties.fixed.y=o.options.fixed.y);var s={},u={},l=o.id,h=Je.cloneOptions(o);s[l]=o;for(var d=0;d<o.edges.length;d++){var f=o.edges[d];if(this.clusteredEdges[f.id]===void 0){var c=this._getConnectedId(f,l);if(this.clusteredNodes[c]===void 0)if(c!==l)if(t.joinCondition===void 0)u[f.id]=f,s[c]=this.body.nodes[c];else{var v=Je.cloneOptions(this.body.nodes[c]);t.joinCondition(h,v)===!0&&(u[f.id]=f,s[c]=this.body.nodes[c])}else u[f.id]=f}}var g=en(r=we(s)).call(r,function(m){return s[m].id});for(var b in s)if(Object.prototype.hasOwnProperty.call(s,b))for(var p=s[b],$=0;$<p.edges.length;$++){var y=p.edges[$];ae(g).call(g,this._getConnectedId(y,p.id))>-1&&(u[y.id]=y)}this._cluster(s,u,t,a)}},{key:"_createClusterEdges",value:function(e,t,r,a){for(var o,s,u,l,h,d,f=we(e),c=[],v=0;v<f.length;v++){s=f[v],u=e[s];for(var g=0;g<u.edges.length;g++)o=u.edges[g],this.clusteredEdges[o.id]===void 0&&(o.toId==o.fromId?t[o.id]=o:o.toId==s?(l=r.id,h=o.fromId,d=h):(l=o.toId,h=r.id,d=l),e[d]===void 0&&c.push({edge:o,fromId:h,toId:l}))}for(var b=[],p=function(k){for(var S=0;S<b.length;S++){var w=b[S],E=k.fromId===w.fromId&&k.toId===w.toId,F=k.fromId===w.toId&&k.toId===w.fromId;if(E||F)return w}return null},$=0;$<c.length;$++){var y=c[$],m=y.edge,_=p(y);_===null?(_=this._createClusteredEdge(y.fromId,y.toId,m,a),b.push(_)):_.clusteringEdgeReplacingIds.push(m.id),this.body.edges[m.id].edgeReplacedById=_.id,this._backupEdgeOptions(m),m.setOptions({physics:!1})}}},{key:"_checkOptions",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}},{key:"_cluster",value:function(e,t,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,o=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&this.clusteredNodes[s]!==void 0&&o.push(s);for(var u=0;u<o.length;++u)delete e[o[u]];if(we(e).length!=0&&!(we(e).length==1&&r.clusterNodeProperties.allowSingleNodeCluster!=!0)){var l=ye({},r.clusterNodeProperties);if(r.processProperties!==void 0){var h=[];for(var d in e)if(Object.prototype.hasOwnProperty.call(e,d)){var f=Je.cloneOptions(e[d]);h.push(f)}var c=[];for(var v in t)if(Object.prototype.hasOwnProperty.call(t,v)&&v.substr(0,12)!=="clusterEdge:"){var g=Je.cloneOptions(t[v],"edge");c.push(g)}if(l=r.processProperties(l,h,c),!l)throw new Error("The processProperties function does not return properties!")}l.id===void 0&&(l.id="cluster:"+Gn());var b=l.id;l.label===void 0&&(l.label="cluster");var p=void 0;l.x===void 0&&(p=this._getClusterPosition(e),l.x=p.x),l.y===void 0&&(p===void 0&&(p=this._getClusterPosition(e)),l.y=p.y),l.id=b;var $=this.body.functions.createNode(l,Tte);$.containedNodes=e,$.containedEdges=t,$.clusterEdgeProperties=r.clusterEdgeProperties,this.body.nodes[l.id]=$,this._clusterEdges(e,t,l,r.clusterEdgeProperties),l.id=void 0,a===!0&&this.body.emitter.emit("_dataChanged")}}},{key:"_backupEdgeOptions",value:function(e){this.clusteredEdges[e.id]===void 0&&(this.clusteredEdges[e.id]={physics:e.options.physics})}},{key:"_restoreEdge",value:function(e){var t=this.clusteredEdges[e.id];t!==void 0&&(e.setOptions({physics:t.physics}),delete this.clusteredEdges[e.id])}},{key:"isCluster",value:function(e){return this.body.nodes[e]!==void 0?this.body.nodes[e].isCluster===!0:(console.error("Node does not exist."),!1)}},{key:"_getClusterPosition",value:function(e){for(var t=we(e),r=e[t[0]].x,a=e[t[0]].x,o=e[t[0]].y,s=e[t[0]].y,u,l=1;l<t.length;l++)u=e[t[l]],r=u.x<r?u.x:r,a=u.x>a?u.x:a,o=u.y<o?u.y:o,s=u.y>s?u.y:s;return{x:.5*(r+a),y:.5*(o+s)}}},{key:"openCluster",value:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");var a=this.body.nodes[e];if(a===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(a.isCluster!==!0||a.containedNodes===void 0||a.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");var o=this.findNode(e),s=ae(o).call(o,e)-1;if(s>=0){var u=o[s],l=this.body.nodes[u];l._openChildCluster(e),delete this.body.nodes[e],r===!0&&this.body.emitter.emit("_dataChanged");return}var h=a.containedNodes,d=a.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction=="function"){var f={},c={x:a.x,y:a.y};for(var v in h)if(Object.prototype.hasOwnProperty.call(h,v)){var g=this.body.nodes[v];f[v]={x:g.x,y:g.y}}var b=t.releaseFunction(c,f);for(var p in h)if(Object.prototype.hasOwnProperty.call(h,p)){var $=this.body.nodes[p];b[p]!==void 0&&($.x=b[p].x===void 0?a.x:b[p].x,$.y=b[p].y===void 0?a.y:b[p].y)}}else ee(h,function(C){C.options.fixed.x===!1&&(C.x=a.x),C.options.fixed.y===!1&&(C.y=a.y)});for(var y in h)if(Object.prototype.hasOwnProperty.call(h,y)){var m=this.body.nodes[y];m.vx=a.vx,m.vy=a.vy,m.setOptions({physics:!0}),delete this.clusteredNodes[y]}for(var _=[],O=0;O<a.edges.length;O++)_.push(a.edges[O]);for(var k=0;k<_.length;k++){for(var S=_[k],w=this._getConnectedId(S,e),E=this.clusteredNodes[w],F=0;F<S.clusteringEdgeReplacingIds.length;F++){var H=S.clusteringEdgeReplacingIds[F],z=this.body.edges[H];if(z!==void 0)if(E!==void 0){var K=this.body.nodes[E.clusterId];K.containedEdges[z.id]=z,delete d[z.id];var X=z.fromId,te=z.toId;z.toId==w?te=E.clusterId:X=E.clusterId,this._createClusteredEdge(X,te,z,K.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(z)}S.remove()}for(var ne in d)Object.prototype.hasOwnProperty.call(d,ne)&&this._restoreEdge(d[ne]);delete this.body.nodes[e],r===!0&&this.body.emitter.emit("_dataChanged")}},{key:"getNodesInCluster",value:function(e){var t=[];if(this.isCluster(e)===!0){var r=this.body.nodes[e].containedNodes;for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&t.push(this.body.nodes[a].id)}return t}},{key:"findNode",value:function(e){for(var t=[],r=100,a=0,o;this.clusteredNodes[e]!==void 0&&a<r;){if(o=this.body.nodes[e],o===void 0)return[];t.push(o.id),e=this.clusteredNodes[e].clusterId,a++}return o=this.body.nodes[e],o===void 0?[]:(t.push(o.id),ii(t).call(t),t)}},{key:"updateClusteredNode",value:function(e,t){if(e===void 0)throw new Error("No clusteredNodeId supplied to updateClusteredNode.");if(t===void 0)throw new Error("No newOptions supplied to updateClusteredNode.");if(this.body.nodes[e]===void 0)throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist.");this.body.nodes[e].setOptions(t),this.body.emitter.emit("_dataChanged")}},{key:"updateEdge",value:function(e,t){if(e===void 0)throw new Error("No startEdgeId supplied to updateEdge.");if(t===void 0)throw new Error("No newOptions supplied to updateEdge.");if(this.body.edges[e]===void 0)throw new Error("The startEdgeId supplied to updateEdge does not exist.");for(var r=this.getClusteredEdges(e),a=0;a<r.length;a++){var o=this.body.edges[r[a]];o.setOptions(t)}this.body.emitter.emit("_dataChanged")}},{key:"getClusteredEdges",value:function(e){for(var t=[],r=100,a=0;e!==void 0&&this.body.edges[e]!==void 0&&a<r;)t.push(this.body.edges[e].id),e=this.body.edges[e].edgeReplacedById,a++;return ii(t).call(t),t}},{key:"getBaseEdge",value:function(e){return this.getBaseEdges(e)[0]}},{key:"getBaseEdges",value:function(e){for(var t=[e],r=[],a=[],o=100,s=0;t.length>0&&s<o;){var u=t.pop();if(u!==void 0){var l=this.body.edges[u];if(l!==void 0){s++;var h=l.clusteringEdgeReplacingIds;if(h===void 0)a.push(u);else for(var d=0;d<h.length;++d){var f=h[d];ae(t).call(t,h)!==-1||ae(r).call(r,h)!==-1||t.push(f)}r.push(u)}}}return a}},{key:"_getConnectedId",value:function(e,t){return e.toId!=t?e.toId:(e.fromId!=t,e.fromId)}},{key:"_getHubSize",value:function(){for(var e=0,t=0,r=0,a=0,o=0;o<this.body.nodeIndices.length;o++){var s=this.body.nodes[this.body.nodeIndices[o]];s.edges.length>a&&(a=s.edges.length),e+=s.edges.length,t+=Math.pow(s.edges.length,2),r+=1}e=e/r,t=t/r;var u=t-Math.pow(e,2),l=Math.sqrt(u),h=Math.floor(e+2*l);return h>a&&(h=a),h}},{key:"_createClusteredEdge",value:function(e,t,r,a,o){var s=Je.cloneOptions(r,"edge");ye(s,a),s.from=e,s.to=t,s.id="clusterEdge:"+Gn(),o!==void 0&&ye(s,o);var u=this.body.functions.createEdge(s);return u.clusteringEdgeReplacingIds=[r.id],u.connect(),this.body.edges[u.id]=u,u}},{key:"_clusterEdges",value:function(e,t,r,a){if(t instanceof qi){var o=t,s={};s[o.id]=o,t=s}if(e instanceof vt){var u=e,l={};l[u.id]=u,e=l}if(r==null)throw new Error("_clusterEdges: parameter clusterNode required");a===void 0&&(a=r.clusterEdgeProperties),this._createClusterEdges(e,t,r,a);for(var h in t)if(Object.prototype.hasOwnProperty.call(t,h)&&this.body.edges[h]!==void 0){var d=this.body.edges[h];this._backupEdgeOptions(d),d.setOptions({physics:!1})}for(var f in e)Object.prototype.hasOwnProperty.call(e,f)&&(this.clusteredNodes[f]={clusterId:r.id,node:this.body.nodes[f]},this.body.nodes[f].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(e){if(e!==void 0){var t=this.clusteredNodes[e];if(t!==void 0){var r=t.clusterId;if(r!==void 0)return this.body.nodes[r]}}}},{key:"_filter",value:function(e,t){var r=[];return ee(e,function(a){t(a)&&r.push(a)}),r}},{key:"_updateState",value:function(){var e=this,t,r=[],a={},o=function(v){ee(e.body.nodes,function(g){g.isCluster===!0&&v(g)})};for(t in this.clusteredNodes)if(Object.prototype.hasOwnProperty.call(this.clusteredNodes,t)){var s=this.body.nodes[t];s===void 0&&r.push(t)}o(function(c){for(var v=0;v<r.length;v++)delete c.containedNodes[r[v]]});for(var u=0;u<r.length;u++)delete this.clusteredNodes[r[u]];ee(this.clusteredEdges,function(c){var v=e.body.edges[c];(v===void 0||!v.endPointsValid())&&(a[c]=c)}),o(function(c){ee(c.containedEdges,function(v,g){!v.endPointsValid()&&!a[g]&&(a[g]=g)})}),ee(this.body.edges,function(c,v){var g=!0,b=c.clusteringEdgeReplacingIds;if(b!==void 0){var p=0;ee(b,function($){var y=e.body.edges[$];y!==void 0&&y.endPointsValid()&&(p+=1)}),g=p>0}(!c.endPointsValid()||!g)&&(a[v]=v)}),o(function(c){ee(a,function(v){delete c.containedEdges[v],ee(c.edges,function(g,b){if(g.id===v){c.edges[b]=null;return}g.clusteringEdgeReplacingIds=e._filter(g.clusteringEdgeReplacingIds,function(p){return!a[p]})}),c.edges=e._filter(c.edges,function(g){return g!==null})})}),ee(a,function(c){delete e.clusteredEdges[c]}),ee(a,function(c){delete e.body.edges[c]});var l=we(this.body.edges);ee(l,function(c){var v=e.body.edges[c],g=e._isClusteredNode(v.fromId)||e._isClusteredNode(v.toId);if(g!==e._isClusteredEdge(v.id))if(g){var b=e._getClusterNodeForNode(v.fromId);b!==void 0&&e._clusterEdges(e.body.nodes[v.fromId],v,b);var p=e._getClusterNodeForNode(v.toId);p!==void 0&&e._clusterEdges(e.body.nodes[v.toId],v,p)}else delete e._clusterEdges[c],e._restoreEdge(v)});for(var h=!1,d=!0,f=function(){var v=[];o(function(b){var p=we(b.containedNodes).length,$=b.options.allowSingleNodeCluster===!0;($&&p<1||!$&&p<2)&&v.push(b.id)});for(var g=0;g<v.length;++g)e.openCluster(v[g],{},!1);d=v.length>0,h=h||d};d;)f();h&&this._updateState()}},{key:"_isClusteredNode",value:function(e){return this.clusteredNodes[e]!==void 0}},{key:"_isClusteredEdge",value:function(e){return this.clusteredEdges[e]!==void 0}}]),i}();function Ite(i,n){var e=typeof yr<"u"&&Qt(i)||i["@@iterator"];if(!e){if(ue(i)||(e=Pte(i))||n&&i&&typeof i.length=="number"){e&&(i=e);var t=0,r=function(){};return{s:r,n:function(){return t>=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
95
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Pte(i,n){var e;if(i){if(typeof i=="string")return fm(i,n);var t=Be(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Lr(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return fm(i,n)}}function fm(i,n){(n==null||n>i.length)&&(n=i.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=i[e];return t}function Cte(){var i;window!==void 0&&(i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),i===void 0?window.requestAnimationFrame=function(n){n()}:window.requestAnimationFrame=i}var Ate=function(){function i(n,e){D(this,i),Cte(),this.body=n,this.canvas=e,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},Ce(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return R(i,[{key:"bindEventListeners",value:function(){var e=this,t;this.body.emitter.on("dragStart",function(){e.dragging=!0}),this.body.emitter.on("dragEnd",function(){e.dragging=!1}),this.body.emitter.on("zoom",function(){e.zooming=!0,window.clearTimeout(e.zoomTimeoutId),e.zoomTimeoutId=qt(function(){var r;e.zooming=!1,x(r=e._requestRedraw).call(r,e)()},250)}),this.body.emitter.on("_resizeNodes",function(){e._resizeNodes()}),this.body.emitter.on("_redraw",function(){e.renderingActive===!1&&e._redraw()}),this.body.emitter.on("_blockRedraw",function(){e.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",function(){e.allowRedraw=!0,e.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",x(t=this._requestRedraw).call(t,this)),this.body.emitter.on("_startRendering",function(){e.renderRequests+=1,e.renderingActive=!0,e._startRendering()}),this.body.emitter.on("_stopRendering",function(){e.renderRequests-=1,e.renderingActive=e.renderRequests>0,e.renderTimer=void 0}),this.body.emitter.on("destroy",function(){e.renderRequests=0,e.allowRedraw=!1,e.renderingActive=!1,e.requiresTimeout===!0?clearTimeout(e.renderTimer):window.cancelAnimationFrame(e.renderTimer),e.body.emitter.off()})}},{key:"setOptions",value:function(e){if(e!==void 0){var t=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"];Tn(t,this.options,e)}}},{key:"_requestNextFrame",value:function(e,t){if(!(typeof window>"u")){var r,a=window;return this.requiresTimeout===!0?r=qt(e,t):a.requestAnimationFrame&&(r=a.requestAnimationFrame(e)),r}}},{key:"_startRendering",value:function(){if(this.renderingActive===!0&&this.renderTimer===void 0){var e;this.renderTimer=this._requestNextFrame(x(e=this._renderStep).call(e,this),this.simulationInterval)}}},{key:"_renderStep",value:function(){this.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var e=this;this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this._requestNextFrame(function(){e._redraw(!1)},0))}},{key:"_redraw",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;var t={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();var r=this.canvas.getContext(),a=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(r.clearRect(0,0,a,o),this.canvas.frame.clientWidth===0)return;if(r.save(),r.translate(this.body.view.translation.x,this.body.view.translation.y),r.scale(this.body.view.scale,this.body.view.scale),r.beginPath(),this.body.emitter.emit("beforeDrawing",r),r.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(r),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){var s=this._drawNodes(r,e),u=s.drawExternalLabels;t.drawExternalLabels=u}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(r),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(r),r.beginPath(),this.body.emitter.emit("afterDrawing",r),r.closePath(),r.restore(),e===!0&&r.clearRect(0,0,a,o)}}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var e=this.canvas.getContext();e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale);var t=this.body.nodes,r;for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r=t[a],r.resize(e),r.updateBoundingBox(e,r.selected));e.restore()}},{key:"_drawNodes",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=this.body.nodes,a=this.body.nodeIndices,o,s=[],u=[],l=20,h=this.canvas.DOMtoCanvas({x:-l,y:-l}),d=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+l,y:this.canvas.frame.canvas.clientHeight+l}),f={top:h.y,left:h.x,bottom:d.y,right:d.x},c=[],v=0;v<a.length;v++)if(o=r[a[v]],o.hover)u.push(a[v]);else if(o.isSelected())s.push(a[v]);else if(t===!0){var g=o.draw(e);g.drawExternalLabel!=null&&c.push(g.drawExternalLabel)}else if(o.isBoundingBoxOverlappingWith(f)===!0){var b=o.draw(e);b.drawExternalLabel!=null&&c.push(b.drawExternalLabel)}else o.updateBoundingBox(e,o.selected);var p,$=s.length,y=u.length;for(p=0;p<$;p++){o=r[s[p]];var m=o.draw(e);m.drawExternalLabel!=null&&c.push(m.drawExternalLabel)}for(p=0;p<y;p++){o=r[u[p]];var _=o.draw(e);_.drawExternalLabel!=null&&c.push(_.drawExternalLabel)}return{drawExternalLabels:function(){var k=Ite(c),S;try{for(k.s();!(S=k.n()).done;){var w=S.value;w()}}catch(E){k.e(E)}finally{k.f()}}}}},{key:"_drawEdges",value:function(e){for(var t=this.body.edges,r=this.body.edgeIndices,a=0;a<r.length;a++){var o=t[r[a]];o.connected===!0&&o.draw(e)}}},{key:"_drawArrows",value:function(e){for(var t=this.body.edges,r=this.body.edgeIndices,a=0;a<r.length;a++){var o=t[r[a]];o.connected===!0&&o.drawArrows(e)}}},{key:"_determineBrowserMethod",value:function(){if(typeof window<"u"){var e=navigator.userAgent.toLowerCase();this.requiresTimeout=!1,ae(e).call(e,"msie 9.0")!=-1?this.requiresTimeout=!0:ae(e).call(e,"safari")!=-1&&ae(e).call(e,"chrome")<=-1&&(this.requiresTimeout=!0)}else this.requiresTimeout=!0}},{key:"_drawSelectionBox",value:function(e){if(this.body.selectionBox.show){e.beginPath();var t=this.body.selectionBox.position.end.x-this.body.selectionBox.position.start.x,r=this.body.selectionBox.position.end.y-this.body.selectionBox.position.start.y;e.rect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,r),e.fillStyle="rgba(151, 194, 252, 0.2)",e.fillRect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,r),e.strokeStyle="rgba(151, 194, 252, 1)",e.stroke()}else e.closePath()}}]),i}(),xte=re,Mte=xte.setInterval,Dte=Mte;function Os(i,n){n.inputHandler=function(e){e.isFirst&&n(e)},i.on("hammer.input",n.inputHandler)}function e_(i,n){return n.inputHandler=function(e){e.isFinal&&n(e)},i.on("hammer.input",n.inputHandler)}var Rte=function(){function i(n){D(this,i),this.body=n,this.pixelRatio=1,this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this._cleanupCallbacks=[],this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},Ce(this.options,this.defaultOptions),this.bindEventListeners()}return R(i,[{key:"bindEventListeners",value:function(){var e=this,t;this.body.emitter.once("resize",function(r){r.width!==0&&(e.body.view.translation.x=r.width*.5),r.height!==0&&(e.body.view.translation.y=r.height*.5)}),this.body.emitter.on("setSize",x(t=this.setSize).call(t,this)),this.body.emitter.on("destroy",function(){e.hammerFrame.destroy(),e.hammer.destroy(),e._cleanUp()})}},{key:"setOptions",value:function(e){var t=this;if(e!==void 0){var r=["width","height","autoResize"];Tn(r,this.options,e)}if(this._cleanUp(),this.options.autoResize===!0){var a;if(window.ResizeObserver){var o=new ResizeObserver(function(){var h=t.setSize();h===!0&&t.body.emitter.emit("_requestRedraw")}),s=this.frame;o.observe(s),this._cleanupCallbacks.push(function(){o.unobserve(s)})}else{var u=Dte(function(){var h=t.setSize();h===!0&&t.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(function(){clearInterval(u)})}var l=x(a=this._onResize).call(a,this);fY(window,"resize",l),this._cleanupCallbacks.push(function(){cY(window,"resize",l)})}}},{key:"_cleanUp",value:function(){var e,t,r;ve(e=ii(t=or(r=this._cleanupCallbacks).call(r,0)).call(t)).call(e,function(a){try{a()}catch(o){console.error(o)}})}},{key:"_onResize",value:function(){this.setSize(),this.body.emitter.emit("_redraw")}},{key:"_getCameraState",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}},{key:"_setCameraState",value:function(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){var e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,r=this.cameraState.scale;e!=1&&t!=1?r=this.cameraState.scale*.5*(e+t):e!=1?r=this.cameraState.scale*e:t!=1&&(r=this.cameraState.scale*t),this.body.view.scale=r;var a=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),o={x:a.x-this.cameraState.position.x,y:a.y-this.cameraState.position.y};this.body.view.translation.x+=o.x*this.body.view.scale,this.body.view.translation.y+=o.y*this.body.view.scale}}},{key:"_prepareValue",value:function(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(ae(e).call(e,"%")!==-1||ae(e).call(e,"px")!==-1)return e;if(ae(e).call(e,"%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{var e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var e=this;this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new Ki(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Ki.DIRECTION_ALL}),Os(this.hammer,function(t){e.body.eventListeners.onTouch(t)}),this.hammer.on("tap",function(t){e.body.eventListeners.onTap(t)}),this.hammer.on("doubletap",function(t){e.body.eventListeners.onDoubleTap(t)}),this.hammer.on("press",function(t){e.body.eventListeners.onHold(t)}),this.hammer.on("panstart",function(t){e.body.eventListeners.onDragStart(t)}),this.hammer.on("panmove",function(t){e.body.eventListeners.onDrag(t)}),this.hammer.on("panend",function(t){e.body.eventListeners.onDragEnd(t)}),this.hammer.on("pinch",function(t){e.body.eventListeners.onPinch(t)}),this.frame.canvas.addEventListener("wheel",function(t){e.body.eventListeners.onMouseWheel(t)}),this.frame.canvas.addEventListener("mousemove",function(t){e.body.eventListeners.onMouseMove(t)}),this.frame.canvas.addEventListener("contextmenu",function(t){e.body.eventListeners.onContext(t)}),this.hammerFrame=new Ki(this.frame),e_(this.hammerFrame,function(t){e.body.eventListeners.onRelease(t)})}},{key:"setSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),t=this._prepareValue(t);var r=!1,a=this.frame.canvas.width,o=this.frame.canvas.height,s=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t)this._getCameraState(s),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},r=!0;else{var u=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),l=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==u||this.frame.canvas.height!==l)&&this._getCameraState(s),this.frame.canvas.width!==u&&(this.frame.canvas.width=u,r=!0),this.frame.canvas.height!==l&&(this.frame.canvas.height=l,r=!0)}return r===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(a/this.pixelRatio),oldHeight:Math.round(o/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,r}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");var t=1;typeof window<"u"&&(t=window.devicePixelRatio||1);var r=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/r}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}},{key:"DOMtoCanvas",value:function(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}]),i}();function Fte(i,n){var e=Ce({nodes:n,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},i??{});if(!ue(e.nodes))throw new TypeError("Nodes has to be an array of ids.");if(e.nodes.length===0&&(e.nodes=n),!(typeof e.minZoomLevel=="number"&&e.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof e.maxZoomLevel=="number"&&e.minZoomLevel<=e.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return e}var Nte=function(){function i(n,e){var t,r=this,a;D(this,i),this.body=n,this.canvas=e,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",x(t=this.fit).call(t,this)),this.body.emitter.on("animationFinished",function(){r.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",x(a=this.releaseNode).call(a,this))}return R(i,[{key:"setOptions",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}},{key:"fit",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=Fte(e,this.body.nodeIndices);var r=this.canvas.frame.canvas.clientWidth,a=this.canvas.frame.canvas.clientHeight,o,s;if(r===0||a===0)s=1,o=Je.getRange(this.body.nodes,e.nodes);else if(t===!0){var u=0;for(var l in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,l)){var h=this.body.nodes[l];h.predefinedPosition===!0&&(u+=1)}if(u>.5*this.body.nodeIndices.length){this.fit(e,!1);return}o=Je.getRange(this.body.nodes,e.nodes);var d=this.body.nodeIndices.length;s=12.662/(d+7.4147)+.0964822;var f=Math.min(r/600,a/600);s*=f}else{this.body.emitter.emit("_resizeNodes"),o=Je.getRange(this.body.nodes,e.nodes);var c=Math.abs(o.maxX-o.minX)*1.1,v=Math.abs(o.maxY-o.minY)*1.1,g=r/c,b=a/v;s=g<=b?g:b}s>e.maxZoomLevel?s=e.maxZoomLevel:s<e.minZoomLevel&&(s=e.minZoomLevel);var p=Je.findCenter(o),$={position:p,scale:s,animation:e.animation};this.moveTo($)}},{key:"focus",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){var r={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=r,t.lockedOnNode=e,this.moveTo(t)}else console.error("Node: "+e+" cannot be found.")}},{key:"moveTo",value:function(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!Zr(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!Zr(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!Zr(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!Zr(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}},{key:"animateView",value:function(e){if(e!==void 0){this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;var t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),r={x:t.x-e.position.x,y:t.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+r.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+r.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var a;this.viewFunction=x(a=this._lockedRedraw).call(a,this),this.body.emitter.on("initRedraw",this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else{var o;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=x(o=this._transitionRedraw).call(o,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}}},{key:"_lockedRedraw",value:function(){var e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),r={x:t.x-e.x,y:t.y-e.y},a=this.body.view.translation,o={x:a.x+r.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:a.y+r.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=o}},{key:"releaseNode",value:function(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;var t=gY[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var r;this.viewFunction=x(r=this._lockedRedraw).call(r,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),i}();function cm(i){var n=i&&i.preventDefault||!1,e=i&&i.container||window,t={},r={keydown:{},keyup:{}},a={},o;for(o=97;o<=122;o++)a[String.fromCharCode(o)]={code:65+(o-97),shift:!1};for(o=65;o<=90;o++)a[String.fromCharCode(o)]={code:o,shift:!0};for(o=0;o<=9;o++)a[""+o]={code:48+o,shift:!1};for(o=1;o<=12;o++)a["F"+o]={code:111+o,shift:!1};for(o=0;o<=9;o++)a["num"+o]={code:96+o,shift:!1};a["num*"]={code:106,shift:!1},a["num+"]={code:107,shift:!1},a["num-"]={code:109,shift:!1},a["num/"]={code:111,shift:!1},a["num."]={code:110,shift:!1},a.left={code:37,shift:!1},a.up={code:38,shift:!1},a.right={code:39,shift:!1},a.down={code:40,shift:!1},a.space={code:32,shift:!1},a.enter={code:13,shift:!1},a.shift={code:16,shift:void 0},a.esc={code:27,shift:!1},a.backspace={code:8,shift:!1},a.tab={code:9,shift:!1},a.ctrl={code:17,shift:!1},a.alt={code:18,shift:!1},a.delete={code:46,shift:!1},a.pageup={code:33,shift:!1},a.pagedown={code:34,shift:!1},a["="]={code:187,shift:!1},a["-"]={code:189,shift:!1},a["]"]={code:221,shift:!1},a["["]={code:219,shift:!1};var s=function(h){l(h,"keydown")},u=function(h){l(h,"keyup")},l=function(h,d){if(r[d][h.keyCode]!==void 0){for(var f=r[d][h.keyCode],c=0;c<f.length;c++)(f[c].shift===void 0||f[c].shift==!0&&h.shiftKey==!0||f[c].shift==!1&&h.shiftKey==!1)&&f[c].fn(h);n==!0&&h.preventDefault()}};return t.bind=function(h,d,f){if(f===void 0&&(f="keydown"),a[h]===void 0)throw new Error("unsupported key: "+h);r[f][a[h].code]===void 0&&(r[f][a[h].code]=[]),r[f][a[h].code].push({fn:d,shift:a[h].shift})},t.bindAll=function(h,d){d===void 0&&(d="keydown");for(var f in a)a.hasOwnProperty(f)&&t.bind(f,h,d)},t.getKey=function(h){for(var d in a)if(a.hasOwnProperty(d)){if(h.shiftKey==!0&&a[d].shift==!0&&h.keyCode==a[d].code)return d;if(h.shiftKey==!1&&a[d].shift==!1&&h.keyCode==a[d].code)return d;if(h.keyCode==a[d].code&&d=="shift")return d}return"unknown key, currently not supported"},t.unbind=function(h,d,f){if(f===void 0&&(f="keydown"),a[h]===void 0)throw new Error("unsupported key: "+h);if(d!==void 0){var c=[],v=r[f][a[h].code];if(v!==void 0)for(var g=0;g<v.length;g++)v[g].fn==d&&v[g].shift==a[h].shift||c.push(r[f][a[h].code][g]);r[f][a[h].code]=c}else r[f][a[h].code]=[]},t.reset=function(){r={keydown:{},keyup:{}}},t.destroy=function(){r={keydown:{},keyup:{}},e.removeEventListener("keydown",s,!0),e.removeEventListener("keyup",u,!0)},e.addEventListener("keydown",s,!0),e.addEventListener("keyup",u,!0),t}var Bte=function(){function i(n,e){var t=this;D(this,i),this.body=n,this.canvas=e,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",function(){t.activated=!0,t.configureKeyboardBindings()}),this.body.emitter.on("deactivate",function(){t.activated=!1,t.configureKeyboardBindings()}),this.body.emitter.on("destroy",function(){t.keycharm!==void 0&&t.keycharm.destroy()}),this.options={}}return R(i,[{key:"setOptions",value:function(e){e!==void 0&&(this.options=e,this.create())}},{key:"create",value:function(){this.options.navigationButtons===!0?this.iconsCreated===!1&&this.loadNavigationElements():this.iconsCreated===!0&&this.cleanNavigation(),this.configureKeyboardBindings()}},{key:"cleanNavigation",value:function(){if(this.navigationHammers.length!=0){for(var e=0;e<this.navigationHammers.length;e++)this.navigationHammers[e].destroy();this.navigationHammers=[]}this.navigationDOM&&this.navigationDOM.wrapper&&this.navigationDOM.wrapper.parentNode&&this.navigationDOM.wrapper.parentNode.removeChild(this.navigationDOM.wrapper),this.iconsCreated=!1}},{key:"loadNavigationElements",value:function(){var e=this;this.cleanNavigation(),this.navigationDOM={};var t=["up","down","left","right","zoomIn","zoomOut","zoomExtends"],r=["_moveUp","_moveDown","_moveLeft","_moveRight","_zoomIn","_zoomOut","_fit"];this.navigationDOM.wrapper=document.createElement("div"),this.navigationDOM.wrapper.className="vis-navigation",this.canvas.frame.appendChild(this.navigationDOM.wrapper);for(var a=0;a<t.length;a++){this.navigationDOM[t[a]]=document.createElement("div"),this.navigationDOM[t[a]].className="vis-button vis-"+t[a],this.navigationDOM.wrapper.appendChild(this.navigationDOM[t[a]]);var o=new Ki(this.navigationDOM[t[a]]);if(r[a]==="_fit"){var s;Os(o,x(s=this._fit).call(s,this))}else{var u;Os(o,x(u=this.bindToRedraw).call(u,this,r[a]))}this.navigationHammers.push(o)}var l=new Ki(this.canvas.frame);e_(l,function(){e._stopMovement()}),this.navigationHammers.push(l),this.iconsCreated=!0}},{key:"bindToRedraw",value:function(e){if(this.boundFunctions[e]===void 0){var t;this.boundFunctions[e]=x(t=this[e]).call(t,this),this.body.emitter.on("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_startRendering")}}},{key:"unbindFromRedraw",value:function(e){this.boundFunctions[e]!==void 0&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[e])}},{key:"_fit",value:function(){new Date().valueOf()-this.touchTime>700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}},{key:"_stopMovement",value:function(){for(var e in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,e)&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var e=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),r=this.body.view.translation,a=t/e,o=(1-a)*this.canvas.canvasViewCenter.x+r.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+r.y*a;this.body.view.scale=t,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var e=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),r=this.body.view.translation,a=t/e,o=(1-a)*this.canvas.canvasViewCenter.x+r.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+r.y*a;this.body.view.scale=t,this.body.view.translation={x:o,y:s},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var e=this;if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=cm({container:window,preventDefault:!0}):this.keycharm=cm({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var t,r,a,o,s,u,l,h,d,f,c,v,g,b,p,$,y,m,_,O,k,S,w,E;x(t=this.keycharm).call(t,"up",function(){e.bindToRedraw("_moveUp")},"keydown"),x(r=this.keycharm).call(r,"down",function(){e.bindToRedraw("_moveDown")},"keydown"),x(a=this.keycharm).call(a,"left",function(){e.bindToRedraw("_moveLeft")},"keydown"),x(o=this.keycharm).call(o,"right",function(){e.bindToRedraw("_moveRight")},"keydown"),x(s=this.keycharm).call(s,"=",function(){e.bindToRedraw("_zoomIn")},"keydown"),x(u=this.keycharm).call(u,"num+",function(){e.bindToRedraw("_zoomIn")},"keydown"),x(l=this.keycharm).call(l,"num-",function(){e.bindToRedraw("_zoomOut")},"keydown"),x(h=this.keycharm).call(h,"-",function(){e.bindToRedraw("_zoomOut")},"keydown"),x(d=this.keycharm).call(d,"[",function(){e.bindToRedraw("_zoomOut")},"keydown"),x(f=this.keycharm).call(f,"]",function(){e.bindToRedraw("_zoomIn")},"keydown"),x(c=this.keycharm).call(c,"pageup",function(){e.bindToRedraw("_zoomIn")},"keydown"),x(v=this.keycharm).call(v,"pagedown",function(){e.bindToRedraw("_zoomOut")},"keydown"),x(g=this.keycharm).call(g,"up",function(){e.unbindFromRedraw("_moveUp")},"keyup"),x(b=this.keycharm).call(b,"down",function(){e.unbindFromRedraw("_moveDown")},"keyup"),x(p=this.keycharm).call(p,"left",function(){e.unbindFromRedraw("_moveLeft")},"keyup"),x($=this.keycharm).call($,"right",function(){e.unbindFromRedraw("_moveRight")},"keyup"),x(y=this.keycharm).call(y,"=",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),x(m=this.keycharm).call(m,"num+",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),x(_=this.keycharm).call(_,"num-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),x(O=this.keycharm).call(O,"-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),x(k=this.keycharm).call(k,"[",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),x(S=this.keycharm).call(S,"]",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),x(w=this.keycharm).call(w,"pageup",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),x(E=this.keycharm).call(E,"pagedown",function(){e.unbindFromRedraw("_zoomOut")},"keyup")}}}]),i}();function Lte(i,n){var e=typeof yr<"u"&&Qt(i)||i["@@iterator"];if(!e){if(ue(i)||(e=zte(i))||n&&i&&typeof i.length=="number"){e&&(i=e);var t=0,r=function(){};return{s:r,n:function(){return t>=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
96
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function zte(i,n){var e;if(i){if(typeof i=="string")return vm(i,n);var t=Be(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Lr(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return vm(i,n)}}function vm(i,n){(n==null||n>i.length)&&(n=i.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=i[e];return t}var jte=function(){function i(n,e,t){var r,a,o,s,u,l,h,d,f,c,v,g,b;D(this,i),this.body=n,this.canvas=e,this.selectionHandler=t,this.navigationHandler=new Bte(n,e),this.body.eventListeners.onTap=x(r=this.onTap).call(r,this),this.body.eventListeners.onTouch=x(a=this.onTouch).call(a,this),this.body.eventListeners.onDoubleTap=x(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=x(s=this.onHold).call(s,this),this.body.eventListeners.onDragStart=x(u=this.onDragStart).call(u,this),this.body.eventListeners.onDrag=x(l=this.onDrag).call(l,this),this.body.eventListeners.onDragEnd=x(h=this.onDragEnd).call(h,this),this.body.eventListeners.onMouseWheel=x(d=this.onMouseWheel).call(d,this),this.body.eventListeners.onPinch=x(f=this.onPinch).call(f,this),this.body.eventListeners.onMouseMove=x(c=this.onMouseMove).call(c,this),this.body.eventListeners.onRelease=x(v=this.onRelease).call(v,this),this.body.eventListeners.onContext=x(g=this.onContext).call(g,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=x(b=this.getPointer).call(b,this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0,autoFocus:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},Ce(this.options,this.defaultOptions),this.bindEventListeners()}return R(i,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("destroy",function(){clearTimeout(e.popupTimer),delete e.body.functions.getPointer})}},{key:"setOptions",value:function(e){if(e!==void 0){var t=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"];ws(t,this.options,e),_t(this.options,e,"keyboard"),e.tooltip&&(Ce(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=Sd(e.tooltip.color)))}this.navigationHandler.setOptions(this.options)}},{key:"getPointer",value:function(e){return{x:e.x-hY(this.canvas.frame.canvas),y:e.y-dY(this.canvas.frame.canvas)}}},{key:"onTouch",value:function(e){new Date().valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=new Date().valueOf())}},{key:"onTap",value:function(e){var t=this.getPointer(e.center),r=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,r),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t)}},{key:"onDoubleTap",value:function(e){var t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,t)}},{key:"onHold",value:function(e){var t=this.getPointer(e.center),r=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,r),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t),this.selectionHandler.generateClickEvent("hold",e,t)}},{key:"onRelease",value:function(e){if(new Date().valueOf()-this.touchTime>10){var t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,t),this.touchTime=new Date().valueOf()}}},{key:"onContext",value:function(e){var t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,t)}},{key:"checkSelectionChanges",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;t===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}},{key:"_determineDifference",value:function(e,t){var r=function(o,s){for(var u=[],l=0;l<o.length;l++){var h=o[l];ae(s).call(s,h)===-1&&u.push(h)}return u};return{nodes:r(e.nodes,t.nodes),edges:r(e.edges,t.edges)}}},{key:"onDragStart",value:function(e){if(!this.drag.dragging){this.drag.pointer===void 0&&this.onTouch(e);var t=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=Ce({},this.body.view.translation),this.drag.nodeId=void 0,e.srcEvent.shiftKey){this.body.selectionBox.show=!0;var r=this.getPointer(e.center);this.body.selectionBox.position.start={x:this.canvas._XconvertDOMtoCanvas(r.x),y:this.canvas._YconvertDOMtoCanvas(r.y)},this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(r.x),y:this.canvas._YconvertDOMtoCanvas(r.y)}}if(t!==void 0&&this.options.dragNodes===!0){this.drag.nodeId=t.id,t.isSelected()===!1&&this.selectionHandler.setSelection({nodes:[t.id]}),this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer);var a=Lte(this.selectionHandler.getSelectedNodes()),o;try{for(a.s();!(o=a.n()).done;){var s=o.value,u={id:s.id,node:s,x:s.x,y:s.y,xFixed:s.options.fixed.x,yFixed:s.options.fixed.y};s.options.fixed.x=!0,s.options.fixed.y=!0,this.drag.selection.push(u)}}catch(l){a.e(l)}finally{a.f()}}else this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer,void 0,!0)}}},{key:"onDrag",value:function(e){var t=this;if(this.drag.pinched!==!0){this.body.emitter.emit("unlockNode");var r=this.getPointer(e.center),a=this.drag.selection;if(a&&a.length&&this.options.dragNodes===!0){this.selectionHandler.generateClickEvent("dragging",e,r);var o=r.x-this.drag.pointer.x,s=r.y-this.drag.pointer.y;ve(a).call(a,function(h){var d=h.node;h.xFixed===!1&&(d.x=t.canvas._XconvertDOMtoCanvas(t.canvas._XconvertCanvasToDOM(h.x)+o)),h.yFixed===!1&&(d.y=t.canvas._YconvertDOMtoCanvas(t.canvas._YconvertCanvasToDOM(h.y)+s))}),this.body.emitter.emit("startSimulation")}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,r,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(r.x),y:this.canvas._YconvertDOMtoCanvas(r.y)},this.body.emitter.emit("_requestRedraw")}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,r,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}var u=r.x-this.drag.pointer.x,l=r.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+u,y:this.drag.translation.y+l},this.body.emitter.emit("_requestRedraw")}}}}},{key:"onDragEnd",value:function(e){var t=this;if(this.drag.dragging=!1,this.body.selectionBox.show){var r;this.body.selectionBox.show=!1;var a=this.body.selectionBox.position,o={minX:Math.min(a.start.x,a.end.x),minY:Math.min(a.start.y,a.end.y),maxX:Math.max(a.start.x,a.end.x),maxY:Math.max(a.start.y,a.end.y)},s=ht(r=this.body.nodeIndices).call(r,function(h){var d=t.body.nodes[h];return d.x>=o.minX&&d.x<=o.maxX&&d.y>=o.minY&&d.y<=o.maxY});ve(s).call(s,function(h){return t.selectionHandler.selectObject(t.body.nodes[h])});var u=this.getPointer(e.center);this.selectionHandler.commitAndEmit(u,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{var l=this.drag.selection;l&&l.length?(ve(l).call(l,function(h){h.node.options.fixed.x=h.xFixed,h.node.options.fixed.y=h.yFixed}),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}},{key:"onPinch",value:function(e){var t=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);var r=this.pinch.scale*e.scale;this.zoom(r,t)}},{key:"zoom",value:function(e,t){if(this.options.zoomView===!0){var r=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);var a=void 0;this.drag!==void 0&&this.drag.dragging===!0&&(a=this.canvas.DOMtoCanvas(this.drag.pointer));var o=this.body.view.translation,s=e/r,u=(1-s)*t.x+o.x*s,l=(1-s)*t.y+o.y*s;if(this.body.view.scale=e,this.body.view.translation={x:u,y:l},a!=null){var h=this.canvas.canvasToDOM(a);this.drag.pointer.x=h.x,this.drag.pointer.y=h.y}this.body.emitter.emit("_requestRedraw"),r<e?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:t}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:t})}}},{key:"onMouseWheel",value:function(e){if(this.options.zoomView===!0){if(e.deltaY!==0){var t=this.body.view.scale;t*=1+(e.deltaY<0?1:-1)*(this.options.zoomSpeed*.1);var r=this.getPointer({x:e.clientX,y:e.clientY});this.zoom(t,r)}e.preventDefault()}}},{key:"onMouseMove",value:function(e){var t=this,r=this.getPointer({x:e.clientX,y:e.clientY}),a=!1;this.popup!==void 0&&(this.popup.hidden===!1&&this._checkHidePopup(r),this.popup.hidden===!1&&(a=!0,this.popup.setPosition(r.x+3,r.y-5),this.popup.show())),this.options.keyboard.autoFocus&&this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),a===!1&&(this.popupTimer!==void 0&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=qt(function(){return t._checkShowPopup(r)},this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,r)}},{key:"_checkShowPopup",value:function(e){var t=this.canvas._XconvertDOMtoCanvas(e.x),r=this.canvas._YconvertDOMtoCanvas(e.y),a={left:t,top:r,right:t,bottom:r},o=this.popupObj===void 0?void 0:this.popupObj.id,s=!1,u="node";if(this.popupObj===void 0){for(var l=this.body.nodeIndices,h=this.body.nodes,d,f=[],c=0;c<l.length;c++)d=h[l[c]],d.isOverlappingWith(a)===!0&&(s=!0,d.getTitle()!==void 0&&f.push(l[c]));f.length>0&&(this.popupObj=h[f[f.length-1]],s=!0)}if(this.popupObj===void 0&&s===!1){for(var v=this.body.edgeIndices,g=this.body.edges,b,p=[],$=0;$<v.length;$++)b=g[v[$]],b.isOverlappingWith(a)===!0&&b.connected===!0&&b.getTitle()!==void 0&&p.push(v[$]);p.length>0&&(this.popupObj=g[p[p.length-1]],u="edge")}this.popupObj!==void 0?this.popupObj.id!==o&&(this.popup===void 0&&(this.popup=new SY(this.canvas.frame)),this.popup.popupTargetType=u,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(e){var t=this.selectionHandler._pointerToPositionObject(e),r=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(r=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),r===!0)){var a=this.selectionHandler.getNodeAt(e);r=a===void 0?!1:a.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(r=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));r===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),i}(),Hte=Zf,Wte=Bw;Hte("Set",function(i){return function(){return i(this,arguments.length?arguments[0]:void 0)}},Wte);var Vte=re,Ute=Vte.Set,Gte=Ute,Kte=Gte,Yr=Kte,qte=oe,pm=Jf,Mo=so.exports.getWeakData,Yte=$t,yh=He,Xte=Qf,Qte=Xf,t_=zr,gm=Xe,r_=Si,Zte=r_.set,Jte=r_.getterFor,ere=t_.find,tre=t_.findIndex,rre=qte([].splice),ire=0,Do=function(i){return i.frozen||(i.frozen=new i_)},i_=function(){this.entries=[]},mh=function(i,n){return ere(i.entries,function(e){return e[0]===n})};i_.prototype={get:function(i){var n=mh(this,i);if(n)return n[1]},has:function(i){return!!mh(this,i)},set:function(i,n){var e=mh(this,i);e?e[1]=n:this.entries.push([i,n])},delete:function(i){var n=tre(this.entries,function(e){return e[0]===i});return~n&&rre(this.entries,n,1),!!~n}};var nre={getConstructor:function(i,n,e,t){var r=i(function(u,l){Xte(u,a),Zte(u,{type:n,id:ire++,frozen:void 0}),l!=null&&Qte(l,u[t],{that:u,AS_ENTRIES:e})}),a=r.prototype,o=Jte(n),s=function(u,l,h){var d=o(u),f=Mo(Yte(l),!0);return f===!0?Do(d).set(l,h):f[d.id]=h,u};return pm(a,{delete:function(u){var l=o(this);if(!yh(u))return!1;var h=Mo(u);return h===!0?Do(l).delete(u):h&&gm(h,l.id)&&delete h[l.id]},has:function(l){var h=o(this);if(!yh(l))return!1;var d=Mo(l);return d===!0?Do(h).has(l):d&&gm(d,h.id)}}),pm(a,e?{get:function(l){var h=o(this);if(yh(l)){var d=Mo(l);return d===!0?Do(h).get(l):d?d[h.id]:void 0}},set:function(l,h){return s(this,l,h)}}:{add:function(l){return s(this,l,!0)}}),r}},ym=G,Ro=oe,are=Jf,ore=so.exports,sre=Zf,n_=nre,Fo=He,No=Dw,Bo=Si.enforce,ure=N1,lre=!ym.ActiveXObject&&"ActiveXObject"in ym,Rn,a_=function(i){return function(){return i(this,arguments.length?arguments[0]:void 0)}},hre=sre("WeakMap",a_,n_);if(ure&&lre){Rn=n_.getConstructor(a_,"WeakMap",!0),ore.enable();var Fn=hre.prototype,mm=Ro(Fn.delete),Lo=Ro(Fn.has),bm=Ro(Fn.get),$m=Ro(Fn.set);are(Fn,{delete:function(i){if(Fo(i)&&!No(i)){var n=Bo(this);return n.frozen||(n.frozen=new Rn),mm(this,i)||n.frozen.delete(i)}return mm(this,i)},has:function(n){if(Fo(n)&&!No(n)){var e=Bo(this);return e.frozen||(e.frozen=new Rn),Lo(this,n)||e.frozen.has(n)}return Lo(this,n)},get:function(n){if(Fo(n)&&!No(n)){var e=Bo(this);return e.frozen||(e.frozen=new Rn),Lo(this,n)?bm(this,n):e.frozen.get(n)}return bm(this,n)},set:function(n,e){if(Fo(n)&&!No(n)){var t=Bo(this);t.frozen||(t.frozen=new Rn),Lo(this,n)?$m(this,n,e):t.frozen.set(n,e)}else $m(this,n,e);return this}})}var dre=re,fre=dre.WeakMap,cre=fre,vre=cre,Kn=vre;/*! *****************************************************************************
|
|
97
|
-
Copyright (c) Microsoft Corporation.
|
|
98
|
-
|
|
99
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
100
|
-
purpose with or without fee is hereby granted.
|
|
101
|
-
|
|
102
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
103
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
104
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
105
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
106
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
107
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
108
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
109
|
-
***************************************************************************** */function ge(i,n,e,t){if(e==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?i!==n||!t:!n.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?t:e==="a"?t.call(i):t?t.value:n.get(i)}function Ad(i,n,e,t,r){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?i!==n||!r:!n.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?r.call(i,e):r?r.value=e:n.set(i,e),e}function xd(i,n){var e=typeof yr<"u"&&Qt(i)||i["@@iterator"];if(!e){if(ue(i)||(e=pre(i))||n&&i&&typeof i.length=="number"){e&&(i=e);var t=0,r=function(){};return{s:r,n:function(){return t>=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
110
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function pre(i,n){var e;if(i){if(typeof i=="string")return wm(i,n);var t=Be(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Lr(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return wm(i,n)}}function wm(i,n){(n==null||n>i.length)&&(n=i.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=i[e];return t}var qr,wt,$r,wr,es;function _m(i,n){var e=new Yr,t=xd(n),r;try{for(t.s();!(r=t.n()).done;){var a=r.value;i.has(a)||e.add(a)}}catch(o){t.e(o)}finally{t.f()}return e}var Em=function(){function i(){D(this,i),qr.set(this,new Yr),wt.set(this,new Yr)}return R(i,[{key:"size",get:function(){return ge(this,wt,"f").size}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var a=0,o=t;a<o.length;a++){var s=o[a];ge(this,wt,"f").add(s)}}},{key:"delete",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var a=0,o=t;a<o.length;a++){var s=o[a];ge(this,wt,"f").delete(s)}}},{key:"clear",value:function(){ge(this,wt,"f").clear()}},{key:"getSelection",value:function(){return Ht(ge(this,wt,"f"))}},{key:"getChanges",value:function(){return{added:Ht(_m(ge(this,qr,"f"),ge(this,wt,"f"))),deleted:Ht(_m(ge(this,wt,"f"),ge(this,qr,"f"))),previous:Ht(new Yr(ge(this,qr,"f"))),current:Ht(new Yr(ge(this,wt,"f")))}}},{key:"commit",value:function(){var e=this.getChanges();Ad(this,qr,ge(this,wt,"f"),"f"),Ad(this,wt,new Yr(ge(this,qr,"f")),"f");var t=xd(e.added),r;try{for(t.s();!(r=t.n()).done;){var a=r.value;a.select()}}catch(l){t.e(l)}finally{t.f()}var o=xd(e.deleted),s;try{for(o.s();!(s=o.n()).done;){var u=s.value;u.unselect()}}catch(l){o.e(l)}finally{o.f()}return e}}]),i}();qr=new Kn,wt=new Kn;var gre=function(){function i(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};D(this,i),$r.set(this,new Em),wr.set(this,new Em),es.set(this,void 0),Ad(this,es,n,"f")}return R(i,[{key:"sizeNodes",get:function(){return ge(this,$r,"f").size}},{key:"sizeEdges",get:function(){return ge(this,wr,"f").size}},{key:"getNodes",value:function(){return ge(this,$r,"f").getSelection()}},{key:"getEdges",value:function(){return ge(this,wr,"f").getSelection()}},{key:"addNodes",value:function(){var e;(e=ge(this,$r,"f")).add.apply(e,arguments)}},{key:"addEdges",value:function(){var e;(e=ge(this,wr,"f")).add.apply(e,arguments)}},{key:"deleteNodes",value:function(e){ge(this,$r,"f").delete(e)}},{key:"deleteEdges",value:function(e){ge(this,wr,"f").delete(e)}},{key:"clear",value:function(){ge(this,$r,"f").clear(),ge(this,wr,"f").clear()}},{key:"commit",value:function(){for(var e,t,r={nodes:ge(this,$r,"f").commit(),edges:ge(this,wr,"f").commit()},a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return(e=ge(this,es,"f")).call.apply(e,Rf(t=[this,r]).call(t,o)),r}}]),i}();$r=new Kn,wr=new Kn,es=new Kn;function Sm(i,n){var e=typeof yr<"u"&&Qt(i)||i["@@iterator"];if(!e){if(ue(i)||(e=yre(i))||n&&i&&typeof i.length=="number"){e&&(i=e);var t=0,r=function(){};return{s:r,n:function(){return t>=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
111
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function yre(i,n){var e;if(i){if(typeof i=="string")return Om(i,n);var t=Be(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Lr(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Om(i,n)}}function Om(i,n){(n==null||n>i.length)&&(n=i.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=i[e];return t}var mre=function(){function i(n,e){var t=this;D(this,i),this.body=n,this.canvas=e,this._selectionAccumulator=new gre,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},Ce(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",function(){t.updateSelection()})}return R(i,[{key:"setOptions",value:function(e){if(e!==void 0){var t=["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"];Tn(t,this.options,e)}}},{key:"selectOnPoint",value:function(e){var t=!1;if(this.options.selectable===!0){var r=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),r!==void 0&&(t=this.selectObject(r)),this.body.emitter.emit("_requestRedraw")}return t}},{key:"selectAdditionalOnPoint",value:function(e){var t=!1;if(this.options.selectable===!0){var r=this.getNodeAt(e)||this.getEdgeAt(e);r!==void 0&&(t=!0,r.isSelected()===!0?this.deselectObject(r):this.selectObject(r),this.body.emitter.emit("_requestRedraw"))}return t}},{key:"_initBaseEvent",value:function(e,t){var r={};return r.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},r.event=e,r}},{key:"generateClickEvent",value:function(e,t,r,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=this._initBaseEvent(t,r);if(o===!0)s.nodes=[],s.edges=[];else{var u=this.getSelection();s.nodes=u.nodes,s.edges=u.edges}a!==void 0&&(s.previousSelection=a),e=="click"&&(s.items=this.getClickedItems(r)),t.controlEdge!==void 0&&(s.controlEdge=t.controlEdge),this.body.emitter.emit(e,s)}},{key:"selectObject",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;if(e!==void 0){if(e instanceof vt){if(t===!0){var r;(r=this._selectionAccumulator).addEdges.apply(r,Ht(e.edges))}this._selectionAccumulator.addNodes(e)}else this._selectionAccumulator.addEdges(e);return!0}return!1}},{key:"deselectObject",value:function(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}},{key:"_getAllNodesOverlappingWith",value:function(e){for(var t=[],r=this.body.nodes,a=0;a<this.body.nodeIndices.length;a++){var o=this.body.nodeIndices[a];r[o].isOverlappingWith(e)&&t.push(o)}return t}},{key:"_pointerToPositionObject",value:function(e){var t=this.canvas.DOMtoCanvas(e);return{left:t.x-1,top:t.y+1,right:t.x+1,bottom:t.y-1}}},{key:"getNodeAt",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this._pointerToPositionObject(e),a=this._getAllNodesOverlappingWith(r);if(a.length>0)return t===!0?this.body.nodes[a[a.length-1]]:a[a.length-1]}},{key:"_getEdgesOverlappingWith",value:function(e,t){for(var r=this.body.edges,a=0;a<this.body.edgeIndices.length;a++){var o=this.body.edgeIndices[a];r[o].isOverlappingWith(e)&&t.push(o)}}},{key:"_getAllEdgesOverlappingWith",value:function(e){var t=[];return this._getEdgesOverlappingWith(e,t),t}},{key:"getEdgeAt",value:function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this.canvas.DOMtoCanvas(e),a=10,o=null,s=this.body.edges,u=0;u<this.body.edgeIndices.length;u++){var l=this.body.edgeIndices[u],h=s[l];if(h.connected){var d=h.from.x,f=h.from.y,c=h.to.x,v=h.to.y,g=h.edgeType.getDistanceToEdge(d,f,c,v,r.x,r.y);g<a&&(o=l,a=g)}}if(o!==null)return t===!0?this.body.edges[o]:o}},{key:"_addToHover",value:function(e){e instanceof vt?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}},{key:"_removeFromSelection",value:function(e){if(e instanceof vt){var t;this._selectionAccumulator.deleteNodes(e),(t=this._selectionAccumulator).deleteEdges.apply(t,Ht(e.edges))}else this._selectionAccumulator.deleteEdges(e)}},{key:"unselectAll",value:function(){this._selectionAccumulator.clear()}},{key:"getSelectedNodeCount",value:function(){return this._selectionAccumulator.sizeNodes}},{key:"getSelectedEdgeCount",value:function(){return this._selectionAccumulator.sizeEdges}},{key:"_hoverConnectedEdges",value:function(e){for(var t=0;t<e.edges.length;t++){var r=e.edges[t];r.hover=!0,this._addToHover(r)}}},{key:"emitBlurEvent",value:function(e,t,r){var a=this._initBaseEvent(e,t);r.hover===!0&&(r.hover=!1,r instanceof vt?(a.node=r.id,this.body.emitter.emit("blurNode",a)):(a.edge=r.id,this.body.emitter.emit("blurEdge",a)))}},{key:"emitHoverEvent",value:function(e,t,r){var a=this._initBaseEvent(e,t),o=!1;return r.hover===!1&&(r.hover=!0,this._addToHover(r),o=!0,r instanceof vt?(a.node=r.id,this.body.emitter.emit("hoverNode",a)):(a.edge=r.id,this.body.emitter.emit("hoverEdge",a))),o}},{key:"hoverObject",value:function(e,t){var r=this.getNodeAt(t);r===void 0&&(r=this.getEdgeAt(t));var a=!1;for(var o in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,o)&&(r===void 0||r instanceof vt&&r.id!=o||r instanceof qi)&&(this.emitBlurEvent(e,t,this.hoverObj.nodes[o]),delete this.hoverObj.nodes[o],a=!0);for(var s in this.hoverObj.edges)Object.prototype.hasOwnProperty.call(this.hoverObj.edges,s)&&(a===!0?(this.hoverObj.edges[s].hover=!1,delete this.hoverObj.edges[s]):(r===void 0||r instanceof qi&&r.id!=s||r instanceof vt&&!r.hover)&&(this.emitBlurEvent(e,t,this.hoverObj.edges[s]),delete this.hoverObj.edges[s],a=!0));if(r!==void 0){var u=we(this.hoverObj.edges).length,l=we(this.hoverObj.nodes).length,h=r instanceof qi&&u===0&&l===0,d=r instanceof vt&&u===0&&l===0;(a||h||d)&&(a=this.emitHoverEvent(e,t,r)),r instanceof vt&&this.options.hoverConnectedEdges===!0&&this._hoverConnectedEdges(r)}a===!0&&this.body.emitter.emit("_requestRedraw")}},{key:"commitWithoutEmitting",value:function(){this._selectionAccumulator.commit()}},{key:"commitAndEmit",value:function(e,t){var r=!1,a=this._selectionAccumulator.commit(),o={nodes:a.nodes.previous,edges:a.edges.previous};a.edges.deleted.length>0&&(this.generateClickEvent("deselectEdge",t,e,o),r=!0),a.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",t,e,o),r=!0),a.nodes.added.length>0&&(this.generateClickEvent("selectNode",t,e),r=!0),a.edges.added.length>0&&(this.generateClickEvent("selectEdge",t,e),r=!0),r===!0&&this.generateClickEvent("select",t,e)}},{key:"getSelection",value:function(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}},{key:"getSelectedNodes",value:function(){return this._selectionAccumulator.getNodes()}},{key:"getSelectedEdges",value:function(){return this._selectionAccumulator.getEdges()}},{key:"getSelectedNodeIds",value:function(){var e;return en(e=this._selectionAccumulator.getNodes()).call(e,function(t){return t.id})}},{key:"getSelectedEdgeIds",value:function(){var e;return en(e=this._selectionAccumulator.getEdges()).call(e,function(t){return t.id})}},{key:"setSelection",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes){var r=Sm(e.nodes),a;try{for(r.s();!(a=r.n()).done;){var o=a.value,s=this.body.nodes[o];if(!s)throw new RangeError('Node with id "'+o+'" not found');this.selectObject(s,t.highlightEdges)}}catch(f){r.e(f)}finally{r.f()}}if(e.edges){var u=Sm(e.edges),l;try{for(u.s();!(l=u.n()).done;){var h=l.value,d=this.body.edges[h];if(!d)throw new RangeError('Edge with id "'+h+'" not found');this.selectObject(d)}}catch(f){u.e(f)}finally{u.f()}}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}},{key:"selectNodes",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:t})}},{key:"selectEdges",value:function(e){if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:e})}},{key:"updateSelection",value:function(){for(var e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(var t in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,t.id)||this._selectionAccumulator.deleteEdges(t)}},{key:"getClickedItems",value:function(e){for(var t=this.canvas.DOMtoCanvas(e),r=[],a=this.body.nodeIndices,o=this.body.nodes,s=a.length-1;s>=0;s--){var u=o[a[s]],l=u.getItemsOnPoint(t);r.push.apply(r,l)}for(var h=this.body.edgeIndices,d=this.body.edges,f=h.length-1;f>=0;f--){var c=d[h[f]],v=c.getItemsOnPoint(t);r.push.apply(r,v)}return r}}]),i}(),Tm=s0,bre=Math.floor,Md=function(i,n){var e=i.length,t=bre(e/2);return e<8?$re(i,n):wre(i,Md(Tm(i,0,t),n),Md(Tm(i,t),n),n)},$re=function(i,n){for(var e=i.length,t=1,r,a;t<e;){for(a=t,r=i[t];a&&n(i[a-1],r)>0;)i[a]=i[--a];a!==t++&&(i[a]=r)}return i},wre=function(i,n,e,t){for(var r=n.length,a=e.length,o=0,s=0;o<r||s<a;)i[o+s]=o<r&&s<a?t(n[o],e[s])<=0?n[o++]:e[s++]:o<r?n[o++]:e[s++];return i},_re=Md,Ere=za,km=Ere.match(/firefox\/(\d+)/i),Sre=!!km&&+km[1],Ore=za,Tre=/MSIE|Trident/.test(Ore),kre=za,Im=kre.match(/AppleWebKit\/(\d+)\./),Ire=!!Im&&+Im[1],Pre=Y,o_=oe,Cre=yn,Are=mt,xre=zt,Pm=Br,nc=de,Mre=_re,Dre=Sn,Cm=Sre,Rre=Tre,Am=ja,xm=Ire,Ar=[],Mm=o_(Ar.sort),Fre=o_(Ar.push),Nre=nc(function(){Ar.sort(void 0)}),Bre=nc(function(){Ar.sort(null)}),Lre=Dre("sort"),s_=!nc(function(){if(Am)return Am<70;if(!(Cm&&Cm>3)){if(Rre)return!0;if(xm)return xm<603;var i="",n,e,t,r;for(n=65;n<76;n++){switch(e=String.fromCharCode(n),n){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(r=0;r<47;r++)Ar.push({k:e+r,v:t})}for(Ar.sort(function(a,o){return o.v-a.v}),r=0;r<Ar.length;r++)e=Ar[r].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return i!=="DGBEFHACIJK"}}),zre=Nre||!Bre||!Lre||!s_,jre=function(i){return function(n,e){return e===void 0?-1:n===void 0?1:i!==void 0?+i(n,e)||0:Pm(n)>Pm(e)?1:-1}};Pre({target:"Array",proto:!0,forced:zre},{sort:function(n){n!==void 0&&Cre(n);var e=Are(this);if(s_)return n===void 0?Mm(e):Mm(e,n);var t=[],r=xre(e),a,o;for(o=0;o<r;o++)o in e&&Fre(t,e[o]);for(Mre(t,jre(n)),a=t.length,o=0;o<a;)e[o]=t[o++];for(;o<r;)delete e[o++];return e}});var Hre=We,Wre=Hre("Array").sort,Vre=Me,Ure=Wre,bh=Array.prototype,Gre=function(i){var n=i.sort;return i===bh||Vre(bh,i)&&n===bh.sort?Ure:n},Kre=Gre,qre=Kre,$h=qre,Yre=G,Xre=yn,Qre=mt,Zre=eu,Jre=zt,eie=Yre.TypeError,Dm=function(i){return function(n,e,t,r){Xre(e);var a=Qre(n),o=Zre(a),s=Jre(a),u=i?s-1:0,l=i?-1:1;if(t<2)for(;;){if(u in o){r=o[u],u+=l;break}if(u+=l,i?u<0:s<=u)throw eie("Reduce of empty array with no initial value")}for(;i?u>=0:s>u;u+=l)u in o&&(r=e(r,o[u],u,a));return r}},tie={left:Dm(!1),right:Dm(!0)},rie=_i,iie=G,nie=rie(iie.process)=="process",aie=Y,oie=tie.left,sie=Sn,Rm=ja,uie=nie,lie=sie("reduce"),hie=!uie&&Rm>79&&Rm<83;aie({target:"Array",proto:!0,forced:!lie||hie},{reduce:function(n){var e=arguments.length;return oie(this,n,e,e>1?arguments[1]:void 0)}});var die=We,fie=die("Array").reduce,cie=Me,vie=fie,wh=Array.prototype,pie=function(i){var n=i.reduce;return i===wh||cie(wh,i)&&n===wh.reduce?vie:n},gie=pie,yie=gie,u_=yie,l_={};(function(i){(function(n,e){e(i)})(Zh,function(n){n.__esModule=!0,n.sort=b;function e(p,$){if(!(p instanceof $))throw new TypeError("Cannot call a class as a function")}var t=32,r=7,a=256,o=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9];function s(p){return p<1e5?p<100?p<10?0:1:p<1e4?p<1e3?2:3:4:p<1e7?p<1e6?5:6:p<1e9?p<1e8?7:8:9}function u(p,$){if(p===$)return 0;if(~~p===p&&~~$===$){if(p===0||$===0)return p<$?-1:1;if(p<0||$<0){if($>=0)return-1;if(p>=0)return 1;p=-p,$=-$}var y=s(p),m=s($),_=0;return y<m?(p*=o[m-y-1],$/=10,_=-1):y>m&&($*=o[y-m-1],p/=10,_=1),p===$?_:p<$?-1:1}var O=String(p),k=String($);return O===k?0:O<k?-1:1}function l(p){for(var $=0;p>=t;)$|=p&1,p>>=1;return p+$}function h(p,$,y,m){var _=$+1;if(_===y)return 1;if(m(p[_++],p[$])<0){for(;_<y&&m(p[_],p[_-1])<0;)_++;d(p,$,_)}else for(;_<y&&m(p[_],p[_-1])>=0;)_++;return _-$}function d(p,$,y){for(y--;$<y;){var m=p[$];p[$++]=p[y],p[y--]=m}}function f(p,$,y,m,_){for(m===$&&m++;m<y;m++){for(var O=p[m],k=$,S=m;k<S;){var w=k+S>>>1;_(O,p[w])<0?S=w:k=w+1}var E=m-k;switch(E){case 3:p[k+3]=p[k+2];case 2:p[k+2]=p[k+1];case 1:p[k+1]=p[k];break;default:for(;E>0;)p[k+E]=p[k+E-1],E--}p[k]=O}}function c(p,$,y,m,_,O){var k=0,S=0,w=1;if(O(p,$[y+_])>0){for(S=m-_;w<S&&O(p,$[y+_+w])>0;)k=w,w=(w<<1)+1,w<=0&&(w=S);w>S&&(w=S),k+=_,w+=_}else{for(S=_+1;w<S&&O(p,$[y+_-w])<=0;)k=w,w=(w<<1)+1,w<=0&&(w=S);w>S&&(w=S);var E=k;k=_-w,w=_-E}for(k++;k<w;){var F=k+(w-k>>>1);O(p,$[y+F])>0?k=F+1:w=F}return w}function v(p,$,y,m,_,O){var k=0,S=0,w=1;if(O(p,$[y+_])<0){for(S=_+1;w<S&&O(p,$[y+_-w])<0;)k=w,w=(w<<1)+1,w<=0&&(w=S);w>S&&(w=S);var E=k;k=_-w,w=_-E}else{for(S=m-_;w<S&&O(p,$[y+_+w])>=0;)k=w,w=(w<<1)+1,w<=0&&(w=S);w>S&&(w=S),k+=_,w+=_}for(k++;k<w;){var F=k+(w-k>>>1);O(p,$[y+F])<0?w=F:k=F+1}return w}var g=function(){function p($,y){e(this,p),this.array=null,this.compare=null,this.minGallop=r,this.length=0,this.tmpStorageLength=a,this.stackLength=0,this.runStart=null,this.runLength=null,this.stackSize=0,this.array=$,this.compare=y,this.length=$.length,this.length<2*a&&(this.tmpStorageLength=this.length>>>1),this.tmp=new Array(this.tmpStorageLength),this.stackLength=this.length<120?5:this.length<1542?10:this.length<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength)}return p.prototype.pushRun=function(y,m){this.runStart[this.stackSize]=y,this.runLength[this.stackSize]=m,this.stackSize+=1},p.prototype.mergeRuns=function(){for(;this.stackSize>1;){var y=this.stackSize-2;if(y>=1&&this.runLength[y-1]<=this.runLength[y]+this.runLength[y+1]||y>=2&&this.runLength[y-2]<=this.runLength[y]+this.runLength[y-1])this.runLength[y-1]<this.runLength[y+1]&&y--;else if(this.runLength[y]>this.runLength[y+1])break;this.mergeAt(y)}},p.prototype.forceMergeRuns=function(){for(;this.stackSize>1;){var y=this.stackSize-2;y>0&&this.runLength[y-1]<this.runLength[y+1]&&y--,this.mergeAt(y)}},p.prototype.mergeAt=function(y){var m=this.compare,_=this.array,O=this.runStart[y],k=this.runLength[y],S=this.runStart[y+1],w=this.runLength[y+1];this.runLength[y]=k+w,y===this.stackSize-3&&(this.runStart[y+1]=this.runStart[y+2],this.runLength[y+1]=this.runLength[y+2]),this.stackSize--;var E=v(_[S],_,O,k,0,m);O+=E,k-=E,k!==0&&(w=c(_[O+k-1],_,S,w,w-1,m),w!==0&&(k<=w?this.mergeLow(O,k,S,w):this.mergeHigh(O,k,S,w)))},p.prototype.mergeLow=function(y,m,_,O){var k=this.compare,S=this.array,w=this.tmp,E=0;for(E=0;E<m;E++)w[E]=S[y+E];var F=0,H=_,z=y;if(S[z++]=S[H++],--O===0){for(E=0;E<m;E++)S[z+E]=w[F+E];return}if(m===1){for(E=0;E<O;E++)S[z+E]=S[H+E];S[z+O]=w[F];return}for(var K=this.minGallop;;){var X=0,te=0,ne=!1;do if(k(S[H],w[F])<0){if(S[z++]=S[H++],te++,X=0,--O===0){ne=!0;break}}else if(S[z++]=w[F++],X++,te=0,--m===1){ne=!0;break}while((X|te)<K);if(ne)break;do{if(X=v(S[H],w,F,m,0,k),X!==0){for(E=0;E<X;E++)S[z+E]=w[F+E];if(z+=X,F+=X,m-=X,m<=1){ne=!0;break}}if(S[z++]=S[H++],--O===0){ne=!0;break}if(te=c(w[F],S,H,O,0,k),te!==0){for(E=0;E<te;E++)S[z+E]=S[H+E];if(z+=te,H+=te,O-=te,O===0){ne=!0;break}}if(S[z++]=w[F++],--m===1){ne=!0;break}K--}while(X>=r||te>=r);if(ne)break;K<0&&(K=0),K+=2}if(this.minGallop=K,K<1&&(this.minGallop=1),m===1){for(E=0;E<O;E++)S[z+E]=S[H+E];S[z+O]=w[F]}else{if(m===0)throw new Error("mergeLow preconditions were not respected");for(E=0;E<m;E++)S[z+E]=w[F+E]}},p.prototype.mergeHigh=function(y,m,_,O){var k=this.compare,S=this.array,w=this.tmp,E=0;for(E=0;E<O;E++)w[E]=S[_+E];var F=y+m-1,H=O-1,z=_+O-1,K=0,X=0;if(S[z--]=S[F--],--m===0){for(K=z-(O-1),E=0;E<O;E++)S[K+E]=w[E];return}if(O===1){for(z-=m,F-=m,X=z+1,K=F+1,E=m-1;E>=0;E--)S[X+E]=S[K+E];S[z]=w[H];return}for(var te=this.minGallop;;){var ne=0,C=0,I=!1;do if(k(w[H],S[F])<0){if(S[z--]=S[F--],ne++,C=0,--m===0){I=!0;break}}else if(S[z--]=w[H--],C++,ne=0,--O===1){I=!0;break}while((ne|C)<te);if(I)break;do{if(ne=m-v(w[H],S,y,m,m-1,k),ne!==0){for(z-=ne,F-=ne,m-=ne,X=z+1,K=F+1,E=ne-1;E>=0;E--)S[X+E]=S[K+E];if(m===0){I=!0;break}}if(S[z--]=w[H--],--O===1){I=!0;break}if(C=O-c(S[F],w,0,O,O-1,k),C!==0){for(z-=C,H-=C,O-=C,X=z+1,K=H+1,E=0;E<C;E++)S[X+E]=w[K+E];if(O<=1){I=!0;break}}if(S[z--]=S[F--],--m===0){I=!0;break}te--}while(ne>=r||C>=r);if(I)break;te<0&&(te=0),te+=2}if(this.minGallop=te,te<1&&(this.minGallop=1),O===1){for(z-=m,F-=m,X=z+1,K=F+1,E=m-1;E>=0;E--)S[X+E]=S[K+E];S[z]=w[H]}else{if(O===0)throw new Error("mergeHigh preconditions were not respected");for(K=z-(O-1),E=0;E<O;E++)S[K+E]=w[E]}},p}();function b(p,$,y,m){if(!Array.isArray(p))throw new TypeError("Can only sort arrays");$?typeof $!="function"&&(m=y,y=$,$=u):$=u,y||(y=0),m||(m=p.length);var _=m-y;if(!(_<2)){var O=0;if(_<t){O=h(p,y,m,$),f(p,y,m,y+O,$);return}var k=new g(p,$),S=l(_);do{if(O=h(p,y,m,$),O<S){var w=_;w>S&&(w=S),f(p,y,y+w,y+O,$),O=w}k.pushRun(y,O),k.mergeRuns(),_-=O,y+=O}while(_!==0);k.forceMergeRuns()}}})})(l_);var Ts=l_;function h_(i){var n=mie();return function(){var t=L(i),r;if(n){var a=L(this).constructor;r=P(t,arguments,a)}else r=t.apply(this,arguments);return fe(this,r)}}function mie(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var d_=function(){function i(){D(this,i)}return R(i,[{key:"abstract",value:function(){throw new Error("Can't instantiate abstract class!")}},{key:"fake_use",value:function(){}},{key:"curveType",value:function(){return this.abstract()}},{key:"getPosition",value:function(e){return this.fake_use(e),this.abstract()}},{key:"setPosition",value:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,r),this.abstract()}},{key:"getTreeSize",value:function(e){return this.fake_use(e),this.abstract()}},{key:"sort",value:function(e){this.fake_use(e),this.abstract()}},{key:"fix",value:function(e,t){this.fake_use(e,t),this.abstract()}},{key:"shift",value:function(e,t){this.fake_use(e,t),this.abstract()}}]),i}(),bie=function(i){se(e,i);var n=h_(e);function e(t){var r;return D(this,e),r=n.call(this),r.layout=t,r}return R(e,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(r){return r.x}},{key:"setPosition",value:function(r,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(r,o),r.x=a}},{key:"getTreeSize",value:function(r){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,r);return{min:a.min_x,max:a.max_x}}},{key:"sort",value:function(r){Ts.sort(r,function(a,o){return a.x-o.x})}},{key:"fix",value:function(r,a){r.y=this.layout.options.hierarchical.levelSeparation*a,r.options.fixed.y=!0}},{key:"shift",value:function(r,a){this.layout.body.nodes[r].x+=a}}]),e}(d_),$ie=function(i){se(e,i);var n=h_(e);function e(t){var r;return D(this,e),r=n.call(this),r.layout=t,r}return R(e,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(r){return r.y}},{key:"setPosition",value:function(r,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(r,o),r.y=a}},{key:"getTreeSize",value:function(r){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,r);return{min:a.min_y,max:a.max_y}}},{key:"sort",value:function(r){Ts.sort(r,function(a,o){return a.y-o.y})}},{key:"fix",value:function(r,a){r.x=this.layout.options.hierarchical.levelSeparation*a,r.options.fixed.x=!0}},{key:"shift",value:function(r,a){this.layout.body.nodes[r].y+=a}}]),e}(d_),wie=Y,_ie=zr.every,Eie=Sn,Sie=Eie("every");wie({target:"Array",proto:!0,forced:!Sie},{every:function(n){return _ie(this,n,arguments.length>1?arguments[1]:void 0)}});var Oie=We,Tie=Oie("Array").every,kie=Me,Iie=Tie,_h=Array.prototype,Pie=function(i){var n=i.every;return i===_h||kie(_h,i)&&n===_h.every?Iie:n},Cie=Pie,Aie=Cie,f_=Aie;function xie(i,n){var e=typeof yr<"u"&&Qt(i)||i["@@iterator"];if(!e){if(ue(i)||(e=Mie(i))||n&&i&&typeof i.length=="number"){e&&(i=e);var t=0,r=function(){};return{s:r,n:function(){return t>=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
112
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function Mie(i,n){var e;if(i){if(typeof i=="string")return Fm(i,n);var t=Be(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Lr(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Fm(i,n)}}function Fm(i,n){(n==null||n>i.length)&&(n=i.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=i[e];return t}function Die(i,n){var e=new Yr;return ve(i).call(i,function(t){var r;ve(r=t.edges).call(r,function(a){a.connected&&e.add(a)})}),ve(e).call(e,function(t){var r=t.from.id,a=t.to.id;n[r]==null&&(n[r]=0),(n[a]==null||n[r]>=n[a])&&(n[a]=n[r]+1)}),n}function Rie(i){return c_(function(n){var e,t;return f_(e=ht(t=n.edges).call(t,function(r){return i.has(r.toId)})).call(e,function(r){return r.to===n})},function(n,e){return e>n},"from",i)}function Fie(i){return c_(function(n){var e,t;return f_(e=ht(t=n.edges).call(t,function(r){return i.has(r.toId)})).call(e,function(r){return r.from===n})},function(n,e){return e<n},"to",i)}function c_(i,n,e,t){var r,a=ni(null),o=u_(r=Ht(Ww(t).call(t))).call(r,function(c,v){return c+1+v.edges.length},0),s=e+"Id",u=e==="to"?1:-1,l=xie(t),h;try{var d=function(){var v=_e(h.value,2),g=v[0],b=v[1];if(!t.has(g)||!i(b))return"continue";a[g]=0;for(var p=[b],$=0,y=void 0,m=function(){var k,S;if(!t.has(g))return"continue";var w=a[y.id]+u;if(ve(k=ht(S=y.edges).call(S,function(E){return E.connected&&E.to!==E.from&&E[e]!==y&&t.has(E.toId)&&t.has(E.fromId)})).call(k,function(E){var F=E[s],H=a[F];(H==null||n(w,H))&&(a[F]=w,p.push(E[e]))}),$>o)return{v:{v:Die(t,a)}};++$};y=p.pop();){var _=m();if(_!=="continue"&&ce(_)==="object")return _.v}};for(l.s();!(h=l.n()).done;){var f=d();if(f!=="continue"&&ce(f)==="object")return f.v}}catch(c){l.e(c)}finally{l.f()}return a}var Nie=function(){function i(){D(this,i),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return R(i,[{key:"addRelation",value:function(e,t){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(t),this.parentReference[t]===void 0&&(this.parentReference[t]=[]),this.parentReference[t].push(e)}},{key:"checkIfTree",value:function(){for(var e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(e,t){t!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}},{key:"ensureLevel",value:function(e){this.levels[e]===void 0&&(this.levels[e]=0)}},{key:"getMaxLevel",value:function(e){var t=this,r={},a=function o(s){if(r[s]!==void 0)return r[s];var u=t.levels[s];if(t.childrenReference[s]){var l=t.childrenReference[s];if(l.length>0)for(var h=0;h<l.length;h++)u=Math.max(u,o(l[h]))}return r[s]=u,u};return a(e)}},{key:"levelDownstream",value:function(e,t){this.levels[t.id]===void 0&&(this.levels[e.id]===void 0&&(this.levels[e.id]=0),this.levels[t.id]=this.levels[e.id]+1)}},{key:"setMinLevelToZero",value:function(e){var t=1e9;for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.levels[r]!==void 0&&(t=Math.min(this.levels[r],t));for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&this.levels[a]!==void 0&&(this.levels[a]-=t)}},{key:"getTreeSize",value:function(e,t){var r=1e9,a=-1e9,o=1e9,s=-1e9;for(var u in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,u)&&this.trees[u]===t){var l=e[u];r=Math.min(l.x,r),a=Math.max(l.x,a),o=Math.min(l.y,o),s=Math.max(l.y,s)}return{min_x:r,max_x:a,min_y:o,max_y:s}}},{key:"hasSameParent",value:function(e,t){var r=this.parentReference[e.id],a=this.parentReference[t.id];if(r===void 0||a===void 0)return!1;for(var o=0;o<r.length;o++)for(var s=0;s<a.length;s++)if(r[o]==a[s])return!0;return!1}},{key:"inSameSubNetwork",value:function(e,t){return this.trees[e.id]===this.trees[t.id]}},{key:"getLevels",value:function(){return we(this.distributionOrdering)}},{key:"addToOrdering",value:function(e,t){this.distributionOrdering[t]===void 0&&(this.distributionOrdering[t]=[]);var r=!1,a=this.distributionOrdering[t];for(var o in a)if(a[o]===e){r=!0;break}r||(this.distributionOrdering[t].push(e),this.distributionIndex[e.id]=this.distributionOrdering[t].length-1)}}]),i}(),Bie=function(){function i(n){D(this,i),this.body=n,this._resetRNG(Math.random()+":"+ps()),this.setPhysics=!1,this.options={},this.optionsBackup={physics:{}},this.defaultOptions={randomSeed:void 0,improvedLayout:!0,clusterThreshold:150,hierarchical:{enabled:!1,levelSeparation:150,nodeSpacing:100,treeSpacing:200,blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:"UD",sortMethod:"hubsize"}},Ce(this.options,this.defaultOptions),this.bindEventListeners()}return R(i,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("_dataChanged",function(){e.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",function(){e.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",function(){e.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",function(){if(e.options.hierarchical.enabled===!0){var t=e.direction.curveType();e.body.emitter.emit("_forceDisableDynamicCurves",t,!1)}})}},{key:"setOptions",value:function(e,t){if(e!==void 0){var r=this.options.hierarchical,a=r.enabled;if(Tn(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),_t(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),r.enabled===!0)return a===!0&&this.body.emitter.emit("refresh",!0),r.direction==="RL"||r.direction==="DU"?r.levelSeparation>0&&(r.levelSeparation*=-1):r.levelSeparation<0&&(r.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(a===!0)return this.body.emitter.emit("refresh"),ye(t,this.optionsBackup)}return t}},{key:"_resetRNG",value:function(e){this.initialRandomSeed=e,this._rng=ku(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(e){if(this.options.hierarchical.enabled===!0){var t=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:t.enabled===void 0?!0:t.enabled,solver:"hierarchicalRepulsion"},t.enabled=t.enabled===void 0?!0:t.enabled,t.solver=t.solver||"barnesHut"):ce(e.physics)==="object"?(t.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});var r=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if(typeof e.edges.smooth=="boolean")this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:r};else{var a=e.edges.smooth;a.type!==void 0&&a.type!=="dynamic"&&(r=a.type),this.optionsBackup.edges={smooth:{enabled:a.enabled===void 0?!0:a.enabled,type:a.type===void 0?"dynamic":a.type,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}},e.edges.smooth={enabled:a.enabled===void 0?!0:a.enabled,type:r,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",r)}return e}},{key:"positionInitially",value:function(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);for(var t=e.length+50,r=0;r<e.length;r++){var a=e[r],o=2*Math.PI*this._rng();a.x===void 0&&(a.x=t*Math.cos(o)),a.y===void 0&&(a.y=t*Math.sin(o))}}}},{key:"layoutNetwork",value:function(){if(this.options.hierarchical.enabled!==!0&&this.options.improvedLayout===!0){for(var e=this.body.nodeIndices,t=0,r=0;r<e.length;r++){var a=this.body.nodes[e[r]];a.predefinedPosition===!0&&(t+=1)}if(t<.5*e.length){var o=10,s=0,u=this.options.clusterThreshold,l={clusterNodeProperties:{shape:"ellipse",label:"",group:"",font:{multi:!1}},clusterEdgeProperties:{label:"",font:{multi:!1},smooth:{enabled:!1}}};if(e.length>u){for(var h=e.length;e.length>u&&s<=o;){s+=1;var d=e.length;s%3===0?this.body.modules.clustering.clusterBridges(l):this.body.modules.clustering.clusterOutliers(l);var f=e.length;if(d==f&&s%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*h)})}s>o&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(e,this.body.edgeIndices,!0),this._shiftToCenter();for(var c=70,v=0;v<e.length;v++){var g=this.body.nodes[e[v]];g.predefinedPosition===!1&&(g.x+=(.5-this._rng())*c,g.y+=(.5-this._rng())*c)}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}},{key:"_shiftToCenter",value:function(){for(var e=Je.getRangeCore(this.body.nodes,this.body.nodeIndices),t=Je.findCenter(e),r=0;r<this.body.nodeIndices.length;r++){var a=this.body.nodes[this.body.nodeIndices[r]];a.x-=t.x,a.y-=t.y}}},{key:"_declusterAll",value:function(){for(var e=!0;e===!0;){e=!1;for(var t=0;t<this.body.nodeIndices.length;t++)this.body.nodes[this.body.nodeIndices[t]].isCluster===!0&&(e=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[t],{},!1));e===!0&&this.body.emitter.emit("_dataChanged")}}},{key:"getSeed",value:function(){return this.initialRandomSeed}},{key:"setupHierarchicalLayout",value:function(){if(this.options.hierarchical.enabled===!0&&this.body.nodeIndices.length>0){var e,t,r=!1,a=!1;this.lastNodeOnLevel={},this.hierarchical=new Nie;for(t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level!==void 0?(r=!0,this.hierarchical.levels[t]=e.options.level):a=!0);if(a===!0&&r===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");if(a===!0){var o=this.options.hierarchical.sortMethod;o==="hubsize"?this._determineLevelsByHubsize():o==="directed"?this._determineLevelsDirected():o==="custom"&&this._determineLevelsCustomCallback()}for(var s in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,s)&&this.hierarchical.ensureLevel(s);var u=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(u),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){var e=this,t=!1,r={},a=function(){for(var y=s(),m=0,_=0;_<y.length-1;_++){var O=y[_].max-y[_+1].min;m+=O+e.options.hierarchical.treeSpacing,o(_+1,m)}},o=function(y,m){var _=e.hierarchical.trees;for(var O in _)Object.prototype.hasOwnProperty.call(_,O)&&_[O]===y&&e.direction.shift(O,m)},s=function(){for(var y=[],m=0;m<e.hierarchical.numTrees();m++)y.push(e.direction.getTreeSize(m));return y},u=function $(y,m){if(!m[y.id]&&(m[y.id]=!0,e.hierarchical.childrenReference[y.id])){var _=e.hierarchical.childrenReference[y.id];if(_.length>0)for(var O=0;O<_.length;O++)$(e.body.nodes[_[O]],m)}},l=function(y){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,_=1e9,O=1e9,k=1e9,S=-1e9;for(var w in y)if(Object.prototype.hasOwnProperty.call(y,w)){var E=e.body.nodes[w],F=e.hierarchical.levels[E.id],H=e.direction.getPosition(E),z=e._getSpaceAroundNode(E,y),K=_e(z,2),X=K[0],te=K[1];_=Math.min(X,_),O=Math.min(te,O),F<=m&&(k=Math.min(H,k),S=Math.max(H,S))}return[k,S,_,O]},h=function(y,m){var _=e.hierarchical.getMaxLevel(y.id),O=e.hierarchical.getMaxLevel(m.id);return Math.min(_,O)},d=function(y,m,_){for(var O=e.hierarchical,k=0;k<m.length;k++){var S=m[k],w=O.distributionOrdering[S];if(w.length>1)for(var E=0;E<w.length-1;E++){var F=w[E],H=w[E+1];O.hasSameParent(F,H)&&O.inSameSubNetwork(F,H)&&y(F,H,_)}}},f=function(y,m){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,O=e.direction.getPosition(y),k=e.direction.getPosition(m),S=Math.abs(k-O),w=e.options.hierarchical.nodeSpacing;if(S>w){var E={},F={};u(y,E),u(m,F);var H=h(y,m),z=l(E,H),K=l(F,H),X=z[1],te=K[0],ne=K[2],C=Math.abs(X-te);if(C>w){var I=X-te+w;I<-ne+w&&(I=-ne+w),I<0&&(e._shiftBlock(m.id,I),t=!0,_===!0&&e._centerParent(m))}}},c=function(y,m){for(var _=m.id,O=m.edges,k=e.hierarchical.levels[m.id],S=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,w={},E=[],F=0;F<O.length;F++){var H=O[F];if(H.toId!=H.fromId){var z=H.toId==_?H.from:H.to;w[O[F].id]=z,e.hierarchical.levels[z.id]<k&&E.push(H)}}var K=function(V,B){for(var Q=0,ie=0;ie<B.length;ie++)if(w[B[ie].id]!==void 0){var le=e.direction.getPosition(w[B[ie].id])-V;Q+=le/Math.sqrt(le*le+S)}return Q},X=function(V,B){for(var Q=0,ie=0;ie<B.length;ie++)if(w[B[ie].id]!==void 0){var le=e.direction.getPosition(w[B[ie].id])-V;Q-=S*Math.pow(le*le+S,-1.5)}return Q},te=function(V,B){for(var Q=e.direction.getPosition(m),ie={},le=0;le<V;le++){var Fe=K(Q,B),$e=X(Q,B),qe=40,Wr=Math.max(-qe,Math.min(qe,Math.round(Fe/$e)));if(Q=Q-Wr,ie[Q]!==void 0)break;ie[Q]=le}return Q},ne=function(V){var B=e.direction.getPosition(m);if(r[m.id]===void 0){var Q={};u(m,Q),r[m.id]=Q}var ie=l(r[m.id]),le=ie[2],Fe=ie[3],$e=V-B,qe=0;$e>0?qe=Math.min($e,Fe-e.options.hierarchical.nodeSpacing):$e<0&&(qe=-Math.min(-$e,le-e.options.hierarchical.nodeSpacing)),qe!=0&&(e._shiftBlock(m.id,qe),t=!0)},C=function(V){var B=e.direction.getPosition(m),Q=e._getSpaceAroundNode(m),ie=_e(Q,2),le=ie[0],Fe=ie[1],$e=V-B,qe=B;$e>0?qe=Math.min(B+(Fe-e.options.hierarchical.nodeSpacing),V):$e<0&&(qe=Math.max(B-(le-e.options.hierarchical.nodeSpacing),V)),qe!==B&&(e.direction.setPosition(m,qe),t=!0)},I=te(y,E);ne(I),I=te(y,O),C(I)},v=function(y){var m=e.hierarchical.getLevels();m=ii(m).call(m);for(var _=0;_<y;_++){t=!1;for(var O=0;O<m.length;O++)for(var k=m[O],S=e.hierarchical.distributionOrdering[k],w=0;w<S.length;w++)c(1e3,S[w]);if(t!==!0)break}},g=function(y){var m=e.hierarchical.getLevels();m=ii(m).call(m);for(var _=0;_<y&&(t=!1,d(f,m,!0),t===!0);_++);},b=function(){for(var y in e.body.nodes)Object.prototype.hasOwnProperty.call(e.body.nodes,y)&&e._centerParent(e.body.nodes[y])},p=function(){var y=e.hierarchical.getLevels();y=ii(y).call(y);for(var m=0;m<y.length;m++)for(var _=y[m],O=e.hierarchical.distributionOrdering[_],k=0;k<O.length;k++)e._centerParent(O[k])};this.options.hierarchical.blockShifting===!0&&(g(5),b()),this.options.hierarchical.edgeMinimization===!0&&v(20),this.options.hierarchical.parentCentralization===!0&&p(),a()}},{key:"_getSpaceAroundNode",value:function(e,t){var r=!0;t===void 0&&(r=!1);var a=this.hierarchical.levels[e.id];if(a!==void 0){var o=this.hierarchical.distributionIndex[e.id],s=this.direction.getPosition(e),u=this.hierarchical.distributionOrdering[a],l=1e9,h=1e9;if(o!==0){var d=u[o-1];if(r===!0&&t[d.id]===void 0||r===!1){var f=this.direction.getPosition(d);l=s-f}}if(o!=u.length-1){var c=u[o+1];if(r===!0&&t[c.id]===void 0||r===!1){var v=this.direction.getPosition(c);h=Math.min(h,v-s)}}return[l,h]}else return[0,0]}},{key:"_centerParent",value:function(e){if(this.hierarchical.parentReference[e.id])for(var t=this.hierarchical.parentReference[e.id],r=0;r<t.length;r++){var a=t[r],o=this.body.nodes[a],s=this.hierarchical.childrenReference[a];if(s!==void 0){var u=this._getCenterPosition(s),l=this.direction.getPosition(o),h=this._getSpaceAroundNode(o),d=_e(h,2),f=d[0],c=d[1],v=l-u;(v<0&&Math.abs(v)<c-this.options.hierarchical.nodeSpacing||v>0&&Math.abs(v)<f-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(o,u)}}}},{key:"_placeNodesByHierarchy",value:function(e){this.positionedNodes={};for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var r,a=we(e[t]);a=this._indexArrayToNodes(a),$h(r=this.direction).call(r,a);for(var o=0,s=0;s<a.length;s++){var u=a[s];if(this.positionedNodes[u.id]===void 0){var l=this.options.hierarchical.nodeSpacing,h=l*o;o>0&&(h=this.direction.getPosition(a[s-1])+l),this.direction.setPosition(u,h,t),this._validatePositionAndContinue(u,t,h),o++}}}}},{key:"_placeBranchNodes",value:function(e,t){var r,a=this.hierarchical.childrenReference[e];if(a!==void 0){for(var o=[],s=0;s<a.length;s++)o.push(this.body.nodes[a[s]]);$h(r=this.direction).call(r,o);for(var u=0;u<o.length;u++){var l=o[u],h=this.hierarchical.levels[l.id];if(h>t&&this.positionedNodes[l.id]===void 0){var d=this.options.hierarchical.nodeSpacing,f=void 0;u===0?f=this.direction.getPosition(this.body.nodes[e]):f=this.direction.getPosition(o[u-1])+d,this.direction.setPosition(l,f,h),this._validatePositionAndContinue(l,h,f)}else return}var c=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[e],c,t)}}},{key:"_validatePositionAndContinue",value:function(e,t,r){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){var a=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(r-a<this.options.hierarchical.nodeSpacing){var o=a+this.options.hierarchical.nodeSpacing-r,s=this._findCommonParent(this.lastNodeOnLevel[t],e.id);this._shiftBlock(s.withChild,o)}}this.lastNodeOnLevel[t]=e.id,this.positionedNodes[e.id]=!0,this._placeBranchNodes(e.id,t)}}},{key:"_indexArrayToNodes",value:function(e){for(var t=[],r=0;r<e.length;r++)t.push(this.body.nodes[e[r]]);return t}},{key:"_getDistribution",value:function(){var e={},t,r;for(t in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,t)){r=this.body.nodes[t];var a=this.hierarchical.levels[t]===void 0?0:this.hierarchical.levels[t];this.direction.fix(r,a),e[a]===void 0&&(e[a]={}),e[a][t]=r}return e}},{key:"_getActiveEdges",value:function(e){var t=this,r=[];return ee(e.edges,function(a){var o;ae(o=t.body.edgeIndices).call(o,a.id)!==-1&&r.push(a)}),r}},{key:"_getHubSizes",value:function(){var e=this,t={},r=this.body.nodeIndices;ee(r,function(o){var s=e.body.nodes[o],u=e._getActiveEdges(s).length;t[u]=!0});var a=[];return ee(t,function(o){a.push(Number(o))}),$h(Ts).call(Ts,a,function(o,s){return s-o}),a}},{key:"_determineLevelsByHubsize",value:function(){for(var e=this,t=function(l,h){e.hierarchical.levelDownstream(l,h)},r=this._getHubSizes(),a=function(l){var h=r[l];if(h===0)return"break";ee(e.body.nodeIndices,function(d){var f=e.body.nodes[d];h===e._getActiveEdges(f).length&&e._crawlNetwork(t,d)})},o=0;o<r.length;++o){var s=a(o);if(s==="break")break}}},{key:"_determineLevelsCustomCallback",value:function(){var e=this,t=1e5,r=function(s,u,l){},a=function(s,u,l){var h=e.hierarchical.levels[s.id];h===void 0&&(h=e.hierarchical.levels[s.id]=t);var d=r(Je.cloneOptions(s,"node"),Je.cloneOptions(u,"node"),Je.cloneOptions(l,"edge"));e.hierarchical.levels[u.id]=h+d};this._crawlNetwork(a),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_determineLevelsDirected",value:function(){var e,t=this,r=u_(e=this.body.nodeIndices).call(e,function(a,o){return a.set(o,t.body.nodes[o]),a},new Lw);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=Fie(r):this.hierarchical.levels=Rie(r),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_generateMap",value:function(){var e=this,t=function(a,o){e.hierarchical.levels[o.id]>e.hierarchical.levels[a.id]&&e.hierarchical.addRelation(a.id,o.id)};this._crawlNetwork(t),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},r=arguments.length>1?arguments[1]:void 0,a={},o=function f(c,v){if(a[c.id]===void 0){e.hierarchical.setTreeIndex(c,v),a[c.id]=!0;for(var g,b=e._getActiveEdges(c),p=0;p<b.length;p++){var $=b[p];$.connected===!0&&($.toId==c.id?g=$.from:g=$.to,c.id!=g.id&&(t(c,g,$),f(g,v)))}}};if(r===void 0)for(var s=0,u=0;u<this.body.nodeIndices.length;u++){var l=this.body.nodeIndices[u];if(a[l]===void 0){var h=this.body.nodes[l];o(h,s),s+=1}}else{var d=this.body.nodes[r];if(d===void 0){console.error("Node not found:",r);return}o(d)}}},{key:"_shiftBlock",value:function(e,t){var r=this,a={},o=function s(u){if(!a[u]){a[u]=!0,r.direction.shift(u,t);var l=r.hierarchical.childrenReference[u];if(l!==void 0)for(var h=0;h<l.length;h++)s(l[h])}};o(e)}},{key:"_findCommonParent",value:function(e,t){var r=this,a={},o=function u(l,h){var d=r.hierarchical.parentReference[h];if(d!==void 0)for(var f=0;f<d.length;f++){var c=d[f];l[c]=!0,u(l,c)}},s=function u(l,h){var d=r.hierarchical.parentReference[h];if(d!==void 0)for(var f=0;f<d.length;f++){var c=d[f];if(l[c]!==void 0)return{foundParent:c,withChild:h};var v=u(l,c);if(v.foundParent!==null)return v}return{foundParent:null,withChild:h}};return o(a,e),s(a,t)}},{key:"setDirectionStrategy",value:function(){var e=this.options.hierarchical.direction==="UD"||this.options.hierarchical.direction==="DU";e?this.direction=new bie(this):this.direction=new $ie(this)}},{key:"_getCenterPosition",value:function(e){for(var t=1e9,r=-1e9,a=0;a<e.length;a++){var o=void 0;if(e[a].id!==void 0)o=e[a];else{var s=e[a];o=this.body.nodes[s]}var u=this.direction.getPosition(o);t=Math.min(t,u),r=Math.max(r,u)}return .5*(t+r)}}]),i}();function Lie(i,n){var e=typeof yr<"u"&&Qt(i)||i["@@iterator"];if(!e){if(ue(i)||(e=zie(i))||n&&i&&typeof i.length=="number"){e&&(i=e);var t=0,r=function(){};return{s:r,n:function(){return t>=i.length?{done:!0}:{done:!1,value:i[t++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
113
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){e=e.call(i)},n:function(){var l=e.next();return a=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!a&&e.return!=null&&e.return()}finally{if(o)throw s}}}}function zie(i,n){var e;if(i){if(typeof i=="string")return Nm(i,n);var t=Be(e=Object.prototype.toString.call(i)).call(e,8,-1);if(t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set")return Lr(i);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Nm(i,n)}}function Nm(i,n){(n==null||n>i.length)&&(n=i.length);for(var e=0,t=new Array(n);e<n;e++)t[e]=i[e];return t}var jie=function(){function i(n,e,t,r){var a=this,o,s;D(this,i),this.body=n,this.canvas=e,this.selectionHandler=t,this.interactionHandler=r,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this._domEventListenerCleanupQueue=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:"dot",size:6,color:{background:"#ff0000",border:"#3c3c3c",highlight:{background:"#07f968",border:"#3c3c3c"}},borderWidth:2,borderWidthSelected:2}},Ce(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){a._clean()}),this.body.emitter.on("_dataChanged",x(o=this._restore).call(o,this)),this.body.emitter.on("_resetData",x(s=this._restore).call(s,this))}return R(i,[{key:"_restore",value:function(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}},{key:"setOptions",value:function(e,t,r){t!==void 0&&(t.locale!==void 0?this.options.locale=t.locale:this.options.locale=r.locale,t.locales!==void 0?this.options.locales=t.locales:this.options.locales=r.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,ye(this.options,e)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}},{key:"toggleEditMode",value:function(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}},{key:"enableEditMode",value:function(){this.editMode=!0,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}},{key:"disableEditMode",value:function(){this.editMode=!1,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}},{key:"showManipulatorToolbar",value:function(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){var e,t;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";var r=this.selectionHandler.getSelectedNodeCount(),a=this.selectionHandler.getSelectedEdgeCount(),o=r+a,s=this.options.locales[this.options.locale],u=!1;this.options.addNode!==!1&&(this._createAddNodeButton(s),u=!0),this.options.addEdge!==!1&&(u===!0?this._createSeperator(1):u=!0,this._createAddEdgeButton(s)),r===1&&typeof this.options.editNode=="function"?(u===!0?this._createSeperator(2):u=!0,this._createEditNodeButton(s)):a===1&&r===0&&this.options.editEdge!==!1&&(u===!0?this._createSeperator(3):u=!0,this._createEditEdgeButton(s)),o!==0&&(r>0&&this.options.deleteNode!==!1?(u===!0&&this._createSeperator(4),this._createDeleteButton(s)):r===0&&this.options.deleteEdge!==!1&&(u===!0&&this._createSeperator(4),this._createDeleteButton(s))),this._bindElementEvents(this.closeDiv,x(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",x(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var t,r=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(r),this._createSeperator(),this._createDescription(r.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,x(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",x(e=this._performAddNode).call(e,this))}},{key:"editNode",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var t=this.selectionHandler.getSelectedNodes()[0];if(t!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(t.isCluster!==!0){var r=ye({},t.options,!1);if(r.x=t.x,r.y=t.y,this.options.editNode.length===2)this.options.editNode(r,function(a){a!=null&&e.inMode==="editNode"&&e.body.data.nodes.getDataSet().update(a),e.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){var e,t,r,a,o;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var s,u=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(u),this._createSeperator(),this._createDescription(u.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,x(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",x(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",x(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",x(r=this._dragControlNode).call(r,this)),this._temporaryBindUI("onRelease",x(a=this._finishConnect).call(a,this)),this._temporaryBindUI("onDragStart",x(o=this._dragStartEdge).call(o,this)),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",ce(this.options.editEdge)==="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){var e=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(e.from.id,e.to.id);return}if(this.guiEnabled===!0){var t,r=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(r),this._createSeperator(),this._createDescription(r.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,x(t=this.toggleEditMode).call(t,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var a,o,s,u,l=this.body.edges[this.edgeBeingEditedId],h=this._getNewTargetNode(l.from.x,l.from.y),d=this._getNewTargetNode(l.to.x,l.to.y);this.temporaryIds.nodes.push(h.id),this.temporaryIds.nodes.push(d.id),this.body.nodes[h.id]=h,this.body.nodeIndices.push(h.id),this.body.nodes[d.id]=d,this.body.nodeIndices.push(d.id),this._temporaryBindUI("onTouch",x(a=this._controlNodeTouch).call(a,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",x(o=this._controlNodeDragStart).call(o,this)),this._temporaryBindUI("onDrag",x(s=this._controlNodeDrag).call(s,this)),this._temporaryBindUI("onDragEnd",x(u=this._controlNodeDragEnd).call(u,this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(f){var c=l.edgeType.findBorderPositions(f);h.selected===!1&&(h.x=c.from.x,h.y=c.from.y),d.selected===!1&&(d.x=c.to.x,d.y=c.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";var t=this.selectionHandler.getSelectedNodeIds(),r=this.selectionHandler.getSelectedEdgeIds(),a=void 0;if(t.length>0){for(var o=0;o<t.length;o++)if(this.body.nodes[t[o]].isCluster===!0){alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);return}typeof this.options.deleteNode=="function"&&(a=this.options.deleteNode)}else r.length>0&&typeof this.options.deleteEdge=="function"&&(a=this.options.deleteEdge);if(typeof a=="function"){var s={nodes:t,edges:r};if(a.length===2)a(s,function(u){u!=null&&e.inMode==="delete"?(e.body.data.edges.getDataSet().remove(u.edges),e.body.data.nodes.getDataSet().remove(u.nodes),e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar()):(e.body.emitter.emit("startSimulation"),e.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(r),this.body.data.nodes.getDataSet().remove(t),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,t;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(t=this.options.locales[this.options.locale])===null||t===void 0?void 0:t.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}},{key:"_getNewTargetNode",value:function(e,t){var r=ye({},this.options.controlNodeStyle);r.id="targetNode"+Gn(),r.hidden=!1,r.physics=!1,r.x=e,r.y=t;var a=this.body.functions.createNode(r);return a.shape.boundingBox={left:e,right:e,top:t,bottom:t},a}},{key:"_createEditButton",value:function(){var e;this._clean(),this.manipulationDOM={},_r(this.editModeDiv);var t=this.options.locales[this.options.locale],r=this._createButton("editMode","vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(r),this._bindElementEvents(r,x(e=this.toggleEditMode).call(e,this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(_r(this.editModeDiv),_r(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var e,t=Lie(or(e=this._domEventListenerCleanupQueue).call(e,0)),r;try{for(t.s();!(r=t.n()).done;){var a=r.value;a()}}catch(o){t.e(o)}finally{t.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),_r(this.manipulationDiv),_r(this.editModeDiv),_r(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}},{key:"_createSeperator",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+e]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+e].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+e])}},{key:"_createAddNodeButton",value:function(e){var t,r=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,x(t=this.addNodeMode).call(t,this))}},{key:"_createAddEdgeButton",value:function(e){var t,r=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,x(t=this.addEdgeMode).call(t,this))}},{key:"_createEditNodeButton",value:function(e){var t,r=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,x(t=this.editNode).call(t,this))}},{key:"_createEditEdgeButton",value:function(e){var t,r=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,x(t=this.editEdgeMode).call(t,this))}},{key:"_createDeleteButton",value:function(e){var t,r;this.options.rtl?r="vis-delete-rtl":r="vis-delete";var a=this._createButton("delete",r,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,x(t=this.deleteSelected).call(t,this))}},{key:"_createBackButton",value:function(e){var t,r=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,x(t=this.showManipulatorToolbar).call(t,this))}},{key:"_createButton",value:function(e,t,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("button"),this.manipulationDOM[e+"Div"].className="vis-button "+t,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=a,this.manipulationDOM[e+"Label"].innerText=r,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}},{key:"_createDescription",value:function(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}},{key:"_temporaryBindEvent",value:function(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}},{key:"_temporaryBindUI",value:function(e,t){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+eo(we(this.body.eventListeners)))}},{key:"_unbindTemporaryUIs",value:function(){for(var e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var e=0;e<this.temporaryEventFunctions.length;e++){var t=this.temporaryEventFunctions[e].event,r=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(t,r)}this.temporaryEventFunctions=[]}},{key:"_bindElementEvents",value:function(e,t){var r=new Ki(e,{});Os(r,t),this._domEventListenerCleanupQueue.push(function(){r.destroy()});var a=function(s){var u=s.keyCode,l=s.key;(l==="Enter"||l===" "||u===13||u===32)&&t()};e.addEventListener("keyup",a,!1),this._domEventListenerCleanupQueue.push(function(){e.removeEventListener("keyup",a,!1)})}},{key:"_cleanupTemporaryNodesAndEdges",value:function(){for(var e=0;e<this.temporaryIds.edges.length;e++){var t;this.body.edges[this.temporaryIds.edges[e]].disconnect(),delete this.body.edges[this.temporaryIds.edges[e]];var r=ae(t=this.body.edgeIndices).call(t,this.temporaryIds.edges[e]);if(r!==-1){var a;or(a=this.body.edgeIndices).call(a,r,1)}}for(var o=0;o<this.temporaryIds.nodes.length;o++){var s;delete this.body.nodes[this.temporaryIds.nodes[o]];var u=ae(s=this.body.nodeIndices).call(s,this.temporaryIds.nodes[o]);if(u!==-1){var l;or(l=this.body.nodeIndices).call(l,u,1)}}this.temporaryIds={nodes:[],edges:[]}}},{key:"_controlNodeTouch",value:function(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Ce({},this.body.view.translation)}},{key:"_controlNodeDragStart",value:function(){var e=this.lastTouch,t=this.selectionHandler._pointerToPositionObject(e),r=this.body.nodes[this.temporaryIds.nodes[0]],a=this.body.nodes[this.temporaryIds.nodes[1]],o=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;var s=r.isOverlappingWith(t),u=a.isOverlappingWith(t);s===!0?(this.selectedControlNode=r,o.edgeType.from=r):u===!0&&(this.selectedControlNode=a,o.edgeType.to=a),this.selectedControlNode!==void 0&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDrag",value:function(e){this.body.emitter.emit("disablePhysics");var t=this.body.functions.getPointer(e.center),r=this.canvas.DOMtoCanvas(t);this.selectedControlNode!==void 0?(this.selectedControlNode.x=r.x,this.selectedControlNode.y=r.y):this.interactionHandler.onDrag(e),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDragEnd",value:function(e){var t=this.body.functions.getPointer(e.center),r=this.selectionHandler._pointerToPositionObject(t),a=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode!==void 0){this.selectionHandler.unselectAll();for(var o=this.selectionHandler._getAllNodesOverlappingWith(r),s=void 0,u=o.length-1;u>=0;u--)if(o[u]!==this.selectedControlNode.id){s=this.body.nodes[o[u]];break}if(s!==void 0&&this.selectedControlNode!==void 0)if(s.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var l=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===l.id?this._performEditEdge(s.id,a.to.id):this._performEditEdge(a.from.id,s.id)}else a.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Ce({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var t=this.lastTouch,r=this.selectionHandler.getNodeAt(t);if(r!==void 0)if(r.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this._getNewTargetNode(r.x,r.y);this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id);var o=this.body.functions.createEdge({id:"connectionEdge"+Gn(),from:r.id,to:a.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[o.id]=o,this.body.edgeIndices.push(o.id),this.temporaryIds.nodes.push(a.id),this.temporaryIds.edges.push(o.id)}this.touchTime=new Date().valueOf()}}},{key:"_dragControlNode",value:function(e){var t=this.body.functions.getPointer(e.center),r=this.selectionHandler._pointerToPositionObject(t),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(r),s=void 0,u=o.length-1;u>=0;u--){var l;if(ae(l=this.temporaryIds.nodes).call(l,o[u])===-1){s=this.body.nodes[o[u]];break}}if(e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,t),this.temporaryIds.nodes[0]!==void 0){var h=this.body.nodes[this.temporaryIds.nodes[0]];h.x=this.canvas._XconvertDOMtoCanvas(t.x),h.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}},{key:"_finishConnect",value:function(e){var t=this.body.functions.getPointer(e.center),r=this.selectionHandler._pointerToPositionObject(t),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(r),s=void 0,u=o.length-1;u>=0;u--){var l;if(ae(l=this.temporaryIds.nodes).call(l,o[u])===-1){s=this.body.nodes[o[u]];break}}this._cleanupTemporaryNodesAndEdges(),s!==void 0&&(s.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[a]!==void 0&&this.body.nodes[s.id]!==void 0&&this._performAddEdge(a,s.id)),e.controlEdge={from:a,to:s?s.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,t),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(e){var t=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,t,void 0,!0)}},{key:"_performAddNode",value:function(e){var t=this,r={id:Gn(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(r,function(a){a!=null&&t.inMode==="addNode"&&t.body.data.nodes.getDataSet().add(a),t.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(r),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(e,t){var r=this,a={from:e,to:t};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(a,function(o){o!=null&&r.inMode==="addEdge"&&(r.body.data.edges.getDataSet().add(o),r.selectionHandler.unselectAll(),r.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(e,t){var r=this,a={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label},o=this.options.editEdge;if(ce(o)==="object"&&(o=o.editWithoutDrag),typeof o=="function")if(o.length===2)o(a,function(s){s==null||r.inMode!=="editEdge"?(r.body.edges[a.id].updateEdgeType(),r.body.emitter.emit("_redraw"),r.showManipulatorToolbar()):(r.body.data.edges.getDataSet().update(s),r.selectionHandler.unselectAll(),r.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(a),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),i}(),M="string",A="boolean",T="number",Bn="array",W="object",v_="dom",Hie="any",Eh=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],Sh={borderWidth:{number:T},borderWidthSelected:{number:T,undefined:"undefined"},brokenImage:{string:M,undefined:"undefined"},chosen:{label:{boolean:A,function:"function"},node:{boolean:A,function:"function"},__type__:{object:W,boolean:A}},color:{border:{string:M},background:{string:M},highlight:{border:{string:M},background:{string:M},__type__:{object:W,string:M}},hover:{border:{string:M},background:{string:M},__type__:{object:W,string:M}},__type__:{object:W,string:M}},opacity:{number:T,undefined:"undefined"},fixed:{x:{boolean:A},y:{boolean:A},__type__:{object:W,boolean:A}},font:{align:{string:M},color:{string:M},size:{number:T},face:{string:M},background:{string:M},strokeWidth:{number:T},strokeColor:{string:M},vadjust:{number:T},multi:{boolean:A,string:M},bold:{color:{string:M},size:{number:T},face:{string:M},mod:{string:M},vadjust:{number:T},__type__:{object:W,string:M}},boldital:{color:{string:M},size:{number:T},face:{string:M},mod:{string:M},vadjust:{number:T},__type__:{object:W,string:M}},ital:{color:{string:M},size:{number:T},face:{string:M},mod:{string:M},vadjust:{number:T},__type__:{object:W,string:M}},mono:{color:{string:M},size:{number:T},face:{string:M},mod:{string:M},vadjust:{number:T},__type__:{object:W,string:M}},__type__:{object:W,string:M}},group:{string:M,number:T,undefined:"undefined"},heightConstraint:{minimum:{number:T},valign:{string:M},__type__:{object:W,boolean:A,number:T}},hidden:{boolean:A},icon:{face:{string:M},code:{string:M},size:{number:T},color:{string:M},weight:{string:M,number:T},__type__:{object:W}},id:{string:M,number:T},image:{selected:{string:M,undefined:"undefined"},unselected:{string:M,undefined:"undefined"},__type__:{object:W,string:M}},imagePadding:{top:{number:T},right:{number:T},bottom:{number:T},left:{number:T},__type__:{object:W,number:T}},label:{string:M,undefined:"undefined"},labelHighlightBold:{boolean:A},level:{number:T,undefined:"undefined"},margin:{top:{number:T},right:{number:T},bottom:{number:T},left:{number:T},__type__:{object:W,number:T}},mass:{number:T},physics:{boolean:A},scaling:{min:{number:T},max:{number:T},label:{enabled:{boolean:A},min:{number:T},max:{number:T},maxVisible:{number:T},drawThreshold:{number:T},__type__:{object:W,boolean:A}},customScalingFunction:{function:"function"},__type__:{object:W}},shadow:{enabled:{boolean:A},color:{string:M},size:{number:T},x:{number:T},y:{number:T},__type__:{object:W,boolean:A}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:A,array:Bn},borderRadius:{number:T},interpolation:{boolean:A},useImageSize:{boolean:A},useBorderWithImage:{boolean:A},coordinateOrigin:{string:["center","top-left"]},__type__:{object:W}},size:{number:T},title:{string:M,dom:v_,undefined:"undefined"},value:{number:T,undefined:"undefined"},widthConstraint:{minimum:{number:T},maximum:{number:T},__type__:{object:W,boolean:A,number:T}},x:{number:T},y:{number:T},__type__:{object:W}},Wie={configure:{enabled:{boolean:A},filter:{boolean:A,string:M,array:Bn,function:"function"},container:{dom:v_},showButton:{boolean:A},__type__:{object:W,boolean:A,string:M,array:Bn,function:"function"}},edges:{arrows:{to:{enabled:{boolean:A},scaleFactor:{number:T},type:{string:Eh},imageHeight:{number:T},imageWidth:{number:T},src:{string:M},__type__:{object:W,boolean:A}},middle:{enabled:{boolean:A},scaleFactor:{number:T},type:{string:Eh},imageWidth:{number:T},imageHeight:{number:T},src:{string:M},__type__:{object:W,boolean:A}},from:{enabled:{boolean:A},scaleFactor:{number:T},type:{string:Eh},imageWidth:{number:T},imageHeight:{number:T},src:{string:M},__type__:{object:W,boolean:A}},__type__:{string:["from","to","middle"],object:W}},endPointOffset:{from:{number:T},to:{number:T},__type__:{object:W,number:T}},arrowStrikethrough:{boolean:A},background:{enabled:{boolean:A},color:{string:M},size:{number:T},dashes:{boolean:A,array:Bn},__type__:{object:W,boolean:A}},chosen:{label:{boolean:A,function:"function"},edge:{boolean:A,function:"function"},__type__:{object:W,boolean:A}},color:{color:{string:M},highlight:{string:M},hover:{string:M},inherit:{string:["from","to","both"],boolean:A},opacity:{number:T},__type__:{object:W,string:M}},dashes:{boolean:A,array:Bn},font:{color:{string:M},size:{number:T},face:{string:M},background:{string:M},strokeWidth:{number:T},strokeColor:{string:M},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:T},multi:{boolean:A,string:M},bold:{color:{string:M},size:{number:T},face:{string:M},mod:{string:M},vadjust:{number:T},__type__:{object:W,string:M}},boldital:{color:{string:M},size:{number:T},face:{string:M},mod:{string:M},vadjust:{number:T},__type__:{object:W,string:M}},ital:{color:{string:M},size:{number:T},face:{string:M},mod:{string:M},vadjust:{number:T},__type__:{object:W,string:M}},mono:{color:{string:M},size:{number:T},face:{string:M},mod:{string:M},vadjust:{number:T},__type__:{object:W,string:M}},__type__:{object:W,string:M}},hidden:{boolean:A},hoverWidth:{function:"function",number:T},label:{string:M,undefined:"undefined"},labelHighlightBold:{boolean:A},length:{number:T,undefined:"undefined"},physics:{boolean:A},scaling:{min:{number:T},max:{number:T},label:{enabled:{boolean:A},min:{number:T},max:{number:T},maxVisible:{number:T},drawThreshold:{number:T},__type__:{object:W,boolean:A}},customScalingFunction:{function:"function"},__type__:{object:W}},selectionWidth:{function:"function",number:T},selfReferenceSize:{number:T},selfReference:{size:{number:T},angle:{number:T},renderBehindTheNode:{boolean:A},__type__:{object:W}},shadow:{enabled:{boolean:A},color:{string:M},size:{number:T},x:{number:T},y:{number:T},__type__:{object:W,boolean:A}},smooth:{enabled:{boolean:A},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:T},forceDirection:{string:["horizontal","vertical","none"],boolean:A},__type__:{object:W,boolean:A}},title:{string:M,undefined:"undefined"},width:{number:T},widthConstraint:{maximum:{number:T},__type__:{object:W,boolean:A,number:T}},value:{number:T,undefined:"undefined"},__type__:{object:W}},groups:{useDefaultGroups:{boolean:A},__any__:Sh,__type__:{object:W}},interaction:{dragNodes:{boolean:A},dragView:{boolean:A},hideEdgesOnDrag:{boolean:A},hideEdgesOnZoom:{boolean:A},hideNodesOnDrag:{boolean:A},hover:{boolean:A},keyboard:{enabled:{boolean:A},speed:{x:{number:T},y:{number:T},zoom:{number:T},__type__:{object:W}},bindToWindow:{boolean:A},autoFocus:{boolean:A},__type__:{object:W,boolean:A}},multiselect:{boolean:A},navigationButtons:{boolean:A},selectable:{boolean:A},selectConnectedEdges:{boolean:A},hoverConnectedEdges:{boolean:A},tooltipDelay:{number:T},zoomView:{boolean:A},zoomSpeed:{number:T},__type__:{object:W}},layout:{randomSeed:{undefined:"undefined",number:T,string:M},improvedLayout:{boolean:A},clusterThreshold:{number:T},hierarchical:{enabled:{boolean:A},levelSeparation:{number:T},nodeSpacing:{number:T},treeSpacing:{number:T},blockShifting:{boolean:A},edgeMinimization:{boolean:A},parentCentralization:{boolean:A},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:W,boolean:A}},__type__:{object:W}},manipulation:{enabled:{boolean:A},initiallyActive:{boolean:A},addNode:{boolean:A,function:"function"},addEdge:{boolean:A,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:W,boolean:A,function:"function"}},deleteNode:{boolean:A,function:"function"},deleteEdge:{boolean:A,function:"function"},controlNodeStyle:Sh,__type__:{object:W,boolean:A}},nodes:Sh,physics:{enabled:{boolean:A},barnesHut:{theta:{number:T},gravitationalConstant:{number:T},centralGravity:{number:T},springLength:{number:T},springConstant:{number:T},damping:{number:T},avoidOverlap:{number:T},__type__:{object:W}},forceAtlas2Based:{theta:{number:T},gravitationalConstant:{number:T},centralGravity:{number:T},springLength:{number:T},springConstant:{number:T},damping:{number:T},avoidOverlap:{number:T},__type__:{object:W}},repulsion:{centralGravity:{number:T},springLength:{number:T},springConstant:{number:T},nodeDistance:{number:T},damping:{number:T},__type__:{object:W}},hierarchicalRepulsion:{centralGravity:{number:T},springLength:{number:T},springConstant:{number:T},nodeDistance:{number:T},damping:{number:T},avoidOverlap:{number:T},__type__:{object:W}},maxVelocity:{number:T},minVelocity:{number:T},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:A},iterations:{number:T},updateInterval:{number:T},onlyDynamicEdges:{boolean:A},fit:{boolean:A},__type__:{object:W,boolean:A}},timestep:{number:T},adaptiveTimestep:{boolean:A},wind:{x:{number:T},y:{number:T},__type__:{object:W}},__type__:{object:W,boolean:A}},autoResize:{boolean:A},clickToUse:{boolean:A},locale:{string:M},locales:{__any__:{any:Hie},__type__:{object:W}},height:{string:M},width:{string:M},__type__:{object:W}},p_={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},Vie=function(n,e,t){var r;return!!(Kt(n).call(n,"physics")&&Kt(r=p_.physics.solver).call(r,e)&&t.physics.solver!==e&&e!=="wind")},Uie=function(){function i(){D(this,i)}return R(i,[{key:"getDistances",value:function(e,t,r){for(var a={},o=e.edges,s=0;s<t.length;s++){var u=t[s],l={};a[u]=l;for(var h=0;h<t.length;h++)l[t[h]]=s==h?0:1e9}for(var d=0;d<r.length;d++){var f=o[r[d]];f.connected===!0&&a[f.fromId]!==void 0&&a[f.toId]!==void 0&&(a[f.fromId][f.toId]=1,a[f.toId][f.fromId]=1)}for(var c=t.length,v=0;v<c;v++)for(var g=t[v],b=a[g],p=0;p<c-1;p++)for(var $=t[p],y=a[$],m=p+1;m<c;m++){var _=t[m],O=a[_],k=Math.min(y[_],y[g]+b[_]);y[_]=k,O[$]=k}return a}}]),i}(),Gie=function(){function i(n,e,t){D(this,i),this.body=n,this.springLength=e,this.springConstant=t,this.distanceSolver=new Uie}return R(i,[{key:"setOptions",value:function(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}},{key:"solve",value:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(a),this._createK_matrix(a),this._createE_matrix();for(var o=.01,s=1,u=0,l=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),h=5,d=1e9,f=0,c=0,v=0,g=0,b=0;d>o&&u<l;){u+=1;var p=this._getHighestEnergyNode(r),$=_e(p,4);for(f=$[0],d=$[1],c=$[2],v=$[3],g=d,b=0;g>s&&b<h;){b+=1,this._moveNode(f,c,v);var y=this._getEnergy(f),m=_e(y,3);g=m[0],c=m[1],v=m[2]}}}},{key:"_getHighestEnergyNode",value:function(e){for(var t=this.body.nodeIndices,r=this.body.nodes,a=0,o=t[0],s=0,u=0,l=0;l<t.length;l++){var h=t[l];if(r[h].predefinedPosition!==!0||r[h].isCluster===!0&&e===!0||r[h].options.fixed.x!==!0||r[h].options.fixed.y!==!0){var d=this._getEnergy(h),f=_e(d,3),c=f[0],v=f[1],g=f[2];a<c&&(a=c,o=h,s=v,u=g)}}return[o,a,s,u]}},{key:"_getEnergy",value:function(e){var t=_e(this.E_sums[e],2),r=t[0],a=t[1],o=Math.sqrt(Math.pow(r,2)+Math.pow(a,2));return[o,r,a]}},{key:"_moveNode",value:function(e,t,r){for(var a=this.body.nodeIndices,o=this.body.nodes,s=0,u=0,l=0,h=o[e].x,d=o[e].y,f=this.K_matrix[e],c=this.L_matrix[e],v=0;v<a.length;v++){var g=a[v];if(g!==e){var b=o[g].x,p=o[g].y,$=f[g],y=c[g],m=1/Math.pow(Math.pow(h-b,2)+Math.pow(d-p,2),1.5);s+=$*(1-y*Math.pow(d-p,2)*m),u+=$*(y*(h-b)*(d-p)*m),l+=$*(1-y*Math.pow(h-b,2)*m)}}var _=s,O=u,k=t,S=l,w=r,E=(k/_+w/O)/(O/_-S/O),F=-(O*E+k)/_;o[e].x+=F,o[e].y+=E,this._updateE_matrix(e)}},{key:"_createL_matrix",value:function(e){var t=this.body.nodeIndices,r=this.springLength;this.L_matrix=[];for(var a=0;a<t.length;a++){this.L_matrix[t[a]]={};for(var o=0;o<t.length;o++)this.L_matrix[t[a]][t[o]]=r*e[t[a]][t[o]]}}},{key:"_createK_matrix",value:function(e){var t=this.body.nodeIndices,r=this.springConstant;this.K_matrix=[];for(var a=0;a<t.length;a++){this.K_matrix[t[a]]={};for(var o=0;o<t.length;o++)this.K_matrix[t[a]][t[o]]=r*Math.pow(e[t[a]][t[o]],-2)}}},{key:"_createE_matrix",value:function(){var e=this.body.nodeIndices,t=this.body.nodes;this.E_matrix={},this.E_sums={};for(var r=0;r<e.length;r++)this.E_matrix[e[r]]=[];for(var a=0;a<e.length;a++){for(var o=e[a],s=t[o].x,u=t[o].y,l=0,h=0,d=a;d<e.length;d++){var f=e[d];if(f!==o){var c=t[f].x,v=t[f].y,g=1/Math.sqrt(Math.pow(s-c,2)+Math.pow(u-v,2));this.E_matrix[o][d]=[this.K_matrix[o][f]*(s-c-this.L_matrix[o][f]*(s-c)*g),this.K_matrix[o][f]*(u-v-this.L_matrix[o][f]*(u-v)*g)],this.E_matrix[f][a]=this.E_matrix[o][d],l+=this.E_matrix[o][d][0],h+=this.E_matrix[o][d][1]}}this.E_sums[o]=[l,h]}}},{key:"_updateE_matrix",value:function(e){for(var t=this.body.nodeIndices,r=this.body.nodes,a=this.E_matrix[e],o=this.K_matrix[e],s=this.L_matrix[e],u=r[e].x,l=r[e].y,h=0,d=0,f=0;f<t.length;f++){var c=t[f];if(c!==e){var v=a[f],g=v[0],b=v[1],p=r[c].x,$=r[c].y,y=1/Math.sqrt(Math.pow(u-p,2)+Math.pow(l-$,2)),m=o[c]*(u-p-s[c]*(u-p)*y),_=o[c]*(l-$-s[c]*(l-$)*y);a[f]=[m,_],h+=m,d+=_;var O=this.E_sums[c];O[0]+=m-g,O[1]+=_-b}}this.E_sums[e]=[h,d]}}]),i}();function j(i,n,e){var t,r,a,o,s=this;if(!(this instanceof j))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:qY,clickToUse:!1},Ce(this.options,this.defaultOptions),this.body={container:i,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:x(t=this.on).call(t,this),off:x(r=this.off).call(r,this),emit:x(a=this.emit).call(a,this),once:x(o=this.once).call(o,this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}},selectionBox:{show:!1,position:{start:{x:0,y:0},end:{x:0,y:0}}}},this.bindEventListeners(),this.images=new QY(function(){return s.body.emitter.emit("_requestRedraw")}),this.groups=new cQ,this.canvas=new Rte(this.body),this.selectionHandler=new mre(this.body,this.canvas),this.interactionHandler=new jte(this.body,this.canvas,this.selectionHandler),this.view=new Nte(this.body,this.canvas),this.renderer=new Ate(this.body,this.canvas),this.physics=new mte(this.body),this.layoutEngine=new Bie(this.body),this.clustering=new kte(this.body),this.manipulation=new jie(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new nee(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new ute(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new Gie(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(e),this.setData(n)}D1(j.prototype);j.prototype.setOptions=function(i){var n=this;if(i===null&&(i=void 0),i!==void 0){var e=OY.validate(i,Wie);e===!0&&console.error("%cErrors have been found in the supplied options object.",Tw);var t=["locale","locales","clickToUse"];if(Tn(t,this.options,i),i.locale!==void 0&&(i.locale=YY(i.locales||this.options.locales,i.locale)),i=this.layoutEngine.setOptions(i.layout,i),this.canvas.setOptions(i),this.groups.setOptions(i.groups),this.nodesHandler.setOptions(i.nodes),this.edgesHandler.setOptions(i.edges),this.physics.setOptions(i.physics),this.manipulation.setOptions(i.manipulation,i,this.options),this.interactionHandler.setOptions(i.interaction),this.renderer.setOptions(i.interaction),this.selectionHandler.setOptions(i.interaction),i.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in i&&(this.configurator||(this.configurator=new EY(this,this.body.container,p_,this.canvas.pixelRatio,Vie)),this.configurator.setOptions(i.configure)),this.configurator&&this.configurator.options.enabled===!0){var r={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};ye(r.nodes,this.nodesHandler.options),ye(r.edges,this.edgesHandler.options),ye(r.layout,this.layoutEngine.options),ye(r.interaction,this.selectionHandler.options),ye(r.interaction,this.renderer.options),ye(r.interaction,this.interactionHandler.options),ye(r.manipulation,this.manipulation.options),ye(r.physics,this.physics.options),ye(r.global,this.canvas.options),ye(r.global,this.options),this.configurator.setModuleOptions(r)}i.clickToUse!==void 0?i.clickToUse===!0?this.activator===void 0&&(this.activator=new _Y(this.canvas.frame),this.activator.on("change",function(){n.body.emitter.emit("activate")})):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}};j.prototype._updateVisibleIndices=function(){var i=this.body.nodes,n=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&!this.clustering._isClusteredNode(e)&&i[e].options.hidden===!1&&this.body.nodeIndices.push(i[e].id);for(var t in n)if(Object.prototype.hasOwnProperty.call(n,t)){var r=n[t],a=i[r.fromId],o=i[r.toId],s=a!==void 0&&o!==void 0,u=!this.clustering._isClusteredEdge(t)&&r.options.hidden===!1&&s&&a.options.hidden===!1&&o.options.hidden===!1;u&&this.body.edgeIndices.push(r.id)}};j.prototype.bindEventListeners=function(){var i=this;this.body.emitter.on("_dataChanged",function(){i.edgesHandler._updateState(),i.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",function(){i.clustering._updateState(),i._updateVisibleIndices(),i._updateValueRange(i.body.nodes),i._updateValueRange(i.body.edges),i.body.emitter.emit("startSimulation"),i.body.emitter.emit("_requestRedraw")})};j.prototype.setData=function(i){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),i&&i.dot&&(i.nodes||i.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(i&&i.options),i&&i.dot){console.warn("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");var n=RY(i.dot);this.setData(n);return}else if(i&&i.gephi){console.warn("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");var e=FY(i.gephi);this.setData(e);return}else this.nodesHandler.setData(i&&i.nodes,!0),this.edgesHandler.setData(i&&i.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};j.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(var i in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,i)&&delete this.body.nodes[i];for(var n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&delete this.body.edges[n];_r(this.body.container)};j.prototype._updateValueRange=function(i){var n,e=void 0,t=void 0,r=0;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)){var a=i[n].getValue();a!==void 0&&(e=e===void 0?a:Math.min(a,e),t=t===void 0?a:Math.max(a,t),r+=a)}if(e!==void 0&&t!==void 0)for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&i[n].setValueRange(e,t,r)};j.prototype.isActive=function(){return!this.activator||this.activator.active};j.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};j.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};j.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};j.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};j.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};j.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};j.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};j.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};j.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};j.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};j.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};j.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};j.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};j.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};j.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};j.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};j.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};j.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};j.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};j.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};j.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};j.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};j.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};j.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};j.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};j.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};j.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};j.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};j.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};j.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};j.prototype.getConnectedNodes=function(i){return this.body.nodes[i]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};j.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};j.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};j.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};j.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};j.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};j.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};j.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};j.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};j.prototype.getNodeAt=function(){var i=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return i!==void 0&&i.id!==void 0?i.id:i};j.prototype.getEdgeAt=function(){var i=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return i!==void 0&&i.id!==void 0?i.id:i};j.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};j.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};j.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};j.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};j.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};j.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};j.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};j.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};j.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};j.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};j.prototype.getOptionsFromConfigurator=function(){var i={};return this.configurator&&(i=this.configurator.getOptions.apply(this.configurator)),i};const Dd=y_();let Bm;function Kie(){Bm||(Bm=(async()=>{const{default:i}=await m_(()=>import("./index.a6656ecb.js").then(n=>n.i),[],import.meta.url);Dd.value=new i({html:!0,linkify:!0,breaks:!0})})())}function Jie(i){return Kie(),Dd.value?Dd.value.render(i):i}const ene=b_({__name:"NButton",props:{to:null,icon:null},setup(i){return(n,e)=>{const t=g_;return oc(),ac(__(i.to?E_(O_):"button"),w_({to:i.to},n.$attrs,{class:"n-transition n-button n-button-base hover:n-button-hover active:n-button-active focus-visible:n-focus-base n-disabled:n-disabled"}),{default:$_(()=>[sc(n.$slots,"icon",{},()=>[i.icon?(oc(),ac(t,{key:0,icon:i.icon,class:"n-button-icon"},null,8,["icon"])):S_("",!0)]),sc(n.$slots,"default")]),_:3},16,["to"])}}});export{j as N,ene as _,Jie as r};
|