@nuxt/devtools 0.4.5 → 0.5.0
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/README.md +1 -1
- package/dist/chunks/analyze-build.mjs +25 -0
- package/dist/chunks/module-main.mjs +6172 -93
- package/dist/chunks/vite-inspect.mjs +7 -1
- package/dist/chunks/vscode.mjs +12 -5
- package/dist/chunks/vue-inspector.mjs +3 -2
- 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.49aad048.js → Badge.c6f0948b.js} +1 -1
- package/dist/client/_nuxt/CodeSnippets.vue.c8638278.js +1 -0
- package/dist/client/_nuxt/{DrawerRight.vue.606d00e1.js → DrawerRight.vue.f79970eb.js} +1 -1
- package/dist/client/_nuxt/{DurationDisplay.vue.3073b599.js → DurationDisplay.vue.d1c8be7a.js} +1 -1
- package/dist/client/_nuxt/FilepathItem.vue.22e62c13.js +1 -0
- package/dist/client/_nuxt/HelpFab.f179afc3.css +1 -0
- package/dist/client/_nuxt/HelpFab.vue.82dbe71b.js +1 -0
- package/dist/client/_nuxt/{LaunchPage.vue.8bbdc3aa.js → LaunchPage.vue.e9f10392.js} +1 -1
- package/dist/client/_nuxt/NCheckbox.vue.2dbb6d84.js +1 -0
- package/dist/client/_nuxt/NCodeBlock.cf3ce05b.css +1 -0
- package/dist/client/_nuxt/NCodeBlock.vue.7df96def.js +2 -0
- package/dist/client/_nuxt/{NIconButton.vue.43ec44ac.js → NIconButton.vue.61b6fdb9.js} +1 -1
- package/dist/client/_nuxt/NIconTitle.vue.db04ddec.js +1 -0
- package/dist/client/_nuxt/NLink.vue.cee1facb.js +1 -0
- package/dist/client/_nuxt/NMarkdown.vue.bfa53523.js +1 -0
- package/dist/client/_nuxt/{NPanelGrids.0426d51d.js → NPanelGrids.f0b55b40.js} +1 -1
- package/dist/client/_nuxt/NSectionBlock.63c19da9.css +1 -0
- package/dist/client/_nuxt/NSectionBlock.b03d4f1a.js +1 -0
- package/dist/client/_nuxt/NSelect.vue.04879311.js +1 -0
- package/dist/client/_nuxt/NSwitch.vue.6de70289.js +1 -0
- package/dist/client/_nuxt/NTextInput.vue.3d7af8ee.js +1 -0
- package/dist/client/_nuxt/NTip.vue.d3e88526.js +1 -0
- package/dist/client/_nuxt/Navbar.vue.1175e5b5.js +1 -0
- package/dist/client/_nuxt/NpmVersionCheck.vue.82d98ad9.js +1 -0
- package/dist/client/_nuxt/PanelLeftRight.vue.b6fba8cf.js +1 -0
- package/dist/client/_nuxt/StateEditor.vue.452c2a1e.js +1 -0
- package/dist/client/_nuxt/{__inspecting.84bde860.js → __inspecting.aa44686c.js} +1 -1
- package/dist/client/_nuxt/analyze-build.74e951ef.js +1 -0
- package/dist/client/_nuxt/assets.fbaf474a.js +16 -0
- package/dist/client/_nuxt/client.64d509dc.js +1 -0
- package/dist/client/_nuxt/components.6ce21080.js +99 -0
- package/dist/client/_nuxt/custom-_name_.1f84ba8c.js +1 -0
- package/dist/client/_nuxt/default.2d7cfbe4.js +1 -0
- package/dist/client/_nuxt/{editor.ff73b8b7.js → editor.e9488ebd.js} +1 -1
- package/dist/client/_nuxt/entry.8297d1ff.js +19 -0
- package/dist/client/_nuxt/entry.f90d2a3f.css +1 -0
- package/dist/client/_nuxt/error-404.6fbc16df.js +1 -0
- package/dist/client/_nuxt/{error-500.7154a75a.js → error-500.6f213eb2.js} +1 -1
- package/dist/client/_nuxt/error-component.b12ab471.js +3 -0
- package/dist/client/_nuxt/full.6c0706c9.js +1 -0
- package/dist/client/_nuxt/fuse.esm.88e2763d.js +1 -0
- package/dist/client/_nuxt/hooks.10fe847b.js +1 -0
- package/dist/client/_nuxt/imports.dccf485c.js +1 -0
- package/dist/client/_nuxt/index.bd18d84a.js +1 -0
- package/dist/client/_nuxt/index.e4ec7d02.js +17 -0
- package/dist/client/_nuxt/json-editor-vue.98769e76.js +137 -0
- package/dist/client/_nuxt/middleware.4d606e29.js +1 -0
- package/dist/client/_nuxt/modules.7f83fecd.js +4 -0
- package/dist/client/_nuxt/none.685e4f52.js +1 -0
- package/dist/client/_nuxt/open-graph.424b4348.js +3 -0
- package/dist/client/_nuxt/overview.13e4bf5e.js +1 -0
- package/dist/client/_nuxt/pages.5bc65ca2.js +1 -0
- package/dist/client/_nuxt/payload.ac68ce00.js +1 -0
- package/dist/client/_nuxt/plugins.dc27cda6.js +1 -0
- package/dist/client/_nuxt/runtime-configs.34323c66.js +1 -0
- package/dist/client/_nuxt/server-routes.669a8424.js +9 -0
- package/dist/client/_nuxt/settings.5a3586f3.js +1 -0
- package/dist/client/_nuxt/storage.edd17bdb.js +1 -0
- package/dist/client/_nuxt/terminals.20082284.js +9 -0
- package/dist/client/_nuxt/terminals.d1dcf297.css +32 -0
- package/dist/client/_nuxt/{unocss-runtime.a5456e46.js → unocss-runtime.f33e0ffe.js} +2 -2
- package/dist/client/_nuxt/virtual-files.16d4138c.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/client/modules/analyze-build/index.html +7 -0
- package/dist/client/modules/assets/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/middleware/index.html +2 -2
- package/dist/client/modules/modules/index.html +2 -2
- package/dist/client/modules/open-graph/index.html +7 -0
- 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 +2 -2
- package/dist/client/modules/terminals/index.html +2 -2
- package/dist/client/modules/virtual-files/index.html +2 -2
- package/dist/client/settings/index.html +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/devtools.client.mjs +1 -1
- package/dist/runtime/plugins/view/Container.vue +1 -1
- package/dist/runtime/plugins/view/Frame.vue +9 -4
- package/dist/runtime/plugins/view/state.d.ts +1 -2
- package/dist/runtime/plugins/view/state.mjs +2 -2
- package/dist/shared/{devtools.23768dcf.mjs → devtools.a2798b81.mjs} +2 -1
- package/dist/types.d.ts +26 -13
- package/package.json +37 -31
- package/dist/client/_nuxt/CodeSnippets.vue.473c040b.js +0 -1
- package/dist/client/_nuxt/FilepathItem.vue.b3314ab3.js +0 -1
- package/dist/client/_nuxt/HelpFab.vue.665e0424.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.efe5a5b6.js +0 -1
- package/dist/client/_nuxt/NCodeBlock.vue.f20ad1f9.js +0 -2
- package/dist/client/_nuxt/NIconTitle.vue.2336a153.js +0 -1
- package/dist/client/_nuxt/NMarkdown.vue.8693e3ae.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.bd642c42.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.9f52b6f9.js +0 -1
- package/dist/client/_nuxt/NSwitch.vue.60cb8df3.js +0 -1
- package/dist/client/_nuxt/NTextInput.vue.361fd6cd.js +0 -1
- package/dist/client/_nuxt/NpmVersionCheck.vue.9f35f1dc.js +0 -1
- package/dist/client/_nuxt/NuxtLogo.ef2174f9.js +0 -1
- package/dist/client/_nuxt/PanelLeftRight.vue.583d184f.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.1d137e38.js +0 -1
- package/dist/client/_nuxt/assets.076b9c16.js +0 -16
- package/dist/client/_nuxt/components.02471781.js +0 -1
- package/dist/client/_nuxt/custom-_name_.5bebb320.js +0 -1
- package/dist/client/_nuxt/default.8e9da065.js +0 -1
- package/dist/client/_nuxt/entry.902f663c.js +0 -261
- package/dist/client/_nuxt/entry.cda5cdff.css +0 -32
- package/dist/client/_nuxt/error-404.4d9e4ae0.js +0 -1
- package/dist/client/_nuxt/error-component.23a1e788.js +0 -3
- package/dist/client/_nuxt/full.a10d4dcd.js +0 -1
- package/dist/client/_nuxt/fuse.esm.e5f0aacd.js +0 -1
- package/dist/client/_nuxt/hooks.80ca9780.js +0 -1
- package/dist/client/_nuxt/imports.1b2f6f12.js +0 -1
- package/dist/client/_nuxt/index.10027c98.js +0 -1
- package/dist/client/_nuxt/index.ce8efa93.js +0 -17
- package/dist/client/_nuxt/middleware.8af00f99.js +0 -1
- package/dist/client/_nuxt/modules.d83f8f78.js +0 -1
- package/dist/client/_nuxt/none.69d08df4.js +0 -1
- package/dist/client/_nuxt/overview.fc3bd21f.js +0 -1
- package/dist/client/_nuxt/pages.6ecfcd29.js +0 -1
- package/dist/client/_nuxt/payload.42332653.js +0 -1
- package/dist/client/_nuxt/plugins.2d433e66.js +0 -1
- package/dist/client/_nuxt/runtime-configs.1cc6d705.js +0 -1
- package/dist/client/_nuxt/server-routes.436b8d89.js +0 -9
- package/dist/client/_nuxt/settings.661215f6.js +0 -1
- package/dist/client/_nuxt/storage.50e9d190.js +0 -1
- package/dist/client/_nuxt/terminals.4329aeb9.css +0 -1
- package/dist/client/_nuxt/terminals.80be701c.js +0 -1
- package/dist/client/_nuxt/virtual-files.82f29e98.js +0 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import{_ as g_}from"./NIconButton.vue.61b6fdb9.js";import{o as fe,h as lt,f as ne,l as ja,a as Ui,p as rn,t as ok,u as Z,i as Ve,c as $t,v as Qt,V as Vu,r as Ea,W as sk,X as uk,R as lk,Y as ck,Z as hk,a0 as dk,a1 as fk,w as at,F as Vr,a2 as y_,a3 as vk,G as Sa,k as pk,a4 as gk,a5 as yk,a6 as mk,q as pa,b as $k,D as bk,a7 as wk,a8 as _k}from"./entry.8297d1ff.js";import{_ as Ek}from"./HelpFab.vue.82dbe71b.js";import{_ as Sk}from"./NCheckbox.vue.2dbb6d84.js";import{_ as m_}from"./Navbar.vue.1175e5b5.js";import{_ as $_}from"./Badge.c6f0948b.js";import{_ as b_}from"./FilepathItem.vue.22e62c13.js";import{a as Ok}from"./editor.e9488ebd.js";import{_ as Tk}from"./DrawerRight.vue.f79970eb.js";import{_ as xk}from"./NSectionBlock.b03d4f1a.js";import{_ as Pk}from"./NIconTitle.vue.db04ddec.js";import{D as jl}from"./constants.d7bcda3c.js";import{F as kk}from"./fuse.esm.88e2763d.js";import"./NTextInput.vue.3d7af8ee.js";const Ik={class:"markdown-body"},Ck=ne("h1",null,"Components",-1),Ak=ne("p",null,[ja("Vue components under the "),ne("code",null,"components/"),ja(" directory are automatically registered and can be used in your templates without importing them.")],-1),Rk=ne("p",null,[ne("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Dk=[Ck,Ak,Rk],Mk={__name:"components",setup(t,{expose:i}){return i({frontmatter:{}}),(r,n)=>(fe(),lt("div",Ik,Dk))}},Nk=/\d/,Fk=["-","_","/","."];function Bk(t=""){if(!Nk.test(t))return t.toUpperCase()===t}function Lk(t,i){const e=i??Fk,r=[];if(!t||typeof t!="string")return r;let n="",a,o;for(const s of t){const u=e.includes(s);if(u===!0){r.push(n),n="",a=void 0;continue}const l=Bk(s);if(o===!1){if(a===!1&&l===!0){r.push(n),n=s,a=l;continue}if(a===!0&&l===!1&&n.length>1){const c=n[n.length-1];r.push(n.slice(0,Math.max(0,n.length-1))),n=c+s,a=l;continue}}n+=s,a=l,o=u}return r.push(n),r}function jk(t){return t?t[0].toUpperCase()+t.slice(1):""}function w_(t){return t?(Array.isArray(t)?t:Lk(t)).map(i=>jk(i)).join(""):""}const zk={"font-mono":"","text-sm":""},Hk=ne("span",{mr1:"",op20:""},"<",-1),Wk=ne("span",{ml1:"",op20:""},"/>",-1),__=Ui({__name:"ComponentName",props:{component:null},setup(t){const i=t,e=rn(()=>i.component.pascalName||w_(i.component.name||i.component.__name||i.component.kebabName||""));return(r,n)=>(fe(),lt("code",zk,[Hk,ja(ok(Z(e)),1),Wk]))}}),Vk={flex:"~ col gap1","items-start":"","of-hidden":""},Uk={flex:"~ gap2"},E_=Ui({__name:"ComponentDetails",props:{component:null},setup(t){const i=t,e=rn(()=>i.component.pascalName||w_(i.component.name||i.component.__name||i.component.kebabName||"")),r=rn(()=>i.component.filePath||i.component.file||i.component.__file||""),n=Ok();return(a,o)=>{const s=__,u=g_,l=$_,c=b_;return fe(),lt("div",Vk,[ne("div",Uk,[Ve(s,{component:t.component},null,8,["component"]),Ve(u,{title:"Copy name","flex-none":"",icon:"carbon-copy",onClick:o[0]||(o[0]=h=>Z(n)(`<${Z(e)}></${Z(e)}>`))}),t.component.global?(fe(),$t(l,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"runtime"})):Qt("",!0)]),ne("div",null,[Z(r)?(fe(),$t(c,{key:0,filepath:Z(r),"w-full":"","text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):Qt("",!0)]),Vu(a.$slots,"default")])}}});/**
|
|
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.6
|
|
8
|
+
* @date 2023-03-22T11:39:37.256Z
|
|
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 Uu(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}var Cy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Q(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var hu={},Gk={get exports(){return hu},set exports(t){hu=t}},od={},Kk={get exports(){return od},set exports(t){od=t}},sd={},qk={get exports(){return sd},set exports(t){sd=t}},us=function(t){return t&&t.Math==Math&&t},Pe=us(typeof globalThis=="object"&&globalThis)||us(typeof window=="object"&&window)||us(typeof self=="object"&&self)||us(typeof Cy=="object"&&Cy)||function(){return this}()||Function("return this")(),oe=function(t){try{return!!t()}catch{return!0}},Yk=oe,oo=!Yk(function(){var t=function(){}.bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),Xk=oo,S_=Function.prototype,Ay=S_.apply,Ry=S_.call,Gi=typeof Reflect=="object"&&Reflect.apply||(Xk?Ry.bind(Ay):function(){return Ry.apply(Ay,arguments)}),O_=oo,T_=Function.prototype,ud=T_.call,Qk=O_&&T_.bind.bind(ud,ud),de=O_?Qk:function(t){return function(){return ud.apply(t,arguments)}},x_=de,Zk=x_({}.toString),Jk=x_("".slice),Rr=function(t){return Jk(Zk(t),8,-1)},eI=Rr,tI=de,Jp=function(t){if(eI(t)==="Function")return tI(t)},ld=typeof document=="object"&&document.all,rI=typeof ld>"u"&&ld!==void 0,P_={all:ld,IS_HTMLDDA:rI},k_=P_,nI=k_.all,ke=k_.IS_HTMLDDA?function(t){return typeof t=="function"||t===nI}:function(t){return typeof t=="function"},Un={},iI=oe,Ue=!iI(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),aI=oo,ls=Function.prototype.call,Xe=aI?ls.bind(ls):function(){return ls.apply(ls,arguments)},so={},I_={}.propertyIsEnumerable,C_=Object.getOwnPropertyDescriptor,oI=C_&&!I_.call({1:2},1);so.f=oI?function(i){var e=C_(this,i);return!!e&&e.enumerable}:I_;var Gn=function(t,i){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:i}},sI=de,uI=oe,lI=Rr,zl=Object,cI=sI("".split),Gu=uI(function(){return!zl("z").propertyIsEnumerable(0)})?function(t){return lI(t)=="String"?cI(t,""):zl(t)}:zl,uo=function(t){return t==null},hI=uo,dI=TypeError,lo=function(t){if(hI(t))throw dI("Can't call method on "+t);return t},fI=Gu,vI=lo,rr=function(t){return fI(vI(t))},Dy=ke,A_=P_,pI=A_.all,Qe=A_.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:Dy(t)||t===pI}:function(t){return typeof t=="object"?t!==null:Dy(t)},ye={},Hl=ye,Wl=Pe,gI=ke,My=function(t){return gI(t)?t:void 0},pt=function(t,i){return arguments.length<2?My(Hl[t])||My(Wl[t]):Hl[t]&&Hl[t][i]||Wl[t]&&Wl[t][i]},yI=de,Ee=yI({}.isPrototypeOf),cn=typeof navigator<"u"&&String(navigator.userAgent)||"",R_=Pe,Vl=cn,Ny=R_.process,Fy=R_.Deno,By=Ny&&Ny.versions||Fy&&Fy.version,Ly=By&&By.v8,Kt,du;Ly&&(Kt=Ly.split("."),du=Kt[0]>0&&Kt[0]<4?1:+(Kt[0]+Kt[1]));!du&&Vl&&(Kt=Vl.match(/Edge\/(\d+)/),(!Kt||Kt[1]>=74)&&(Kt=Vl.match(/Chrome\/(\d+)/),Kt&&(du=+Kt[1])));var Ki=du,jy=Ki,mI=oe,qi=!!Object.getOwnPropertySymbols&&!mI(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&jy&&jy<41}),$I=qi,D_=$I&&!Symbol.sham&&typeof Symbol.iterator=="symbol",bI=pt,wI=ke,_I=Ee,EI=D_,SI=Object,co=EI?function(t){return typeof t=="symbol"}:function(t){var i=bI("Symbol");return wI(i)&&_I(i.prototype,SI(t))},OI=String,Yi=function(t){try{return OI(t)}catch{return"Object"}},TI=ke,xI=Yi,PI=TypeError,xt=function(t){if(TI(t))return t;throw PI(xI(t)+" is not a function")},kI=xt,II=uo,eg=function(t,i){var e=t[i];return II(e)?void 0:kI(e)},Ul=Xe,Gl=ke,Kl=Qe,CI=TypeError,AI=function(t,i){var e,r;if(i==="string"&&Gl(e=t.toString)&&!Kl(r=Ul(e,t))||Gl(e=t.valueOf)&&!Kl(r=Ul(e,t))||i!=="string"&&Gl(e=t.toString)&&!Kl(r=Ul(e,t)))return r;throw CI("Can't convert object to primitive value")},nn={},RI={get exports(){return nn},set exports(t){nn=t}},DI=!0,zy=Pe,MI=Object.defineProperty,NI=function(t,i){try{MI(zy,t,{value:i,configurable:!0,writable:!0})}catch{zy[t]=i}return i},FI=Pe,BI=NI,Hy="__core-js_shared__",LI=FI[Hy]||BI(Hy,{}),tg=LI,Wy=tg;(RI.exports=function(t,i){return Wy[t]||(Wy[t]=i!==void 0?i:{})})("versions",[]).push({version:"3.29.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"});var jI=lo,zI=Object,Pt=function(t){return zI(jI(t))},HI=de,WI=Pt,VI=HI({}.hasOwnProperty),ze=Object.hasOwn||function(i,e){return VI(WI(i),e)},UI=de,GI=0,KI=Math.random(),qI=UI(1 .toString),Ku=function(t){return"Symbol("+(t===void 0?"":t)+")_"+qI(++GI+KI,36)},YI=Pe,XI=nn,Vy=ze,QI=Ku,ZI=qi,JI=D_,gi=YI.Symbol,ql=XI("wks"),eC=JI?gi.for||gi:gi&&gi.withoutSetter||QI,Se=function(t){return Vy(ql,t)||(ql[t]=ZI&&Vy(gi,t)?gi[t]:eC("Symbol."+t)),ql[t]},tC=Xe,Uy=Qe,Gy=co,rC=eg,nC=AI,iC=Se,aC=TypeError,oC=iC("toPrimitive"),sC=function(t,i){if(!Uy(t)||Gy(t))return t;var e=rC(t,oC),r;if(e){if(i===void 0&&(i="default"),r=tC(e,t,i),!Uy(r)||Gy(r))return r;throw aC("Can't convert object to primitive value")}return i===void 0&&(i="number"),nC(t,i)},uC=sC,lC=co,qu=function(t){var i=uC(t,"string");return lC(i)?i:i+""},cC=Pe,Ky=Qe,cd=cC.document,hC=Ky(cd)&&Ky(cd.createElement),rg=function(t){return hC?cd.createElement(t):{}},dC=Ue,fC=oe,vC=rg,M_=!dC&&!fC(function(){return Object.defineProperty(vC("div"),"a",{get:function(){return 7}}).a!=7}),pC=Ue,gC=Xe,yC=so,mC=Gn,$C=rr,bC=qu,wC=ze,_C=M_,qy=Object.getOwnPropertyDescriptor;Un.f=pC?qy:function(i,e){if(i=$C(i),e=bC(e),_C)try{return qy(i,e)}catch{}if(wC(i,e))return mC(!gC(yC.f,i,e),i[e])};var EC=oe,SC=ke,OC=/#|\.prototype\./,ho=function(t,i){var e=xC[TC(t)];return e==kC?!0:e==PC?!1:SC(i)?EC(i):!!i},TC=ho.normalize=function(t){return String(t).replace(OC,".").toLowerCase()},xC=ho.data={},PC=ho.NATIVE="N",kC=ho.POLYFILL="P",N_=ho,Yy=Jp,IC=xt,CC=oo,AC=Yy(Yy.bind),hn=function(t,i){return IC(t),i===void 0?t:CC?AC(t,i):function(){return t.apply(i,arguments)}},At={},RC=Ue,DC=oe,F_=RC&&DC(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),MC=Qe,NC=String,FC=TypeError,Rt=function(t){if(MC(t))return t;throw FC(NC(t)+" is not an object")},BC=Ue,LC=M_,jC=F_,cs=Rt,Xy=qu,zC=TypeError,Yl=Object.defineProperty,HC=Object.getOwnPropertyDescriptor,Xl="enumerable",Ql="configurable",Zl="writable";At.f=BC?jC?function(i,e,r){if(cs(i),e=Xy(e),cs(r),typeof i=="function"&&e==="prototype"&&"value"in r&&Zl in r&&!r[Zl]){var n=HC(i,e);n&&n[Zl]&&(i[e]=r.value,r={configurable:Ql in r?r[Ql]:n[Ql],enumerable:Xl in r?r[Xl]:n[Xl],writable:!1})}return Yl(i,e,r)}:Yl:function(i,e,r){if(cs(i),e=Xy(e),cs(r),LC)try{return Yl(i,e,r)}catch{}if("get"in r||"set"in r)throw zC("Accessors not supported");return"value"in r&&(i[e]=r.value),i};var WC=Ue,VC=At,UC=Gn,Dr=WC?function(t,i,e){return VC.f(t,i,UC(1,e))}:function(t,i,e){return t[i]=e,t},hs=Pe,GC=Gi,KC=Jp,qC=ke,YC=Un.f,XC=N_,ii=ye,QC=hn,ai=Dr,Qy=ze,ZC=function(t){var i=function(e,r,n){if(this instanceof i){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return GC(t,this,arguments)};return i.prototype=t.prototype,i},U=function(t,i){var e=t.target,r=t.global,n=t.stat,a=t.proto,o=r?hs:n?hs[e]:(hs[e]||{}).prototype,s=r?ii:ii[e]||ai(ii,e,{})[e],u=s.prototype,l,c,h,d,f,v,g,b,p;for(d in i)l=XC(r?d:e+(n?".":"#")+d,t.forced),c=!l&&o&&Qy(o,d),v=s[d],c&&(t.dontCallGetSet?(p=YC(o,d),g=p&&p.value):g=o[d]),f=c&&g?g:i[d],!(c&&typeof v==typeof f)&&(t.bind&&c?b=QC(f,hs):t.wrap&&c?b=ZC(f):a&&qC(f)?b=KC(f):b=f,(t.sham||f&&f.sham||v&&v.sham)&&ai(b,"sham",!0),ai(s,d,b),a&&(h=e+"Prototype",Qy(ii,h)||ai(ii,h,{}),ai(ii[h],d,f),t.real&&u&&(l||!u[d])&&ai(u,d,f)))},JC=U,eA=Ue,Zy=At.f;JC({target:"Object",stat:!0,forced:Object.defineProperty!==Zy,sham:!eA},{defineProperty:Zy});var tA=ye,B_=tA.Object,rA=qk.exports=function(i,e,r){return B_.defineProperty(i,e,r)};B_.defineProperty.sham&&(rA.sham=!0);var nA=sd,L_=nA,iA=L_,aA=iA,oA=aA,sA=oA;(function(t){t.exports=sA})(Kk);(function(t){t.exports=od})(Gk);var Yu=Q(hu),za={},uA={get exports(){return za},set exports(t){za=t}},hd={},lA={get exports(){return hd},set exports(t){hd=t}},cA=Rr,dn=Array.isArray||function(i){return cA(i)=="Array"},hA=Math.ceil,dA=Math.floor,fA=Math.trunc||function(i){var e=+i;return(e>0?dA:hA)(e)},vA=fA,Xu=function(t){var i=+t;return i!==i||i===0?0:vA(i)},pA=Xu,gA=Math.min,yA=function(t){return t>0?gA(pA(t),9007199254740991):0},mA=yA,Dt=function(t){return mA(t.length)},$A=TypeError,bA=9007199254740991,ng=function(t){if(t>bA)throw $A("Maximum allowed index exceeded");return t},wA=qu,_A=At,EA=Gn,Xi=function(t,i,e){var r=wA(i);r in t?_A.f(t,r,EA(0,e)):t[r]=e},SA=Se,OA=SA("toStringTag"),j_={};j_[OA]="z";var ig=String(j_)==="[object z]",TA=ig,xA=ke,Ks=Rr,PA=Se,kA=PA("toStringTag"),IA=Object,CA=Ks(function(){return arguments}())=="Arguments",AA=function(t,i){try{return t[i]}catch{}},Mr=TA?Ks:function(t){var i,e,r;return t===void 0?"Undefined":t===null?"Null":typeof(e=AA(i=IA(t),kA))=="string"?e:CA?Ks(i):(r=Ks(i))=="Object"&&xA(i.callee)?"Arguments":r},RA=de,DA=ke,dd=tg,MA=RA(Function.toString);DA(dd.inspectSource)||(dd.inspectSource=function(t){return MA(t)});var z_=dd.inspectSource,NA=de,FA=oe,H_=ke,BA=Mr,LA=pt,jA=z_,W_=function(){},zA=[],V_=LA("Reflect","construct"),ag=/^\s*(?:class|function)\b/,HA=NA(ag.exec),WA=!ag.exec(W_),ga=function(i){if(!H_(i))return!1;try{return V_(W_,zA,i),!0}catch{return!1}},U_=function(i){if(!H_(i))return!1;switch(BA(i)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return WA||!!HA(ag,jA(i))}catch{return!0}};U_.sham=!0;var Qu=!V_||FA(function(){var t;return ga(ga.call)||!ga(Object)||!ga(function(){t=!0})||t})?U_:ga,Jy=dn,VA=Qu,UA=Qe,GA=Se,KA=GA("species"),em=Array,qA=function(t){var i;return Jy(t)&&(i=t.constructor,VA(i)&&(i===em||Jy(i.prototype))?i=void 0:UA(i)&&(i=i[KA],i===null&&(i=void 0))),i===void 0?em:i},YA=qA,Zu=function(t,i){return new(YA(t))(i===0?0:i)},XA=oe,QA=Se,ZA=Ki,JA=QA("species"),fo=function(t){return ZA>=51||!XA(function(){var i=[],e=i.constructor={};return e[JA]=function(){return{foo:1}},i[t](Boolean).foo!==1})},eR=U,tR=oe,rR=dn,nR=Qe,iR=Pt,aR=Dt,tm=ng,rm=Xi,oR=Zu,sR=fo,uR=Se,lR=Ki,G_=uR("isConcatSpreadable"),cR=lR>=51||!tR(function(){var t=[];return t[G_]=!1,t.concat()[0]!==t}),hR=function(t){if(!nR(t))return!1;var i=t[G_];return i!==void 0?!!i:rR(t)},dR=!cR||!sR("concat");eR({target:"Array",proto:!0,arity:1,forced:dR},{concat:function(i){var e=iR(this),r=oR(e,0),n=0,a,o,s,u,l;for(a=-1,s=arguments.length;a<s;a++)if(l=a===-1?e:arguments[a],hR(l))for(u=aR(l),tm(n+u),o=0;o<u;o++,n++)o in l&&rm(r,n,l[o]);else tm(n+1),rm(r,n++,l);return r.length=n,r}});var fR=Mr,vR=String,yr=function(t){if(fR(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return vR(t)},Ju={},pR=Xu,gR=Math.max,yR=Math.min,vo=function(t,i){var e=pR(t);return e<0?gR(e+i,0):yR(e,i)},mR=rr,$R=vo,bR=Dt,nm=function(t){return function(i,e,r){var n=mR(i),a=bR(n),o=$R(r,a),s;if(t&&e!=e){for(;a>o;)if(s=n[o++],s!=s)return!0}else for(;a>o;o++)if((t||o in n)&&n[o]===e)return t||o||0;return!t&&-1}},og={includes:nm(!0),indexOf:nm(!1)},po={},wR=de,Jl=ze,_R=rr,ER=og.indexOf,SR=po,im=wR([].push),K_=function(t,i){var e=_R(t),r=0,n=[],a;for(a in e)!Jl(SR,a)&&Jl(e,a)&&im(n,a);for(;i.length>r;)Jl(e,a=i[r++])&&(~ER(n,a)||im(n,a));return n},sg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],OR=K_,TR=sg,go=Object.keys||function(i){return OR(i,TR)},xR=Ue,PR=F_,kR=At,IR=Rt,CR=rr,AR=go;Ju.f=xR&&!PR?Object.defineProperties:function(i,e){IR(i);for(var r=CR(e),n=AR(e),a=n.length,o=0,s;a>o;)kR.f(i,s=n[o++],r[s]);return i};var RR=pt,q_=RR("document","documentElement"),DR=nn,MR=Ku,am=DR("keys"),el=function(t){return am[t]||(am[t]=MR(t))},NR=Rt,FR=Ju,om=sg,BR=po,LR=q_,jR=rg,zR=el,sm=">",um="<",fd="prototype",vd="script",Y_=zR("IE_PROTO"),ec=function(){},X_=function(t){return um+vd+sm+t+um+"/"+vd+sm},lm=function(t){t.write(X_("")),t.close();var i=t.parentWindow.Object;return t=null,i},HR=function(){var t=jR("iframe"),i="java"+vd+":",e;return t.style.display="none",LR.appendChild(t),t.src=String(i),e=t.contentWindow.document,e.open(),e.write(X_("document.F=Object")),e.close(),e.F},ds,qs=function(){try{ds=new ActiveXObject("htmlfile")}catch{}qs=typeof document<"u"?document.domain&&ds?lm(ds):HR():lm(ds);for(var t=om.length;t--;)delete qs[fd][om[t]];return qs()};BR[Y_]=!0;var Kn=Object.create||function(i,e){var r;return i!==null?(ec[fd]=NR(i),r=new ec,ec[fd]=null,r[Y_]=i):r=qs(),e===void 0?r:FR.f(r,e)},yo={},WR=K_,VR=sg,UR=VR.concat("length","prototype");yo.f=Object.getOwnPropertyNames||function(i){return WR(i,UR)};var ug={},cm=vo,GR=Dt,KR=Xi,qR=Array,YR=Math.max,Q_=function(t,i,e){for(var r=GR(t),n=cm(i,r),a=cm(e===void 0?r:e,r),o=qR(YR(a-n,0)),s=0;n<a;n++,s++)KR(o,s,t[n]);return o.length=s,o},XR=Rr,QR=rr,Z_=yo.f,ZR=Q_,J_=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],JR=function(t){try{return Z_(t)}catch{return ZR(J_)}};ug.f=function(i){return J_&&XR(i)=="Window"?JR(i):Z_(QR(i))};var mo={};mo.f=Object.getOwnPropertySymbols;var eD=Dr,Qi=function(t,i,e,r){return r&&r.enumerable?t[i]=e:eD(t,i,e),t},tD=At,lg=function(t,i,e){return tD.f(t,i,e)},$o={},rD=Se;$o.f=rD;var hm=ye,nD=ze,iD=$o,aD=At.f,Ie=function(t){var i=hm.Symbol||(hm.Symbol={});nD(i,t)||aD(i,t,{value:iD.f(t)})},oD=Xe,sD=pt,uD=Se,lD=Qi,eE=function(){var t=sD("Symbol"),i=t&&t.prototype,e=i&&i.valueOf,r=uD("toPrimitive");i&&!i[r]&&lD(i,r,function(n){return oD(e,this)},{arity:1})},cD=ig,hD=Mr,dD=cD?{}.toString:function(){return"[object "+hD(this)+"]"},fD=ig,vD=At.f,pD=Dr,gD=ze,yD=dD,mD=Se,dm=mD("toStringTag"),qn=function(t,i,e,r){if(t){var n=e?t:t.prototype;gD(n,dm)||vD(n,dm,{configurable:!0,value:i}),r&&!fD&&pD(n,"toString",yD)}},$D=Pe,bD=ke,fm=$D.WeakMap,wD=bD(fm)&&/native code/.test(String(fm)),_D=wD,tE=Pe,ED=Qe,SD=Dr,tc=ze,rc=tg,OD=el,TD=po,vm="Object already initialized",pd=tE.TypeError,xD=tE.WeakMap,fu,Ha,vu,PD=function(t){return vu(t)?Ha(t):fu(t,{})},kD=function(t){return function(i){var e;if(!ED(i)||(e=Ha(i)).type!==t)throw pd("Incompatible receiver, "+t+" required");return e}};if(_D||rc.state){var or=rc.state||(rc.state=new xD);or.get=or.get,or.has=or.has,or.set=or.set,fu=function(t,i){if(or.has(t))throw pd(vm);return i.facade=t,or.set(t,i),i},Ha=function(t){return or.get(t)||{}},vu=function(t){return or.has(t)}}else{var oi=OD("state");TD[oi]=!0,fu=function(t,i){if(tc(t,oi))throw pd(vm);return i.facade=t,SD(t,oi,i),i},Ha=function(t){return tc(t,oi)?t[oi]:{}},vu=function(t){return tc(t,oi)}}var Zi={set:fu,get:Ha,has:vu,enforce:PD,getterFor:kD},ID=hn,CD=de,AD=Gu,RD=Pt,DD=Dt,MD=Zu,pm=CD([].push),jr=function(t){var i=t==1,e=t==2,r=t==3,n=t==4,a=t==6,o=t==7,s=t==5||a;return function(u,l,c,h){for(var d=RD(u),f=AD(d),v=ID(l,c),g=DD(f),b=0,p=h||MD,$=i?p(u,g):e||o?p(u,0):void 0,y,m;g>b;b++)if((s||b in f)&&(y=f[b],m=v(y,b,d),t))if(i)$[b]=m;else if(m)switch(t){case 3:return!0;case 5:return y;case 6:return b;case 2:pm($,y)}else switch(t){case 4:return!1;case 7:pm($,y)}return a?-1:r||n?n:$}},Ji={forEach:jr(0),map:jr(1),filter:jr(2),some:jr(3),every:jr(4),find:jr(5),findIndex:jr(6),filterReject:jr(7)},tl=U,cg=Pe,hg=Xe,ND=de,Ci=Ue,Ai=qi,FD=oe,qe=ze,BD=Ee,gd=Rt,rl=rr,dg=qu,LD=yr,yd=Gn,Wa=Kn,rE=go,jD=yo,nE=ug,zD=mo,iE=Un,aE=At,HD=Ju,oE=so,gm=Qi,WD=lg,fg=nn,VD=el,sE=po,ym=Ku,UD=Se,GD=$o,KD=Ie,qD=eE,YD=qn,uE=Zi,nl=Ji.forEach,wt=VD("hidden"),il="Symbol",Va="prototype",XD=uE.set,mm=uE.getterFor(il),Zt=Object[Va],Pn=cg.Symbol,Oa=Pn&&Pn[Va],QD=cg.TypeError,nc=cg.QObject,lE=iE.f,_n=aE.f,cE=nE.f,ZD=oE.f,hE=ND([].push),kr=fg("symbols"),bo=fg("op-symbols"),JD=fg("wks"),md=!nc||!nc[Va]||!nc[Va].findChild,$d=Ci&&FD(function(){return Wa(_n({},"a",{get:function(){return _n(this,"a",{value:7}).a}})).a!=7})?function(t,i,e){var r=lE(Zt,i);r&&delete Zt[i],_n(t,i,e),r&&t!==Zt&&_n(Zt,i,r)}:_n,ic=function(t,i){var e=kr[t]=Wa(Oa);return XD(e,{type:il,tag:t,description:i}),Ci||(e.description=i),e},al=function(i,e,r){i===Zt&&al(bo,e,r),gd(i);var n=dg(e);return gd(r),qe(kr,n)?(r.enumerable?(qe(i,wt)&&i[wt][n]&&(i[wt][n]=!1),r=Wa(r,{enumerable:yd(0,!1)})):(qe(i,wt)||_n(i,wt,yd(1,{})),i[wt][n]=!0),$d(i,n,r)):_n(i,n,r)},vg=function(i,e){gd(i);var r=rl(e),n=rE(r).concat(pE(r));return nl(n,function(a){(!Ci||hg(dE,r,a))&&al(i,a,r[a])}),i},eM=function(i,e){return e===void 0?Wa(i):vg(Wa(i),e)},dE=function(i){var e=dg(i),r=hg(ZD,this,e);return this===Zt&&qe(kr,e)&&!qe(bo,e)?!1:r||!qe(this,e)||!qe(kr,e)||qe(this,wt)&&this[wt][e]?r:!0},fE=function(i,e){var r=rl(i),n=dg(e);if(!(r===Zt&&qe(kr,n)&&!qe(bo,n))){var a=lE(r,n);return a&&qe(kr,n)&&!(qe(r,wt)&&r[wt][n])&&(a.enumerable=!0),a}},vE=function(i){var e=cE(rl(i)),r=[];return nl(e,function(n){!qe(kr,n)&&!qe(sE,n)&&hE(r,n)}),r},pE=function(t){var i=t===Zt,e=cE(i?bo:rl(t)),r=[];return nl(e,function(n){qe(kr,n)&&(!i||qe(Zt,n))&&hE(r,kr[n])}),r};Ai||(Pn=function(){if(BD(Oa,this))throw QD("Symbol is not a constructor");var i=!arguments.length||arguments[0]===void 0?void 0:LD(arguments[0]),e=ym(i),r=function(n){this===Zt&&hg(r,bo,n),qe(this,wt)&&qe(this[wt],e)&&(this[wt][e]=!1),$d(this,e,yd(1,n))};return Ci&&md&&$d(Zt,e,{configurable:!0,set:r}),ic(e,i)},Oa=Pn[Va],gm(Oa,"toString",function(){return mm(this).tag}),gm(Pn,"withoutSetter",function(t){return ic(ym(t),t)}),oE.f=dE,aE.f=al,HD.f=vg,iE.f=fE,jD.f=nE.f=vE,zD.f=pE,GD.f=function(t){return ic(UD(t),t)},Ci&&WD(Oa,"description",{configurable:!0,get:function(){return mm(this).description}}));tl({global:!0,constructor:!0,wrap:!0,forced:!Ai,sham:!Ai},{Symbol:Pn});nl(rE(JD),function(t){KD(t)});tl({target:il,stat:!0,forced:!Ai},{useSetter:function(){md=!0},useSimple:function(){md=!1}});tl({target:"Object",stat:!0,forced:!Ai,sham:!Ci},{create:eM,defineProperty:al,defineProperties:vg,getOwnPropertyDescriptor:fE});tl({target:"Object",stat:!0,forced:!Ai},{getOwnPropertyNames:vE});qD();YD(Pn,il);sE[wt]=!0;var tM=qi,gE=tM&&!!Symbol.for&&!!Symbol.keyFor,rM=U,nM=pt,iM=ze,aM=yr,yE=nn,oM=gE,ac=yE("string-to-symbol-registry"),sM=yE("symbol-to-string-registry");rM({target:"Symbol",stat:!0,forced:!oM},{for:function(t){var i=aM(t);if(iM(ac,i))return ac[i];var e=nM("Symbol")(i);return ac[i]=e,sM[e]=i,e}});var uM=U,lM=ze,cM=co,hM=Yi,dM=nn,fM=gE,$m=dM("symbol-to-string-registry");uM({target:"Symbol",stat:!0,forced:!fM},{keyFor:function(i){if(!cM(i))throw TypeError(hM(i)+" is not a symbol");if(lM($m,i))return $m[i]}});var vM=de,wo=vM([].slice),pM=de,bm=dn,gM=ke,wm=Rr,yM=yr,_m=pM([].push),mM=function(t){if(gM(t))return t;if(bm(t)){for(var i=t.length,e=[],r=0;r<i;r++){var n=t[r];typeof n=="string"?_m(e,n):(typeof n=="number"||wm(n)=="Number"||wm(n)=="String")&&_m(e,yM(n))}var a=e.length,o=!0;return function(s,u){if(o)return o=!1,u;if(bm(this))return u;for(var l=0;l<a;l++)if(e[l]===s)return u}}},$M=U,mE=pt,$E=Gi,bM=Xe,_o=de,bE=oe,Em=ke,Sm=co,wE=wo,wM=mM,_M=qi,EM=String,Qr=mE("JSON","stringify"),fs=_o(/./.exec),Om=_o("".charAt),SM=_o("".charCodeAt),OM=_o("".replace),TM=_o(1 .toString),xM=/[\uD800-\uDFFF]/g,Tm=/^[\uD800-\uDBFF]$/,xm=/^[\uDC00-\uDFFF]$/,Pm=!_M||bE(function(){var t=mE("Symbol")();return Qr([t])!="[null]"||Qr({a:t})!="{}"||Qr(Object(t))!="{}"}),km=bE(function(){return Qr("\uDF06\uD834")!=='"\\udf06\\ud834"'||Qr("\uDEAD")!=='"\\udead"'}),PM=function(t,i){var e=wE(arguments),r=wM(i);if(!(!Em(r)&&(t===void 0||Sm(t))))return e[1]=function(n,a){if(Em(r)&&(a=bM(r,this,EM(n),a)),!Sm(a))return a},$E(Qr,null,e)},kM=function(t,i,e){var r=Om(e,i-1),n=Om(e,i+1);return fs(Tm,t)&&!fs(xm,n)||fs(xm,t)&&!fs(Tm,r)?"\\u"+TM(SM(t,0),16):t};Qr&&$M({target:"JSON",stat:!0,arity:3,forced:Pm||km},{stringify:function(i,e,r){var n=wE(arguments),a=$E(Pm?PM:Qr,null,n);return km&&typeof a=="string"?OM(a,xM,kM):a}});var IM=U,CM=qi,AM=oe,_E=mo,RM=Pt,DM=!CM||AM(function(){_E.f(1)});IM({target:"Object",stat:!0,forced:DM},{getOwnPropertySymbols:function(i){var e=_E.f;return e?e(RM(i)):[]}});var MM=Ie;MM("asyncIterator");var NM=Ie;NM("hasInstance");var FM=Ie;FM("isConcatSpreadable");var BM=Ie;BM("iterator");var LM=Ie;LM("match");var jM=Ie;jM("matchAll");var zM=Ie;zM("replace");var HM=Ie;HM("search");var WM=Ie;WM("species");var VM=Ie;VM("split");var UM=Ie,GM=eE;UM("toPrimitive");GM();var KM=pt,qM=Ie,YM=qn;qM("toStringTag");YM(KM("Symbol"),"Symbol");var XM=Ie;XM("unscopables");var QM=Pe,ZM=qn;ZM(QM.JSON,"JSON",!0);var JM=ye,e2=JM.Symbol,ea={},bd=Ue,t2=ze,EE=Function.prototype,r2=bd&&Object.getOwnPropertyDescriptor,pg=t2(EE,"name"),n2=pg&&function(){}.name==="something",i2=pg&&(!bd||bd&&r2(EE,"name").configurable),SE={EXISTS:pg,PROPER:n2,CONFIGURABLE:i2},a2=oe,OE=!a2(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),o2=ze,s2=ke,u2=Pt,l2=el,c2=OE,Im=l2("IE_PROTO"),wd=Object,h2=wd.prototype,ol=c2?wd.getPrototypeOf:function(t){var i=u2(t);if(o2(i,Im))return i[Im];var e=i.constructor;return s2(e)&&i instanceof e?e.prototype:i instanceof wd?h2:null},d2=oe,f2=ke,v2=Qe,p2=Kn,Cm=ol,g2=Qi,y2=Se,_d=y2("iterator"),TE=!1,br,oc,sc;[].keys&&(sc=[].keys(),"next"in sc?(oc=Cm(Cm(sc)),oc!==Object.prototype&&(br=oc)):TE=!0);var m2=!v2(br)||d2(function(){var t={};return br[_d].call(t)!==t});m2?br={}:br=p2(br);f2(br[_d])||g2(br,_d,function(){return this});var xE={IteratorPrototype:br,BUGGY_SAFARI_ITERATORS:TE},$2=xE.IteratorPrototype,b2=Kn,w2=Gn,_2=qn,E2=ea,S2=function(){return this},O2=function(t,i,e,r){var n=i+" Iterator";return t.prototype=b2($2,{next:w2(+!r,e)}),_2(t,n,!1,!0),E2[n]=S2,t},T2=de,x2=xt,P2=function(t,i,e){try{return T2(x2(Object.getOwnPropertyDescriptor(t,i)[e]))}catch{}},k2=ke,I2=String,C2=TypeError,A2=function(t){if(typeof t=="object"||k2(t))return t;throw C2("Can't set "+I2(t)+" as a prototype")},R2=P2,D2=Rt,M2=A2,PE=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,i={},e;try{e=R2(Object.prototype,"__proto__","set"),e(i,[]),t=i instanceof Array}catch{}return function(n,a){return D2(n),M2(a),t?e(n,a):n.__proto__=a,n}}():void 0),N2=U,F2=Xe,B2=SE,L2=O2,j2=ol,z2=qn,Am=Qi,H2=Se,Rm=ea,W2=xE,V2=B2.PROPER,vs=W2.BUGGY_SAFARI_ITERATORS,uc=H2("iterator"),Dm="keys",ps="values",Mm="entries",U2=function(){return this},gg=function(t,i,e,r,n,a,o){L2(e,i,r);var s=function(p){if(p===n&&d)return d;if(!vs&&p in c)return c[p];switch(p){case Dm:return function(){return new e(this,p)};case ps:return function(){return new e(this,p)};case Mm:return function(){return new e(this,p)}}return function(){return new e(this)}},u=i+" Iterator",l=!1,c=t.prototype,h=c[uc]||c["@@iterator"]||n&&c[n],d=!vs&&h||s(n),f=i=="Array"&&c.entries||h,v,g,b;if(f&&(v=j2(f.call(new t)),v!==Object.prototype&&v.next&&(z2(v,u,!0,!0),Rm[u]=U2)),V2&&n==ps&&h&&h.name!==ps&&(l=!0,d=function(){return F2(h,this)}),n)if(g={values:s(ps),keys:a?d:s(Dm),entries:s(Mm)},o)for(b in g)(vs||l||!(b in c))&&Am(c,b,g[b]);else N2({target:i,proto:!0,forced:vs||l},g);return o&&c[uc]!==d&&Am(c,uc,d,{name:n}),Rm[i]=d,g},yg=function(t,i){return{value:t,done:i}},G2=rr,Nm=ea,kE=Zi;At.f;var K2=gg,gs=yg,IE="Array Iterator",q2=kE.set,Y2=kE.getterFor(IE);K2(Array,"Array",function(t,i){q2(this,{type:IE,target:G2(t),index:0,kind:i})},function(){var t=Y2(this),i=t.target,e=t.kind,r=t.index++;return!i||r>=i.length?(t.target=void 0,gs(void 0,!0)):e=="keys"?gs(r,!1):e=="values"?gs(i[r],!1):gs([r,i[r]],!1)},"values");Nm.Arguments=Nm.Array;var X2={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},Q2=X2,Z2=Pe,J2=Mr,eN=Dr,Fm=ea,tN=Se,Bm=tN("toStringTag");for(var lc in Q2){var Lm=Z2[lc],cc=Lm&&Lm.prototype;cc&&J2(cc)!==Bm&&eN(cc,Bm,lc),Fm[lc]=Fm.Array}var rN=e2,CE=rN,nN=Ie;nN("dispose");var iN=CE,aN=iN,oN=Ie;oN("asyncDispose");var sN=U,uN=pt,lN=de,AE=uN("Symbol"),cN=AE.keyFor,hN=lN(AE.prototype.valueOf);sN({target:"Symbol",stat:!0},{isRegistered:function(i){try{return cN(hN(i))!==void 0}catch{return!1}}});var dN=U,fN=nn,RE=pt,vN=de,pN=co,gN=Se,pu=RE("Symbol"),jm=pu.isWellKnown,DE=RE("Object","getOwnPropertyNames"),yN=vN(pu.prototype.valueOf),zm=fN("wks");for(var hc=0,Hm=DE(pu),mN=Hm.length;hc<mN;hc++)try{var Wm=Hm[hc];pN(pu[Wm])&&gN(Wm)}catch{}dN({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(i){if(jm&&jm(i))return!0;try{for(var e=yN(i),r=0,n=DE(zm),a=n.length;r<a;r++)if(zm[n[r]]==e)return!0}catch{}return!1}});var $N=Ie;$N("matcher");var bN=Ie;bN("metadataKey");var wN=Ie;wN("observable");var _N=Ie;_N("metadata");var EN=Ie;EN("patternMatch");var SN=Ie;SN("replaceAll");var ON=aN,TN=ON;(function(t){t.exports=TN})(lA);(function(t){t.exports=hd})(uA);var yi=Q(za),gu={},xN={get exports(){return gu},set exports(t){gu=t}},Ed={},PN={get exports(){return Ed},set exports(t){Ed=t}},mg=de,kN=Xu,IN=yr,CN=lo,AN=mg("".charAt),Vm=mg("".charCodeAt),RN=mg("".slice),Um=function(t){return function(i,e){var r=IN(CN(i)),n=kN(e),a=r.length,o,s;return n<0||n>=a?t?"":void 0:(o=Vm(r,n),o<55296||o>56319||n+1===a||(s=Vm(r,n+1))<56320||s>57343?t?AN(r,n):o:t?RN(r,n,n+2):(o-55296<<10)+(s-56320)+65536)}},DN={codeAt:Um(!1),charAt:Um(!0)},MN=DN.charAt,NN=yr,ME=Zi,FN=gg,Gm=yg,NE="String Iterator",BN=ME.set,LN=ME.getterFor(NE);FN(String,"String",function(t){BN(this,{type:NE,string:NN(t),index:0})},function(){var i=LN(this),e=i.string,r=i.index,n;return r>=e.length?Gm(void 0,!0):(n=MN(e,r),i.index+=n.length,Gm(n,!1))});var jN=$o,zN=jN.f("iterator"),HN=zN,FE=HN,WN=FE,VN=WN,UN=VN,GN=UN;(function(t){t.exports=GN})(PN);(function(t){t.exports=Ed})(xN);var KN=Q(gu);function ot(t){"@babel/helpers - typeof";return ot=typeof yi=="function"&&typeof KN=="symbol"?function(i){return typeof i}:function(i){return i&&typeof yi=="function"&&i.constructor===yi&&i!==yi.prototype?"symbol":typeof i},ot(t)}var Sd={},qN={get exports(){return Sd},set exports(t){Sd=t}},Od={},YN={get exports(){return Od},set exports(t){Od=t}},XN=$o,QN=XN.f("toPrimitive"),ZN=QN,JN=ZN,eF=JN,tF=eF,rF=tF,nF=rF;(function(t){t.exports=nF})(YN);(function(t){t.exports=Od})(qN);var iF=Q(Sd);function aF(t,i){if(ot(t)!=="object"||t===null)return t;var e=t[iF];if(e!==void 0){var r=e.call(t,i||"default");if(ot(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(t)}function BE(t){var i=aF(t,"string");return ot(i)==="symbol"?i:String(i)}function Km(t,i){for(var e=0;e<i.length;e++){var r=i[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Yu(t,BE(r.key),r)}}function sl(t,i,e){return i&&Km(t.prototype,i),e&&Km(t,e),Yu(t,"prototype",{writable:!1}),t}function De(t,i,e){return i=BE(i),i in t?Yu(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}var Td={},oF={get exports(){return Td},set exports(t){Td=t}},LE=de,sF=xt,uF=Qe,lF=ze,qm=wo,cF=oo,jE=Function,hF=LE([].concat),dF=LE([].join),dc={},fF=function(t,i,e){if(!lF(dc,i)){for(var r=[],n=0;n<i;n++)r[n]="a["+n+"]";dc[i]=jE("C,a","return new C("+dF(r,",")+")")}return dc[i](t,e)},zE=cF?jE.bind:function(i){var e=sF(this),r=e.prototype,n=qm(arguments,1),a=function(){var s=hF(n,qm(arguments));return this instanceof a?fF(e,s.length,s):e.apply(i,s)};return uF(r)&&(a.prototype=r),a},vF=U,Ym=zE;vF({target:"Function",proto:!0,forced:Function.bind!==Ym},{bind:Ym});var pF=ye,He=function(t){return pF[t+"Prototype"]},gF=He,yF=gF("Function").bind,mF=Ee,$F=yF,fc=Function.prototype,bF=function(t){var i=t.bind;return t===fc||mF(fc,t)&&i===fc.bind?$F:i},wF=bF,HE=wF;(function(t){t.exports=HE})(oF);var WE=Q(Td),xd={},_F={get exports(){return xd},set exports(t){xd=t}},EF=xt,SF=Pt,OF=Gu,TF=Dt,xF=TypeError,Xm=function(t){return function(i,e,r,n){EF(e);var a=SF(i),o=OF(a),s=TF(a),u=t?s-1:0,l=t?-1:1;if(r<2)for(;;){if(u in o){n=o[u],u+=l;break}if(u+=l,t?u<0:s<=u)throw xF("Reduce of empty array with no initial value")}for(;t?u>=0:s>u;u+=l)u in o&&(n=e(n,o[u],u,a));return n}},PF={left:Xm(!1),right:Xm(!0)},kF=oe,Eo=function(t,i){var e=[][t];return!!e&&kF(function(){e.call(null,i||function(){return 1},1)})},IF=Rr,So=typeof process<"u"&&IF(process)=="process",CF=U,AF=PF.left,RF=Eo,Qm=Ki,DF=So,MF=!DF&&Qm>79&&Qm<83,NF=MF||!RF("reduce");CF({target:"Array",proto:!0,forced:NF},{reduce:function(i){var e=arguments.length;return AF(this,i,e,e>1?arguments[1]:void 0)}});var FF=He,BF=FF("Array").reduce,LF=Ee,jF=BF,vc=Array.prototype,zF=function(t){var i=t.reduce;return t===vc||LF(vc,t)&&i===vc.reduce?jF:i},HF=zF,WF=HF;(function(t){t.exports=WF})(_F);var VF=Q(xd),Pd={},UF={get exports(){return Pd},set exports(t){Pd=t}},GF=U,KF=Ji.filter,qF=fo,YF=qF("filter");GF({target:"Array",proto:!0,forced:!YF},{filter:function(i){return KF(this,i,arguments.length>1?arguments[1]:void 0)}});var XF=He,QF=XF("Array").filter,ZF=Ee,JF=QF,pc=Array.prototype,eB=function(t){var i=t.filter;return t===pc||ZF(pc,t)&&i===pc.filter?JF:i},tB=eB,rB=tB;(function(t){t.exports=rB})(UF);var mi=Q(Pd),kd={},nB={get exports(){return kd},set exports(t){kd=t}},iB=U,aB=Ji.map,oB=fo,sB=oB("map");iB({target:"Array",proto:!0,forced:!sB},{map:function(i){return aB(this,i,arguments.length>1?arguments[1]:void 0)}});var uB=He,lB=uB("Array").map,cB=Ee,hB=lB,gc=Array.prototype,dB=function(t){var i=t.map;return t===gc||cB(gc,t)&&i===gc.map?hB:i},fB=dB,vB=fB;(function(t){t.exports=vB})(nB);var qt=Q(kd),Zm={},pB={get exports(){return Zm},set exports(t){Zm=t}},gB=dn,yB=Dt,mB=ng,$B=hn,VE=function(t,i,e,r,n,a,o,s){for(var u=n,l=0,c=o?$B(o,s):!1,h,d;l<r;)l in e&&(h=c?c(e[l],l,i):e[l],a>0&&gB(h)?(d=yB(h),u=VE(t,i,h,d,u,a-1)-1):(mB(u+1),t[u]=h),u++),l++;return u},bB=VE,wB=U,_B=bB,EB=xt,SB=Pt,OB=Dt,TB=Zu;wB({target:"Array",proto:!0},{flatMap:function(i){var e=SB(this),r=OB(e),n;return EB(i),n=TB(e,0),n.length=_B(n,e,e,r,0,1,i,arguments.length>1?arguments[1]:void 0),n}});var xB=He,PB=xB("Array").flatMap,kB=Ee,IB=PB,yc=Array.prototype,CB=function(t){var i=t.flatMap;return t===yc||kB(yc,t)&&i===yc.flatMap?IB:i},AB=CB,RB=AB;(function(t){t.exports=RB})(pB);var Id={},DB={get exports(){return Id},set exports(t){Id=t}},MB=Xe,Jm=Rt,NB=eg,UE=function(t,i,e){var r,n;Jm(t);try{if(r=NB(t,"return"),!r){if(i==="throw")throw e;return e}r=MB(r,t)}catch(a){n=!0,r=a}if(i==="throw")throw e;if(n)throw r;return Jm(r),e},FB=Rt,BB=UE,LB=function(t,i,e,r){try{return r?i(FB(e)[0],e[1]):i(e)}catch(n){BB(t,"throw",n)}},jB=Se,zB=ea,HB=jB("iterator"),WB=Array.prototype,GE=function(t){return t!==void 0&&(zB.Array===t||WB[HB]===t)},VB=Mr,e$=eg,UB=uo,GB=ea,KB=Se,qB=KB("iterator"),ul=function(t){if(!UB(t))return e$(t,qB)||e$(t,"@@iterator")||GB[VB(t)]},YB=Xe,XB=xt,QB=Rt,ZB=Yi,JB=ul,eL=TypeError,$g=function(t,i){var e=arguments.length<2?JB(t):i;if(XB(e))return QB(YB(e,t));throw eL(ZB(t)+" is not iterable")},tL=hn,rL=Xe,nL=Pt,iL=LB,aL=GE,oL=Qu,sL=Dt,t$=Xi,uL=$g,lL=ul,r$=Array,cL=function(i){var e=nL(i),r=oL(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=tL(a,n>2?arguments[2]:void 0));var s=lL(e),u=0,l,c,h,d,f,v;if(s&&!(this===r$&&aL(s)))for(d=uL(e,s),f=d.next,c=r?new this:[];!(h=rL(f,d)).done;u++)v=o?iL(d,a,[h.value,u],!0):h.value,t$(c,u,v);else for(l=sL(e),c=r?new this(l):r$(l);l>u;u++)v=o?a(e[u],u):e[u],t$(c,u,v);return c.length=u,c},hL=Se,KE=hL("iterator"),qE=!1;try{var dL=0,n$={next:function(){return{done:!!dL++}},return:function(){qE=!0}};n$[KE]=function(){return this},Array.from(n$,function(){throw 2})}catch{}var YE=function(t,i){if(!i&&!qE)return!1;var e=!1;try{var r={};r[KE]=function(){return{next:function(){return{done:e=!0}}}},t(r)}catch{}return e},fL=U,vL=cL,pL=YE,gL=!pL(function(t){Array.from(t)});fL({target:"Array",stat:!0,forced:gL},{from:vL});var yL=ye,mL=yL.Array.from,$L=mL,XE=$L;(function(t){t.exports=XE})(DB);var bg=Q(Id),Cd={},bL={get exports(){return Cd},set exports(t){Cd=t}},Ad={},wL={get exports(){return Ad},set exports(t){Ad=t}},_L=ul,EL=_L,SL=EL,OL=SL,TL=OL,xL=TL,PL=xL,kL=PL;(function(t){t.exports=kL})(wL);(function(t){t.exports=Ad})(bL);var Oo=Q(Cd),Rd={},IL={get exports(){return Rd},set exports(t){Rd=t}},CL=ye,AL=CL.Object.getOwnPropertySymbols,RL=AL,DL=RL;(function(t){t.exports=DL})(IL);var i$=Q(Rd),Dd={},ML={get exports(){return Dd},set exports(t){Dd=t}},Md={},NL={get exports(){return Md},set exports(t){Md=t}},FL=U,BL=oe,LL=rr,QE=Un.f,ZE=Ue,jL=!ZE||BL(function(){QE(1)});FL({target:"Object",stat:!0,forced:jL,sham:!ZE},{getOwnPropertyDescriptor:function(i,e){return QE(LL(i),e)}});var zL=ye,JE=zL.Object,HL=NL.exports=function(i,e){return JE.getOwnPropertyDescriptor(i,e)};JE.getOwnPropertyDescriptor.sham&&(HL.sham=!0);var WL=Md,VL=WL;(function(t){t.exports=VL})(ML);var eS=Q(Dd),Nd={},UL={get exports(){return Nd},set exports(t){Nd=t}},GL=pt,KL=de,qL=yo,YL=mo,XL=Rt,QL=KL([].concat),wg=GL("Reflect","ownKeys")||function(i){var e=qL.f(XL(i)),r=YL.f;return r?QL(e,r(i)):e},ZL=U,JL=Ue,ej=wg,tj=rr,rj=Un,nj=Xi;ZL({target:"Object",stat:!0,sham:!JL},{getOwnPropertyDescriptors:function(i){for(var e=tj(i),r=rj.f,n=ej(e),a={},o=0,s,u;n.length>o;)u=r(e,s=n[o++]),u!==void 0&&nj(a,s,u);return a}});var ij=ye,aj=ij.Object.getOwnPropertyDescriptors,oj=aj,sj=oj;(function(t){t.exports=sj})(UL);var a$=Q(Nd),Fd={},uj={get exports(){return Fd},set exports(t){Fd=t}},Bd={},lj={get exports(){return Bd},set exports(t){Bd=t}},cj=U,hj=Ue,o$=Ju.f;cj({target:"Object",stat:!0,forced:Object.defineProperties!==o$,sham:!hj},{defineProperties:o$});var dj=ye,tS=dj.Object,fj=lj.exports=function(i,e){return tS.defineProperties(i,e)};tS.defineProperties.sham&&(fj.sham=!0);var vj=Bd,pj=vj;(function(t){t.exports=pj})(uj);var gj=Q(Fd),Ld={},yj={get exports(){return Ld},set exports(t){Ld=t}};(function(t){t.exports=L_})(yj);var mj=Q(Ld),jd={},$j={get exports(){return jd},set exports(t){jd=t}},zd={},bj={get exports(){return zd},set exports(t){zd=t}},wj=U,_j=dn;wj({target:"Array",stat:!0},{isArray:_j});var Ej=ye,Sj=Ej.Array.isArray,Oj=Sj,rS=Oj,Tj=rS,xj=Tj,Pj=xj,kj=Pj;(function(t){t.exports=kj})(bj);(function(t){t.exports=zd})($j);var nS=Q(jd);function Ij(t){if(nS(t))return t}function Cj(t,i){var e=t==null?null:typeof yi<"u"&&Oo(t)||t["@@iterator"];if(e!=null){var r,n,a,o,s=[],u=!0,l=!1;try{if(a=(e=e.call(t)).next,i===0){if(Object(e)!==e)return;u=!1}else for(;!(u=(r=a.call(e)).done)&&(s.push(r.value),s.length!==i);u=!0);}catch(c){l=!0,n=c}finally{try{if(!u&&e.return!=null&&(o=e.return(),Object(o)!==o))return}finally{if(l)throw n}}return s}}var yu={},Aj={get exports(){return yu},set exports(t){yu=t}},Hd={},Rj={get exports(){return Hd},set exports(t){Hd=t}},Dj=U,s$=dn,Mj=Qu,Nj=Qe,u$=vo,Fj=Dt,Bj=rr,Lj=Xi,jj=Se,zj=fo,Hj=wo,Wj=zj("slice"),Vj=jj("species"),mc=Array,Uj=Math.max;Dj({target:"Array",proto:!0,forced:!Wj},{slice:function(i,e){var r=Bj(this),n=Fj(r),a=u$(i,n),o=u$(e===void 0?n:e,n),s,u,l;if(s$(r)&&(s=r.constructor,Mj(s)&&(s===mc||s$(s.prototype))?s=void 0:Nj(s)&&(s=s[Vj],s===null&&(s=void 0)),s===mc||s===void 0))return Hj(r,a,o);for(u=new(s===void 0?mc:s)(Uj(o-a,0)),l=0;a<o;a++,l++)a in r&&Lj(u,l,r[a]);return u.length=l,u}});var Gj=He,Kj=Gj("Array").slice,qj=Ee,Yj=Kj,$c=Array.prototype,Xj=function(t){var i=t.slice;return t===$c||qj($c,t)&&i===$c.slice?Yj:i},Qj=Xj,iS=Qj,Zj=iS,Jj=Zj,ez=Jj,tz=ez;(function(t){t.exports=tz})(Rj);(function(t){t.exports=Hd})(Aj);var rz=Q(yu),Wd={},nz={get exports(){return Wd},set exports(t){Wd=t}},Vd={},iz={get exports(){return Vd},set exports(t){Vd=t}},az=XE,oz=az,sz=oz,uz=sz;(function(t){t.exports=uz})(iz);(function(t){t.exports=Vd})(nz);var aS=Q(Wd);function Ud(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}function oS(t,i){var e;if(t){if(typeof t=="string")return Ud(t,i);var r=rz(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return aS(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ud(t,i)}}function lz(){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 yt(t,i){return Ij(t)||Cj(t,i)||oS(t,i)||lz()}function cz(t){if(nS(t))return Ud(t)}function hz(t){if(typeof yi<"u"&&Oo(t)!=null||t["@@iterator"]!=null)return aS(t)}function dz(){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 _t(t){return cz(t)||hz(t)||oS(t)||dz()}var Gd={},fz={get exports(){return Gd},set exports(t){Gd=t}};(function(t){t.exports=CE})(fz);var ll=Q(Gd),Kd={},vz={get exports(){return Kd},set exports(t){Kd=t}},pz=He,gz=pz("Array").concat,yz=Ee,mz=gz,bc=Array.prototype,$z=function(t){var i=t.concat;return t===bc||yz(bc,t)&&i===bc.concat?mz:i},bz=$z,wz=bz;(function(t){t.exports=wz})(vz);var cl=Q(Kd),qd={},_z={get exports(){return qd},set exports(t){qd=t}};(function(t){t.exports=iS})(_z);var hl=Q(qd),Yd={},Ez={get exports(){return Yd},set exports(t){Yd=t}},Sz=U,Oz=wg;Sz({target:"Reflect",stat:!0},{ownKeys:Oz});var Tz=ye,xz=Tz.Reflect.ownKeys,Pz=xz,kz=Pz;(function(t){t.exports=kz})(Ez);var Iz=Q(Yd),Xd={},Cz={get exports(){return Xd},set exports(t){Xd=t}};(function(t){t.exports=rS})(Cz);var It=Q(Xd),Qd={},Az={get exports(){return Qd},set exports(t){Qd=t}},Rz=U,Dz=Pt,sS=go,Mz=oe,Nz=Mz(function(){sS(1)});Rz({target:"Object",stat:!0,forced:Nz},{keys:function(i){return sS(Dz(i))}});var Fz=ye,Bz=Fz.Object.keys,Lz=Bz,jz=Lz;(function(t){t.exports=jz})(Az);var _g=Q(Qd),l$={},zz={get exports(){return l$},set exports(t){l$=t}},Hz=U,Wz=de,uS=Date,Vz=Wz(uS.prototype.getTime);Hz({target:"Date",stat:!0},{now:function(){return Vz(new uS)}});var Uz=ye,Gz=Uz.Date.now,Kz=Gz,qz=Kz;(function(t){t.exports=qz})(zz);var Zd={},Yz={get exports(){return Zd},set exports(t){Zd=t}},Xz=Ji.forEach,Qz=Eo,Zz=Qz("forEach"),Jz=Zz?[].forEach:function(i){return Xz(this,i,arguments.length>1?arguments[1]:void 0)},e3=U,c$=Jz;e3({target:"Array",proto:!0,forced:[].forEach!=c$},{forEach:c$});var t3=He,r3=t3("Array").forEach,n3=r3,i3=n3,a3=Mr,o3=ze,s3=Ee,u3=i3,wc=Array.prototype,l3={DOMTokenList:!0,NodeList:!0},lS=function(t){var i=t.forEach;return t===wc||s3(wc,t)&&i===wc.forEach||o3(l3,a3(t))?u3:i};(function(t){t.exports=lS})(Yz);var Nn=Q(Zd),Jd={},c3={get exports(){return Jd},set exports(t){Jd=t}},h3=U,d3=de,f3=dn,v3=d3([].reverse),h$=[1,2];h3({target:"Array",proto:!0,forced:String(h$)===String(h$.reverse())},{reverse:function(){return f3(this)&&(this.length=this.length),v3(this)}});var p3=He,g3=p3("Array").reverse,y3=Ee,m3=g3,_c=Array.prototype,$3=function(t){var i=t.reverse;return t===_c||y3(_c,t)&&i===_c.reverse?m3:i},b3=$3,cS=b3;(function(t){t.exports=cS})(c3);var w3=Q(Jd),ef={},_3={get exports(){return ef},set exports(t){ef=t}},E3=Ue,S3=dn,O3=TypeError,T3=Object.getOwnPropertyDescriptor,x3=E3&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),P3=x3?function(t,i){if(S3(t)&&!T3(t,"length").writable)throw O3("Cannot set read only .length");return t.length=i}:function(t,i){return t.length=i},d$=Yi,k3=TypeError,hS=function(t,i){if(!delete t[i])throw k3("Cannot delete property "+d$(i)+" of "+d$(t))},I3=U,C3=Pt,A3=vo,R3=Xu,D3=Dt,M3=P3,N3=ng,F3=Zu,B3=Xi,Ec=hS,L3=fo,j3=L3("splice"),z3=Math.max,H3=Math.min;I3({target:"Array",proto:!0,forced:!j3},{splice:function(i,e){var r=C3(this),n=D3(r),a=A3(i,n),o=arguments.length,s,u,l,c,h,d;for(o===0?s=u=0:o===1?(s=0,u=n-a):(s=o-2,u=H3(z3(R3(e),0),n-a)),N3(n+s-u),l=F3(r,u),c=0;c<u;c++)h=a+c,h in r&&B3(l,c,r[h]);if(l.length=u,s<u){for(c=a;c<n-u;c++)h=c+u,d=c+s,h in r?r[d]=r[h]:Ec(r,d);for(c=n;c>n-u+s;c--)Ec(r,c-1)}else if(s>u)for(c=n-u;c>a;c--)h=c+u-1,d=c+s-1,h in r?r[d]=r[h]:Ec(r,d);for(c=0;c<s;c++)r[c+a]=arguments[c+2];return M3(r,n-u+s),l}});var W3=He,V3=W3("Array").splice,U3=Ee,G3=V3,Sc=Array.prototype,K3=function(t){var i=t.splice;return t===Sc||U3(Sc,t)&&i===Sc.splice?G3:i},q3=K3,Y3=q3;(function(t){t.exports=Y3})(_3);var dS=Q(ef),tf={},X3={get exports(){return tf},set exports(t){tf=t}},f$=Ue,Q3=de,Z3=Xe,J3=oe,Oc=go,e5=mo,t5=so,r5=Pt,n5=Gu,si=Object.assign,v$=Object.defineProperty,i5=Q3([].concat),a5=!si||J3(function(){if(f$&&si({b:1},si(v$({},"a",{enumerable:!0,get:function(){v$(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},i={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach(function(n){i[n]=n}),si({},t)[e]!=7||Oc(si({},i)).join("")!=r})?function(i,e){for(var r=r5(i),n=arguments.length,a=1,o=e5.f,s=t5.f;n>a;)for(var u=n5(arguments[a++]),l=o?i5(Oc(u),o(u)):Oc(u),c=l.length,h=0,d;c>h;)d=l[h++],(!f$||Z3(s,u,d))&&(r[d]=u[d]);return r}:si,o5=U,p$=a5;o5({target:"Object",stat:!0,arity:2,forced:Object.assign!==p$},{assign:p$});var s5=ye,u5=s5.Object.assign,l5=u5,c5=l5;(function(t){t.exports=c5})(X3);var h5=Q(tf),g$={},d5={get exports(){return g$},set exports(t){g$=t}},f5=U,v5=og.includes,p5=oe,g5=p5(function(){return!Array(1).includes()});f5({target:"Array",proto:!0,forced:g5},{includes:function(i){return v5(this,i,arguments.length>1?arguments[1]:void 0)}});var y5=He,m5=y5("Array").includes,$5=Qe,b5=Rr,w5=Se,_5=w5("match"),E5=function(t){var i;return $5(t)&&((i=t[_5])!==void 0?!!i:b5(t)=="RegExp")},S5=E5,O5=TypeError,T5=function(t){if(S5(t))throw O5("The method doesn't accept regular expressions");return t},x5=Se,P5=x5("match"),k5=function(t){var i=/./;try{"/./"[t](i)}catch{try{return i[P5]=!1,"/./"[t](i)}catch{}}return!1},I5=U,C5=de,A5=T5,R5=lo,y$=yr,D5=k5,M5=C5("".indexOf);I5({target:"String",proto:!0,forced:!D5("includes")},{includes:function(i){return!!~M5(y$(R5(this)),y$(A5(i)),arguments.length>1?arguments[1]:void 0)}});var N5=He,F5=N5("String").includes,m$=Ee,B5=m5,L5=F5,Tc=Array.prototype,xc=String.prototype,j5=function(t){var i=t.includes;return t===Tc||m$(Tc,t)&&i===Tc.includes?B5:typeof t=="string"||t===xc||m$(xc,t)&&i===xc.includes?L5:i},z5=j5,H5=z5;(function(t){t.exports=H5})(d5);var $$={},W5={get exports(){return $$},set exports(t){$$=t}},V5=U,U5=oe,G5=Pt,fS=ol,K5=OE,q5=U5(function(){fS(1)});V5({target:"Object",stat:!0,forced:q5,sham:!K5},{getPrototypeOf:function(i){return fS(G5(i))}});var Y5=ye,X5=Y5.Object.getPrototypeOf,Q5=X5,vS=Q5;(function(t){t.exports=vS})(W5);var b$={},Z5={get exports(){return b$},set exports(t){b$=t}},J5=Ue,pS=de,e4=go,t4=rr,r4=so.f,n4=pS(r4),i4=pS([].push),w$=function(t){return function(i){for(var e=t4(i),r=e4(e),n=r.length,a=0,o=[],s;n>a;)s=r[a++],(!J5||n4(e,s))&&i4(o,t?[s,e[s]]:e[s]);return o}},a4={entries:w$(!0),values:w$(!1)},o4=U,s4=a4.values;o4({target:"Object",stat:!0},{values:function(i){return s4(i)}});var u4=ye,l4=u4.Object.values,c4=l4,h4=c4;(function(t){t.exports=h4})(Z5);var _$={},d4={get exports(){return _$},set exports(t){_$=t}},Eg=`
|
|
28
|
+
\v\f\r \u2028\u2029\uFEFF`,f4=de,v4=lo,p4=yr,rf=Eg,E$=f4("".replace),g4=RegExp("^["+rf+"]+"),y4=RegExp("(^|[^"+rf+"])["+rf+"]+$"),Pc=function(t){return function(i){var e=p4(v4(i));return t&1&&(e=E$(e,g4,"")),t&2&&(e=E$(e,y4,"$1")),e}},gS={start:Pc(1),end:Pc(2),trim:Pc(3)},yS=Pe,m4=oe,$4=de,b4=yr,w4=gS.trim,S$=Eg,ka=yS.parseInt,O$=yS.Symbol,T$=O$&&O$.iterator,mS=/^[+-]?0x/i,_4=$4(mS.exec),E4=ka(S$+"08")!==8||ka(S$+"0x16")!==22||T$&&!m4(function(){ka(Object(T$))}),S4=E4?function(i,e){var r=w4(b4(i));return ka(r,e>>>0||(_4(mS,r)?16:10))}:ka,O4=U,x$=S4;O4({global:!0,forced:parseInt!=x$},{parseInt:x$});var T4=ye,x4=T4.parseInt,P4=x4,k4=P4;(function(t){t.exports=k4})(d4);var P$={},I4={get exports(){return P$},set exports(t){P$=t}},C4=U,A4=Jp,R4=og.indexOf,D4=Eo,nf=A4([].indexOf),$S=!!nf&&1/nf([1],1,-0)<0,M4=$S||!D4("indexOf");C4({target:"Array",proto:!0,forced:M4},{indexOf:function(i){var e=arguments.length>1?arguments[1]:void 0;return $S?nf(this,i,e)||0:R4(this,i,e)}});var N4=He,F4=N4("Array").indexOf,B4=Ee,L4=F4,kc=Array.prototype,j4=function(t){var i=t.indexOf;return t===kc||B4(kc,t)&&i===kc.indexOf?L4:i},z4=j4,H4=z4;(function(t){t.exports=H4})(I4);var k$={},W4={get exports(){return k$},set exports(t){k$=t}},V4=SE.PROPER,U4=oe,I$=Eg,C$="
",G4=function(t){return U4(function(){return!!I$[t]()||C$[t]()!==C$||V4&&I$[t].name!==t})},K4=U,q4=gS.trim,Y4=G4;K4({target:"String",proto:!0,forced:Y4("trim")},{trim:function(){return q4(this)}});var X4=He,Q4=X4("String").trim,Z4=Ee,J4=Q4,Ic=String.prototype,eH=function(t){var i=t.trim;return typeof t=="string"||t===Ic||Z4(Ic,t)&&i===Ic.trim?J4:i},tH=eH,rH=tH;(function(t){t.exports=rH})(W4);var af={},nH={get exports(){return af},set exports(t){af=t}},iH=U,aH=Ue,oH=Kn;iH({target:"Object",stat:!0,sham:!aH},{create:oH});var sH=ye,uH=sH.Object,lH=function(i,e){return uH.create(i,e)},cH=lH,bS=cH;(function(t){t.exports=bS})(nH);var hH=Q(af),of={},dH={get exports(){return of},set exports(t){of=t}},sf=ye,fH=Gi;sf.JSON||(sf.JSON={stringify:JSON.stringify});var vH=function(i,e,r){return fH(sf.JSON.stringify,null,arguments)},pH=vH,gH=pH;(function(t){t.exports=gH})(dH);var yH=Q(of),uf={},mH={get exports(){return uf},set exports(t){uf=t}},$H=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",bH=TypeError,wS=function(t,i){if(t<i)throw bH("Not enough arguments");return t},_S=Pe,wH=Gi,_H=ke,EH=$H,SH=cn,OH=wo,TH=wS,xH=_S.Function,PH=/MSIE .\./.test(SH)||EH&&function(){var t=_S.Bun.version.split(".");return t.length<3||t[0]==0&&(t[1]<3||t[1]==3&&t[2]==0)}(),ES=function(t,i){var e=i?2:1;return PH?function(r,n){var a=TH(arguments.length,1)>e,o=_H(r)?r:xH(r),s=a?OH(arguments,e):[],u=a?function(){wH(o,this,s)}:o;return i?t(u,n):t(u)}:t},kH=U,SS=Pe,IH=ES,A$=IH(SS.setInterval,!0);kH({global:!0,bind:!0,forced:SS.setInterval!==A$},{setInterval:A$});var CH=U,OS=Pe,AH=ES,R$=AH(OS.setTimeout,!0);CH({global:!0,bind:!0,forced:OS.setTimeout!==R$},{setTimeout:R$});var RH=ye,DH=RH.setTimeout;(function(t){t.exports=DH})(mH);var MH=Q(uf),D$={},NH={get exports(){return D$},set exports(t){D$=t}},FH=Pt,M$=vo,BH=Dt,LH=function(i){for(var e=FH(this),r=BH(e),n=arguments.length,a=M$(n>1?arguments[1]:void 0,r),o=n>2?arguments[2]:void 0,s=o===void 0?r:M$(o,r);s>a;)e[a++]=i;return e},jH=U,zH=LH;jH({target:"Array",proto:!0},{fill:zH});var HH=He,WH=HH("Array").fill,VH=Ee,UH=WH,Cc=Array.prototype,GH=function(t){var i=t.fill;return t===Cc||VH(Cc,t)&&i===Cc.fill?UH:i},KH=GH,qH=KH;(function(t){t.exports=qH})(NH);var lf={},YH={get exports(){return lf},set exports(t){lf=t}};(function(t){t.exports=i;function i(r){if(r)return e(r)}function e(r){for(var n in i.prototype)r[n]=i.prototype[n];return r}i.prototype.on=i.prototype.addEventListener=function(r,n){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(n),this},i.prototype.once=function(r,n){function a(){this.off(r,a),n.apply(this,arguments)}return a.fn=n,this.on(r,a),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(r,n){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+r];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var o,s=0;s<a.length;s++)if(o=a[s],o===n||o.fn===n){a.splice(s,1);break}return a.length===0&&delete this._callbacks["$"+r],this},i.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var n=new Array(arguments.length-1),a=this._callbacks["$"+r],o=1;o<arguments.length;o++)n[o-1]=arguments[o];if(a){a=a.slice(0);for(var o=0,s=a.length;o<s;++o)a[o].apply(this,n)}return this},i.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]},i.prototype.hasListeners=function(r){return!!this.listeners(r).length}})(YH);var XH=lf;/*! 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 er(){return er=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},er.apply(this,arguments)}function Wt(t,i){t.prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i}function ys(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var cf;typeof Object.assign!="function"?cf=function(i){if(i==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(i),r=1;r<arguments.length;r++){var n=arguments[r];if(n!=null)for(var a in n)n.hasOwnProperty(a)&&(e[a]=n[a])}return e}:cf=Object.assign;var Fn=cf,N$=["","webkit","Moz","MS","ms","o"],QH=typeof document>"u"?{style:{}}:document.createElement("div"),ZH="function",$i=Math.round,Bn=Math.abs,Sg=Date.now;function dl(t,i){for(var e,r,n=i[0].toUpperCase()+i.slice(1),a=0;a<N$.length;){if(e=N$[a],r=e?e+n:i,r in t)return r;a++}}var wr;typeof window>"u"?wr={}:wr=window;var TS=dl(QH.style,"touchAction"),xS=TS!==void 0;function JH(){if(!xS)return!1;var t={},i=wr.CSS&&wr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return t[e]=i?wr.CSS.supports("touch-action",e):!0}),t}var PS="compute",kS="auto",hf="manipulation",kn="none",Ua="pan-x",Ga="pan-y",ms=JH(),eW=/mobile|tablet|ip(ad|hone|od)|android/i,IS="ontouchstart"in wr,tW=dl(wr,"PointerEvent")!==void 0,rW=IS&&eW.test(navigator.userAgent),To="touch",nW="pen",Og="mouse",iW="kinect",aW=25,ft=1,Yn=2,Be=4,Ot=8,mu=1,xo=2,Po=4,ko=8,Ri=16,fr=xo|Po,In=ko|Ri,CS=fr|In,AS=["x","y"],$u=["clientX","clientY"];function _r(t,i,e){var r;if(t)if(t.forEach)t.forEach(i,e);else if(t.length!==void 0)for(r=0;r<t.length;)i.call(e,t[r],r,t),r++;else for(r in t)t.hasOwnProperty(r)&&i.call(e,t[r],r,t)}function fl(t,i){return typeof t===ZH?t.apply(i&&i[0]||void 0,i):t}function On(t,i){return t.indexOf(i)>-1}function oW(t){if(On(t,kn))return kn;var i=On(t,Ua),e=On(t,Ga);return i&&e?kn:i||e?i?Ua:Ga:On(t,hf)?hf:kS}var RS=function(){function t(e,r){this.manager=e,this.set(r)}var i=t.prototype;return i.set=function(r){r===PS&&(r=this.compute()),xS&&this.manager.element.style&&ms[r]&&(this.manager.element.style[TS]=r),this.actions=r.toLowerCase().trim()},i.update=function(){this.set(this.manager.options.touchAction)},i.compute=function(){var r=[];return _r(this.manager.recognizers,function(n){fl(n.options.enable,[n])&&(r=r.concat(n.getTouchAction()))}),oW(r.join(" "))},i.preventDefaults=function(r){var n=r.srcEvent,a=r.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,s=On(o,kn)&&!ms[kn],u=On(o,Ga)&&!ms[Ga],l=On(o,Ua)&&!ms[Ua];if(s){var c=r.pointers.length===1,h=r.distance<2,d=r.deltaTime<250;if(c&&h&&d)return}if(!(l&&u)&&(s||u&&a&fr||l&&a&In))return this.preventSrc(n)},i.preventSrc=function(r){this.manager.session.prevented=!0,r.preventDefault()},t}();function Tg(t,i){for(;t;){if(t===i)return!0;t=t.parentNode}return!1}function DS(t){var i=t.length;if(i===1)return{x:$i(t[0].clientX),y:$i(t[0].clientY)};for(var e=0,r=0,n=0;n<i;)e+=t[n].clientX,r+=t[n].clientY,n++;return{x:$i(e/i),y:$i(r/i)}}function F$(t){for(var i=[],e=0;e<t.pointers.length;)i[e]={clientX:$i(t.pointers[e].clientX),clientY:$i(t.pointers[e].clientY)},e++;return{timeStamp:Sg(),pointers:i,center:DS(i),deltaX:t.deltaX,deltaY:t.deltaY}}function bu(t,i,e){e||(e=AS);var r=i[e[0]]-t[e[0]],n=i[e[1]]-t[e[1]];return Math.sqrt(r*r+n*n)}function df(t,i,e){e||(e=AS);var r=i[e[0]]-t[e[0]],n=i[e[1]]-t[e[1]];return Math.atan2(n,r)*180/Math.PI}function MS(t,i){return t===i?mu:Bn(t)>=Bn(i)?t<0?xo:Po:i<0?ko:Ri}function sW(t,i){var e=i.center,r=t.offsetDelta||{},n=t.prevDelta||{},a=t.prevInput||{};(i.eventType===ft||a.eventType===Be)&&(n=t.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=t.offsetDelta={x:e.x,y:e.y}),i.deltaX=n.x+(e.x-r.x),i.deltaY=n.y+(e.y-r.y)}function NS(t,i,e){return{x:i/t||0,y:e/t||0}}function uW(t,i){return bu(i[0],i[1],$u)/bu(t[0],t[1],$u)}function lW(t,i){return df(i[1],i[0],$u)+df(t[1],t[0],$u)}function cW(t,i){var e=t.lastInterval||i,r=i.timeStamp-e.timeStamp,n,a,o,s;if(i.eventType!==Ot&&(r>aW||e.velocity===void 0)){var u=i.deltaX-e.deltaX,l=i.deltaY-e.deltaY,c=NS(r,u,l);a=c.x,o=c.y,n=Bn(c.x)>Bn(c.y)?c.x:c.y,s=MS(u,l),t.lastInterval=i}else n=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;i.velocity=n,i.velocityX=a,i.velocityY=o,i.direction=s}function hW(t,i){var e=t.session,r=i.pointers,n=r.length;e.firstInput||(e.firstInput=F$(i)),n>1&&!e.firstMultiple?e.firstMultiple=F$(i):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=i.center=DS(r);i.timeStamp=Sg(),i.deltaTime=i.timeStamp-a.timeStamp,i.angle=df(s,u),i.distance=bu(s,u),sW(e,i),i.offsetDirection=MS(i.deltaX,i.deltaY);var l=NS(i.deltaTime,i.deltaX,i.deltaY);i.overallVelocityX=l.x,i.overallVelocityY=l.y,i.overallVelocity=Bn(l.x)>Bn(l.y)?l.x:l.y,i.scale=o?uW(o.pointers,r):1,i.rotation=o?lW(o.pointers,r):0,i.maxPointers=e.prevInput?i.pointers.length>e.prevInput.maxPointers?i.pointers.length:e.prevInput.maxPointers:i.pointers.length,cW(e,i);var c=t.element,h=i.srcEvent,d;h.composedPath?d=h.composedPath()[0]:h.path?d=h.path[0]:d=h.target,Tg(d,c)&&(c=d),i.target=c}function dW(t,i,e){var r=e.pointers.length,n=e.changedPointers.length,a=i&ft&&r-n===0,o=i&(Be|Ot)&&r-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(t.session={}),e.eventType=i,hW(t,e),t.emit("hammer.input",e),t.recognize(e),t.session.prevInput=e}function Ka(t){return t.trim().split(/\s+/g)}function Ia(t,i,e){_r(Ka(i),function(r){t.addEventListener(r,e,!1)})}function Ca(t,i,e){_r(Ka(i),function(r){t.removeEventListener(r,e,!1)})}function B$(t){var i=t.ownerDocument||t;return i.defaultView||i.parentWindow||window}var ta=function(){function t(e,r){var n=this;this.manager=e,this.callback=r,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){fl(e.options.enable,[e])&&n.handler(a)},this.init()}var i=t.prototype;return i.handler=function(){},i.init=function(){this.evEl&&Ia(this.element,this.evEl,this.domHandler),this.evTarget&&Ia(this.target,this.evTarget,this.domHandler),this.evWin&&Ia(B$(this.element),this.evWin,this.domHandler)},i.destroy=function(){this.evEl&&Ca(this.element,this.evEl,this.domHandler),this.evTarget&&Ca(this.target,this.evTarget,this.domHandler),this.evWin&&Ca(B$(this.element),this.evWin,this.domHandler)},t}();function Ln(t,i,e){if(t.indexOf&&!e)return t.indexOf(i);for(var r=0;r<t.length;){if(e&&t[r][e]==i||!e&&t[r]===i)return r;r++}return-1}var fW={pointerdown:ft,pointermove:Yn,pointerup:Be,pointercancel:Ot,pointerout:Ot},vW={2:To,3:nW,4:Og,5:iW},FS="pointerdown",BS="pointermove pointerup pointercancel";wr.MSPointerEvent&&!wr.PointerEvent&&(FS="MSPointerDown",BS="MSPointerMove MSPointerUp MSPointerCancel");var LS=function(t){Wt(i,t);function i(){var r,n=i.prototype;return n.evEl=FS,n.evWin=BS,r=t.apply(this,arguments)||this,r.store=r.manager.session.pointerEvents=[],r}var e=i.prototype;return e.handler=function(n){var a=this.store,o=!1,s=n.type.toLowerCase().replace("ms",""),u=fW[s],l=vW[n.pointerType]||n.pointerType,c=l===To,h=Ln(a,n.pointerId,"pointerId");u&ft&&(n.button===0||c)?h<0&&(a.push(n),h=a.length-1):u&(Be|Ot)&&(o=!0),!(h<0)&&(a[h]=n,this.callback(this.manager,u,{pointers:a,changedPointers:[n],pointerType:l,srcEvent:n}),o&&a.splice(h,1))},i}(ta);function qa(t){return Array.prototype.slice.call(t,0)}function xg(t,i,e){for(var r=[],n=[],a=0;a<t.length;){var o=i?t[a][i]:t[a];Ln(n,o)<0&&r.push(t[a]),n[a]=o,a++}return e&&(i?r=r.sort(function(s,u){return s[i]>u[i]}):r=r.sort()),r}var pW={touchstart:ft,touchmove:Yn,touchend:Be,touchcancel:Ot},gW="touchstart touchmove touchend touchcancel",Pg=function(t){Wt(i,t);function i(){var r;return i.prototype.evTarget=gW,r=t.apply(this,arguments)||this,r.targetIds={},r}var e=i.prototype;return e.handler=function(n){var a=pW[n.type],o=yW.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:To,srcEvent:n})},i}(ta);function yW(t,i){var e=qa(t.touches),r=this.targetIds;if(i&(ft|Yn)&&e.length===1)return r[e[0].identifier]=!0,[e,e];var n,a,o=qa(t.changedTouches),s=[],u=this.target;if(a=e.filter(function(l){return Tg(l.target,u)}),i===ft)for(n=0;n<a.length;)r[a[n].identifier]=!0,n++;for(n=0;n<o.length;)r[o[n].identifier]&&s.push(o[n]),i&(Be|Ot)&&delete r[o[n].identifier],n++;if(s.length)return[xg(a.concat(s),"identifier",!0),s]}var mW={mousedown:ft,mousemove:Yn,mouseup:Be},$W="mousedown",bW="mousemove mouseup",kg=function(t){Wt(i,t);function i(){var r,n=i.prototype;return n.evEl=$W,n.evWin=bW,r=t.apply(this,arguments)||this,r.pressed=!1,r}var e=i.prototype;return e.handler=function(n){var a=mW[n.type];a&ft&&n.button===0&&(this.pressed=!0),a&Yn&&n.which!==1&&(a=Be),this.pressed&&(a&Be&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[n],changedPointers:[n],pointerType:Og,srcEvent:n}))},i}(ta),wW=2500,L$=25;function j$(t){var i=t.changedPointers,e=i[0];if(e.identifier===this.primaryTouch){var r={x:e.clientX,y:e.clientY},n=this.lastTouches;this.lastTouches.push(r);var a=function(){var s=n.indexOf(r);s>-1&&n.splice(s,1)};setTimeout(a,wW)}}function _W(t,i){t&ft?(this.primaryTouch=i.changedPointers[0].identifier,j$.call(this,i)):t&(Be|Ot)&&j$.call(this,i)}function EW(t){for(var i=t.srcEvent.clientX,e=t.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var n=this.lastTouches[r],a=Math.abs(i-n.x),o=Math.abs(e-n.y);if(a<=L$&&o<=L$)return!0}return!1}var jS=function(){var t=function(i){Wt(e,i);function e(n,a){var o;return o=i.call(this,n,a)||this,o.handler=function(s,u,l){var c=l.pointerType===To,h=l.pointerType===Og;if(!(h&&l.sourceCapabilities&&l.sourceCapabilities.firesTouchEvents)){if(c)_W.call(ys(ys(o)),u,l);else if(h&&EW.call(ys(ys(o)),l))return;o.callback(s,u,l)}},o.touch=new Pg(o.manager,o.handler),o.mouse=new kg(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}var r=e.prototype;return r.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(ta);return t}();function SW(t){var i,e=t.options.inputClass;return e?i=e:tW?i=LS:rW?i=Pg:IS?i=jS:i=kg,new i(t,dW)}function bi(t,i,e){return Array.isArray(t)?(_r(t,e[i],e),!0):!1}var Ys=1,zt=2,Di=4,Zr=8,Er=Zr,Ya=16,cr=32,OW=1;function TW(){return OW++}function $s(t,i){var e=i.manager;return e?e.get(t):t}function z$(t){return t&Ya?"cancel":t&Zr?"end":t&Di?"move":t&zt?"start":""}var Io=function(){function t(e){e===void 0&&(e={}),this.options=er({enable:!0},e),this.id=TW(),this.manager=null,this.state=Ys,this.simultaneous={},this.requireFail=[]}var i=t.prototype;return i.set=function(r){return Fn(this.options,r),this.manager&&this.manager.touchAction.update(),this},i.recognizeWith=function(r){if(bi(r,"recognizeWith",this))return this;var n=this.simultaneous;return r=$s(r,this),n[r.id]||(n[r.id]=r,r.recognizeWith(this)),this},i.dropRecognizeWith=function(r){return bi(r,"dropRecognizeWith",this)?this:(r=$s(r,this),delete this.simultaneous[r.id],this)},i.requireFailure=function(r){if(bi(r,"requireFailure",this))return this;var n=this.requireFail;return r=$s(r,this),Ln(n,r)===-1&&(n.push(r),r.requireFailure(this)),this},i.dropRequireFailure=function(r){if(bi(r,"dropRequireFailure",this))return this;r=$s(r,this);var n=Ln(this.requireFail,r);return n>-1&&this.requireFail.splice(n,1),this},i.hasRequireFailures=function(){return this.requireFail.length>0},i.canRecognizeWith=function(r){return!!this.simultaneous[r.id]},i.emit=function(r){var n=this,a=this.state;function o(s){n.manager.emit(s,r)}a<Zr&&o(n.options.event+z$(a)),o(n.options.event),r.additionalEvent&&o(r.additionalEvent),a>=Zr&&o(n.options.event+z$(a))},i.tryEmit=function(r){if(this.canEmit())return this.emit(r);this.state=cr},i.canEmit=function(){for(var r=0;r<this.requireFail.length;){if(!(this.requireFail[r].state&(cr|Ys)))return!1;r++}return!0},i.recognize=function(r){var n=Fn({},r);if(!fl(this.options.enable,[this,n])){this.reset(),this.state=cr;return}this.state&(Er|Ya|cr)&&(this.state=Ys),this.state=this.process(n),this.state&(zt|Di|Zr|Ya)&&this.tryEmit(n)},i.process=function(r){},i.getTouchAction=function(){},i.reset=function(){},t}(),ff=function(t){Wt(i,t);function i(r){var n;return r===void 0&&(r={}),n=t.call(this,er({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},r))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var e=i.prototype;return e.getTouchAction=function(){return[hf]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,u=n.distance<o.threshold,l=n.deltaTime<o.time;if(this.reset(),n.eventType&ft&&this.count===0)return this.failTimeout();if(u&&l&&s){if(n.eventType!==Be)return this.failTimeout();var c=this.pTime?n.timeStamp-this.pTime<o.interval:!0,h=!this.pCenter||bu(this.pCenter,n.center)<o.posThreshold;this.pTime=n.timeStamp,this.pCenter=n.center,!h||!c?this.count=1:this.count+=1,this._input=n;var d=this.count%o.taps;if(d===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){a.state=Er,a.tryEmit()},o.interval),zt):Er}return cr},e.failTimeout=function(){var n=this;return this._timer=setTimeout(function(){n.state=cr},this.options.interval),cr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(){this.state===Er&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},i}(Io),Mi=function(t){Wt(i,t);function i(r){return r===void 0&&(r={}),t.call(this,er({pointers:1},r))||this}var e=i.prototype;return e.attrTest=function(n){var a=this.options.pointers;return a===0||n.pointers.length===a},e.process=function(n){var a=this.state,o=n.eventType,s=a&(zt|Di),u=this.attrTest(n);return s&&(o&Ot||!u)?a|Ya:s||u?o&Be?a|Zr:a&zt?a|Di:zt:cr},i}(Io);function zS(t){return t===Ri?"down":t===ko?"up":t===xo?"left":t===Po?"right":""}var Ig=function(t){Wt(i,t);function i(r){var n;return r===void 0&&(r={}),n=t.call(this,er({event:"pan",threshold:10,pointers:1,direction:CS},r))||this,n.pX=null,n.pY=null,n}var e=i.prototype;return e.getTouchAction=function(){var n=this.options.direction,a=[];return n&fr&&a.push(Ga),n&In&&a.push(Ua),a},e.directionTest=function(n){var a=this.options,o=!0,s=n.distance,u=n.direction,l=n.deltaX,c=n.deltaY;return u&a.direction||(a.direction&fr?(u=l===0?mu:l<0?xo:Po,o=l!==this.pX,s=Math.abs(n.deltaX)):(u=c===0?mu:c<0?ko:Ri,o=c!==this.pY,s=Math.abs(n.deltaY))),n.direction=u,o&&s>a.threshold&&u&a.direction},e.attrTest=function(n){return Mi.prototype.attrTest.call(this,n)&&(this.state&zt||!(this.state&zt)&&this.directionTest(n))},e.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var a=zS(n.direction);a&&(n.additionalEvent=this.options.event+a),t.prototype.emit.call(this,n)},i}(Mi),HS=function(t){Wt(i,t);function i(r){return r===void 0&&(r={}),t.call(this,er({event:"swipe",threshold:10,velocity:.3,direction:fr|In,pointers:1},r))||this}var e=i.prototype;return e.getTouchAction=function(){return Ig.prototype.getTouchAction.call(this)},e.attrTest=function(n){var a=this.options.direction,o;return a&(fr|In)?o=n.overallVelocity:a&fr?o=n.overallVelocityX:a&In&&(o=n.overallVelocityY),t.prototype.attrTest.call(this,n)&&a&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&Bn(o)>this.options.velocity&&n.eventType&Be},e.emit=function(n){var a=zS(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},i}(Mi),WS=function(t){Wt(i,t);function i(r){return r===void 0&&(r={}),t.call(this,er({event:"pinch",threshold:0,pointers:2},r))||this}var e=i.prototype;return e.getTouchAction=function(){return[kn]},e.attrTest=function(n){return t.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&zt)},e.emit=function(n){if(n.scale!==1){var a=n.scale<1?"in":"out";n.additionalEvent=this.options.event+a}t.prototype.emit.call(this,n)},i}(Mi),VS=function(t){Wt(i,t);function i(r){return r===void 0&&(r={}),t.call(this,er({event:"rotate",threshold:0,pointers:2},r))||this}var e=i.prototype;return e.getTouchAction=function(){return[kn]},e.attrTest=function(n){return t.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&zt)},i}(Mi),US=function(t){Wt(i,t);function i(r){var n;return r===void 0&&(r={}),n=t.call(this,er({event:"press",pointers:1,time:251,threshold:9},r))||this,n._timer=null,n._input=null,n}var e=i.prototype;return e.getTouchAction=function(){return[kS]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,u=n.distance<o.threshold,l=n.deltaTime>o.time;if(this._input=n,!u||!s||n.eventType&(Be|Ot)&&!l)this.reset();else if(n.eventType&ft)this.reset(),this._timer=setTimeout(function(){a.state=Er,a.tryEmit()},o.time);else if(n.eventType&Be)return Er;return cr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===Er&&(n&&n.eventType&Be?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=Sg(),this.manager.emit(this.options.event,this._input)))},i}(Io),GS={domEvents:!1,touchAction:PS,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},H$=[[VS,{enable:!1}],[WS,{enable:!1},["rotate"]],[HS,{direction:fr}],[Ig,{direction:fr},["swipe"]],[ff],[ff,{event:"doubletap",taps:2},["tap"]],[US]],xW=1,W$=2;function V$(t,i){var e=t.element;if(e.style){var r;_r(t.options.cssProps,function(n,a){r=dl(e.style,a),i?(t.oldCssProps[r]=e.style[r],e.style[r]=n):e.style[r]=t.oldCssProps[r]||""}),i||(t.oldCssProps={})}}function PW(t,i){var e=document.createEvent("Event");e.initEvent(t,!0,!0),e.gesture=i,i.target.dispatchEvent(e)}var U$=function(){function t(e,r){var n=this;this.options=Fn({},GS,r||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=SW(this),this.touchAction=new RS(this,this.options.touchAction),V$(this,!0),_r(this.options.recognizers,function(a){var o=n.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var i=t.prototype;return i.set=function(r){return Fn(this.options,r),r.touchAction&&this.touchAction.update(),r.inputTarget&&(this.input.destroy(),this.input.target=r.inputTarget,this.input.init()),this},i.stop=function(r){this.session.stopped=r?W$:xW},i.recognize=function(r){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(r);var a,o=this.recognizers,s=n.curRecognizer;(!s||s&&s.state&Er)&&(n.curRecognizer=null,s=null);for(var u=0;u<o.length;)a=o[u],n.stopped!==W$&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(r):a.reset(),!s&&a.state&(zt|Di|Zr)&&(n.curRecognizer=a,s=a),u++}},i.get=function(r){if(r instanceof Io)return r;for(var n=this.recognizers,a=0;a<n.length;a++)if(n[a].options.event===r)return n[a];return null},i.add=function(r){if(bi(r,"add",this))return this;var n=this.get(r.options.event);return n&&this.remove(n),this.recognizers.push(r),r.manager=this,this.touchAction.update(),r},i.remove=function(r){if(bi(r,"remove",this))return this;var n=this.get(r);if(r){var a=this.recognizers,o=Ln(a,n);o!==-1&&(a.splice(o,1),this.touchAction.update())}return this},i.on=function(r,n){if(r===void 0||n===void 0)return this;var a=this.handlers;return _r(Ka(r),function(o){a[o]=a[o]||[],a[o].push(n)}),this},i.off=function(r,n){if(r===void 0)return this;var a=this.handlers;return _r(Ka(r),function(o){n?a[o]&&a[o].splice(Ln(a[o],n),1):delete a[o]}),this},i.emit=function(r,n){this.options.domEvents&&PW(r,n);var a=this.handlers[r]&&this.handlers[r].slice();if(!(!a||!a.length)){n.type=r,n.preventDefault=function(){n.srcEvent.preventDefault()};for(var o=0;o<a.length;)a[o](n),o++}},i.destroy=function(){this.element&&V$(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),kW={touchstart:ft,touchmove:Yn,touchend:Be,touchcancel:Ot},IW="touchstart",CW="touchstart touchmove touchend touchcancel",AW=function(t){Wt(i,t);function i(){var r,n=i.prototype;return n.evTarget=IW,n.evWin=CW,r=t.apply(this,arguments)||this,r.started=!1,r}var e=i.prototype;return e.handler=function(n){var a=kW[n.type];if(a===ft&&(this.started=!0),!!this.started){var o=RW.call(this,n,a);a&(Be|Ot)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:To,srcEvent:n})}},i}(ta);function RW(t,i){var e=qa(t.touches),r=qa(t.changedTouches);return i&(Be|Ot)&&(e=xg(e.concat(r),"identifier",!0)),[e,r]}function KS(t,i,e){var r="DEPRECATED METHOD: "+i+`
|
|
34
|
+
`+e+` AT
|
|
35
|
+
`;return function(){var n=new Error("get-stack-trace"),a=n&&n.stack?n.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,r,a),t.apply(this,arguments)}}var qS=KS(function(t,i,e){for(var r=Object.keys(i),n=0;n<r.length;)(!e||e&&t[r[n]]===void 0)&&(t[r[n]]=i[r[n]]),n++;return t},"extend","Use `assign`."),DW=KS(function(t,i){return qS(t,i,!0)},"merge","Use `assign`.");function MW(t,i,e){var r=i.prototype,n;n=t.prototype=Object.create(r),n.constructor=t,n._super=r,e&&Fn(n,e)}function G$(t,i){return function(){return t.apply(i,arguments)}}var NW=function(){var t=function(e,r){return r===void 0&&(r={}),new U$(e,er({recognizers:H$.concat()},r))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=CS,t.DIRECTION_DOWN=Ri,t.DIRECTION_LEFT=xo,t.DIRECTION_RIGHT=Po,t.DIRECTION_UP=ko,t.DIRECTION_HORIZONTAL=fr,t.DIRECTION_VERTICAL=In,t.DIRECTION_NONE=mu,t.DIRECTION_DOWN=Ri,t.INPUT_START=ft,t.INPUT_MOVE=Yn,t.INPUT_END=Be,t.INPUT_CANCEL=Ot,t.STATE_POSSIBLE=Ys,t.STATE_BEGAN=zt,t.STATE_CHANGED=Di,t.STATE_ENDED=Zr,t.STATE_RECOGNIZED=Er,t.STATE_CANCELLED=Ya,t.STATE_FAILED=cr,t.Manager=U$,t.Input=ta,t.TouchAction=RS,t.TouchInput=Pg,t.MouseInput=kg,t.PointerEventInput=LS,t.TouchMouseInput=jS,t.SingleTouchInput=AW,t.Recognizer=Io,t.AttrRecognizer=Mi,t.Tap=ff,t.Pan=Ig,t.Swipe=HS,t.Pinch=WS,t.Rotate=VS,t.Press=US,t.on=Ia,t.off=Ca,t.each=_r,t.merge=DW,t.extend=qS,t.bindFn=G$,t.assign=Fn,t.inherit=MW,t.bindFn=G$,t.prefixed=dl,t.toArray=qa,t.inArray=Ln,t.uniqueArray=xg,t.splitStr=Ka,t.boolOrFn=fl,t.hasParent=Tg,t.addEventListeners=Ia,t.removeEventListeners=Ca,t.defaults=Fn({},GS,{preset:H$}),t}(),FW=NW;function YS(t,i){var e=typeof ll<"u"&&Oo(t)||t["@@iterator"];if(!e){if(It(t)||(e=BW(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:n}}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(t)},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 BW(t,i){var e;if(t){if(typeof t=="string")return K$(t,i);var r=hl(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return bg(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return K$(t,i)}}function K$(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}var XS=ll("DELETE");function LW(t){for(var i,e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return QS.apply(void 0,cl(i=[{},t]).call(i,r))}function QS(){var t=wu.apply(void 0,arguments);return JS(t),t}function wu(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];if(i.length<2)return i[0];if(i.length>2){var r;return wu.apply(void 0,cl(r=[QS(i[0],i[1])]).call(r,_t(hl(i).call(i,2))))}var n=i[0],a=i[1],o=YS(Iz(a)),s;try{for(o.s();!(s=o.n()).done;){var u=s.value;Object.prototype.propertyIsEnumerable.call(a,u)&&(a[u]===XS?delete n[u]:n[u]!==null&&a[u]!==null&&ot(n[u])==="object"&&ot(a[u])==="object"&&!It(n[u])&&!It(a[u])?n[u]=wu(n[u],a[u]):n[u]=ZS(a[u]))}}catch(l){o.e(l)}finally{o.f()}return n}function ZS(t){return It(t)?qt(t).call(t,function(i){return ZS(i)}):ot(t)==="object"&&t!==null?wu({},t):t}function JS(t){for(var i=0,e=_g(t);i<e.length;i++){var r=e[i];t[r]===XS?delete t[r]:ot(t[r])==="object"&&t[r]!==null&&JS(t[r])}}function jW(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}}}var zW=typeof window<"u"?window.Hammer||FW:function(){return jW()};function $r(t){var i=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){i._dom.overlay.parentNode.removeChild(i._dom.overlay)});var r=zW(this._dom.overlay);r.on("tap",WE(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){r.destroy()});var n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Nn(n).call(n,function(a){r.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){HW(a.target,t)||i.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",i._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&i.deactivate()}}XH($r.prototype);$r.current=null;$r.prototype.destroy=function(){var t,i;this.deactivate();var e=YS(w3(t=dS(i=this._cleanupQueue).call(i,0)).call(t)),r;try{for(e.s();!(r=e.n()).done;){var n=r.value;n()}}catch(a){e.e(a)}finally{e.f()}};$r.prototype.activate=function(){$r.current&&$r.current.deactivate(),$r.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)};$r.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")};$r.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};function HW(t,i){for(;t;){if(t===i)return!0;t=t.parentNode}return!1}var vf={},WW={get exports(){return vf},set exports(t){vf=t}},VW=Qu,UW=Yi,GW=TypeError,eO=function(t){if(VW(t))return t;throw GW(UW(t)+" is not a constructor")},KW=U,qW=pt,Ac=Gi,YW=zE,q$=eO,XW=Rt,Y$=Qe,QW=Kn,tO=oe,Cg=qW("Reflect","construct"),ZW=Object.prototype,JW=[].push,rO=tO(function(){function t(){}return!(Cg(function(){},[],t)instanceof t)}),nO=!tO(function(){Cg(function(){})}),X$=rO||nO;KW({target:"Reflect",stat:!0,forced:X$,sham:X$},{construct:function(i,e){q$(i),XW(e);var r=arguments.length<3?i:q$(arguments[2]);if(nO&&!rO)return Cg(i,e,r);if(i==r){switch(e.length){case 0:return new i;case 1:return new i(e[0]);case 2:return new i(e[0],e[1]);case 3:return new i(e[0],e[1],e[2]);case 4:return new i(e[0],e[1],e[2],e[3])}var n=[null];return Ac(JW,n,e),new(Ac(YW,i,n))}var a=r.prototype,o=QW(Y$(a)?a:ZW),s=Ac(i,o,e);return Y$(s)?s:o}});var e6=ye,t6=e6.Reflect.construct,r6=t6,n6=r6;(function(t){t.exports=n6})(WW);var Xs=Q(vf);function bn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var _u={},i6={get exports(){return _u},set exports(t){_u=t}},pf={},a6={get exports(){return pf},set exports(t){pf=t}},o6=bS,s6=o6,u6=s6,l6=u6;(function(t){t.exports=l6})(a6);(function(t){t.exports=pf})(i6);var c6=Q(_u),Eu={},h6={get exports(){return Eu},set exports(t){Eu=t}},gf={},d6={get exports(){return gf},set exports(t){gf=t}},f6=U,v6=PE;f6({target:"Object",stat:!0},{setPrototypeOf:v6});var p6=ye,g6=p6.Object.setPrototypeOf,y6=g6,m6=y6,$6=m6,b6=$6,w6=b6,_6=w6;(function(t){t.exports=_6})(d6);(function(t){t.exports=gf})(h6);var yf=Q(Eu),mf={},E6={get exports(){return mf},set exports(t){mf=t}},$f={},S6={get exports(){return $f},set exports(t){$f=t}},O6=HE,T6=O6,x6=T6,P6=x6;(function(t){t.exports=P6})(S6);(function(t){t.exports=$f})(E6);var iO=Q(mf);function bf(t,i){var e;return bf=yf?iO(e=yf).call(e):function(n,a){return n.__proto__=a,n},bf(t,i)}function k6(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=c6(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Yu(t,"prototype",{writable:!1}),i&&bf(t,i)}function I6(t,i){if(i&&(ot(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bn(t)}var Su={},C6={get exports(){return Su},set exports(t){Su=t}},wf={},A6={get exports(){return wf},set exports(t){wf=t}},R6=vS,D6=R6,M6=D6,N6=M6;(function(t){t.exports=N6})(A6);(function(t){t.exports=wf})(C6);var Q$=Q(Su);function Ou(t){var i;return Ou=yf?iO(i=Q$).call(i):function(r){return r.__proto__||Q$(r)},Ou(t)}var _f={},F6={get exports(){return _f},set exports(t){_f=t}},Ef={},B6={get exports(){return Ef},set exports(t){Ef=t}};(function(t){var i=za,e=gu;function r(n){"@babel/helpers - typeof";return t.exports=r=typeof i=="function"&&typeof e=="symbol"?function(a){return typeof a}:function(a){return a&&typeof i=="function"&&a.constructor===i&&a!==i.prototype?"symbol":typeof a},t.exports.__esModule=!0,t.exports.default=t.exports,r(n)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports})(B6);var Sf={},L6={get exports(){return Sf},set exports(t){Sf=t}},Of={},j6={get exports(){return Of},set exports(t){Of=t}},z6=lS,H6=z6,W6=H6,V6=W6;(function(t){t.exports=V6})(j6);(function(t){t.exports=Of})(L6);var Tf={},U6={get exports(){return Tf},set exports(t){Tf=t}},xf={},G6={get exports(){return xf},set exports(t){xf=t}},Z$=ze,K6=wg,q6=Un,Y6=At,X6=function(t,i,e){for(var r=K6(i),n=Y6.f,a=q6.f,o=0;o<r.length;o++){var s=r[o];!Z$(t,s)&&!(e&&Z$(e,s))&&n(t,s,a(i,s))}},Q6=Qe,Z6=Dr,J6=function(t,i){Q6(i)&&"cause"in i&&Z6(t,"cause",i.cause)},eV=de,aO=Error,tV=eV("".replace),rV=function(t){return String(aO(t).stack)}("zxcasd"),oO=/\n\s*at [^:]*:[^\n]*/,nV=oO.test(rV),iV=function(t,i){if(nV&&typeof t=="string"&&!aO.prepareStackTrace)for(;i--;)t=tV(t,oO,"");return t},aV=oe,oV=Gn,sV=!aV(function(){var t=Error("a");return"stack"in t?(Object.defineProperty(t,"stack",oV(1,7)),t.stack!==7):!0}),uV=Dr,lV=iV,cV=sV,J$=Error.captureStackTrace,hV=function(t,i,e,r){cV&&(J$?J$(t,i):uV(t,"stack",lV(e,r)))},dV=hn,fV=Xe,vV=Rt,pV=Yi,gV=GE,yV=Dt,eb=Ee,mV=$g,$V=ul,tb=UE,bV=TypeError,Qs=function(t,i){this.stopped=t,this.result=i},rb=Qs.prototype,Xn=function(t,i,e){var r=e&&e.that,n=!!(e&&e.AS_ENTRIES),a=!!(e&&e.IS_RECORD),o=!!(e&&e.IS_ITERATOR),s=!!(e&&e.INTERRUPTED),u=dV(i,r),l,c,h,d,f,v,g,b=function($){return l&&tb(l,"normal",$),new Qs(!0,$)},p=function($){return n?(vV($),s?u($[0],$[1],b):u($[0],$[1])):s?u($,b):u($)};if(a)l=t.iterator;else if(o)l=t;else{if(c=$V(t),!c)throw bV(pV(t)+" is not iterable");if(gV(c)){for(h=0,d=yV(t);d>h;h++)if(f=p(t[h]),f&&eb(rb,f))return f;return new Qs(!1)}l=mV(t,c)}for(v=a?t.next:l.next;!(g=fV(v,l)).done;){try{f=p(g.value)}catch($){tb(l,"throw",$)}if(typeof f=="object"&&f&&eb(rb,f))return f}return new Qs(!1)},wV=yr,_V=function(t,i){return t===void 0?arguments.length<2?"":i:wV(t)},EV=U,SV=Ee,OV=ol,Tu=PE,TV=X6,sO=Kn,Rc=Dr,Dc=Gn,xV=J6,PV=hV,kV=Xn,IV=_V,CV=Se,AV=CV("toStringTag"),xu=Error,RV=[].push,Ni=function(i,e){var r=SV(Mc,this),n;Tu?n=Tu(xu(),r?OV(this):Mc):(n=r?this:sO(Mc),Rc(n,AV,"Error")),e!==void 0&&Rc(n,"message",IV(e)),PV(n,Ni,n.stack,1),arguments.length>2&&xV(n,arguments[2]);var a=[];return kV(i,RV,{that:a}),Rc(n,"errors",a),n};Tu?Tu(Ni,xu):TV(Ni,xu,{name:!0});var Mc=Ni.prototype=sO(xu.prototype,{constructor:Dc(1,Ni),message:Dc(1,""),name:Dc(1,"AggregateError")});EV({global:!0,constructor:!0,arity:2},{AggregateError:Ni});var DV=pt,MV=lg,NV=Se,FV=Ue,nb=NV("species"),uO=function(t){var i=DV(t);FV&&i&&!i[nb]&&MV(i,nb,{configurable:!0,get:function(){return this}})},BV=Ee,LV=TypeError,Ag=function(t,i){if(BV(i,t))return t;throw LV("Incorrect invocation")},ib=Rt,jV=eO,zV=uo,HV=Se,WV=HV("species"),lO=function(t,i){var e=ib(t).constructor,r;return e===void 0||zV(r=ib(e)[WV])?i:jV(r)},VV=cn,cO=/(?:ipad|iphone|ipod).*applewebkit/i.test(VV),Ct=Pe,UV=Gi,GV=hn,ab=ke,KV=ze,hO=oe,ob=q_,qV=wo,sb=rg,YV=wS,XV=cO,QV=So,Pf=Ct.setImmediate,kf=Ct.clearImmediate,ZV=Ct.process,Nc=Ct.Dispatch,JV=Ct.Function,ub=Ct.MessageChannel,e8=Ct.String,Fc=0,Aa={},lb="onreadystatechange",Xa,$n,Bc,Lc;hO(function(){Xa=Ct.location});var Rg=function(t){if(KV(Aa,t)){var i=Aa[t];delete Aa[t],i()}},jc=function(t){return function(){Rg(t)}},cb=function(t){Rg(t.data)},hb=function(t){Ct.postMessage(e8(t),Xa.protocol+"//"+Xa.host)};(!Pf||!kf)&&(Pf=function(i){YV(arguments.length,1);var e=ab(i)?i:JV(i),r=qV(arguments,1);return Aa[++Fc]=function(){UV(e,void 0,r)},$n(Fc),Fc},kf=function(i){delete Aa[i]},QV?$n=function(t){ZV.nextTick(jc(t))}:Nc&&Nc.now?$n=function(t){Nc.now(jc(t))}:ub&&!XV?(Bc=new ub,Lc=Bc.port2,Bc.port1.onmessage=cb,$n=GV(Lc.postMessage,Lc)):Ct.addEventListener&&ab(Ct.postMessage)&&!Ct.importScripts&&Xa&&Xa.protocol!=="file:"&&!hO(hb)?($n=hb,Ct.addEventListener("message",cb,!1)):lb in sb("script")?$n=function(t){ob.appendChild(sb("script"))[lb]=function(){ob.removeChild(this),Rg(t)}}:$n=function(t){setTimeout(jc(t),0)});var dO={set:Pf,clear:kf},fO=function(){this.head=null,this.tail=null};fO.prototype={add:function(t){var i={item:t,next:null},e=this.tail;e?e.next=i:this.head=i,this.tail=i},get:function(){var t=this.head;if(t){var i=this.head=t.next;return i===null&&(this.tail=null),t.item}}};var vO=fO,t8=cn,r8=/ipad|iphone|ipod/i.test(t8)&&typeof Pebble<"u",n8=cn,i8=/web0s(?!.*chrome)/i.test(n8),jn=Pe,db=hn,a8=Un.f,zc=dO.set,o8=vO,s8=cO,u8=r8,l8=i8,Hc=So,fb=jn.MutationObserver||jn.WebKitMutationObserver,vb=jn.document,pb=jn.process,bs=jn.Promise,gb=a8(jn,"queueMicrotask"),If=gb&&gb.value,ui,Wc,Vc,ws,yb;if(!If){var _s=new o8,Es=function(){var t,i;for(Hc&&(t=pb.domain)&&t.exit();i=_s.get();)try{i()}catch(e){throw _s.head&&ui(),e}t&&t.enter()};!s8&&!Hc&&!l8&&fb&&vb?(Wc=!0,Vc=vb.createTextNode(""),new fb(Es).observe(Vc,{characterData:!0}),ui=function(){Vc.data=Wc=!Wc}):!u8&&bs&&bs.resolve?(ws=bs.resolve(void 0),ws.constructor=bs,yb=db(ws.then,ws),ui=function(){yb(Es)}):Hc?ui=function(){pb.nextTick(Es)}:(zc=db(zc,jn),ui=function(){zc(Es)}),If=function(t){_s.head||ui(),_s.add(t)}}var c8=If,h8=function(t,i){try{arguments.length==1?console.error(t):console.error(t,i)}catch{}},ra=function(t){try{return{error:!1,value:t()}}catch(i){return{error:!0,value:i}}},d8=Pe,na=d8.Promise,pO=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",f8=pO,v8=So,p8=!f8&&!v8&&typeof window=="object"&&typeof document=="object",g8=Pe,Ra=na,y8=ke,m8=N_,$8=z_,b8=Se,w8=p8,_8=pO,Uc=Ki,mb=Ra&&Ra.prototype,E8=b8("species"),Cf=!1,gO=y8(g8.PromiseRejectionEvent),S8=m8("Promise",function(){var t=$8(Ra),i=t!==String(Ra);if(!i&&Uc===66||!(mb.catch&&mb.finally))return!0;if(!Uc||Uc<51||!/native code/.test(t)){var e=new Ra(function(a){a(1)}),r=function(a){a(function(){},function(){})},n=e.constructor={};if(n[E8]=r,Cf=e.then(function(){})instanceof r,!Cf)return!0}return!i&&(w8||_8)&&!gO}),Co={CONSTRUCTOR:S8,REJECTION_EVENT:gO,SUBCLASSING:Cf},Nr={},$b=xt,O8=TypeError,T8=function(t){var i,e;this.promise=new t(function(r,n){if(i!==void 0||e!==void 0)throw O8("Bad Promise constructor");i=r,e=n}),this.resolve=$b(i),this.reject=$b(e)};Nr.f=function(t){return new T8(t)};var x8=U,Pu=So,an=Pe,Ao=Xe,P8=Qi,k8=qn,I8=uO,C8=xt,Af=ke,A8=Qe,R8=Ag,D8=lO,yO=dO.set,Dg=c8,M8=h8,N8=ra,F8=vO,mO=Zi,Rf=na,$O=Co,bO=Nr,vl="Promise",wO=$O.CONSTRUCTOR,B8=$O.REJECTION_EVENT,Gc=mO.getterFor(vl),L8=mO.set,j8=Rf&&Rf.prototype,wi=Rf,Kc=j8,_O=an.TypeError,Df=an.document,Mg=an.process,Mf=bO.f,z8=Mf,H8=!!(Df&&Df.createEvent&&an.dispatchEvent),EO="unhandledrejection",W8="rejectionhandled",bb=0,SO=1,V8=2,Ng=1,OO=2,Ss,wb,U8,TO=function(t){var i;return A8(t)&&Af(i=t.then)?i:!1},xO=function(t,i){var e=i.value,r=i.state==SO,n=r?t.ok:t.fail,a=t.resolve,o=t.reject,s=t.domain,u,l,c;try{n?(r||(i.rejection===OO&&K8(i),i.rejection=Ng),n===!0?u=e:(s&&s.enter(),u=n(e),s&&(s.exit(),c=!0)),u===t.promise?o(_O("Promise-chain cycle")):(l=TO(u))?Ao(l,u,a,o):a(u)):o(e)}catch(h){s&&!c&&s.exit(),o(h)}},PO=function(t,i){t.notified||(t.notified=!0,Dg(function(){for(var e=t.reactions,r;r=e.get();)xO(r,t);t.notified=!1,i&&!t.rejection&&G8(t)}))},kO=function(t,i,e){var r,n;H8?(r=Df.createEvent("Event"),r.promise=i,r.reason=e,r.initEvent(t,!1,!0),an.dispatchEvent(r)):r={promise:i,reason:e},!B8&&(n=an["on"+t])?n(r):t===EO&&M8("Unhandled promise rejection",e)},G8=function(t){Ao(yO,an,function(){var i=t.facade,e=t.value,r=_b(t),n;if(r&&(n=N8(function(){Pu?Mg.emit("unhandledRejection",e,i):kO(EO,i,e)}),t.rejection=Pu||_b(t)?OO:Ng,n.error))throw n.value})},_b=function(t){return t.rejection!==Ng&&!t.parent},K8=function(t){Ao(yO,an,function(){var i=t.facade;Pu?Mg.emit("rejectionHandled",i):kO(W8,i,t.value)})},_i=function(t,i,e){return function(r){t(i,r,e)}},xi=function(t,i,e){t.done||(t.done=!0,e&&(t=e),t.value=i,t.state=V8,PO(t,!0))},Nf=function(t,i,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===i)throw _O("Promise can't be resolved itself");var r=TO(i);r?Dg(function(){var n={done:!1};try{Ao(r,i,_i(Nf,n,t),_i(xi,n,t))}catch(a){xi(n,a,t)}}):(t.value=i,t.state=SO,PO(t,!1))}catch(n){xi({done:!1},n,t)}}};wO&&(wi=function(i){R8(this,Kc),C8(i),Ao(Ss,this);var e=Gc(this);try{i(_i(Nf,e),_i(xi,e))}catch(r){xi(e,r)}},Kc=wi.prototype,Ss=function(i){L8(this,{type:vl,done:!1,notified:!1,parent:!1,reactions:new F8,rejection:!1,state:bb,value:void 0})},Ss.prototype=P8(Kc,"then",function(i,e){var r=Gc(this),n=Mf(D8(this,wi));return r.parent=!0,n.ok=Af(i)?i:!0,n.fail=Af(e)&&e,n.domain=Pu?Mg.domain:void 0,r.state==bb?r.reactions.add(n):Dg(function(){xO(n,r)}),n.promise}),wb=function(){var t=new Ss,i=Gc(t);this.promise=t,this.resolve=_i(Nf,i),this.reject=_i(xi,i)},bO.f=Mf=function(t){return t===wi||t===U8?new wb(t):z8(t)});x8({global:!0,constructor:!0,wrap:!0,forced:wO},{Promise:wi});k8(wi,vl,!1,!0);I8(vl);var q8=na,Y8=YE,X8=Co.CONSTRUCTOR,pl=X8||!Y8(function(t){q8.all(t).then(void 0,function(){})}),Q8=U,Z8=Xe,J8=xt,eU=Nr,tU=ra,rU=Xn,nU=pl;Q8({target:"Promise",stat:!0,forced:nU},{all:function(i){var e=this,r=eU.f(e),n=r.resolve,a=r.reject,o=tU(function(){var s=J8(e.resolve),u=[],l=0,c=1;rU(i,function(h){var d=l++,f=!1;c++,Z8(s,e,h).then(function(v){f||(f=!0,u[d]=v,--c||n(u))},a)}),--c||n(u)});return o.error&&a(o.value),r.promise}});var iU=U,aU=Co.CONSTRUCTOR,Eb=na;Eb&&Eb.prototype;iU({target:"Promise",proto:!0,forced:aU,real:!0},{catch:function(t){return this.then(void 0,t)}});var oU=U,sU=Xe,uU=xt,lU=Nr,cU=ra,hU=Xn,dU=pl;oU({target:"Promise",stat:!0,forced:dU},{race:function(i){var e=this,r=lU.f(e),n=r.reject,a=cU(function(){var o=uU(e.resolve);hU(i,function(s){sU(o,e,s).then(r.resolve,n)})});return a.error&&n(a.value),r.promise}});var fU=U,vU=Xe,pU=Nr,gU=Co.CONSTRUCTOR;fU({target:"Promise",stat:!0,forced:gU},{reject:function(i){var e=pU.f(this);return vU(e.reject,void 0,i),e.promise}});var yU=Rt,mU=Qe,$U=Nr,IO=function(t,i){if(yU(t),mU(i)&&i.constructor===t)return i;var e=$U.f(t),r=e.resolve;return r(i),e.promise},bU=U,wU=pt,_U=DI,EU=na,SU=Co.CONSTRUCTOR,OU=IO,TU=wU("Promise"),xU=!SU;bU({target:"Promise",stat:!0,forced:_U},{resolve:function(i){return OU(xU&&this===TU?EU:this,i)}});var PU=U,kU=Xe,IU=xt,CU=Nr,AU=ra,RU=Xn,DU=pl;PU({target:"Promise",stat:!0,forced:DU},{allSettled:function(i){var e=this,r=CU.f(e),n=r.resolve,a=r.reject,o=AU(function(){var s=IU(e.resolve),u=[],l=0,c=1;RU(i,function(h){var d=l++,f=!1;c++,kU(s,e,h).then(function(v){f||(f=!0,u[d]={status:"fulfilled",value:v},--c||n(u))},function(v){f||(f=!0,u[d]={status:"rejected",reason:v},--c||n(u))})}),--c||n(u)});return o.error&&a(o.value),r.promise}});var MU=U,NU=Xe,FU=xt,BU=pt,LU=Nr,jU=ra,zU=Xn,HU=pl,Sb="No one promise resolved";MU({target:"Promise",stat:!0,forced:HU},{any:function(i){var e=this,r=BU("AggregateError"),n=LU.f(e),a=n.resolve,o=n.reject,s=jU(function(){var u=FU(e.resolve),l=[],c=0,h=1,d=!1;zU(i,function(f){var v=c++,g=!1;h++,NU(u,e,f).then(function(b){g||d||(d=!0,a(b))},function(b){g||d||(g=!0,l[v]=b,--h||o(new r(l,Sb)))})}),--h||o(new r(l,Sb))});return s.error&&o(s.value),n.promise}});var WU=U,Ff=na,VU=oe,UU=pt,GU=ke,KU=lO,Ob=IO,qU=Ff&&Ff.prototype,YU=!!Ff&&VU(function(){qU.finally.call({then:function(){}},function(){})});WU({target:"Promise",proto:!0,real:!0,forced:YU},{finally:function(t){var i=KU(this,UU("Promise")),e=GU(t);return this.then(e?function(r){return Ob(i,t()).then(function(){return r})}:t,e?function(r){return Ob(i,t()).then(function(){throw r})}:t)}});var XU=ye,QU=XU.Promise,ZU=QU,JU=ZU,eG=JU,tG=eG,rG=U,nG=Nr,iG=ra;rG({target:"Promise",stat:!0,forced:!0},{try:function(t){var i=nG.f(this),e=iG(t);return(e.error?i.reject:i.resolve)(e.value),i.promise}});var aG=tG,oG=aG;(function(t){t.exports=oG})(G6);(function(t){t.exports=xf})(U6);var Bf={},sG={get exports(){return Bf},set exports(t){Bf=t}},Lf={},uG={get exports(){return Lf},set exports(t){Lf=t}},lG=cS,cG=lG,hG=cG,dG=hG;(function(t){t.exports=dG})(uG);(function(t){t.exports=Lf})(sG);(function(t){var i=Ef.default,e=hu,r=za,n=_u,a=Su,o=Sf,s=Eu,u=Tf,l=Bf,c=yu;function h(){t.exports=h=function(){return d},t.exports.__esModule=!0,t.exports.default=t.exports;var d={},f=Object.prototype,v=f.hasOwnProperty,g=e||function(R,k,D){R[k]=D.value},b=typeof r=="function"?r:{},p=b.iterator||"@@iterator",$=b.asyncIterator||"@@asyncIterator",y=b.toStringTag||"@@toStringTag";function m(R,k,D){return e(R,k,{value:D,enumerable:!0,configurable:!0,writable:!0}),R[k]}try{m({},"")}catch{m=function(D,L,G){return D[L]=G}}function _(R,k,D,L){var G=k&&k.prototype instanceof O?k:O,Y=n(G.prototype),Re=new rt(L||[]);return g(Y,"_invoke",{value:le(R,D,Re)}),Y}function S(R,k,D){try{return{type:"normal",arg:R.call(k,D)}}catch(L){return{type:"throw",arg:L}}}d.wrap=_;var T={};function O(){}function w(){}function E(){}var A={};m(A,p,function(){return this});var H=a,B=H&&H(H(_e([])));B&&B!==f&&v.call(B,p)&&(A=B);var X=E.prototype=O.prototype=n(A);function re(R){var k;o(k=["next","throw","return"]).call(k,function(D){m(R,D,function(L){return this._invoke(D,L)})})}function te(R,k){function D(G,Y,Re,ut){var gt=S(R[G],R,Y);if(gt.type!=="throw"){var yn=gt.arg,Lr=yn.value;return Lr&&i(Lr)=="object"&&v.call(Lr,"__await")?k.resolve(Lr.__await).then(function(mn){D("next",mn,Re,ut)},function(mn){D("throw",mn,Re,ut)}):k.resolve(Lr).then(function(mn){yn.value=mn,Re(yn)},function(mn){return D("throw",mn,Re,ut)})}ut(gt.arg)}var L;g(this,"_invoke",{value:function(Y,Re){function ut(){return new k(function(gt,yn){D(Y,Re,gt,yn)})}return L=L?L.then(ut,ut):ut()}})}function le(R,k,D){var L="suspendedStart";return function(G,Y){if(L==="executing")throw new Error("Generator is already running");if(L==="completed"){if(G==="throw")throw Y;return Ae()}for(D.method=G,D.arg=Y;;){var Re=D.delegate;if(Re){var ut=we(Re,D);if(ut){if(ut===T)continue;return ut}}if(D.method==="next")D.sent=D._sent=D.arg;else if(D.method==="throw"){if(L==="suspendedStart")throw L="completed",D.arg;D.dispatchException(D.arg)}else D.method==="return"&&D.abrupt("return",D.arg);L="executing";var gt=S(R,k,D);if(gt.type==="normal"){if(L=D.done?"completed":"suspendedYield",gt.arg===T)continue;return{value:gt.arg,done:D.done}}gt.type==="throw"&&(L="completed",D.method="throw",D.arg=gt.arg)}}}function we(R,k){var D=k.method,L=R.iterator[D];if(L===void 0)return k.delegate=null,D==="throw"&&R.iterator.return&&(k.method="return",k.arg=void 0,we(R,k),k.method==="throw")||D!=="return"&&(k.method="throw",k.arg=new TypeError("The iterator does not provide a '"+D+"' method")),T;var G=S(L,R.iterator,k.arg);if(G.type==="throw")return k.method="throw",k.arg=G.arg,k.delegate=null,T;var Y=G.arg;return Y?Y.done?(k[R.resultName]=Y.value,k.next=R.nextLoc,k.method!=="return"&&(k.method="next",k.arg=void 0),k.delegate=null,T):Y:(k.method="throw",k.arg=new TypeError("iterator result is not an object"),k.delegate=null,T)}function Oe(R){var k={tryLoc:R[0]};1 in R&&(k.catchLoc=R[1]),2 in R&&(k.finallyLoc=R[2],k.afterLoc=R[3]),this.tryEntries.push(k)}function ar(R){var k=R.completion||{};k.type="normal",delete k.arg,R.completion=k}function rt(R){this.tryEntries=[{tryLoc:"root"}],o(R).call(R,Oe,this),this.reset(!0)}function _e(R){if(R){var k=R[p];if(k)return k.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var D=-1,L=function G(){for(;++D<R.length;)if(v.call(R,D))return G.value=R[D],G.done=!1,G;return G.value=void 0,G.done=!0,G};return L.next=L}}return{next:Ae}}function Ae(){return{value:void 0,done:!0}}return w.prototype=E,g(X,"constructor",{value:E,configurable:!0}),g(E,"constructor",{value:w,configurable:!0}),w.displayName=m(E,y,"GeneratorFunction"),d.isGeneratorFunction=function(R){var k=typeof R=="function"&&R.constructor;return!!k&&(k===w||(k.displayName||k.name)==="GeneratorFunction")},d.mark=function(R){return s?s(R,E):(R.__proto__=E,m(R,y,"GeneratorFunction")),R.prototype=n(X),R},d.awrap=function(R){return{__await:R}},re(te.prototype),m(te.prototype,$,function(){return this}),d.AsyncIterator=te,d.async=function(R,k,D,L,G){G===void 0&&(G=u);var Y=new te(_(R,k,D,L),G);return d.isGeneratorFunction(k)?Y:Y.next().then(function(Re){return Re.done?Re.value:Y.next()})},re(X),m(X,y,"Generator"),m(X,p,function(){return this}),m(X,"toString",function(){return"[object Generator]"}),d.keys=function(R){var k=Object(R),D=[];for(var L in k)D.push(L);return l(D).call(D),function G(){for(;D.length;){var Y=D.pop();if(Y in k)return G.value=Y,G.done=!1,G}return G.done=!0,G}},d.values=_e,rt.prototype={constructor:rt,reset:function(k){var D;if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,o(D=this.tryEntries).call(D,ar),!k)for(var L in this)L.charAt(0)==="t"&&v.call(this,L)&&!isNaN(+c(L).call(L,1))&&(this[L]=void 0)},stop:function(){this.done=!0;var k=this.tryEntries[0].completion;if(k.type==="throw")throw k.arg;return this.rval},dispatchException:function(k){if(this.done)throw k;var D=this;function L(yn,Lr){return Re.type="throw",Re.arg=k,D.next=yn,Lr&&(D.method="next",D.arg=void 0),!!Lr}for(var G=this.tryEntries.length-1;G>=0;--G){var Y=this.tryEntries[G],Re=Y.completion;if(Y.tryLoc==="root")return L("end");if(Y.tryLoc<=this.prev){var ut=v.call(Y,"catchLoc"),gt=v.call(Y,"finallyLoc");if(ut&>){if(this.prev<Y.catchLoc)return L(Y.catchLoc,!0);if(this.prev<Y.finallyLoc)return L(Y.finallyLoc)}else if(ut){if(this.prev<Y.catchLoc)return L(Y.catchLoc,!0)}else{if(!gt)throw new Error("try statement without catch or finally");if(this.prev<Y.finallyLoc)return L(Y.finallyLoc)}}}},abrupt:function(k,D){for(var L=this.tryEntries.length-1;L>=0;--L){var G=this.tryEntries[L];if(G.tryLoc<=this.prev&&v.call(G,"finallyLoc")&&this.prev<G.finallyLoc){var Y=G;break}}Y&&(k==="break"||k==="continue")&&Y.tryLoc<=D&&D<=Y.finallyLoc&&(Y=null);var Re=Y?Y.completion:{};return Re.type=k,Re.arg=D,Y?(this.method="next",this.next=Y.finallyLoc,T):this.complete(Re)},complete:function(k,D){if(k.type==="throw")throw k.arg;return k.type==="break"||k.type==="continue"?this.next=k.arg:k.type==="return"?(this.rval=this.arg=k.arg,this.method="return",this.next="end"):k.type==="normal"&&D&&(this.next=D),T},finish:function(k){for(var D=this.tryEntries.length-1;D>=0;--D){var L=this.tryEntries[D];if(L.finallyLoc===k)return this.complete(L.completion,L.afterLoc),ar(L),T}},catch:function(k){for(var D=this.tryEntries.length-1;D>=0;--D){var L=this.tryEntries[D];if(L.tryLoc===k){var G=L.completion;if(G.type==="throw"){var Y=G.arg;ar(L)}return Y}}throw new Error("illegal catch attempt")},delegateYield:function(k,D,L){return this.delegate={iterator:_e(k),resultName:D,nextLoc:L},this.method==="next"&&(this.arg=void 0),T}},d}t.exports=h,t.exports.__esModule=!0,t.exports.default=t.exports})(F6);var Zs=_f(),mt=Zs;try{regeneratorRuntime=Zs}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Zs:Function("r","regeneratorRuntime = r")(Zs)}var jf={},fG={get exports(){return jf},set exports(t){jf=t}},ku={},vG={get exports(){return ku},set exports(t){ku=t}},pG=oe,gG=pG(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),yG=oe,mG=Qe,$G=Rr,Tb=gG,Js=Object.isExtensible,bG=yG(function(){Js(1)}),wG=bG||Tb?function(i){return!mG(i)||Tb&&$G(i)=="ArrayBuffer"?!1:Js?Js(i):!0}:Js,_G=oe,EG=!_G(function(){return Object.isExtensible(Object.preventExtensions({}))}),SG=U,OG=de,TG=po,xG=Qe,Fg=ze,PG=At.f,xb=yo,kG=ug,Bg=wG,IG=Ku,CG=EG,CO=!1,Ir=IG("meta"),AG=0,Lg=function(t){PG(t,Ir,{value:{objectID:"O"+AG++,weakData:{}}})},RG=function(t,i){if(!xG(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!Fg(t,Ir)){if(!Bg(t))return"F";if(!i)return"E";Lg(t)}return t[Ir].objectID},DG=function(t,i){if(!Fg(t,Ir)){if(!Bg(t))return!0;if(!i)return!1;Lg(t)}return t[Ir].weakData},MG=function(t){return CG&&CO&&Bg(t)&&!Fg(t,Ir)&&Lg(t),t},NG=function(){FG.enable=function(){},CO=!0;var t=xb.f,i=OG([].splice),e={};e[Ir]=1,t(e).length&&(xb.f=function(r){for(var n=t(r),a=0,o=n.length;a<o;a++)if(n[a]===Ir){i(n,a,1);break}return n},SG({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:kG.f}))},FG=vG.exports={enable:NG,fastKey:RG,getWeakData:DG,onFreeze:MG};TG[Ir]=!0;var BG=U,LG=Pe,jG=ku,zG=oe,HG=Dr,WG=Xn,VG=Ag,UG=ke,GG=Qe,KG=qn,qG=At.f,YG=Ji.forEach,XG=Ue,AO=Zi,QG=AO.set,ZG=AO.getterFor,RO=function(t,i,e){var r=t.indexOf("Map")!==-1,n=t.indexOf("Weak")!==-1,a=r?"set":"add",o=LG[t],s=o&&o.prototype,u={},l;if(!XG||!UG(o)||!(n||s.forEach&&!zG(function(){new o().entries().next()})))l=e.getConstructor(i,t,r,a),jG.enable();else{l=i(function(d,f){QG(VG(d,c),{type:t,collection:new o}),f!=null&&WG(f,d[a],{that:d,AS_ENTRIES:r})});var c=l.prototype,h=ZG(t);YG(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(d){var f=d=="add"||d=="set";d in s&&!(n&&d=="clear")&&HG(c,d,function(v,g){var b=h(this).collection;if(!f&&n&&!GG(v))return d=="get"?void 0:!1;var p=b[d](v===0?0:v,g);return f?this:p})}),n||qG(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}return KG(l,t,!1,!0),u[t]=l,BG({global:!0,forced:!0},u),n||e.setStrong(l,t,r),l},JG=Qi,e9=function(t,i,e){for(var r in i)e&&e.unsafe&&t[r]?t[r]=i[r]:JG(t,r,i[r],e);return t},t9=Kn,r9=lg,Pb=e9,n9=hn,i9=Ag,a9=uo,o9=Xn,s9=gg,Os=yg,u9=uO,ya=Ue,kb=ku.fastKey,DO=Zi,Ib=DO.set,qc=DO.getterFor,MO={getConstructor:function(t,i,e,r){var n=t(function(l,c){i9(l,a),Ib(l,{type:i,index:t9(null),first:void 0,last:void 0,size:0}),ya||(l.size=0),a9(c)||o9(c,l[r],{that:l,AS_ENTRIES:e})}),a=n.prototype,o=qc(i),s=function(l,c,h){var d=o(l),f=u(l,c),v,g;return f?f.value=h:(d.last=f={index:g=kb(c,!0),key:c,value:h,previous:v=d.last,next:void 0,removed:!1},d.first||(d.first=f),v&&(v.next=f),ya?d.size++:l.size++,g!=="F"&&(d.index[g]=f)),l},u=function(l,c){var h=o(l),d=kb(c),f;if(d!=="F")return h.index[d];for(f=h.first;f;f=f.next)if(f.key==c)return f};return Pb(a,{clear:function(){for(var c=this,h=o(c),d=h.index,f=h.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete d[f.index],f=f.next;h.first=h.last=void 0,ya?h.size=0:c.size=0},delete:function(l){var c=this,h=o(c),d=u(c,l);if(d){var f=d.next,v=d.previous;delete h.index[d.index],d.removed=!0,v&&(v.next=f),f&&(f.previous=v),h.first==d&&(h.first=f),h.last==d&&(h.last=v),ya?h.size--:c.size--}return!!d},forEach:function(c){for(var h=o(this),d=n9(c,arguments.length>1?arguments[1]:void 0),f;f=f?f.next:h.first;)for(d(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(c){return!!u(this,c)}}),Pb(a,e?{get:function(c){var h=u(this,c);return h&&h.value},set:function(c,h){return s(this,c===0?0:c,h)}}:{add:function(c){return s(this,c=c===0?0:c,c)}}),ya&&r9(a,"size",{configurable:!0,get:function(){return o(this).size}}),n},setStrong:function(t,i,e){var r=i+" Iterator",n=qc(i),a=qc(r);s9(t,i,function(o,s){Ib(this,{type:r,target:o,state:n(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,Os(void 0,!0)):s=="keys"?Os(u.key,!1):s=="values"?Os(u.value,!1):Os([u.key,u.value],!1)},e?"entries":"values",!e,!0),u9(i)}},l9=RO,c9=MO;l9("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},c9);var h9=ye,d9=h9.Map,f9=d9,v9=f9;(function(t){t.exports=v9})(fG);var NO=Q(jf),zf={},p9={get exports(){return zf},set exports(t){zf=t}},g9=U,y9=Ji.some,m9=Eo,$9=m9("some");g9({target:"Array",proto:!0,forced:!$9},{some:function(i){return y9(this,i,arguments.length>1?arguments[1]:void 0)}});var b9=He,w9=b9("Array").some,_9=Ee,E9=w9,Yc=Array.prototype,S9=function(t){var i=t.some;return t===Yc||_9(Yc,t)&&i===Yc.some?E9:i},O9=S9,T9=O9;(function(t){t.exports=T9})(p9);var x9=Q(zf),Hf={},P9={get exports(){return Hf},set exports(t){Hf=t}},k9=He,I9=k9("Array").keys,C9=I9,A9=C9,R9=Mr,D9=ze,M9=Ee,N9=A9,Xc=Array.prototype,F9={DOMTokenList:!0,NodeList:!0},B9=function(t){var i=t.keys;return t===Xc||M9(Xc,t)&&i===Xc.keys||D9(F9,R9(t))?N9:i};(function(t){t.exports=B9})(P9);var li=Q(Hf),Wf={},L9={get exports(){return Wf},set exports(t){Wf=t}},Cb=Q_,j9=Math.floor,Vf=function(t,i){var e=t.length,r=j9(e/2);return e<8?z9(t,i):H9(t,Vf(Cb(t,0,r),i),Vf(Cb(t,r),i),i)},z9=function(t,i){for(var e=t.length,r=1,n,a;r<e;){for(a=r,n=t[r];a&&i(t[a-1],n)>0;)t[a]=t[--a];a!==r++&&(t[a]=n)}return t},H9=function(t,i,e,r){for(var n=i.length,a=e.length,o=0,s=0;o<n||s<a;)t[o+s]=o<n&&s<a?r(i[o],e[s])<=0?i[o++]:e[s++]:o<n?i[o++]:e[s++];return t},W9=Vf,V9=cn,Ab=V9.match(/firefox\/(\d+)/i),U9=!!Ab&&+Ab[1],G9=cn,K9=/MSIE|Trident/.test(G9),q9=cn,Rb=q9.match(/AppleWebKit\/(\d+)\./),Y9=!!Rb&&+Rb[1],X9=U,FO=de,Q9=xt,Z9=Pt,Db=Dt,J9=hS,Mb=yr,jg=oe,e7=W9,t7=Eo,Nb=U9,r7=K9,Fb=Ki,Bb=Y9,qr=[],Lb=FO(qr.sort),n7=FO(qr.push),i7=jg(function(){qr.sort(void 0)}),a7=jg(function(){qr.sort(null)}),o7=t7("sort"),BO=!jg(function(){if(Fb)return Fb<70;if(!(Nb&&Nb>3)){if(r7)return!0;if(Bb)return Bb<603;var t="",i,e,r,n;for(i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)qr.push({k:e+n,v:r})}for(qr.sort(function(a,o){return o.v-a.v}),n=0;n<qr.length;n++)e=qr[n].k.charAt(0),t.charAt(t.length-1)!==e&&(t+=e);return t!=="DGBEFHACIJK"}}),s7=i7||!a7||!o7||!BO,u7=function(t){return function(i,e){return e===void 0?-1:i===void 0?1:t!==void 0?+t(i,e)||0:Mb(i)>Mb(e)?1:-1}};X9({target:"Array",proto:!0,forced:s7},{sort:function(i){i!==void 0&&Q9(i);var e=Z9(this);if(BO)return i===void 0?Lb(e):Lb(e,i);var r=[],n=Db(e),a,o;for(o=0;o<n;o++)o in e&&n7(r,e[o]);for(e7(r,u7(i)),a=Db(r),o=0;o<a;)e[o]=r[o++];for(;o<n;)J9(e,o++);return e}});var l7=He,c7=l7("Array").sort,h7=Ee,d7=c7,Qc=Array.prototype,f7=function(t){var i=t.sort;return t===Qc||h7(Qc,t)&&i===Qc.sort?d7:i},v7=f7,p7=v7;(function(t){t.exports=p7})(L9);var Uf=Q(Wf),Gf={},g7={get exports(){return Gf},set exports(t){Gf=t}},y7=He,m7=y7("Array").values,$7=m7,b7=$7,w7=Mr,_7=ze,E7=Ee,S7=b7,Zc=Array.prototype,O7={DOMTokenList:!0,NodeList:!0},T7=function(t){var i=t.values;return t===Zc||E7(Zc,t)&&i===Zc.values||_7(O7,w7(t))?S7:i};(function(t){t.exports=T7})(g7);var jb=Q(Gf),Kf={},x7={get exports(){return Kf},set exports(t){Kf=t}};(function(t){t.exports=FE})(x7);var Pi=Q(Kf),qf={},P7={get exports(){return qf},set exports(t){qf=t}},k7=He,I7=k7("Array").entries,C7=I7,A7=C7,R7=Mr,D7=ze,M7=Ee,N7=A7,Jc=Array.prototype,F7={DOMTokenList:!0,NodeList:!0},B7=function(t){var i=t.entries;return t===Jc||M7(Jc,t)&&i===Jc.entries||D7(F7,R7(t))?N7:i};(function(t){t.exports=B7})(P7);var L7=Q(qf);let Ts;const j7=new Uint8Array(16);function z7(){if(!Ts&&(Ts=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ts))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ts(j7)}const nt=[];for(let t=0;t<256;++t)nt.push((t+256).toString(16).slice(1));function H7(t,i=0){return(nt[t[i+0]]+nt[t[i+1]]+nt[t[i+2]]+nt[t[i+3]]+"-"+nt[t[i+4]]+nt[t[i+5]]+"-"+nt[t[i+6]]+nt[t[i+7]]+"-"+nt[t[i+8]]+nt[t[i+9]]+"-"+nt[t[i+10]]+nt[t[i+11]]+nt[t[i+12]]+nt[t[i+13]]+nt[t[i+14]]+nt[t[i+15]]).toLowerCase()}const W7=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var zb={randomUUID:W7};function V7(t,i,e){if(zb.randomUUID&&!i&&!t)return zb.randomUUID();t=t||{};const r=t.random||(t.rng||z7)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,i){e=e||0;for(let n=0;n<16;++n)i[e+n]=r[n];return i}return H7(r)}function Hb(t){return typeof t=="string"||typeof t=="number"}var U7=function(){function t(i){Uu(this,t),De(this,"delay",void 0),De(this,"max",void 0),De(this,"_queue",[]),De(this,"_timeout",null),De(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(i)}return sl(t,[{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,r=this._extended.methods,n=0;n<r.length;n++){var a=r[n];a.original?e[a.name]=a.original:delete e[a.name]}this._extended=null}}},{key:"replace",value:function(e,r){var n=this,a=e[r];if(!a)throw new Error("Method "+r+" undefined");e[r]=function(){for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];n.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=MH(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e,r;Nn(e=dS(r=this._queue).call(r,0)).call(e,function(n){n.fn.apply(n.context||n.fn,n.args||[])})}}],[{key:"extend",value:function(e,r){var n=new t(r);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=function(){n.flush()};var a=[{name:"flush",original:void 0}];if(r&&r.replace)for(var o=0;o<r.replace.length;o++){var s=r.replace[o];a.push({name:s,original:e[s]}),n.replace(e,s)}return n._extended={object:e,methods:a},n}}]),t}(),G7=function(){function t(){Uu(this,t),De(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),De(this,"subscribe",t.prototype.on),De(this,"unsubscribe",t.prototype.off)}return sl(t,[{key:"_trigger",value:function(e,r,n){var a,o;if(e==="*")throw new Error("Cannot trigger event *");Nn(a=cl(o=[]).call(o,_t(this._subscribers[e]),_t(this._subscribers["*"]))).call(a,function(s){s(e,r,n??null)})}},{key:"on",value:function(e,r){typeof r=="function"&&this._subscribers[e].push(r)}},{key:"off",value:function(e,r){var n;this._subscribers[e]=mi(n=this._subscribers[e]).call(n,function(a){return a!==r})}}]),t}(),Yf={},K7={get exports(){return Yf},set exports(t){Yf=t}},q7=RO,Y7=MO;q7("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Y7);var X7=ye,Q7=X7.Set,Z7=Q7,J7=Z7;(function(t){t.exports=J7})(K7);var eh=Q(Yf),Xf={},eK={get exports(){return Xf},set exports(t){Xf=t}},Qf={},tK={get exports(){return Qf},set exports(t){Qf=t}},rK=$g,nK=rK,iK=nK,aK=iK,oK=aK,sK=oK,uK=sK,lK=uK;(function(t){t.exports=lK})(tK);(function(t){t.exports=Qf})(eK);var th=Q(Xf),LO;function sr(t,i){var e=typeof ll<"u"&&Oo(t)||t["@@iterator"];if(!e){if(It(t)||(e=cK(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:n}}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(t)},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 cK(t,i){var e;if(t){if(typeof t=="string")return Wb(t,i);var r=hl(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return bg(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Wb(t,i)}}function Wb(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}LO=Pi;var Vb=function(){function t(i){Uu(this,t),De(this,"_pairs",void 0),this._pairs=i}return sl(t,[{key:LO,value:mt.mark(function i(){var e,r,n,a,o;return mt.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:e=sr(this._pairs),u.prev=1,e.s();case 3:if((r=e.n()).done){u.next=9;break}return n=yt(r.value,2),a=n[0],o=n[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()}},i,this,[[1,11,14,17]])})},{key:"entries",value:mt.mark(function i(){var e,r,n,a,o;return mt.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:e=sr(this._pairs),u.prev=1,e.s();case 3:if((r=e.n()).done){u.next=9;break}return n=yt(r.value,2),a=n[0],o=n[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()}},i,this,[[1,11,14,17]])})},{key:"keys",value:mt.mark(function i(){var e,r,n,a;return mt.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=sr(this._pairs),s.prev=1,e.s();case 3:if((r=e.n()).done){s.next=9;break}return n=yt(r.value,1),a=n[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()}},i,this,[[1,11,14,17]])})},{key:"values",value:mt.mark(function i(){var e,r,n,a;return mt.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=sr(this._pairs),s.prev=1,e.s();case 3:if((r=e.n()).done){s.next=9;break}return n=yt(r.value,2),a=n[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()}},i,this,[[1,11,14,17]])})},{key:"toIdArray",value:function(){var e;return qt(e=_t(this._pairs)).call(e,function(r){return r[0]})}},{key:"toItemArray",value:function(){var e;return qt(e=_t(this._pairs)).call(e,function(r){return r[1]})}},{key:"toEntryArray",value:function(){return _t(this._pairs)}},{key:"toObjectMap",value:function(){var e=hH(null),r=sr(this._pairs),n;try{for(r.s();!(n=r.n()).done;){var a=yt(n.value,2),o=a[0],s=a[1];e[o]=s}}catch(u){r.e(u)}finally{r.f()}return e}},{key:"toMap",value:function(){return new NO(this._pairs)}},{key:"toIdSet",value:function(){return new eh(this.toIdArray())}},{key:"toItemSet",value:function(){return new eh(this.toItemArray())}},{key:"cache",value:function(){return new t(_t(this._pairs))}},{key:"distinct",value:function(e){var r=new eh,n=sr(this._pairs),a;try{for(n.s();!(a=n.n()).done;){var o=yt(a.value,2),s=o[0],u=o[1];r.add(e(u,s))}}catch(l){n.e(l)}finally{n.f()}return r}},{key:"filter",value:function(e){var r=this._pairs;return new t(De({},Pi,mt.mark(function n(){var a,o,s,u,l;return mt.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:a=sr(r),h.prev=1,a.s();case 3:if((o=a.n()).done){h.next=10;break}if(s=yt(o.value,2),u=s[0],l=s[1],!e(l,u)){h.next=8;break}return h.next=8,[u,l];case 8:h.next=3;break;case 10:h.next=15;break;case 12:h.prev=12,h.t0=h.catch(1),a.e(h.t0);case 15:return h.prev=15,a.f(),h.finish(15);case 18:case"end":return h.stop()}},n,null,[[1,12,15,18]])})))}},{key:"forEach",value:function(e){var r=sr(this._pairs),n;try{for(r.s();!(n=r.n()).done;){var a=yt(n.value,2),o=a[0],s=a[1];e(s,o)}}catch(u){r.e(u)}finally{r.f()}}},{key:"map",value:function(e){var r=this._pairs;return new t(De({},Pi,mt.mark(function n(){var a,o,s,u,l;return mt.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:a=sr(r),h.prev=1,a.s();case 3:if((o=a.n()).done){h.next=9;break}return s=yt(o.value,2),u=s[0],l=s[1],h.next=7,[u,e(l,u)];case 7:h.next=3;break;case 9:h.next=14;break;case 11:h.prev=11,h.t0=h.catch(1),a.e(h.t0);case 14:return h.prev=14,a.f(),h.finish(14);case 17:case"end":return h.stop()}},n,null,[[1,11,14,17]])})))}},{key:"max",value:function(e){var r=th(this._pairs),n=r.next();if(n.done)return null;for(var a=n.value[1],o=e(n.value[1],n.value[0]);!(n=r.next()).done;){var s=yt(n.value,2),u=s[0],l=s[1],c=e(l,u);c>o&&(o=c,a=l)}return a}},{key:"min",value:function(e){var r=th(this._pairs),n=r.next();if(n.done)return null;for(var a=n.value[1],o=e(n.value[1],n.value[0]);!(n=r.next()).done;){var s=yt(n.value,2),u=s[0],l=s[1],c=e(l,u);c<o&&(o=c,a=l)}return a}},{key:"reduce",value:function(e,r){var n=sr(this._pairs),a;try{for(n.s();!(a=n.n()).done;){var o=yt(a.value,2),s=o[0],u=o[1];r=e(r,u,s)}}catch(l){n.e(l)}finally{n.f()}return r}},{key:"sort",value:function(e){var r=this;return new t(De({},Pi,function(){var n;return th(Uf(n=_t(r._pairs)).call(n,function(a,o){var s=yt(a,2),u=s[0],l=s[1],c=yt(o,2),h=c[0],d=c[1];return e(l,d,u,h)}))}))}}]),t}();function Ub(t,i){var e=_g(t);if(i$){var r=i$(t);i&&(r=mi(r).call(r,function(n){return eS(t,n).enumerable})),e.push.apply(e,r)}return e}function Gb(t){for(var i=1;i<arguments.length;i++){var e,r,n=arguments[i]!=null?arguments[i]:{};i%2?Nn(e=Ub(Object(n),!0)).call(e,function(a){De(t,a,n[a])}):a$?gj(t,a$(n)):Nn(r=Ub(Object(n))).call(r,function(a){mj(t,a,eS(n,a))})}return t}function rh(t,i){var e=typeof ll<"u"&&Oo(t)||t["@@iterator"];if(!e){if(It(t)||(e=hK(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:n}}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(t)},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 hK(t,i){var e;if(t){if(typeof t=="string")return Kb(t,i);var r=hl(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return bg(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Kb(t,i)}}function Kb(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}function dK(t){var i=fK();return function(){var r=Ou(t),n;if(i){var a=Ou(this).constructor;n=Xs(r,arguments,a)}else n=r.apply(this,arguments);return I6(this,n)}}function fK(){if(typeof Reflect>"u"||!Xs||Xs.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Xs(Boolean,[],function(){})),!0}catch{return!1}}function vK(t,i){return t[i]==null&&(t[i]=V7()),t}var Iu=function(t){k6(e,t);var i=dK(e);function e(r,n){var a;return Uu(this,e),a=i.call(this),De(bn(a),"flush",void 0),De(bn(a),"length",void 0),De(bn(a),"_options",void 0),De(bn(a),"_data",void 0),De(bn(a),"_idProp",void 0),De(bn(a),"_queue",null),r&&!It(r)&&(n=r,r=[]),a._options=n||{},a._data=new NO,a.length=0,a._idProp=a._options.fieldId||"id",r&&r.length&&a.add(r),a.setOptions(n),a}return sl(e,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(n){n&&n.queue!==void 0&&(n.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=U7.extend(this,{replace:["add","update","remove"]})),n.queue&&ot(n.queue)==="object"&&this._queue.setOptions(n.queue)))}},{key:"add",value:function(n,a){var o=this,s=[],u;if(It(n)){var l=qt(n).call(n,function(d){return d[o._idProp]});if(x9(l).call(l,function(d){return o._data.has(d)}))throw new Error("A duplicate id was found in the parameter array.");for(var c=0,h=n.length;c<h;c++)u=this._addItem(n[c]),s.push(u)}else if(n&&ot(n)==="object")u=this._addItem(n),s.push(u);else throw new Error("Unknown dataType");return s.length&&this._trigger("add",{items:s},a),s}},{key:"update",value:function(n,a){var o=this,s=[],u=[],l=[],c=[],h=this._idProp,d=function(p){var $=p[h];if($!=null&&o._data.has($)){var y=p,m=h5({},o._data.get($)),_=o._updateItem(y);u.push(_),c.push(y),l.push(m)}else{var S=o._addItem(p);s.push(S)}};if(It(n))for(var f=0,v=n.length;f<v;f++)n[f]&&ot(n[f])==="object"?d(n[f]):console.warn("Ignoring input item, which is not an object at index "+f);else if(n&&ot(n)==="object")d(n);else throw new Error("Unknown dataType");if(s.length&&this._trigger("add",{items:s},a),u.length){var g={items:u,oldData:l,data:c};this._trigger("update",g,a)}return cl(s).call(s,u)}},{key:"updateOnly",value:function(n,a){var o,s=this;It(n)||(n=[n]);var u=qt(o=qt(n).call(n,function(c){var h=s._data.get(c[s._idProp]);if(h==null)throw new Error("Updating non-existent items is not allowed.");return{oldData:h,update:c}})).call(o,function(c){var h=c.oldData,d=c.update,f=h[s._idProp],v=LW(h,d);return s._data.set(f,v),{id:f,oldData:h,updatedData:v}});if(u.length){var l={items:qt(u).call(u,function(c){return c.id}),oldData:qt(u).call(u,function(c){return c.oldData}),data:qt(u).call(u,function(c){return c.updatedData})};return this._trigger("update",l,a),l.items}else return[]}},{key:"get",value:function(n,a){var o=void 0,s=void 0,u=void 0;Hb(n)?(o=n,u=a):It(n)?(s=n,u=a):u=n;var l=u&&u.returnType==="Object"?"Object":"Array",c=u&&mi(u),h=[],d=void 0,f=void 0,v=void 0;if(o!=null)d=this._data.get(o),d&&c&&!c(d)&&(d=void 0);else if(s!=null)for(var g=0,b=s.length;g<b;g++)d=this._data.get(s[g]),d!=null&&(!c||c(d))&&h.push(d);else{var p;f=_t(li(p=this._data).call(p));for(var $=0,y=f.length;$<y;$++)v=f[$],d=this._data.get(v),d!=null&&(!c||c(d))&&h.push(d)}if(u&&u.order&&o==null&&this._sort(h,u.order),u&&u.fields){var m=u.fields;if(o!=null&&d!=null)d=this._filterFields(d,m);else for(var _=0,S=h.length;_<S;_++)h[_]=this._filterFields(h[_],m)}if(l=="Object"){for(var T={},O=0,w=h.length;O<w;O++){var E=h[O],A=E[this._idProp];T[A]=E}return T}else if(o!=null){var H;return(H=d)!==null&&H!==void 0?H:null}else return h}},{key:"getIds",value:function(n){var a=this._data,o=n&&mi(n),s=n&&n.order,u=_t(li(a).call(a)),l=[];if(o)if(s){for(var c=[],h=0,d=u.length;h<d;h++){var f=u[h],v=this._data.get(f);v!=null&&o(v)&&c.push(v)}this._sort(c,s);for(var g=0,b=c.length;g<b;g++)l.push(c[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 _=[],S=0,T=u.length;S<T;S++){var O=u[S];_.push(a.get(O))}this._sort(_,s);for(var w=0,E=_.length;w<E;w++)l.push(_[w][this._idProp])}else for(var A=0,H=u.length;A<H;A++){var B=u[A],X=a.get(B);X!=null&&l.push(X[this._idProp])}return l}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(n,a){var o=a&&mi(a),s=this._data,u=_t(li(s).call(s));if(a&&a.order)for(var l=this.get(a),c=0,h=l.length;c<h;c++){var d=l[c],f=d[this._idProp];n(d,f)}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))&&n(p,b)}}},{key:"map",value:function(n,a){for(var o=a&&mi(a),s=[],u=this._data,l=_t(li(u).call(u)),c=0,h=l.length;c<h;c++){var d=l[c],f=this._data.get(d);f!=null&&(!o||o(f))&&s.push(n(f,d))}return a&&a.order&&this._sort(s,a.order),s}},{key:"_filterFields",value:function(n,a){var o;return n&&VF(o=It(a)?a:_g(a)).call(o,function(s,u){return s[u]=n[u],s},{})}},{key:"_sort",value:function(n,a){if(typeof a=="string"){var o=a;Uf(n).call(n,function(s,u){var l=s[o],c=u[o];return l>c?1:l<c?-1:0})}else if(typeof a=="function")Uf(n).call(n,a);else throw new TypeError("Order must be a function or a string")}},{key:"remove",value:function(n,a){for(var o=[],s=[],u=It(n)?n:[n],l=0,c=u.length;l<c;l++){var h=this._remove(u[l]);if(h){var d=h[this._idProp];d!=null&&(o.push(d),s.push(h))}}return o.length&&this._trigger("remove",{items:o,oldData:s},a),o}},{key:"_remove",value:function(n){var a;if(Hb(n)?a=n:n&&ot(n)==="object"&&(a=n[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(n){for(var a,o=_t(li(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},n),o}},{key:"max",value:function(n){var a,o=null,s=null,u=rh(jb(a=this._data).call(a)),l;try{for(u.s();!(l=u.n()).done;){var c=l.value,h=c[n];typeof h=="number"&&(s==null||h>s)&&(o=c,s=h)}}catch(d){u.e(d)}finally{u.f()}return o||null}},{key:"min",value:function(n){var a,o=null,s=null,u=rh(jb(a=this._data).call(a)),l;try{for(u.s();!(l=u.n()).done;){var c=l.value,h=c[n];typeof h=="number"&&(s==null||h<s)&&(o=c,s=h)}}catch(d){u.e(d)}finally{u.f()}return o||null}},{key:"distinct",value:function(n){for(var a=this._data,o=_t(li(a).call(a)),s=[],u=0,l=0,c=o.length;l<c;l++){for(var h=o[l],d=a.get(h),f=d[n],v=!1,g=0;g<u;g++)if(s[g]==f){v=!0;break}!v&&f!==void 0&&(s[u]=f,u++)}return s}},{key:"_addItem",value:function(n){var a=vK(n,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(n){var a=n[this._idProp];if(a==null)throw new Error("Cannot update item: item has no id (item: "+yH(n)+")");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,Gb(Gb({},o),n)),a}},{key:"stream",value:function(n){if(n){var a=this._data;return new Vb(De({},Pi,mt.mark(function s(){var u,l,c,h;return mt.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:u=rh(n),f.prev=1,u.s();case 3:if((l=u.n()).done){f.next=11;break}if(c=l.value,h=a.get(c),h==null){f.next=9;break}return f.next=9,[c,h];case 9:f.next=3;break;case 11:f.next=16;break;case 13:f.prev=13,f.t0=f.catch(1),u.e(f.t0);case 16:return f.prev=16,u.f(),f.finish(16);case 19:case"end":return f.stop()}},s,null,[[1,13,16,19]])})))}else{var o;return new Vb(De({},Pi,WE(o=L7(this._data)).call(o,this._data)))}}}]),e}(G7);function pK(t,i){return ot(i)==="object"&&i!==null&&t===i.idProp&&typeof i.add=="function"&&typeof i.clear=="function"&&typeof i.distinct=="function"&&typeof Nn(i)=="function"&&typeof i.get=="function"&&typeof i.getDataSet=="function"&&typeof i.getIds=="function"&&typeof i.length=="number"&&typeof qt(i)=="function"&&typeof i.max=="function"&&typeof i.min=="function"&&typeof i.off=="function"&&typeof i.on=="function"&&typeof i.remove=="function"&&typeof i.setOptions=="function"&&typeof i.stream=="function"&&typeof i.update=="function"&&typeof i.updateOnly=="function"}function jO(t,i){return ot(i)==="object"&&i!==null&&t===i.idProp&&typeof Nn(i)=="function"&&typeof i.get=="function"&&typeof i.getDataSet=="function"&&typeof i.getIds=="function"&&typeof i.length=="number"&&typeof qt(i)=="function"&&typeof i.off=="function"&&typeof i.on=="function"&&typeof i.stream=="function"&&pK(t,i.getDataSet())}/**
|
|
39
|
+
* vis-network
|
|
40
|
+
* https://visjs.github.io/vis-network/
|
|
41
|
+
*
|
|
42
|
+
* A dynamic, browser-based visualization library.
|
|
43
|
+
*
|
|
44
|
+
* @version 9.1.6
|
|
45
|
+
* @date 2023-03-23T21:31:19.223Z
|
|
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 Zf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function V(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Jf={},gK={get exports(){return Jf},set exports(t){Jf=t}},xs=function(t){return t&&t.Math==Math&&t},We=xs(typeof globalThis=="object"&&globalThis)||xs(typeof window=="object"&&window)||xs(typeof self=="object"&&self)||xs(typeof Zf=="object"&&Zf)||function(){return this}()||Function("return this")(),se=function(t){try{return!!t()}catch{return!0}},yK=se,Ro=!yK(function(){var t=function(){}.bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),mK=Ro,zO=Function.prototype,qb=zO.apply,Yb=zO.call,Do=typeof Reflect=="object"&&Reflect.apply||(mK?Yb.bind(qb):function(){return Yb.apply(qb,arguments)}),HO=Ro,WO=Function.prototype,ev=WO.call,$K=HO&&WO.bind.bind(ev,ev),ue=HO?$K:function(t){return function(){return ev.apply(t,arguments)}},VO=ue,bK=VO({}.toString),wK=VO("".slice),Fr=function(t){return wK(bK(t),8,-1)},_K=Fr,EK=ue,zg=function(t){if(_K(t)==="Function")return EK(t)},tv=typeof document=="object"&&document.all,SK=typeof tv>"u"&&tv!==void 0,UO={all:tv,IS_HTMLDDA:SK},GO=UO,OK=GO.all,Ze=GO.IS_HTMLDDA?function(t){return typeof t=="function"||t===OK}:function(t){return typeof t=="function"},ia={},TK=se,Ge=!TK(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),xK=Ro,Ps=Function.prototype.call,Mt=xK?Ps.bind(Ps):function(){return Ps.apply(Ps,arguments)},Mo={},KO={}.propertyIsEnumerable,qO=Object.getOwnPropertyDescriptor,PK=qO&&!KO.call({1:2},1);Mo.f=PK?function(i){var e=qO(this,i);return!!e&&e.enumerable}:KO;var No=function(t,i){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:i}},kK=ue,IK=se,CK=Fr,nh=Object,AK=kK("".split),gl=IK(function(){return!nh("z").propertyIsEnumerable(0)})?function(t){return CK(t)=="String"?AK(t,""):nh(t)}:nh,Fo=function(t){return t==null},RK=Fo,DK=TypeError,Bo=function(t){if(RK(t))throw DK("Can't call method on "+t);return t},MK=gl,NK=Bo,nr=function(t){return MK(NK(t))},Xb=Ze,YO=UO,FK=YO.all,Je=YO.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:Xb(t)||t===FK}:function(t){return typeof t=="object"?t!==null:Xb(t)},ie={},ih=ie,ah=We,BK=Ze,Qb=function(t){return BK(t)?t:void 0},Vt=function(t,i){return arguments.length<2?Qb(ih[t])||Qb(ah[t]):ih[t]&&ih[t][i]||ah[t]&&ah[t][i]},LK=ue,Ne=LK({}.isPrototypeOf),Lo=typeof navigator<"u"&&String(navigator.userAgent)||"",XO=We,oh=Lo,Zb=XO.process,Jb=XO.Deno,e1=Zb&&Zb.versions||Jb&&Jb.version,t1=e1&&e1.v8,Yt,Cu;t1&&(Yt=t1.split("."),Cu=Yt[0]>0&&Yt[0]<4?1:+(Yt[0]+Yt[1]));!Cu&&oh&&(Yt=oh.match(/Edge\/(\d+)/),(!Yt||Yt[1]>=74)&&(Yt=oh.match(/Chrome\/(\d+)/),Yt&&(Cu=+Yt[1])));var jo=Cu,r1=jo,jK=se,aa=!!Object.getOwnPropertySymbols&&!jK(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r1&&r1<41}),zK=aa,QO=zK&&!Symbol.sham&&typeof Symbol.iterator=="symbol",HK=Vt,WK=Ze,VK=Ne,UK=QO,GK=Object,zo=UK?function(t){return typeof t=="symbol"}:function(t){var i=HK("Symbol");return WK(i)&&VK(i.prototype,GK(t))},KK=String,oa=function(t){try{return KK(t)}catch{return"Object"}},qK=Ze,YK=oa,XK=TypeError,Qn=function(t){if(qK(t))return t;throw XK(YK(t)+" is not a function")},QK=Qn,ZK=Fo,Hg=function(t,i){var e=t[i];return ZK(e)?void 0:QK(e)},sh=Mt,uh=Ze,lh=Je,JK=TypeError,eq=function(t,i){var e,r;if(i==="string"&&uh(e=t.toString)&&!lh(r=sh(e,t))||uh(e=t.valueOf)&&!lh(r=sh(e,t))||i!=="string"&&uh(e=t.toString)&&!lh(r=sh(e,t)))return r;throw JK("Can't convert object to primitive value")},on={},tq={get exports(){return on},set exports(t){on=t}},n1=We,rq=Object.defineProperty,nq=function(t,i){try{rq(n1,t,{value:i,configurable:!0,writable:!0})}catch{n1[t]=i}return i},iq=We,aq=nq,i1="__core-js_shared__",oq=iq[i1]||aq(i1,{}),Wg=oq,a1=Wg;(tq.exports=function(t,i){return a1[t]||(a1[t]=i!==void 0?i:{})})("versions",[]).push({version:"3.29.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"});var sq=Bo,uq=Object,Nt=function(t){return uq(sq(t))},lq=ue,cq=Nt,hq=lq({}.hasOwnProperty),et=Object.hasOwn||function(i,e){return hq(cq(i),e)},dq=ue,fq=0,vq=Math.random(),pq=dq(1 .toString),yl=function(t){return"Symbol("+(t===void 0?"":t)+")_"+pq(++fq+vq,36)},gq=We,yq=on,o1=et,mq=yl,$q=aa,bq=QO,Ei=gq.Symbol,ch=yq("wks"),wq=bq?Ei.for||Ei:Ei&&Ei.withoutSetter||mq,Fe=function(t){return o1(ch,t)||(ch[t]=$q&&o1(Ei,t)?Ei[t]:wq("Symbol."+t)),ch[t]},_q=Mt,s1=Je,u1=zo,Eq=Hg,Sq=eq,Oq=Fe,Tq=TypeError,xq=Oq("toPrimitive"),Pq=function(t,i){if(!s1(t)||u1(t))return t;var e=Eq(t,xq),r;if(e){if(i===void 0&&(i="default"),r=_q(e,t,i),!s1(r)||u1(r))return r;throw Tq("Can't convert object to primitive value")}return i===void 0&&(i="number"),Sq(t,i)},kq=Pq,Iq=zo,ml=function(t){var i=kq(t,"string");return Iq(i)?i:i+""},Cq=We,l1=Je,rv=Cq.document,Aq=l1(rv)&&l1(rv.createElement),ZO=function(t){return Aq?rv.createElement(t):{}},Rq=Ge,Dq=se,Mq=ZO,JO=!Rq&&!Dq(function(){return Object.defineProperty(Mq("div"),"a",{get:function(){return 7}}).a!=7}),Nq=Ge,Fq=Mt,Bq=Mo,Lq=No,jq=nr,zq=ml,Hq=et,Wq=JO,c1=Object.getOwnPropertyDescriptor;ia.f=Nq?c1:function(i,e){if(i=jq(i),e=zq(e),Wq)try{return c1(i,e)}catch{}if(Hq(i,e))return Lq(!Fq(Bq.f,i,e),i[e])};var Vq=se,Uq=Ze,Gq=/#|\.prototype\./,Ho=function(t,i){var e=qq[Kq(t)];return e==Xq?!0:e==Yq?!1:Uq(i)?Vq(i):!!i},Kq=Ho.normalize=function(t){return String(t).replace(Gq,".").toLowerCase()},qq=Ho.data={},Yq=Ho.NATIVE="N",Xq=Ho.POLYFILL="P",Qq=Ho,h1=zg,Zq=Qn,Jq=Ro,eY=h1(h1.bind),Wo=function(t,i){return Zq(t),i===void 0?t:Jq?eY(t,i):function(){return t.apply(i,arguments)}},Ut={},tY=Ge,rY=se,eT=tY&&rY(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),nY=Je,iY=String,aY=TypeError,Ft=function(t){if(nY(t))return t;throw aY(iY(t)+" is not an object")},oY=Ge,sY=JO,uY=eT,ks=Ft,d1=ml,lY=TypeError,hh=Object.defineProperty,cY=Object.getOwnPropertyDescriptor,dh="enumerable",fh="configurable",vh="writable";Ut.f=oY?uY?function(i,e,r){if(ks(i),e=d1(e),ks(r),typeof i=="function"&&e==="prototype"&&"value"in r&&vh in r&&!r[vh]){var n=cY(i,e);n&&n[vh]&&(i[e]=r.value,r={configurable:fh in r?r[fh]:n[fh],enumerable:dh in r?r[dh]:n[dh],writable:!1})}return hh(i,e,r)}:hh:function(i,e,r){if(ks(i),e=d1(e),ks(r),sY)try{return hh(i,e,r)}catch{}if("get"in r||"set"in r)throw lY("Accessors not supported");return"value"in r&&(i[e]=r.value),i};var hY=Ge,dY=Ut,fY=No,sa=hY?function(t,i,e){return dY.f(t,i,fY(1,e))}:function(t,i,e){return t[i]=e,t},Is=We,vY=Do,pY=zg,gY=Ze,yY=ia.f,mY=Qq,ci=ie,$Y=Wo,hi=sa,f1=et,bY=function(t){var i=function(e,r,n){if(this instanceof i){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return vY(t,this,arguments)};return i.prototype=t.prototype,i},q=function(t,i){var e=t.target,r=t.global,n=t.stat,a=t.proto,o=r?Is:n?Is[e]:(Is[e]||{}).prototype,s=r?ci:ci[e]||hi(ci,e,{})[e],u=s.prototype,l,c,h,d,f,v,g,b,p;for(d in i)l=mY(r?d:e+(n?".":"#")+d,t.forced),c=!l&&o&&f1(o,d),v=s[d],c&&(t.dontCallGetSet?(p=yY(o,d),g=p&&p.value):g=o[d]),f=c&&g?g:i[d],!(c&&typeof v==typeof f)&&(t.bind&&c?b=$Y(f,Is):t.wrap&&c?b=bY(f):a&&gY(f)?b=pY(f):b=f,(t.sham||f&&f.sham||v&&v.sham)&&hi(b,"sham",!0),hi(s,d,b),a&&(h=e+"Prototype",f1(ci,h)||hi(ci,h,{}),hi(ci[h],d,f),t.real&&u&&(l||!u[d])&&hi(u,d,f)))},wY=Math.ceil,_Y=Math.floor,EY=Math.trunc||function(i){var e=+i;return(e>0?_Y:wY)(e)},SY=EY,$l=function(t){var i=+t;return i!==i||i===0?0:SY(i)},OY=$l,TY=Math.max,xY=Math.min,Vo=function(t,i){var e=OY(t);return e<0?TY(e+i,0):xY(e,i)},PY=$l,kY=Math.min,IY=function(t){return t>0?kY(PY(t),9007199254740991):0},CY=IY,ir=function(t){return CY(t.length)},AY=nr,RY=Vo,DY=ir,v1=function(t){return function(i,e,r){var n=AY(i),a=DY(n),o=RY(r,a),s;if(t&&e!=e){for(;a>o;)if(s=n[o++],s!=s)return!0}else for(;a>o;o++)if((t||o in n)&&n[o]===e)return t||o||0;return!t&&-1}},Vg={includes:v1(!0),indexOf:v1(!1)},Uo={},MY=ue,ph=et,NY=nr,FY=Vg.indexOf,BY=Uo,p1=MY([].push),tT=function(t,i){var e=NY(t),r=0,n=[],a;for(a in e)!ph(BY,a)&&ph(e,a)&&p1(n,a);for(;i.length>r;)ph(e,a=i[r++])&&(~FY(n,a)||p1(n,a));return n},Ug=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],LY=tT,jY=Ug,Go=Object.keys||function(i){return LY(i,jY)},Ko={};Ko.f=Object.getOwnPropertySymbols;var g1=Ge,zY=ue,HY=Mt,WY=se,gh=Go,VY=Ko,UY=Mo,GY=Nt,KY=gl,di=Object.assign,y1=Object.defineProperty,qY=zY([].concat),YY=!di||WY(function(){if(g1&&di({b:1},di(y1({},"a",{enumerable:!0,get:function(){y1(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},i={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach(function(n){i[n]=n}),di({},t)[e]!=7||gh(di({},i)).join("")!=r})?function(i,e){for(var r=GY(i),n=arguments.length,a=1,o=VY.f,s=UY.f;n>a;)for(var u=KY(arguments[a++]),l=o?qY(gh(u),o(u)):gh(u),c=l.length,h=0,d;c>h;)d=l[h++],(!g1||HY(s,u,d))&&(r[d]=u[d]);return r}:di,XY=q,m1=YY;XY({target:"Object",stat:!0,arity:2,forced:Object.assign!==m1},{assign:m1});var QY=ie,ZY=QY.Object.assign,JY=ZY,eX=JY;(function(t){t.exports=eX})(gK);var Le=V(Jf),nv={},tX={get exports(){return nv},set exports(t){nv=t}},rX=ue,bl=rX([].slice),rT=ue,nX=Qn,iX=Je,aX=et,$1=bl,oX=Ro,nT=Function,sX=rT([].concat),uX=rT([].join),yh={},lX=function(t,i,e){if(!aX(yh,i)){for(var r=[],n=0;n<i;n++)r[n]="a["+n+"]";yh[i]=nT("C,a","return new C("+uX(r,",")+")")}return yh[i](t,e)},iT=oX?nT.bind:function(i){var e=nX(this),r=e.prototype,n=$1(arguments,1),a=function(){var s=sX(n,$1(arguments));return this instanceof a?lX(e,s.length,s):e.apply(i,s)};return iX(r)&&(a.prototype=r),a},cX=q,b1=iT;cX({target:"Function",proto:!0,forced:Function.bind!==b1},{bind:b1});var hX=ie,tt=function(t){return hX[t+"Prototype"]},dX=tt,fX=dX("Function").bind,vX=Ne,pX=fX,mh=Function.prototype,gX=function(t){var i=t.bind;return t===mh||vX(mh,t)&&i===mh.bind?pX:i},yX=gX,aT=yX;(function(t){t.exports=aT})(tX);var C=V(nv);function Gg(t,i,e,r){t.beginPath(),t.arc(i,e,r,0,2*Math.PI,!1),t.closePath()}function mX(t,i,e,r){t.beginPath(),t.rect(i-r,e-r,r*2,r*2),t.closePath()}function $X(t,i,e,r){t.beginPath(),r*=1.15,e+=.275*r;var n=r*2,a=n/2,o=Math.sqrt(3)/6*n,s=Math.sqrt(n*n-a*a);t.moveTo(i,e-(s-o)),t.lineTo(i+a,e+o),t.lineTo(i-a,e+o),t.lineTo(i,e-(s-o)),t.closePath()}function bX(t,i,e,r){t.beginPath(),r*=1.15,e-=.275*r;var n=r*2,a=n/2,o=Math.sqrt(3)/6*n,s=Math.sqrt(n*n-a*a);t.moveTo(i,e+(s-o)),t.lineTo(i+a,e-o),t.lineTo(i-a,e-o),t.lineTo(i,e+(s-o)),t.closePath()}function wX(t,i,e,r){t.beginPath(),r*=.82,e+=.1*r;for(var n=0;n<10;n++){var a=n%2===0?r*1.3:r*.5;t.lineTo(i+a*Math.sin(n*2*Math.PI/10),e-a*Math.cos(n*2*Math.PI/10))}t.closePath()}function _X(t,i,e,r){t.beginPath(),t.lineTo(i,e+r),t.lineTo(i+r,e),t.lineTo(i,e-r),t.lineTo(i-r,e),t.closePath()}function oT(t,i,e,r,n,a){var o=Math.PI/180;r-2*a<0&&(a=r/2),n-2*a<0&&(a=n/2),t.beginPath(),t.moveTo(i+a,e),t.lineTo(i+r-a,e),t.arc(i+r-a,e+a,a,o*270,o*360,!1),t.lineTo(i+r,e+n-a),t.arc(i+r-a,e+n-a,a,0,o*90,!1),t.lineTo(i+a,e+n),t.arc(i+a,e+n-a,a,o*90,o*180,!1),t.lineTo(i,e+a),t.arc(i+a,e+a,a,o*180,o*270,!1),t.closePath()}function iv(t,i,e,r,n){var a=.5522848,o=r/2*a,s=n/2*a,u=i+r,l=e+n,c=i+r/2,h=e+n/2;t.beginPath(),t.moveTo(i,h),t.bezierCurveTo(i,h-s,c-o,e,c,e),t.bezierCurveTo(c+o,e,u,h-s,u,h),t.bezierCurveTo(u,h+s,c+o,l,c,l),t.bezierCurveTo(c-o,l,i,h+s,i,h),t.closePath()}function sT(t,i,e,r,n){var a=.3333333333333333,o=r,s=n*a,u=.5522848,l=o/2*u,c=s/2*u,h=i+o,d=e+s,f=i+o/2,v=e+s/2,g=e+(n-s/2),b=e+n;t.beginPath(),t.moveTo(h,v),t.bezierCurveTo(h,v+c,f+l,d,f,d),t.bezierCurveTo(f-l,d,i,v+c,i,v),t.bezierCurveTo(i,v-c,f-l,e,f,e),t.bezierCurveTo(f+l,e,h,v-c,h,v),t.lineTo(h,g),t.bezierCurveTo(h,g+c,f+l,b,f,b),t.bezierCurveTo(f-l,b,i,g+c,i,g),t.lineTo(i,v)}function uT(t,i,e,r,n,a){t.beginPath(),t.moveTo(i,e);for(var o=a.length,s=r-i,u=n-e,l=u/s,c=Math.sqrt(s*s+u*u),h=0,d=!0,f=0,v=+a[0];c>=.1;)v=+a[h++%o],v>c&&(v=c),f=Math.sqrt(v*v/(1+l*l)),f=s<0?-f:f,i+=f,e+=l*f,d===!0?t.lineTo(i,e):t.moveTo(i,e),c-=v,d=!d}function EX(t,i,e,r){t.beginPath();var n=6,a=Math.PI*2/n;t.moveTo(i+r,e);for(var o=1;o<n;o++)t.lineTo(i+r*Math.cos(a*o),e+r*Math.sin(a*o));t.closePath()}var w1={circle:Gg,dashedLine:uT,database:sT,diamond:_X,ellipse:iv,ellipse_vis:iv,hexagon:EX,roundRect:oT,square:mX,star:wX,triangle:$X,triangleDown:bX};function SX(t){return Object.prototype.hasOwnProperty.call(w1,t)?w1[t]:function(i){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];CanvasRenderingContext2D.prototype[t].call(i,r)}}var av={},OX={get exports(){return av},set exports(t){av=t}};(function(t){t.exports=i;function i(r){if(r)return e(r)}function e(r){for(var n in i.prototype)r[n]=i.prototype[n];return r}i.prototype.on=i.prototype.addEventListener=function(r,n){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(n),this},i.prototype.once=function(r,n){function a(){this.off(r,a),n.apply(this,arguments)}return a.fn=n,this.on(r,a),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(r,n){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var a=this._callbacks["$"+r];if(!a)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var o,s=0;s<a.length;s++)if(o=a[s],o===n||o.fn===n){a.splice(s,1);break}return a.length===0&&delete this._callbacks["$"+r],this},i.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var n=new Array(arguments.length-1),a=this._callbacks["$"+r],o=1;o<arguments.length;o++)n[o-1]=arguments[o];if(a){a=a.slice(0);for(var o=0,s=a.length;o<s;++o)a[o].apply(this,n)}return this},i.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]},i.prototype.hasListeners=function(r){return!!this.listeners(r).length}})(OX);var lT=av,ov={},TX={get exports(){return ov},set exports(t){ov=t}},xX=Fe,PX=xX("toStringTag"),cT={};cT[PX]="z";var Kg=String(cT)==="[object z]",kX=Kg,IX=Ze,eu=Fr,CX=Fe,AX=CX("toStringTag"),RX=Object,DX=eu(function(){return arguments}())=="Arguments",MX=function(t,i){try{return t[i]}catch{}},Zn=kX?eu:function(t){var i,e,r;return t===void 0?"Undefined":t===null?"Null":typeof(e=MX(i=RX(t),AX))=="string"?e:DX?eu(i):(r=eu(i))=="Object"&&IX(i.callee)?"Arguments":r},NX=Zn,FX=String,mr=function(t){if(NX(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return FX(t)},qg=ue,BX=$l,LX=mr,jX=Bo,zX=qg("".charAt),_1=qg("".charCodeAt),HX=qg("".slice),E1=function(t){return function(i,e){var r=LX(jX(i)),n=BX(e),a=r.length,o,s;return n<0||n>=a?t?"":void 0:(o=_1(r,n),o<55296||o>56319||n+1===a||(s=_1(r,n+1))<56320||s>57343?t?zX(r,n):o:t?HX(r,n,n+2):(o-55296<<10)+(s-56320)+65536)}},WX={codeAt:E1(!1),charAt:E1(!0)},VX=We,UX=Ze,S1=VX.WeakMap,hT=UX(S1)&&/native code/.test(String(S1)),GX=on,KX=yl,O1=GX("keys"),wl=function(t){return O1[t]||(O1[t]=KX(t))},qX=hT,dT=We,YX=Je,XX=sa,$h=et,bh=Wg,QX=wl,ZX=Uo,T1="Object already initialized",sv=dT.TypeError,JX=dT.WeakMap,Au,Qa,Ru,eQ=function(t){return Ru(t)?Qa(t):Au(t,{})},tQ=function(t){return function(i){var e;if(!YX(i)||(e=Qa(i)).type!==t)throw sv("Incompatible receiver, "+t+" required");return e}};if(qX||bh.state){var ur=bh.state||(bh.state=new JX);ur.get=ur.get,ur.has=ur.has,ur.set=ur.set,Au=function(t,i){if(ur.has(t))throw sv(T1);return i.facade=t,ur.set(t,i),i},Qa=function(t){return ur.get(t)||{}},Ru=function(t){return ur.has(t)}}else{var fi=QX("state");ZX[fi]=!0,Au=function(t,i){if($h(t,fi))throw sv(T1);return i.facade=t,XX(t,fi,i),i},Qa=function(t){return $h(t,fi)?t[fi]:{}},Ru=function(t){return $h(t,fi)}}var Jn={set:Au,get:Qa,has:Ru,enforce:eQ,getterFor:tQ},uv=Ge,rQ=et,fT=Function.prototype,nQ=uv&&Object.getOwnPropertyDescriptor,Yg=rQ(fT,"name"),iQ=Yg&&function(){}.name==="something",aQ=Yg&&(!uv||uv&&nQ(fT,"name").configurable),vT={EXISTS:Yg,PROPER:iQ,CONFIGURABLE:aQ},_l={},oQ=Ge,sQ=eT,uQ=Ut,lQ=Ft,cQ=nr,hQ=Go;_l.f=oQ&&!sQ?Object.defineProperties:function(i,e){lQ(i);for(var r=cQ(e),n=hQ(e),a=n.length,o=0,s;a>o;)uQ.f(i,s=n[o++],r[s]);return i};var dQ=Vt,fQ=dQ("document","documentElement"),vQ=Ft,pQ=_l,x1=Ug,gQ=Uo,yQ=fQ,mQ=ZO,$Q=wl,P1=">",k1="<",lv="prototype",cv="script",pT=$Q("IE_PROTO"),wh=function(){},gT=function(t){return k1+cv+P1+t+k1+"/"+cv+P1},I1=function(t){t.write(gT("")),t.close();var i=t.parentWindow.Object;return t=null,i},bQ=function(){var t=mQ("iframe"),i="java"+cv+":",e;return t.style.display="none",yQ.appendChild(t),t.src=String(i),e=t.contentWindow.document,e.open(),e.write(gT("document.F=Object")),e.close(),e.F},Cs,tu=function(){try{Cs=new ActiveXObject("htmlfile")}catch{}tu=typeof document<"u"?document.domain&&Cs?I1(Cs):bQ():I1(Cs);for(var t=x1.length;t--;)delete tu[lv][x1[t]];return tu()};gQ[pT]=!0;var ua=Object.create||function(i,e){var r;return i!==null?(wh[lv]=vQ(i),r=new wh,wh[lv]=null,r[pT]=i):r=tu(),e===void 0?r:pQ.f(r,e)},wQ=se,yT=!wQ(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),_Q=et,EQ=Ze,SQ=Nt,OQ=wl,TQ=yT,C1=OQ("IE_PROTO"),hv=Object,xQ=hv.prototype,El=TQ?hv.getPrototypeOf:function(t){var i=SQ(t);if(_Q(i,C1))return i[C1];var e=i.constructor;return EQ(e)&&i instanceof e?e.prototype:i instanceof hv?xQ:null},PQ=sa,qo=function(t,i,e,r){return r&&r.enumerable?t[i]=e:PQ(t,i,e),t},kQ=se,IQ=Ze,CQ=Je,AQ=ua,A1=El,RQ=qo,DQ=Fe,dv=DQ("iterator"),mT=!1,Sr,_h,Eh;[].keys&&(Eh=[].keys(),"next"in Eh?(_h=A1(A1(Eh)),_h!==Object.prototype&&(Sr=_h)):mT=!0);var MQ=!CQ(Sr)||kQ(function(){var t={};return Sr[dv].call(t)!==t});MQ?Sr={}:Sr=AQ(Sr);IQ(Sr[dv])||RQ(Sr,dv,function(){return this});var $T={IteratorPrototype:Sr,BUGGY_SAFARI_ITERATORS:mT},NQ=Kg,FQ=Zn,BQ=NQ?{}.toString:function(){return"[object "+FQ(this)+"]"},LQ=Kg,jQ=Ut.f,zQ=sa,HQ=et,WQ=BQ,VQ=Fe,R1=VQ("toStringTag"),la=function(t,i,e,r){if(t){var n=e?t:t.prototype;HQ(n,R1)||jQ(n,R1,{configurable:!0,value:i}),r&&!LQ&&zQ(n,"toString",WQ)}},ca={},UQ=$T.IteratorPrototype,GQ=ua,KQ=No,qQ=la,YQ=ca,XQ=function(){return this},QQ=function(t,i,e,r){var n=i+" Iterator";return t.prototype=GQ(UQ,{next:KQ(+!r,e)}),qQ(t,n,!1,!0),YQ[n]=XQ,t},ZQ=ue,JQ=Qn,eZ=function(t,i,e){try{return ZQ(JQ(Object.getOwnPropertyDescriptor(t,i)[e]))}catch{}},tZ=Ze,rZ=String,nZ=TypeError,iZ=function(t){if(typeof t=="object"||tZ(t))return t;throw nZ("Can't set "+rZ(t)+" as a prototype")},aZ=eZ,oZ=Ft,sZ=iZ,uZ=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,i={},e;try{e=aZ(Object.prototype,"__proto__","set"),e(i,[]),t=i instanceof Array}catch{}return function(n,a){return oZ(n),sZ(a),t?e(n,a):n.__proto__=a,n}}():void 0),lZ=q,cZ=Mt,hZ=vT,dZ=QQ,fZ=El,vZ=la,D1=qo,pZ=Fe,M1=ca,gZ=$T,yZ=hZ.PROPER,As=gZ.BUGGY_SAFARI_ITERATORS,Sh=pZ("iterator"),N1="keys",Rs="values",F1="entries",mZ=function(){return this},Xg=function(t,i,e,r,n,a,o){dZ(e,i,r);var s=function(p){if(p===n&&d)return d;if(!As&&p in c)return c[p];switch(p){case N1:return function(){return new e(this,p)};case Rs:return function(){return new e(this,p)};case F1:return function(){return new e(this,p)}}return function(){return new e(this)}},u=i+" Iterator",l=!1,c=t.prototype,h=c[Sh]||c["@@iterator"]||n&&c[n],d=!As&&h||s(n),f=i=="Array"&&c.entries||h,v,g,b;if(f&&(v=fZ(f.call(new t)),v!==Object.prototype&&v.next&&(vZ(v,u,!0,!0),M1[u]=mZ)),yZ&&n==Rs&&h&&h.name!==Rs&&(l=!0,d=function(){return cZ(h,this)}),n)if(g={values:s(Rs),keys:a?d:s(N1),entries:s(F1)},o)for(b in g)(As||l||!(b in c))&&D1(c,b,g[b]);else lZ({target:i,proto:!0,forced:As||l},g);return o&&c[Sh]!==d&&D1(c,Sh,d,{name:n}),M1[i]=d,g},Qg=function(t,i){return{value:t,done:i}},$Z=WX.charAt,bZ=mr,bT=Jn,wZ=Xg,B1=Qg,wT="String Iterator",_Z=bT.set,EZ=bT.getterFor(wT);wZ(String,"String",function(t){_Z(this,{type:wT,string:bZ(t),index:0})},function(){var i=EZ(this),e=i.string,r=i.index,n;return r>=e.length?B1(void 0,!0):(n=$Z(e,r),i.index+=n.length,B1(n,!1))});var SZ=Mt,L1=Ft,OZ=Hg,_T=function(t,i,e){var r,n;L1(t);try{if(r=OZ(t,"return"),!r){if(i==="throw")throw e;return e}r=SZ(r,t)}catch(a){n=!0,r=a}if(i==="throw")throw e;if(n)throw r;return L1(r),e},TZ=Ft,xZ=_T,PZ=function(t,i,e,r){try{return r?i(TZ(e)[0],e[1]):i(e)}catch(n){xZ(t,"throw",n)}},kZ=Fe,IZ=ca,CZ=kZ("iterator"),AZ=Array.prototype,ET=function(t){return t!==void 0&&(IZ.Array===t||AZ[CZ]===t)},RZ=ue,DZ=Ze,fv=Wg,MZ=RZ(Function.toString);DZ(fv.inspectSource)||(fv.inspectSource=function(t){return MZ(t)});var NZ=fv.inspectSource,FZ=ue,BZ=se,ST=Ze,LZ=Zn,jZ=Vt,zZ=NZ,OT=function(){},HZ=[],TT=jZ("Reflect","construct"),Zg=/^\s*(?:class|function)\b/,WZ=FZ(Zg.exec),VZ=!Zg.exec(OT),ma=function(i){if(!ST(i))return!1;try{return TT(OT,HZ,i),!0}catch{return!1}},xT=function(i){if(!ST(i))return!1;switch(LZ(i)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return VZ||!!WZ(Zg,zZ(i))}catch{return!0}};xT.sham=!0;var Sl=!TT||BZ(function(){var t;return ma(ma.call)||!ma(Object)||!ma(function(){t=!0})||t})?xT:ma,UZ=ml,GZ=Ut,KZ=No,ha=function(t,i,e){var r=UZ(i);r in t?GZ.f(t,r,KZ(0,e)):t[r]=e},qZ=Zn,j1=Hg,YZ=Fo,XZ=ca,QZ=Fe,ZZ=QZ("iterator"),Ol=function(t){if(!YZ(t))return j1(t,ZZ)||j1(t,"@@iterator")||XZ[qZ(t)]},JZ=Mt,eJ=Qn,tJ=Ft,rJ=oa,nJ=Ol,iJ=TypeError,PT=function(t,i){var e=arguments.length<2?nJ(t):i;if(eJ(e))return tJ(JZ(e,t));throw iJ(rJ(t)+" is not iterable")},aJ=Wo,oJ=Mt,sJ=Nt,uJ=PZ,lJ=ET,cJ=Sl,hJ=ir,z1=ha,dJ=PT,fJ=Ol,H1=Array,vJ=function(i){var e=sJ(i),r=cJ(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=aJ(a,n>2?arguments[2]:void 0));var s=fJ(e),u=0,l,c,h,d,f,v;if(s&&!(this===H1&&lJ(s)))for(d=dJ(e,s),f=d.next,c=r?new this:[];!(h=oJ(f,d)).done;u++)v=o?uJ(d,a,[h.value,u],!0):h.value,z1(c,u,v);else for(l=hJ(e),c=r?new this(l):H1(l);l>u;u++)v=o?a(e[u],u):e[u],z1(c,u,v);return c.length=u,c},pJ=Fe,kT=pJ("iterator"),IT=!1;try{var gJ=0,W1={next:function(){return{done:!!gJ++}},return:function(){IT=!0}};W1[kT]=function(){return this},Array.from(W1,function(){throw 2})}catch{}var yJ=function(t,i){if(!i&&!IT)return!1;var e=!1;try{var r={};r[kT]=function(){return{next:function(){return{done:e=!0}}}},t(r)}catch{}return e},mJ=q,$J=vJ,bJ=yJ,wJ=!bJ(function(t){Array.from(t)});mJ({target:"Array",stat:!0,forced:wJ},{from:$J});var _J=ie,EJ=_J.Array.from,SJ=EJ,CT=SJ;(function(t){t.exports=CT})(TX);var ei=V(ov),vv={},OJ={get exports(){return vv},set exports(t){vv=t}},pv={},TJ={get exports(){return pv},set exports(t){pv=t}},xJ=nr,V1=ca,AT=Jn;Ut.f;var PJ=Xg,Ds=Qg,RT="Array Iterator",kJ=AT.set,IJ=AT.getterFor(RT);PJ(Array,"Array",function(t,i){kJ(this,{type:RT,target:xJ(t),index:0,kind:i})},function(){var t=IJ(this),i=t.target,e=t.kind,r=t.index++;return!i||r>=i.length?(t.target=void 0,Ds(void 0,!0)):e=="keys"?Ds(r,!1):e=="values"?Ds(i[r],!1):Ds([r,i[r]],!1)},"values");V1.Arguments=V1.Array;var CJ=Ol,AJ=CJ,RJ={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},DJ=RJ,MJ=We,NJ=Zn,FJ=sa,U1=ca,BJ=Fe,G1=BJ("toStringTag");for(var Oh in DJ){var K1=MJ[Oh],Th=K1&&K1.prototype;Th&&NJ(Th)!==G1&&FJ(Th,G1,Oh),U1[Oh]=U1.Array}var LJ=AJ,jJ=LJ,zJ=jJ,HJ=zJ,WJ=HJ,VJ=WJ;(function(t){t.exports=VJ})(TJ);(function(t){t.exports=pv})(OJ);var Br=V(vv),gv={},UJ={get exports(){return gv},set exports(t){gv=t}},Yo={},GJ=tT,KJ=Ug,qJ=KJ.concat("length","prototype");Yo.f=Object.getOwnPropertyNames||function(i){return GJ(i,qJ)};var Tl={},q1=Vo,YJ=ir,XJ=ha,QJ=Array,ZJ=Math.max,DT=function(t,i,e){for(var r=YJ(t),n=q1(i,r),a=q1(e===void 0?r:e,r),o=QJ(ZJ(a-n,0)),s=0;n<a;n++,s++)XJ(o,s,t[n]);return o.length=s,o},JJ=Fr,eee=nr,MT=Yo.f,tee=DT,NT=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],ree=function(t){try{return MT(t)}catch{return tee(NT)}};Tl.f=function(i){return NT&&JJ(i)=="Window"?ree(i):MT(eee(i))};var nee=Ut,Jg=function(t,i,e){return nee.f(t,i,e)},Xo={},iee=Fe;Xo.f=iee;var Y1=ie,aee=et,oee=Xo,see=Ut.f,Ce=function(t){var i=Y1.Symbol||(Y1.Symbol={});aee(i,t)||see(i,t,{value:oee.f(t)})},uee=Mt,lee=Vt,cee=Fe,hee=qo,FT=function(){var t=lee("Symbol"),i=t&&t.prototype,e=i&&i.valueOf,r=cee("toPrimitive");i&&!i[r]&&hee(i,r,function(n){return uee(e,this)},{arity:1})},dee=Fr,ti=Array.isArray||function(i){return dee(i)=="Array"},X1=ti,fee=Sl,vee=Je,pee=Fe,gee=pee("species"),Q1=Array,yee=function(t){var i;return X1(t)&&(i=t.constructor,fee(i)&&(i===Q1||X1(i.prototype))?i=void 0:vee(i)&&(i=i[gee],i===null&&(i=void 0))),i===void 0?Q1:i},mee=yee,ey=function(t,i){return new(mee(t))(i===0?0:i)},$ee=Wo,bee=ue,wee=gl,_ee=Nt,Eee=ir,See=ey,Z1=bee([].push),zr=function(t){var i=t==1,e=t==2,r=t==3,n=t==4,a=t==6,o=t==7,s=t==5||a;return function(u,l,c,h){for(var d=_ee(u),f=wee(d),v=$ee(l,c),g=Eee(f),b=0,p=h||See,$=i?p(u,g):e||o?p(u,0):void 0,y,m;g>b;b++)if((s||b in f)&&(y=f[b],m=v(y,b,d),t))if(i)$[b]=m;else if(m)switch(t){case 3:return!0;case 5:return y;case 6:return b;case 2:Z1($,y)}else switch(t){case 4:return!1;case 7:Z1($,y)}return a?-1:r||n?n:$}},fn={forEach:zr(0),map:zr(1),filter:zr(2),some:zr(3),every:zr(4),find:zr(5),findIndex:zr(6),filterReject:zr(7)},xl=q,ty=We,ry=Mt,Oee=ue,Fi=Ge,Bi=aa,Tee=se,Ye=et,xee=Ne,yv=Ft,Pl=nr,ny=ml,Pee=mr,mv=No,Za=ua,BT=Go,kee=Yo,LT=Tl,Iee=Ko,jT=ia,zT=Ut,Cee=_l,HT=Mo,J1=qo,Aee=Jg,iy=on,Ree=wl,WT=Uo,ew=yl,Dee=Fe,Mee=Xo,Nee=Ce,Fee=FT,Bee=la,VT=Jn,kl=fn.forEach,Et=Ree("hidden"),Il="Symbol",Ja="prototype",Lee=VT.set,tw=VT.getterFor(Il),Jt=Object[Ja],Cn=ty.Symbol,Ta=Cn&&Cn[Ja],jee=ty.TypeError,xh=ty.QObject,UT=jT.f,En=zT.f,GT=LT.f,zee=HT.f,KT=Oee([].push),Cr=iy("symbols"),Qo=iy("op-symbols"),Hee=iy("wks"),$v=!xh||!xh[Ja]||!xh[Ja].findChild,bv=Fi&&Tee(function(){return Za(En({},"a",{get:function(){return En(this,"a",{value:7}).a}})).a!=7})?function(t,i,e){var r=UT(Jt,i);r&&delete Jt[i],En(t,i,e),r&&t!==Jt&&En(Jt,i,r)}:En,Ph=function(t,i){var e=Cr[t]=Za(Ta);return Lee(e,{type:Il,tag:t,description:i}),Fi||(e.description=i),e},Cl=function(i,e,r){i===Jt&&Cl(Qo,e,r),yv(i);var n=ny(e);return yv(r),Ye(Cr,n)?(r.enumerable?(Ye(i,Et)&&i[Et][n]&&(i[Et][n]=!1),r=Za(r,{enumerable:mv(0,!1)})):(Ye(i,Et)||En(i,Et,mv(1,{})),i[Et][n]=!0),bv(i,n,r)):En(i,n,r)},ay=function(i,e){yv(i);var r=Pl(e),n=BT(r).concat(QT(r));return kl(n,function(a){(!Fi||ry(qT,r,a))&&Cl(i,a,r[a])}),i},Wee=function(i,e){return e===void 0?Za(i):ay(Za(i),e)},qT=function(i){var e=ny(i),r=ry(zee,this,e);return this===Jt&&Ye(Cr,e)&&!Ye(Qo,e)?!1:r||!Ye(this,e)||!Ye(Cr,e)||Ye(this,Et)&&this[Et][e]?r:!0},YT=function(i,e){var r=Pl(i),n=ny(e);if(!(r===Jt&&Ye(Cr,n)&&!Ye(Qo,n))){var a=UT(r,n);return a&&Ye(Cr,n)&&!(Ye(r,Et)&&r[Et][n])&&(a.enumerable=!0),a}},XT=function(i){var e=GT(Pl(i)),r=[];return kl(e,function(n){!Ye(Cr,n)&&!Ye(WT,n)&&KT(r,n)}),r},QT=function(t){var i=t===Jt,e=GT(i?Qo:Pl(t)),r=[];return kl(e,function(n){Ye(Cr,n)&&(!i||Ye(Jt,n))&&KT(r,Cr[n])}),r};Bi||(Cn=function(){if(xee(Ta,this))throw jee("Symbol is not a constructor");var i=!arguments.length||arguments[0]===void 0?void 0:Pee(arguments[0]),e=ew(i),r=function(n){this===Jt&&ry(r,Qo,n),Ye(this,Et)&&Ye(this[Et],e)&&(this[Et][e]=!1),bv(this,e,mv(1,n))};return Fi&&$v&&bv(Jt,e,{configurable:!0,set:r}),Ph(e,i)},Ta=Cn[Ja],J1(Ta,"toString",function(){return tw(this).tag}),J1(Cn,"withoutSetter",function(t){return Ph(ew(t),t)}),HT.f=qT,zT.f=Cl,Cee.f=ay,jT.f=YT,kee.f=LT.f=XT,Iee.f=QT,Mee.f=function(t){return Ph(Dee(t),t)},Fi&&Aee(Ta,"description",{configurable:!0,get:function(){return tw(this).description}}));xl({global:!0,constructor:!0,wrap:!0,forced:!Bi,sham:!Bi},{Symbol:Cn});kl(BT(Hee),function(t){Nee(t)});xl({target:Il,stat:!0,forced:!Bi},{useSetter:function(){$v=!0},useSimple:function(){$v=!1}});xl({target:"Object",stat:!0,forced:!Bi,sham:!Fi},{create:Wee,defineProperty:Cl,defineProperties:ay,getOwnPropertyDescriptor:YT});xl({target:"Object",stat:!0,forced:!Bi},{getOwnPropertyNames:XT});Fee();Bee(Cn,Il);WT[Et]=!0;var Vee=aa,ZT=Vee&&!!Symbol.for&&!!Symbol.keyFor,Uee=q,Gee=Vt,Kee=et,qee=mr,JT=on,Yee=ZT,kh=JT("string-to-symbol-registry"),Xee=JT("symbol-to-string-registry");Uee({target:"Symbol",stat:!0,forced:!Yee},{for:function(t){var i=qee(t);if(Kee(kh,i))return kh[i];var e=Gee("Symbol")(i);return kh[i]=e,Xee[e]=i,e}});var Qee=q,Zee=et,Jee=zo,ete=oa,tte=on,rte=ZT,rw=tte("symbol-to-string-registry");Qee({target:"Symbol",stat:!0,forced:!rte},{keyFor:function(i){if(!Jee(i))throw TypeError(ete(i)+" is not a symbol");if(Zee(rw,i))return rw[i]}});var nte=ue,nw=ti,ite=Ze,iw=Fr,ate=mr,aw=nte([].push),ote=function(t){if(ite(t))return t;if(nw(t)){for(var i=t.length,e=[],r=0;r<i;r++){var n=t[r];typeof n=="string"?aw(e,n):(typeof n=="number"||iw(n)=="Number"||iw(n)=="String")&&aw(e,ate(n))}var a=e.length,o=!0;return function(s,u){if(o)return o=!1,u;if(nw(this))return u;for(var l=0;l<a;l++)if(e[l]===s)return u}}},ste=q,ex=Vt,tx=Do,ute=Mt,Zo=ue,rx=se,ow=Ze,sw=zo,nx=bl,lte=ote,cte=aa,hte=String,Jr=ex("JSON","stringify"),Ms=Zo(/./.exec),uw=Zo("".charAt),dte=Zo("".charCodeAt),fte=Zo("".replace),vte=Zo(1 .toString),pte=/[\uD800-\uDFFF]/g,lw=/^[\uD800-\uDBFF]$/,cw=/^[\uDC00-\uDFFF]$/,hw=!cte||rx(function(){var t=ex("Symbol")();return Jr([t])!="[null]"||Jr({a:t})!="{}"||Jr(Object(t))!="{}"}),dw=rx(function(){return Jr("\uDF06\uD834")!=='"\\udf06\\ud834"'||Jr("\uDEAD")!=='"\\udead"'}),gte=function(t,i){var e=nx(arguments),r=lte(i);if(!(!ow(r)&&(t===void 0||sw(t))))return e[1]=function(n,a){if(ow(r)&&(a=ute(r,this,hte(n),a)),!sw(a))return a},tx(Jr,null,e)},yte=function(t,i,e){var r=uw(e,i-1),n=uw(e,i+1);return Ms(lw,t)&&!Ms(cw,n)||Ms(cw,t)&&!Ms(lw,r)?"\\u"+vte(dte(t,0),16):t};Jr&&ste({target:"JSON",stat:!0,arity:3,forced:hw||dw},{stringify:function(i,e,r){var n=nx(arguments),a=tx(hw?gte:Jr,null,n);return dw&&typeof a=="string"?fte(a,pte,yte):a}});var mte=q,$te=aa,bte=se,ix=Ko,wte=Nt,_te=!$te||bte(function(){ix.f(1)});mte({target:"Object",stat:!0,forced:_te},{getOwnPropertySymbols:function(i){var e=ix.f;return e?e(wte(i)):[]}});var Ete=ie,Ste=Ete.Object.getOwnPropertySymbols,Ote=Ste,Tte=Ote;(function(t){t.exports=Tte})(UJ);var sn=V(gv),wv={},xte={get exports(){return wv},set exports(t){wv=t}},_v={},Pte={get exports(){return _v},set exports(t){_v=t}},kte=q,Ite=se,Cte=nr,ax=ia.f,ox=Ge,Ate=!ox||Ite(function(){ax(1)});kte({target:"Object",stat:!0,forced:Ate,sham:!ox},{getOwnPropertyDescriptor:function(i,e){return ax(Cte(i),e)}});var Rte=ie,sx=Rte.Object,Dte=Pte.exports=function(i,e){return sx.getOwnPropertyDescriptor(i,e)};sx.getOwnPropertyDescriptor.sham&&(Dte.sham=!0);var Mte=_v,ux=Mte;(function(t){t.exports=ux})(xte);var vn=V(wv),Ev={},Nte={get exports(){return Ev},set exports(t){Ev=t}},Fte=Vt,Bte=ue,Lte=Yo,jte=Ko,zte=Ft,Hte=Bte([].concat),lx=Fte("Reflect","ownKeys")||function(i){var e=Lte.f(zte(i)),r=jte.f;return r?Hte(e,r(i)):e},Wte=q,Vte=Ge,Ute=lx,Gte=nr,Kte=ia,qte=ha;Wte({target:"Object",stat:!0,sham:!Vte},{getOwnPropertyDescriptors:function(i){for(var e=Gte(i),r=Kte.f,n=Ute(e),a={},o=0,s,u;n.length>o;)u=r(e,s=n[o++]),u!==void 0&&qte(a,s,u);return a}});var Yte=ie,Xte=Yte.Object.getOwnPropertyDescriptors,Qte=Xte,Zte=Qte;(function(t){t.exports=Zte})(Nte);var un=V(Ev),Sv={},Jte={get exports(){return Sv},set exports(t){Sv=t}},Ov={},ere={get exports(){return Ov},set exports(t){Ov=t}},tre=q,rre=Ge,fw=_l.f;tre({target:"Object",stat:!0,forced:Object.defineProperties!==fw,sham:!rre},{defineProperties:fw});var nre=ie,cx=nre.Object,ire=ere.exports=function(i,e){return cx.defineProperties(i,e)};cx.defineProperties.sham&&(ire.sham=!0);var are=Ov,ore=are;(function(t){t.exports=ore})(Jte);var Al=V(Sv),Tv={},sre={get exports(){return Tv},set exports(t){Tv=t}},xv={},ure={get exports(){return xv},set exports(t){xv=t}},lre=q,cre=Ge,vw=Ut.f;lre({target:"Object",stat:!0,forced:Object.defineProperty!==vw,sham:!cre},{defineProperty:vw});var hre=ie,hx=hre.Object,dre=ure.exports=function(i,e,r){return hx.defineProperty(i,e,r)};hx.defineProperty.sham&&(dre.sham=!0);var fre=xv,dx=fre;(function(t){t.exports=dx})(sre);var Rl=V(Tv);function N(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}var Pv={},vre={get exports(){return Pv},set exports(t){Pv=t}},kv={},pre={get exports(){return kv},set exports(t){kv=t}},gre=dx,yre=gre,mre=yre,$re=mre;(function(t){t.exports=$re})(pre);(function(t){t.exports=kv})(vre);var Dl=V(Pv),Iv={},bre={get exports(){return Iv},set exports(t){Iv=t}},Cv={},wre={get exports(){return Cv},set exports(t){Cv=t}},_re=TypeError,Ere=9007199254740991,fx=function(t){if(t>Ere)throw _re("Maximum allowed index exceeded");return t},Sre=se,Ore=Fe,Tre=jo,xre=Ore("species"),Jo=function(t){return Tre>=51||!Sre(function(){var i=[],e=i.constructor={};return e[xre]=function(){return{foo:1}},i[t](Boolean).foo!==1})},Pre=q,kre=se,Ire=ti,Cre=Je,Are=Nt,Rre=ir,pw=fx,gw=ha,Dre=ey,Mre=Jo,Nre=Fe,Fre=jo,vx=Nre("isConcatSpreadable"),Bre=Fre>=51||!kre(function(){var t=[];return t[vx]=!1,t.concat()[0]!==t}),Lre=function(t){if(!Cre(t))return!1;var i=t[vx];return i!==void 0?!!i:Ire(t)},jre=!Bre||!Mre("concat");Pre({target:"Array",proto:!0,arity:1,forced:jre},{concat:function(i){var e=Are(this),r=Dre(e,0),n=0,a,o,s,u,l;for(a=-1,s=arguments.length;a<s;a++)if(l=a===-1?e:arguments[a],Lre(l))for(u=Rre(l),pw(n+u),o=0;o<u;o++,n++)o in l&&gw(r,n,l[o]);else pw(n+1),gw(r,n++,l);return r.length=n,r}});var zre=Ce;zre("asyncIterator");var Hre=Ce;Hre("hasInstance");var Wre=Ce;Wre("isConcatSpreadable");var Vre=Ce;Vre("iterator");var Ure=Ce;Ure("match");var Gre=Ce;Gre("matchAll");var Kre=Ce;Kre("replace");var qre=Ce;qre("search");var Yre=Ce;Yre("species");var Xre=Ce;Xre("split");var Qre=Ce,Zre=FT;Qre("toPrimitive");Zre();var Jre=Vt,ene=Ce,tne=la;ene("toStringTag");tne(Jre("Symbol"),"Symbol");var rne=Ce;rne("unscopables");var nne=We,ine=la;ine(nne.JSON,"JSON",!0);var ane=ie,one=ane.Symbol,sne=one,px=sne,une=Ce;une("dispose");var lne=px,cne=lne,hne=Ce;hne("asyncDispose");var dne=q,fne=Vt,vne=ue,gx=fne("Symbol"),pne=gx.keyFor,gne=vne(gx.prototype.valueOf);dne({target:"Symbol",stat:!0},{isRegistered:function(i){try{return pne(gne(i))!==void 0}catch{return!1}}});var yne=q,mne=on,yx=Vt,$ne=ue,bne=zo,wne=Fe,Du=yx("Symbol"),yw=Du.isWellKnown,mx=yx("Object","getOwnPropertyNames"),_ne=$ne(Du.prototype.valueOf),mw=mne("wks");for(var Ih=0,$w=mx(Du),Ene=$w.length;Ih<Ene;Ih++)try{var bw=$w[Ih];bne(Du[bw])&&wne(bw)}catch{}yne({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(i){if(yw&&yw(i))return!0;try{for(var e=_ne(i),r=0,n=mx(mw),a=n.length;r<a;r++)if(mw[n[r]]==e)return!0}catch{}return!1}});var Sne=Ce;Sne("matcher");var One=Ce;One("metadataKey");var Tne=Ce;Tne("observable");var xne=Ce;xne("metadata");var Pne=Ce;Pne("patternMatch");var kne=Ce;kne("replaceAll");var Ine=cne,Cne=Ine;(function(t){t.exports=Cne})(wre);(function(t){t.exports=Cv})(bre);var Si=V(Iv),Av={},Ane={get exports(){return Av},set exports(t){Av=t}},Rv={},Rne={get exports(){return Rv},set exports(t){Rv=t}},Dne=Xo,Mne=Dne.f("iterator"),Nne=Mne,Fne=Nne,Bne=Fne,Lne=Bne,jne=Lne,zne=jne;(function(t){t.exports=zne})(Rne);(function(t){t.exports=Rv})(Ane);var Hne=V(Av);function he(t){"@babel/helpers - typeof";return he=typeof Si=="function"&&typeof Hne=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Si=="function"&&i.constructor===Si&&i!==Si.prototype?"symbol":typeof i},he(t)}var Dv={},Wne={get exports(){return Dv},set exports(t){Dv=t}},Mv={},Vne={get exports(){return Mv},set exports(t){Mv=t}},Une=Xo,Gne=Une.f("toPrimitive"),Kne=Gne,qne=Kne,Yne=qne,Xne=Yne,Qne=Xne,Zne=Qne;(function(t){t.exports=Zne})(Vne);(function(t){t.exports=Mv})(Wne);var Jne=V(Dv);function eie(t,i){if(he(t)!=="object"||t===null)return t;var e=t[Jne];if(e!==void 0){var r=e.call(t,i||"default");if(he(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(t)}function $x(t){var i=eie(t,"string");return he(i)==="symbol"?i:String(i)}function ww(t,i){for(var e=0;e<i.length;e++){var r=i[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Dl(t,$x(r.key),r)}}function F(t,i,e){return i&&ww(t.prototype,i),e&&ww(t,e),Dl(t,"prototype",{writable:!1}),t}function Ml(t,i,e){return i=$x(i),i in t?Dl(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}var Nv={},tie={get exports(){return Nv},set exports(t){Nv=t}},Fv={},rie={get exports(){return Fv},set exports(t){Fv=t}},nie=q,iie=ti;nie({target:"Array",stat:!0},{isArray:iie});var aie=ie,oie=aie.Array.isArray,sie=oie,bx=sie,uie=bx,lie=uie,cie=lie,hie=cie;(function(t){t.exports=hie})(rie);(function(t){t.exports=Fv})(tie);var wx=V(Nv);function die(t){if(wx(t))return t}function fie(t,i){var e=t==null?null:typeof Si<"u"&&Br(t)||t["@@iterator"];if(e!=null){var r,n,a,o,s=[],u=!0,l=!1;try{if(a=(e=e.call(t)).next,i===0){if(Object(e)!==e)return;u=!1}else for(;!(u=(r=a.call(e)).done)&&(s.push(r.value),s.length!==i);u=!0);}catch(c){l=!0,n=c}finally{try{if(!u&&e.return!=null&&(o=e.return(),Object(o)!==o))return}finally{if(l)throw n}}return s}}var Bv={},vie={get exports(){return Bv},set exports(t){Bv=t}},Lv={},pie={get exports(){return Lv},set exports(t){Lv=t}},gie=q,_w=ti,yie=Sl,mie=Je,Ew=Vo,$ie=ir,bie=nr,wie=ha,_ie=Fe,Eie=Jo,Sie=bl,Oie=Eie("slice"),Tie=_ie("species"),Ch=Array,xie=Math.max;gie({target:"Array",proto:!0,forced:!Oie},{slice:function(i,e){var r=bie(this),n=$ie(r),a=Ew(i,n),o=Ew(e===void 0?n:e,n),s,u,l;if(_w(r)&&(s=r.constructor,yie(s)&&(s===Ch||_w(s.prototype))?s=void 0:mie(s)&&(s=s[Tie],s===null&&(s=void 0)),s===Ch||s===void 0))return Sie(r,a,o);for(u=new(s===void 0?Ch:s)(xie(o-a,0)),l=0;a<o;a++,l++)a in r&&wie(u,l,r[a]);return u.length=l,u}});var Pie=tt,kie=Pie("Array").slice,Iie=Ne,Cie=kie,Ah=Array.prototype,Aie=function(t){var i=t.slice;return t===Ah||Iie(Ah,t)&&i===Ah.slice?Cie:i},Rie=Aie,_x=Rie,Die=_x,Mie=Die,Nie=Mie,Fie=Nie;(function(t){t.exports=Fie})(pie);(function(t){t.exports=Lv})(vie);var Bie=V(Bv),jv={},Lie={get exports(){return jv},set exports(t){jv=t}},zv={},jie={get exports(){return zv},set exports(t){zv=t}},zie=CT,Hie=zie,Wie=Hie,Vie=Wie;(function(t){t.exports=Vie})(jie);(function(t){t.exports=zv})(Lie);var Ex=V(jv);function Hv(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}function Sx(t,i){var e;if(t){if(typeof t=="string")return Hv(t,i);var r=Bie(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Ex(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hv(t,i)}}function Uie(){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 xe(t,i){return die(t)||fie(t,i)||Sx(t,i)||Uie()}function Gie(t){if(wx(t))return Hv(t)}function Kie(t){if(typeof Si<"u"&&Br(t)!=null||t["@@iterator"]!=null)return Ex(t)}function qie(){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 lr(t){return Gie(t)||Kie(t)||Sx(t)||qie()}var Wv={},Yie={get exports(){return Wv},set exports(t){Wv=t}};(function(t){t.exports=px})(Yie);var pn=V(Wv),Vv={},Xie={get exports(){return Vv},set exports(t){Vv=t}},Qie=tt,Zie=Qie("Array").concat,Jie=Ne,eae=Zie,Rh=Array.prototype,tae=function(t){var i=t.concat;return t===Rh||Jie(Rh,t)&&i===Rh.concat?eae:i},rae=tae,nae=rae;(function(t){t.exports=nae})(Xie);var oy=V(Vv),Uv={},iae={get exports(){return Uv},set exports(t){Uv=t}};(function(t){t.exports=_x})(iae);var st=V(Uv),Sw={},aae={get exports(){return Sw},set exports(t){Sw=t}},oae=q,sae=lx;oae({target:"Reflect",stat:!0},{ownKeys:sae});var uae=ie,lae=uae.Reflect.ownKeys,cae=lae,hae=cae;(function(t){t.exports=hae})(aae);var Gv={},dae={get exports(){return Gv},set exports(t){Gv=t}};(function(t){t.exports=bx})(dae);var ve=V(Gv),Kv={},fae={get exports(){return Kv},set exports(t){Kv=t}},vae=q,pae=fn.map,gae=Jo,yae=gae("map");vae({target:"Array",proto:!0,forced:!yae},{map:function(i){return pae(this,i,arguments.length>1?arguments[1]:void 0)}});var mae=tt,$ae=mae("Array").map,bae=Ne,wae=$ae,Dh=Array.prototype,_ae=function(t){var i=t.map;return t===Dh||bae(Dh,t)&&i===Dh.map?wae:i},Eae=_ae,Sae=Eae;(function(t){t.exports=Sae})(fae);var Li=V(Kv),qv={},Oae={get exports(){return qv},set exports(t){qv=t}},Tae=q,xae=Nt,Ox=Go,Pae=se,kae=Pae(function(){Ox(1)});Tae({target:"Object",stat:!0,forced:kae},{keys:function(i){return Ox(xae(i))}});var Iae=ie,Cae=Iae.Object.keys,Aae=Cae,Rae=Aae;(function(t){t.exports=Rae})(Oae);var Te=V(qv),Yv={},Dae={get exports(){return Yv},set exports(t){Yv=t}},Mae=q,Nae=ue,Tx=Date,Fae=Nae(Tx.prototype.getTime);Mae({target:"Date",stat:!0},{now:function(){return Fae(new Tx)}});var Bae=ie,Lae=Bae.Date.now,jae=Lae,zae=jae;(function(t){t.exports=zae})(Dae);var Mu=V(Yv),Xv={},Hae={get exports(){return Xv},set exports(t){Xv=t}},Wae=se,da=function(t,i){var e=[][t];return!!e&&Wae(function(){e.call(null,i||function(){return 1},1)})},Vae=fn.forEach,Uae=da,Gae=Uae("forEach"),Kae=Gae?[].forEach:function(i){return Vae(this,i,arguments.length>1?arguments[1]:void 0)},qae=q,Ow=Kae;qae({target:"Array",proto:!0,forced:[].forEach!=Ow},{forEach:Ow});var Yae=tt,Xae=Yae("Array").forEach,Qae=Xae,Zae=Qae,Jae=Zn,eoe=et,toe=Ne,roe=Zae,Mh=Array.prototype,noe={DOMTokenList:!0,NodeList:!0},ioe=function(t){var i=t.forEach;return t===Mh||toe(Mh,t)&&i===Mh.forEach||eoe(noe,Jae(t))?roe:i};(function(t){t.exports=ioe})(Hae);var ge=V(Xv),Qv={},aoe={get exports(){return Qv},set exports(t){Qv=t}},ooe=q,soe=ue,uoe=ti,loe=soe([].reverse),Tw=[1,2];ooe({target:"Array",proto:!0,forced:String(Tw)===String(Tw.reverse())},{reverse:function(){return uoe(this)&&(this.length=this.length),loe(this)}});var coe=tt,hoe=coe("Array").reverse,doe=Ne,foe=hoe,Nh=Array.prototype,voe=function(t){var i=t.reverse;return t===Nh||doe(Nh,t)&&i===Nh.reverse?foe:i},poe=voe,goe=poe;(function(t){t.exports=goe})(aoe);var An=V(Qv),Zv={},yoe={get exports(){return Zv},set exports(t){Zv=t}},moe=Ge,$oe=ti,boe=TypeError,woe=Object.getOwnPropertyDescriptor,_oe=moe&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),Eoe=_oe?function(t,i){if($oe(t)&&!woe(t,"length").writable)throw boe("Cannot set read only .length");return t.length=i}:function(t,i){return t.length=i},xw=oa,Soe=TypeError,xx=function(t,i){if(!delete t[i])throw Soe("Cannot delete property "+xw(i)+" of "+xw(t))},Ooe=q,Toe=Nt,xoe=Vo,Poe=$l,koe=ir,Ioe=Eoe,Coe=fx,Aoe=ey,Roe=ha,Fh=xx,Doe=Jo,Moe=Doe("splice"),Noe=Math.max,Foe=Math.min;Ooe({target:"Array",proto:!0,forced:!Moe},{splice:function(i,e){var r=Toe(this),n=koe(r),a=xoe(i,n),o=arguments.length,s,u,l,c,h,d;for(o===0?s=u=0:o===1?(s=0,u=n-a):(s=o-2,u=Foe(Noe(Poe(e),0),n-a)),Coe(n+s-u),l=Aoe(r,u),c=0;c<u;c++)h=a+c,h in r&&Roe(l,c,r[h]);if(l.length=u,s<u){for(c=a;c<n-u;c++)h=c+u,d=c+s,h in r?r[d]=r[h]:Fh(r,d);for(c=n;c>n-u+s;c--)Fh(r,c-1)}else if(s>u)for(c=n-u;c>a;c--)h=c+u-1,d=c+s-1,h in r?r[d]=r[h]:Fh(r,d);for(c=0;c<s;c++)r[c+a]=arguments[c+2];return Ioe(r,n-u+s),l}});var Boe=tt,Loe=Boe("Array").splice,joe=Ne,zoe=Loe,Bh=Array.prototype,Hoe=function(t){var i=t.splice;return t===Bh||joe(Bh,t)&&i===Bh.splice?zoe:i},Woe=Hoe,Voe=Woe;(function(t){t.exports=Voe})(yoe);var Or=V(Zv),Jv={},Uoe={get exports(){return Jv},set exports(t){Jv=t}},Goe=q,Koe=Vg.includes,qoe=se,Yoe=qoe(function(){return!Array(1).includes()});Goe({target:"Array",proto:!0,forced:Yoe},{includes:function(i){return Koe(this,i,arguments.length>1?arguments[1]:void 0)}});var Xoe=tt,Qoe=Xoe("Array").includes,Zoe=Je,Joe=Fr,ese=Fe,tse=ese("match"),rse=function(t){var i;return Zoe(t)&&((i=t[tse])!==void 0?!!i:Joe(t)=="RegExp")},nse=rse,ise=TypeError,ase=function(t){if(nse(t))throw ise("The method doesn't accept regular expressions");return t},ose=Fe,sse=ose("match"),use=function(t){var i=/./;try{"/./"[t](i)}catch{try{return i[sse]=!1,"/./"[t](i)}catch{}}return!1},lse=q,cse=ue,hse=ase,dse=Bo,Pw=mr,fse=use,vse=cse("".indexOf);lse({target:"String",proto:!0,forced:!fse("includes")},{includes:function(i){return!!~vse(Pw(dse(this)),Pw(hse(i)),arguments.length>1?arguments[1]:void 0)}});var pse=tt,gse=pse("String").includes,kw=Ne,yse=Qoe,mse=gse,Lh=Array.prototype,jh=String.prototype,$se=function(t){var i=t.includes;return t===Lh||kw(Lh,t)&&i===Lh.includes?yse:typeof t=="string"||t===jh||kw(jh,t)&&i===jh.includes?mse:i},bse=$se,wse=bse;(function(t){t.exports=wse})(Uoe);var vr=V(Jv),ep={},_se={get exports(){return ep},set exports(t){ep=t}},Ese=q,Sse=se,Ose=Nt,Px=El,Tse=yT,xse=Sse(function(){Px(1)});Ese({target:"Object",stat:!0,forced:xse,sham:!Tse},{getPrototypeOf:function(i){return Px(Ose(i))}});var Pse=ie,kse=Pse.Object.getPrototypeOf,Ise=kse,kx=Ise;(function(t){t.exports=kx})(_se);var Iw=V(ep),tp={},Cse={get exports(){return tp},set exports(t){tp=t}},Ase=q,Rse=fn.filter,Dse=Jo,Mse=Dse("filter");Ase({target:"Array",proto:!0,forced:!Mse},{filter:function(i){return Rse(this,i,arguments.length>1?arguments[1]:void 0)}});var Nse=tt,Fse=Nse("Array").filter,Bse=Ne,Lse=Fse,zh=Array.prototype,jse=function(t){var i=t.filter;return t===zh||Bse(zh,t)&&i===zh.filter?Lse:i},zse=jse,Hse=zse;(function(t){t.exports=Hse})(Cse);var St=V(tp),Cw={},Wse={get exports(){return Cw},set exports(t){Cw=t}},Vse=Ge,Ix=ue,Use=Go,Gse=nr,Kse=Mo.f,qse=Ix(Kse),Yse=Ix([].push),Aw=function(t){return function(i){for(var e=Gse(i),r=Use(e),n=r.length,a=0,o=[],s;n>a;)s=r[a++],(!Vse||qse(e,s))&&Yse(o,t?[s,e[s]]:e[s]);return o}},Xse={entries:Aw(!0),values:Aw(!1)},Qse=q,Zse=Xse.values;Qse({target:"Object",stat:!0},{values:function(i){return Zse(i)}});var Jse=ie,eue=Jse.Object.values,tue=eue,rue=tue;(function(t){t.exports=rue})(Wse);var rp={},nue={get exports(){return rp},set exports(t){rp=t}},Nl=`
|
|
65
|
+
\v\f\r \u2028\u2029\uFEFF`,iue=ue,aue=Bo,oue=mr,np=Nl,Rw=iue("".replace),sue=RegExp("^["+np+"]+"),uue=RegExp("(^|[^"+np+"])["+np+"]+$"),Hh=function(t){return function(i){var e=oue(aue(i));return t&1&&(e=Rw(e,sue,"")),t&2&&(e=Rw(e,uue,"$1")),e}},sy={start:Hh(1),end:Hh(2),trim:Hh(3)},Cx=We,lue=se,cue=ue,hue=mr,due=sy.trim,Dw=Nl,Da=Cx.parseInt,Mw=Cx.Symbol,Nw=Mw&&Mw.iterator,Ax=/^[+-]?0x/i,fue=cue(Ax.exec),vue=Da(Dw+"08")!==8||Da(Dw+"0x16")!==22||Nw&&!lue(function(){Da(Object(Nw))}),pue=vue?function(i,e){var r=due(hue(i));return Da(r,e>>>0||(fue(Ax,r)?16:10))}:Da,gue=q,Fw=pue;gue({global:!0,forced:parseInt!=Fw},{parseInt:Fw});var yue=ie,mue=yue.parseInt,$ue=mue,bue=$ue;(function(t){t.exports=bue})(nue);var Xt=V(rp),ip={},wue={get exports(){return ip},set exports(t){ip=t}},_ue=q,Eue=zg,Sue=Vg.indexOf,Oue=da,ap=Eue([].indexOf),Rx=!!ap&&1/ap([1],1,-0)<0,Tue=Rx||!Oue("indexOf");_ue({target:"Array",proto:!0,forced:Tue},{indexOf:function(i){var e=arguments.length>1?arguments[1]:void 0;return Rx?ap(this,i,e)||0:Sue(this,i,e)}});var xue=tt,Pue=xue("Array").indexOf,kue=Ne,Iue=Pue,Wh=Array.prototype,Cue=function(t){var i=t.indexOf;return t===Wh||kue(Wh,t)&&i===Wh.indexOf?Iue:i},Aue=Cue,Rue=Aue;(function(t){t.exports=Rue})(wue);var ae=V(ip),Bw={},Due={get exports(){return Bw},set exports(t){Bw=t}},Mue=vT.PROPER,Nue=se,Lw=Nl,jw="
",Fue=function(t){return Nue(function(){return!!Lw[t]()||jw[t]()!==jw||Mue&&Lw[t].name!==t})},Bue=q,Lue=sy.trim,jue=Fue;Bue({target:"String",proto:!0,forced:jue("trim")},{trim:function(){return Lue(this)}});var zue=tt,Hue=zue("String").trim,Wue=Ne,Vue=Hue,Vh=String.prototype,Uue=function(t){var i=t.trim;return typeof t=="string"||t===Vh||Wue(Vh,t)&&i===Vh.trim?Vue:i},Gue=Uue,Kue=Gue;(function(t){t.exports=Kue})(Due);var op={},que={get exports(){return op},set exports(t){op=t}},Yue=q,Xue=Ge,Que=ua;Yue({target:"Object",stat:!0,sham:!Xue},{create:Que});var Zue=ie,Jue=Zue.Object,ele=function(i,e){return Jue.create(i,e)},tle=ele,Dx=tle;(function(t){t.exports=Dx})(que);var Rn=V(op),sp={},rle={get exports(){return sp},set exports(t){sp=t}},up=ie,nle=Do;up.JSON||(up.JSON={stringify:JSON.stringify});var ile=function(i,e,r){return nle(up.JSON.stringify,null,arguments)},ale=ile,ole=ale;(function(t){t.exports=ole})(rle);var es=V(sp),lp={},sle={get exports(){return lp},set exports(t){lp=t}},ule=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",lle=TypeError,cle=function(t,i){if(t<i)throw lle("Not enough arguments");return t},Mx=We,hle=Do,dle=Ze,fle=ule,vle=Lo,ple=bl,gle=cle,yle=Mx.Function,mle=/MSIE .\./.test(vle)||fle&&function(){var t=Mx.Bun.version.split(".");return t.length<3||t[0]==0&&(t[1]<3||t[1]==3&&t[2]==0)}(),Nx=function(t,i){var e=i?2:1;return mle?function(r,n){var a=gle(arguments.length,1)>e,o=dle(r)?r:yle(r),s=a?ple(arguments,e):[],u=a?function(){hle(o,this,s)}:o;return i?t(u,n):t(u)}:t},$le=q,Fx=We,ble=Nx,zw=ble(Fx.setInterval,!0);$le({global:!0,bind:!0,forced:Fx.setInterval!==zw},{setInterval:zw});var wle=q,Bx=We,_le=Nx,Hw=_le(Bx.setTimeout,!0);wle({global:!0,bind:!0,forced:Bx.setTimeout!==Hw},{setTimeout:Hw});var Ele=ie,Sle=Ele.setTimeout;(function(t){t.exports=Sle})(sle);var pr=V(lp),cp={},Ole={get exports(){return cp},set exports(t){cp=t}},Tle=Nt,Ww=Vo,xle=ir,Ple=function(i){for(var e=Tle(this),r=xle(e),n=arguments.length,a=Ww(n>1?arguments[1]:void 0,r),o=n>2?arguments[2]:void 0,s=o===void 0?r:Ww(o,r);s>a;)e[a++]=i;return e},kle=q,Ile=Ple;kle({target:"Array",proto:!0},{fill:Ile});var Cle=tt,Ale=Cle("Array").fill,Rle=Ne,Dle=Ale,Uh=Array.prototype,Mle=function(t){var i=t.fill;return t===Uh||Rle(Uh,t)&&i===Uh.fill?Dle:i},Nle=Mle,Fle=Nle;(function(t){t.exports=Fle})(Ole);var ts=V(cp);/*! 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 tr(){return tr=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var e=arguments[i];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},tr.apply(this,arguments)}function Gt(t,i){t.prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i}function Ns(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var hp;typeof Object.assign!="function"?hp=function(i){if(i==null)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(i),r=1;r<arguments.length;r++){var n=arguments[r];if(n!=null)for(var a in n)n.hasOwnProperty(a)&&(e[a]=n[a])}return e}:hp=Object.assign;var zn=hp,Vw=["","webkit","Moz","MS","ms","o"],Ble=typeof document>"u"?{style:{}}:document.createElement("div"),Lle="function",Oi=Math.round,Hn=Math.abs,uy=Date.now;function Fl(t,i){for(var e,r,n=i[0].toUpperCase()+i.slice(1),a=0;a<Vw.length;){if(e=Vw[a],r=e?e+n:i,r in t)return r;a++}}var Tr;typeof window>"u"?Tr={}:Tr=window;var Lx=Fl(Ble.style,"touchAction"),jx=Lx!==void 0;function jle(){if(!jx)return!1;var t={},i=Tr.CSS&&Tr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return t[e]=i?Tr.CSS.supports("touch-action",e):!0}),t}var zx="compute",Hx="auto",dp="manipulation",Dn="none",eo="pan-x",to="pan-y",Fs=jle(),zle=/mobile|tablet|ip(ad|hone|od)|android/i,Wx="ontouchstart"in Tr,Hle=Fl(Tr,"PointerEvent")!==void 0,Wle=Wx&&zle.test(navigator.userAgent),rs="touch",Vle="pen",ly="mouse",Ule="kinect",Gle=25,vt=1,ri=2,je=4,Tt=8,Nu=1,ns=2,is=4,as=8,ji=16,gr=ns|is,Mn=as|ji,Vx=gr|Mn,Ux=["x","y"],Fu=["clientX","clientY"];function xr(t,i,e){var r;if(t)if(t.forEach)t.forEach(i,e);else if(t.length!==void 0)for(r=0;r<t.length;)i.call(e,t[r],r,t),r++;else for(r in t)t.hasOwnProperty(r)&&i.call(e,t[r],r,t)}function Bl(t,i){return typeof t===Lle?t.apply(i&&i[0]||void 0,i):t}function Tn(t,i){return t.indexOf(i)>-1}function Kle(t){if(Tn(t,Dn))return Dn;var i=Tn(t,eo),e=Tn(t,to);return i&&e?Dn:i||e?i?eo:to:Tn(t,dp)?dp:Hx}var Gx=function(){function t(e,r){this.manager=e,this.set(r)}var i=t.prototype;return i.set=function(r){r===zx&&(r=this.compute()),jx&&this.manager.element.style&&Fs[r]&&(this.manager.element.style[Lx]=r),this.actions=r.toLowerCase().trim()},i.update=function(){this.set(this.manager.options.touchAction)},i.compute=function(){var r=[];return xr(this.manager.recognizers,function(n){Bl(n.options.enable,[n])&&(r=r.concat(n.getTouchAction()))}),Kle(r.join(" "))},i.preventDefaults=function(r){var n=r.srcEvent,a=r.offsetDirection;if(this.manager.session.prevented){n.preventDefault();return}var o=this.actions,s=Tn(o,Dn)&&!Fs[Dn],u=Tn(o,to)&&!Fs[to],l=Tn(o,eo)&&!Fs[eo];if(s){var c=r.pointers.length===1,h=r.distance<2,d=r.deltaTime<250;if(c&&h&&d)return}if(!(l&&u)&&(s||u&&a&gr||l&&a&Mn))return this.preventSrc(n)},i.preventSrc=function(r){this.manager.session.prevented=!0,r.preventDefault()},t}();function cy(t,i){for(;t;){if(t===i)return!0;t=t.parentNode}return!1}function Kx(t){var i=t.length;if(i===1)return{x:Oi(t[0].clientX),y:Oi(t[0].clientY)};for(var e=0,r=0,n=0;n<i;)e+=t[n].clientX,r+=t[n].clientY,n++;return{x:Oi(e/i),y:Oi(r/i)}}function Uw(t){for(var i=[],e=0;e<t.pointers.length;)i[e]={clientX:Oi(t.pointers[e].clientX),clientY:Oi(t.pointers[e].clientY)},e++;return{timeStamp:uy(),pointers:i,center:Kx(i),deltaX:t.deltaX,deltaY:t.deltaY}}function Bu(t,i,e){e||(e=Ux);var r=i[e[0]]-t[e[0]],n=i[e[1]]-t[e[1]];return Math.sqrt(r*r+n*n)}function fp(t,i,e){e||(e=Ux);var r=i[e[0]]-t[e[0]],n=i[e[1]]-t[e[1]];return Math.atan2(n,r)*180/Math.PI}function qx(t,i){return t===i?Nu:Hn(t)>=Hn(i)?t<0?ns:is:i<0?as:ji}function qle(t,i){var e=i.center,r=t.offsetDelta||{},n=t.prevDelta||{},a=t.prevInput||{};(i.eventType===vt||a.eventType===je)&&(n=t.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=t.offsetDelta={x:e.x,y:e.y}),i.deltaX=n.x+(e.x-r.x),i.deltaY=n.y+(e.y-r.y)}function Yx(t,i,e){return{x:i/t||0,y:e/t||0}}function Yle(t,i){return Bu(i[0],i[1],Fu)/Bu(t[0],t[1],Fu)}function Xle(t,i){return fp(i[1],i[0],Fu)+fp(t[1],t[0],Fu)}function Qle(t,i){var e=t.lastInterval||i,r=i.timeStamp-e.timeStamp,n,a,o,s;if(i.eventType!==Tt&&(r>Gle||e.velocity===void 0)){var u=i.deltaX-e.deltaX,l=i.deltaY-e.deltaY,c=Yx(r,u,l);a=c.x,o=c.y,n=Hn(c.x)>Hn(c.y)?c.x:c.y,s=qx(u,l),t.lastInterval=i}else n=e.velocity,a=e.velocityX,o=e.velocityY,s=e.direction;i.velocity=n,i.velocityX=a,i.velocityY=o,i.direction=s}function Zle(t,i){var e=t.session,r=i.pointers,n=r.length;e.firstInput||(e.firstInput=Uw(i)),n>1&&!e.firstMultiple?e.firstMultiple=Uw(i):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=i.center=Kx(r);i.timeStamp=uy(),i.deltaTime=i.timeStamp-a.timeStamp,i.angle=fp(s,u),i.distance=Bu(s,u),qle(e,i),i.offsetDirection=qx(i.deltaX,i.deltaY);var l=Yx(i.deltaTime,i.deltaX,i.deltaY);i.overallVelocityX=l.x,i.overallVelocityY=l.y,i.overallVelocity=Hn(l.x)>Hn(l.y)?l.x:l.y,i.scale=o?Yle(o.pointers,r):1,i.rotation=o?Xle(o.pointers,r):0,i.maxPointers=e.prevInput?i.pointers.length>e.prevInput.maxPointers?i.pointers.length:e.prevInput.maxPointers:i.pointers.length,Qle(e,i);var c=t.element,h=i.srcEvent,d;h.composedPath?d=h.composedPath()[0]:h.path?d=h.path[0]:d=h.target,cy(d,c)&&(c=d),i.target=c}function Jle(t,i,e){var r=e.pointers.length,n=e.changedPointers.length,a=i&vt&&r-n===0,o=i&(je|Tt)&&r-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(t.session={}),e.eventType=i,Zle(t,e),t.emit("hammer.input",e),t.recognize(e),t.session.prevInput=e}function ro(t){return t.trim().split(/\s+/g)}function Ma(t,i,e){xr(ro(i),function(r){t.addEventListener(r,e,!1)})}function Na(t,i,e){xr(ro(i),function(r){t.removeEventListener(r,e,!1)})}function Gw(t){var i=t.ownerDocument||t;return i.defaultView||i.parentWindow||window}var fa=function(){function t(e,r){var n=this;this.manager=e,this.callback=r,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(a){Bl(e.options.enable,[e])&&n.handler(a)},this.init()}var i=t.prototype;return i.handler=function(){},i.init=function(){this.evEl&&Ma(this.element,this.evEl,this.domHandler),this.evTarget&&Ma(this.target,this.evTarget,this.domHandler),this.evWin&&Ma(Gw(this.element),this.evWin,this.domHandler)},i.destroy=function(){this.evEl&&Na(this.element,this.evEl,this.domHandler),this.evTarget&&Na(this.target,this.evTarget,this.domHandler),this.evWin&&Na(Gw(this.element),this.evWin,this.domHandler)},t}();function Wn(t,i,e){if(t.indexOf&&!e)return t.indexOf(i);for(var r=0;r<t.length;){if(e&&t[r][e]==i||!e&&t[r]===i)return r;r++}return-1}var ece={pointerdown:vt,pointermove:ri,pointerup:je,pointercancel:Tt,pointerout:Tt},tce={2:rs,3:Vle,4:ly,5:Ule},Xx="pointerdown",Qx="pointermove pointerup pointercancel";Tr.MSPointerEvent&&!Tr.PointerEvent&&(Xx="MSPointerDown",Qx="MSPointerMove MSPointerUp MSPointerCancel");var Zx=function(t){Gt(i,t);function i(){var r,n=i.prototype;return n.evEl=Xx,n.evWin=Qx,r=t.apply(this,arguments)||this,r.store=r.manager.session.pointerEvents=[],r}var e=i.prototype;return e.handler=function(n){var a=this.store,o=!1,s=n.type.toLowerCase().replace("ms",""),u=ece[s],l=tce[n.pointerType]||n.pointerType,c=l===rs,h=Wn(a,n.pointerId,"pointerId");u&vt&&(n.button===0||c)?h<0&&(a.push(n),h=a.length-1):u&(je|Tt)&&(o=!0),!(h<0)&&(a[h]=n,this.callback(this.manager,u,{pointers:a,changedPointers:[n],pointerType:l,srcEvent:n}),o&&a.splice(h,1))},i}(fa);function no(t){return Array.prototype.slice.call(t,0)}function hy(t,i,e){for(var r=[],n=[],a=0;a<t.length;){var o=i?t[a][i]:t[a];Wn(n,o)<0&&r.push(t[a]),n[a]=o,a++}return e&&(i?r=r.sort(function(s,u){return s[i]>u[i]}):r=r.sort()),r}var rce={touchstart:vt,touchmove:ri,touchend:je,touchcancel:Tt},nce="touchstart touchmove touchend touchcancel",dy=function(t){Gt(i,t);function i(){var r;return i.prototype.evTarget=nce,r=t.apply(this,arguments)||this,r.targetIds={},r}var e=i.prototype;return e.handler=function(n){var a=rce[n.type],o=ice.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:rs,srcEvent:n})},i}(fa);function ice(t,i){var e=no(t.touches),r=this.targetIds;if(i&(vt|ri)&&e.length===1)return r[e[0].identifier]=!0,[e,e];var n,a,o=no(t.changedTouches),s=[],u=this.target;if(a=e.filter(function(l){return cy(l.target,u)}),i===vt)for(n=0;n<a.length;)r[a[n].identifier]=!0,n++;for(n=0;n<o.length;)r[o[n].identifier]&&s.push(o[n]),i&(je|Tt)&&delete r[o[n].identifier],n++;if(s.length)return[hy(a.concat(s),"identifier",!0),s]}var ace={mousedown:vt,mousemove:ri,mouseup:je},oce="mousedown",sce="mousemove mouseup",fy=function(t){Gt(i,t);function i(){var r,n=i.prototype;return n.evEl=oce,n.evWin=sce,r=t.apply(this,arguments)||this,r.pressed=!1,r}var e=i.prototype;return e.handler=function(n){var a=ace[n.type];a&vt&&n.button===0&&(this.pressed=!0),a&ri&&n.which!==1&&(a=je),this.pressed&&(a&je&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[n],changedPointers:[n],pointerType:ly,srcEvent:n}))},i}(fa),uce=2500,Kw=25;function qw(t){var i=t.changedPointers,e=i[0];if(e.identifier===this.primaryTouch){var r={x:e.clientX,y:e.clientY},n=this.lastTouches;this.lastTouches.push(r);var a=function(){var s=n.indexOf(r);s>-1&&n.splice(s,1)};setTimeout(a,uce)}}function lce(t,i){t&vt?(this.primaryTouch=i.changedPointers[0].identifier,qw.call(this,i)):t&(je|Tt)&&qw.call(this,i)}function cce(t){for(var i=t.srcEvent.clientX,e=t.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var n=this.lastTouches[r],a=Math.abs(i-n.x),o=Math.abs(e-n.y);if(a<=Kw&&o<=Kw)return!0}return!1}var Jx=function(){var t=function(i){Gt(e,i);function e(n,a){var o;return o=i.call(this,n,a)||this,o.handler=function(s,u,l){var c=l.pointerType===rs,h=l.pointerType===ly;if(!(h&&l.sourceCapabilities&&l.sourceCapabilities.firesTouchEvents)){if(c)lce.call(Ns(Ns(o)),u,l);else if(h&&cce.call(Ns(Ns(o)),l))return;o.callback(s,u,l)}},o.touch=new dy(o.manager,o.handler),o.mouse=new fy(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}var r=e.prototype;return r.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(fa);return t}();function hce(t){var i,e=t.options.inputClass;return e?i=e:Hle?i=Zx:Wle?i=dy:Wx?i=Jx:i=fy,new i(t,Jle)}function Ti(t,i,e){return Array.isArray(t)?(xr(t,e[i],e),!0):!1}var ru=1,Ht=2,zi=4,en=8,Pr=en,io=16,hr=32,dce=1;function fce(){return dce++}function Bs(t,i){var e=i.manager;return e?e.get(t):t}function Yw(t){return t&io?"cancel":t&en?"end":t&zi?"move":t&Ht?"start":""}var os=function(){function t(e){e===void 0&&(e={}),this.options=tr({enable:!0},e),this.id=fce(),this.manager=null,this.state=ru,this.simultaneous={},this.requireFail=[]}var i=t.prototype;return i.set=function(r){return zn(this.options,r),this.manager&&this.manager.touchAction.update(),this},i.recognizeWith=function(r){if(Ti(r,"recognizeWith",this))return this;var n=this.simultaneous;return r=Bs(r,this),n[r.id]||(n[r.id]=r,r.recognizeWith(this)),this},i.dropRecognizeWith=function(r){return Ti(r,"dropRecognizeWith",this)?this:(r=Bs(r,this),delete this.simultaneous[r.id],this)},i.requireFailure=function(r){if(Ti(r,"requireFailure",this))return this;var n=this.requireFail;return r=Bs(r,this),Wn(n,r)===-1&&(n.push(r),r.requireFailure(this)),this},i.dropRequireFailure=function(r){if(Ti(r,"dropRequireFailure",this))return this;r=Bs(r,this);var n=Wn(this.requireFail,r);return n>-1&&this.requireFail.splice(n,1),this},i.hasRequireFailures=function(){return this.requireFail.length>0},i.canRecognizeWith=function(r){return!!this.simultaneous[r.id]},i.emit=function(r){var n=this,a=this.state;function o(s){n.manager.emit(s,r)}a<en&&o(n.options.event+Yw(a)),o(n.options.event),r.additionalEvent&&o(r.additionalEvent),a>=en&&o(n.options.event+Yw(a))},i.tryEmit=function(r){if(this.canEmit())return this.emit(r);this.state=hr},i.canEmit=function(){for(var r=0;r<this.requireFail.length;){if(!(this.requireFail[r].state&(hr|ru)))return!1;r++}return!0},i.recognize=function(r){var n=zn({},r);if(!Bl(this.options.enable,[this,n])){this.reset(),this.state=hr;return}this.state&(Pr|io|hr)&&(this.state=ru),this.state=this.process(n),this.state&(Ht|zi|en|io)&&this.tryEmit(n)},i.process=function(r){},i.getTouchAction=function(){},i.reset=function(){},t}(),vp=function(t){Gt(i,t);function i(r){var n;return r===void 0&&(r={}),n=t.call(this,tr({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},r))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var e=i.prototype;return e.getTouchAction=function(){return[dp]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,u=n.distance<o.threshold,l=n.deltaTime<o.time;if(this.reset(),n.eventType&vt&&this.count===0)return this.failTimeout();if(u&&l&&s){if(n.eventType!==je)return this.failTimeout();var c=this.pTime?n.timeStamp-this.pTime<o.interval:!0,h=!this.pCenter||Bu(this.pCenter,n.center)<o.posThreshold;this.pTime=n.timeStamp,this.pCenter=n.center,!h||!c?this.count=1:this.count+=1,this._input=n;var d=this.count%o.taps;if(d===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){a.state=Pr,a.tryEmit()},o.interval),Ht):Pr}return hr},e.failTimeout=function(){var n=this;return this._timer=setTimeout(function(){n.state=hr},this.options.interval),hr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(){this.state===Pr&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},i}(os),Hi=function(t){Gt(i,t);function i(r){return r===void 0&&(r={}),t.call(this,tr({pointers:1},r))||this}var e=i.prototype;return e.attrTest=function(n){var a=this.options.pointers;return a===0||n.pointers.length===a},e.process=function(n){var a=this.state,o=n.eventType,s=a&(Ht|zi),u=this.attrTest(n);return s&&(o&Tt||!u)?a|io:s||u?o&je?a|en:a&Ht?a|zi:Ht:hr},i}(os);function eP(t){return t===ji?"down":t===as?"up":t===ns?"left":t===is?"right":""}var vy=function(t){Gt(i,t);function i(r){var n;return r===void 0&&(r={}),n=t.call(this,tr({event:"pan",threshold:10,pointers:1,direction:Vx},r))||this,n.pX=null,n.pY=null,n}var e=i.prototype;return e.getTouchAction=function(){var n=this.options.direction,a=[];return n&gr&&a.push(to),n&Mn&&a.push(eo),a},e.directionTest=function(n){var a=this.options,o=!0,s=n.distance,u=n.direction,l=n.deltaX,c=n.deltaY;return u&a.direction||(a.direction&gr?(u=l===0?Nu:l<0?ns:is,o=l!==this.pX,s=Math.abs(n.deltaX)):(u=c===0?Nu:c<0?as:ji,o=c!==this.pY,s=Math.abs(n.deltaY))),n.direction=u,o&&s>a.threshold&&u&a.direction},e.attrTest=function(n){return Hi.prototype.attrTest.call(this,n)&&(this.state&Ht||!(this.state&Ht)&&this.directionTest(n))},e.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var a=eP(n.direction);a&&(n.additionalEvent=this.options.event+a),t.prototype.emit.call(this,n)},i}(Hi),tP=function(t){Gt(i,t);function i(r){return r===void 0&&(r={}),t.call(this,tr({event:"swipe",threshold:10,velocity:.3,direction:gr|Mn,pointers:1},r))||this}var e=i.prototype;return e.getTouchAction=function(){return vy.prototype.getTouchAction.call(this)},e.attrTest=function(n){var a=this.options.direction,o;return a&(gr|Mn)?o=n.overallVelocity:a&gr?o=n.overallVelocityX:a&Mn&&(o=n.overallVelocityY),t.prototype.attrTest.call(this,n)&&a&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&Hn(o)>this.options.velocity&&n.eventType&je},e.emit=function(n){var a=eP(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},i}(Hi),rP=function(t){Gt(i,t);function i(r){return r===void 0&&(r={}),t.call(this,tr({event:"pinch",threshold:0,pointers:2},r))||this}var e=i.prototype;return e.getTouchAction=function(){return[Dn]},e.attrTest=function(n){return t.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&Ht)},e.emit=function(n){if(n.scale!==1){var a=n.scale<1?"in":"out";n.additionalEvent=this.options.event+a}t.prototype.emit.call(this,n)},i}(Hi),nP=function(t){Gt(i,t);function i(r){return r===void 0&&(r={}),t.call(this,tr({event:"rotate",threshold:0,pointers:2},r))||this}var e=i.prototype;return e.getTouchAction=function(){return[Dn]},e.attrTest=function(n){return t.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&Ht)},i}(Hi),iP=function(t){Gt(i,t);function i(r){var n;return r===void 0&&(r={}),n=t.call(this,tr({event:"press",pointers:1,time:251,threshold:9},r))||this,n._timer=null,n._input=null,n}var e=i.prototype;return e.getTouchAction=function(){return[Hx]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,u=n.distance<o.threshold,l=n.deltaTime>o.time;if(this._input=n,!u||!s||n.eventType&(je|Tt)&&!l)this.reset();else if(n.eventType&vt)this.reset(),this._timer=setTimeout(function(){a.state=Pr,a.tryEmit()},o.time);else if(n.eventType&je)return Pr;return hr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===Pr&&(n&&n.eventType&je?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=uy(),this.manager.emit(this.options.event,this._input)))},i}(os),aP={domEvents:!1,touchAction:zx,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Xw=[[nP,{enable:!1}],[rP,{enable:!1},["rotate"]],[tP,{direction:gr}],[vy,{direction:gr},["swipe"]],[vp],[vp,{event:"doubletap",taps:2},["tap"]],[iP]],vce=1,Qw=2;function Zw(t,i){var e=t.element;if(e.style){var r;xr(t.options.cssProps,function(n,a){r=Fl(e.style,a),i?(t.oldCssProps[r]=e.style[r],e.style[r]=n):e.style[r]=t.oldCssProps[r]||""}),i||(t.oldCssProps={})}}function pce(t,i){var e=document.createEvent("Event");e.initEvent(t,!0,!0),e.gesture=i,i.target.dispatchEvent(e)}var Jw=function(){function t(e,r){var n=this;this.options=zn({},aP,r||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=hce(this),this.touchAction=new Gx(this,this.options.touchAction),Zw(this,!0),xr(this.options.recognizers,function(a){var o=n.add(new a[0](a[1]));a[2]&&o.recognizeWith(a[2]),a[3]&&o.requireFailure(a[3])},this)}var i=t.prototype;return i.set=function(r){return zn(this.options,r),r.touchAction&&this.touchAction.update(),r.inputTarget&&(this.input.destroy(),this.input.target=r.inputTarget,this.input.init()),this},i.stop=function(r){this.session.stopped=r?Qw:vce},i.recognize=function(r){var n=this.session;if(!n.stopped){this.touchAction.preventDefaults(r);var a,o=this.recognizers,s=n.curRecognizer;(!s||s&&s.state&Pr)&&(n.curRecognizer=null,s=null);for(var u=0;u<o.length;)a=o[u],n.stopped!==Qw&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(r):a.reset(),!s&&a.state&(Ht|zi|en)&&(n.curRecognizer=a,s=a),u++}},i.get=function(r){if(r instanceof os)return r;for(var n=this.recognizers,a=0;a<n.length;a++)if(n[a].options.event===r)return n[a];return null},i.add=function(r){if(Ti(r,"add",this))return this;var n=this.get(r.options.event);return n&&this.remove(n),this.recognizers.push(r),r.manager=this,this.touchAction.update(),r},i.remove=function(r){if(Ti(r,"remove",this))return this;var n=this.get(r);if(r){var a=this.recognizers,o=Wn(a,n);o!==-1&&(a.splice(o,1),this.touchAction.update())}return this},i.on=function(r,n){if(r===void 0||n===void 0)return this;var a=this.handlers;return xr(ro(r),function(o){a[o]=a[o]||[],a[o].push(n)}),this},i.off=function(r,n){if(r===void 0)return this;var a=this.handlers;return xr(ro(r),function(o){n?a[o]&&a[o].splice(Wn(a[o],n),1):delete a[o]}),this},i.emit=function(r,n){this.options.domEvents&&pce(r,n);var a=this.handlers[r]&&this.handlers[r].slice();if(!(!a||!a.length)){n.type=r,n.preventDefault=function(){n.srcEvent.preventDefault()};for(var o=0;o<a.length;)a[o](n),o++}},i.destroy=function(){this.element&&Zw(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),gce={touchstart:vt,touchmove:ri,touchend:je,touchcancel:Tt},yce="touchstart",mce="touchstart touchmove touchend touchcancel",$ce=function(t){Gt(i,t);function i(){var r,n=i.prototype;return n.evTarget=yce,n.evWin=mce,r=t.apply(this,arguments)||this,r.started=!1,r}var e=i.prototype;return e.handler=function(n){var a=gce[n.type];if(a===vt&&(this.started=!0),!!this.started){var o=bce.call(this,n,a);a&(je|Tt)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:rs,srcEvent:n})}},i}(fa);function bce(t,i){var e=no(t.touches),r=no(t.changedTouches);return i&(je|Tt)&&(e=hy(e.concat(r),"identifier",!0)),[e,r]}function oP(t,i,e){var r="DEPRECATED METHOD: "+i+`
|
|
71
|
+
`+e+` AT
|
|
72
|
+
`;return function(){var n=new Error("get-stack-trace"),a=n&&n.stack?n.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,r,a),t.apply(this,arguments)}}var sP=oP(function(t,i,e){for(var r=Object.keys(i),n=0;n<r.length;)(!e||e&&t[r[n]]===void 0)&&(t[r[n]]=i[r[n]]),n++;return t},"extend","Use `assign`."),wce=oP(function(t,i){return sP(t,i,!0)},"merge","Use `assign`.");function _ce(t,i,e){var r=i.prototype,n;n=t.prototype=Object.create(r),n.constructor=t,n._super=r,e&&zn(n,e)}function e0(t,i){return function(){return t.apply(i,arguments)}}var uP=function(){var t=function(e,r){return r===void 0&&(r={}),new Jw(e,tr({recognizers:Xw.concat()},r))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=Vx,t.DIRECTION_DOWN=ji,t.DIRECTION_LEFT=ns,t.DIRECTION_RIGHT=is,t.DIRECTION_UP=as,t.DIRECTION_HORIZONTAL=gr,t.DIRECTION_VERTICAL=Mn,t.DIRECTION_NONE=Nu,t.DIRECTION_DOWN=ji,t.INPUT_START=vt,t.INPUT_MOVE=ri,t.INPUT_END=je,t.INPUT_CANCEL=Tt,t.STATE_POSSIBLE=ru,t.STATE_BEGAN=Ht,t.STATE_CHANGED=zi,t.STATE_ENDED=en,t.STATE_RECOGNIZED=Pr,t.STATE_CANCELLED=io,t.STATE_FAILED=hr,t.Manager=Jw,t.Input=fa,t.TouchAction=Gx,t.TouchInput=dy,t.MouseInput=fy,t.PointerEventInput=Zx,t.TouchMouseInput=Jx,t.SingleTouchInput=$ce,t.Recognizer=os,t.AttrRecognizer=Hi,t.Tap=vp,t.Pan=vy,t.Swipe=tP,t.Pinch=rP,t.Rotate=nP,t.Press=iP,t.on=Ma,t.off=Na,t.each=xr,t.merge=wce,t.extend=sP,t.bindFn=e0,t.assign=zn,t.inherit=_ce,t.bindFn=e0,t.prefixed=Fl,t.toArray=no,t.inArray=Wn,t.uniqueArray=hy,t.splitStr=ro,t.boolOrFn=Bl,t.hasParent=cy,t.addEventListeners=Ma,t.removeEventListeners=Na,t.defaults=zn({},aP,{preset:Xw}),t}();uP.defaults;var Ece=uP;function lP(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=Sce(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:n}}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(t)},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 Sce(t,i){var e;if(t){if(typeof t=="string")return t0(t,i);var r=st(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ei(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t0(t,i)}}function t0(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}pn("DELETE");function Ll(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];return Oce(i.length?i:[Mu()])}function Oce(t){var i=Tce(t),e=xe(i,3),r=e[0],n=e[1],a=e[2],o=1,s=function(){var l=2091639*r+o*23283064365386963e-26;return r=n,n=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=t,s.version="0.9",s}function Tce(){for(var t=xce(),i=t(" "),e=t(" "),r=t(" "),n=0;n<arguments.length;n++)i-=t(n<0||arguments.length<=n?void 0:arguments[n]),i<0&&(i+=1),e-=t(n<0||arguments.length<=n?void 0:arguments[n]),e<0&&(e+=1),r-=t(n<0||arguments.length<=n?void 0:arguments[n]),r<0&&(r+=1);return[i,e,r]}function xce(){var t=4022871197;return function(i){for(var e=i.toString(),r=0;r<e.length;r++){t+=e.charCodeAt(r);var n=.02519603282416938*t;t=n>>>0,n-=t,n*=t,t=n>>>0,n-=t,t+=n*4294967296}return(t>>>0)*23283064365386963e-26}}function Pce(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}}}var py=typeof window<"u"?window.Hammer||Ece:function(){return Pce()};function dr(t){var i=this,e;this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){i._dom.overlay.parentNode.removeChild(i._dom.overlay)});var r=py(this._dom.overlay);r.on("tap",C(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){r.destroy()});var n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];ge(n).call(n,function(a){r.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){kce(a.target,t)||i.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",i._onClick)})),this._escListener=function(a){("key"in a?a.key==="Escape":a.keyCode===27)&&i.deactivate()}}lT(dr.prototype);dr.current=null;dr.prototype.destroy=function(){var t,i;this.deactivate();var e=lP(An(t=Or(i=this._cleanupQueue).call(i,0)).call(t)),r;try{for(e.s();!(r=e.n()).done;){var n=r.value;n()}}catch(a){e.e(a)}finally{e.f()}};dr.prototype.activate=function(){dr.current&&dr.current.deactivate(),dr.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)};dr.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")};dr.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};function kce(t,i){for(;t;){if(t===i)return!0;t=t.parentNode}return!1}var Ice=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Cce=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Ace=/^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,Rce=/^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 Ur(t){if(t)for(;t.hasChildNodes()===!0;){var i=t.firstChild;i&&(Ur(i),t.removeChild(i))}}function Kr(t){return t instanceof String||typeof t=="string"}function r0(t){return he(t)==="object"&&t!==null}function Vn(t,i,e,r){var n=!1;r===!0&&(n=i[e]===null&&t[e]!==void 0),n?delete t[e]:t[e]=i[e]}function cP(t,i){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(var r in t)if(i[r]!==void 0)if(i[r]===null||he(i[r])!=="object")Vn(t,i,r,e);else{var n=t[r],a=i[r];r0(n)&&r0(a)&&cP(n,a,e)}}function va(t,i,e){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(ve(e))throw new TypeError("Arrays are not supported by deepExtend");for(var n=0;n<t.length;n++){var a=t[n];if(Object.prototype.hasOwnProperty.call(e,a))if(e[a]&&e[a].constructor===Object)i[a]===void 0&&(i[a]={}),i[a].constructor===Object?$e(i[a],e[a],!1,r):Vn(i,e,a,r);else{if(ve(e[a]))throw new TypeError("Arrays are not supported by deepExtend");Vn(i,e,a,r)}}return i}function Lu(t,i,e){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(ve(e))throw new TypeError("Arrays are not supported by deepExtend");for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&!vr(t).call(t,n))if(e[n]&&e[n].constructor===Object)i[n]===void 0&&(i[n]={}),i[n].constructor===Object?$e(i[n],e[n]):Vn(i,e,n,r);else if(ve(e[n])){i[n]=[];for(var a=0;a<e[n].length;a++)i[n].push(e[n][a])}else Vn(i,e,n,r);return i}function $e(t,i){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n)||e===!0)if(he(i[n])==="object"&&i[n]!==null&&Iw(i[n])===Object.prototype)t[n]===void 0?t[n]=$e({},i[n],e):he(t[n])==="object"&&t[n]!==null&&Iw(t[n])===Object.prototype?$e(t[n],i[n],e):Vn(t,i,n,r);else if(ve(i[n])){var a;t[n]=st(a=i[n]).call(a)}else Vn(t,i,n,r);return t}function ju(t,i){var e;return oy(e=[]).call(e,lr(t),[i])}function Dce(t){return st(t).call(t)}function Mce(t){return t.getBoundingClientRect().left}function Nce(t){return t.getBoundingClientRect().top}function ee(t,i){if(ve(t))for(var e=t.length,r=0;r<e;r++)i(t[r],r,t);else for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&i(t[n],n,t)}function Fce(t,i,e,r){if(t.addEventListener){var n;r===void 0&&(r=!1),i==="mousewheel"&&vr(n=navigator.userAgent).call(n,"Firefox")&&(i="DOMMouseScroll"),t.addEventListener(i,e,r)}else t.attachEvent("on"+i,e)}function Bce(t,i,e,r){if(t.removeEventListener){var n;r===void 0&&(r=!1),i==="mousewheel"&&vr(n=navigator.userAgent).call(n,"Firefox")&&(i="DOMMouseScroll"),t.removeEventListener(i,e,r)}else t.detachEvent("on"+i,e)}function gy(t){var i;switch(t.length){case 3:case 4:return i=Cce.exec(t),i?{r:Xt(i[1]+i[1],16),g:Xt(i[2]+i[2],16),b:Xt(i[3]+i[3],16)}:null;case 6:case 7:return i=Ice.exec(t),i?{r:Xt(i[1],16),g:Xt(i[2],16),b:Xt(i[3],16)}:null;default:return null}}function jt(t,i){if(vr(t).call(t,"rgba"))return t;if(vr(t).call(t,"rgb")){var e=t.substr(ae(t).call(t,"(")+1).replace(")","").split(",");return"rgba("+e[0]+","+e[1]+","+e[2]+","+i+")"}else{var r=gy(t);return r==null?t:"rgba("+r.r+","+r.g+","+r.b+","+i+")"}}function hP(t,i,e){var r;return"#"+st(r=((1<<24)+(t<<16)+(i<<8)+e).toString(16)).call(r,1)}function pp(t,i){if(Kr(t)){var e=t;if(fP(e)){var r,n=Li(r=e.substr(4).substr(0,e.length-5).split(",")).call(r,function(d){return Xt(d)});e=hP(n[0],n[1],n[2])}if(dP(e)===!0){var a=Lce(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=gp(s.h,s.s,s.v),l=gp(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(i){var c={background:t.background||i.background,border:t.border||i.border,highlight:Kr(t.highlight)?{border:t.highlight,background:t.highlight}:{background:t.highlight&&t.highlight.background||i.highlight.background,border:t.highlight&&t.highlight.border||i.highlight.border},hover:Kr(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||i.hover.border,background:t.hover&&t.hover.background||i.hover.background}};return c}else{var h={background:t.background||void 0,border:t.border||void 0,highlight:Kr(t.highlight)?{border:t.highlight,background:t.highlight}:{background:t.highlight&&t.highlight.background||void 0,border:t.highlight&&t.highlight.border||void 0},hover:Kr(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||void 0,background:t.hover&&t.hover.background||void 0}};return h}}function xa(t,i,e){t=t/255,i=i/255,e=e/255;var r=Math.min(t,Math.min(i,e)),n=Math.max(t,Math.max(i,e));if(r===n)return{h:0,s:0,v:r};var a=t===r?i-e:e===r?t-i:e-t,o=t===r?3:e===r?1:5,s=60*(o-a/(n-r))/360,u=(n-r)/n,l=n;return{h:s,s:u,v:l}}function nu(t,i,e){var r,n,a,o=Math.floor(t*6),s=t*6-o,u=e*(1-i),l=e*(1-s*i),c=e*(1-(1-s)*i);switch(o%6){case 0:r=e,n=c,a=u;break;case 1:r=l,n=e,a=u;break;case 2:r=u,n=e,a=c;break;case 3:r=u,n=l,a=e;break;case 4:r=c,n=u,a=e;break;case 5:r=e,n=u,a=l;break}return{r:Math.floor(r*255),g:Math.floor(n*255),b:Math.floor(a*255)}}function gp(t,i,e){var r=nu(t,i,e);return hP(r.r,r.g,r.b)}function Lce(t){var i=gy(t);if(!i)throw new TypeError("'".concat(t,"' is not a valid color."));return xa(i.r,i.g,i.b)}function dP(t){var i=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t);return i}function fP(t){return Ace.test(t)}function jce(t){return Rce.test(t)}function tn(t){if(t===null||he(t)!=="object")return null;if(t instanceof Element)return t;var i=Rn(t);for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&he(t[e])=="object"&&(i[e]=tn(t[e]));return i}function Lt(t,i,e){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},n=function(v){return v!=null},a=function(v){return v!==null&&he(v)==="object"},o=function(v){for(var g in v)if(Object.prototype.hasOwnProperty.call(v,g))return!1;return!0};if(!a(t))throw new Error("Parameter mergeTarget must be an object");if(!a(i))throw new Error("Parameter options must be an object");if(!n(e))throw new Error("Parameter option must have a value");if(!a(r))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=i[e],l=a(r)&&!o(r),c=l?r[e]:void 0,h=c?c.enabled:void 0;if(u!==void 0){if(typeof u=="boolean"){a(t[e])||(t[e]={}),t[e].enabled=u;return}if(u===null&&!a(t[e]))if(n(c))t[e]=Rn(c);else return;if(a(u)){var d=!0;u.enabled!==void 0?d=u.enabled:h!==void 0&&(d=c.enabled),s(t,i,e),t[e].enabled=d}}}var zce={linear:function(i){return i},easeInQuad:function(i){return i*i},easeOutQuad:function(i){return i*(2-i)},easeInOutQuad:function(i){return i<.5?2*i*i:-1+(4-2*i)*i},easeInCubic:function(i){return i*i*i},easeOutCubic:function(i){return--i*i*i+1},easeInOutCubic:function(i){return i<.5?4*i*i*i:(i-1)*(2*i-2)*(2*i-2)+1},easeInQuart:function(i){return i*i*i*i},easeOutQuart:function(i){return 1- --i*i*i*i},easeInOutQuart:function(i){return i<.5?8*i*i*i*i:1-8*--i*i*i*i},easeInQuint:function(i){return i*i*i*i*i},easeOutQuint:function(i){return 1+--i*i*i*i*i},easeInOutQuint:function(i){return i<.5?16*i*i*i*i*i:1+16*--i*i*i*i*i}};function Gr(t,i){var e;ve(i)||(i=[i]);var r=lP(t),n;try{for(r.s();!(n=r.n()).done;){var a=n.value;if(a){e=a[i[0]];for(var o=1;o<i.length;o++)e&&(e=e[i[o]]);if(typeof e<"u")break}}}catch(s){r.e(s)}finally{r.f()}return e}var Hce={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"},Wce=function(){function t(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;N(this,t),this.pixelRatio=i,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 F(t,[{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 Hce[e]}},{key:"setColor",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e!=="none"){var n,a=this._isColorString(e);if(a!==void 0&&(e=a),Kr(e)===!0){if(fP(e)===!0){var o=e.substr(4).substr(0,e.length-5).split(",");n={r:o[0],g:o[1],b:o[2],a:1}}else if(jce(e)===!0){var s=e.substr(5).substr(0,e.length-6).split(",");n={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(dP(e)===!0){var u=gy(e);n={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";n={r:e.r,g:e.g,b:e.b,a:l}}if(n===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: "+es(e));this._setColor(n,r)}}},{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,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;r===!0&&(this.previousColor=Le({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",pr(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 r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;r===!0&&(this.initialColor=Le({},e)),this.color=e;var n=xa(e.r,e.g,e.b),a=2*Math.PI,o=this.r*n.s,s=this.centerCoordinates.x+o*Math.sin(a*n.h),u=this.centerCoordinates.y+o*Math.cos(a*n.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 r=xa(this.color.r,this.color.g,this.color.b);r.v=e/100;var n=nu(r.h,r.s,r.v);n.a=this.color.a,this.color=n,this._updatePicker()}},{key:"_updatePicker",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,r=xa(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);var a=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,a,o),n.putImageData(this.hueCircle,0,0),n.fillStyle="rgba(0,0,0,"+(1-r.v)+")",n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),ts(n).call(n),this.brightnessRange.value=100*r.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,r,n,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=C(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=C(r=this._apply).call(r,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=C(n=this._save).call(n,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=C(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 py(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",function(r){r.isFirst&&e._moveSelector(r)}),this.hammer.on("tap",function(r){e._moveSelector(r)}),this.hammer.on("panstart",function(r){e._moveSelector(r)}),this.hammer.on("panmove",function(r){e._moveSelector(r)}),this.hammer.on("panend",function(r){e._moveSelector(r)})}},{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 r=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,r,n);var a,o,s,u;this.centerCoordinates={x:r*.5,y:n*.5},this.r=.49*r;var l=2*Math.PI/360,c=1/360,h=1/this.r,d;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),d=nu(s*c,u*h,1),e.fillStyle="rgb("+d.r+","+d.g+","+d.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,r,n)}this.generated=!0}},{key:"_moveSelector",value:function(e){var r=this.colorPickerDiv.getBoundingClientRect(),n=e.center.x-r.left,a=e.center.y-r.top,o=.5*this.colorPickerDiv.clientHeight,s=.5*this.colorPickerDiv.clientWidth,u=n-s,l=a-o,c=Math.atan2(u,l),h=.98*Math.min(Math.sqrt(u*u+l*l),s),d=Math.cos(c)*h+o,f=Math.sin(c)*h+s;this.colorPickerSelector.style.top=d-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=f-.5*this.colorPickerSelector.clientWidth+"px";var v=c/(2*Math.PI);v=v<0?v+1:v;var g=h/this.r,b=xa(this.color.r,this.color.g,this.color.b);b.h=v,b.s=g;var p=nu(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+")"}}]),t}();function yp(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];if(i.length<1)throw new TypeError("Invalid arguments.");if(i.length===1)return document.createTextNode(i[0]);var r=document.createElement(i[0]);return r.appendChild(yp.apply(void 0,lr(st(i).call(i,1)))),r}var Vce=function(){function t(i,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){return!1};N(this,t),this.parent=i,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},Le(this.options,this.defaultOptions),this.configureOptions=r,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Wce(n),this.wrapper=void 0}return F(t,[{key:"setOptions",value:function(e){if(e!==void 0){this.popupHistory={},this._removePopup();var r=!0;if(typeof e=="string")this.options.filter=e;else if(ve(e))this.options.filter=e.join();else if(he(e)==="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),St(e)!==void 0&&(this.options.filter=St(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(r=e.enabled)}else typeof e=="boolean"?(this.options.filter=!0,r=e):typeof e=="function"&&(this.options.filter=e,r=!0);St(this.options)===!1&&(r=!1),this.options.enabled=r}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=St(this.options),r=0,n=!1;for(var a in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,a)&&(this.allowCreation=!1,n=!1,typeof e=="function"?(n=e(a,[]),n=n||this._handleObject(this.configureOptions[a],[a],!0)):(e===!0||ae(e).call(e,a)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,r>0&&this._makeItem([]),this._makeHeader(a),this._handleObject(this.configureOptions[a],[a])),r++);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 r=this.moduleOptions,n=0;n<e.length;n++)if(r[e[n]]!==void 0)r=r[e[n]];else{r=void 0;break}return r}},{key:"_makeItem",value:function(e){if(this.allowCreation===!0){var r=document.createElement("div");r.className="vis-configuration vis-config-item vis-config-s"+e.length;for(var n=arguments.length,a=new Array(n>1?n-1:0),o=1;o<n;o++)a[o-1]=arguments[o];return ge(a).call(a,function(s){r.appendChild(s)}),this.domElements.push(r),this.domElements.length}return 0}},{key:"_makeHeader",value:function(e){var r=document.createElement("div");r.className="vis-configuration vis-config-header",r.innerText=e,this._makeItem([],r)}},{key:"_makeLabel",value:function(e,r){var n=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"+r.length,n===!0){for(;a.firstChild;)a.removeChild(a.firstChild);a.appendChild(yp("i","b",e))}else a.innerText=e+":";return a}},{key:"_makeDropdown",value:function(e,r,n){var a=document.createElement("select");a.className="vis-configuration vis-config-select";var o=0;r!==void 0&&ae(e).call(e,r)!==-1&&(o=ae(e).call(e,r));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,n)};var c=this._makeLabel(n[n.length-1],n);this._makeItem(n,c,a)}},{key:"_makeRange",value:function(e,r,n){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 c="",h=0;if(r!==void 0){var d=1.2;r<0&&r*d<o?(l.min=Math.ceil(r*d),h=l.min,c="range increased"):r/d<o&&(l.min=Math.ceil(r/d),h=l.min,c="range increased"),r*d>s&&s!==1&&(l.max=Math.ceil(r*d),h=l.max,c="range increased"),l.value=r}else l.value=a;var f=document.createElement("input");f.className="vis-configuration vis-config-rangeinput",f.value=l.value;var v=this;l.onchange=function(){f.value=this.value,v._update(Number(this.value),n)},l.oninput=function(){f.value=this.value};var g=this._makeLabel(n[n.length-1],n),b=this._makeItem(n,g,l,f);c!==""&&this.popupHistory[b]!==h&&(this.popupHistory[b]=h,this._setupPopup(c,b))}},{key:"_makeButton",value:function(){var e=this;if(this.options.showButton===!0){var r=document.createElement("div");r.className="vis-configuration vis-config-button",r.innerText="generate options",r.onclick=function(){e._printOptions()},r.onmouseover=function(){r.className="vis-configuration vis-config-button hover"},r.onmouseout=function(){r.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(r)}}},{key:"_setupPopup",value:function(e,r){var n=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(){n._removePopup()},this.popupCounter+=1,this.popupDiv={html:a,index:r}}}},{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 r=this.domElements[this.popupDiv.index],n=r.getBoundingClientRect();this.popupDiv.html.style.left=n.left+"px",this.popupDiv.html.style.top=n.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=pr(function(){e.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=pr(function(){e._removePopup()},1800)}}},{key:"_makeCheckbox",value:function(e,r,n){var a=document.createElement("input");a.type="checkbox",a.className="vis-configuration vis-config-checkbox",a.checked=e,r!==void 0&&(a.checked=r,r!==e&&(he(e)==="object"?r!==e.enabled&&this.changedOptions.push({path:n,value:r}):this.changedOptions.push({path:n,value:r})));var o=this;a.onchange=function(){o._update(this.checked,n)};var s=this._makeLabel(n[n.length-1],n);this._makeItem(n,s,a)}},{key:"_makeTextInput",value:function(e,r,n){var a=document.createElement("input");a.type="text",a.className="vis-configuration vis-config-text",a.value=r,r!==e&&this.changedOptions.push({path:n,value:r});var o=this;a.onchange=function(){o._update(this.value,n)};var s=this._makeLabel(n[n.length-1],n);this._makeItem(n,s,a)}},{key:"_makeColorField",value:function(e,r,n){var a=this,o=e[1],s=document.createElement("div");r=r===void 0?o:r,r!=="none"?(s.className="vis-configuration vis-config-colorBlock",s.style.backgroundColor=r):s.className="vis-configuration vis-config-colorBlock none",r=r===void 0?o:r,s.onclick=function(){a._showColorPicker(r,s,n)};var u=this._makeLabel(n[n.length-1],n);this._makeItem(n,u,s)}},{key:"_showColorPicker",value:function(e,r,n){var a=this;r.onclick=function(){},this.colorPicker.insertTo(r),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(function(o){var s="rgba("+o.r+","+o.g+","+o.b+","+o.a+")";r.style.backgroundColor=s,a._update(s,n)}),this.colorPicker.setCloseCallback(function(){r.onclick=function(){a._showColorPicker(e,r,n)}})}},{key:"_handleObject",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=!1,o=St(this.options),s=!1;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){a=!0;var l=e[u],c=ju(r,u);if(typeof o=="function"&&(a=o(u,r),a===!1&&!ve(l)&&typeof l!="string"&&typeof l!="boolean"&&l instanceof Object&&(this.allowCreation=!1,a=this._handleObject(l,c,!0),this.allowCreation=n===!1)),a!==!1){s=!0;var h=this._getValue(c);if(ve(l))this._handleArray(l,h,c);else if(typeof l=="string")this._makeTextInput(l,h,c);else if(typeof l=="boolean")this._makeCheckbox(l,h,c);else if(l instanceof Object){if(!this.hideOption(r,u,this.moduleOptions))if(l.enabled!==void 0){var d=ju(c,"enabled"),f=this._getValue(d);if(f===!0){var v=this._makeLabel(u,c,!0);this._makeItem(c,v),s=this._handleObject(l,c)||s}else this._makeCheckbox(l,f,c)}else{var g=this._makeLabel(u,c,!0);this._makeItem(c,g),s=this._handleObject(l,c)||s}}else console.error("dont know how to handle",l,u,c)}}return s}},{key:"_handleArray",value:function(e,r,n){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,r,n),e[1]!==r&&this.changedOptions.push({path:n,value:r})):typeof e[0]=="string"?(this._makeDropdown(e,r,n),e[0]!==r&&this.changedOptions.push({path:n,value:r})):typeof e[0]=="number"&&(this._makeRange(e,r,n),e[0]!==r&&this.changedOptions.push({path:n,value:Number(r)}))}},{key:"_update",value:function(e,r){var n=this._constructOptions(e,r);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",n),this.initialized=!0,this.parent.setOptions(n)}},{key:"_constructOptions",value:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=n;e=e==="true"?!0:e,e=e==="false"?!1:e;for(var o=0;o<r.length;o++)r[o]!=="global"&&(a[r[o]]===void 0&&(a[r[o]]={}),o!==r.length-1?a=a[r[o]]:a[r[o]]=e);return n}},{key:"_printOptions",value:function(){for(var e=this.getOptions();this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(yp("pre","const options = "+es(e,null,2)))}},{key:"getOptions",value:function(){for(var e={},r=0;r<this.changedOptions.length;r++)this._constructOptions(this.changedOptions[r].value,this.changedOptions[r].path,e);return e}}]),t}(),Uce=function(){function t(i,e){N(this,t),this.container=i,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 F(t,[{key:"setPosition",value:function(e,r){this.x=Xt(e),this.y=Xt(r)}},{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 r=this.frame.clientHeight,n=this.frame.clientWidth,a=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth,s=0,u=0;if(this.overflowMethod=="flip"){var l=!1,c=!0;this.y-r<this.padding&&(c=!1),this.x+n>o-this.padding&&(l=!0),l?s=this.x-n:s=this.x,c?u=this.y-r:u=this.y}else u=this.y-r,u+r+this.padding>a&&(u=a-r-this.padding),u<this.padding&&(u=this.padding),s=this.x,s+n+this.padding>o&&(s=o-n-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)}}]),t}(),$a=!1,n0,mp="background: #FFeeee; color: #dd0000",Gce=function(){function t(){N(this,t)}return F(t,null,[{key:"validate",value:function(e,r,n){$a=!1,n0=r;var a=r;return n!==void 0&&(a=r[n]),t.parse(e,a,[]),$a}},{key:"parse",value:function(e,r,n){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.check(a,e,r,n)}},{key:"check",value:function(e,r,n,a){if(n[e]===void 0&&n.__any__===void 0){t.getSuggestion(e,n,a);return}var o=e,s=!0;n[e]===void 0&&n.__any__!==void 0&&(o="__any__",s=t.getType(r[e])==="object");var u=n[o];s&&u.__type__!==void 0&&(u=u.__type__),t.checkFields(e,r,n,o,u,a)}},{key:"checkFields",value:function(e,r,n,a,o,s){var u=function(d){console.error("%c"+d+t.printLocation(s,e),mp)},l=t.getType(r[e]),c=o[l];c!==void 0?t.getType(c)==="array"&&ae(c).call(c,r[e])===-1?(u('Invalid option detected in "'+e+'". Allowed values are:'+t.print(c)+' not "'+r[e]+'". '),$a=!0):l==="object"&&a!=="__any__"&&(s=ju(s,e),t.parse(r[e],n[a],s)):o.any===void 0&&(u('Invalid type received for "'+e+'". Expected: '+t.print(Te(o))+". Received ["+l+'] "'+r[e]+'"'),$a=!0)}},{key:"getType",value:function(e){var r=he(e);return r==="object"?e===null?"null":e instanceof Boolean?"boolean":e instanceof Number?"number":e instanceof String?"string":ve(e)?"array":e instanceof Date?"date":e.nodeType!==void 0?"dom":e._isAMomentObject===!0?"moment":"object":r==="number"?"number":r==="boolean"?"boolean":r==="string"?"string":r===void 0?"undefined":r}},{key:"getSuggestion",value:function(e,r,n){var a=t.findInOptions(e,r,n,!1),o=t.findInOptions(e,n0,[],!0),s=8,u=4,l;a.indexMatch!==void 0?l=" in "+t.printLocation(a.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+a.indexMatch+`"?
|
|
74
|
+
|
|
75
|
+
`:o.distance<=u&&a.distance>o.distance?l=" in "+t.printLocation(a.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+t.printLocation(o.path,o.closestMatch,""):a.distance<=s?l='. Did you mean "'+a.closestMatch+'"?'+t.printLocation(a.path,e):l=". Did you mean one of these: "+t.print(Te(r))+t.printLocation(n,e),console.error('%cUnknown option detected: "'+e+'"'+l,mp),$a=!0}},{key:"findInOptions",value:function(e,r,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=1e9,s="",u=[],l=e.toLowerCase(),c=void 0;for(var h in r){var d=void 0;if(r[h].__type__!==void 0&&a===!0){var f=t.findInOptions(e,r[h],ju(n,h));o>f.distance&&(s=f.closestMatch,u=f.path,o=f.distance,c=f.indexMatch)}else{var v;ae(v=h.toLowerCase()).call(v,l)!==-1&&(c=h),d=t.levenshteinDistance(e,h),o>d&&(s=h,u=Dce(n),o=d)}}return{closestMatch:s,path:u,distance:o,indexMatch:c}}},{key:"printLocation",value:function(e,r){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:
|
|
76
|
+
`,a=`
|
|
77
|
+
|
|
78
|
+
`+n+`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+=r+`
|
|
81
|
+
`;for(var l=0;l<e.length+1;l++){for(var c=0;c<e.length-l;c++)a+=" ";a+=`}
|
|
82
|
+
`}return a+`
|
|
83
|
+
|
|
84
|
+
`}},{key:"print",value:function(e){return es(e).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}},{key:"levenshteinDistance",value:function(e,r){if(e.length===0)return r.length;if(r.length===0)return e.length;var n=[],a;for(a=0;a<=r.length;a++)n[a]=[a];var o;for(o=0;o<=e.length;o++)n[0][o]=o;for(a=1;a<=r.length;a++)for(o=1;o<=e.length;o++)r.charAt(a-1)==e.charAt(o-1)?n[a][o]=n[a-1][o-1]:n[a][o]=Math.min(n[a-1][o-1]+1,Math.min(n[a][o-1]+1,n[a-1][o]+1));return n[r.length][e.length]}}]),t}(),Kce=dr,qce=Vce,ki=py,Yce=Uce,vP=mp,Xce=Gce;function Qce(t){return Yr=t,the()}var pP={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},yy=Rn(pP);yy.color="color.color";yy.style="dashes";var ct={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},i0={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},Yr="",Wi=0,J="",K="",bt=ct.NULL;function Zce(){Wi=0,J=Yr.charAt(0)}function Ke(){Wi++,J=Yr.charAt(Wi)}function vi(){return Yr.charAt(Wi+1)}function a0(t){var i=t.charCodeAt(0);return i<47?i===35||i===46:i<59?i>47:i<91?i>64:i<96?i===95:i<123?i>96:!1}function ln(t,i){if(t||(t={}),i)for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e]);return t}function Jce(t,i,e){for(var r=i.split("."),n=t;r.length;){var a=r.shift();r.length?(n[a]||(n[a]={}),n=n[a]):n[a]=e}}function gP(t,i){for(var e,r,n=null,a=[t],o=t;o.parent;)a.push(o.parent),o=o.parent;if(o.nodes){for(e=0,r=o.nodes.length;e<r;e++)if(i.id===o.nodes[e].id){n=o.nodes[e];break}}for(n||(n={id:i.id},t.node&&(n.attr=ln(n.attr,t.node))),e=a.length-1;e>=0;e--){var s,u=a[e];u.nodes||(u.nodes=[]),ae(s=u.nodes).call(s,n)===-1&&u.nodes.push(n)}i.attr&&(n.attr=ln(n.attr,i.attr))}function ehe(t,i){if(t.edges||(t.edges=[]),t.edges.push(i),t.edge){var e=ln({},t.edge);i.attr=ln(e,i.attr)}}function yP(t,i,e,r,n){var a={from:i,to:e,type:r};return t.edge&&(a.attr=ln({},t.edge)),a.attr=ln(a.attr||{},n),n!=null&&n.hasOwnProperty("arrows")&&n.arrows!=null&&(a.arrows={to:{enabled:!0,type:n.arrows.type}},n.arrows=null),a}function be(){for(bt=ct.NULL,K="";J===" "||J===" "||J===`
|
|
85
|
+
`||J==="\r";)Ke();do{var t=!1;if(J==="#"){for(var i=Wi-1;Yr.charAt(i)===" "||Yr.charAt(i)===" ";)i--;if(Yr.charAt(i)===`
|
|
86
|
+
`||Yr.charAt(i)===""){for(;J!=""&&J!=`
|
|
87
|
+
`;)Ke();t=!0}}if(J==="/"&&vi()==="/"){for(;J!=""&&J!=`
|
|
88
|
+
`;)Ke();t=!0}if(J==="/"&&vi()==="*"){for(;J!="";)if(J==="*"&&vi()==="/"){Ke(),Ke();break}else Ke();t=!0}for(;J===" "||J===" "||J===`
|
|
89
|
+
`||J==="\r";)Ke()}while(t);if(J===""){bt=ct.DELIMITER;return}var e=J+vi();if(i0[e]){bt=ct.DELIMITER,K=e,Ke(),Ke();return}if(i0[J]){bt=ct.DELIMITER,K=J,Ke();return}if(a0(J)||J==="-"){for(K+=J,Ke();a0(J);)K+=J,Ke();K==="false"?K=!1:K==="true"?K=!0:isNaN(Number(K))||(K=Number(K)),bt=ct.IDENTIFIER;return}if(J==='"'){for(Ke();J!=""&&(J!='"'||J==='"'&&vi()==='"');)J==='"'?(K+=J,Ke()):J==="\\"&&vi()==="n"?(K+=`
|
|
90
|
+
`,Ke()):K+=J,Ke();if(J!='"')throw ht('End of string " expected');Ke(),bt=ct.IDENTIFIER;return}for(bt=ct.UNKNOWN;J!="";)K+=J,Ke();throw new SyntaxError('Syntax error in part "'+wP(K,30)+'"')}function the(){var t={};if(Zce(),be(),K==="strict"&&(t.strict=!0,be()),(K==="graph"||K==="digraph")&&(t.type=K,be()),bt===ct.IDENTIFIER&&(t.id=K,be()),K!="{")throw ht("Angle bracket { expected");if(be(),mP(t),K!="}")throw ht("Angle bracket } expected");if(be(),K!=="")throw ht("End of file expected");return be(),delete t.node,delete t.edge,delete t.graph,t}function mP(t){for(;K!==""&&K!="}";)rhe(t),K===";"&&be()}function rhe(t){var i=$P(t);if(i){bP(t,i);return}var e=nhe(t);if(!e){if(bt!=ct.IDENTIFIER)throw ht("Identifier expected");var r=K;if(be(),K==="="){if(be(),bt!=ct.IDENTIFIER)throw ht("Identifier expected");t[r]=K,be()}else ihe(t,r)}}function $P(t){var i=null;if(K==="subgraph"&&(i={},i.type="subgraph",be(),bt===ct.IDENTIFIER&&(i.id=K,be())),K==="{"){if(be(),i||(i={}),i.parent=t,i.node=t.node,i.edge=t.edge,i.graph=t.graph,mP(i),K!="}")throw ht("Angle bracket } expected");be(),delete i.node,delete i.edge,delete i.graph,delete i.parent,t.subgraphs||(t.subgraphs=[]),t.subgraphs.push(i)}return i}function nhe(t){return K==="node"?(be(),t.node=Fa(),"node"):K==="edge"?(be(),t.edge=Fa(),"edge"):K==="graph"?(be(),t.graph=Fa(),"graph"):null}function ihe(t,i){var e={id:i},r=Fa();r&&(e.attr=r),gP(t,e),bP(t,i)}function bP(t,i){for(;K==="->"||K==="--";){var e,r=K;be();var n=$P(t);if(n)e=n;else{if(bt!=ct.IDENTIFIER)throw ht("Identifier or subgraph expected");e=K,gP(t,{id:e}),be()}var a=Fa(),o=yP(t,i,e,r,a);ehe(t,o),i=e}}function Fa(){for(var t,i=null,e={dashed:!0,solid:!1,dotted:[1,5]},r={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},n=new Array,a=new Array;K==="[";){for(be(),i={};K!==""&&K!="]";){if(bt!=ct.IDENTIFIER)throw ht("Attribute name expected");var o=K;if(be(),K!="=")throw ht("Equal sign = expected");if(be(),bt!=ct.IDENTIFIER)throw ht("Attribute value expected");var s=K;o==="style"&&(s=e[s]);var u;o==="arrowhead"&&(u=r[s],o="arrows",s={to:{enabled:!0,type:u}}),o==="arrowtail"&&(u=r[s],o="arrows",s={from:{enabled:!0,type:u}}),n.push({attr:i,name:o,value:s}),a.push(o),be(),K==","&&be()}if(K!="]")throw ht("Bracket ] expected");be()}if(vr(a).call(a,"dir")){var l={};for(l.arrows={},t=0;t<n.length;t++)if(n[t].name==="arrows")if(n[t].value.to!=null)l.arrows.to=t;else if(n[t].value.from!=null)l.arrows.from=t;else throw ht("Invalid value of arrows");else n[t].name==="dir"&&(l.dir=t);var c=n[l.dir].value;if(!vr(a).call(a,"arrows"))if(c==="both")n.push({attr:n[l.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),l.arrows.to=n.length-1,n.push({attr:n[l.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),l.arrows.from=n.length-1;else if(c==="forward")n.push({attr:n[l.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),l.arrows.to=n.length-1;else if(c==="back")n.push({attr:n[l.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),l.arrows.from=n.length-1;else if(c==="none")n.push({attr:n[l.dir].attr,name:"arrows",value:""}),l.arrows.to=n.length-1;else throw ht('Invalid dir type "'+c+'"');var h,d;if(c==="both")l.arrows.to&&l.arrows.from?(d=n[l.arrows.to].value.to.type,h=n[l.arrows.from].value.from.type,n[l.arrows.to]={attr:n[l.arrows.to].attr,name:n[l.arrows.to].name,value:{to:{enabled:!0,type:d},from:{enabled:!0,type:h}}},Or(n).call(n,l.arrows.from,1)):l.arrows.to?(d=n[l.arrows.to].value.to.type,h="arrow",n[l.arrows.to]={attr:n[l.arrows.to].attr,name:n[l.arrows.to].name,value:{to:{enabled:!0,type:d},from:{enabled:!0,type:h}}}):l.arrows.from&&(d="arrow",h=n[l.arrows.from].value.from.type,n[l.arrows.from]={attr:n[l.arrows.from].attr,name:n[l.arrows.from].name,value:{to:{enabled:!0,type:d},from:{enabled:!0,type:h}}});else if(c==="back")l.arrows.to&&l.arrows.from?(d="",h=n[l.arrows.from].value.from.type,n[l.arrows.from]={attr:n[l.arrows.from].attr,name:n[l.arrows.from].name,value:{to:{enabled:!0,type:d},from:{enabled:!0,type:h}}}):l.arrows.to?(d="",h="arrow",l.arrows.from=l.arrows.to,n[l.arrows.from]={attr:n[l.arrows.from].attr,name:n[l.arrows.from].name,value:{to:{enabled:!0,type:d},from:{enabled:!0,type:h}}}):l.arrows.from&&(d="",h=n[l.arrows.from].value.from.type,n[l.arrows.to]={attr:n[l.arrows.from].attr,name:n[l.arrows.from].name,value:{to:{enabled:!0,type:d},from:{enabled:!0,type:h}}}),n[l.arrows.from]={attr:n[l.arrows.from].attr,name:n[l.arrows.from].name,value:{from:{enabled:!0,type:n[l.arrows.from].value.from.type}}};else if(c==="none"){var f;l.arrows.to?f=l.arrows.to:f=l.arrows.from,n[f]={attr:n[f].attr,name:n[f].name,value:""}}else if(c==="forward")l.arrows.to&&l.arrows.from?(d=n[l.arrows.to].value.to.type,h="",n[l.arrows.to]={attr:n[l.arrows.to].attr,name:n[l.arrows.to].name,value:{to:{enabled:!0,type:d},from:{enabled:!0,type:h}}}):l.arrows.to?(d=n[l.arrows.to].value.to.type,h="",n[l.arrows.to]={attr:n[l.arrows.to].attr,name:n[l.arrows.to].name,value:{to:{enabled:!0,type:d},from:{enabled:!0,type:h}}}):l.arrows.from&&(d="arrow",h="",l.arrows.to=l.arrows.from,n[l.arrows.to]={attr:n[l.arrows.to].attr,name:n[l.arrows.to].name,value:{to:{enabled:!0,type:d},from:{enabled:!0,type:h}}}),n[l.arrows.to]={attr:n[l.arrows.to].attr,name:n[l.arrows.to].name,value:{to:{enabled:!0,type:n[l.arrows.to].value.to.type}}};else throw ht('Invalid dir type "'+c+'"');Or(n).call(n,l.dir,1)}var v;if(vr(a).call(a,"penwidth")){var g=[];for(v=n.length,t=0;t<v;t++)n[t].name!=="width"&&(n[t].name==="penwidth"&&(n[t].name="width"),g.push(n[t]));n=g}for(v=n.length,t=0;t<v;t++)Jce(n[t].attr,n[t].name,n[t].value);return i}function ht(t){return new SyntaxError(t+', got "'+wP(K,30)+'" (char '+Wi+")")}function wP(t,i){return t.length<=i?t:t.substr(0,27)+"..."}function ahe(t,i,e){ve(t)?ge(t).call(t,function(r){ve(i)?ge(i).call(i,function(n){e(r,n)}):e(r,i)}):ve(i)?ge(i).call(i,function(r){e(t,r)}):e(t,i)}function Gh(t,i,e){for(var r=i.split("."),n=r.pop(),a=t,o=0;o<r.length;o++){var s=r[o];s in a||(a[s]={}),a=a[s]}return a[n]=e,t}function o0(t,i){var e={};for(var r in t)if(t.hasOwnProperty(r)){var n=i[r];ve(n)?ge(n).call(n,function(a){Gh(e,a,t[r])}):typeof n=="string"?Gh(e,n,t[r]):Gh(e,r,t[r])}return e}function ohe(t){var i=Qce(t),e={nodes:[],edges:[],options:{}};if(i.nodes){var r;ge(r=i.nodes).call(r,function(o){var s={id:o.id,label:String(o.label||o.id)};ln(s,o0(o.attr,pP)),s.image&&(s.shape="image"),e.nodes.push(s)})}if(i.edges){var n,a=function(s){var u={from:s.from,to:s.to};return ln(u,o0(s.attr,yy)),u.arrows==null&&s.type==="->"&&(u.arrows="to"),u};ge(n=i.edges).call(n,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;ge(l=o.from.edges).call(l,function(h){var d=a(h);e.edges.push(d)})}if(ahe(s,u,function(h,d){var f=yP(e,h.id,d.id,o.type,o.attr),v=a(f);e.edges.push(v)}),o.to instanceof Object&&o.to.edges){var c;ge(c=o.to.edges).call(c,function(h){var d=a(h);e.edges.push(d)})}})}return i.attr&&(e.options=i.attr),e}function she(t,i){var e,r={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};i!=null&&(i.fixed!=null&&(r.nodes.fixed=i.fixed),i.parseColor!=null&&(r.nodes.parseColor=i.parseColor),i.inheritColor!=null&&(r.edges.inheritColor=i.inheritColor));var n=t.edges,a=Li(n).call(n,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&&r.edges.inheritColor===!1&&(u.color=s.color),u}),o=Li(e=t.nodes).call(e,function(s){var u={id:s.id,fixed:r.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&&(r.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 uhe={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"},lhe={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"},che={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"},hhe={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"},dhe={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"},fhe={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ó"},vhe={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},phe={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},ghe={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},yhe={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"},mhe={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"},$he=Object.freeze({__proto__:null,cn:phe,cs:mhe,de:lhe,en:uhe,es:che,fr:yhe,it:hhe,nl:dhe,pt:fhe,ru:vhe,uk:ghe});function bhe(t,i){try{var e=i.split(/[-_ /]/,2),r=xe(e,2),n=r[0],a=r[1],o=n!=null?n.toLowerCase():null,s=a!=null?a.toUpperCase():null;if(o&&s){var u=o+"-"+s;if(Object.prototype.hasOwnProperty.call(t,u))return u;var l;console.warn(oy(l="Unknown variant ".concat(s," of language ")).call(l,o,"."))}if(o){var c=o;if(Object.prototype.hasOwnProperty.call(t,c))return c;console.warn("Unknown language ".concat(o))}return console.warn("Unknown locale ".concat(i,", falling back to English.")),"en"}catch(h){return console.error(h),console.warn("Unexpected error while normalizing locale ".concat(i,", falling back to English.")),"en"}}var whe=function(){function t(){N(this,t),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return F(t,[{key:"init",value:function(){if(!this.initialized()){this.src=this.image.src;var e=this.image.width,r=this.image.height;this.width=e,this.height=r;var n=Math.floor(r/2),a=Math.floor(r/4),o=Math.floor(r/8),s=Math.floor(r/16),u=Math.floor(e/2),l=Math.floor(e/4),c=Math.floor(e/8),h=Math.floor(e/16);this.canvas.width=3*l,this.canvas.height=n,this.coordinates=[[0,0,u,n],[u,0,l,a],[u,a,c,o],[5*c,a,h,s]],this._fillMipMap()}}},{key:"initialized",value:function(){return this.coordinates!==void 0}},{key:"_fillMipMap",value:function(){var e=this.canvas.getContext("2d"),r=this.coordinates[0];e.drawImage(this.image,r[0],r[1],r[2],r[3]);for(var n=1;n<this.NUM_ITERATIONS;n++){var a=this.coordinates[n-1],o=this.coordinates[n];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,r,n,a,o,s){if(this.initialized())if(r>2){r*=.5;for(var u=0;r>2&&u<this.NUM_ITERATIONS;)r*=.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],n,a,o,s)}else e.drawImage(this.image,n,a,o,s)}}]),t}(),_he=function(){function t(i){N(this,t),this.images={},this.imageBroken={},this.callback=i}return F(t,[{key:"_tryloadBrokenUrl",value:function(e,r,n){if(!(e===void 0||n===void 0)){if(r===void 0){console.warn("No broken url image defined");return}n.image.onerror=function(){console.error("Could not load brokenImage:",r)},n.image.src=r}}},{key:"_redrawWithImage",value:function(e){this.callback&&this.callback(e)}},{key:"load",value:function(e,r){var n=this,a=this.images[e];if(a)return a;var o=new whe;return this.images[e]=o,o.image.onload=function(){n._fixImageCoordinates(o.image),o.init(),n._redrawWithImage(o)},o.image.onerror=function(){console.error("Could not load image:",e),n._tryloadBrokenUrl(e,r,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))}}]),t}(),$p={},Ehe={get exports(){return $p},set exports(t){$p=t}},Vi={},She={get exports(){return Vi},set exports(t){Vi=t}},Ohe=se,The=Ohe(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),xhe=se,Phe=Je,khe=Fr,s0=The,iu=Object.isExtensible,Ihe=xhe(function(){iu(1)}),Che=Ihe||s0?function(i){return!Phe(i)||s0&&khe(i)=="ArrayBuffer"?!1:iu?iu(i):!0}:iu,Ahe=se,_P=!Ahe(function(){return Object.isExtensible(Object.preventExtensions({}))}),Rhe=q,Dhe=ue,Mhe=Uo,Nhe=Je,my=et,Fhe=Ut.f,u0=Yo,Bhe=Tl,$y=Che,Lhe=yl,jhe=_P,EP=!1,Ar=Lhe("meta"),zhe=0,by=function(t){Fhe(t,Ar,{value:{objectID:"O"+zhe++,weakData:{}}})},Hhe=function(t,i){if(!Nhe(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!my(t,Ar)){if(!$y(t))return"F";if(!i)return"E";by(t)}return t[Ar].objectID},Whe=function(t,i){if(!my(t,Ar)){if(!$y(t))return!0;if(!i)return!1;by(t)}return t[Ar].weakData},Vhe=function(t){return jhe&&EP&&$y(t)&&!my(t,Ar)&&by(t),t},Uhe=function(){Ghe.enable=function(){},EP=!0;var t=u0.f,i=Dhe([].splice),e={};e[Ar]=1,t(e).length&&(u0.f=function(r){for(var n=t(r),a=0,o=n.length;a<o;a++)if(n[a]===Ar){i(n,a,1);break}return n},Rhe({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Bhe.f}))},Ghe=She.exports={enable:Uhe,fastKey:Hhe,getWeakData:Whe,onFreeze:Vhe};Mhe[Ar]=!0;var Khe=Wo,qhe=Mt,Yhe=Ft,Xhe=oa,Qhe=ET,Zhe=ir,l0=Ne,Jhe=PT,ede=Ol,c0=_T,tde=TypeError,au=function(t,i){this.stopped=t,this.result=i},h0=au.prototype,wy=function(t,i,e){var r=e&&e.that,n=!!(e&&e.AS_ENTRIES),a=!!(e&&e.IS_RECORD),o=!!(e&&e.IS_ITERATOR),s=!!(e&&e.INTERRUPTED),u=Khe(i,r),l,c,h,d,f,v,g,b=function($){return l&&c0(l,"normal",$),new au(!0,$)},p=function($){return n?(Yhe($),s?u($[0],$[1],b):u($[0],$[1])):s?u($,b):u($)};if(a)l=t.iterator;else if(o)l=t;else{if(c=ede(t),!c)throw tde(Xhe(t)+" is not iterable");if(Qhe(c)){for(h=0,d=Zhe(t);d>h;h++)if(f=p(t[h]),f&&l0(h0,f))return f;return new au(!1)}l=Jhe(t,c)}for(v=a?t.next:l.next;!(g=qhe(v,l)).done;){try{f=p(g.value)}catch($){c0(l,"throw",$)}if(typeof f=="object"&&f&&l0(h0,f))return f}return new au(!1)},rde=Ne,nde=TypeError,_y=function(t,i){if(rde(i,t))return t;throw nde("Incorrect invocation")},ide=q,ade=We,ode=Vi,sde=se,ude=sa,lde=wy,cde=_y,hde=Ze,dde=Je,fde=la,vde=Ut.f,pde=fn.forEach,gde=Ge,SP=Jn,yde=SP.set,mde=SP.getterFor,Ey=function(t,i,e){var r=t.indexOf("Map")!==-1,n=t.indexOf("Weak")!==-1,a=r?"set":"add",o=ade[t],s=o&&o.prototype,u={},l;if(!gde||!hde(o)||!(n||s.forEach&&!sde(function(){new o().entries().next()})))l=e.getConstructor(i,t,r,a),ode.enable();else{l=i(function(d,f){yde(cde(d,c),{type:t,collection:new o}),f!=null&&lde(f,d[a],{that:d,AS_ENTRIES:r})});var c=l.prototype,h=mde(t);pde(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(d){var f=d=="add"||d=="set";d in s&&!(n&&d=="clear")&&ude(c,d,function(v,g){var b=h(this).collection;if(!f&&n&&!dde(v))return d=="get"?void 0:!1;var p=b[d](v===0?0:v,g);return f?this:p})}),n||vde(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}return fde(l,t,!1,!0),u[t]=l,ide({global:!0,forced:!0},u),n||e.setStrong(l,t,r),l},$de=qo,Sy=function(t,i,e){for(var r in i)e&&e.unsafe&&t[r]?t[r]=i[r]:$de(t,r,i[r],e);return t},bde=Vt,wde=Jg,_de=Fe,Ede=Ge,d0=_de("species"),Sde=function(t){var i=bde(t);Ede&&i&&!i[d0]&&wde(i,d0,{configurable:!0,get:function(){return this}})},Ode=ua,Tde=Jg,f0=Sy,xde=Wo,Pde=_y,kde=Fo,Ide=wy,Cde=Xg,Ls=Qg,Ade=Sde,ba=Ge,v0=Vi.fastKey,OP=Jn,p0=OP.set,Kh=OP.getterFor,TP={getConstructor:function(t,i,e,r){var n=t(function(l,c){Pde(l,a),p0(l,{type:i,index:Ode(null),first:void 0,last:void 0,size:0}),ba||(l.size=0),kde(c)||Ide(c,l[r],{that:l,AS_ENTRIES:e})}),a=n.prototype,o=Kh(i),s=function(l,c,h){var d=o(l),f=u(l,c),v,g;return f?f.value=h:(d.last=f={index:g=v0(c,!0),key:c,value:h,previous:v=d.last,next:void 0,removed:!1},d.first||(d.first=f),v&&(v.next=f),ba?d.size++:l.size++,g!=="F"&&(d.index[g]=f)),l},u=function(l,c){var h=o(l),d=v0(c),f;if(d!=="F")return h.index[d];for(f=h.first;f;f=f.next)if(f.key==c)return f};return f0(a,{clear:function(){for(var c=this,h=o(c),d=h.index,f=h.first;f;)f.removed=!0,f.previous&&(f.previous=f.previous.next=void 0),delete d[f.index],f=f.next;h.first=h.last=void 0,ba?h.size=0:c.size=0},delete:function(l){var c=this,h=o(c),d=u(c,l);if(d){var f=d.next,v=d.previous;delete h.index[d.index],d.removed=!0,v&&(v.next=f),f&&(f.previous=v),h.first==d&&(h.first=f),h.last==d&&(h.last=v),ba?h.size--:c.size--}return!!d},forEach:function(c){for(var h=o(this),d=xde(c,arguments.length>1?arguments[1]:void 0),f;f=f?f.next:h.first;)for(d(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(c){return!!u(this,c)}}),f0(a,e?{get:function(c){var h=u(this,c);return h&&h.value},set:function(c,h){return s(this,c===0?0:c,h)}}:{add:function(c){return s(this,c=c===0?0:c,c)}}),ba&&Tde(a,"size",{configurable:!0,get:function(){return o(this).size}}),n},setStrong:function(t,i,e){var r=i+" Iterator",n=Kh(i),a=Kh(r);Cde(t,i,function(o,s){p0(this,{type:r,target:o,state:n(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,Ls(void 0,!0)):s=="keys"?Ls(u.key,!1):s=="values"?Ls(u.value,!1):Ls([u.key,u.value],!1)},e?"entries":"values",!e,!0),Ade(i)}},Rde=Ey,Dde=TP;Rde("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Dde);var Mde=ie,Nde=Mde.Map,Fde=Nde,Bde=Fde;(function(t){t.exports=Bde})(Ehe);var xP=V($p),Lde=function(){function t(){N(this,t),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},Le(this.options,this.defaultOptions)}return F(t,[{key:"setOptions",value:function(e){var r=["useDefaultGroups"];if(e!==void 0){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&ae(r).call(r,n)===-1){var a=e[n];this.add(n,a)}}}},{key:"clear",value:function(){this._groups=new xP,this._groupNames=[]}},{key:"get",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this._groups.get(e);if(n===void 0&&r)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){var a=this._groupIndex%this._groupNames.length;++this._groupIndex,n={},n.color=this._groups.get(this._groupNames[a]),this._groups.set(e,n)}else{var o=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,n={},n.color=this._defaultGroups[o],this._groups.set(e,n)}return n}},{key:"add",value:function(e,r){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,r),r}}]),t}(),bp={},jde={get exports(){return bp},set exports(t){bp=t}},zde=q;zde({target:"Number",stat:!0},{isNaN:function(i){return i!=i}});var Hde=ie,Wde=Hde.Number.isNaN,Vde=Wde,Ude=Vde;(function(t){t.exports=Ude})(jde);var wp=V(bp),_p={},Gde={get exports(){return _p},set exports(t){_p=t}},Kde=We,qde=Kde.isFinite,Yde=Number.isFinite||function(i){return typeof i=="number"&&qde(i)},Xde=q,Qde=Yde;Xde({target:"Number",stat:!0},{isFinite:Qde});var Zde=ie,Jde=Zde.Number.isFinite,efe=Jde,tfe=efe;(function(t){t.exports=tfe})(Gde);var xn=V(_p),Ep={},rfe={get exports(){return Ep},set exports(t){Ep=t}},nfe=q,ife=fn.some,afe=da,ofe=afe("some");nfe({target:"Array",proto:!0,forced:!ofe},{some:function(i){return ife(this,i,arguments.length>1?arguments[1]:void 0)}});var sfe=tt,ufe=sfe("Array").some,lfe=Ne,cfe=ufe,qh=Array.prototype,hfe=function(t){var i=t.some;return t===qh||lfe(qh,t)&&i===qh.some?cfe:i},dfe=hfe,ffe=dfe;(function(t){t.exports=ffe})(rfe);var vfe=V(Ep),Sp={},pfe={get exports(){return Sp},set exports(t){Sp=t}},PP=We,gfe=se,yfe=ue,mfe=mr,$fe=sy.trim,bfe=Nl,wfe=yfe("".charAt),zu=PP.parseFloat,g0=PP.Symbol,y0=g0&&g0.iterator,_fe=1/zu(bfe+"-0")!==-1/0||y0&&!gfe(function(){zu(Object(y0))}),Efe=_fe?function(i){var e=$fe(mfe(i)),r=zu(e);return r===0&&wfe(e,0)=="-"?-0:r}:zu,Sfe=q,m0=Efe;Sfe({global:!0,forced:parseFloat!=m0},{parseFloat:m0});var Ofe=ie,Tfe=Ofe.parseFloat,xfe=Tfe,Pfe=xfe;(function(t){t.exports=Pfe})(pfe);var kP=V(Sp),Op={},kfe={get exports(){return Op},set exports(t){Op=t}},Ife=q,Cfe=se,Afe=Tl.f,Rfe=Cfe(function(){return!Object.getOwnPropertyNames(1)});Ife({target:"Object",stat:!0,forced:Rfe},{getOwnPropertyNames:Afe});var Dfe=ie,Mfe=Dfe.Object,Nfe=function(i){return Mfe.getOwnPropertyNames(i)},Ffe=Nfe,Bfe=Ffe;(function(t){t.exports=Bfe})(kfe);var Lfe=V(Op);function Oy(t,i){var e=["node","edge","label"],r=!0,n=Gr(i,"chosen");if(typeof n=="boolean")r=n;else if(he(n)==="object"){if(ae(e).call(e,t)===-1)throw new Error("choosify: subOption '"+t+"' should be one of '"+e.join("', '")+"'");var a=Gr(i,["chosen",t]);(typeof a=="boolean"||typeof a=="function")&&(r=a)}return r}function Tp(t,i,e){if(t.width<=0||t.height<=0)return!1;if(e!==void 0){var r={x:i.x-e.x,y:i.y-e.y};if(e.angle!==0){var n=-e.angle,a={x:Math.cos(n)*r.x-Math.sin(n)*r.y,y:Math.sin(n)*r.x+Math.cos(n)*r.y};i=a}else i=r}var o=t.x+t.width,s=t.y+t.width;return t.left<i.x&&o>i.x&&t.top<i.y&&s>i.y}function Hu(t){return typeof t=="string"&&t!==""}function IP(t,i,e,r){var n=r.x,a=r.y;if(typeof r.distanceToBorder=="function"){var o=r.distanceToBorder(t,i),s=Math.sin(i)*o,u=Math.cos(i)*o;u===o?(n+=o,a=r.y):s===o?(n=r.x,a-=o):(n+=u,a-=s)}else r.shape.width>r.shape.height?(n=r.x+r.shape.width*.5,a=r.y-e):(n=r.x+e,a=r.y-r.shape.height*.5);return{x:n,y:a}}var xp={},jfe={get exports(){return xp},set exports(t){xp=t}},zfe=tt,Hfe=zfe("Array").values,Wfe=Hfe,Vfe=Wfe,Ufe=Zn,Gfe=et,Kfe=Ne,qfe=Vfe,Yh=Array.prototype,Yfe={DOMTokenList:!0,NodeList:!0},Xfe=function(t){var i=t.values;return t===Yh||Kfe(Yh,t)&&i===Yh.values||Gfe(Yfe,Ufe(t))?qfe:i};(function(t){t.exports=Xfe})(jfe);var CP=V(xp),Qfe=function(){function t(i){N(this,t),this.measureText=i,this.current=0,this.width=0,this.height=0,this.lines=[]}return F(t,[{key:"_add",value:function(e,r){var n=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=r;(r===void 0||r==="")&&(a=" ");var o=this.measureText(a,n),s=Le({},CP(o));s.text=r,s.width=o.width,s.mod=n,(r===void 0||r==="")&&(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 r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,r)}},{key:"newLine",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,r),this.current++}},{key:"determineLineHeights",value:function(){for(var e=0;e<this.lines.length;e++){var r=this.lines[e],n=0;if(r.blocks!==void 0)for(var a=0;a<r.blocks.length;a++){var o=r.blocks[a];n<o.height&&(n=o.height)}r.height=n}}},{key:"determineLabelSize",value:function(){for(var e=0,r=0,n=0;n<this.lines.length;n++){var a=this.lines[n];a.width>e&&(e=a.width),r+=a.height}this.width=e,this.height=r}},{key:"removeEmptyBlocks",value:function(){for(var e=[],r=0;r<this.lines.length;r++){var n=this.lines[r];if(n.blocks.length!==0&&!(r===this.lines.length-1&&n.width===0)){var a={};Le(a,n),a.blocks=[];for(var o=void 0,s=[],u=0;u<n.blocks.length;u++){var l=n.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}}}]),t}(),Zfe={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},$0=function(){function t(i){N(this,t),this.text=i,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return F(t,[{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,r){return!this.mono&&!this[e]&&this.match(r)?(this.setTag(e),!0):!1}},{key:"match",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this.prepareRegExp(e),a=xe(n,2),o=a[0],s=a[1],u=o.test(this.text.substr(this.position,s));return u&&r&&(this.position+=s-1),u}},{key:"parseEndTag",value:function(e,r,n){var a=this.mod()===e;return e==="mono"?a=a&&this.mono:a=a&&!this.mono,a&&this.match(r)?(n!==void 0?(this.position===this.text.length-1||this.match(n,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}},{key:"replace",value:function(e,r){return this.match(e)?(this.add(r),this.position+=length-1,!0):!1}},{key:"prepareRegExp",value:function(e){var r,n;if(e instanceof RegExp)n=e,r=1;else{var a=Zfe[e];a!==void 0?n=a:n=new RegExp(e),r=e.length}return[n,r]}}]),t}(),Jfe=function(){function t(i,e,r,n){var a=this;N(this,t),this.ctx=i,this.parent=e,this.selected=r,this.hover=n;var o=function(u,l){if(u===void 0)return 0;var c=a.parent.getFormattingValues(i,r,n,l),h=0;if(u!==""){var d=a.ctx.measureText(u);h=d.width}return{width:h,values:c}};this.lines=new Qfe(o)}return F(t,[{key:"process",value:function(e){if(!Hu(e))return this.lines.finalize();var r=this.parent.fontOptions;e=e.replace(/\r\n/g,`
|
|
91
|
+
`),e=e.replace(/\r/g,`
|
|
92
|
+
`);var n=String(e).split(`
|
|
93
|
+
`),a=n.length;if(r.multi)for(var o=0;o<a;o++){var s=this.splitBlocks(n[o],r.multi);if(s!==void 0){if(s.length===0){this.lines.newLine("");continue}if(r.maxWdt>0)for(var u=0;u<s.length;u++){var l=s[u].mod,c=s[u].text;this.splitStringIntoLines(c,l,!0)}else for(var h=0;h<s.length;h++){var d=s[h].mod,f=s[h].text;this.lines.append(f,d)}this.lines.newLine()}}else if(r.maxWdt>0)for(var v=0;v<a;v++)this.splitStringIntoLines(n[v]);else for(var g=0;g<a;g++)this.lines.newLine(n[g]);return this.lines.finalize()}},{key:"decodeMarkupSystem",value:function(e){var r="none";return e==="markdown"||e==="md"?r="markdown":(e===!0||e==="html")&&(r="html"),r}},{key:"splitHtmlBlocks",value:function(e){for(var r=new $0(e),n=function(u){if(/&/.test(u)){var l=r.replace(r.text,"<","<")||r.replace(r.text,"&","&");return l||r.add("&"),!0}return!1};r.position<r.text.length;){var a=r.text.charAt(r.position),o=r.parseWS(a)||/</.test(a)&&(r.parseStartTag("bold","<b>")||r.parseStartTag("ital","<i>")||r.parseStartTag("mono","<code>")||r.parseEndTag("bold","</b>")||r.parseEndTag("ital","</i>")||r.parseEndTag("mono","</code>"))||n(a);o||r.add(a),r.position++}return r.emitBlock(),r.blocks}},{key:"splitMarkdownBlocks",value:function(e){for(var r=this,n=new $0(e),a=!0,o=function(c){return/\\/.test(c)?(n.position<r.text.length+1&&(n.position++,c=r.text.charAt(n.position),/ \t/.test(c)?n.spacing=!0:(n.add(c),a=!1)),!0):!1};n.position<n.text.length;){var s=n.text.charAt(n.position),u=n.parseWS(s)||o(s)||(a||n.spacing)&&(n.parseStartTag("bold","*")||n.parseStartTag("ital","_")||n.parseStartTag("mono","`"))||n.parseEndTag("bold","*","afterBold")||n.parseEndTag("ital","_","afterItal")||n.parseEndTag("mono","`","afterMono");u||(n.add(s),a=!1),n.position++}return n.emitBlock(),n.blocks}},{key:"splitBlocks",value:function(e,r){var n=this.decodeMarkupSystem(r);if(n==="none")return[{text:e,mod:"normal"}];if(n==="markdown")return this.splitMarkdownBlocks(e);if(n==="html")return this.splitHtmlBlocks(e)}},{key:"overMaxWidth",value:function(e){var r=this.ctx.measureText(e).width;return this.lines.curWidth()+r>this.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(e){for(var r="",n=0;n<e.length;){var a=r===""?"":" ",o=r+a+e[n];if(this.overMaxWidth(o))break;r=o,n++}return n}},{key:"getLongestFitWord",value:function(e){for(var r=0;r<e.length&&!this.overMaxWidth(st(e).call(e,0,r));)r++;return r}},{key:"splitStringIntoLines",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,r),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(st(s).call(s,0,u),r),a[0]=st(s).call(s,u)}else{var l=o;a[o-1]===" "?o--:a[l]===" "&&l++;var c=st(a).call(a,0,o).join("");o==a.length&&n?this.lines.append(c,r):this.lines.newLine(c,r),a=st(a).call(a,l)}}}}]),t}(),wa=["bold","ital","boldital","mono"],AP=function(){function t(i,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;N(this,t),this.body=i,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=r}return F(t,[{key:"setOptions",value:function(e){if(this.elementOptions=e,this.initFontOptions(e.font),Hu(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(he(e.font)==="object"){var r=e.font.size;r!==void 0&&(this.baseSize=r)}}}},{key:"initFontOptions",value:function(e){var r=this;if(ee(wa,function(n){r.fontOptions[n]={}}),t.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}ee(e,function(n,a){n!=null&&he(n)!=="object"&&(r.fontOptions[a]=n)})}},{key:"constrain",value:function(e){var r={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},n=Gr(e,"widthConstraint");if(typeof n=="number")r.maxWdt=Number(n),r.minWdt=Number(n);else if(he(n)==="object"){var a=Gr(e,["widthConstraint","maximum"]);typeof a=="number"&&(r.maxWdt=Number(a));var o=Gr(e,["widthConstraint","minimum"]);typeof o=="number"&&(r.minWdt=Number(o))}var s=Gr(e,"heightConstraint");if(typeof s=="number")r.minHgt=Number(s);else if(he(s)==="object"){var u=Gr(e,["heightConstraint","minimum"]);typeof u=="number"&&(r.minHgt=Number(u));var l=Gr(e,["heightConstraint","valign"]);typeof l=="string"&&(l==="top"||l==="bottom")&&(r.valign=l)}return r}},{key:"update",value:function(e,r){this.setOptions(e,!0),this.propagateFonts(r),$e(this.fontOptions,this.constrain(r)),this.fontOptions.chooser=Oy("label",r)}},{key:"adjustSizes",value:function(e){var r=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=r,this.fontOptions.minWdt-=r);var n=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=n)}},{key:"addFontOptionsToPile",value:function(e,r){for(var n=0;n<r.length;++n)this.addFontToPile(e,r[n])}},{key:"addFontToPile",value:function(e,r){if(r!==void 0&&!(r.font===void 0||r.font===null)){var n=r.font;e.push(n)}}},{key:"getBasicOptions",value:function(e){for(var r={},n=0;n<e.length;++n){var a=e[n],o={};t.parseFontString(o,a)&&(a=o),ee(a,function(s,u){s!==void 0&&(Object.prototype.hasOwnProperty.call(r,u)||(ae(wa).call(wa,u)!==-1?r[u]={}:r[u]=s))})}return r}},{key:"getFontOption",value:function(e,r,n){for(var a,o=0;o<e.length;++o){var s=e[o];if(Object.prototype.hasOwnProperty.call(s,r)){if(a=s[r],a==null)continue;var u={};if(t.parseFontString(u,a)&&(a=u),Object.prototype.hasOwnProperty.call(a,n))return a[n]}}if(Object.prototype.hasOwnProperty.call(this.fontOptions,n))return this.fontOptions[n];throw new Error("Did not find value for multi-font for property: '"+n+"'")}},{key:"getFontOptions",value:function(e,r){for(var n={},a=["color","size","face","mod","vadjust"],o=0;o<a.length;++o){var s=a[o];n[s]=this.getFontOption(e,r,s)}return n}},{key:"propagateFonts",value:function(e){var r=this,n=[];this.addFontOptionsToPile(n,e),this.fontOptions=this.getBasicOptions(n);for(var a=function(){var u=wa[o],l=r.fontOptions[u],c=r.getFontOptions(n,u);ee(c,function(h,d){l[d]=h}),l.size=Number(l.size),l.vadjust=Number(l.vadjust)},o=0;o<wa.length;++o)a()}},{key:"draw",value:function(e,r,n,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,r,n,s),this._drawBackground(e),this._drawText(e,r,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 r=this.getSize();e.fillRect(r.left,r.top,r.width,r.height)}}},{key:"_drawText",value:function(e,r,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",o=arguments.length>4?arguments[4]:void 0,s=this._setAlignment(e,r,n,a),u=xe(s,2);r=u[0],n=u[1],e.textAlign="left",r=r-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(n-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(n+=(this.size.height-this.size.labelHeight)/2));for(var l=0;l<this.lineCount;l++){var c=this.lines[l];if(c&&c.blocks){var h=0;this.isEdgeLabel||this.fontOptions.align==="center"?h+=(this.size.width-c.width)/2:this.fontOptions.align==="right"&&(h+=this.size.width-c.width);for(var d=0;d<c.blocks.length;d++){var f=c.blocks[d];e.font=f.font;var v=this._getColor(f.color,o,f.strokeColor),g=xe(v,2),b=g[0],p=g[1];f.strokeWidth>0&&(e.lineWidth=f.strokeWidth,e.strokeStyle=p,e.lineJoin="round"),e.fillStyle=b,f.strokeWidth>0&&e.strokeText(f.text,r+h,n+f.vadjust),e.fillText(f.text,r+h,n+f.vadjust),h+=f.width}n+=c.height}}}},{key:"_setAlignment",value:function(e,r,n,a){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){r=0,n=0;var o=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",n-=2*o):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",n+=2*o):e.textBaseline="middle"}else e.textBaseline=a;return[r,n]}},{key:"_getColor",value:function(e,r,n){var a=e||"#000000",o=n||"#ffffff";if(r<=this.elementOptions.scaling.label.drawThreshold){var s=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-r)));a=jt(a,s),o=jt(o,s)}return[a,o]}},{key:"getTextSize",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,r,n),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var e=2,r=this.size.left,n=this.size.top-.5*e;if(this.isEdgeLabel){var a=-this.size.width*.5;switch(this.fontOptions.align){case"middle":r=a,n=-this.size.height*.5;break;case"top":r=a,n=-(this.size.height+e);break;case"bottom":r=a,n=e;break}}var o={left:r,top:n,width:this.size.width,height:this.size.height};return o}},{key:"calculateLabelSize",value:function(e,r,n){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,r,n),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,r,n,a){var o=function(c,h,d){return h==="normal"?d==="mod"?"":c[d]:c[h][d]!==void 0?c[h][d]:c[d]},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};(r||n)&&(a==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?s.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(s,this.elementOptions.id,r,n));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,r){return e!==this.selectedState||r!==this.hoverState}},{key:"_processLabelText",value:function(e,r,n,a){var o=new Jfe(e,this,r,n);return o.process(a)}},{key:"_processLabel",value:function(e,r,n){if(!(this.labelDirty===!1&&!this.differentState(r,n))){var a=this._processLabelText(e,r,n,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=r,this.hoverState=n,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,r){if(!r||typeof r!="string")return!1;var n=r.split(" ");return e.size=+n[0].replace("px",""),e.face=n[1],e.color=n[2],!0}}]),t}(),Pp={},eve={get exports(){return Pp},set exports(t){Pp=t}},tve=Sl,rve=oa,nve=TypeError,ive=function(t){if(tve(t))return t;throw nve(rve(t)+" is not a constructor")},ave=q,ove=Vt,Xh=Do,sve=iT,b0=ive,uve=Ft,w0=Je,lve=ua,RP=se,Ty=ove("Reflect","construct"),cve=Object.prototype,hve=[].push,DP=RP(function(){function t(){}return!(Ty(function(){},[],t)instanceof t)}),MP=!RP(function(){Ty(function(){})}),_0=DP||MP;ave({target:"Reflect",stat:!0,forced:_0,sham:_0},{construct:function(i,e){b0(i),uve(e);var r=arguments.length<3?i:b0(arguments[2]);if(MP&&!DP)return Ty(i,e,r);if(i==r){switch(e.length){case 0:return new i;case 1:return new i(e[0]);case 2:return new i(e[0],e[1]);case 3:return new i(e[0],e[1],e[2]);case 4:return new i(e[0],e[1],e[2],e[3])}var n=[null];return Xh(hve,n,e),new(Xh(sve,i,n))}var a=r.prototype,o=lve(w0(a)?a:cve),s=Xh(i,o,e);return w0(s)?s:o}});var dve=ie,fve=dve.Reflect.construct,vve=fve,pve=vve;(function(t){t.exports=pve})(eve);var P=V(Pp),kp={},gve={get exports(){return kp},set exports(t){kp=t}},Ip={},yve={get exports(){return Ip},set exports(t){Ip=t}},mve=Dx,$ve=mve,bve=$ve,wve=bve;(function(t){t.exports=wve})(yve);(function(t){t.exports=Ip})(gve);var _ve=V(kp),Cp={},Eve={get exports(){return Cp},set exports(t){Cp=t}},Ap={},Sve={get exports(){return Ap},set exports(t){Ap=t}},Ove=q,Tve=uZ;Ove({target:"Object",stat:!0},{setPrototypeOf:Tve});var xve=ie,Pve=xve.Object.setPrototypeOf,kve=Pve,Ive=kve,Cve=Ive,Ave=Cve,Rve=Ave,Dve=Rve;(function(t){t.exports=Dve})(Sve);(function(t){t.exports=Ap})(Eve);var Rp=V(Cp),Dp={},Mve={get exports(){return Dp},set exports(t){Dp=t}},Mp={},Nve={get exports(){return Mp},set exports(t){Mp=t}},Fve=aT,Bve=Fve,Lve=Bve,jve=Lve;(function(t){t.exports=jve})(Nve);(function(t){t.exports=Mp})(Mve);var xy=V(Dp);function Np(t,i){var e;return Np=Rp?xy(e=Rp).call(e):function(n,a){return n.__proto__=a,n},Np(t,i)}function ce(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=_ve(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Dl(t,"prototype",{writable:!1}),i&&Np(t,i)}function zve(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pe(t,i){if(i&&(he(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zve(t)}var Fp={},Hve={get exports(){return Fp},set exports(t){Fp=t}},Bp={},Wve={get exports(){return Bp},set exports(t){Bp=t}},Vve=kx,Uve=Vve,Gve=Uve,Kve=Gve;(function(t){t.exports=Kve})(Wve);(function(t){t.exports=Bp})(Hve);var E0=V(Fp);function j(t){var i;return j=Rp?xy(i=E0).call(i):function(r){return r.__proto__||E0(r)},j(t)}var ni=function(){function t(i,e,r){N(this,t),this.body=e,this.labelModule=r,this.setOptions(i),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 F(t,[{key:"setOptions",value:function(e){this.options=e}},{key:"_setMargins",value:function(e){this.margin={},this.options.margin&&(he(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,r){var n=this.options.borderWidth;return e&&this.resize(e),Math.min(Math.abs(this.width/2/Math.cos(r)),Math.abs(this.height/2/Math.sin(r)))+n}},{key:"enableShadow",value:function(e,r){r.shadow&&(e.shadowColor=r.shadowColor,e.shadowBlur=r.shadowSize,e.shadowOffsetX=r.shadowX,e.shadowOffsetY=r.shadowY)}},{key:"disableShadow",value:function(e,r){r.shadow&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"enableBorderDashes",value:function(e,r){if(r.borderDashes!==!1)if(e.setLineDash!==void 0){var n=r.borderDashes;n===!0&&(n=[5,15]),e.setLineDash(n)}else console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,r.borderDashes=!1}},{key:"disableBorderDashes",value:function(e,r){r.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,r.borderDashes=!1))}},{key:"needsRefresh",value:function(e,r){return this.refreshNeeded===!0?(this.refreshNeeded=!1,!0):this.width===void 0||this.labelModule.differentState(e,r)}},{key:"initContextForDraw",value:function(e,r){var n=r.borderWidth/this.body.view.scale;e.lineWidth=Math.min(this.width,n),e.strokeStyle=r.borderColor,e.fillStyle=r.color}},{key:"performStroke",value:function(e,r){var n=r.borderWidth/this.body.view.scale;e.save(),n>0&&(this.enableBorderDashes(e,r),e.stroke(),this.disableBorderDashes(e,r)),e.restore()}},{key:"performFill",value:function(e,r){e.save(),e.fillStyle=r.color,this.enableShadow(e,r),ts(e).call(e),this.disableShadow(e,r),e.restore(),this.performStroke(e,r)}},{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,r,n,a,o){n!==void 0&&this.resize(n,a,o),this.left=e-this.width/2,this.top=r-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,r,n,a,o){this._updateBoundingBox(e,r,n,a,o)}},{key:"getDimensionsFromLabel",value:function(e,r,n){this.textSize=this.labelModule.getTextSize(e,r,n);var a=this.textSize.width,o=this.textSize.height,s=14;return a===0&&(a=s,o=s),{width:a,height:o}}}]),t}();function qve(t){var i=Yve();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Yve(){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 Xve=function(t){ce(e,t);var i=qve(e);function e(r,n,a){var o;return N(this,e),o=i.call(this,r,n,a),o._setMargins(a),o}return F(e,[{key:"resize",value:function(n){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(n,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(n,a,o,s,u,l){this.resize(n,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(n,l),oT(n,this.left,this.top,this.width,this.height,l.borderRadius),this.performFill(n,l),this.updateBoundingBox(a,o,n,s,u),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,u)}},{key:"updateBoundingBox",value:function(n,a,o,s,u){this._updateBoundingBox(n,a,o,s,u);var l=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(l)}},{key:"distanceToBorder",value:function(n,a){n&&this.resize(n);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}(ni);function Qve(t){var i=Zve();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Zve(){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 Py=function(t){ce(e,t);var i=Qve(e);function e(r,n,a){var o;return N(this,e),o=i.call(this,r,n,a),o.labelOffset=0,o.selected=!1,o}return F(e,[{key:"setOptions",value:function(n,a,o){this.options=n,a===void 0&&o===void 0||this.setImages(a,o)}},{key:"setImages",value:function(n,a){a&&this.selected?(this.imageObj=a,this.imageObjAlt=n):(this.imageObj=n,this.imageObjAlt=a)}},{key:"switchImages",value:function(n){var a=n&&!this.selected||!n&&this.selected;if(this.selected=n,this.imageObjAlt!==void 0&&a){var o=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=o}}},{key:"_getImagePadding",value:function(){var n={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){var a=this.options.imagePadding;he(a)=="object"?(n.top=a.top,n.right=a.right,n.bottom=a.bottom,n.left=a.left):(n.top=a,n.right=a,n.bottom=a,n.left=a)}return n}},{key:"_resizeImage",value:function(){var n,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),n=this.options.size*2*o,a=this.options.size*2*s}else{var u=this._getImagePadding();n=this.imageObj.width+u.left+u.right,a=this.imageObj.height+u.top+u.bottom}this.width=n,this.height=a,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(n,a,o,s){this.initContextForDraw(n,s),Gg(n,a,o,s.size),this.performFill(n,s)}},{key:"_drawImageAtPosition",value:function(n,a){if(this.imageObj.width!=0){n.globalAlpha=a.opacity!==void 0?a.opacity:1,this.enableShadow(n,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,c=this.width-s.left-s.right,h=this.height-s.top-s.bottom;this.imageObj.drawImageAtPosition(n,o,u,l,c,h),this.disableShadow(n,a)}}},{key:"_drawImageLabel",value:function(n,a,o,s,u){var l=0;if(this.height!==void 0){l=this.height*.5;var c=this.labelModule.getTextSize(n,s,u);c.lineCount>=1&&(l+=c.height/2)}var h=o+l;this.options.label&&(this.labelOffset=l),this.labelModule.draw(n,a,h,s,u,"hanging")}}]),e}(ni);function Jve(t){var i=epe();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function epe(){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 tpe=function(t){ce(e,t);var i=Jve(e);function e(r,n,a){var o;return N(this,e),o=i.call(this,r,n,a),o._setMargins(a),o}return F(e,[{key:"resize",value:function(n){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(n,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(n,a,o,s,u,l){this.resize(n,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this._drawRawCircle(n,a,o,l),this.updateBoundingBox(a,o),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,o,s,u)}},{key:"updateBoundingBox",value:function(n,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=n-this.options.size,this.boundingBox.right=n+this.options.size,this.boundingBox.bottom=a+this.options.size}},{key:"distanceToBorder",value:function(n){return n&&this.resize(n),this.width*.5}}]),e}(Py);function rpe(t){var i=npe();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function npe(){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 ipe=function(t){ce(e,t);var i=rpe(e);function e(r,n,a,o,s){var u;return N(this,e),u=i.call(this,r,n,a),u.setImages(o,s),u}return F(e,[{key:"resize",value:function(n){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(n,a,o,s,u,l){this.switchImages(s),this.resize();var c=a,h=o;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,c+=this.width/2,h+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this._drawRawCircle(n,c,h,l),n.save(),n.clip(),this._drawImageAtPosition(n,l),n.restore(),this._drawImageLabel(n,c,h,s,u),this.updateBoundingBox(a,o)}},{key:"updateBoundingBox",value:function(n,a){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=a,this.boundingBox.left=n,this.boundingBox.right=n+this.options.size*2,this.boundingBox.bottom=a+this.options.size*2):(this.boundingBox.top=a-this.options.size,this.boundingBox.left=n-this.options.size,this.boundingBox.right=n+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(n){return n&&this.resize(n),this.width*.5}}]),e}(Py);function ape(t){var i=ope();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function ope(){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 gn=function(t){ce(e,t);var i=ape(e);function e(r,n,a){return N(this,e),i.call(this,r,n,a)}return F(e,[{key:"resize",value:function(n){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(n,a,o);var c=2*s.size;this.width=(u=this.customSizeWidth)!==null&&u!==void 0?u:c,this.height=(l=this.customSizeHeight)!==null&&l!==void 0?l:c,this.radius=.5*this.width}}},{key:"_drawShape",value:function(n,a,o,s,u,l,c,h){var d=this;return this.resize(n,l,c,h),this.left=s-this.width/2,this.top=u-this.height/2,this.initContextForDraw(n,h),SX(a)(n,s,u,h.size),this.performFill(n,h),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(n.font=(l?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),n.fillStyle=this.options.icon.color||"black",n.textAlign="center",n.textBaseline="middle",n.fillText(this.options.icon.code,s,u)),{drawExternalLabel:function(){if(d.options.label!==void 0){d.labelModule.calculateLabelSize(n,l,c,s,u,"hanging");var v=u+.5*d.height+.5*d.labelModule.size.height;d.labelModule.draw(n,s,v,l,c,"hanging")}d.updateBoundingBox(s,u)}}}},{key:"updateBoundingBox",value:function(n,a){this.boundingBox.top=a-this.options.size,this.boundingBox.left=n-this.options.size,this.boundingBox.right=n+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}(ni);function S0(t,i){var e=Te(t);if(sn){var r=sn(t);i&&(r=St(r).call(r,function(n){return vn(t,n).enumerable})),e.push.apply(e,r)}return e}function spe(t){for(var i=1;i<arguments.length;i++){var e,r,n=arguments[i]!=null?arguments[i]:{};i%2?ge(e=S0(Object(n),!0)).call(e,function(a){Ml(t,a,n[a])}):un?Al(t,un(n)):ge(r=S0(Object(n))).call(r,function(a){Rl(t,a,vn(n,a))})}return t}function upe(t){var i=lpe();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function lpe(){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 cpe=function(t){ce(e,t);var i=upe(e);function e(r,n,a,o){var s;return N(this,e),s=i.call(this,r,n,a,o),s.ctxRenderer=o,s}return F(e,[{key:"draw",value:function(n,a,o,s,u,l){this.resize(n,s,u,l),this.left=a-this.width/2,this.top=o-this.height/2,n.save();var c=this.ctxRenderer({ctx:n,id:this.options.id,x:a,y:o,state:{selected:s,hover:u},style:spe({},l),label:this.options.label});if(c.drawNode!=null&&c.drawNode(),n.restore(),c.drawExternalLabel){var h=c.drawExternalLabel;c.drawExternalLabel=function(){n.save(),h(),n.restore()}}return c.nodeDimensions&&(this.customSizeWidth=c.nodeDimensions.width,this.customSizeHeight=c.nodeDimensions.height),c}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function hpe(t){var i=dpe();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function dpe(){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 fpe=function(t){ce(e,t);var i=hpe(e);function e(r,n,a){var o;return N(this,e),o=i.call(this,r,n,a),o._setMargins(a),o}return F(e,[{key:"resize",value:function(n,a,o){if(this.needsRefresh(a,o)){var s=this.getDimensionsFromLabel(n,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(n,a,o,s,u,l){this.resize(n,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this.initContextForDraw(n,l),sT(n,a-this.width/2,o-this.height/2,this.width,this.height),this.performFill(n,l),this.updateBoundingBox(a,o,n,s,u),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(ni);function vpe(t){var i=ppe();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function ppe(){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 gpe=function(t){ce(e,t);var i=vpe(e);function e(r,n,a){return N(this,e),i.call(this,r,n,a)}return F(e,[{key:"draw",value:function(n,a,o,s,u,l){return this._drawShape(n,"diamond",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function ype(t){var i=mpe();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function mpe(){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 $pe=function(t){ce(e,t);var i=ype(e);function e(r,n,a){return N(this,e),i.call(this,r,n,a)}return F(e,[{key:"draw",value:function(n,a,o,s,u,l){return this._drawShape(n,"circle",2,a,o,s,u,l)}},{key:"distanceToBorder",value:function(n){return n&&this.resize(n),this.options.size}}]),e}(gn);function bpe(t){var i=wpe();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function wpe(){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 O0=function(t){ce(e,t);var i=bpe(e);function e(r,n,a){return N(this,e),i.call(this,r,n,a)}return F(e,[{key:"resize",value:function(n){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(n,a,o);this.height=s.height*2,this.width=s.width+s.height,this.radius=.5*this.width}}},{key:"draw",value:function(n,a,o,s,u,l){this.resize(n,s,u),this.left=a-this.width*.5,this.top=o-this.height*.5,this.initContextForDraw(n,l),iv(n,this.left,this.top,this.width,this.height),this.performFill(n,l),this.updateBoundingBox(a,o,n,s,u),this.labelModule.draw(n,a,o,s,u)}},{key:"distanceToBorder",value:function(n,a){n&&this.resize(n);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}(ni);function _pe(t){var i=Epe();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Epe(){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 Spe=function(t){ce(e,t);var i=_pe(e);function e(r,n,a){var o;return N(this,e),o=i.call(this,r,n,a),o._setMargins(a),o}return F(e,[{key:"resize",value:function(n,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(n,a,o,s,u,l){var c=this;return this.resize(n,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(n,a,o,s,u,l),{drawExternalLabel:function(){if(c.options.label!==void 0){var d=5;c.labelModule.draw(n,c.left+c.iconSize.width/2+c.margin.left,o+c.height/2+d,s)}c.updateBoundingBox(a,o)}}}},{key:"updateBoundingBox",value:function(n,a){if(this.boundingBox.top=a-this.options.icon.size*.5,this.boundingBox.left=n-this.options.icon.size*.5,this.boundingBox.right=n+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(n,a,o,s,u,l){var c=Number(this.options.icon.size);this.options.icon.code!==void 0?(n.font=[this.options.icon.weight!=null?this.options.icon.weight:s?"bold":"",(this.options.icon.weight!=null&&s?5:0)+c+"px",this.options.icon.face].join(" "),n.fillStyle=this.options.icon.color||"black",n.textAlign="center",n.textBaseline="middle",this.enableShadow(n,l),n.fillText(this.options.icon.code,a,o),this.disableShadow(n,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(n,a){return this._distanceToBorder(n,a)}}]),e}(ni);function Ope(t){var i=Tpe();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Tpe(){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 xpe=function(t){ce(e,t);var i=Ope(e);function e(r,n,a,o,s){var u;return N(this,e),u=i.call(this,r,n,a),u.setImages(o,s),u}return F(e,[{key:"resize",value:function(n){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(n,a,o,s,u,l){n.save(),this.switchImages(s),this.resize();var c=a,h=o;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=a,this.top=o,c+=this.width/2,h+=this.height/2):(this.left=a-this.width/2,this.top=o-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){var d=this.options.borderWidth,f=this.options.borderWidthSelected||2*this.options.borderWidth,v=(s?f:d)/this.body.view.scale;n.lineWidth=Math.min(this.width,v),n.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=jt(g,l.opacity),b=jt(b,l.opacity)),n.strokeStyle=g,n.fillStyle=b,n.rect(this.left-.5*n.lineWidth,this.top-.5*n.lineWidth,this.width+n.lineWidth,this.height+n.lineWidth),ts(n).call(n),this.performStroke(n,l),n.closePath()}this._drawImageAtPosition(n,l),this._drawImageLabel(n,c,h,s,u),this.updateBoundingBox(a,o),n.restore()}},{key:"updateBoundingBox",value:function(n,a){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=n,this.top=a):(this.left=n-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(n,a){return this._distanceToBorder(n,a)}}]),e}(Py);function Ppe(t){var i=kpe();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function kpe(){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 Ipe=function(t){ce(e,t);var i=Ppe(e);function e(r,n,a){return N(this,e),i.call(this,r,n,a)}return F(e,[{key:"draw",value:function(n,a,o,s,u,l){return this._drawShape(n,"square",2,a,o,s,u,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function Cpe(t){var i=Ape();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Ape(){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 Rpe=function(t){ce(e,t);var i=Cpe(e);function e(r,n,a){return N(this,e),i.call(this,r,n,a)}return F(e,[{key:"draw",value:function(n,a,o,s,u,l){return this._drawShape(n,"hexagon",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function Dpe(t){var i=Mpe();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Mpe(){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 Npe=function(t){ce(e,t);var i=Dpe(e);function e(r,n,a){return N(this,e),i.call(this,r,n,a)}return F(e,[{key:"draw",value:function(n,a,o,s,u,l){return this._drawShape(n,"star",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function Fpe(t){var i=Bpe();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Bpe(){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 Lpe=function(t){ce(e,t);var i=Fpe(e);function e(r,n,a){var o;return N(this,e),o=i.call(this,r,n,a),o._setMargins(a),o}return F(e,[{key:"resize",value:function(n,a,o){this.needsRefresh(a,o)&&(this.textSize=this.labelModule.getTextSize(n,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(n,a,o,s,u,l){this.resize(n,s,u),this.left=a-this.width/2,this.top=o-this.height/2,this.enableShadow(n,l),this.labelModule.draw(n,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,s,u),this.disableShadow(n,l),this.updateBoundingBox(a,o,n,s,u)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(ni);function jpe(t){var i=zpe();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function zpe(){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 Hpe=function(t){ce(e,t);var i=jpe(e);function e(r,n,a){return N(this,e),i.call(this,r,n,a)}return F(e,[{key:"draw",value:function(n,a,o,s,u,l){return this._drawShape(n,"triangle",3,a,o,s,u,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function Wpe(t){var i=Vpe();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Vpe(){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 Upe=function(t){ce(e,t);var i=Wpe(e);function e(r,n,a){return N(this,e),i.call(this,r,n,a)}return F(e,[{key:"draw",value:function(n,a,o,s,u,l){return this._drawShape(n,"triangleDown",3,a,o,s,u,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function T0(t,i){var e=Te(t);if(sn){var r=sn(t);i&&(r=St(r).call(r,function(n){return vn(t,n).enumerable})),e.push.apply(e,r)}return e}function x0(t){for(var i=1;i<arguments.length;i++){var e,r,n=arguments[i]!=null?arguments[i]:{};i%2?ge(e=T0(Object(n),!0)).call(e,function(a){Ml(t,a,n[a])}):un?Al(t,un(n)):ge(r=T0(Object(n))).call(r,function(a){Rl(t,a,vn(n,a))})}return t}var kt=function(){function t(i,e,r,n,a,o){N(this,t),this.options=tn(a),this.globalOptions=a,this.defaultOptions=o,this.body=e,this.edges=[],this.id=void 0,this.imagelist=r,this.grouplist=n,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 AP(this.body,this.options,!1),this.setOptions(i)}return F(t,[{key:"attachEdge",value:function(e){var r;ae(r=this.edges).call(r,e)===-1&&this.edges.push(e)}},{key:"detachEdge",value:function(e){var r,n=ae(r=this.edges).call(r,e);if(n!=-1){var a;Or(a=this.edges).call(a,n,1)}}},{key:"setOptions",value:function(e){var r=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");t.checkMass(e,this.id),e.x!==void 0&&(e.x===null?(this.x=void 0,this.predefinedPosition=!1):(this.x=Xt(e.x),this.predefinedPosition=!0)),e.y!==void 0&&(e.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=Xt(e.y),this.predefinedPosition=!0)),e.size!==void 0&&(this.baseSize=e.size),e.value!==void 0&&(e.value=kP(e.value)),t.parseOptions(this.options,e,!0,this.globalOptions,this.grouplist);var n=[e,this.options,this.defaultOptions];return this.chooser=Oy("node",n),this._load_images(),this.updateLabelModule(e),e.opacity!==void 0&&t.checkOpacity(e.opacity)&&(this.options.opacity=e.opacity),this.updateShape(r),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 r=this.options.opacity;e.borderColor=jt(e.borderColor,r),e.color=jt(e.color,r),e.shadowColor=jt(e.shadowColor,r)}return e}},{key:"updateLabelModule",value:function(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),t.updateGroupOptions(this.options,x0(x0({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);var r=this.grouplist.get(this.options.group,!1),n=[e,this.options,r,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,n),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 Xve(this.options,this.body,this.labelModule);break;case"circle":this.shape=new tpe(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new ipe(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new cpe(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new fpe(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new gpe(this.options,this.body,this.labelModule);break;case"dot":this.shape=new $pe(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new O0(this.options,this.body,this.labelModule);break;case"icon":this.shape=new Spe(this.options,this.body,this.labelModule);break;case"image":this.shape=new xpe(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new Ipe(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new Rpe(this.options,this.body,this.labelModule);break;case"star":this.shape=new Npe(this.options,this.body,this.labelModule);break;case"text":this.shape=new Lpe(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new Hpe(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new Upe(this.options,this.body,this.labelModule);break;default:this.shape=new O0(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,r){return this.shape.distanceToBorder(e,r)}},{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,r,n){if(this.options.value!==void 0){var a=this.options.scaling.customScalingFunction(e,r,n,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 r=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,r)||{}}},{key:"updateBoundingBox",value:function(e){this.shape.updateBoundingBox(this.x,this.y,e)}},{key:"resize",value:function(e){var r=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,r)}},{key:"getItemsOnPoint",value:function(e){var r=[];return this.labelModule.visible()&&Tp(this.labelModule.getSize(),e)&&r.push({nodeId:this.id,labelId:0}),Tp(this.shape.boundingBox,e)&&r.push({nodeId:this.id}),r}},{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,r,n){var a;if(n!==void 0){var o=e.group;if(r!==void 0&&r.group!==void 0&&o!==r.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=n.get(o);u.opacity!==void 0&&r.opacity===void 0&&(t.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=St(a=Lfe(r)).call(a,function(c){return r[c]!=null});l.push("font"),Lu(l,e,u),e.color=pp(e.color)}}}},{key:"parseOptions",value:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,s=["color","fixed","shadow"];if(Lu(s,e,r,n),t.checkMass(r),e.opacity!==void 0&&(t.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),r.opacity!==void 0&&(t.checkOpacity(r.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+r.opacity),r.opacity=void 0)),r.shapeProperties&&!t.checkCoordinateOrigin(r.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+r.shapeProperties.coordinateOrigin),Lt(e,r,"shadow",a),r.color!==void 0&&r.color!==null){var u=pp(r.color);cP(e.color,u)}else n===!0&&r.color===null&&(e.color=tn(a.color));r.fixed!==void 0&&r.fixed!==null&&(typeof r.fixed=="boolean"?(e.fixed.x=r.fixed,e.fixed.y=r.fixed):(r.fixed.x!==void 0&&typeof r.fixed.x=="boolean"&&(e.fixed.x=r.fixed.x),r.fixed.y!==void 0&&typeof r.fixed.y=="boolean"&&(e.fixed.y=r.fixed.y))),n===!0&&r.font===null&&(e.font=tn(a.font)),t.updateGroupOptions(e,r,o),r.scaling!==void 0&&Lt(e.scaling,r.scaling,"label",a.scaling)}},{key:"checkMass",value:function(e,r){if(e.mass!==void 0&&e.mass<=0){var n="";r!==void 0&&(n=" in node id: "+r),console.error("%cNegative or zero mass disallowed"+n+", setting mass to 1.",vP),e.mass=1}}}]),t}();function Gpe(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=Kpe(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:n}}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(t)},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 Kpe(t,i){var e;if(t){if(typeof t=="string")return P0(t,i);var r=st(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ei(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return P0(t,i)}}function P0(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}var qpe=function(){function t(i,e,r,n){var a,o=this;if(N(this,t),this.body=i,this.images=e,this.groups=r,this.layoutEngine=n,this.body.functions.createNode=C(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,c,h){if(l===u)return .5;var d=1/(l-u);return Math.max(0,(h-u)*d)}},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=tn(this.defaultOptions),this.bindEventListeners()}return F(t,[{key:"bindEventListeners",value:function(){var e,r,n=this;this.body.emitter.on("refreshNodes",C(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",C(r=this.refresh).call(r,this)),this.body.emitter.on("destroy",function(){ee(n.nodesListeners,function(a,o){n.body.data.nodes&&n.body.data.nodes.off(o,a)}),delete n.body.functions.createNode,delete n.nodesListeners.add,delete n.nodesListeners.update,delete n.nodesListeners.remove,delete n.nodesListeners})}},{key:"setOptions",value:function(e){if(e!==void 0){if(kt.parseOptions(this.options,e),e.opacity!==void 0&&(wp(e.opacity)||!xn(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 r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&this.body.nodes[r].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(var n=0,a=Te(this.body.nodes);n<a.length;n++){var o=a[n];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 r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.body.data.nodes;if(jO("id",e))this.body.data.nodes=e;else if(ve(e))this.body.data.nodes=new Iu,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new Iu;else throw new TypeError("Array or DataSet expected");if(n&&ee(this.nodesListeners,function(s,u){n.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)}r===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n,a=[],o=0;o<e.length;o++){n=e[o];var s=this.body.data.nodes.get(n),u=this.create(s);a.push(u),this.body.nodes[n]=u}this.layoutEngine.positionInitially(a),r===!1&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(e,r,n){for(var a=this.body.nodes,o=!1,s=0;s<e.length;s++){var u=e[s],l=a[u],c=r[s];l!==void 0?l.setOptions(c)&&(o=!0):(o=!0,l=this.create(c),a[u]=l)}!o&&n!==void 0&&(o=vfe(r).call(r,function(h,d){var f=n[d];return f&&f.level!==h.level})),o===!0?this.body.emitter.emit("_dataChanged"):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(e){for(var r=this.body.nodes,n=0;n<e.length;n++){var a=e[n];delete r[a]}this.body.emitter.emit("_dataChanged")}},{key:"create",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:kt;return new r(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;ee(this.body.nodes,function(n,a){var o=e.body.data.nodes.get(a);o!==void 0&&(r===!0&&n.setOptions({x:null,y:null}),n.setOptions({fixed:!1}),n.setOptions(o))})}},{key:"getPositions",value:function(e){var r={};if(e!==void 0){if(ve(e)===!0){for(var n=0;n<e.length;n++)if(this.body.nodes[e[n]]!==void 0){var a=this.body.nodes[e[n]];r[e[n]]={x:Math.round(a.x),y:Math.round(a.y)}}}else if(this.body.nodes[e]!==void 0){var o=this.body.nodes[e];r[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]];r[this.body.nodeIndices[s]]={x:Math.round(u.x),y:Math.round(u.y)}}return r}},{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=[],r=this.body.data.nodes.getDataSet(),n=Gpe(r.get()),a;try{for(n.s();!(a=n.n()).done;){var o=a.value,s=o.id,u=this.body.nodes[s],l=Math.round(u.x),c=Math.round(u.y);(o.x!==l||o.y!==c)&&e.push({id:s,x:l,y:c})}}catch(h){n.e(h)}finally{n.f()}r.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,r){var n=[];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];r!=="to"&&u.toId==a.id?o[u.fromId]===void 0&&(n.push(u.fromId),o[u.fromId]=!0):r!=="from"&&u.fromId==a.id&&o[u.toId]===void 0&&(n.push(u.toId),o[u.toId]=!0)}return n}},{key:"getConnectedEdges",value:function(e){var r=[];if(this.body.nodes[e]!==void 0)for(var n=this.body.nodes[e],a=0;a<n.edges.length;a++)r.push(n.edges[a].id);else console.error("NodeId provided for getConnectedEdges does not exist. Provided: ",e);return r}},{key:"moveNode",value:function(e,r,n){var a=this;this.body.nodes[e]!==void 0?(this.body.nodes[e].x=Number(r),this.body.nodes[e].y=Number(n),pr(function(){a.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}]),t}(),Lp={},Ype={get exports(){return Lp},set exports(t){Lp=t}},jp={},Xpe={get exports(){return jp},set exports(t){jp=t}},k0=et,Qpe=function(t){return t!==void 0&&(k0(t,"value")||k0(t,"writable"))},Zpe=q,Jpe=Mt,ege=Je,tge=Ft,rge=Qpe,nge=ia,ige=El;function NP(t,i){var e=arguments.length<3?t:arguments[2],r,n;if(tge(t)===e)return t[i];if(r=nge.f(t,i),r)return rge(r)?r.value:r.get===void 0?void 0:Jpe(r.get,e);if(ege(n=ige(t)))return NP(n,i,e)}Zpe({target:"Reflect",stat:!0},{get:NP});var age=ie,oge=age.Reflect.get,sge=oge,uge=sge,lge=uge,cge=lge,hge=cge,dge=hge;(function(t){t.exports=dge})(Xpe);(function(t){t.exports=jp})(Ype);var I0=V(Lp),zp={},fge={get exports(){return zp},set exports(t){zp=t}},Hp={},vge={get exports(){return Hp},set exports(t){Hp=t}},pge=ux,gge=pge,yge=gge,mge=yge;(function(t){t.exports=mge})(vge);(function(t){t.exports=Hp})(fge);var $ge=V(zp);function bge(t,i){for(;!Object.prototype.hasOwnProperty.call(t,i)&&(t=j(t),t!==null););return t}function ou(){if(typeof Reflect<"u"&&I0){var t;ou=xy(t=I0).call(t)}else ou=function(e,r,n){var a=bge(e,r);if(a){var o=$ge(a,r);return o.get?o.get.call(arguments.length<3?e:n):o.value}};return ou.apply(this,arguments)}var Wp={},wge={get exports(){return Wp},set exports(t){Wp=t}},_ge=q,C0=Math.hypot,Ege=Math.abs,Sge=Math.sqrt,Oge=!!C0&&C0(1/0,NaN)!==1/0;_ge({target:"Math",stat:!0,arity:2,forced:Oge},{hypot:function(i,e){for(var r=0,n=0,a=arguments.length,o=0,s,u;n<a;)s=Ege(arguments[n++]),o<s?(u=o/s,r=r*u*u+1,o=s):s>0?(u=s/o,r+=u*u):r+=s;return o===1/0?1/0:o*Sge(r)}});var Tge=ie,xge=Tge.Math.hypot,Pge=xge,kge=Pge;(function(t){t.exports=kge})(wge);var Ige=V(Wp);function FP(t){var i=Cge();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Cge(){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 Me=function(){function t(){N(this,t)}return F(t,null,[{key:"transform",value:function(e,r){ve(e)||(e=[e]);for(var n=r.point.x,a=r.point.y,o=r.angle,s=r.length,u=0;u<e.length;++u){var l=e[u],c=l.x*Math.cos(o)-l.y*Math.sin(o),h=l.x*Math.sin(o)+l.y*Math.cos(o);l.x=n+s*c,l.y=a+s*h}}},{key:"drawPath",value:function(e,r){e.beginPath(),e.moveTo(r[0].x,r[0].y);for(var n=1;n<r.length;++n)e.lineTo(r[n].x,r[n].y);e.closePath()}}]),t}(),Age=function(t){ce(e,t);var i=FP(e);function e(){return N(this,e),i.apply(this,arguments)}return F(e,null,[{key:"draw",value:function(n,a){if(a.image){n.save(),n.translate(a.point.x,a.point.y),n.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(n,1,-o/2,0,o,s),n.restore()}return!1}}]),e}(Me),Rge=function(t){ce(e,t);var i=FP(e);function e(){return N(this,e),i.apply(this,arguments)}return F(e,null,[{key:"draw",value:function(n,a){var o=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return Me.transform(o,a),Me.drawPath(n,o),!0}}]),e}(Me),Dge=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var n=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return Me.transform(n,r),Me.drawPath(e,n),!0}}]),t}(),Mge=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var n={x:-.4,y:0};Me.transform(n,r),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";var a=Math.PI,o=r.angle-a/2,s=r.angle+a/2;return e.beginPath(),e.arc(n.x,n.y,r.length*.4,o,s,!1),e.stroke(),!0}}]),t}(),Nge=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var n={x:-.3,y:0};Me.transform(n,r),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";var a=Math.PI,o=r.angle+a/2,s=r.angle+3*a/2;return e.beginPath(),e.arc(n.x,n.y,r.length*.4,o,s,!1),e.stroke(),!0}}]),t}(),Fge=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var n=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return Me.transform(n,r),Me.drawPath(e,n),!0}}]),t}(),Bge=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var n=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return Me.transform(n,r),Me.drawPath(e,n),!0}}]),t}(),Lge=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var n={x:-.4,y:0};return Me.transform(n,r),Gg(e,n.x,n.y,r.length*.4),!0}}]),t}(),jge=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var n=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return Me.transform(n,r),Me.drawPath(e,n),!0}}]),t}(),zge=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var n=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return Me.transform(n,r),Me.drawPath(e,n),!0}}]),t}(),Hge=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var n=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return Me.transform(n,r),Me.drawPath(e,n),!0}}]),t}(),Wge=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var n=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return Me.transform(n,r),Me.drawPath(e,n),!0}}]),t}(),BP=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var n;switch(r.type&&(n=r.type.toLowerCase()),n){case"image":return Age.draw(e,r);case"circle":return Lge.draw(e,r);case"box":return zge.draw(e,r);case"crow":return Dge.draw(e,r);case"curve":return Mge.draw(e,r);case"diamond":return Hge.draw(e,r);case"inv_curve":return Nge.draw(e,r);case"triangle":return Fge.draw(e,r);case"inv_triangle":return Bge.draw(e,r);case"bar":return jge.draw(e,r);case"vee":return Wge.draw(e,r);case"arrow":default:return Rge.draw(e,r)}}}]),t}();function A0(t,i){var e=Te(t);if(sn){var r=sn(t);i&&(r=St(r).call(r,function(n){return vn(t,n).enumerable})),e.push.apply(e,r)}return e}function R0(t){for(var i=1;i<arguments.length;i++){var e,r,n=arguments[i]!=null?arguments[i]:{};i%2?ge(e=A0(Object(n),!0)).call(e,function(a){Ml(t,a,n[a])}):un?Al(t,un(n)):ge(r=A0(Object(n))).call(r,function(a){Rl(t,a,vn(n,a))})}return t}var LP=function(){function t(i,e,r){N(this,t),this._body=e,this._labelModule=r,this.color={},this.colorDirty=!0,this.hoverWidth=1.5,this.selectionWidth=2,this.setOptions(i),this.fromPoint=this.from,this.toPoint=this.to}return F(t,[{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,r,n,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,r),e.lineWidth=r.width,r.dashes!==!1?this._drawDashedLine(e,r,o):this._drawLine(e,r,o)}},{key:"_drawLine",value:function(e,r,n,a,o){if(this.from!=this.to)this._line(e,r,n,a,o);else{var s=this._getCircleData(e),u=xe(s,3),l=u[0],c=u[1],h=u[2];this._circle(e,r,l,c,h)}}},{key:"_drawDashedLine",value:function(e,r,n,a,o){e.lineCap="round";var s=ve(r.dashes)?r.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(s),e.lineDashOffset=0,this.from!=this.to)this._line(e,r,n);else{var u=this._getCircleData(e),l=xe(u,3),c=l[0],h=l[1],d=l[2];this._circle(e,r,c,h,d)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)uT(e,this.from.x,this.from.y,this.to.x,this.to.y,s);else{var f=this._getCircleData(e),v=xe(f,3),g=v[0],b=v[1],p=v[2];this._circle(e,r,g,b,p)}this.enableShadow(e,r),e.stroke(),this.disableShadow(e,r)}}},{key:"findBorderPosition",value:function(e,r,n){return this.from!=this.to?this._findBorderPosition(e,r,n):this._findBorderPositionCircle(e,r,n)}},{key:"findBorderPositions",value:function(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};var r,n=st(r=this._getCircleData(e)).call(r,0,2),a=xe(n,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 r=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);var n=IP(e,this.options.selfReference.angle,r,this.from);return[n.x,n.y,r]}},{key:"_pointOnCircle",value:function(e,r,n,a){var o=a*2*Math.PI;return{x:e+n*Math.cos(o),y:r-n*Math.sin(o)}}},{key:"_findBorderPositionCircle",value:function(e,r,n){var a=n.x,o=n.y,s=n.low,u=n.high,l=n.direction,c=10,h=this.options.selfReference.size,d=.05,f,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,f=this._pointOnCircle(a,o,h,v);var p=Math.atan2(e.y-f.y,e.x-f.x),$=e.distanceToBorder(r,p)+g,y=Math.sqrt(Math.pow(f.x-e.x,2)+Math.pow(f.y-e.y,2)),m=$-y;if(Math.abs(m)<d)break;m>0?l>0?s=v:u=v:l>0?u=v:s=v,++b}while(s<=u&&b<c);return R0(R0({},f),{},{t:v})}},{key:"getLineWidth",value:function(e,r){return e===!0?Math.max(this.selectionWidth,.3/this._body.view.scale):r===!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,r){if(r.inheritsColor!==!1){if(r.inheritsColor==="both"&&this.from.id!==this.to.id){var n=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=jt(this.from.options.color.border,r.opacity),o=jt(this.to.options.color.border,r.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),n.addColorStop(0,a),n.addColorStop(1,o),n}return r.inheritsColor==="to"?jt(this.to.options.color.border,r.opacity):jt(this.from.options.color.border,r.opacity)}else return jt(r.color,r.opacity)}},{key:"_circle",value:function(e,r,n,a,o){this.enableShadow(e,r);var s=0,u=Math.PI*2;if(!this.options.selfReference.renderBehindTheNode){var l=this.options.selfReference.angle,c=this.options.selfReference.angle+Math.PI,h=this._findBorderPositionCircle(this.from,e,{x:n,y:a,low:l,high:c,direction:-1}),d=this._findBorderPositionCircle(this.from,e,{x:n,y:a,low:l,high:c,direction:1});s=Math.atan2(h.y-a,h.x-n),u=Math.atan2(d.y-a,d.x-n)}e.beginPath(),e.arc(n,a,o,s,u,!1),e.stroke(),this.disableShadow(e,r)}},{key:"getDistanceToEdge",value:function(e,r,n,a,o,s){if(this.from!=this.to)return this._getDistanceToEdge(e,r,n,a,o,s);var u=this._getCircleData(void 0),l=xe(u,3),c=l[0],h=l[1],d=l[2],f=c-o,v=h-s;return Math.abs(Math.sqrt(f*f+v*v)-d)}},{key:"_getDistanceToLine",value:function(e,r,n,a,o,s){var u=n-e,l=a-r,c=u*u+l*l,h=((o-e)*u+(s-r)*l)/c;h>1?h=1:h<0&&(h=0);var d=e+h*u,f=r+h*l,v=d-o,g=f-s;return Math.sqrt(v*v+g*g)}},{key:"getArrowData",value:function(e,r,n,a,o,s){var u,l,c,h,d,f,v,g=s.width;r==="from"?(c=this.from,h=this.to,d=s.fromArrowScale<0,f=Math.abs(s.fromArrowScale),v=s.fromArrowType):r==="to"?(c=this.to,h=this.from,d=s.toArrowScale<0,f=Math.abs(s.toArrowScale),v=s.toArrowType):(c=this.to,h=this.from,d=s.middleArrowScale<0,f=Math.abs(s.middleArrowScale),v=s.middleArrowType);var b=15*f+3*g;if(c!=h){var p=Ige(c.x-h.x,c.y-h.y),$=b/p;if(r!=="middle")if(this.options.smooth.enabled===!0){var y=this._findBorderPosition(c,e,{via:n}),m=this.getPoint(y.t+$*(r==="from"?1:-1),n);u=Math.atan2(y.y-m.y,y.x-m.x),l=y}else u=Math.atan2(c.y-h.y,c.x-h.x),l=this._findBorderPosition(c,e);else{var _=(d?-$:$)/2,S=this.getPoint(.5+_,n),T=this.getPoint(.5-_,n);u=Math.atan2(S.y-T.y,S.x-T.x),l=this.getPoint(.5,n)}}else{var O=this._getCircleData(e),w=xe(O,3),E=w[0],A=w[1],H=w[2];if(r==="from"){var B=this.options.selfReference.angle,X=this.options.selfReference.angle+Math.PI,re=this._findBorderPositionCircle(this.from,e,{x:E,y:A,low:B,high:X,direction:-1});u=re.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,l=re}else if(r==="to"){var te=this.options.selfReference.angle,le=this.options.selfReference.angle+Math.PI,we=this._findBorderPositionCircle(this.from,e,{x:E,y:A,low:te,high:le,direction:1});u=we.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,l=we}else{var Oe=this.options.selfReference.angle/(2*Math.PI);l=this._pointOnCircle(E,A,H,Oe),u=Oe*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}var ar=l.x-b*.9*Math.cos(u),rt=l.y-b*.9*Math.sin(u),_e={x:ar,y:rt};return{point:l,core:_e,angle:u,length:b,type:v}}},{key:"drawArrowHead",value:function(e,r,n,a,o){e.strokeStyle=this.getColor(e,r),e.fillStyle=e.strokeStyle,e.lineWidth=r.width;var s=BP.draw(e,o);s&&(this.enableShadow(e,r),ts(e).call(e),this.disableShadow(e,r))}},{key:"enableShadow",value:function(e,r){r.shadow===!0&&(e.shadowColor=r.shadowColor,e.shadowBlur=r.shadowSize,e.shadowOffsetX=r.shadowX,e.shadowOffsetY=r.shadowY)}},{key:"disableShadow",value:function(e,r){r.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"drawBackground",value:function(e,r){if(r.background!==!1){var n={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=r.backgroundColor,e.lineWidth=r.backgroundSize,this.setStrokeDashed(e,r.backgroundDashes),e.stroke(),e.strokeStyle=n.strokeStyle,e.lineWidth=n.lineWidth,e.dashes=n.dashes,this.setStrokeDashed(e,r.dashes)}}},{key:"setStrokeDashed",value:function(e,r){if(r!==!1)if(e.setLineDash!==void 0){var n=ve(r)?r:[5,5];e.setLineDash(n)}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.")}}]),t}();function D0(t,i){var e=Te(t);if(sn){var r=sn(t);i&&(r=St(r).call(r,function(n){return vn(t,n).enumerable})),e.push.apply(e,r)}return e}function M0(t){for(var i=1;i<arguments.length;i++){var e,r,n=arguments[i]!=null?arguments[i]:{};i%2?ge(e=D0(Object(n),!0)).call(e,function(a){Ml(t,a,n[a])}):un?Al(t,un(n)):ge(r=D0(Object(n))).call(r,function(a){Rl(t,a,vn(n,a))})}return t}function Vge(t){var i=Uge();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Uge(){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 ky=function(t){ce(e,t);var i=Vge(e);function e(r,n,a){return N(this,e),i.call(this,r,n,a)}return F(e,[{key:"_findBorderPositionBezier",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates(),s=10,u=.2,l=!1,c=1,h=0,d=this.to,f,v,g=this.options.endPointOffset?this.options.endPointOffset.to:0;n.id===this.from.id&&(d=this.from,l=!0,g=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(g=0);var b=0;do{v=(h+c)*.5,f=this.getPoint(v,o);var p=Math.atan2(d.y-f.y,d.x-f.x),$=d.distanceToBorder(a,p)+g,y=Math.sqrt(Math.pow(f.x-d.x,2)+Math.pow(f.y-d.y,2)),m=$-y;if(Math.abs(m)<u)break;m<0?l===!1?h=v:c=v:l===!1?c=v:h=v,++b}while(h<=c&&b<s);return M0(M0({},f),{},{t:v})}},{key:"_getDistanceToBezierEdge",value:function(n,a,o,s,u,l,c){var h=1e9,d,f,v,g,b,p=n,$=a;for(f=1;f<10;f++)v=.1*f,g=Math.pow(1-v,2)*n+2*v*(1-v)*c.x+Math.pow(v,2)*o,b=Math.pow(1-v,2)*a+2*v*(1-v)*c.y+Math.pow(v,2)*s,f>0&&(d=this._getDistanceToLine(p,$,g,b,u,l),h=d<h?d:h),p=g,$=b;return h}},{key:"_bezierCurve",value:function(n,a,o,s){n.beginPath(),n.moveTo(this.fromPoint.x,this.fromPoint.y),o!=null&&o.x!=null?s!=null&&s.x!=null?n.bezierCurveTo(o.x,o.y,s.x,s.y,this.toPoint.x,this.toPoint.y):n.quadraticCurveTo(o.x,o.y,this.toPoint.x,this.toPoint.y):n.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(n,a),this.enableShadow(n,a),n.stroke(),this.disableShadow(n,a)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}}]),e}(LP);function Gge(t){var i=Kge();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Kge(){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 N0=function(t){ce(e,t);var i=Gge(e);function e(r,n,a){var o;return N(this,e),o=i.call(this,r,n,a),o.via=o.via,o._boundFunction=function(){o.positionBezierNode()},o._body.emitter.on("_repositionBezierNodes",o._boundFunction),o}return F(e,[{key:"setOptions",value:function(n){ou(j(e.prototype),"setOptions",this).call(this,n);var a=!1;this.options.physics!==n.physics&&(a=!0),this.options=n,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 n="edgeId:"+this.id,a=this._body.functions.createNode({id:n,shape:"circle",physics:!0,hidden:!0});this._body.nodes[n]=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(n,a,o){this._bezierCurve(n,a,o)}},{key:"_getViaCoordinates",value:function(){return this.via}},{key:"getViaNode",value:function(){return this.via}},{key:"getPoint",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){var o=this._getCircleData(),s=xe(o,3),u=s[0],l=s[1],c=s[2],h=2*Math.PI*(1-n);return{x:u+c*Math.sin(h),y:l+c-c*(1-Math.cos(h))}}else return{x:Math.pow(1-n,2)*this.fromPoint.x+2*n*(1-n)*a.x+Math.pow(n,2)*this.toPoint.x,y:Math.pow(1-n,2)*this.fromPoint.y+2*n*(1-n)*a.y+Math.pow(n,2)*this.toPoint.y}}},{key:"_findBorderPosition",value:function(n,a){return this._findBorderPositionBezier(n,a,this.via)}},{key:"_getDistanceToEdge",value:function(n,a,o,s,u,l){return this._getDistanceToBezierEdge(n,a,o,s,u,l,this.via)}}]),e}(ky);function qge(t){var i=Yge();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Yge(){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 F0=function(t){ce(e,t);var i=qge(e);function e(r,n,a){return N(this,e),i.call(this,r,n,a)}return F(e,[{key:"_line",value:function(n,a,o){this._bezierCurve(n,a,o)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var n=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=n*s:u=l=n*o,this.from.x>this.to.x&&(u=-u),this.from.y>=this.to.y&&(l=-l);var c=this.from.x+u,h=this.from.y+l;return a==="discrete"&&(o<=s?c=o<n*s?this.from.x:c:h=s<n*o?this.from.y:h),{x:c,y:h}}else if(a==="straightCross"){var d=(1-n)*o,f=(1-n)*s;return o<=s?(d=0,this.from.y<this.to.y&&(f=-f)):(this.from.x<this.to.x&&(d=-d),f=0),{x:this.to.x+d,y:this.to.y+f}}else if(a==="horizontal"){var v=(1-n)*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-n)*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=($+(n*.5+.5)*p)%(2*p);return{x:this.from.x+(n*.5+.5)*b*Math.sin(y),y:this.from.y+(n*.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,S=Math.atan2(s,o),T=(S+(-n*.5+.5)*_)%(2*_);return{x:this.from.x+(n*.5+.5)*m*Math.sin(T),y:this.from.y+(n*.5+.5)*m*Math.cos(T)}}else{var O,w;o<=s?O=w=n*s:O=w=n*o,this.from.x>this.to.x&&(O=-O),this.from.y>=this.to.y&&(w=-w);var E=this.from.x+O,A=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?A=this.to.y>A?this.to.y:A:A=this.to.y<A?this.to.y:A,{x:E,y:A}}}},{key:"_findBorderPosition",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(n,a,o.via)}},{key:"_getDistanceToEdge",value:function(n,a,o,s,u,l){var c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(n,a,o,s,u,l,c)}},{key:"getPoint",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=n,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}(ky);function Xge(t){var i=Qge();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Qge(){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 Zge=function(t){ce(e,t);var i=Xge(e);function e(r,n,a){return N(this,e),i.call(this,r,n,a)}return F(e,[{key:"_getDistanceToBezierEdge2",value:function(n,a,o,s,u,l,c,h){for(var d=1e9,f=n,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]*n+g[1]*c.x+g[2]*h.x+g[3]*o,y=g[0]*a+g[1]*c.y+g[2]*h.y+g[3]*s;if(b>0){var m=this._getDistanceToLine(f,v,$,y,u,l);d=m<d?m:d}f=$,v=y}return d}}]),e}(ky);function Jge(t){var i=eye();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function eye(){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 B0=function(t){ce(e,t);var i=Jge(e);function e(r,n,a){return N(this,e),i.call(this,r,n,a)}return F(e,[{key:"_line",value:function(n,a,o){var s=o[0],u=o[1];this._bezierCurve(n,a,s,u)}},{key:"_getViaCoordinates",value:function(){var n=this.from.x-this.to.x,a=this.from.y-this.to.y,o,s,u,l,c=this.options.smooth.roundness;return(Math.abs(n)>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-c*n,u=this.to.x+c*n):(s=this.from.y-c*a,l=this.to.y+c*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(n,a){return this._findBorderPositionBezier(n,a)}},{key:"_getDistanceToEdge",value:function(n,a,o,s,u,l){var c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates(),h=xe(c,2),d=h[0],f=h[1];return this._getDistanceToBezierEdge2(n,a,o,s,u,l,d,f)}},{key:"getPoint",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),o=xe(a,2),s=o[0],u=o[1],l=n,c=[Math.pow(1-l,3),3*l*Math.pow(1-l,2),3*Math.pow(l,2)*(1-l),Math.pow(l,3)],h=c[0]*this.fromPoint.x+c[1]*s.x+c[2]*u.x+c[3]*this.toPoint.x,d=c[0]*this.fromPoint.y+c[1]*s.y+c[2]*u.y+c[3]*this.toPoint.y;return{x:h,y:d}}}]),e}(Zge);function tye(t){var i=rye();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function rye(){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 L0=function(t){ce(e,t);var i=tye(e);function e(r,n,a){return N(this,e),i.call(this,r,n,a)}return F(e,[{key:"_line",value:function(n,a){n.beginPath(),n.moveTo(this.fromPoint.x,this.fromPoint.y),n.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(n,a),n.stroke(),this.disableShadow(n,a)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(n){return{x:(1-n)*this.fromPoint.x+n*this.toPoint.x,y:(1-n)*this.fromPoint.y+n*this.toPoint.y}}},{key:"_findBorderPosition",value:function(n,a){var o=this.to,s=this.from;n.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,c=o.y-s.y,h=Math.sqrt(l*l+c*c),d=n.distanceToBorder(a,u),f=(h-d)/h;return{x:(1-f)*s.x+f*o.x,y:(1-f)*s.y+f*o.y,t:0}}},{key:"_getDistanceToEdge",value:function(n,a,o,s,u,l){return this._getDistanceToLine(n,a,o,s,u,l)}}]),e}(LP),Ii=function(){function t(i,e,r,n,a){if(N(this,t),e===void 0)throw new Error("No body provided");this.options=tn(n),this.globalOptions=n,this.defaultOptions=a,this.body=e,this.imagelist=r,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 AP(this.body,this.options,!0),this.setOptions(i)}return F(t,[{key:"setOptions",value:function(e){if(e){var r=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;t.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=kP(e.value));var n=[e,this.options,this.defaultOptions];return this.chooser=Oy("edge",n),this.updateLabelModule(e),r=this.updateEdgeType()||r,this._setInteractionWidths(),this.connect(),r}}},{key:"getFormattingValues",value:function(){var e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,r=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,n=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:n,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:r,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 r=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,r),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var e=this.options.smooth,r=!1,n=!0;return this.edgeType!==void 0&&((this.edgeType instanceof N0&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof B0&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof F0&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof L0&&e.type.enabled===!1)&&(n=!1),n===!0&&(r=this.cleanup())),n===!0?e.enabled===!0?e.type==="dynamic"?(r=!0,this.edgeType=new N0(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new B0(this.options,this.body,this.labelModule):this.edgeType=new F0(this.options,this.body,this.labelModule):this.edgeType=new L0(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),r}},{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,r,n){if(this.options.value!==void 0){var a=this.options.scaling.customScalingFunction(e,r,n,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 r=this.getFormattingValues();if(!r.hidden){var n=this.edgeType.getViaNode();this.edgeType.drawLine(e,r,this.selected,this.hover,n),this.drawLabel(e,n)}}},{key:"drawArrows",value:function(e){var r=this.getFormattingValues();if(!r.hidden){var n=this.edgeType.getViaNode(),a={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,r.fromArrow&&(a.from=this.edgeType.getArrowData(e,"from",n,this.selected,this.hover,r),r.arrowStrikethrough===!1&&(this.edgeType.fromPoint=a.from.core),r.fromArrowSrc&&(a.from.image=this.imagelist.load(r.fromArrowSrc)),r.fromArrowImageWidth&&(a.from.imageWidth=r.fromArrowImageWidth),r.fromArrowImageHeight&&(a.from.imageHeight=r.fromArrowImageHeight)),r.toArrow&&(a.to=this.edgeType.getArrowData(e,"to",n,this.selected,this.hover,r),r.arrowStrikethrough===!1&&(this.edgeType.toPoint=a.to.core),r.toArrowSrc&&(a.to.image=this.imagelist.load(r.toArrowSrc)),r.toArrowImageWidth&&(a.to.imageWidth=r.toArrowImageWidth),r.toArrowImageHeight&&(a.to.imageHeight=r.toArrowImageHeight)),r.middleArrow&&(a.middle=this.edgeType.getArrowData(e,"middle",n,this.selected,this.hover,r),r.middleArrowSrc&&(a.middle.image=this.imagelist.load(r.middleArrowSrc)),r.middleArrowImageWidth&&(a.middle.imageWidth=r.middleArrowImageWidth),r.middleArrowImageHeight&&(a.middle.imageHeight=r.middleArrowImageHeight)),r.fromArrow&&this.edgeType.drawArrowHead(e,r,this.selected,this.hover,a.from),r.middleArrow&&this.edgeType.drawArrowHead(e,r,this.selected,this.hover,a.middle),r.toArrow&&this.edgeType.drawArrowHead(e,r,this.selected,this.hover,a.to)}}},{key:"drawLabel",value:function(e,r){if(this.options.label!==void 0){var n=this.from,a=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);var o;if(n.id!=a.id){this.labelModule.pointToSelf=!1,o=this.edgeType.getPoint(.5,r),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=IP(e,this.options.selfReference.angle,this.options.selfReference.size,n);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 r=[];if(this.labelModule.visible()){var n=this._getRotation();Tp(this.labelModule.getSize(),e,n)&&r.push({edgeId:this.id,labelId:0})}var a={left:e.x,top:e.y};return this.isOverlappingWith(a)&&r.push({edgeId:this.id}),r}},{key:"isOverlappingWith",value:function(e){if(this.connected){var r=10,n=this.from.x,a=this.from.y,o=this.to.x,s=this.to.y,u=e.left,l=e.top,c=this.edgeType.getDistanceToEdge(n,a,o,s,u,l);return c<r}else return!1}},{key:"_getRotation",value:function(e){var r=this.edgeType.getViaNode(),n=this.edgeType.getPoint(.5,r);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,n.x,n.y);var a={x:n.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,r,n,a){return{x:e+n*Math.cos(a),y:r-n*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,r){var n=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(va(s,e,r,n),r.endPointOffset!==void 0&&r.endPointOffset.from!==void 0&&(xn(r.endPointOffset.from)?e.endPointOffset.from=r.endPointOffset.from:(e.endPointOffset.from=a.endPointOffset.from!==void 0?a.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),r.endPointOffset!==void 0&&r.endPointOffset.to!==void 0&&(xn(r.endPointOffset.to)?e.endPointOffset.to=r.endPointOffset.to:(e.endPointOffset.to=a.endPointOffset.to!==void 0?a.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),Hu(r.label)?e.label=r.label:Hu(e.label)||(e.label=void 0),Lt(e,r,"smooth",a),Lt(e,r,"shadow",a),Lt(e,r,"background",a),r.dashes!==void 0&&r.dashes!==null?e.dashes=r.dashes:n===!0&&r.dashes===null&&(e.dashes=Rn(a.dashes)),r.scaling!==void 0&&r.scaling!==null?(r.scaling.min!==void 0&&(e.scaling.min=r.scaling.min),r.scaling.max!==void 0&&(e.scaling.max=r.scaling.max),Lt(e.scaling,r.scaling,"label",a.scaling)):n===!0&&r.scaling===null&&(e.scaling=Rn(a.scaling)),r.arrows!==void 0&&r.arrows!==null)if(typeof r.arrows=="string"){var u=r.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(he(r.arrows)==="object")Lt(e.arrows,r.arrows,"to",a.arrows),Lt(e.arrows,r.arrows,"middle",a.arrows),Lt(e.arrows,r.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:"+es(r.arrows));else n===!0&&r.arrows===null&&(e.arrows=Rn(a.arrows));if(r.color!==void 0&&r.color!==null){var l=Kr(r.color)?{color:r.color,highlight:r.color,hover:r.color,inherit:!1,opacity:1}:r.color,c=e.color;if(o)$e(c,a.color,!1,n);else for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&delete c[h];if(Kr(c))c.color=c,c.highlight=c,c.hover=c,c.inherit=!1,l.opacity===void 0&&(c.opacity=1);else{var d=!1;l.color!==void 0&&(c.color=l.color,d=!0),l.highlight!==void 0&&(c.highlight=l.highlight,d=!0),l.hover!==void 0&&(c.hover=l.hover,d=!0),l.inherit!==void 0&&(c.inherit=l.inherit),l.opacity!==void 0&&(c.opacity=Math.min(1,Math.max(0,l.opacity))),d===!0?c.inherit=!1:c.inherit===void 0&&(c.inherit="from")}}else n===!0&&r.color===null&&(e.color=tn(a.color));n===!0&&r.font===null&&(e.font=tn(a.font)),Object.prototype.hasOwnProperty.call(r,"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=r.selfReferenceSize)}}]),t}(),nye=function(){function t(i,e,r){var n,a=this;N(this,t),this.body=i,this.images=e,this.groups=r,this.body.functions.createEdge=C(n=this.create).call(n,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,c){if(u===s)return .5;var h=1/(u-s);return Math.max(0,(c-s)*h)}},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},$e(this.options,this.defaultOptions),this.bindEventListeners()}return F(t,[{key:"bindEventListeners",value:function(){var e=this,r,n;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],c=e.body.data.edges.get(u);if(c!=null){var h=c.smooth;h!==void 0&&h.enabled===!0&&h.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",C(r=this.refresh).call(r,this)),this.body.emitter.on("refresh",C(n=this.refresh).call(n,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){Ii.parseOptions(this.options,e,!0,this.defaultOptions,!0);var r=!1;if(e.smooth!==void 0)for(var n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&(r=this.body.edges[n].updateEdgeType()||r);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||r===!0)&&this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var r=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.body.data.edges;if(jO("id",e))this.body.data.edges=e;else if(ve(e))this.body.data.edges=new Iu,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new Iu;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){r.body.data.edges.on(u,s)});var o=this.body.data.edges.getIds();this.add(o,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),n===!1&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.body.edges,a=this.body.data.edges,o=0;o<e.length;o++){var s=e[o],u=n[s];u&&u.disconnect();var l=a.get(s,{showInternalIds:!0});n[s]=this.create(l)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),r===!1&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(e){for(var r=this.body.edges,n=this.body.data.edges,a=!1,o=0;o<e.length;o++){var s=e[o],u=n.get(s),l=r[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 r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length!==0){var n=this.body.edges;ee(e,function(a){var o=n[a];o!==void 0&&o.remove()}),r&&this.body.emitter.emit("_dataChanged")}}},{key:"refresh",value:function(){var e=this;ee(this.body.edges,function(r,n){var a=e.body.data.edges.get(n);a!==void 0&&r.setOptions(a)})}},{key:"create",value:function(e){return new Ii(e,this.body,this.images,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var e,r=this.body.nodes,n=this.body.edges;for(e in r)Object.prototype.hasOwnProperty.call(r,e)&&(r[e].edges=[]);for(e in n)if(Object.prototype.hasOwnProperty.call(n,e)){var a=n[e];a.from=null,a.to=null,a.connect()}}},{key:"getConnectedNodes",value:function(e){var r=[];if(this.body.edges[e]!==void 0){var n=this.body.edges[e];n.fromId!==void 0&&r.push(n.fromId),n.toId!==void 0&&r.push(n.toId)}return r}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var e=this,r=[];ee(this.body.edges,function(n,a){var o=e.body.nodes[n.toId],s=e.body.nodes[n.fromId];o!==void 0&&o.isCluster===!0||s!==void 0&&s.isCluster===!0||(o===void 0||s===void 0)&&r.push(a)}),this.remove(r,!1)}},{key:"_addMissingEdges",value:function(){var e=this.body.data.edges;if(e!=null){var r=this.body.edges,n=[];ge(e).call(e,function(a,o){var s=r[o];s===void 0&&n.push(o)}),this.add(n,!0)}}}]),t}(),jP=function(){function t(i,e,r){N(this,t),this.body=i,this.physicsBody=e,this.barnesHutTree,this.setOptions(r),this._rng=Ll("BARNES HUT SOLVER")}return F(t,[{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,r=this.body.nodes,n=this.physicsBody.physicsNodeIndices,a=n.length,o=this._formBarnesHutTree(r,n);this.barnesHutTree=o;for(var s=0;s<a;s++)e=r[n[s]],e.options.mass>0&&this._getForceContributions(o.root,e)}}},{key:"_getForceContributions",value:function(e,r){this._getForceContribution(e.children.NW,r),this._getForceContribution(e.children.NE,r),this._getForceContribution(e.children.SW,r),this._getForceContribution(e.children.SE,r)}},{key:"_getForceContribution",value:function(e,r){if(e.childrenCount>0){var n=e.centerOfMass.x-r.x,a=e.centerOfMass.y-r.y,o=Math.sqrt(n*n+a*a);o*e.calcSize>this.thetaInversed?this._calculateForces(o,n,a,r,e):e.childrenCount===4?this._getForceContributions(e,r):e.children.data.id!=r.id&&this._calculateForces(o,n,a,r,e)}}},{key:"_calculateForces",value:function(e,r,n,a,o){e===0&&(e=.1,r=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=r*s,l=n*s;this.physicsBody.forces[a.id].x+=u,this.physicsBody.forces[a.id].y+=l}},{key:"_formBarnesHutTree",value:function(e,r){for(var n,a=r.length,o=e[r[0]].x,s=e[r[0]].y,u=e[r[0]].x,l=e[r[0]].y,c=1;c<a;c++){var h=e[r[c]],d=h.x,f=h.y;h.options.mass>0&&(d<o&&(o=d),d>u&&(u=d),f<s&&(s=f),f>l&&(l=f))}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;_++)n=e[r[_]],n.options.mass>0&&this._placeInTree(m.root,n);return m}},{key:"_updateBranchMass",value:function(e,r){var n=e.centerOfMass,a=e.mass+r.options.mass,o=1/a;n.x=n.x*e.mass+r.x*r.options.mass,n.x*=o,n.y=n.y*e.mass+r.y*r.options.mass,n.y*=o,e.mass=a;var s=Math.max(Math.max(r.height,r.radius),r.width);e.maxWidth=e.maxWidth<s?s:e.maxWidth}},{key:"_placeInTree",value:function(e,r,n){(n!=!0||n===void 0)&&this._updateBranchMass(e,r);var a=e.children.NW.range,o;a.maxX>r.x?a.maxY>r.y?o="NW":o="SW":a.maxY>r.y?o="NE":o="SE",this._placeInRegion(e,r,o)}},{key:"_placeInRegion",value:function(e,r,n){var a=e.children[n];switch(a.childrenCount){case 0:a.children.data=r,a.childrenCount=1,this._updateBranchMass(a,r);break;case 1:a.children.data.x===r.x&&a.children.data.y===r.y?(r.x+=this._rng(),r.y+=this._rng()):(this._splitBranch(a),this._placeInTree(a,r));break;case 4:this._placeInTree(a,r);break}}},{key:"_splitBranch",value:function(e){var r=null;e.childrenCount===1&&(r=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"),r!=null&&this._placeInTree(e,r)}},{key:"_insertRegion",value:function(e,r){var n,a,o,s,u=.5*e.size;switch(r){case"NW":n=e.range.minX,a=e.range.minX+u,o=e.range.minY,s=e.range.minY+u;break;case"NE":n=e.range.minX+u,a=e.range.maxX,o=e.range.minY,s=e.range.minY+u;break;case"SW":n=e.range.minX,a=e.range.minX+u,o=e.range.minY+u,s=e.range.maxY;break;case"SE":n=e.range.minX+u,a=e.range.maxX,o=e.range.minY+u,s=e.range.maxY;break}e.children[r]={centerOfMass:{x:0,y:0},mass:0,range:{minX:n,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,r){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,r))}},{key:"_drawBranch",value:function(e,r,n){n===void 0&&(n="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,r),this._drawBranch(e.children.NE,r),this._drawBranch(e.children.SE,r),this._drawBranch(e.children.SW,r)),r.strokeStyle=n,r.beginPath(),r.moveTo(e.range.minX,e.range.minY),r.lineTo(e.range.maxX,e.range.minY),r.stroke(),r.beginPath(),r.moveTo(e.range.maxX,e.range.minY),r.lineTo(e.range.maxX,e.range.maxY),r.stroke(),r.beginPath(),r.moveTo(e.range.maxX,e.range.maxY),r.lineTo(e.range.minX,e.range.maxY),r.stroke(),r.beginPath(),r.moveTo(e.range.minX,e.range.maxY),r.lineTo(e.range.minX,e.range.minY),r.stroke()}}]),t}(),iye=function(){function t(i,e,r){N(this,t),this._rng=Ll("REPULSION SOLVER"),this.body=i,this.physicsBody=e,this.setOptions(r)}return F(t,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,r,n,a,o,s,u,l,c=this.body.nodes,h=this.physicsBody.physicsNodeIndices,d=this.physicsBody.forces,f=this.options.nodeDistance,v=-2/3/f,g=4/3,b=0;b<h.length-1;b++){u=c[h[b]];for(var p=b+1;p<h.length;p++)l=c[h[p]],e=l.x-u.x,r=l.y-u.y,n=Math.sqrt(e*e+r*r),n===0&&(n=.1*this._rng(),e=n),n<2*f&&(n<.5*f?s=1:s=v*n+g,s=s/n,a=e*s,o=r*s,d[u.id].x-=a,d[u.id].y-=o,d[l.id].x+=a,d[l.id].y+=o)}}}]),t}(),aye=function(){function t(i,e,r){N(this,t),this.body=i,this.physicsBody=e,this.setOptions(r)}return F(t,[{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,r=this.physicsBody.physicsNodeIndices,n=this.physicsBody.forces,a=this.options.nodeDistance,o=0;o<r.length-1;o++)for(var s=e[r[o]],u=o+1;u<r.length;u++){var l=e[r[u]];if(s.level===l.level){var c=a+this.overlapAvoidanceFactor*((s.shape.radius||0)/2+(l.shape.radius||0)/2),h=l.x-s.x,d=l.y-s.y,f=Math.sqrt(h*h+d*d),v=.05,g=void 0;f<c?g=-Math.pow(v*f,2)+Math.pow(v*c,2):g=0,f!==0&&(g=g/f);var b=h*g,p=d*g;n[s.id].x-=b,n[s.id].y-=p,n[l.id].x+=b,n[l.id].y+=p}}}}]),t}(),Qh=function(){function t(i,e,r){N(this,t),this.body=i,this.physicsBody=e,this.setOptions(r)}return F(t,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,r,n=this.physicsBody.physicsEdgeIndices,a=this.body.edges,o,s,u,l=0;l<n.length;l++)r=a[n[l]],r.connected===!0&&r.toId!==r.fromId&&this.body.nodes[r.toId]!==void 0&&this.body.nodes[r.fromId]!==void 0&&(r.edgeType.via!==void 0?(e=r.options.length===void 0?this.options.springLength:r.options.length,o=r.to,s=r.edgeType.via,u=r.from,this._calculateSpringForce(o,s,.5*e),this._calculateSpringForce(s,u,.5*e)):(e=r.options.length===void 0?this.options.springLength*1.5:r.options.length,this._calculateSpringForce(r.from,r.to,e)))}},{key:"_calculateSpringForce",value:function(e,r,n){var a=e.x-r.x,o=e.y-r.y,s=Math.max(Math.sqrt(a*a+o*o),.01),u=this.options.springConstant*(n-s)/s,l=a*u,c=o*u;this.physicsBody.forces[e.id]!==void 0&&(this.physicsBody.forces[e.id].x+=l,this.physicsBody.forces[e.id].y+=c),this.physicsBody.forces[r.id]!==void 0&&(this.physicsBody.forces[r.id].x-=l,this.physicsBody.forces[r.id].y-=c)}}]),t}(),oye=function(){function t(i,e,r){N(this,t),this.body=i,this.physicsBody=e,this.setOptions(r)}return F(t,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,r,n,a,o,s,u,l,c=this.body.edges,h=.5,d=this.physicsBody.physicsEdgeIndices,f=this.physicsBody.physicsNodeIndices,v=this.physicsBody.forces,g=0;g<f.length;g++){var b=f[g];v[b].springFx=0,v[b].springFy=0}for(var p=0;p<d.length;p++)r=c[d[p]],r.connected===!0&&(e=r.options.length===void 0?this.options.springLength:r.options.length,n=r.from.x-r.to.x,a=r.from.y-r.to.y,l=Math.sqrt(n*n+a*a),l=l===0?.01:l,u=this.options.springConstant*(e-l)/l,o=n*u,s=a*u,r.to.level!=r.from.level?(v[r.toId]!==void 0&&(v[r.toId].springFx-=o,v[r.toId].springFy-=s),v[r.fromId]!==void 0&&(v[r.fromId].springFx+=o,v[r.fromId].springFy+=s)):(v[r.toId]!==void 0&&(v[r.toId].x-=h*o,v[r.toId].y-=h*s),v[r.fromId]!==void 0&&(v[r.fromId].x+=h*o,v[r.fromId].y+=h*s)));u=1;for(var $,y,m=0;m<f.length;m++){var _=f[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 S=0,T=0,O=0;O<f.length;O++){var w=f[O];S+=v[w].x,T+=v[w].y}for(var E=S/f.length,A=T/f.length,H=0;H<f.length;H++){var B=f[H];v[B].x-=E,v[B].y-=A}}}]),t}(),su=function(){function t(i,e,r){N(this,t),this.body=i,this.physicsBody=e,this.setOptions(r)}return F(t,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,r,n,a,o=this.body.nodes,s=this.physicsBody.physicsNodeIndices,u=this.physicsBody.forces,l=0;l<s.length;l++){var c=s[l];a=o[c],e=-a.x,r=-a.y,n=Math.sqrt(e*e+r*r),this._calculateForces(n,e,r,u,a)}}},{key:"_calculateForces",value:function(e,r,n,a,o){var s=e===0?0:this.options.centralGravity/e;a[o.id].x=r*s,a[o.id].y=n*s}}]),t}();function sye(t){var i=uye();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function uye(){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 lye=function(t){ce(e,t);var i=sye(e);function e(r,n,a){var o;return N(this,e),o=i.call(this,r,n,a),o._rng=Ll("FORCE ATLAS 2 BASED REPULSION SOLVER"),o}return F(e,[{key:"_calculateForces",value:function(n,a,o,s,u){n===0&&(n=.1*this._rng(),a=n),this.overlapAvoidanceFactor<1&&s.shape.radius&&(n=Math.max(.1+this.overlapAvoidanceFactor*s.shape.radius,n-s.shape.radius));var l=s.edges.length+1,c=this.options.gravitationalConstant*u.mass*s.options.mass*l/Math.pow(n,2),h=a*c,d=o*c;this.physicsBody.forces[s.id].x+=h,this.physicsBody.forces[s.id].y+=d}}]),e}(jP);function cye(t){var i=hye();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function hye(){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 dye=function(t){ce(e,t);var i=cye(e);function e(r,n,a){return N(this,e),i.call(this,r,n,a)}return F(e,[{key:"_calculateForces",value:function(n,a,o,s,u){if(n>0){var l=u.edges.length+1,c=this.options.centralGravity*l*u.options.mass;s[u.id].x=a*c,s[u.id].y=o*c}}}]),e}(su),fye=function(){function t(i){N(this,t),this.body=i,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}},Le(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return F(t,[{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,Lu(["stabilization"],this.options,e),Lt(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());var r=this.options.wind;r&&((typeof r.x!="number"||wp(r.x))&&(r.x=0),(typeof r.y!="number"||wp(r.y))&&(r.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 lye(this.body,this.physicsBody,e),this.edgesSolver=new Qh(this.body,this.physicsBody,e),this.gravitySolver=new dye(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new iye(this.body,this.physicsBody,e),this.edgesSolver=new Qh(this.body,this.physicsBody,e),this.gravitySolver=new su(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new aye(this.body,this.physicsBody,e),this.edgesSolver=new oye(this.body,this.physicsBody,e),this.gravitySolver=new su(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new jP(this.body,this.physicsBody,e),this.edgesSolver=new Qh(this.body,this.physicsBody,e),this.gravitySolver=new su(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=C(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=Mu();this.physicsTick();var r=Mu()-e;(r<.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,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&pr(function(){e.body.emitter.emit("stabilized",{iterations:r}),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,r=this.body.edges;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&e[n].options.physics===!0&&this.physicsBody.physicsNodeIndices.push(e[n].id);for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&r[a].options.physics===!0&&this.physicsBody.physicsEdgeIndices.push(r[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=Te(this.previousStates),r=this.body.nodes,n=this.physicsBody.velocities;this.referenceState={};for(var a=0;a<e.length;a++){var o=e[a];r[o]!==void 0?r[o].options.physics===!0&&(this.referenceState[o]={positions:{x:r[o].x,y:r[o].y}},n[o].x=this.previousStates[o].vx,n[o].y=this.previousStates[o].vy,r[o].x=this.previousStates[o].x,r[o].y=this.previousStates[o].y):delete this.previousStates[o]}}},{key:"_evaluateStepQuality",value:function(){var e,r,n,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,r=a[u].y-o[u].positions.y,n=Math.sqrt(Math.pow(e,2)+Math.pow(r,2)),n>s))return!1;return!0}},{key:"moveNodes",value:function(){for(var e=this.physicsBody.physicsNodeIndices,r=0,n=0,a=5,o=0;o<e.length;o++){var s=e[o],u=this._performStep(s);r=Math.max(r,u),n+=u}this.adaptiveTimestepEnabled=n/e.length<a,this.stabilized=r<this.options.minVelocity}},{key:"calculateComponentVelocity",value:function(e,r,n){var a=this.modelOptions.damping*e,o=(r-a)/n;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 r=this.body.nodes[e],n=this.physicsBody.forces[e];this.options.wind&&(n.x+=this.options.wind.x,n.y+=this.options.wind.y);var a=this.physicsBody.velocities[e];this.previousStates[e]={x:r.x,y:r.y,vx:a.x,vy:a.y},r.options.fixed.x===!1?(a.x=this.calculateComponentVelocity(a.x,n.x,r.options.mass),r.x+=a.x*this.timestep):(n.x=0,a.x=0),r.options.fixed.y===!1?(a.y=this.calculateComponentVelocity(a.y,n.y,r.options.mass),r.y+=a.y*this.timestep):(n.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 r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&e[r].x&&e[r].y){var n=e[r].options.fixed;this.freezeCache[r]={x:n.x,y:n.y},n.x=!0,n.y=!0}}},{key:"_restoreFrozenNodes",value:function(){var e=this.body.nodes;for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.freezeCache[r]!==void 0&&(e[r].options.fixed.x=this.freezeCache[r].x,e[r].options.fixed.y=this.freezeCache[r].y);this.freezeCache={}}},{key:"stabilize",value:function(){var e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof r!="number"&&(r=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",r)),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=r,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,pr(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,r=function(){return e.stabilized===!1&&e.stabilizationIterations<e.targetIterations},n=function(){e.body.emitter.emit("stabilizationProgress",{iterations:e.stabilizationIterations,total:e.targetIterations})};this._startStabilizing()&&n();for(var a=0;r()&&a<this.options.stabilization.updateInterval;)this.physicsTick(),a++;if(n(),r()){var o;pr(C(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 r=0;r<this.physicsBody.physicsNodeIndices.length;r++){var n=this.physicsBody.physicsNodeIndices[r],a=this.body.nodes[n],o=this.physicsBody.forces[n],s=20,u=.03,l=Math.sqrt(Math.pow(o.x,2)+Math.pow(o.x,2)),c=Math.min(Math.max(5,l),15),h=3*c,d=gp((180-Math.min(1,Math.max(0,u*l))*180)/360,1,1),f={x:a.x+s*o.x,y:a.y+s*o.y};e.lineWidth=c,e.strokeStyle=d,e.beginPath(),e.moveTo(a.x,a.y),e.lineTo(f.x,f.y),e.stroke();var v=Math.atan2(o.y,o.x);e.fillStyle=d,BP.draw(e,{type:"arrow",point:f,angle:v,length:h}),ts(e).call(e)}}}]),t}();let js;const vye=new Uint8Array(16);function pye(){if(!js&&(js=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!js))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return js(vye)}const it=[];for(let t=0;t<256;++t)it.push((t+256).toString(16).slice(1));function gye(t,i=0){return(it[t[i+0]]+it[t[i+1]]+it[t[i+2]]+it[t[i+3]]+"-"+it[t[i+4]]+it[t[i+5]]+"-"+it[t[i+6]]+it[t[i+7]]+"-"+it[t[i+8]]+it[t[i+9]]+"-"+it[t[i+10]]+it[t[i+11]]+it[t[i+12]]+it[t[i+13]]+it[t[i+14]]+it[t[i+15]]).toLowerCase()}const yye=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var j0={randomUUID:yye};function Ba(t,i,e){if(j0.randomUUID&&!i&&!t)return j0.randomUUID();t=t||{};const r=t.random||(t.rng||pye)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,i){e=e||0;for(let n=0;n<16;++n)i[e+n]=r[n];return i}return gye(r)}var dt=function(){function t(){N(this,t)}return F(t,null,[{key:"getRange",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,a=-1e9,o=1e9,s=-1e9,u;if(r.length>0)for(var l=0;l<r.length;l++)u=e[r[l]],o>u.shape.boundingBox.left&&(o=u.shape.boundingBox.left),s<u.shape.boundingBox.right&&(s=u.shape.boundingBox.right),n>u.shape.boundingBox.top&&(n=u.shape.boundingBox.top),a<u.shape.boundingBox.bottom&&(a=u.shape.boundingBox.bottom);return o===1e9&&s===-1e9&&n===1e9&&a===-1e9&&(n=0,a=0,o=0,s=0),{minX:o,maxX:s,minY:n,maxY:a}}},{key:"getRangeCore",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,a=-1e9,o=1e9,s=-1e9,u;if(r.length>0)for(var l=0;l<r.length;l++)u=e[r[l]],o>u.x&&(o=u.x),s<u.x&&(s=u.x),n>u.y&&(n=u.y),a<u.y&&(a=u.y);return o===1e9&&s===-1e9&&n===1e9&&a===-1e9&&(n=0,a=0,o=0,s=0),{minX:o,maxX:s,minY:n,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,r){var n={};return r===void 0||r==="node"?($e(n,e.options,!0),n.x=e.x,n.y=e.y,n.amountOfConnections=e.edges.length):$e(n,e.options,!0),n}}]),t}();function mye(t){var i=$ye();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function $ye(){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 bye=function(t){ce(e,t);var i=mye(e);function e(r,n,a,o,s,u){var l;return N(this,e),l=i.call(this,r,n,a,o,s,u),l.isCluster=!0,l.containedNodes={},l.containedEdges={},l}return F(e,[{key:"_openChildCluster",value:function(n){var a=this,o=this.body.nodes[n];if(this.containedNodes[n]===void 0)throw new Error("node with id: "+n+" not in current cluster");if(!o.isCluster)throw new Error("node with id: "+n+" is not a cluster");delete this.containedNodes[n],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,c,h=ae(l=u.clusteringEdgeReplacingIds).call(l,s.id);h!==-1&&(ee(s.clusteringEdgeReplacingIds,function(d){u.clusteringEdgeReplacingIds.push(d),a.body.edges[d].edgeReplacedById=u.id}),Or(c=u.clusteringEdgeReplacingIds).call(c,h,1))})}),o.edges=[]}}]),e}(kt),wye=function(){function t(i){var e=this;N(this,t),this.body=i,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},Le(this.options,this.defaultOptions),this.body.emitter.on("_resetData",function(){e.clusteredNodes={},e.clusteredEdges={}})}return F(t,[{key:"clusterByHubsize",value:function(e,r){e===void 0?e=this._getHubSize():he(e)==="object"&&(r=this._checkOptions(e),e=this._getHubSize());for(var n=[],a=0;a<this.body.nodeIndices.length;a++){var o=this.body.nodes[this.body.nodeIndices[a]];o.edges.length>=e&&n.push(o.id)}for(var s=0;s<n.length;s++)this.clusterByConnection(n[s],r,!0);this.body.emitter.emit("_dataChanged")}},{key:"cluster",value:function(){var e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(r.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");r=this._checkOptions(r);var a={},o={};ee(this.body.nodes,function(s,u){s.options&&r.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,r,n)}},{key:"clusterByEdgeCount",value:function(e,r){var n=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;r=this._checkOptions(r);for(var o=[],s={},u,l,c,h=function(){var g={},b={},p=n.body.nodeIndices[d],$=n.body.nodes[p];if(s[p]===void 0){c=0,l=[];for(var y=0;y<$.edges.length;y++)u=$.edges[y],n.clusteredEdges[u.id]===void 0&&(u.toId!==u.fromId&&c++,l.push(u));if(c===e){for(var m=function(B){if(r.joinCondition===void 0||r.joinCondition===null)return!0;var X=dt.cloneOptions(B);return r.joinCondition(X)},_=!0,S=0;S<l.length;S++){u=l[S];var T=n._getConnectedId(u,p);if(m($))b[u.id]=u,g[p]=$,g[T]=n.body.nodes[T],s[p]=!0;else{_=!1;break}}if(Te(g).length>0&&Te(b).length>0&&_===!0){var O=function(){for(var B=0;B<o.length;++B)for(var X in g)if(o[B].nodes[X]!==void 0)return o[B]},w=O();if(w!==void 0){for(var E in g)w.nodes[E]===void 0&&(w.nodes[E]=g[E]);for(var A in b)w.edges[A]===void 0&&(w.edges[A]=b[A])}else o.push({nodes:g,edges:b})}}}},d=0;d<this.body.nodeIndices.length;d++)h();for(var f=0;f<o.length;f++)this._cluster(o[f].nodes,o[f].edges,r,!1);a===!0&&this.body.emitter.emit("_dataChanged")}},{key:"clusterOutliers",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,r)}},{key:"clusterBridges",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,r)}},{key:"clusterByConnection",value:function(e,r){var n,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];r=this._checkOptions(r,o),r.clusterNodeProperties.x===void 0&&(r.clusterNodeProperties.x=o.x),r.clusterNodeProperties.y===void 0&&(r.clusterNodeProperties.y=o.y),r.clusterNodeProperties.fixed===void 0&&(r.clusterNodeProperties.fixed={},r.clusterNodeProperties.fixed.x=o.options.fixed.x,r.clusterNodeProperties.fixed.y=o.options.fixed.y);var s={},u={},l=o.id,c=dt.cloneOptions(o);s[l]=o;for(var h=0;h<o.edges.length;h++){var d=o.edges[h];if(this.clusteredEdges[d.id]===void 0){var f=this._getConnectedId(d,l);if(this.clusteredNodes[f]===void 0)if(f!==l)if(r.joinCondition===void 0)u[d.id]=d,s[f]=this.body.nodes[f];else{var v=dt.cloneOptions(this.body.nodes[f]);r.joinCondition(c,v)===!0&&(u[d.id]=d,s[f]=this.body.nodes[f])}else u[d.id]=d}}var g=Li(n=Te(s)).call(n,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,r,a)}},{key:"_createClusterEdges",value:function(e,r,n,a){for(var o,s,u,l,c,h,d=Te(e),f=[],v=0;v<d.length;v++){s=d[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?r[o.id]=o:o.toId==s?(l=n.id,c=o.fromId,h=c):(l=o.toId,c=n.id,h=l),e[h]===void 0&&f.push({edge:o,fromId:c,toId:l}))}for(var b=[],p=function(T){for(var O=0;O<b.length;O++){var w=b[O],E=T.fromId===w.fromId&&T.toId===w.toId,A=T.fromId===w.toId&&T.toId===w.fromId;if(E||A)return w}return null},$=0;$<f.length;$++){var y=f[$],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,r,n){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(Te(e).length!=0&&!(Te(e).length==1&&n.clusterNodeProperties.allowSingleNodeCluster!=!0)){var l=$e({},n.clusterNodeProperties);if(n.processProperties!==void 0){var c=[];for(var h in e)if(Object.prototype.hasOwnProperty.call(e,h)){var d=dt.cloneOptions(e[h]);c.push(d)}var f=[];for(var v in r)if(Object.prototype.hasOwnProperty.call(r,v)&&v.substr(0,12)!=="clusterEdge:"){var g=dt.cloneOptions(r[v],"edge");f.push(g)}if(l=n.processProperties(l,c,f),!l)throw new Error("The processProperties function does not return properties!")}l.id===void 0&&(l.id="cluster:"+Ba());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,bye);$.containedNodes=e,$.containedEdges=r,$.clusterEdgeProperties=n.clusterEdgeProperties,this.body.nodes[l.id]=$,this._clusterEdges(e,r,l,n.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 r=this.clusteredEdges[e.id];r!==void 0&&(e.setOptions({physics:r.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 r=Te(e),n=e[r[0]].x,a=e[r[0]].x,o=e[r[0]].y,s=e[r[0]].y,u,l=1;l<r.length;l++)u=e[r[l]],n=u.x<n?u.x:n,a=u.x>a?u.x:a,o=u.y<o?u.y:o,s=u.y>s?u.y:s;return{x:.5*(n+a),y:.5*(o+s)}}},{key:"openCluster",value:function(e,r){var n=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],n===!0&&this.body.emitter.emit("_dataChanged");return}var c=a.containedNodes,h=a.containedEdges;if(r!==void 0&&r.releaseFunction!==void 0&&typeof r.releaseFunction=="function"){var d={},f={x:a.x,y:a.y};for(var v in c)if(Object.prototype.hasOwnProperty.call(c,v)){var g=this.body.nodes[v];d[v]={x:g.x,y:g.y}}var b=r.releaseFunction(f,d);for(var p in c)if(Object.prototype.hasOwnProperty.call(c,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(c,function(we){we.options.fixed.x===!1&&(we.x=a.x),we.options.fixed.y===!1&&(we.y=a.y)});for(var y in c)if(Object.prototype.hasOwnProperty.call(c,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 _=[],S=0;S<a.edges.length;S++)_.push(a.edges[S]);for(var T=0;T<_.length;T++){for(var O=_[T],w=this._getConnectedId(O,e),E=this.clusteredNodes[w],A=0;A<O.clusteringEdgeReplacingIds.length;A++){var H=O.clusteringEdgeReplacingIds[A],B=this.body.edges[H];if(B!==void 0)if(E!==void 0){var X=this.body.nodes[E.clusterId];X.containedEdges[B.id]=B,delete h[B.id];var re=B.fromId,te=B.toId;B.toId==w?te=E.clusterId:re=E.clusterId,this._createClusteredEdge(re,te,B,X.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(B)}O.remove()}for(var le in h)Object.prototype.hasOwnProperty.call(h,le)&&this._restoreEdge(h[le]);delete this.body.nodes[e],n===!0&&this.body.emitter.emit("_dataChanged")}},{key:"getNodesInCluster",value:function(e){var r=[];if(this.isCluster(e)===!0){var n=this.body.nodes[e].containedNodes;for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&r.push(this.body.nodes[a].id)}return r}},{key:"findNode",value:function(e){for(var r=[],n=100,a=0,o;this.clusteredNodes[e]!==void 0&&a<n;){if(o=this.body.nodes[e],o===void 0)return[];r.push(o.id),e=this.clusteredNodes[e].clusterId,a++}return o=this.body.nodes[e],o===void 0?[]:(r.push(o.id),An(r).call(r),r)}},{key:"updateClusteredNode",value:function(e,r){if(e===void 0)throw new Error("No clusteredNodeId supplied to updateClusteredNode.");if(r===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(r),this.body.emitter.emit("_dataChanged")}},{key:"updateEdge",value:function(e,r){if(e===void 0)throw new Error("No startEdgeId supplied to updateEdge.");if(r===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 n=this.getClusteredEdges(e),a=0;a<n.length;a++){var o=this.body.edges[n[a]];o.setOptions(r)}this.body.emitter.emit("_dataChanged")}},{key:"getClusteredEdges",value:function(e){for(var r=[],n=100,a=0;e!==void 0&&this.body.edges[e]!==void 0&&a<n;)r.push(this.body.edges[e].id),e=this.body.edges[e].edgeReplacedById,a++;return An(r).call(r),r}},{key:"getBaseEdge",value:function(e){return this.getBaseEdges(e)[0]}},{key:"getBaseEdges",value:function(e){for(var r=[e],n=[],a=[],o=100,s=0;r.length>0&&s<o;){var u=r.pop();if(u!==void 0){var l=this.body.edges[u];if(l!==void 0){s++;var c=l.clusteringEdgeReplacingIds;if(c===void 0)a.push(u);else for(var h=0;h<c.length;++h){var d=c[h];ae(r).call(r,c)!==-1||ae(n).call(n,c)!==-1||r.push(d)}n.push(u)}}}return a}},{key:"_getConnectedId",value:function(e,r){return e.toId!=r?e.toId:(e.fromId!=r,e.fromId)}},{key:"_getHubSize",value:function(){for(var e=0,r=0,n=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,r+=Math.pow(s.edges.length,2),n+=1}e=e/n,r=r/n;var u=r-Math.pow(e,2),l=Math.sqrt(u),c=Math.floor(e+2*l);return c>a&&(c=a),c}},{key:"_createClusteredEdge",value:function(e,r,n,a,o){var s=dt.cloneOptions(n,"edge");$e(s,a),s.from=e,s.to=r,s.id="clusterEdge:"+Ba(),o!==void 0&&$e(s,o);var u=this.body.functions.createEdge(s);return u.clusteringEdgeReplacingIds=[n.id],u.connect(),this.body.edges[u.id]=u,u}},{key:"_clusterEdges",value:function(e,r,n,a){if(r instanceof Ii){var o=r,s={};s[o.id]=o,r=s}if(e instanceof kt){var u=e,l={};l[u.id]=u,e=l}if(n==null)throw new Error("_clusterEdges: parameter clusterNode required");a===void 0&&(a=n.clusterEdgeProperties),this._createClusterEdges(e,r,n,a);for(var c in r)if(Object.prototype.hasOwnProperty.call(r,c)&&this.body.edges[c]!==void 0){var h=this.body.edges[c];this._backupEdgeOptions(h),h.setOptions({physics:!1})}for(var d in e)Object.prototype.hasOwnProperty.call(e,d)&&(this.clusteredNodes[d]={clusterId:n.id,node:this.body.nodes[d]},this.body.nodes[d].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(e){if(e!==void 0){var r=this.clusteredNodes[e];if(r!==void 0){var n=r.clusterId;if(n!==void 0)return this.body.nodes[n]}}}},{key:"_filter",value:function(e,r){var n=[];return ee(e,function(a){r(a)&&n.push(a)}),n}},{key:"_updateState",value:function(){var e=this,r,n=[],a={},o=function(v){ee(e.body.nodes,function(g){g.isCluster===!0&&v(g)})};for(r in this.clusteredNodes)if(Object.prototype.hasOwnProperty.call(this.clusteredNodes,r)){var s=this.body.nodes[r];s===void 0&&n.push(r)}o(function(f){for(var v=0;v<n.length;v++)delete f.containedNodes[n[v]]});for(var u=0;u<n.length;u++)delete this.clusteredNodes[n[u]];ee(this.clusteredEdges,function(f){var v=e.body.edges[f];(v===void 0||!v.endPointsValid())&&(a[f]=f)}),o(function(f){ee(f.containedEdges,function(v,g){!v.endPointsValid()&&!a[g]&&(a[g]=g)})}),ee(this.body.edges,function(f,v){var g=!0,b=f.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}(!f.endPointsValid()||!g)&&(a[v]=v)}),o(function(f){ee(a,function(v){delete f.containedEdges[v],ee(f.edges,function(g,b){if(g.id===v){f.edges[b]=null;return}g.clusteringEdgeReplacingIds=e._filter(g.clusteringEdgeReplacingIds,function(p){return!a[p]})}),f.edges=e._filter(f.edges,function(g){return g!==null})})}),ee(a,function(f){delete e.clusteredEdges[f]}),ee(a,function(f){delete e.body.edges[f]});var l=Te(this.body.edges);ee(l,function(f){var v=e.body.edges[f],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[f],e._restoreEdge(v)});for(var c=!1,h=!0,d=function(){var v=[];o(function(b){var p=Te(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);h=v.length>0,c=c||h};h;)d();c&&this._updateState()}},{key:"_isClusteredNode",value:function(e){return this.clusteredNodes[e]!==void 0}},{key:"_isClusteredEdge",value:function(e){return this.clusteredEdges[e]!==void 0}}]),t}();function _ye(){var t;window!==void 0&&(t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),t===void 0?window.requestAnimationFrame=function(i){i()}:window.requestAnimationFrame=t}var Eye=function(){function t(i,e){N(this,t),_ye(),this.body=i,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},Le(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return F(t,[{key:"bindEventListeners",value:function(){var e=this,r;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=pr(function(){var n;e.zooming=!1,C(n=e._requestRedraw).call(n,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",C(r=this._requestRedraw).call(r,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 r=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"];va(r,this.options,e)}}},{key:"_requestNextFrame",value:function(e,r){if(!(typeof window>"u")){var n,a=window;return this.requiresTimeout===!0?n=pr(e,r):a.requestAnimationFrame&&(n=a.requestAnimationFrame(e)),n}}},{key:"_startRendering",value:function(){if(this.renderingActive===!0&&this.renderTimer===void 0){var e;this.renderTimer=this._requestNextFrame(C(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 r={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();var n=this.canvas.getContext(),a=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(n.clearRect(0,0,a,o),this.canvas.frame.clientWidth===0)return;if(n.save(),n.translate(this.body.view.translation.x,this.body.view.translation.y),n.scale(this.body.view.scale,this.body.view.scale),n.beginPath(),this.body.emitter.emit("beforeDrawing",n),n.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(n),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){var s=this._drawNodes(n,e),u=s.drawExternalLabels;r.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(n),r.drawExternalLabels!=null&&r.drawExternalLabels(),e===!1&&this._drawSelectionBox(n),n.beginPath(),this.body.emitter.emit("afterDrawing",n),n.closePath(),n.restore(),e===!0&&n.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 r=this.body.nodes,n;for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n=r[a],n.resize(e),n.updateBoundingBox(e,n.selected));e.restore()}},{key:"_drawNodes",value:function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.body.nodes,a=this.body.nodeIndices,o,s=[],u=[],l=20,c=this.canvas.DOMtoCanvas({x:-l,y:-l}),h=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+l,y:this.canvas.frame.canvas.clientHeight+l}),d={top:c.y,left:c.x,bottom:h.y,right:h.x},f=[],v=0;v<a.length;v++)if(o=n[a[v]],o.hover)u.push(a[v]);else if(o.isSelected())s.push(a[v]);else if(r===!0){var g=o.draw(e);g.drawExternalLabel!=null&&f.push(g.drawExternalLabel)}else if(o.isBoundingBoxOverlappingWith(d)===!0){var b=o.draw(e);b.drawExternalLabel!=null&&f.push(b.drawExternalLabel)}else o.updateBoundingBox(e,o.selected);var p,$=s.length,y=u.length;for(p=0;p<$;p++){o=n[s[p]];var m=o.draw(e);m.drawExternalLabel!=null&&f.push(m.drawExternalLabel)}for(p=0;p<y;p++){o=n[u[p]];var _=o.draw(e);_.drawExternalLabel!=null&&f.push(_.drawExternalLabel)}return{drawExternalLabels:function(){for(var T=0,O=f;T<O.length;T++){var w=O[T];w()}}}}},{key:"_drawEdges",value:function(e){for(var r=this.body.edges,n=this.body.edgeIndices,a=0;a<n.length;a++){var o=r[n[a]];o.connected===!0&&o.draw(e)}}},{key:"_drawArrows",value:function(e){for(var r=this.body.edges,n=this.body.edgeIndices,a=0;a<n.length;a++){var o=r[n[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 r=this.body.selectionBox.position.end.x-this.body.selectionBox.position.start.x,n=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,r,n),e.fillStyle="rgba(151, 194, 252, 0.2)",e.fillRect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,r,n),e.strokeStyle="rgba(151, 194, 252, 1)",e.stroke()}else e.closePath()}}]),t}(),Vp={},Sye={get exports(){return Vp},set exports(t){Vp=t}},Oye=ie,Tye=Oye.setInterval;(function(t){t.exports=Tye})(Sye);var xye=V(Vp);function Wu(t,i){i.inputHandler=function(e){e.isFirst&&i(e)},t.on("hammer.input",i.inputHandler)}function zP(t,i){return i.inputHandler=function(e){e.isFinal&&i(e)},t.on("hammer.input",i.inputHandler)}var Pye=function(){function t(i){N(this,t),this.body=i,this.pixelRatio=1,this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this._cleanupCallbacks=[],this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},Le(this.options,this.defaultOptions),this.bindEventListeners()}return F(t,[{key:"bindEventListeners",value:function(){var e=this,r;this.body.emitter.once("resize",function(n){n.width!==0&&(e.body.view.translation.x=n.width*.5),n.height!==0&&(e.body.view.translation.y=n.height*.5)}),this.body.emitter.on("setSize",C(r=this.setSize).call(r,this)),this.body.emitter.on("destroy",function(){e.hammerFrame.destroy(),e.hammer.destroy(),e._cleanUp()})}},{key:"setOptions",value:function(e){var r=this;if(e!==void 0){var n=["width","height","autoResize"];va(n,this.options,e)}if(this._cleanUp(),this.options.autoResize===!0){var a;if(window.ResizeObserver){var o=new ResizeObserver(function(){var c=r.setSize();c===!0&&r.body.emitter.emit("_requestRedraw")}),s=this.frame;o.observe(s),this._cleanupCallbacks.push(function(){o.unobserve(s)})}else{var u=xye(function(){var c=r.setSize();c===!0&&r.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(function(){clearInterval(u)})}var l=C(a=this._onResize).call(a,this);Fce(window,"resize",l),this._cleanupCallbacks.push(function(){Bce(window,"resize",l)})}}},{key:"_cleanUp",value:function(){var e,r,n;ge(e=An(r=Or(n=this._cleanupCallbacks).call(n,0)).call(r)).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,r=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,n=this.cameraState.scale;e!=1&&r!=1?n=this.cameraState.scale*.5*(e+r):e!=1?n=this.cameraState.scale*e:r!=1&&(n=this.cameraState.scale*r),this.body.view.scale=n;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}),Wu(this.hammer,function(r){e.body.eventListeners.onTouch(r)}),this.hammer.on("tap",function(r){e.body.eventListeners.onTap(r)}),this.hammer.on("doubletap",function(r){e.body.eventListeners.onDoubleTap(r)}),this.hammer.on("press",function(r){e.body.eventListeners.onHold(r)}),this.hammer.on("panstart",function(r){e.body.eventListeners.onDragStart(r)}),this.hammer.on("panmove",function(r){e.body.eventListeners.onDrag(r)}),this.hammer.on("panend",function(r){e.body.eventListeners.onDragEnd(r)}),this.hammer.on("pinch",function(r){e.body.eventListeners.onPinch(r)}),this.frame.canvas.addEventListener("wheel",function(r){e.body.eventListeners.onMouseWheel(r)}),this.frame.canvas.addEventListener("mousemove",function(r){e.body.eventListeners.onMouseMove(r)}),this.frame.canvas.addEventListener("contextmenu",function(r){e.body.eventListeners.onContext(r)}),this.hammerFrame=new ki(this.frame),zP(this.hammerFrame,function(r){e.body.eventListeners.onRelease(r)})}},{key:"setSize",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),r=this._prepareValue(r);var n=!1,a=this.frame.canvas.width,o=this.frame.canvas.height,s=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||r!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=r)this._getCameraState(s),this.frame.style.width=e,this.frame.style.height=r,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=r,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},n=!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,n=!0),this.frame.canvas.height!==l&&(this.frame.canvas.height=l,n=!0)}return n===!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,n}},{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 r=1;typeof window<"u"&&(r=window.devicePixelRatio||1);var n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return r/n}},{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)}}}]),t}();function kye(t,i){var e=Le({nodes:i,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},t??{});if(!ve(e.nodes))throw new TypeError("Nodes has to be an array of ids.");if(e.nodes.length===0&&(e.nodes=i),!(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 Iye=function(){function t(i,e){var r,n=this,a;N(this,t),this.body=i,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",C(r=this.fit).call(r,this)),this.body.emitter.on("animationFinished",function(){n.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",C(a=this.releaseNode).call(a,this))}return F(t,[{key:"setOptions",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}},{key:"fit",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=kye(e,this.body.nodeIndices);var n=this.canvas.frame.canvas.clientWidth,a=this.canvas.frame.canvas.clientHeight,o,s;if(n===0||a===0)s=1,o=dt.getRange(this.body.nodes,e.nodes);else if(r===!0){var u=0;for(var l in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,l)){var c=this.body.nodes[l];c.predefinedPosition===!0&&(u+=1)}if(u>.5*this.body.nodeIndices.length){this.fit(e,!1);return}o=dt.getRange(this.body.nodes,e.nodes);var h=this.body.nodeIndices.length;s=12.662/(h+7.4147)+.0964822;var d=Math.min(n/600,a/600);s*=d}else{this.body.emitter.emit("_resizeNodes"),o=dt.getRange(this.body.nodes,e.nodes);var f=Math.abs(o.maxX-o.minX)*1.1,v=Math.abs(o.maxY-o.minY)*1.1,g=n/f,b=a/v;s=g<=b?g:b}s>e.maxZoomLevel?s=e.maxZoomLevel:s<e.minZoomLevel&&(s=e.minZoomLevel);var p=dt.findCenter(o),$={position:p,scale:s,animation:e.animation};this.moveTo($)}},{key:"focus",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){var n={x:this.body.nodes[e].x,y:this.body.nodes[e].y};r.position=n,r.lockedOnNode=e,this.moveTo(r)}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,!xn(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,!xn(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,!xn(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,!xn(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 r=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:r.x-e.position.x,y:r.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+n.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+n.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var a;this.viewFunction=C(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=C(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},r=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:r.x-e.x,y:r.y-e.y},a=this.body.view.translation,o={x:a.x+n.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:a.y+n.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 r=zce[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*r,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*r,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*r},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var n;this.viewFunction=C(n=this._lockedRedraw).call(n,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})}}]),t}();function z0(t){var i=t&&t.preventDefault||!1,e=t&&t.container||window,r={},n={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(c){l(c,"keydown")},u=function(c){l(c,"keyup")},l=function(c,h){if(n[h][c.keyCode]!==void 0){for(var d=n[h][c.keyCode],f=0;f<d.length;f++)(d[f].shift===void 0||d[f].shift==!0&&c.shiftKey==!0||d[f].shift==!1&&c.shiftKey==!1)&&d[f].fn(c);i==!0&&c.preventDefault()}};return r.bind=function(c,h,d){if(d===void 0&&(d="keydown"),a[c]===void 0)throw new Error("unsupported key: "+c);n[d][a[c].code]===void 0&&(n[d][a[c].code]=[]),n[d][a[c].code].push({fn:h,shift:a[c].shift})},r.bindAll=function(c,h){h===void 0&&(h="keydown");for(var d in a)a.hasOwnProperty(d)&&r.bind(d,c,h)},r.getKey=function(c){for(var h in a)if(a.hasOwnProperty(h)){if(c.shiftKey==!0&&a[h].shift==!0&&c.keyCode==a[h].code)return h;if(c.shiftKey==!1&&a[h].shift==!1&&c.keyCode==a[h].code)return h;if(c.keyCode==a[h].code&&h=="shift")return h}return"unknown key, currently not supported"},r.unbind=function(c,h,d){if(d===void 0&&(d="keydown"),a[c]===void 0)throw new Error("unsupported key: "+c);if(h!==void 0){var f=[],v=n[d][a[c].code];if(v!==void 0)for(var g=0;g<v.length;g++)v[g].fn==h&&v[g].shift==a[c].shift||f.push(n[d][a[c].code][g]);n[d][a[c].code]=f}else n[d][a[c].code]=[]},r.reset=function(){n={keydown:{},keyup:{}}},r.destroy=function(){n={keydown:{},keyup:{}},e.removeEventListener("keydown",s,!0),e.removeEventListener("keyup",u,!0)},e.addEventListener("keydown",s,!0),e.addEventListener("keyup",u,!0),r}var Cye=function(){function t(i,e){var r=this;N(this,t),this.body=i,this.canvas=e,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",function(){r.activated=!0,r.configureKeyboardBindings()}),this.body.emitter.on("deactivate",function(){r.activated=!1,r.configureKeyboardBindings()}),this.body.emitter.on("destroy",function(){r.keycharm!==void 0&&r.keycharm.destroy()}),this.options={}}return F(t,[{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 r=["up","down","left","right","zoomIn","zoomOut","zoomExtends"],n=["_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<r.length;a++){this.navigationDOM[r[a]]=document.createElement("div"),this.navigationDOM[r[a]].className="vis-button vis-"+r[a],this.navigationDOM.wrapper.appendChild(this.navigationDOM[r[a]]);var o=new ki(this.navigationDOM[r[a]]);if(n[a]==="_fit"){var s;Wu(o,C(s=this._fit).call(s,this))}else{var u;Wu(o,C(u=this.bindToRedraw).call(u,this,n[a]))}this.navigationHammers.push(o)}var l=new ki(this.canvas.frame);zP(l,function(){e._stopMovement()}),this.navigationHammers.push(l),this.iconsCreated=!0}},{key:"bindToRedraw",value:function(e){if(this.boundFunctions[e]===void 0){var r;this.boundFunctions[e]=C(r=this[e]).call(r,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,r=this.body.view.scale*(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,a=r/e,o=(1-a)*this.canvas.canvasViewCenter.x+n.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+n.y*a;this.body.view.scale=r,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,r=this.body.view.scale/(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,a=r/e,o=(1-a)*this.canvas.canvasViewCenter.x+n.x*a,s=(1-a)*this.canvas.canvasViewCenter.y+n.y*a;this.body.view.scale=r,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=z0({container:window,preventDefault:!0}):this.keycharm=z0({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var r,n,a,o,s,u,l,c,h,d,f,v,g,b,p,$,y,m,_,S,T,O,w,E;C(r=this.keycharm).call(r,"up",function(){e.bindToRedraw("_moveUp")},"keydown"),C(n=this.keycharm).call(n,"down",function(){e.bindToRedraw("_moveDown")},"keydown"),C(a=this.keycharm).call(a,"left",function(){e.bindToRedraw("_moveLeft")},"keydown"),C(o=this.keycharm).call(o,"right",function(){e.bindToRedraw("_moveRight")},"keydown"),C(s=this.keycharm).call(s,"=",function(){e.bindToRedraw("_zoomIn")},"keydown"),C(u=this.keycharm).call(u,"num+",function(){e.bindToRedraw("_zoomIn")},"keydown"),C(l=this.keycharm).call(l,"num-",function(){e.bindToRedraw("_zoomOut")},"keydown"),C(c=this.keycharm).call(c,"-",function(){e.bindToRedraw("_zoomOut")},"keydown"),C(h=this.keycharm).call(h,"[",function(){e.bindToRedraw("_zoomOut")},"keydown"),C(d=this.keycharm).call(d,"]",function(){e.bindToRedraw("_zoomIn")},"keydown"),C(f=this.keycharm).call(f,"pageup",function(){e.bindToRedraw("_zoomIn")},"keydown"),C(v=this.keycharm).call(v,"pagedown",function(){e.bindToRedraw("_zoomOut")},"keydown"),C(g=this.keycharm).call(g,"up",function(){e.unbindFromRedraw("_moveUp")},"keyup"),C(b=this.keycharm).call(b,"down",function(){e.unbindFromRedraw("_moveDown")},"keyup"),C(p=this.keycharm).call(p,"left",function(){e.unbindFromRedraw("_moveLeft")},"keyup"),C($=this.keycharm).call($,"right",function(){e.unbindFromRedraw("_moveRight")},"keyup"),C(y=this.keycharm).call(y,"=",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),C(m=this.keycharm).call(m,"num+",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),C(_=this.keycharm).call(_,"num-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),C(S=this.keycharm).call(S,"-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),C(T=this.keycharm).call(T,"[",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),C(O=this.keycharm).call(O,"]",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),C(w=this.keycharm).call(w,"pageup",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),C(E=this.keycharm).call(E,"pagedown",function(){e.unbindFromRedraw("_zoomOut")},"keyup")}}}]),t}();function Aye(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=Rye(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:n}}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(t)},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 Rye(t,i){var e;if(t){if(typeof t=="string")return H0(t,i);var r=st(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ei(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return H0(t,i)}}function H0(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}var Dye=function(){function t(i,e,r){var n,a,o,s,u,l,c,h,d,f,v,g,b;N(this,t),this.body=i,this.canvas=e,this.selectionHandler=r,this.navigationHandler=new Cye(i,e),this.body.eventListeners.onTap=C(n=this.onTap).call(n,this),this.body.eventListeners.onTouch=C(a=this.onTouch).call(a,this),this.body.eventListeners.onDoubleTap=C(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=C(s=this.onHold).call(s,this),this.body.eventListeners.onDragStart=C(u=this.onDragStart).call(u,this),this.body.eventListeners.onDrag=C(l=this.onDrag).call(l,this),this.body.eventListeners.onDragEnd=C(c=this.onDragEnd).call(c,this),this.body.eventListeners.onMouseWheel=C(h=this.onMouseWheel).call(h,this),this.body.eventListeners.onPinch=C(d=this.onPinch).call(d,this),this.body.eventListeners.onMouseMove=C(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=C(v=this.onRelease).call(v,this),this.body.eventListeners.onContext=C(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=C(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},Le(this.options,this.defaultOptions),this.bindEventListeners()}return F(t,[{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 r=["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"];Lu(r,this.options,e),Lt(this.options,e,"keyboard"),e.tooltip&&(Le(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=pp(e.tooltip.color)))}this.navigationHandler.setOptions(this.options)}},{key:"getPointer",value:function(e){return{x:e.x-Mce(this.canvas.frame.canvas),y:e.y-Nce(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 r=this.getPointer(e.center),n=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(r,n),this.selectionHandler.commitAndEmit(r,e),this.selectionHandler.generateClickEvent("click",e,r)}},{key:"onDoubleTap",value:function(e){var r=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,r)}},{key:"onHold",value:function(e){var r=this.getPointer(e.center),n=this.selectionHandler.options.multiselect;this.checkSelectionChanges(r,n),this.selectionHandler.commitAndEmit(r,e),this.selectionHandler.generateClickEvent("click",e,r),this.selectionHandler.generateClickEvent("hold",e,r)}},{key:"onRelease",value:function(e){if(new Date().valueOf()-this.touchTime>10){var r=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,r),this.touchTime=new Date().valueOf()}}},{key:"onContext",value:function(e){var r=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,r)}},{key:"checkSelectionChanges",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;r===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}},{key:"_determineDifference",value:function(e,r){var n=function(o,s){for(var u=[],l=0;l<o.length;l++){var c=o[l];ae(s).call(s,c)===-1&&u.push(c)}return u};return{nodes:n(e.nodes,r.nodes),edges:n(e.edges,r.edges)}}},{key:"onDragStart",value:function(e){if(!this.drag.dragging){this.drag.pointer===void 0&&this.onTouch(e);var r=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=Le({},this.body.view.translation),this.drag.nodeId=void 0,e.srcEvent.shiftKey){this.body.selectionBox.show=!0;var n=this.getPointer(e.center);this.body.selectionBox.position.start={x:this.canvas._XconvertDOMtoCanvas(n.x),y:this.canvas._YconvertDOMtoCanvas(n.y)},this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(n.x),y:this.canvas._YconvertDOMtoCanvas(n.y)}}else if(r!==void 0&&this.options.dragNodes===!0){this.drag.nodeId=r.id,r.isSelected()===!1&&this.selectionHandler.setSelection({nodes:[r.id]}),this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer);var a=Aye(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 r=this;if(this.drag.pinched!==!0){this.body.emitter.emit("unlockNode");var n=this.getPointer(e.center),a=this.drag.selection;if(a&&a.length&&this.options.dragNodes===!0){this.selectionHandler.generateClickEvent("dragging",e,n);var o=n.x-this.drag.pointer.x,s=n.y-this.drag.pointer.y;ge(a).call(a,function(c){var h=c.node;c.xFixed===!1&&(h.x=r.canvas._XconvertDOMtoCanvas(r.canvas._XconvertCanvasToDOM(c.x)+o)),c.yFixed===!1&&(h.y=r.canvas._YconvertDOMtoCanvas(r.canvas._YconvertCanvasToDOM(c.y)+s))}),this.body.emitter.emit("startSimulation")}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,n,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(n.x),y:this.canvas._YconvertDOMtoCanvas(n.y)},this.body.emitter.emit("_requestRedraw")}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,n,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}var u=n.x-this.drag.pointer.x,l=n.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 r=this;if(this.drag.dragging=!1,this.body.selectionBox.show){var n;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=St(n=this.body.nodeIndices).call(n,function(c){var h=r.body.nodes[c];return h.x>=o.minX&&h.x<=o.maxX&&h.y>=o.minY&&h.y<=o.maxY});ge(s).call(s,function(c){return r.selectionHandler.selectObject(r.body.nodes[c])});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?(ge(l).call(l,function(c){c.node.options.fixed.x=c.xFixed,c.node.options.fixed.y=c.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 r=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);var n=this.pinch.scale*e.scale;this.zoom(n,r)}},{key:"zoom",value:function(e,r){if(this.options.zoomView===!0){var n=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/n,u=(1-s)*r.x+o.x*s,l=(1-s)*r.y+o.y*s;if(this.body.view.scale=e,this.body.view.translation={x:u,y:l},a!=null){var c=this.canvas.canvasToDOM(a);this.drag.pointer.x=c.x,this.drag.pointer.y=c.y}this.body.emitter.emit("_requestRedraw"),n<e?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:r}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:r})}}},{key:"onMouseWheel",value:function(e){if(this.options.zoomView===!0){if(e.deltaY!==0){var r=this.body.view.scale;r*=1+(e.deltaY<0?1:-1)*(this.options.zoomSpeed*.1);var n=this.getPointer({x:e.clientX,y:e.clientY});this.zoom(r,n)}e.preventDefault()}}},{key:"onMouseMove",value:function(e){var r=this,n=this.getPointer({x:e.clientX,y:e.clientY}),a=!1;this.popup!==void 0&&(this.popup.hidden===!1&&this._checkHidePopup(n),this.popup.hidden===!1&&(a=!0,this.popup.setPosition(n.x+3,n.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=pr(function(){return r._checkShowPopup(n)},this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,n)}},{key:"_checkShowPopup",value:function(e){var r=this.canvas._XconvertDOMtoCanvas(e.x),n=this.canvas._YconvertDOMtoCanvas(e.y),a={left:r,top:n,right:r,bottom:n},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,c=this.body.nodes,h,d=[],f=0;f<l.length;f++)h=c[l[f]],h.isOverlappingWith(a)===!0&&(s=!0,h.getTitle()!==void 0&&d.push(l[f]));d.length>0&&(this.popupObj=c[d[d.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 Yce(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 r=this.selectionHandler._pointerToPositionObject(e),n=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(n=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(r),n===!0)){var a=this.selectionHandler.getNodeAt(e);n=a===void 0?!1:a.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(n=this.body.edges[this.popup.popupTargetId].isOverlappingWith(r));n===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),t}(),Up={},Mye={get exports(){return Up},set exports(t){Up=t}},Nye=Ey,Fye=TP;Nye("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Fye);var Bye=ie,Lye=Bye.Set,jye=Lye,zye=jye;(function(t){t.exports=zye})(Mye);var Sn=V(Up),Gp={},Hye={get exports(){return Gp},set exports(t){Gp=t}},Wye=ue,W0=Sy,zs=Vi.getWeakData,Vye=_y,Uye=Ft,Gye=Fo,Zh=Je,Kye=wy,HP=fn,V0=et,WP=Jn,qye=WP.set,Yye=WP.getterFor,Xye=HP.find,Qye=HP.findIndex,Zye=Wye([].splice),Jye=0,Hs=function(t){return t.frozen||(t.frozen=new VP)},VP=function(){this.entries=[]},Jh=function(t,i){return Xye(t.entries,function(e){return e[0]===i})};VP.prototype={get:function(t){var i=Jh(this,t);if(i)return i[1]},has:function(t){return!!Jh(this,t)},set:function(t,i){var e=Jh(this,t);e?e[1]=i:this.entries.push([t,i])},delete:function(t){var i=Qye(this.entries,function(e){return e[0]===t});return~i&&Zye(this.entries,i,1),!!~i}};var eme={getConstructor:function(t,i,e,r){var n=t(function(u,l){Vye(u,a),qye(u,{type:i,id:Jye++,frozen:void 0}),Gye(l)||Kye(l,u[r],{that:u,AS_ENTRIES:e})}),a=n.prototype,o=Yye(i),s=function(u,l,c){var h=o(u),d=zs(Uye(l),!0);return d===!0?Hs(h).set(l,c):d[h.id]=c,u};return W0(a,{delete:function(u){var l=o(this);if(!Zh(u))return!1;var c=zs(u);return c===!0?Hs(l).delete(u):c&&V0(c,l.id)&&delete c[l.id]},has:function(l){var c=o(this);if(!Zh(l))return!1;var h=zs(l);return h===!0?Hs(c).has(l):h&&V0(h,c.id)}}),W0(a,e?{get:function(l){var c=o(this);if(Zh(l)){var h=zs(l);return h===!0?Hs(c).get(l):h?h[c.id]:void 0}},set:function(l,c){return s(this,l,c)}}:{add:function(l){return s(this,l,!0)}}),n}},tme=_P,U0=We,uu=ue,G0=Sy,rme=Vi,nme=Ey,UP=eme,Ws=Je,Vs=Jn.enforce,ime=se,ame=hT,ss=Object,ome=Array.isArray,Us=ss.isExtensible,GP=ss.isFrozen,sme=ss.isSealed,KP=ss.freeze,ume=ss.seal,K0={},q0={},lme=!U0.ActiveXObject&&"ActiveXObject"in U0,_a,qP=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},YP=nme("WeakMap",qP,UP),pi=YP.prototype,lu=uu(pi.set),cme=function(){return tme&&ime(function(){var t=KP([]);return lu(new YP,t,1),!GP(t)})};if(ame)if(lme){_a=UP.getConstructor(qP,"WeakMap",!0),rme.enable();var Y0=uu(pi.delete),Gs=uu(pi.has),X0=uu(pi.get);G0(pi,{delete:function(t){if(Ws(t)&&!Us(t)){var i=Vs(this);return i.frozen||(i.frozen=new _a),Y0(this,t)||i.frozen.delete(t)}return Y0(this,t)},has:function(i){if(Ws(i)&&!Us(i)){var e=Vs(this);return e.frozen||(e.frozen=new _a),Gs(this,i)||e.frozen.has(i)}return Gs(this,i)},get:function(i){if(Ws(i)&&!Us(i)){var e=Vs(this);return e.frozen||(e.frozen=new _a),Gs(this,i)?X0(this,i):e.frozen.get(i)}return X0(this,i)},set:function(i,e){if(Ws(i)&&!Us(i)){var r=Vs(this);r.frozen||(r.frozen=new _a),Gs(this,i)?lu(this,i,e):r.frozen.set(i,e)}else lu(this,i,e);return this}})}else cme()&&G0(pi,{set:function(i,e){var r;return ome(i)&&(GP(i)?r=K0:sme(i)&&(r=q0)),lu(this,i,e),r==K0&&KP(i),r==q0&&ume(i),this}});var hme=ie,dme=hme.WeakMap,fme=dme,vme=fme;(function(t){t.exports=vme})(Hye);var La=V(Gp);function me(t,i,e,r){if(e==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?t!==i||!r:!i.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?r:e==="a"?r.call(t):r?r.value:i.get(t)}function Kp(t,i,e,r,n){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?t!==i||!n:!i.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?n.call(t,e):n?n.value=e:i.set(t,e),e}function qp(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=pme(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:n}}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(t)},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 pme(t,i){var e;if(t){if(typeof t=="string")return Q0(t,i);var r=st(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ei(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Q0(t,i)}}function Q0(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}var wn,Bt,Hr,Wr,cu;function Z0(t,i){var e=new Sn,r=qp(i),n;try{for(r.s();!(n=r.n()).done;){var a=n.value;t.has(a)||e.add(a)}}catch(o){r.e(o)}finally{r.f()}return e}var J0=function(){function t(){N(this,t),wn.set(this,new Sn),Bt.set(this,new Sn)}return F(t,[{key:"size",get:function(){return me(this,Bt,"f").size}},{key:"add",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(var a=0,o=r;a<o.length;a++){var s=o[a];me(this,Bt,"f").add(s)}}},{key:"delete",value:function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(var a=0,o=r;a<o.length;a++){var s=o[a];me(this,Bt,"f").delete(s)}}},{key:"clear",value:function(){me(this,Bt,"f").clear()}},{key:"getSelection",value:function(){return lr(me(this,Bt,"f"))}},{key:"getChanges",value:function(){return{added:lr(Z0(me(this,wn,"f"),me(this,Bt,"f"))),deleted:lr(Z0(me(this,Bt,"f"),me(this,wn,"f"))),previous:lr(new Sn(me(this,wn,"f"))),current:lr(new Sn(me(this,Bt,"f")))}}},{key:"commit",value:function(){var e=this.getChanges();Kp(this,wn,me(this,Bt,"f"),"f"),Kp(this,Bt,new Sn(me(this,wn,"f")),"f");var r=qp(e.added),n;try{for(r.s();!(n=r.n()).done;){var a=n.value;a.select()}}catch(l){r.e(l)}finally{r.f()}var o=qp(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}}]),t}();wn=new La,Bt=new La;var gme=function(){function t(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};N(this,t),Hr.set(this,new J0),Wr.set(this,new J0),cu.set(this,void 0),Kp(this,cu,i,"f")}return F(t,[{key:"sizeNodes",get:function(){return me(this,Hr,"f").size}},{key:"sizeEdges",get:function(){return me(this,Wr,"f").size}},{key:"getNodes",value:function(){return me(this,Hr,"f").getSelection()}},{key:"getEdges",value:function(){return me(this,Wr,"f").getSelection()}},{key:"addNodes",value:function(){var e;(e=me(this,Hr,"f")).add.apply(e,arguments)}},{key:"addEdges",value:function(){var e;(e=me(this,Wr,"f")).add.apply(e,arguments)}},{key:"deleteNodes",value:function(e){me(this,Hr,"f").delete(e)}},{key:"deleteEdges",value:function(e){me(this,Wr,"f").delete(e)}},{key:"clear",value:function(){me(this,Hr,"f").clear(),me(this,Wr,"f").clear()}},{key:"commit",value:function(){for(var e,r,n={nodes:me(this,Hr,"f").commit(),edges:me(this,Wr,"f").commit()},a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return(e=me(this,cu,"f")).call.apply(e,oy(r=[this,n]).call(r,o)),n}}]),t}();Hr=new La,Wr=new La,cu=new La;function e_(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=yme(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
97
|
+
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(t)},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 yme(t,i){var e;if(t){if(typeof t=="string")return t_(t,i);var r=st(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ei(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t_(t,i)}}function t_(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}var mme=function(){function t(i,e){var r=this;N(this,t),this.body=i,this.canvas=e,this._selectionAccumulator=new gme,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},Le(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",function(){r.updateSelection()})}return F(t,[{key:"setOptions",value:function(e){if(e!==void 0){var r=["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"];va(r,this.options,e)}}},{key:"selectOnPoint",value:function(e){var r=!1;if(this.options.selectable===!0){var n=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),n!==void 0&&(r=this.selectObject(n)),this.body.emitter.emit("_requestRedraw")}return r}},{key:"selectAdditionalOnPoint",value:function(e){var r=!1;if(this.options.selectable===!0){var n=this.getNodeAt(e)||this.getEdgeAt(e);n!==void 0&&(r=!0,n.isSelected()===!0?this.deselectObject(n):this.selectObject(n),this.body.emitter.emit("_requestRedraw"))}return r}},{key:"_initBaseEvent",value:function(e,r){var n={};return n.pointer={DOM:{x:r.x,y:r.y},canvas:this.canvas.DOMtoCanvas(r)},n.event=e,n}},{key:"generateClickEvent",value:function(e,r,n,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,s=this._initBaseEvent(r,n);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(n)),r.controlEdge!==void 0&&(s.controlEdge=r.controlEdge),this.body.emitter.emit(e,s)}},{key:"selectObject",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;if(e!==void 0){if(e instanceof kt){if(r===!0){var n;(n=this._selectionAccumulator).addEdges.apply(n,lr(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 r=[],n=this.body.nodes,a=0;a<this.body.nodeIndices.length;a++){var o=this.body.nodeIndices[a];n[o].isOverlappingWith(e)&&r.push(o)}return r}},{key:"_pointerToPositionObject",value:function(e){var r=this.canvas.DOMtoCanvas(e);return{left:r.x-1,top:r.y+1,right:r.x+1,bottom:r.y-1}}},{key:"getNodeAt",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this._pointerToPositionObject(e),a=this._getAllNodesOverlappingWith(n);if(a.length>0)return r===!0?this.body.nodes[a[a.length-1]]:a[a.length-1]}},{key:"_getEdgesOverlappingWith",value:function(e,r){for(var n=this.body.edges,a=0;a<this.body.edgeIndices.length;a++){var o=this.body.edgeIndices[a];n[o].isOverlappingWith(e)&&r.push(o)}}},{key:"_getAllEdgesOverlappingWith",value:function(e){var r=[];return this._getEdgesOverlappingWith(e,r),r}},{key:"getEdgeAt",value:function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=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],c=s[l];if(c.connected){var h=c.from.x,d=c.from.y,f=c.to.x,v=c.to.y,g=c.edgeType.getDistanceToEdge(h,d,f,v,n.x,n.y);g<a&&(o=l,a=g)}}if(o!==null)return r===!0?this.body.edges[o]:o}},{key:"_addToHover",value:function(e){e instanceof kt?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}},{key:"_removeFromSelection",value:function(e){if(e instanceof kt){var r;this._selectionAccumulator.deleteNodes(e),(r=this._selectionAccumulator).deleteEdges.apply(r,lr(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 r=0;r<e.edges.length;r++){var n=e.edges[r];n.hover=!0,this._addToHover(n)}}},{key:"emitBlurEvent",value:function(e,r,n){var a=this._initBaseEvent(e,r);n.hover===!0&&(n.hover=!1,n instanceof kt?(a.node=n.id,this.body.emitter.emit("blurNode",a)):(a.edge=n.id,this.body.emitter.emit("blurEdge",a)))}},{key:"emitHoverEvent",value:function(e,r,n){var a=this._initBaseEvent(e,r),o=!1;return n.hover===!1&&(n.hover=!0,this._addToHover(n),o=!0,n instanceof kt?(a.node=n.id,this.body.emitter.emit("hoverNode",a)):(a.edge=n.id,this.body.emitter.emit("hoverEdge",a))),o}},{key:"hoverObject",value:function(e,r){var n=this.getNodeAt(r);n===void 0&&(n=this.getEdgeAt(r));var a=!1;for(var o in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,o)&&(n===void 0||n instanceof kt&&n.id!=o||n instanceof Ii)&&(this.emitBlurEvent(e,r,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]):(n===void 0||n instanceof Ii&&n.id!=s||n instanceof kt&&!n.hover)&&(this.emitBlurEvent(e,r,this.hoverObj.edges[s]),delete this.hoverObj.edges[s],a=!0));if(n!==void 0){var u=Te(this.hoverObj.edges).length,l=Te(this.hoverObj.nodes).length,c=n instanceof Ii&&u===0&&l===0,h=n instanceof kt&&u===0&&l===0;(a||c||h)&&(a=this.emitHoverEvent(e,r,n)),n instanceof kt&&this.options.hoverConnectedEdges===!0&&this._hoverConnectedEdges(n)}a===!0&&this.body.emitter.emit("_requestRedraw")}},{key:"commitWithoutEmitting",value:function(){this._selectionAccumulator.commit()}},{key:"commitAndEmit",value:function(e,r){var n=!1,a=this._selectionAccumulator.commit(),o={nodes:a.nodes.previous,edges:a.edges.previous};a.edges.deleted.length>0&&(this.generateClickEvent("deselectEdge",r,e,o),n=!0),a.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",r,e,o),n=!0),a.nodes.added.length>0&&(this.generateClickEvent("selectNode",r,e),n=!0),a.edges.added.length>0&&(this.generateClickEvent("selectEdge",r,e),n=!0),n===!0&&this.generateClickEvent("select",r,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 Li(e=this._selectionAccumulator.getNodes()).call(e,function(r){return r.id})}},{key:"getSelectedEdgeIds",value:function(){var e;return Li(e=this._selectionAccumulator.getEdges()).call(e,function(r){return r.id})}},{key:"setSelection",value:function(e){var r=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((r.unselectAll||r.unselectAll===void 0)&&this.unselectAll(),e.nodes){var n=e_(e.nodes),a;try{for(n.s();!(a=n.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,r.highlightEdges)}}catch(d){n.e(d)}finally{n.f()}}if(e.edges){var u=e_(e.edges),l;try{for(u.s();!(l=u.n()).done;){var c=l.value,h=this.body.edges[c];if(!h)throw new RangeError('Edge with id "'+c+'" not found');this.selectObject(h)}}catch(d){u.e(d)}finally{u.f()}}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}},{key:"selectNodes",value:function(e){var r=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:r})}},{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 r in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,r.id)||this._selectionAccumulator.deleteEdges(r)}},{key:"getClickedItems",value:function(e){for(var r=this.canvas.DOMtoCanvas(e),n=[],a=this.body.nodeIndices,o=this.body.nodes,s=a.length-1;s>=0;s--){var u=o[a[s]],l=u.getItemsOnPoint(r);n.push.apply(n,l)}for(var c=this.body.edgeIndices,h=this.body.edges,d=c.length-1;d>=0;d--){var f=h[c[d]],v=f.getItemsOnPoint(r);n.push.apply(n,v)}return n}}]),t}(),Yp={},$me={get exports(){return Yp},set exports(t){Yp=t}},r_=DT,bme=Math.floor,Xp=function(t,i){var e=t.length,r=bme(e/2);return e<8?wme(t,i):_me(t,Xp(r_(t,0,r),i),Xp(r_(t,r),i),i)},wme=function(t,i){for(var e=t.length,r=1,n,a;r<e;){for(a=r,n=t[r];a&&i(t[a-1],n)>0;)t[a]=t[--a];a!==r++&&(t[a]=n)}return t},_me=function(t,i,e,r){for(var n=i.length,a=e.length,o=0,s=0;o<n||s<a;)t[o+s]=o<n&&s<a?r(i[o],e[s])<=0?i[o++]:e[s++]:o<n?i[o++]:e[s++];return t},Eme=Xp,Sme=Lo,n_=Sme.match(/firefox\/(\d+)/i),Ome=!!n_&&+n_[1],Tme=Lo,xme=/MSIE|Trident/.test(Tme),Pme=Lo,i_=Pme.match(/AppleWebKit\/(\d+)\./),kme=!!i_&&+i_[1],Ime=q,XP=ue,Cme=Qn,Ame=Nt,a_=ir,Rme=xx,o_=mr,Iy=se,Dme=Eme,Mme=da,s_=Ome,Nme=xme,u_=jo,l_=kme,Xr=[],c_=XP(Xr.sort),Fme=XP(Xr.push),Bme=Iy(function(){Xr.sort(void 0)}),Lme=Iy(function(){Xr.sort(null)}),jme=Mme("sort"),QP=!Iy(function(){if(u_)return u_<70;if(!(s_&&s_>3)){if(Nme)return!0;if(l_)return l_<603;var t="",i,e,r,n;for(i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)Xr.push({k:e+n,v:r})}for(Xr.sort(function(a,o){return o.v-a.v}),n=0;n<Xr.length;n++)e=Xr[n].k.charAt(0),t.charAt(t.length-1)!==e&&(t+=e);return t!=="DGBEFHACIJK"}}),zme=Bme||!Lme||!jme||!QP,Hme=function(t){return function(i,e){return e===void 0?-1:i===void 0?1:t!==void 0?+t(i,e)||0:o_(i)>o_(e)?1:-1}};Ime({target:"Array",proto:!0,forced:zme},{sort:function(i){i!==void 0&&Cme(i);var e=Ame(this);if(QP)return i===void 0?c_(e):c_(e,i);var r=[],n=a_(e),a,o;for(o=0;o<n;o++)o in e&&Fme(r,e[o]);for(Dme(r,Hme(i)),a=a_(r),o=0;o<a;)e[o]=r[o++];for(;o<n;)Rme(e,o++);return e}});var Wme=tt,Vme=Wme("Array").sort,Ume=Ne,Gme=Vme,ed=Array.prototype,Kme=function(t){var i=t.sort;return t===ed||Ume(ed,t)&&i===ed.sort?Gme:i},qme=Kme,Yme=qme;(function(t){t.exports=Yme})($me);var td=V(Yp),Qp={},Xme={get exports(){return Qp},set exports(t){Qp=t}},Qme=Qn,Zme=Nt,Jme=gl,e$e=ir,t$e=TypeError,h_=function(t){return function(i,e,r,n){Qme(e);var a=Zme(i),o=Jme(a),s=e$e(a),u=t?s-1:0,l=t?-1:1;if(r<2)for(;;){if(u in o){n=o[u],u+=l;break}if(u+=l,t?u<0:s<=u)throw t$e("Reduce of empty array with no initial value")}for(;t?u>=0:s>u;u+=l)u in o&&(n=e(n,o[u],u,a));return n}},r$e={left:h_(!1),right:h_(!0)},n$e=Fr,i$e=typeof process<"u"&&n$e(process)=="process",a$e=q,o$e=r$e.left,s$e=da,d_=jo,u$e=i$e,l$e=!u$e&&d_>79&&d_<83,c$e=l$e||!s$e("reduce");a$e({target:"Array",proto:!0,forced:c$e},{reduce:function(i){var e=arguments.length;return o$e(this,i,e,e>1?arguments[1]:void 0)}});var h$e=tt,d$e=h$e("Array").reduce,f$e=Ne,v$e=d$e,rd=Array.prototype,p$e=function(t){var i=t.reduce;return t===rd||f$e(rd,t)&&i===rd.reduce?v$e:i},g$e=p$e,y$e=g$e;(function(t){t.exports=y$e})(Xme);var ZP=V(Qp),ao={},m$e={get exports(){return ao},set exports(t){ao=t}},JP={};(function(t){(function(i,e){e(t)})(Zf,function(i){i.__esModule=!0,i.sort=b;function e(p,$){if(!(p instanceof $))throw new TypeError("Cannot call a class as a function")}var r=32,n=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 S=String(p),T=String($);return S===T?0:S<T?-1:1}function l(p){for(var $=0;p>=r;)$|=p&1,p>>=1;return p+$}function c(p,$,y,m){var _=$+1;if(_===y)return 1;if(m(p[_++],p[$])<0){for(;_<y&&m(p[_],p[_-1])<0;)_++;h(p,$,_)}else for(;_<y&&m(p[_],p[_-1])>=0;)_++;return _-$}function h(p,$,y){for(y--;$<y;){var m=p[$];p[$++]=p[y],p[y--]=m}}function d(p,$,y,m,_){for(m===$&&m++;m<y;m++){for(var S=p[m],T=$,O=m;T<O;){var w=T+O>>>1;_(S,p[w])<0?O=w:T=w+1}var E=m-T;switch(E){case 3:p[T+3]=p[T+2];case 2:p[T+2]=p[T+1];case 1:p[T+1]=p[T];break;default:for(;E>0;)p[T+E]=p[T+E-1],E--}p[T]=S}}function f(p,$,y,m,_,S){var T=0,O=0,w=1;if(S(p,$[y+_])>0){for(O=m-_;w<O&&S(p,$[y+_+w])>0;)T=w,w=(w<<1)+1,w<=0&&(w=O);w>O&&(w=O),T+=_,w+=_}else{for(O=_+1;w<O&&S(p,$[y+_-w])<=0;)T=w,w=(w<<1)+1,w<=0&&(w=O);w>O&&(w=O);var E=T;T=_-w,w=_-E}for(T++;T<w;){var A=T+(w-T>>>1);S(p,$[y+A])>0?T=A+1:w=A}return w}function v(p,$,y,m,_,S){var T=0,O=0,w=1;if(S(p,$[y+_])<0){for(O=_+1;w<O&&S(p,$[y+_-w])<0;)T=w,w=(w<<1)+1,w<=0&&(w=O);w>O&&(w=O);var E=T;T=_-w,w=_-E}else{for(O=m-_;w<O&&S(p,$[y+_+w])>=0;)T=w,w=(w<<1)+1,w<=0&&(w=O);w>O&&(w=O),T+=_,w+=_}for(T++;T<w;){var A=T+(w-T>>>1);S(p,$[y+A])<0?w=A:T=A+1}return w}var g=function(){function p($,y){e(this,p),this.array=null,this.compare=null,this.minGallop=n,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,S=this.runStart[y],T=this.runLength[y],O=this.runStart[y+1],w=this.runLength[y+1];this.runLength[y]=T+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(_[O],_,S,T,0,m);S+=E,T-=E,T!==0&&(w=f(_[S+T-1],_,O,w,w-1,m),w!==0&&(T<=w?this.mergeLow(S,T,O,w):this.mergeHigh(S,T,O,w)))},p.prototype.mergeLow=function(y,m,_,S){var T=this.compare,O=this.array,w=this.tmp,E=0;for(E=0;E<m;E++)w[E]=O[y+E];var A=0,H=_,B=y;if(O[B++]=O[H++],--S===0){for(E=0;E<m;E++)O[B+E]=w[A+E];return}if(m===1){for(E=0;E<S;E++)O[B+E]=O[H+E];O[B+S]=w[A];return}for(var X=this.minGallop;;){var re=0,te=0,le=!1;do if(T(O[H],w[A])<0){if(O[B++]=O[H++],te++,re=0,--S===0){le=!0;break}}else if(O[B++]=w[A++],re++,te=0,--m===1){le=!0;break}while((re|te)<X);if(le)break;do{if(re=v(O[H],w,A,m,0,T),re!==0){for(E=0;E<re;E++)O[B+E]=w[A+E];if(B+=re,A+=re,m-=re,m<=1){le=!0;break}}if(O[B++]=O[H++],--S===0){le=!0;break}if(te=f(w[A],O,H,S,0,T),te!==0){for(E=0;E<te;E++)O[B+E]=O[H+E];if(B+=te,H+=te,S-=te,S===0){le=!0;break}}if(O[B++]=w[A++],--m===1){le=!0;break}X--}while(re>=n||te>=n);if(le)break;X<0&&(X=0),X+=2}if(this.minGallop=X,X<1&&(this.minGallop=1),m===1){for(E=0;E<S;E++)O[B+E]=O[H+E];O[B+S]=w[A]}else{if(m===0)throw new Error("mergeLow preconditions were not respected");for(E=0;E<m;E++)O[B+E]=w[A+E]}},p.prototype.mergeHigh=function(y,m,_,S){var T=this.compare,O=this.array,w=this.tmp,E=0;for(E=0;E<S;E++)w[E]=O[_+E];var A=y+m-1,H=S-1,B=_+S-1,X=0,re=0;if(O[B--]=O[A--],--m===0){for(X=B-(S-1),E=0;E<S;E++)O[X+E]=w[E];return}if(S===1){for(B-=m,A-=m,re=B+1,X=A+1,E=m-1;E>=0;E--)O[re+E]=O[X+E];O[B]=w[H];return}for(var te=this.minGallop;;){var le=0,we=0,Oe=!1;do if(T(w[H],O[A])<0){if(O[B--]=O[A--],le++,we=0,--m===0){Oe=!0;break}}else if(O[B--]=w[H--],we++,le=0,--S===1){Oe=!0;break}while((le|we)<te);if(Oe)break;do{if(le=m-v(w[H],O,y,m,m-1,T),le!==0){for(B-=le,A-=le,m-=le,re=B+1,X=A+1,E=le-1;E>=0;E--)O[re+E]=O[X+E];if(m===0){Oe=!0;break}}if(O[B--]=w[H--],--S===1){Oe=!0;break}if(we=S-f(O[A],w,0,S,S-1,T),we!==0){for(B-=we,H-=we,S-=we,re=B+1,X=H+1,E=0;E<we;E++)O[re+E]=w[X+E];if(S<=1){Oe=!0;break}}if(O[B--]=O[A--],--m===0){Oe=!0;break}te--}while(le>=n||we>=n);if(Oe)break;te<0&&(te=0),te+=2}if(this.minGallop=te,te<1&&(this.minGallop=1),S===1){for(B-=m,A-=m,re=B+1,X=A+1,E=m-1;E>=0;E--)O[re+E]=O[X+E];O[B]=w[H]}else{if(S===0)throw new Error("mergeHigh preconditions were not respected");for(X=B-(S-1),E=0;E<S;E++)O[X+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 S=0;if(_<r){S=c(p,y,m,$),d(p,y,m,y+S,$);return}var T=new g(p,$),O=l(_);do{if(S=c(p,y,m,$),S<O){var w=_;w>O&&(w=O),d(p,y,y+w,y+S,$),S=w}T.pushRun(y,S),T.mergeRuns(),_-=S,y+=S}while(_!==0);T.forceMergeRuns()}}})})(JP);(function(t){t.exports=JP})(m$e);var f_=V(ao);function ek(t){var i=$$e();return function(){var r=j(t),n;if(i){var a=j(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function $$e(){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 tk=function(){function t(){N(this,t)}return F(t,[{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,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,r,n),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,r){this.fake_use(e,r),this.abstract()}},{key:"shift",value:function(e,r){this.fake_use(e,r),this.abstract()}}]),t}(),b$e=function(t){ce(e,t);var i=ek(e);function e(r){var n;return N(this,e),n=i.call(this),n.layout=r,n}return F(e,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(n){return n.x}},{key:"setPosition",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(n,o),n.x=a}},{key:"getTreeSize",value:function(n){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,n);return{min:a.min_x,max:a.max_x}}},{key:"sort",value:function(n){ao.sort(n,function(a,o){return a.x-o.x})}},{key:"fix",value:function(n,a){n.y=this.layout.options.hierarchical.levelSeparation*a,n.options.fixed.y=!0}},{key:"shift",value:function(n,a){this.layout.body.nodes[n].x+=a}}]),e}(tk),w$e=function(t){ce(e,t);var i=ek(e);function e(r){var n;return N(this,e),n=i.call(this),n.layout=r,n}return F(e,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(n){return n.y}},{key:"setPosition",value:function(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;o!==void 0&&this.layout.hierarchical.addToOrdering(n,o),n.y=a}},{key:"getTreeSize",value:function(n){var a=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,n);return{min:a.min_y,max:a.max_y}}},{key:"sort",value:function(n){ao.sort(n,function(a,o){return a.y-o.y})}},{key:"fix",value:function(n,a){n.x=this.layout.options.hierarchical.levelSeparation*a,n.options.fixed.x=!0}},{key:"shift",value:function(n,a){this.layout.body.nodes[n].y+=a}}]),e}(tk),Zp={},_$e={get exports(){return Zp},set exports(t){Zp=t}},E$e=q,S$e=fn.every,O$e=da,T$e=O$e("every");E$e({target:"Array",proto:!0,forced:!T$e},{every:function(i){return S$e(this,i,arguments.length>1?arguments[1]:void 0)}});var x$e=tt,P$e=x$e("Array").every,k$e=Ne,I$e=P$e,nd=Array.prototype,C$e=function(t){var i=t.every;return t===nd||k$e(nd,t)&&i===nd.every?I$e:i},A$e=C$e,R$e=A$e;(function(t){t.exports=R$e})(_$e);var rk=V(Zp);function D$e(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=M$e(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
98
|
+
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(t)},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 M$e(t,i){var e;if(t){if(typeof t=="string")return v_(t,i);var r=st(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ei(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v_(t,i)}}function v_(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}function N$e(t,i){var e=new Sn;return ge(t).call(t,function(r){var n;ge(n=r.edges).call(n,function(a){a.connected&&e.add(a)})}),ge(e).call(e,function(r){var n=r.from.id,a=r.to.id;i[n]==null&&(i[n]=0),(i[a]==null||i[n]>=i[a])&&(i[a]=i[n]+1)}),i}function F$e(t){return nk(function(i){var e,r;return rk(e=St(r=i.edges).call(r,function(n){return t.has(n.toId)})).call(e,function(n){return n.to===i})},function(i,e){return e>i},"from",t)}function B$e(t){return nk(function(i){var e,r;return rk(e=St(r=i.edges).call(r,function(n){return t.has(n.toId)})).call(e,function(n){return n.from===i})},function(i,e){return e<i},"to",t)}function nk(t,i,e,r){var n,a=Rn(null),o=ZP(n=lr(CP(r).call(r))).call(n,function(f,v){return f+1+v.edges.length},0),s=e+"Id",u=e==="to"?1:-1,l=D$e(r),c;try{var h=function(){var v=xe(c.value,2),g=v[0],b=v[1];if(!r.has(g)||!t(b))return"continue";a[g]=0;for(var p=[b],$=0,y,m=function(){var T,O;if(!r.has(g))return"continue";var w=a[y.id]+u;if(ge(T=St(O=y.edges).call(O,function(E){return E.connected&&E.to!==E.from&&E[e]!==y&&r.has(E.toId)&&r.has(E.fromId)})).call(T,function(E){var A=E[s],H=a[A];(H==null||i(w,H))&&(a[A]=w,p.push(E[e]))}),$>o)return{v:{v:N$e(r,a)}};++$};y=p.pop();){var _=m();if(_!=="continue"&&he(_)==="object")return _.v}};for(l.s();!(c=l.n()).done;){var d=h();if(d!=="continue"&&he(d)==="object")return d.v}}catch(f){l.e(f)}finally{l.f()}return a}var L$e=function(){function t(){N(this,t),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return F(t,[{key:"addRelation",value:function(e,r){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(r),this.parentReference[r]===void 0&&(this.parentReference[r]=[]),this.parentReference[r].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,r){r!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=r,this.treeIndex=Math.max(r,this.treeIndex))}},{key:"ensureLevel",value:function(e){this.levels[e]===void 0&&(this.levels[e]=0)}},{key:"getMaxLevel",value:function(e){var r=this,n={},a=function o(s){if(n[s]!==void 0)return n[s];var u=r.levels[s];if(r.childrenReference[s]){var l=r.childrenReference[s];if(l.length>0)for(var c=0;c<l.length;c++)u=Math.max(u,o(l[c]))}return n[s]=u,u};return a(e)}},{key:"levelDownstream",value:function(e,r){this.levels[r.id]===void 0&&(this.levels[e.id]===void 0&&(this.levels[e.id]=0),this.levels[r.id]=this.levels[e.id]+1)}},{key:"setMinLevelToZero",value:function(e){var r=1e9;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.levels[n]!==void 0&&(r=Math.min(this.levels[n],r));for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&this.levels[a]!==void 0&&(this.levels[a]-=r)}},{key:"getTreeSize",value:function(e,r){var n=1e9,a=-1e9,o=1e9,s=-1e9;for(var u in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,u)&&this.trees[u]===r){var l=e[u];n=Math.min(l.x,n),a=Math.max(l.x,a),o=Math.min(l.y,o),s=Math.max(l.y,s)}return{min_x:n,max_x:a,min_y:o,max_y:s}}},{key:"hasSameParent",value:function(e,r){var n=this.parentReference[e.id],a=this.parentReference[r.id];if(n===void 0||a===void 0)return!1;for(var o=0;o<n.length;o++)for(var s=0;s<a.length;s++)if(n[o]==a[s])return!0;return!1}},{key:"inSameSubNetwork",value:function(e,r){return this.trees[e.id]===this.trees[r.id]}},{key:"getLevels",value:function(){return Te(this.distributionOrdering)}},{key:"addToOrdering",value:function(e,r){this.distributionOrdering[r]===void 0&&(this.distributionOrdering[r]=[]);var n=!1,a=this.distributionOrdering[r];for(var o in a)if(a[o]===e){n=!0;break}n||(this.distributionOrdering[r].push(e),this.distributionIndex[e.id]=this.distributionOrdering[r].length-1)}}]),t}(),j$e=function(){function t(i){N(this,t),this.body=i,this._resetRNG(Math.random()+":"+Mu()),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"}},Le(this.options,this.defaultOptions),this.bindEventListeners()}return F(t,[{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 r=e.direction.curveType();e.body.emitter.emit("_forceDisableDynamicCurves",r,!1)}})}},{key:"setOptions",value:function(e,r){if(e!==void 0){var n=this.options.hierarchical,a=n.enabled;if(va(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),Lt(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),n.enabled===!0)return a===!0&&this.body.emitter.emit("refresh",!0),n.direction==="RL"||n.direction==="DU"?n.levelSeparation>0&&(n.levelSeparation*=-1):n.levelSeparation<0&&(n.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(r);if(a===!0)return this.body.emitter.emit("refresh"),$e(r,this.optionsBackup)}return r}},{key:"_resetRNG",value:function(e){this.initialRandomSeed=e,this._rng=Ll(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(e){if(this.options.hierarchical.enabled===!0){var r=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:r.enabled===void 0?!0:r.enabled,solver:"hierarchicalRepulsion"},r.enabled=r.enabled===void 0?!0:r.enabled,r.solver=r.solver||"barnesHut"):he(e.physics)==="object"?(r.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,r.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(r.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});var n=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:n};else{var a=e.edges.smooth;a.type!==void 0&&a.type!=="dynamic"&&(n=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:n,roundness:a.roundness===void 0?.5:a.roundness,forceDirection:a.forceDirection===void 0?!1:a.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",n)}return e}},{key:"positionInitially",value:function(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);for(var r=e.length+50,n=0;n<e.length;n++){var a=e[n],o=2*Math.PI*this._rng();a.x===void 0&&(a.x=r*Math.cos(o)),a.y===void 0&&(a.y=r*Math.sin(o))}}}},{key:"layoutNetwork",value:function(){if(this.options.hierarchical.enabled!==!0&&this.options.improvedLayout===!0){for(var e=this.body.nodeIndices,r=0,n=0;n<e.length;n++){var a=this.body.nodes[e[n]];a.predefinedPosition===!0&&(r+=1)}if(r<.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 c=e.length;e.length>u&&s<=o;){s+=1;var h=e.length;s%3===0?this.body.modules.clustering.clusterBridges(l):this.body.modules.clustering.clusterOutliers(l);var d=e.length;if(h==d&&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*c)})}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 f=70,v=0;v<e.length;v++){var g=this.body.nodes[e[v]];g.predefinedPosition===!1&&(g.x+=(.5-this._rng())*f,g.y+=(.5-this._rng())*f)}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}},{key:"_shiftToCenter",value:function(){for(var e=dt.getRangeCore(this.body.nodes,this.body.nodeIndices),r=dt.findCenter(e),n=0;n<this.body.nodeIndices.length;n++){var a=this.body.nodes[this.body.nodeIndices[n]];a.x-=r.x,a.y-=r.y}}},{key:"_declusterAll",value:function(){for(var e=!0;e===!0;){e=!1;for(var r=0;r<this.body.nodeIndices.length;r++)this.body.nodes[this.body.nodeIndices[r]].isCluster===!0&&(e=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[r],{},!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,r,n=!1,a=!1;this.lastNodeOnLevel={},this.hierarchical=new L$e;for(r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&(e=this.body.nodes[r],e.options.level!==void 0?(n=!0,this.hierarchical.levels[r]=e.options.level):a=!0);if(a===!0&&n===!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,r=!1,n={},a=function(){for(var y=s(),m=0,_=0;_<y.length-1;_++){var S=y[_].max-y[_+1].min;m+=S+e.options.hierarchical.treeSpacing,o(_+1,m)}},o=function(y,m){var _=e.hierarchical.trees;for(var S in _)Object.prototype.hasOwnProperty.call(_,S)&&_[S]===y&&e.direction.shift(S,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 S=0;S<_.length;S++)$(e.body.nodes[_[S]],m)}},l=function(y){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,_=1e9,S=1e9,T=1e9,O=-1e9;for(var w in y)if(Object.prototype.hasOwnProperty.call(y,w)){var E=e.body.nodes[w],A=e.hierarchical.levels[E.id],H=e.direction.getPosition(E),B=e._getSpaceAroundNode(E,y),X=xe(B,2),re=X[0],te=X[1];_=Math.min(re,_),S=Math.min(te,S),A<=m&&(T=Math.min(H,T),O=Math.max(H,O))}return[T,O,_,S]},c=function(y,m){var _=e.hierarchical.getMaxLevel(y.id),S=e.hierarchical.getMaxLevel(m.id);return Math.min(_,S)},h=function(y,m,_){for(var S=e.hierarchical,T=0;T<m.length;T++){var O=m[T],w=S.distributionOrdering[O];if(w.length>1)for(var E=0;E<w.length-1;E++){var A=w[E],H=w[E+1];S.hasSameParent(A,H)&&S.inSameSubNetwork(A,H)&&y(A,H,_)}}},d=function(y,m){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,S=e.direction.getPosition(y),T=e.direction.getPosition(m),O=Math.abs(T-S),w=e.options.hierarchical.nodeSpacing;if(O>w){var E={},A={};u(y,E),u(m,A);var H=c(y,m),B=l(E,H),X=l(A,H),re=B[1],te=X[0],le=X[2],we=Math.abs(re-te);if(we>w){var Oe=re-te+w;Oe<-le+w&&(Oe=-le+w),Oe<0&&(e._shiftBlock(m.id,Oe),r=!0,_===!0&&e._centerParent(m))}}},f=function(y,m){for(var _=m.id,S=m.edges,T=e.hierarchical.levels[m.id],O=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,w={},E=[],A=0;A<S.length;A++){var H=S[A];if(H.toId!=H.fromId){var B=H.toId==_?H.from:H.to;w[S[A].id]=B,e.hierarchical.levels[B.id]<T&&E.push(H)}}var X=function(rt,_e){for(var Ae=0,R=0;R<_e.length;R++)if(w[_e[R].id]!==void 0){var k=e.direction.getPosition(w[_e[R].id])-rt;Ae+=k/Math.sqrt(k*k+O)}return Ae},re=function(rt,_e){for(var Ae=0,R=0;R<_e.length;R++)if(w[_e[R].id]!==void 0){var k=e.direction.getPosition(w[_e[R].id])-rt;Ae-=O*Math.pow(k*k+O,-1.5)}return Ae},te=function(rt,_e){for(var Ae=e.direction.getPosition(m),R={},k=0;k<rt;k++){var D=X(Ae,_e),L=re(Ae,_e),G=40,Y=Math.max(-G,Math.min(G,Math.round(D/L)));if(Ae=Ae-Y,R[Ae]!==void 0)break;R[Ae]=k}return Ae},le=function(rt){var _e=e.direction.getPosition(m);if(n[m.id]===void 0){var Ae={};u(m,Ae),n[m.id]=Ae}var R=l(n[m.id]),k=R[2],D=R[3],L=rt-_e,G=0;L>0?G=Math.min(L,D-e.options.hierarchical.nodeSpacing):L<0&&(G=-Math.min(-L,k-e.options.hierarchical.nodeSpacing)),G!=0&&(e._shiftBlock(m.id,G),r=!0)},we=function(rt){var _e=e.direction.getPosition(m),Ae=e._getSpaceAroundNode(m),R=xe(Ae,2),k=R[0],D=R[1],L=rt-_e,G=_e;L>0?G=Math.min(_e+(D-e.options.hierarchical.nodeSpacing),rt):L<0&&(G=Math.max(_e-(k-e.options.hierarchical.nodeSpacing),rt)),G!==_e&&(e.direction.setPosition(m,G),r=!0)},Oe=te(y,E);le(Oe),Oe=te(y,S),we(Oe)},v=function(y){var m=e.hierarchical.getLevels();m=An(m).call(m);for(var _=0;_<y;_++){r=!1;for(var S=0;S<m.length;S++)for(var T=m[S],O=e.hierarchical.distributionOrdering[T],w=0;w<O.length;w++)f(1e3,O[w]);if(r!==!0)break}},g=function(y){var m=e.hierarchical.getLevels();m=An(m).call(m);for(var _=0;_<y&&(r=!1,h(d,m,!0),r===!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=An(y).call(y);for(var m=0;m<y.length;m++)for(var _=y[m],S=e.hierarchical.distributionOrdering[_],T=0;T<S.length;T++)e._centerParent(S[T])};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,r){var n=!0;r===void 0&&(n=!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,c=1e9;if(o!==0){var h=u[o-1];if(n===!0&&r[h.id]===void 0||n===!1){var d=this.direction.getPosition(h);l=s-d}}if(o!=u.length-1){var f=u[o+1];if(n===!0&&r[f.id]===void 0||n===!1){var v=this.direction.getPosition(f);c=Math.min(c,v-s)}}return[l,c]}else return[0,0]}},{key:"_centerParent",value:function(e){if(this.hierarchical.parentReference[e.id])for(var r=this.hierarchical.parentReference[e.id],n=0;n<r.length;n++){var a=r[n],o=this.body.nodes[a],s=this.hierarchical.childrenReference[a];if(s!==void 0){var u=this._getCenterPosition(s),l=this.direction.getPosition(o),c=this._getSpaceAroundNode(o),h=xe(c,2),d=h[0],f=h[1],v=l-u;(v<0&&Math.abs(v)<f-this.options.hierarchical.nodeSpacing||v>0&&Math.abs(v)<d-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(o,u)}}}},{key:"_placeNodesByHierarchy",value:function(e){this.positionedNodes={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n,a=Te(e[r]);a=this._indexArrayToNodes(a),td(n=this.direction).call(n,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,c=l*o;o>0&&(c=this.direction.getPosition(a[s-1])+l),this.direction.setPosition(u,c,r),this._validatePositionAndContinue(u,r,c),o++}}}}},{key:"_placeBranchNodes",value:function(e,r){var n,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]]);td(n=this.direction).call(n,o);for(var u=0;u<o.length;u++){var l=o[u],c=this.hierarchical.levels[l.id];if(c>r&&this.positionedNodes[l.id]===void 0){var h=this.options.hierarchical.nodeSpacing,d=void 0;u===0?d=this.direction.getPosition(this.body.nodes[e]):d=this.direction.getPosition(o[u-1])+h,this.direction.setPosition(l,d,c),this._validatePositionAndContinue(l,c,d)}else return}var f=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[e],f,r)}}},{key:"_validatePositionAndContinue",value:function(e,r,n){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[r]!==void 0){var a=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[r]]);if(n-a<this.options.hierarchical.nodeSpacing){var o=a+this.options.hierarchical.nodeSpacing-n,s=this._findCommonParent(this.lastNodeOnLevel[r],e.id);this._shiftBlock(s.withChild,o)}}this.lastNodeOnLevel[r]=e.id,this.positionedNodes[e.id]=!0,this._placeBranchNodes(e.id,r)}}},{key:"_indexArrayToNodes",value:function(e){for(var r=[],n=0;n<e.length;n++)r.push(this.body.nodes[e[n]]);return r}},{key:"_getDistribution",value:function(){var e={},r,n;for(r in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,r)){n=this.body.nodes[r];var a=this.hierarchical.levels[r]===void 0?0:this.hierarchical.levels[r];this.direction.fix(n,a),e[a]===void 0&&(e[a]={}),e[a][r]=n}return e}},{key:"_getActiveEdges",value:function(e){var r=this,n=[];return ee(e.edges,function(a){var o;ae(o=r.body.edgeIndices).call(o,a.id)!==-1&&n.push(a)}),n}},{key:"_getHubSizes",value:function(){var e=this,r={},n=this.body.nodeIndices;ee(n,function(o){var s=e.body.nodes[o],u=e._getActiveEdges(s).length;r[u]=!0});var a=[];return ee(r,function(o){a.push(Number(o))}),td(f_).call(f_,a,function(o,s){return s-o}),a}},{key:"_determineLevelsByHubsize",value:function(){for(var e=this,r=function(l,c){e.hierarchical.levelDownstream(l,c)},n=this._getHubSizes(),a=function(){var l=n[o];if(l===0)return"break";ee(e.body.nodeIndices,function(c){var h=e.body.nodes[c];l===e._getActiveEdges(h).length&&e._crawlNetwork(r,c)})},o=0;o<n.length;++o){var s=a();if(s==="break")break}}},{key:"_determineLevelsCustomCallback",value:function(){var e=this,r=1e5,n=function(s,u,l){},a=function(s,u,l){var c=e.hierarchical.levels[s.id];c===void 0&&(c=e.hierarchical.levels[s.id]=r);var h=n(dt.cloneOptions(s,"node"),dt.cloneOptions(u,"node"),dt.cloneOptions(l,"edge"));e.hierarchical.levels[u.id]=c+h};this._crawlNetwork(a),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_determineLevelsDirected",value:function(){var e,r=this,n=ZP(e=this.body.nodeIndices).call(e,function(a,o){return a.set(o,r.body.nodes[o]),a},new xP);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=B$e(n):this.hierarchical.levels=F$e(n),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_generateMap",value:function(){var e=this,r=function(a,o){e.hierarchical.levels[o.id]>e.hierarchical.levels[a.id]&&e.hierarchical.addRelation(a.id,o.id)};this._crawlNetwork(r),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){var e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},n=arguments.length>1?arguments[1]:void 0,a={},o=function d(f,v){if(a[f.id]===void 0){e.hierarchical.setTreeIndex(f,v),a[f.id]=!0;for(var g,b=e._getActiveEdges(f),p=0;p<b.length;p++){var $=b[p];$.connected===!0&&($.toId==f.id?g=$.from:g=$.to,f.id!=g.id&&(r(f,g,$),d(g,v)))}}};if(n===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 c=this.body.nodes[l];o(c,s),s+=1}}else{var h=this.body.nodes[n];if(h===void 0){console.error("Node not found:",n);return}o(h)}}},{key:"_shiftBlock",value:function(e,r){var n=this,a={},o=function s(u){if(!a[u]){a[u]=!0,n.direction.shift(u,r);var l=n.hierarchical.childrenReference[u];if(l!==void 0)for(var c=0;c<l.length;c++)s(l[c])}};o(e)}},{key:"_findCommonParent",value:function(e,r){var n=this,a={},o=function u(l,c){var h=n.hierarchical.parentReference[c];if(h!==void 0)for(var d=0;d<h.length;d++){var f=h[d];l[f]=!0,u(l,f)}},s=function u(l,c){var h=n.hierarchical.parentReference[c];if(h!==void 0)for(var d=0;d<h.length;d++){var f=h[d];if(l[f]!==void 0)return{foundParent:f,withChild:c};var v=u(l,f);if(v.foundParent!==null)return v}return{foundParent:null,withChild:c}};return o(a,e),s(a,r)}},{key:"setDirectionStrategy",value:function(){var e=this.options.hierarchical.direction==="UD"||this.options.hierarchical.direction==="DU";e?this.direction=new b$e(this):this.direction=new w$e(this)}},{key:"_getCenterPosition",value:function(e){for(var r=1e9,n=-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);r=Math.min(r,u),n=Math.max(n,u)}return .5*(r+n)}}]),t}();function z$e(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=H$e(t))||i&&t&&typeof t.length=="number"){e&&(t=e);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
99
|
+
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(t)},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 H$e(t,i){var e;if(t){if(typeof t=="string")return p_(t,i);var r=st(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ei(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return p_(t,i)}}function p_(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}var W$e=function(){function t(i,e,r,n){var a=this,o,s;N(this,t),this.body=i,this.canvas=e,this.selectionHandler=r,this.interactionHandler=n,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}},Le(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){a._clean()}),this.body.emitter.on("_dataChanged",C(o=this._restore).call(o,this)),this.body.emitter.on("_resetData",C(s=this._restore).call(s,this))}return F(t,[{key:"_restore",value:function(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}},{key:"setOptions",value:function(e,r,n){r!==void 0&&(r.locale!==void 0?this.options.locale=r.locale:this.options.locale=n.locale,r.locales!==void 0?this.options.locales=r.locales:this.options.locales=n.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,$e(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,r;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";var n=this.selectionHandler.getSelectedNodeCount(),a=this.selectionHandler.getSelectedEdgeCount(),o=n+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)),n===1&&typeof this.options.editNode=="function"?(u===!0?this._createSeperator(2):u=!0,this._createEditNodeButton(s)):a===1&&n===0&&this.options.editEdge!==!1&&(u===!0?this._createSeperator(3):u=!0,this._createEditEdgeButton(s)),o!==0&&(n>0&&this.options.deleteNode!==!1?(u===!0&&this._createSeperator(4),this._createDeleteButton(s)):n===0&&this.options.deleteEdge!==!1&&(u===!0&&this._createSeperator(4),this._createDeleteButton(s))),this._bindElementEvents(this.closeDiv,C(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",C(r=this.showManipulatorToolbar).call(r,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 r,n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,C(r=this.toggleEditMode).call(r,this))}this._temporaryBindEvent("click",C(e=this._performAddNode).call(e,this))}},{key:"editNode",value:function(){var e=this;this.editMode!==!0&&this.enableEditMode(),this._clean();var r=this.selectionHandler.getSelectedNodes()[0];if(r!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(r.isCluster!==!0){var n=$e({},r.options,!1);if(n.x=r.x,n.y=r.y,this.options.editNode.length===2)this.options.editNode(n,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,r,n,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,C(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",C(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",C(r=this._finishConnect).call(r,this)),this._temporaryBindUI("onDrag",C(n=this._dragControlNode).call(n,this)),this._temporaryBindUI("onRelease",C(a=this._finishConnect).call(a,this)),this._temporaryBindUI("onDragStart",C(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",he(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 r,n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,C(r=this.toggleEditMode).call(r,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var a,o,s,u,l=this.body.edges[this.edgeBeingEditedId],c=this._getNewTargetNode(l.from.x,l.from.y),h=this._getNewTargetNode(l.to.x,l.to.y);this.temporaryIds.nodes.push(c.id),this.temporaryIds.nodes.push(h.id),this.body.nodes[c.id]=c,this.body.nodeIndices.push(c.id),this.body.nodes[h.id]=h,this.body.nodeIndices.push(h.id),this._temporaryBindUI("onTouch",C(a=this._controlNodeTouch).call(a,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",C(o=this._controlNodeDragStart).call(o,this)),this._temporaryBindUI("onDrag",C(s=this._controlNodeDrag).call(s,this)),this._temporaryBindUI("onDragEnd",C(u=this._controlNodeDragEnd).call(u,this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(d){var f=l.edgeType.findBorderPositions(d);c.selected===!1&&(c.x=f.from.x,c.y=f.from.y),h.selected===!1&&(h.x=f.to.x,h.y=f.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 r=this.selectionHandler.getSelectedNodeIds(),n=this.selectionHandler.getSelectedEdgeIds(),a=void 0;if(r.length>0){for(var o=0;o<r.length;o++)if(this.body.nodes[r[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 n.length>0&&typeof this.options.deleteEdge=="function"&&(a=this.options.deleteEdge);if(typeof a=="function"){var s={nodes:r,edges:n};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(n),this.body.data.nodes.getDataSet().remove(r),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,r;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(r=this.options.locales[this.options.locale])===null||r===void 0?void 0:r.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,r){var n=$e({},this.options.controlNodeStyle);n.id="targetNode"+Ba(),n.hidden=!1,n.physics=!1,n.x=e,n.y=r;var a=this.body.functions.createNode(n);return a.shape.boundingBox={left:e,right:e,top:r,bottom:r},a}},{key:"_createEditButton",value:function(){var e;this._clean(),this.manipulationDOM={},Ur(this.editModeDiv);var r=this.options.locales[this.options.locale],n=this._createButton("editMode","vis-edit vis-edit-mode",r.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(n),this._bindElementEvents(n,C(e=this.toggleEditMode).call(e,this))}},{key:"_clean",value:function(){this.inMode=!1,this.guiEnabled===!0&&(Ur(this.editModeDiv),Ur(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var e,r=z$e(Or(e=this._domEventListenerCleanupQueue).call(e,0)),n;try{for(r.s();!(n=r.n()).done;){var a=n.value;a()}}catch(o){r.e(o)}finally{r.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),Ur(this.manipulationDiv),Ur(this.editModeDiv),Ur(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 r,n=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,C(r=this.addNodeMode).call(r,this))}},{key:"_createAddEdgeButton",value:function(e){var r,n=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,C(r=this.addEdgeMode).call(r,this))}},{key:"_createEditNodeButton",value:function(e){var r,n=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,C(r=this.editNode).call(r,this))}},{key:"_createEditEdgeButton",value:function(e){var r,n=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,C(r=this.editEdgeMode).call(r,this))}},{key:"_createDeleteButton",value:function(e){var r,n;this.options.rtl?n="vis-delete-rtl":n="vis-delete";var a=this._createButton("delete",n,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(a),this._bindElementEvents(a,C(r=this.deleteSelected).call(r,this))}},{key:"_createBackButton",value:function(e){var r,n=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,C(r=this.showManipulatorToolbar).call(r,this))}},{key:"_createButton",value:function(e,r,n){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 "+r,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=a,this.manipulationDOM[e+"Label"].innerText=n,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,r){this.temporaryEventFunctions.push({event:e,boundFunction:r}),this.body.emitter.on(e,r)}},{key:"_temporaryBindUI",value:function(e,r){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=r;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+es(Te(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 r=this.temporaryEventFunctions[e].event,n=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(r,n)}this.temporaryEventFunctions=[]}},{key:"_bindElementEvents",value:function(e,r){var n=new ki(e,{});Wu(n,r),this._domEventListenerCleanupQueue.push(function(){n.destroy()});var a=function(s){var u=s.keyCode,l=s.key;(l==="Enter"||l===" "||u===13||u===32)&&r()};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 r;this.body.edges[this.temporaryIds.edges[e]].disconnect(),delete this.body.edges[this.temporaryIds.edges[e]];var n=ae(r=this.body.edgeIndices).call(r,this.temporaryIds.edges[e]);if(n!==-1){var a;Or(a=this.body.edgeIndices).call(a,n,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=Le({},this.body.view.translation)}},{key:"_controlNodeDragStart",value:function(){var e=this.lastTouch,r=this.selectionHandler._pointerToPositionObject(e),n=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=n.isOverlappingWith(r),u=a.isOverlappingWith(r);s===!0?(this.selectedControlNode=n,o.edgeType.from=n):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 r=this.body.functions.getPointer(e.center),n=this.canvas.DOMtoCanvas(r);this.selectedControlNode!==void 0?(this.selectedControlNode.x=n.x,this.selectedControlNode.y=n.y):this.interactionHandler.onDrag(e),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDragEnd",value:function(e){var r=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(r),a=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode!==void 0){this.selectionHandler.unselectAll();for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),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=Le({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var r=this.lastTouch,n=this.selectionHandler.getNodeAt(r);if(n!==void 0)if(n.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var a=this._getNewTargetNode(n.x,n.y);this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id);var o=this.body.functions.createEdge({id:"connectionEdge"+Ba(),from:n.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 r=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(r),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),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,r),this.temporaryIds.nodes[0]!==void 0){var c=this.body.nodes[this.temporaryIds.nodes[0]];c.x=this.canvas._XconvertDOMtoCanvas(r.x),c.y=this.canvas._YconvertDOMtoCanvas(r.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}},{key:"_finishConnect",value:function(e){var r=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(r),a=void 0;this.temporaryIds.edges[0]!==void 0&&(a=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var o=this.selectionHandler._getAllNodesOverlappingWith(n),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,r),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(e){var r=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,r,void 0,!0)}},{key:"_performAddNode",value:function(e){var r=this,n={id:Ba(),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(n,function(a){a!=null&&r.inMode==="addNode"&&r.body.data.nodes.getDataSet().add(a),r.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(n),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(e,r){var n=this,a={from:e,to:r};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(a,function(o){o!=null&&n.inMode==="addEdge"&&(n.body.data.edges.getDataSet().add(o),n.selectionHandler.unselectAll(),n.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,r){var n=this,a={id:this.edgeBeingEditedId,from:e,to:r,label:this.body.data.edges.get(this.edgeBeingEditedId).label},o=this.options.editEdge;if(he(o)==="object"&&(o=o.editWithoutDrag),typeof o=="function")if(o.length===2)o(a,function(s){s==null||n.inMode!=="editEdge"?(n.body.edges[a.id].updateEdgeType(),n.body.emitter.emit("_redraw"),n.showManipulatorToolbar()):(n.body.data.edges.getDataSet().update(s),n.selectionHandler.unselectAll(),n.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()}}]),t}(),M="string",I="boolean",x="number",Pa="array",W="object",ik="dom",V$e="any",id=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],ad={borderWidth:{number:x},borderWidthSelected:{number:x,undefined:"undefined"},brokenImage:{string:M,undefined:"undefined"},chosen:{label:{boolean:I,function:"function"},node:{boolean:I,function:"function"},__type__:{object:W,boolean:I}},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:x,undefined:"undefined"},fixed:{x:{boolean:I},y:{boolean:I},__type__:{object:W,boolean:I}},font:{align:{string:M},color:{string:M},size:{number:x},face:{string:M},background:{string:M},strokeWidth:{number:x},strokeColor:{string:M},vadjust:{number:x},multi:{boolean:I,string:M},bold:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},boldital:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},ital:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},mono:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},__type__:{object:W,string:M}},group:{string:M,number:x,undefined:"undefined"},heightConstraint:{minimum:{number:x},valign:{string:M},__type__:{object:W,boolean:I,number:x}},hidden:{boolean:I},icon:{face:{string:M},code:{string:M},size:{number:x},color:{string:M},weight:{string:M,number:x},__type__:{object:W}},id:{string:M,number:x},image:{selected:{string:M,undefined:"undefined"},unselected:{string:M,undefined:"undefined"},__type__:{object:W,string:M}},imagePadding:{top:{number:x},right:{number:x},bottom:{number:x},left:{number:x},__type__:{object:W,number:x}},label:{string:M,undefined:"undefined"},labelHighlightBold:{boolean:I},level:{number:x,undefined:"undefined"},margin:{top:{number:x},right:{number:x},bottom:{number:x},left:{number:x},__type__:{object:W,number:x}},mass:{number:x},physics:{boolean:I},scaling:{min:{number:x},max:{number:x},label:{enabled:{boolean:I},min:{number:x},max:{number:x},maxVisible:{number:x},drawThreshold:{number:x},__type__:{object:W,boolean:I}},customScalingFunction:{function:"function"},__type__:{object:W}},shadow:{enabled:{boolean:I},color:{string:M},size:{number:x},x:{number:x},y:{number:x},__type__:{object:W,boolean:I}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:I,array:Pa},borderRadius:{number:x},interpolation:{boolean:I},useImageSize:{boolean:I},useBorderWithImage:{boolean:I},coordinateOrigin:{string:["center","top-left"]},__type__:{object:W}},size:{number:x},title:{string:M,dom:ik,undefined:"undefined"},value:{number:x,undefined:"undefined"},widthConstraint:{minimum:{number:x},maximum:{number:x},__type__:{object:W,boolean:I,number:x}},x:{number:x},y:{number:x},__type__:{object:W}},U$e={configure:{enabled:{boolean:I},filter:{boolean:I,string:M,array:Pa,function:"function"},container:{dom:ik},showButton:{boolean:I},__type__:{object:W,boolean:I,string:M,array:Pa,function:"function"}},edges:{arrows:{to:{enabled:{boolean:I},scaleFactor:{number:x},type:{string:id},imageHeight:{number:x},imageWidth:{number:x},src:{string:M},__type__:{object:W,boolean:I}},middle:{enabled:{boolean:I},scaleFactor:{number:x},type:{string:id},imageWidth:{number:x},imageHeight:{number:x},src:{string:M},__type__:{object:W,boolean:I}},from:{enabled:{boolean:I},scaleFactor:{number:x},type:{string:id},imageWidth:{number:x},imageHeight:{number:x},src:{string:M},__type__:{object:W,boolean:I}},__type__:{string:["from","to","middle"],object:W}},endPointOffset:{from:{number:x},to:{number:x},__type__:{object:W,number:x}},arrowStrikethrough:{boolean:I},background:{enabled:{boolean:I},color:{string:M},size:{number:x},dashes:{boolean:I,array:Pa},__type__:{object:W,boolean:I}},chosen:{label:{boolean:I,function:"function"},edge:{boolean:I,function:"function"},__type__:{object:W,boolean:I}},color:{color:{string:M},highlight:{string:M},hover:{string:M},inherit:{string:["from","to","both"],boolean:I},opacity:{number:x},__type__:{object:W,string:M}},dashes:{boolean:I,array:Pa},font:{color:{string:M},size:{number:x},face:{string:M},background:{string:M},strokeWidth:{number:x},strokeColor:{string:M},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:x},multi:{boolean:I,string:M},bold:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},boldital:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},ital:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},mono:{color:{string:M},size:{number:x},face:{string:M},mod:{string:M},vadjust:{number:x},__type__:{object:W,string:M}},__type__:{object:W,string:M}},hidden:{boolean:I},hoverWidth:{function:"function",number:x},label:{string:M,undefined:"undefined"},labelHighlightBold:{boolean:I},length:{number:x,undefined:"undefined"},physics:{boolean:I},scaling:{min:{number:x},max:{number:x},label:{enabled:{boolean:I},min:{number:x},max:{number:x},maxVisible:{number:x},drawThreshold:{number:x},__type__:{object:W,boolean:I}},customScalingFunction:{function:"function"},__type__:{object:W}},selectionWidth:{function:"function",number:x},selfReferenceSize:{number:x},selfReference:{size:{number:x},angle:{number:x},renderBehindTheNode:{boolean:I},__type__:{object:W}},shadow:{enabled:{boolean:I},color:{string:M},size:{number:x},x:{number:x},y:{number:x},__type__:{object:W,boolean:I}},smooth:{enabled:{boolean:I},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:x},forceDirection:{string:["horizontal","vertical","none"],boolean:I},__type__:{object:W,boolean:I}},title:{string:M,undefined:"undefined"},width:{number:x},widthConstraint:{maximum:{number:x},__type__:{object:W,boolean:I,number:x}},value:{number:x,undefined:"undefined"},__type__:{object:W}},groups:{useDefaultGroups:{boolean:I},__any__:ad,__type__:{object:W}},interaction:{dragNodes:{boolean:I},dragView:{boolean:I},hideEdgesOnDrag:{boolean:I},hideEdgesOnZoom:{boolean:I},hideNodesOnDrag:{boolean:I},hover:{boolean:I},keyboard:{enabled:{boolean:I},speed:{x:{number:x},y:{number:x},zoom:{number:x},__type__:{object:W}},bindToWindow:{boolean:I},autoFocus:{boolean:I},__type__:{object:W,boolean:I}},multiselect:{boolean:I},navigationButtons:{boolean:I},selectable:{boolean:I},selectConnectedEdges:{boolean:I},hoverConnectedEdges:{boolean:I},tooltipDelay:{number:x},zoomView:{boolean:I},zoomSpeed:{number:x},__type__:{object:W}},layout:{randomSeed:{undefined:"undefined",number:x,string:M},improvedLayout:{boolean:I},clusterThreshold:{number:x},hierarchical:{enabled:{boolean:I},levelSeparation:{number:x},nodeSpacing:{number:x},treeSpacing:{number:x},blockShifting:{boolean:I},edgeMinimization:{boolean:I},parentCentralization:{boolean:I},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:W,boolean:I}},__type__:{object:W}},manipulation:{enabled:{boolean:I},initiallyActive:{boolean:I},addNode:{boolean:I,function:"function"},addEdge:{boolean:I,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:W,boolean:I,function:"function"}},deleteNode:{boolean:I,function:"function"},deleteEdge:{boolean:I,function:"function"},controlNodeStyle:ad,__type__:{object:W,boolean:I}},nodes:ad,physics:{enabled:{boolean:I},barnesHut:{theta:{number:x},gravitationalConstant:{number:x},centralGravity:{number:x},springLength:{number:x},springConstant:{number:x},damping:{number:x},avoidOverlap:{number:x},__type__:{object:W}},forceAtlas2Based:{theta:{number:x},gravitationalConstant:{number:x},centralGravity:{number:x},springLength:{number:x},springConstant:{number:x},damping:{number:x},avoidOverlap:{number:x},__type__:{object:W}},repulsion:{centralGravity:{number:x},springLength:{number:x},springConstant:{number:x},nodeDistance:{number:x},damping:{number:x},__type__:{object:W}},hierarchicalRepulsion:{centralGravity:{number:x},springLength:{number:x},springConstant:{number:x},nodeDistance:{number:x},damping:{number:x},avoidOverlap:{number:x},__type__:{object:W}},maxVelocity:{number:x},minVelocity:{number:x},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:I},iterations:{number:x},updateInterval:{number:x},onlyDynamicEdges:{boolean:I},fit:{boolean:I},__type__:{object:W,boolean:I}},timestep:{number:x},adaptiveTimestep:{boolean:I},wind:{x:{number:x},y:{number:x},__type__:{object:W}},__type__:{object:W,boolean:I}},autoResize:{boolean:I},clickToUse:{boolean:I},locale:{string:M},locales:{__any__:{any:V$e},__type__:{object:W}},height:{string:M},width:{string:M},__type__:{object:W}},ak={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]}}},G$e=function(i,e,r){var n;return!!(vr(i).call(i,"physics")&&vr(n=ak.physics.solver).call(n,e)&&r.physics.solver!==e&&e!=="wind")},K$e=function(){function t(){N(this,t)}return F(t,[{key:"getDistances",value:function(e,r,n){for(var a={},o=e.edges,s=0;s<r.length;s++){var u=r[s],l={};a[u]=l;for(var c=0;c<r.length;c++)l[r[c]]=s==c?0:1e9}for(var h=0;h<n.length;h++){var d=o[n[h]];d.connected===!0&&a[d.fromId]!==void 0&&a[d.toId]!==void 0&&(a[d.fromId][d.toId]=1,a[d.toId][d.fromId]=1)}for(var f=r.length,v=0;v<f;v++)for(var g=r[v],b=a[g],p=0;p<f-1;p++)for(var $=r[p],y=a[$],m=p+1;m<f;m++){var _=r[m],S=a[_],T=Math.min(y[_],y[g]+b[_]);y[_]=T,S[$]=T}return a}}]),t}(),q$e=function(){function t(i,e,r){N(this,t),this.body=i,this.springLength=e,this.springConstant=r,this.distanceSolver=new K$e}return F(t,[{key:"setOptions",value:function(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}},{key:"solve",value:function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=this.distanceSolver.getDistances(this.body,e,r);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)),c=5,h=1e9,d=0,f=0,v=0,g=0,b=0;h>o&&u<l;){u+=1;var p=this._getHighestEnergyNode(n),$=xe(p,4);for(d=$[0],h=$[1],f=$[2],v=$[3],g=h,b=0;g>s&&b<c;){b+=1,this._moveNode(d,f,v);var y=this._getEnergy(d),m=xe(y,3);g=m[0],f=m[1],v=m[2]}}}},{key:"_getHighestEnergyNode",value:function(e){for(var r=this.body.nodeIndices,n=this.body.nodes,a=0,o=r[0],s=0,u=0,l=0;l<r.length;l++){var c=r[l];if(n[c].predefinedPosition!==!0||n[c].isCluster===!0&&e===!0||n[c].options.fixed.x!==!0||n[c].options.fixed.y!==!0){var h=this._getEnergy(c),d=xe(h,3),f=d[0],v=d[1],g=d[2];a<f&&(a=f,o=c,s=v,u=g)}}return[o,a,s,u]}},{key:"_getEnergy",value:function(e){var r=xe(this.E_sums[e],2),n=r[0],a=r[1],o=Math.sqrt(Math.pow(n,2)+Math.pow(a,2));return[o,n,a]}},{key:"_moveNode",value:function(e,r,n){for(var a=this.body.nodeIndices,o=this.body.nodes,s=0,u=0,l=0,c=o[e].x,h=o[e].y,d=this.K_matrix[e],f=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,$=d[g],y=f[g],m=1/Math.pow(Math.pow(c-b,2)+Math.pow(h-p,2),1.5);s+=$*(1-y*Math.pow(h-p,2)*m),u+=$*(y*(c-b)*(h-p)*m),l+=$*(1-y*Math.pow(c-b,2)*m)}}var _=s,S=u,T=r,O=l,w=n,E=(T/_+w/S)/(S/_-O/S),A=-(S*E+T)/_;o[e].x+=A,o[e].y+=E,this._updateE_matrix(e)}},{key:"_createL_matrix",value:function(e){var r=this.body.nodeIndices,n=this.springLength;this.L_matrix=[];for(var a=0;a<r.length;a++){this.L_matrix[r[a]]={};for(var o=0;o<r.length;o++)this.L_matrix[r[a]][r[o]]=n*e[r[a]][r[o]]}}},{key:"_createK_matrix",value:function(e){var r=this.body.nodeIndices,n=this.springConstant;this.K_matrix=[];for(var a=0;a<r.length;a++){this.K_matrix[r[a]]={};for(var o=0;o<r.length;o++)this.K_matrix[r[a]][r[o]]=n*Math.pow(e[r[a]][r[o]],-2)}}},{key:"_createE_matrix",value:function(){var e=this.body.nodeIndices,r=this.body.nodes;this.E_matrix={},this.E_sums={};for(var n=0;n<e.length;n++)this.E_matrix[e[n]]=[];for(var a=0;a<e.length;a++){for(var o=e[a],s=r[o].x,u=r[o].y,l=0,c=0,h=a;h<e.length;h++){var d=e[h];if(d!==o){var f=r[d].x,v=r[d].y,g=1/Math.sqrt(Math.pow(s-f,2)+Math.pow(u-v,2));this.E_matrix[o][h]=[this.K_matrix[o][d]*(s-f-this.L_matrix[o][d]*(s-f)*g),this.K_matrix[o][d]*(u-v-this.L_matrix[o][d]*(u-v)*g)],this.E_matrix[d][a]=this.E_matrix[o][h],l+=this.E_matrix[o][h][0],c+=this.E_matrix[o][h][1]}}this.E_sums[o]=[l,c]}}},{key:"_updateE_matrix",value:function(e){for(var r=this.body.nodeIndices,n=this.body.nodes,a=this.E_matrix[e],o=this.K_matrix[e],s=this.L_matrix[e],u=n[e].x,l=n[e].y,c=0,h=0,d=0;d<r.length;d++){var f=r[d];if(f!==e){var v=a[d],g=v[0],b=v[1],p=n[f].x,$=n[f].y,y=1/Math.sqrt(Math.pow(u-p,2)+Math.pow(l-$,2)),m=o[f]*(u-p-s[f]*(u-p)*y),_=o[f]*(l-$-s[f]*(l-$)*y);a[d]=[m,_],c+=m,h+=_;var S=this.E_sums[f];S[0]+=m-g,S[1]+=_-b}}this.E_sums[e]=[c,h]}}]),t}();function z(t,i,e){var r,n,a,o,s=this;if(!(this instanceof z))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:$he,clickToUse:!1},Le(this.options,this.defaultOptions),this.body={container:t,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:C(r=this.on).call(r,this),off:C(n=this.off).call(n,this),emit:C(a=this.emit).call(a,this),once:C(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 _he(function(){return s.body.emitter.emit("_requestRedraw")}),this.groups=new Lde,this.canvas=new Pye(this.body),this.selectionHandler=new mme(this.body,this.canvas),this.interactionHandler=new Dye(this.body,this.canvas,this.selectionHandler),this.view=new Iye(this.body,this.canvas),this.renderer=new Eye(this.body,this.canvas),this.physics=new fye(this.body),this.layoutEngine=new j$e(this.body),this.clustering=new wye(this.body),this.manipulation=new W$e(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new qpe(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new nye(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new q$e(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(e),this.setData(i)}lT(z.prototype);z.prototype.setOptions=function(t){var i=this;if(t===null&&(t=void 0),t!==void 0){var e=Xce.validate(t,U$e);e===!0&&console.error("%cErrors have been found in the supplied options object.",vP);var r=["locale","locales","clickToUse"];if(va(r,this.options,t),t.locale!==void 0&&(t.locale=bhe(t.locales||this.options.locales,t.locale)),t=this.layoutEngine.setOptions(t.layout,t),this.canvas.setOptions(t),this.groups.setOptions(t.groups),this.nodesHandler.setOptions(t.nodes),this.edgesHandler.setOptions(t.edges),this.physics.setOptions(t.physics),this.manipulation.setOptions(t.manipulation,t,this.options),this.interactionHandler.setOptions(t.interaction),this.renderer.setOptions(t.interaction),this.selectionHandler.setOptions(t.interaction),t.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in t&&(this.configurator||(this.configurator=new qce(this,this.body.container,ak,this.canvas.pixelRatio,G$e)),this.configurator.setOptions(t.configure)),this.configurator&&this.configurator.options.enabled===!0){var n={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};$e(n.nodes,this.nodesHandler.options),$e(n.edges,this.edgesHandler.options),$e(n.layout,this.layoutEngine.options),$e(n.interaction,this.selectionHandler.options),$e(n.interaction,this.renderer.options),$e(n.interaction,this.interactionHandler.options),$e(n.manipulation,this.manipulation.options),$e(n.physics,this.physics.options),$e(n.global,this.canvas.options),$e(n.global,this.options),this.configurator.setModuleOptions(n)}t.clickToUse!==void 0?t.clickToUse===!0?this.activator===void 0&&(this.activator=new Kce(this.canvas.frame),this.activator.on("change",function(){i.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")}};z.prototype._updateVisibleIndices=function(){var t=this.body.nodes,i=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&!this.clustering._isClusteredNode(e)&&t[e].options.hidden===!1&&this.body.nodeIndices.push(t[e].id);for(var r in i)if(Object.prototype.hasOwnProperty.call(i,r)){var n=i[r],a=t[n.fromId],o=t[n.toId],s=a!==void 0&&o!==void 0,u=!this.clustering._isClusteredEdge(r)&&n.options.hidden===!1&&s&&a.options.hidden===!1&&o.options.hidden===!1;u&&this.body.edgeIndices.push(n.id)}};z.prototype.bindEventListeners=function(){var t=this;this.body.emitter.on("_dataChanged",function(){t.edgesHandler._updateState(),t.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",function(){t.clustering._updateState(),t._updateVisibleIndices(),t._updateValueRange(t.body.nodes),t._updateValueRange(t.body.edges),t.body.emitter.emit("startSimulation"),t.body.emitter.emit("_requestRedraw")})};z.prototype.setData=function(t){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),t&&t.dot&&(t.nodes||t.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(t&&t.options),t&&t.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 i=ohe(t.dot);this.setData(i);return}else if(t&&t.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=she(t.gephi);this.setData(e);return}else this.nodesHandler.setData(t&&t.nodes,!0),this.edgesHandler.setData(t&&t.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};z.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 t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&delete this.body.nodes[t];for(var i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&delete this.body.edges[i];Ur(this.body.container)};z.prototype._updateValueRange=function(t){var i,e=void 0,r=void 0,n=0;for(i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var a=t[i].getValue();a!==void 0&&(e=e===void 0?a:Math.min(a,e),r=r===void 0?a:Math.max(a,r),n+=a)}if(e!==void 0&&r!==void 0)for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&t[i].setValueRange(e,r,n)};z.prototype.isActive=function(){return!this.activator||this.activator.active};z.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};z.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};z.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};z.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};z.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};z.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};z.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};z.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};z.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};z.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};z.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};z.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};z.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};z.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};z.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};z.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};z.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};z.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};z.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};z.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};z.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};z.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};z.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};z.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};z.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};z.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};z.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};z.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};z.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};z.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};z.prototype.getConnectedNodes=function(t){return this.body.nodes[t]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};z.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};z.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};z.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};z.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};z.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};z.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};z.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};z.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};z.prototype.getNodeAt=function(){var t=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return t!==void 0&&t.id!==void 0?t.id:t};z.prototype.getEdgeAt=function(){var t=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return t!==void 0&&t.id!==void 0?t.id:t};z.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};z.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};z.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};z.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};z.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};z.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};z.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};z.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};z.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};z.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};z.prototype.getOptionsFromConfigurator=function(){var t={};return this.configurator&&(t=this.configurator.getOptions.apply(this.configurator)),t};const Y$e=ne("span",{op75:""},"Show pages",-1),X$e=ne("span",{op75:""},"Show layouts",-1),Q$e=ne("span",{op75:""},"Show workspace",-1),Z$e=ne("span",{op75:""},"Show node_modules",-1),J$e=ne("div",{"i-carbon-close":""},null,-1),ebe=ne("div",{"flex-auto":""},null,-1),tbe={relative:"","h-full":"","w-full":""},rbe=ne("div",{grid:"~ cols-[20px_1fr] items-center gap-y-1"},[ne("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-42b883":""}),ne("div",{op50:""}," Component "),ne("div",{"h-3":"","w-3":"","bg-hex-42b2b8":""}),ne("div",{op50:""}," Page "),ne("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 726 628","ml--1px":"","h-3":""},[ne("path",{fill:"#4256b8","stroke-width":"4",d:"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z"})]),ne("div",{op50:""}," Layout "),ne("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b4b842":""}),ne("div",{op50:""}," Library Component "),ne("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b86542":""}),ne("div",{op50:""}," Unknown ")],-1),nbe={key:0,p4:"",pr10:"",pt4:"",flex:"~ col gap4"},ibe=Ui({__name:"ComponentsGraph",props:{components:null},setup(t){const i=t,e=Ea(),r=Ea(),n=sk(),a=Ea(),o=uk(),s=lk(),u=ck(),l=hk(),{componentsGraphShowNodeModules:c,componentsGraphShowPages:h,componentsGraphShowLayouts:d,componentsGraphShowWorkspace:f}=y_(),v=Ea(),g=rn(()=>{const $=l.value||[];if(v.value){let y=function(_){!_||m.has(_)||(m.add(_),_.deps.forEach(S=>{y($.find(T=>T.id===S))}))};const m=new Set;return $.find(_=>_.id===a.value?.id),y(v.value),Array.from(m)}return $}),b=rn(()=>{const $=g.value.map(m=>{const _=i.components.find(A=>A.filePath===m.id),S=o.value?.find(A=>A.file===m.id),T=u.value?.find(A=>A.file===m.id),O=m.id.replace(/\?.*$/,"").replace(/\#.*$/,""),w=m.id.includes("/node_modules/")?"lib":_?"user":T?"layout":S?"page":"unknown";if(!c.value&&w==="lib"||!h.value&&w==="page"||!d.value&&w==="layout"||!f.value&&w==="user"&&s.value&&!m.id.startsWith(s.value.rootDir))return null;const E=w==="layout"?"hexagon":w==="page"?"square":"dot";return{id:m.id,label:O.split("/").splice(-1)[0].replace(/\.\w+$/,""),group:w,shape:E,size:15+Math.min(m.deps.length/2,8),font:{color:n.value==="dark"?"white":"black"},color:v.value?.id===m.id?"#82c742":void 0,extra:{id:m.id,component:_,page:S,layout:T,relationship:m}}}).filter(m=>!!m),y=g.value.flatMap(m=>m.deps.map(_=>({from:m.id,to:_,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:$,edges:y}});dk(()=>{const $={nodes:{shape:"dot",size:16},physics:{repulsion:{centralGravity:.7,springLength:100,springConstant:.01},maxVelocity:146,solver:"forceAtlas2Based",timestep:.35,stabilization:{enabled:!0,iterations:200}},groups:{user:{color:"#42b883"},unknown:{color:"#b86542"},lib:{color:"#b4b842"},page:{color:"#42b2b8"},layout:{color:"#4256b8"}}},y=new z(e.value,b.value,$);y.on("click",m=>{const _=m.nodes?.[0],S=b.value.nodes?.find(T=>T.id===_)?.extra;S&&(a.value=S)}),fk(b,()=>{y.setData(b.value)})});function p(){v.value=a.value?.relationship,a.value=void 0}return($,y)=>{const m=Sk,_=m_,S=vk,T=E_,O=pk,w=Tk;return fe(),lt(Vr,null,[Ve(_,{ref_key:"navbar",ref:r,absolute:"","left-0":"","right-0":"","top-0":""},{search:at(()=>[Ve(m,{modelValue:Z(h),"onUpdate:modelValue":y[0]||(y[0]=E=>Sa(h)?h.value=E:null),n:"primary sm"},{default:at(()=>[Y$e]),_:1},8,["modelValue"]),Ve(m,{modelValue:Z(d),"onUpdate:modelValue":y[1]||(y[1]=E=>Sa(d)?d.value=E:null),n:"primary sm"},{default:at(()=>[X$e]),_:1},8,["modelValue"]),Ve(m,{modelValue:Z(f),"onUpdate:modelValue":y[2]||(y[2]=E=>Sa(f)?f.value=E:null),n:"primary sm"},{default:at(()=>[Q$e]),_:1},8,["modelValue"]),Ve(m,{modelValue:Z(c),"onUpdate:modelValue":y[3]||(y[3]=E=>Sa(c)?c.value=E:null),n:"primary sm"},{default:at(()=>[Z$e]),_:1},8,["modelValue"]),Z(v)?(fe(),lt("button",{key:0,flex:"~ gap-1","items-center":"","rounded-full":"","bg-gray:20":"",py1:"",pl3:"",pr2:"","text-xs":"",op50:"","hover:op100":"",onClick:y[4]||(y[4]=E=>v.value=void 0)},[ja(" Clear filter "),J$e])):Qt("",!0),ebe,Vu($.$slots,"default")]),_:3},512),ne("div",tbe,[ne("div",{ref_key:"container",ref:e,"h-full":"","w-full":""},null,512),Ve(S,{absolute:"","bottom-3":"","left-3":"","border-0":"",p2:"",px3:"","text-sm":"","glass-effect":""},{default:at(()=>[rbe]),_:1}),Ve(w,{"model-value":!!(Z(a)&&Z(a).component),navbar:Z(r),"w-80":"",onClose:y[6]||(y[6]=E=>a.value=void 0)},{default:at(()=>[Z(a)&&Z(a).component?(fe(),lt("div",nbe,[Ve(T,{component:Z(a).component},null,8,["component"]),ne("div",null,[Ve(O,{n:"primary solid",onClick:y[5]||(y[5]=E=>p())},{default:at(()=>[ja(" Filter to this component ")]),_:1})])])):Qt("",!0)]),_:1},8,["model-value","navbar"])])],64)}}}),abe={hover:"bg-active",class:"group",flex:"~ gap2","w-full":"","items-center":"",rounded:"",px2:"",py1:""},obe={"hover:text-primary":""},sbe=Ui({__name:"ComponentItem",props:{component:null},setup(t){const i=t,e=rn(()=>i.component.filePath||i.component.file||i.component.__file||"");return(r,n)=>{const a=__,o=E_,s=gk("VDropdown"),u=$_,l=b_;return fe(),lt("div",abe,[Ve(s,null,{popper:at(()=>[Ve(o,{component:t.component,p4:""},null,8,["component"])]),default:at(()=>[ne("button",obe,[Ve(a,{component:t.component},null,8,["component"])])]),_:1}),t.component.global?(fe(),$t(u,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"runtime"})):Qt("",!0),Vu(r.$slots,"default"),Z(e)?(fe(),$t(l,{key:1,filepath:Z(e),"text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):Qt("",!0)])}}}),ube={pl4:""},lbe=Ui({__name:"ComponentsList",props:{components:null},setup(t){const i=t,e=Ea(""),r=rn(()=>new kk(i.components,{keys:["pascalName","filePath","kebabName"]})),n=rn(()=>{const a=[],o=new Map,s=[],u=[],l={user:0,lib:0,builtin:0,runtime:0};return(e.value?r.value.search(e.value).map(h=>h.item):i.components).forEach(h=>{if(h.filePath&&yk(h.filePath)){const d=mk(h.filePath);if(!d)return;d==="nuxt"?(s.push(h),l.builtin++):(o.has(d)||o.set(d,[]),o.get(d).push(h),l.lib++)}else h.global&&!h.filePath?(u.push(h),l.runtime++):(a.push(h),l.user++)}),{count:l,user:a,builtin:s,lib:o,runtime:u}});return(a,o)=>{const s=m_,u=sbe,l=xk,c=Pk;return fe(),lt(Vr,null,[Ve(s,{search:Z(e),"onUpdate:search":o[0]||(o[0]=h=>Sa(e)?e.value=h:null)},{actions:at(()=>[Vu(a.$slots,"default")]),_:3},8,["search"]),Z(n).user.length?(fe(),$t(l,{key:0,icon:"carbon-nominal",text:"User components",open:Z(n).user.length<=("DETAILS_MAX_ITEMS"in a?a.DETAILS_MAX_ITEMS:Z(jl)),description:`Total components: ${Z(n).count.user}`},{default:at(()=>[(fe(!0),lt(Vr,null,pa(Z(n).user,h=>(fe(),$t(u,{key:h.filePath,component:h},null,8,["component"]))),128))]),_:1},8,["open","description"])):Qt("",!0),Z(n).runtime.length?(fe(),$t(l,{key:1,icon:"carbon-load-balancer-global",open:Z(n).runtime.length<=("DETAILS_MAX_ITEMS"in a?a.DETAILS_MAX_ITEMS:Z(jl)),text:"Runtime components",description:`Total components: ${Z(n).count.runtime}`},{default:at(()=>[(fe(!0),lt(Vr,null,pa(Z(n).runtime,h=>(fe(),$t(u,{key:h.filePath,component:h},null,8,["component"]))),128))]),_:1},8,["open","description"])):Qt("",!0),Z(n).builtin.length?(fe(),$t(l,{key:2,icon:"simple-icons-nuxtdotjs",text:"Built-in components",description:`Total components: ${Z(n).count.builtin}`},{default:at(()=>[(fe(!0),lt(Vr,null,pa(Z(n).builtin,h=>(fe(),$t(u,{key:h.filePath,component:h},null,8,["component"]))),128))]),_:1},8,["description"])):Qt("",!0),Z(n).lib.size?(fe(),$t(l,{key:3,open:Z(n).count.lib<=("DETAILS_MAX_ITEMS"in a?a.DETAILS_MAX_ITEMS:Z(jl)),icon:"carbon-3d-mpr-toggle",text:"Components from libraries",description:`${Z(n).count.lib} components from ${Z(n).lib.size} packages`},{default:at(()=>[(fe(!0),lt(Vr,null,pa(Z(n).lib.entries(),([h,d])=>(fe(),lt("div",{key:h,"ml-2":""},[Ve(c,{text:`${h} (${d.length})`,py1:"",op50:""},null,8,["text"]),ne("div",ube,[(fe(!0),lt(Vr,null,pa(d,f=>(fe(),$t(u,{key:f.filePath,component:f},null,8,["component"]))),128))])]))),128))]),_:1},8,["open","description"])):Qt("",!0)],64)}}}),cbe={relative:"","h-full":"","of-auto":""},hbe={"flex-none":"",flex:"~ gap3"},Tbe=Ui({__name:"components",setup(t){const i=$k(),e=bk(),r=wk(),{componentsView:n}=y_();function a(){i.value?.inspector?.instance&&(i.value.inspector.enable(),e.push("/__inspecting"))}function o(){n.value=n.value==="list"?"graph":"list"}return(s,u)=>{const l=g_,c=Mk,h=Ek;return fe(),lt(Vr,null,[ne("div",cbe,[(fe(),$t(_k(Z(n)==="list"?lbe:ibe),{components:Z(r)},{default:at(()=>[ne("div",hbe,[Ve(l,{"text-lg":"",icon:Z(n)==="graph"?"i-carbon-list":"i-carbon-network-4",title:"Toggle view",onClick:o},null,8,["icon"]),Z(i)?.inspector?.instance?(fe(),$t(l,{key:0,"text-lg":"",icon:"i-carbon-select-window",title:"Inspect Vue components",onClick:a})):Qt("",!0)])]),_:1},8,["components"]))]),Ve(h,null,{default:at(()=>[Ve(c)]),_:1})],64)}}});export{Tbe as default};
|