@nuxt/devtools 0.7.4 → 0.7.6

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.
Files changed (138) hide show
  1. package/dist/chunks/module-main.mjs +29 -19
  2. package/dist/chunks/plugin-metrics.mjs +8 -1
  3. package/dist/chunks/vscode.mjs +1 -1
  4. package/dist/client/200.html +2 -2
  5. package/dist/client/404.html +2 -2
  6. package/dist/client/__blank/index.html +2 -2
  7. package/dist/client/_nuxt/Badge.f2e9b29c.js +1 -0
  8. package/dist/client/_nuxt/{CodeDiff.vue.1975732c.js → CodeDiff.vue.9b0b0885.js} +1 -1
  9. package/dist/client/_nuxt/ComposableItem.vue.3f961e9e.js +1 -0
  10. package/dist/client/_nuxt/DataSchemaButton.vue.a6df5cb8.js +1 -0
  11. package/dist/client/_nuxt/DataSchemaDrawer.be265d1e.js +998 -0
  12. package/dist/client/_nuxt/DrawerRight.vue.92472251.js +1 -0
  13. package/dist/client/_nuxt/{DurationDisplay.vue.383d5eee.js → DurationDisplay.vue.ebef3eee.js} +1 -1
  14. package/dist/client/_nuxt/FilepathItem.vue.a967b383.js +1 -0
  15. package/dist/client/_nuxt/HelpFab.vue.4d768974.js +1 -0
  16. package/dist/client/_nuxt/LaunchPage.vue.c2e514b2.js +1 -0
  17. package/dist/client/_nuxt/NCheckbox.vue.78fd8d82.js +1 -0
  18. package/dist/client/_nuxt/{NCodeBlock.cf3ce05b.css → NCodeBlock.6994516c.css} +1 -1
  19. package/dist/client/_nuxt/NCodeBlock.vue.c7ed33b1.js +2 -0
  20. package/dist/client/_nuxt/NDropdown.vue.c7f63cd6.js +1 -0
  21. package/dist/client/_nuxt/NIconTitle.vue.2f7c2128.js +1 -0
  22. package/dist/client/_nuxt/NLink.vue.3fcc5a37.js +1 -0
  23. package/dist/client/_nuxt/{NMarkdown.vue.b23e4e5a.js → NMarkdown.vue.e4405095.js} +1 -1
  24. package/dist/client/_nuxt/NSectionBlock.9c411590.js +1 -0
  25. package/dist/client/_nuxt/NSelect.vue.7a8edc85.js +1 -0
  26. package/dist/client/_nuxt/NSwitch.vue.defcd586.js +1 -0
  27. package/dist/client/_nuxt/NTip.vue.04791b31.js +1 -0
  28. package/dist/client/_nuxt/Navbar.vue.3fbf7ca0.js +1 -0
  29. package/dist/client/_nuxt/StateEditor.vue.01c203b9.js +1 -0
  30. package/dist/client/_nuxt/__blank.3dddd973.js +1 -0
  31. package/dist/client/_nuxt/analyze-build.3db956f4.js +1 -0
  32. package/dist/client/_nuxt/assets.634c950e.js +16 -0
  33. package/dist/client/_nuxt/{client.c408b851.js → client.d5aff798.js} +1 -1
  34. package/dist/client/_nuxt/{components.9c49e7de.js → components.e360f866.js} +28 -28
  35. package/dist/client/_nuxt/custom-_name_.95236ea5.js +1 -0
  36. package/dist/client/_nuxt/default.8f859e18.js +1 -0
  37. package/dist/client/_nuxt/entry.2ee3a83f.css +1 -0
  38. package/dist/client/_nuxt/entry.b81bf245.js +21 -0
  39. package/dist/client/_nuxt/{error-404.d45671ef.js → error-404.50ed5273.js} +1 -1
  40. package/dist/client/_nuxt/{error-500.ea2fb4de.js → error-500.3f0ba72e.js} +1 -1
  41. package/dist/client/_nuxt/full.778b4958.js +1 -0
  42. package/dist/client/_nuxt/hooks.22b55b1c.js +1 -0
  43. package/dist/client/_nuxt/{imports.7adc12e3.js → imports.2a0fb129.js} +1 -1
  44. package/dist/client/_nuxt/index.622264a3.js +1 -0
  45. package/dist/client/_nuxt/{index.3f214d8c.js → index.76729ecb.js} +2 -2
  46. package/dist/client/_nuxt/{json-editor-vue.eeb71636.js → json-editor-vue.58ea58a4.js} +1 -1
  47. package/dist/client/_nuxt/middleware.f7a35d95.js +1 -0
  48. package/dist/client/_nuxt/modules.15421639.js +2 -0
  49. package/dist/client/_nuxt/none.3d88124b.js +1 -0
  50. package/dist/client/_nuxt/open-graph.73aa4a70.js +3 -0
  51. package/dist/client/_nuxt/overview.0aabd2ca.js +1 -0
  52. package/dist/client/_nuxt/pages.7e22d9e3.js +1 -0
  53. package/dist/client/_nuxt/payload.cc8ba563.js +1 -0
  54. package/dist/client/_nuxt/plugins.b4d83e48.js +1 -0
  55. package/dist/client/_nuxt/runtime-configs.15955414.js +1 -0
  56. package/dist/client/_nuxt/server-routes.10f98ec2.js +9 -0
  57. package/dist/client/_nuxt/settings.b2b35d44.js +1 -0
  58. package/dist/client/_nuxt/{state-components.fb35f357.js → state-components.c65acb0d.js} +1 -1
  59. package/dist/client/_nuxt/state-modules.e0b57d1b.js +1 -0
  60. package/dist/client/_nuxt/storage-options.f095012b.js +1 -0
  61. package/dist/client/_nuxt/storage.81e195cf.js +1 -0
  62. package/dist/client/_nuxt/{terminals.38d91ba1.js → terminals.57b44373.js} +2 -2
  63. package/dist/client/_nuxt/timeline.e3f428d4.js +57 -0
  64. package/dist/client/_nuxt/{unocss-runtime.6378a150.js → unocss-runtime.2f2f07ae.js} +1 -1
  65. package/dist/client/_nuxt/virtual-files.02aedd29.js +1 -0
  66. package/dist/client/index.html +2 -2
  67. package/dist/client/modules/analyze-build/index.html +2 -2
  68. package/dist/client/modules/assets/index.html +2 -2
  69. package/dist/client/modules/components/index.html +2 -2
  70. package/dist/client/modules/hooks/index.html +2 -2
  71. package/dist/client/modules/imports/index.html +2 -2
  72. package/dist/client/modules/middleware/index.html +2 -2
  73. package/dist/client/modules/modules/index.html +2 -2
  74. package/dist/client/modules/open-graph/index.html +2 -2
  75. package/dist/client/modules/overview/index.html +2 -2
  76. package/dist/client/modules/pages/index.html +2 -2
  77. package/dist/client/modules/payload/index.html +2 -2
  78. package/dist/client/modules/plugins/index.html +2 -2
  79. package/dist/client/modules/runtime-configs/index.html +2 -2
  80. package/dist/client/modules/server-routes/index.html +2 -2
  81. package/dist/client/modules/storage/index.html +2 -2
  82. package/dist/client/modules/terminals/index.html +2 -2
  83. package/dist/client/modules/timeline/index.html +2 -2
  84. package/dist/client/modules/virtual-files/index.html +2 -2
  85. package/dist/client/settings/index.html +2 -2
  86. package/dist/module.json +1 -1
  87. package/dist/module.mjs +1 -1
  88. package/dist/runtime/function-metrics-helpers.mjs +17 -12
  89. package/dist/runtime/plugins/devtools.client.mjs +6 -1
  90. package/dist/runtime/plugins/view/Main.vue +107 -10
  91. package/dist/runtime/plugins/view/client.mjs +3 -2
  92. package/dist/runtime/plugins/view/state.mjs +2 -1
  93. package/dist/shared/{devtools.d198e7a9.mjs → devtools.6d7e3a3a.mjs} +4 -0
  94. package/dist/types.d.ts +1 -11
  95. package/package.json +20 -19
  96. package/dist/client/_nuxt/AuthRequiredPanel.vue.373351c6.js +0 -1
  97. package/dist/client/_nuxt/Badge.5dedc481.js +0 -1
  98. package/dist/client/_nuxt/CodeSnippets.vue.c208c49e.js +0 -1
  99. package/dist/client/_nuxt/ComposableItem.vue.3b5d164d.js +0 -1
  100. package/dist/client/_nuxt/DrawerRight.vue.3eebe7ce.js +0 -1
  101. package/dist/client/_nuxt/FilepathItem.vue.2c8f962b.js +0 -1
  102. package/dist/client/_nuxt/HelpFab.vue.5669a6ef.js +0 -1
  103. package/dist/client/_nuxt/LaunchPage.vue.8830d946.js +0 -1
  104. package/dist/client/_nuxt/NCheckbox.vue.c7e6efe4.js +0 -1
  105. package/dist/client/_nuxt/NCodeBlock.vue.5349dcfa.js +0 -2
  106. package/dist/client/_nuxt/NIconTitle.vue.d1cbff70.js +0 -1
  107. package/dist/client/_nuxt/NLink.vue.97d72812.js +0 -1
  108. package/dist/client/_nuxt/NSectionBlock.d7e62056.js +0 -1
  109. package/dist/client/_nuxt/NSelect.vue.3d6e8c84.js +0 -1
  110. package/dist/client/_nuxt/NSwitch.vue.998f2032.js +0 -1
  111. package/dist/client/_nuxt/NTip.vue.7456cfb7.js +0 -1
  112. package/dist/client/_nuxt/Navbar.vue.7ff60442.js +0 -1
  113. package/dist/client/_nuxt/StateEditor.vue.876e93dc.js +0 -1
  114. package/dist/client/_nuxt/__blank.09a1fa28.js +0 -1
  115. package/dist/client/_nuxt/analyze-build.c8285851.js +0 -1
  116. package/dist/client/_nuxt/assets.f1991486.js +0 -16
  117. package/dist/client/_nuxt/custom-_name_.d5995810.js +0 -1
  118. package/dist/client/_nuxt/default.baee4bce.js +0 -1
  119. package/dist/client/_nuxt/entry.74a1b1ba.js +0 -21
  120. package/dist/client/_nuxt/entry.b258ed6f.css +0 -1
  121. package/dist/client/_nuxt/full.cc98eb50.js +0 -1
  122. package/dist/client/_nuxt/hooks.07e855f0.js +0 -1
  123. package/dist/client/_nuxt/index.449a0025.js +0 -1
  124. package/dist/client/_nuxt/middleware.eb2b75b5.js +0 -1
  125. package/dist/client/_nuxt/modules.307b3d94.js +0 -2
  126. package/dist/client/_nuxt/none.c4d2ccfb.js +0 -1
  127. package/dist/client/_nuxt/open-graph.169f1c7d.js +0 -3
  128. package/dist/client/_nuxt/overview.4d55b1fb.js +0 -1
  129. package/dist/client/_nuxt/pages.7d288900.js +0 -1
  130. package/dist/client/_nuxt/payload.d64a004a.js +0 -1
  131. package/dist/client/_nuxt/plugins.a291917b.js +0 -1
  132. package/dist/client/_nuxt/runtime-configs.78dcb02a.js +0 -1
  133. package/dist/client/_nuxt/server-routes.c8bbbccf.js +0 -9
  134. package/dist/client/_nuxt/settings.dd6b6fef.js +0 -1
  135. package/dist/client/_nuxt/state-modules.b209a976.js +0 -1
  136. package/dist/client/_nuxt/storage.16132b2d.js +0 -1
  137. package/dist/client/_nuxt/timeline.da7dc20f.js +0 -57
  138. package/dist/client/_nuxt/virtual-files.b72a117a.js +0 -1
@@ -1,4 +1,4 @@
1
- import{o as fe,c as lt,a as ee,d as ja,g as Gi,m as rn,t as ok,s as Z,a2 as sk,b as Be,h as $t,v as Qt,Y as Vu,S as g_,r as Sa,a7 as uk,a8 as lk,a1 as ck,a9 as hk,aa as dk,ab as fk,w as qe,F as Vr,ac as y_,ad as vk,L as pi,k as pk,ae as gk,a5 as yk,af as mk,ag as $k,n as ga,ah as bk,ai as wk}from"./entry.74a1b1ba.js";import{_ as _k}from"./HelpFab.vue.5669a6ef.js";import{u as Ek,a as Sk}from"./state-components.fb35f357.js";import{_ as Ok}from"./NCheckbox.vue.c7e6efe4.js";import{_ as m_}from"./Navbar.vue.7ff60442.js";import{_ as $_}from"./Badge.5dedc481.js";import{_ as b_}from"./FilepathItem.vue.2c8f962b.js";import{_ as Tk}from"./DrawerRight.vue.3eebe7ce.js";import{_ as xk}from"./NSectionBlock.d7e62056.js";import{_ as Pk}from"./NIconTitle.vue.d1cbff70.js";import{D as jl}from"./constants.4e5eba24.js";const kk={class:"markdown-body"},Ik=ee("h1",null,"Components",-1),Ck=ee("p",null,[ja("Vue components under the "),ee("code",null,"components/"),ja(" directory are automatically registered and can be used in your templates without importing them.")],-1),Ak=ee("p",null,[ee("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Rk=[Ik,Ck,Ak],Dk={__name:"components",setup(t,{expose:i}){return i({frontmatter:{}}),(r,n)=>(fe(),lt("div",kk,Rk))}},Mk=/\d/,Nk=["-","_","/","."];function Fk(t=""){if(!Mk.test(t))return t.toUpperCase()===t}function Bk(t,i){const e=i??Nk,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=Fk(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 Lk(t){return t?t[0].toUpperCase()+t.slice(1):""}function w_(t){return t?(Array.isArray(t)?t:Bk(t)).map(i=>Lk(i)).join(""):""}const jk={"text-sm":"","font-mono":""},zk=ee("span",{mr1:"",op20:""},"<",-1),Hk=ee("span",{ml1:"",op20:""},"/>",-1),__=Gi({__name:"ComponentName",props:{component:{}},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",jk,[zk,ja(ok(Z(e)),1),Hk]))}}),Wk={flex:"~ col gap1","items-start":"","of-hidden":""},Vk={flex:"~ gap2"},E_=Gi({__name:"ComponentDetails",props:{component:{}},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=sk();return(a,o)=>{const s=__,u=g_,l=$_,c=b_;return fe(),lt("div",Wk,[ee("div",Vk,[Be(s,{component:a.component},null,8,["component"]),Be(u,{title:"Copy name","flex-none":"",icon:"carbon-copy",onClick:o[0]||(o[0]=h=>Z(n)(`<${Z(e)}></${Z(e)}>`))}),a.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)]),ee("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")])}}});/**
1
+ import{o as fe,m as lt,k as ee,v as ja,d as Gi,a as rn,t as sk,f as Z,e as uk,i as Be,h as $t,p as Qt,a5 as Vu,_ as y_,r as Sa,af as lk,ag as ck,a7 as hk,ah as dk,ai as fk,w as vk,j as qe,F as Vr,aj as m_,ak as pk,l as pi,C as gk,al as yk,ad as mk,am as $k,an as bk,n as ga,ao as wk,a9 as _k,ap as Ek,H as Cy}from"./entry.b81bf245.js";import{_ as Sk}from"./HelpFab.vue.4d768974.js";import{u as Ok,a as Tk}from"./state-components.c65acb0d.js";import{_ as xk}from"./NCheckbox.vue.78fd8d82.js";import{_ as $_}from"./Navbar.vue.3fbf7ca0.js";import{_ as b_}from"./Badge.f2e9b29c.js";import{_ as w_}from"./FilepathItem.vue.a967b383.js";import{_ as Pk}from"./DrawerRight.vue.92472251.js";import{_ as kk}from"./NSectionBlock.9c411590.js";import{_ as Ik}from"./NIconTitle.vue.2f7c2128.js";import{D as jl}from"./constants.4e5eba24.js";const Ck={class:"markdown-body"},Ak=ee("h1",null,"Components",-1),Rk=ee("p",null,[ja("Vue components under the "),ee("code",null,"components/"),ja(" directory are automatically registered and can be used in your templates without importing them.")],-1),Dk=ee("p",null,[ee("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Mk=[Ak,Rk,Dk],Nk={__name:"components",setup(t,{expose:i}){return i({frontmatter:{}}),(r,n)=>(fe(),lt("div",Ck,Mk))}},Fk=/\d/,Bk=["-","_","/","."];function Lk(t=""){if(!Fk.test(t))return t.toUpperCase()===t}function jk(t,i){const e=i??Bk,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=Lk(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 zk(t){return t?t[0].toUpperCase()+t.slice(1):""}function __(t){return t?(Array.isArray(t)?t:jk(t)).map(i=>zk(i)).join(""):""}const Hk={"text-sm":"","font-mono":""},Wk=ee("span",{mr1:"",op20:""},"<",-1),Vk=ee("span",{ml1:"",op20:""},"/>",-1),E_=Gi({__name:"ComponentName",props:{component:{}},setup(t){const i=t,e=rn(()=>i.component.pascalName||__(i.component.name||i.component.__name||i.component.kebabName||""));return(r,n)=>(fe(),lt("code",Hk,[Wk,ja(sk(Z(e)),1),Vk]))}}),Uk={flex:"~ col gap1","items-start":"","of-hidden":""},Gk={flex:"~ gap2"},S_=Gi({__name:"ComponentDetails",props:{component:{}},setup(t){const i=t,e=rn(()=>i.component.pascalName||__(i.component.name||i.component.__name||i.component.kebabName||"")),r=rn(()=>i.component.filePath||i.component.file||i.component.__file||""),n=uk();return(a,o)=>{const s=E_,u=y_,l=b_,c=w_;return fe(),lt("div",Uk,[ee("div",Gk,[Be(s,{component:a.component},null,8,["component"]),Be(u,{title:"Copy name","flex-none":"",icon:"carbon-copy",onClick:o[0]||(o[0]=h=>Z(n)(`<${Z(e)}></${Z(e)}>`))}),a.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)]),ee("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
2
  * vis-data
3
3
  * http://visjs.org/
4
4
  *
@@ -22,20 +22,20 @@ import{o as fe,c as lt,a as ee,d as ja,g as Gi,m as rn,t as ok,s as Z,a2 as sk,b
22
22
  * http://opensource.org/licenses/MIT
23
23
  *
24
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={},Uk={get exports(){return hu},set exports(t){hu=t}},od={},Gk={get exports(){return od},set exports(t){od=t}},sd={},Kk={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}},qk=oe,oo=!qk(function(){var t=function(){}.bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),Yk=oo,S_=Function.prototype,Ay=S_.apply,Ry=S_.call,Ki=typeof Reflect=="object"&&Reflect.apply||(Yk?Ry.bind(Ay):function(){return Ry.apply(Ay,arguments)}),O_=oo,T_=Function.prototype,ud=T_.call,Xk=O_&&T_.bind.bind(ud,ud),de=O_?Xk:function(t){return function(){return ud.apply(t,arguments)}},x_=de,Qk=x_({}.toString),Zk=x_("".slice),Rr=function(t){return Zk(Qk(t),8,-1)},Jk=Rr,eI=de,Jp=function(t){if(Jk(t)==="Function")return eI(t)},ld=typeof document=="object"&&document.all,tI=typeof ld>"u"&&ld!==void 0,P_={all:ld,IS_HTMLDDA:tI},k_=P_,rI=k_.all,ke=k_.IS_HTMLDDA?function(t){return typeof t=="function"||t===rI}:function(t){return typeof t=="function"},Un={},nI=oe,Ue=!nI(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),iI=oo,ls=Function.prototype.call,Qe=iI?ls.bind(ls):function(){return ls.apply(ls,arguments)},so={},I_={}.propertyIsEnumerable,C_=Object.getOwnPropertyDescriptor,aI=C_&&!I_.call({1:2},1);so.f=aI?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}},oI=de,sI=oe,uI=Rr,zl=Object,lI=oI("".split),Gu=sI(function(){return!zl("z").propertyIsEnumerable(0)})?function(t){return uI(t)=="String"?lI(t,""):zl(t)}:zl,uo=function(t){return t==null},cI=uo,hI=TypeError,lo=function(t){if(cI(t))throw hI("Can't call method on "+t);return t},dI=Gu,fI=lo,rr=function(t){return dI(fI(t))},Dy=ke,A_=P_,vI=A_.all,Ze=A_.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:Dy(t)||t===vI}:function(t){return typeof t=="object"?t!==null:Dy(t)},ye={},Hl=ye,Wl=Pe,pI=ke,My=function(t){return pI(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]},gI=de,Ee=gI({}.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 qi=du,jy=qi,yI=oe,Yi=!!Object.getOwnPropertySymbols&&!yI(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&jy&&jy<41}),mI=Yi,D_=mI&&!Symbol.sham&&typeof Symbol.iterator=="symbol",$I=pt,bI=ke,wI=Ee,_I=D_,EI=Object,co=_I?function(t){return typeof t=="symbol"}:function(t){var i=$I("Symbol");return bI(i)&&wI(i.prototype,EI(t))},SI=String,Xi=function(t){try{return SI(t)}catch{return"Object"}},OI=ke,TI=Xi,xI=TypeError,xt=function(t){if(OI(t))return t;throw xI(TI(t)+" is not a function")},PI=xt,kI=uo,eg=function(t,i){var e=t[i];return kI(e)?void 0:PI(e)},Ul=Qe,Gl=ke,Kl=Ze,II=TypeError,CI=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 II("Can't convert object to primitive value")},nn={},AI={get exports(){return nn},set exports(t){nn=t}},RI=!0,zy=Pe,DI=Object.defineProperty,MI=function(t,i){try{DI(zy,t,{value:i,configurable:!0,writable:!0})}catch{zy[t]=i}return i},NI=Pe,FI=MI,Hy="__core-js_shared__",BI=NI[Hy]||FI(Hy,{}),tg=BI,Wy=tg;(AI.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 LI=lo,jI=Object,Pt=function(t){return jI(LI(t))},zI=de,HI=Pt,WI=zI({}.hasOwnProperty),He=Object.hasOwn||function(i,e){return WI(HI(i),e)},VI=de,UI=0,GI=Math.random(),KI=VI(1 .toString),Ku=function(t){return"Symbol("+(t===void 0?"":t)+")_"+KI(++UI+GI,36)},qI=Pe,YI=nn,Vy=He,XI=Ku,QI=Yi,ZI=D_,yi=qI.Symbol,ql=YI("wks"),JI=ZI?yi.for||yi:yi&&yi.withoutSetter||XI,Se=function(t){return Vy(ql,t)||(ql[t]=QI&&Vy(yi,t)?yi[t]:JI("Symbol."+t)),ql[t]},eC=Qe,Uy=Ze,Gy=co,tC=eg,rC=CI,nC=Se,iC=TypeError,aC=nC("toPrimitive"),oC=function(t,i){if(!Uy(t)||Gy(t))return t;var e=tC(t,aC),r;if(e){if(i===void 0&&(i="default"),r=eC(e,t,i),!Uy(r)||Gy(r))return r;throw iC("Can't convert object to primitive value")}return i===void 0&&(i="number"),rC(t,i)},sC=oC,uC=co,qu=function(t){var i=sC(t,"string");return uC(i)?i:i+""},lC=Pe,Ky=Ze,cd=lC.document,cC=Ky(cd)&&Ky(cd.createElement),rg=function(t){return cC?cd.createElement(t):{}},hC=Ue,dC=oe,fC=rg,M_=!hC&&!dC(function(){return Object.defineProperty(fC("div"),"a",{get:function(){return 7}}).a!=7}),vC=Ue,pC=Qe,gC=so,yC=Gn,mC=rr,$C=qu,bC=He,wC=M_,qy=Object.getOwnPropertyDescriptor;Un.f=vC?qy:function(i,e){if(i=mC(i),e=$C(e),wC)try{return qy(i,e)}catch{}if(bC(i,e))return yC(!pC(gC.f,i,e),i[e])};var _C=oe,EC=ke,SC=/#|\.prototype\./,ho=function(t,i){var e=TC[OC(t)];return e==PC?!0:e==xC?!1:EC(i)?_C(i):!!i},OC=ho.normalize=function(t){return String(t).replace(SC,".").toLowerCase()},TC=ho.data={},xC=ho.NATIVE="N",PC=ho.POLYFILL="P",N_=ho,Yy=Jp,kC=xt,IC=oo,CC=Yy(Yy.bind),hn=function(t,i){return kC(t),i===void 0?t:IC?CC(t,i):function(){return t.apply(i,arguments)}},At={},AC=Ue,RC=oe,F_=AC&&RC(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),DC=Ze,MC=String,NC=TypeError,Rt=function(t){if(DC(t))return t;throw NC(MC(t)+" is not an object")},FC=Ue,BC=M_,LC=F_,cs=Rt,Xy=qu,jC=TypeError,Yl=Object.defineProperty,zC=Object.getOwnPropertyDescriptor,Xl="enumerable",Ql="configurable",Zl="writable";At.f=FC?LC?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=zC(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),BC)try{return Yl(i,e,r)}catch{}if("get"in r||"set"in r)throw jC("Accessors not supported");return"value"in r&&(i[e]=r.value),i};var HC=Ue,WC=At,VC=Gn,Dr=HC?function(t,i,e){return WC.f(t,i,VC(1,e))}:function(t,i,e){return t[i]=e,t},hs=Pe,UC=Ki,GC=Jp,KC=ke,qC=Un.f,YC=N_,ii=ye,XC=hn,ai=Dr,Qy=He,QC=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 UC(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=YC(r?d:e+(n?".":"#")+d,t.forced),c=!l&&o&&Qy(o,d),v=s[d],c&&(t.dontCallGetSet?(p=qC(o,d),g=p&&p.value):g=o[d]),f=c&&g?g:i[d],!(c&&typeof v==typeof f)&&(t.bind&&c?b=XC(f,hs):t.wrap&&c?b=QC(f):a&&KC(f)?b=GC(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)))},ZC=U,JC=Ue,Zy=At.f;ZC({target:"Object",stat:!0,forced:Object.defineProperty!==Zy,sham:!JC},{defineProperty:Zy});var eA=ye,B_=eA.Object,tA=Kk.exports=function(i,e,r){return B_.defineProperty(i,e,r)};B_.defineProperty.sham&&(tA.sham=!0);var rA=sd,L_=rA,nA=L_,iA=nA,aA=iA,oA=aA;(function(t){t.exports=oA})(Gk);(function(t){t.exports=od})(Uk);var Yu=Q(hu),za={},sA={get exports(){return za},set exports(t){za=t}},hd={},uA={get exports(){return hd},set exports(t){hd=t}},lA=Rr,dn=Array.isArray||function(i){return lA(i)=="Array"},cA=Math.ceil,hA=Math.floor,dA=Math.trunc||function(i){var e=+i;return(e>0?hA:cA)(e)},fA=dA,Xu=function(t){var i=+t;return i!==i||i===0?0:fA(i)},vA=Xu,pA=Math.min,gA=function(t){return t>0?pA(vA(t),9007199254740991):0},yA=gA,Dt=function(t){return yA(t.length)},mA=TypeError,$A=9007199254740991,ng=function(t){if(t>$A)throw mA("Maximum allowed index exceeded");return t},bA=qu,wA=At,_A=Gn,Qi=function(t,i,e){var r=bA(i);r in t?wA.f(t,r,_A(0,e)):t[r]=e},EA=Se,SA=EA("toStringTag"),j_={};j_[SA]="z";var ig=String(j_)==="[object z]",OA=ig,TA=ke,Ks=Rr,xA=Se,PA=xA("toStringTag"),kA=Object,IA=Ks(function(){return arguments}())=="Arguments",CA=function(t,i){try{return t[i]}catch{}},Mr=OA?Ks:function(t){var i,e,r;return t===void 0?"Undefined":t===null?"Null":typeof(e=CA(i=kA(t),PA))=="string"?e:IA?Ks(i):(r=Ks(i))=="Object"&&TA(i.callee)?"Arguments":r},AA=de,RA=ke,dd=tg,DA=AA(Function.toString);RA(dd.inspectSource)||(dd.inspectSource=function(t){return DA(t)});var z_=dd.inspectSource,MA=de,NA=oe,H_=ke,FA=Mr,BA=pt,LA=z_,W_=function(){},jA=[],V_=BA("Reflect","construct"),ag=/^\s*(?:class|function)\b/,zA=MA(ag.exec),HA=!ag.exec(W_),ya=function(i){if(!H_(i))return!1;try{return V_(W_,jA,i),!0}catch{return!1}},U_=function(i){if(!H_(i))return!1;switch(FA(i)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return HA||!!zA(ag,LA(i))}catch{return!0}};U_.sham=!0;var Qu=!V_||NA(function(){var t;return ya(ya.call)||!ya(Object)||!ya(function(){t=!0})||t})?U_:ya,Jy=dn,WA=Qu,VA=Ze,UA=Se,GA=UA("species"),em=Array,KA=function(t){var i;return Jy(t)&&(i=t.constructor,WA(i)&&(i===em||Jy(i.prototype))?i=void 0:VA(i)&&(i=i[GA],i===null&&(i=void 0))),i===void 0?em:i},qA=KA,Zu=function(t,i){return new(qA(t))(i===0?0:i)},YA=oe,XA=Se,QA=qi,ZA=XA("species"),fo=function(t){return QA>=51||!YA(function(){var i=[],e=i.constructor={};return e[ZA]=function(){return{foo:1}},i[t](Boolean).foo!==1})},JA=U,eR=oe,tR=dn,rR=Ze,nR=Pt,iR=Dt,tm=ng,rm=Qi,aR=Zu,oR=fo,sR=Se,uR=qi,G_=sR("isConcatSpreadable"),lR=uR>=51||!eR(function(){var t=[];return t[G_]=!1,t.concat()[0]!==t}),cR=function(t){if(!rR(t))return!1;var i=t[G_];return i!==void 0?!!i:tR(t)},hR=!lR||!oR("concat");JA({target:"Array",proto:!0,arity:1,forced:hR},{concat:function(i){var e=nR(this),r=aR(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],cR(l))for(u=iR(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 dR=Mr,fR=String,yr=function(t){if(dR(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return fR(t)},Ju={},vR=Xu,pR=Math.max,gR=Math.min,vo=function(t,i){var e=vR(t);return e<0?pR(e+i,0):gR(e,i)},yR=rr,mR=vo,$R=Dt,nm=function(t){return function(i,e,r){var n=yR(i),a=$R(n),o=mR(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={},bR=de,Jl=He,wR=rr,_R=og.indexOf,ER=po,im=bR([].push),K_=function(t,i){var e=wR(t),r=0,n=[],a;for(a in e)!Jl(ER,a)&&Jl(e,a)&&im(n,a);for(;i.length>r;)Jl(e,a=i[r++])&&(~_R(n,a)||im(n,a));return n},sg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],SR=K_,OR=sg,go=Object.keys||function(i){return SR(i,OR)},TR=Ue,xR=F_,PR=At,kR=Rt,IR=rr,CR=go;Ju.f=TR&&!xR?Object.defineProperties:function(i,e){kR(i);for(var r=IR(e),n=CR(e),a=n.length,o=0,s;a>o;)PR.f(i,s=n[o++],r[s]);return i};var AR=pt,q_=AR("document","documentElement"),RR=nn,DR=Ku,am=RR("keys"),el=function(t){return am[t]||(am[t]=DR(t))},MR=Rt,NR=Ju,om=sg,FR=po,BR=q_,LR=rg,jR=el,sm=">",um="<",fd="prototype",vd="script",Y_=jR("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},zR=function(){var t=LR("iframe"),i="java"+vd+":",e;return t.style.display="none",BR.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):zR():lm(ds);for(var t=om.length;t--;)delete qs[fd][om[t]];return qs()};FR[Y_]=!0;var Kn=Object.create||function(i,e){var r;return i!==null?(ec[fd]=MR(i),r=new ec,ec[fd]=null,r[Y_]=i):r=qs(),e===void 0?r:NR.f(r,e)},yo={},HR=K_,WR=sg,VR=WR.concat("length","prototype");yo.f=Object.getOwnPropertyNames||function(i){return HR(i,VR)};var ug={},cm=vo,UR=Dt,GR=Qi,KR=Array,qR=Math.max,Q_=function(t,i,e){for(var r=UR(t),n=cm(i,r),a=cm(e===void 0?r:e,r),o=KR(qR(a-n,0)),s=0;n<a;n++,s++)GR(o,s,t[n]);return o.length=s,o},YR=Rr,XR=rr,Z_=yo.f,QR=Q_,J_=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],ZR=function(t){try{return Z_(t)}catch{return QR(J_)}};ug.f=function(i){return J_&&YR(i)=="Window"?ZR(i):Z_(XR(i))};var mo={};mo.f=Object.getOwnPropertySymbols;var JR=Dr,Zi=function(t,i,e,r){return r&&r.enumerable?t[i]=e:JR(t,i,e),t},eD=At,lg=function(t,i,e){return eD.f(t,i,e)},$o={},tD=Se;$o.f=tD;var hm=ye,rD=He,nD=$o,iD=At.f,Ie=function(t){var i=hm.Symbol||(hm.Symbol={});rD(i,t)||iD(i,t,{value:nD.f(t)})},aD=Qe,oD=pt,sD=Se,uD=Zi,eE=function(){var t=oD("Symbol"),i=t&&t.prototype,e=i&&i.valueOf,r=sD("toPrimitive");i&&!i[r]&&uD(i,r,function(n){return aD(e,this)},{arity:1})},lD=ig,cD=Mr,hD=lD?{}.toString:function(){return"[object "+cD(this)+"]"},dD=ig,fD=At.f,vD=Dr,pD=He,gD=hD,yD=Se,dm=yD("toStringTag"),qn=function(t,i,e,r){if(t){var n=e?t:t.prototype;pD(n,dm)||fD(n,dm,{configurable:!0,value:i}),r&&!dD&&vD(n,"toString",gD)}},mD=Pe,$D=ke,fm=mD.WeakMap,bD=$D(fm)&&/native code/.test(String(fm)),wD=bD,tE=Pe,_D=Ze,ED=Dr,tc=He,rc=tg,SD=el,OD=po,vm="Object already initialized",pd=tE.TypeError,TD=tE.WeakMap,fu,Ha,vu,xD=function(t){return vu(t)?Ha(t):fu(t,{})},PD=function(t){return function(i){var e;if(!_D(i)||(e=Ha(i)).type!==t)throw pd("Incompatible receiver, "+t+" required");return e}};if(wD||rc.state){var or=rc.state||(rc.state=new TD);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=SD("state");OD[oi]=!0,fu=function(t,i){if(tc(t,oi))throw pd(vm);return i.facade=t,ED(t,oi,i),i},Ha=function(t){return tc(t,oi)?t[oi]:{}},vu=function(t){return tc(t,oi)}}var Ji={set:fu,get:Ha,has:vu,enforce:xD,getterFor:PD},kD=hn,ID=de,CD=Gu,AD=Pt,RD=Dt,DD=Zu,pm=ID([].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=AD(u),f=CD(d),v=kD(l,c),g=RD(f),b=0,p=h||DD,$=i?p(u,g):e||o?p(u,0):void 0,m,y;g>b;b++)if((s||b in f)&&(m=f[b],y=v(m,b,d),t))if(i)$[b]=y;else if(y)switch(t){case 3:return!0;case 5:return m;case 6:return b;case 2:pm($,m)}else switch(t){case 4:return!1;case 7:pm($,m)}return a?-1:r||n?n:$}},ea={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=Qe,MD=de,Ai=Ue,Ri=Yi,ND=oe,Ye=He,FD=Ee,gd=Rt,rl=rr,dg=qu,BD=yr,yd=Gn,Wa=Kn,rE=go,LD=yo,nE=ug,jD=mo,iE=Un,aE=At,zD=Ju,oE=so,gm=Zi,HD=lg,fg=nn,WD=el,sE=po,ym=Ku,VD=Se,UD=$o,GD=Ie,KD=eE,qD=qn,uE=Ji,nl=ea.forEach,wt=WD("hidden"),il="Symbol",Va="prototype",YD=uE.set,mm=uE.getterFor(il),Zt=Object[Va],Pn=cg.Symbol,Oa=Pn&&Pn[Va],XD=cg.TypeError,nc=cg.QObject,lE=iE.f,_n=aE.f,cE=nE.f,QD=oE.f,hE=MD([].push),kr=fg("symbols"),bo=fg("op-symbols"),ZD=fg("wks"),md=!nc||!nc[Va]||!nc[Va].findChild,$d=Ai&&ND(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 YD(e,{type:il,tag:t,description:i}),Ai||(e.description=i),e},al=function(i,e,r){i===Zt&&al(bo,e,r),gd(i);var n=dg(e);return gd(r),Ye(kr,n)?(r.enumerable?(Ye(i,wt)&&i[wt][n]&&(i[wt][n]=!1),r=Wa(r,{enumerable:yd(0,!1)})):(Ye(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){(!Ai||hg(dE,r,a))&&al(i,a,r[a])}),i},JD=function(i,e){return e===void 0?Wa(i):vg(Wa(i),e)},dE=function(i){var e=dg(i),r=hg(QD,this,e);return this===Zt&&Ye(kr,e)&&!Ye(bo,e)?!1:r||!Ye(this,e)||!Ye(kr,e)||Ye(this,wt)&&this[wt][e]?r:!0},fE=function(i,e){var r=rl(i),n=dg(e);if(!(r===Zt&&Ye(kr,n)&&!Ye(bo,n))){var a=lE(r,n);return a&&Ye(kr,n)&&!(Ye(r,wt)&&r[wt][n])&&(a.enumerable=!0),a}},vE=function(i){var e=cE(rl(i)),r=[];return nl(e,function(n){!Ye(kr,n)&&!Ye(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){Ye(kr,n)&&(!i||Ye(Zt,n))&&hE(r,kr[n])}),r};Ri||(Pn=function(){if(FD(Oa,this))throw XD("Symbol is not a constructor");var i=!arguments.length||arguments[0]===void 0?void 0:BD(arguments[0]),e=ym(i),r=function(n){this===Zt&&hg(r,bo,n),Ye(this,wt)&&Ye(this[wt],e)&&(this[wt][e]=!1),$d(this,e,yd(1,n))};return Ai&&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,zD.f=vg,iE.f=fE,LD.f=nE.f=vE,jD.f=pE,UD.f=function(t){return ic(VD(t),t)},Ai&&HD(Oa,"description",{configurable:!0,get:function(){return mm(this).description}}));tl({global:!0,constructor:!0,wrap:!0,forced:!Ri,sham:!Ri},{Symbol:Pn});nl(rE(ZD),function(t){GD(t)});tl({target:il,stat:!0,forced:!Ri},{useSetter:function(){md=!0},useSimple:function(){md=!1}});tl({target:"Object",stat:!0,forced:!Ri,sham:!Ai},{create:JD,defineProperty:al,defineProperties:vg,getOwnPropertyDescriptor:fE});tl({target:"Object",stat:!0,forced:!Ri},{getOwnPropertyNames:vE});KD();qD(Pn,il);sE[wt]=!0;var eM=Yi,gE=eM&&!!Symbol.for&&!!Symbol.keyFor,tM=U,rM=pt,nM=He,iM=yr,yE=nn,aM=gE,ac=yE("string-to-symbol-registry"),oM=yE("symbol-to-string-registry");tM({target:"Symbol",stat:!0,forced:!aM},{for:function(t){var i=iM(t);if(nM(ac,i))return ac[i];var e=rM("Symbol")(i);return ac[i]=e,oM[e]=i,e}});var sM=U,uM=He,lM=co,cM=Xi,hM=nn,dM=gE,$m=hM("symbol-to-string-registry");sM({target:"Symbol",stat:!0,forced:!dM},{keyFor:function(i){if(!lM(i))throw TypeError(cM(i)+" is not a symbol");if(uM($m,i))return $m[i]}});var fM=de,wo=fM([].slice),vM=de,bm=dn,pM=ke,wm=Rr,gM=yr,_m=vM([].push),yM=function(t){if(pM(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,gM(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}}},mM=U,mE=pt,$E=Ki,$M=Qe,_o=de,bE=oe,Em=ke,Sm=co,wE=wo,bM=yM,wM=Yi,_M=String,Qr=mE("JSON","stringify"),fs=_o(/./.exec),Om=_o("".charAt),EM=_o("".charCodeAt),SM=_o("".replace),OM=_o(1 .toString),TM=/[\uD800-\uDFFF]/g,Tm=/^[\uD800-\uDBFF]$/,xm=/^[\uDC00-\uDFFF]$/,Pm=!wM||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"'}),xM=function(t,i){var e=wE(arguments),r=bM(i);if(!(!Em(r)&&(t===void 0||Sm(t))))return e[1]=function(n,a){if(Em(r)&&(a=$M(r,this,_M(n),a)),!Sm(a))return a},$E(Qr,null,e)},PM=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"+OM(EM(t,0),16):t};Qr&&mM({target:"JSON",stat:!0,arity:3,forced:Pm||km},{stringify:function(i,e,r){var n=wE(arguments),a=$E(Pm?xM:Qr,null,n);return km&&typeof a=="string"?SM(a,TM,PM):a}});var kM=U,IM=Yi,CM=oe,_E=mo,AM=Pt,RM=!IM||CM(function(){_E.f(1)});kM({target:"Object",stat:!0,forced:RM},{getOwnPropertySymbols:function(i){var e=_E.f;return e?e(AM(i)):[]}});var DM=Ie;DM("asyncIterator");var MM=Ie;MM("hasInstance");var NM=Ie;NM("isConcatSpreadable");var FM=Ie;FM("iterator");var BM=Ie;BM("match");var LM=Ie;LM("matchAll");var jM=Ie;jM("replace");var zM=Ie;zM("search");var HM=Ie;HM("species");var WM=Ie;WM("split");var VM=Ie,UM=eE;VM("toPrimitive");UM();var GM=pt,KM=Ie,qM=qn;KM("toStringTag");qM(GM("Symbol"),"Symbol");var YM=Ie;YM("unscopables");var XM=Pe,QM=qn;QM(XM.JSON,"JSON",!0);var ZM=ye,JM=ZM.Symbol,ta={},bd=Ue,e2=He,EE=Function.prototype,t2=bd&&Object.getOwnPropertyDescriptor,pg=e2(EE,"name"),r2=pg&&function(){}.name==="something",n2=pg&&(!bd||bd&&t2(EE,"name").configurable),SE={EXISTS:pg,PROPER:r2,CONFIGURABLE:n2},i2=oe,OE=!i2(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),a2=He,o2=ke,s2=Pt,u2=el,l2=OE,Im=u2("IE_PROTO"),wd=Object,c2=wd.prototype,ol=l2?wd.getPrototypeOf:function(t){var i=s2(t);if(a2(i,Im))return i[Im];var e=i.constructor;return o2(e)&&i instanceof e?e.prototype:i instanceof wd?c2:null},h2=oe,d2=ke,f2=Ze,v2=Kn,Cm=ol,p2=Zi,g2=Se,_d=g2("iterator"),TE=!1,br,oc,sc;[].keys&&(sc=[].keys(),"next"in sc?(oc=Cm(Cm(sc)),oc!==Object.prototype&&(br=oc)):TE=!0);var y2=!f2(br)||h2(function(){var t={};return br[_d].call(t)!==t});y2?br={}:br=v2(br);d2(br[_d])||p2(br,_d,function(){return this});var xE={IteratorPrototype:br,BUGGY_SAFARI_ITERATORS:TE},m2=xE.IteratorPrototype,$2=Kn,b2=Gn,w2=qn,_2=ta,E2=function(){return this},S2=function(t,i,e,r){var n=i+" Iterator";return t.prototype=$2(m2,{next:b2(+!r,e)}),w2(t,n,!1,!0),_2[n]=E2,t},O2=de,T2=xt,x2=function(t,i,e){try{return O2(T2(Object.getOwnPropertyDescriptor(t,i)[e]))}catch{}},P2=ke,k2=String,I2=TypeError,C2=function(t){if(typeof t=="object"||P2(t))return t;throw I2("Can't set "+k2(t)+" as a prototype")},A2=x2,R2=Rt,D2=C2,PE=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,i={},e;try{e=A2(Object.prototype,"__proto__","set"),e(i,[]),t=i instanceof Array}catch{}return function(n,a){return R2(n),D2(a),t?e(n,a):n.__proto__=a,n}}():void 0),M2=U,N2=Qe,F2=SE,B2=S2,L2=ol,j2=qn,Am=Zi,z2=Se,Rm=ta,H2=xE,W2=F2.PROPER,vs=H2.BUGGY_SAFARI_ITERATORS,uc=z2("iterator"),Dm="keys",ps="values",Mm="entries",V2=function(){return this},gg=function(t,i,e,r,n,a,o){B2(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=L2(f.call(new t)),v!==Object.prototype&&v.next&&(j2(v,u,!0,!0),Rm[u]=V2)),W2&&n==ps&&h&&h.name!==ps&&(l=!0,d=function(){return N2(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 M2({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}},U2=rr,Nm=ta,kE=Ji;At.f;var G2=gg,gs=yg,IE="Array Iterator",K2=kE.set,q2=kE.getterFor(IE);G2(Array,"Array",function(t,i){K2(this,{type:IE,target:U2(t),index:0,kind:i})},function(){var t=q2(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 Y2={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},X2=Y2,Q2=Pe,Z2=Mr,J2=Dr,Fm=ta,eN=Se,Bm=eN("toStringTag");for(var lc in X2){var Lm=Q2[lc],cc=Lm&&Lm.prototype;cc&&Z2(cc)!==Bm&&J2(cc,Bm,lc),Fm[lc]=Fm.Array}var tN=JM,CE=tN,rN=Ie;rN("dispose");var nN=CE,iN=nN,aN=Ie;aN("asyncDispose");var oN=U,sN=pt,uN=de,AE=sN("Symbol"),lN=AE.keyFor,cN=uN(AE.prototype.valueOf);oN({target:"Symbol",stat:!0},{isRegistered:function(i){try{return lN(cN(i))!==void 0}catch{return!1}}});var hN=U,dN=nn,RE=pt,fN=de,vN=co,pN=Se,pu=RE("Symbol"),jm=pu.isWellKnown,DE=RE("Object","getOwnPropertyNames"),gN=fN(pu.prototype.valueOf),zm=dN("wks");for(var hc=0,Hm=DE(pu),yN=Hm.length;hc<yN;hc++)try{var Wm=Hm[hc];vN(pu[Wm])&&pN(Wm)}catch{}hN({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(i){if(jm&&jm(i))return!0;try{for(var e=gN(i),r=0,n=DE(zm),a=n.length;r<a;r++)if(zm[n[r]]==e)return!0}catch{}return!1}});var mN=Ie;mN("matcher");var $N=Ie;$N("metadataKey");var bN=Ie;bN("observable");var wN=Ie;wN("metadata");var _N=Ie;_N("patternMatch");var EN=Ie;EN("replaceAll");var SN=iN,ON=SN;(function(t){t.exports=ON})(uA);(function(t){t.exports=hd})(sA);var mi=Q(za),gu={},TN={get exports(){return gu},set exports(t){gu=t}},Ed={},xN={get exports(){return Ed},set exports(t){Ed=t}},mg=de,PN=Xu,kN=yr,IN=lo,CN=mg("".charAt),Vm=mg("".charCodeAt),AN=mg("".slice),Um=function(t){return function(i,e){var r=kN(IN(i)),n=PN(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?CN(r,n):o:t?AN(r,n,n+2):(o-55296<<10)+(s-56320)+65536)}},RN={codeAt:Um(!1),charAt:Um(!0)},DN=RN.charAt,MN=yr,ME=Ji,NN=gg,Gm=yg,NE="String Iterator",FN=ME.set,BN=ME.getterFor(NE);NN(String,"String",function(t){FN(this,{type:NE,string:MN(t),index:0})},function(){var i=BN(this),e=i.string,r=i.index,n;return r>=e.length?Gm(void 0,!0):(n=DN(e,r),i.index+=n.length,Gm(n,!1))});var LN=$o,jN=LN.f("iterator"),zN=jN,FE=zN,HN=FE,WN=HN,VN=WN,UN=VN;(function(t){t.exports=UN})(xN);(function(t){t.exports=Ed})(TN);var GN=Q(gu);function ot(t){"@babel/helpers - typeof";return ot=typeof mi=="function"&&typeof GN=="symbol"?function(i){return typeof i}:function(i){return i&&typeof mi=="function"&&i.constructor===mi&&i!==mi.prototype?"symbol":typeof i},ot(t)}var Sd={},KN={get exports(){return Sd},set exports(t){Sd=t}},Od={},qN={get exports(){return Od},set exports(t){Od=t}},YN=$o,XN=YN.f("toPrimitive"),QN=XN,ZN=QN,JN=ZN,eF=JN,tF=eF,rF=tF;(function(t){t.exports=rF})(qN);(function(t){t.exports=Od})(KN);var nF=Q(Sd);function iF(t,i){if(ot(t)!=="object"||t===null)return t;var e=t[nF];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=iF(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={},aF={get exports(){return Td},set exports(t){Td=t}},LE=de,oF=xt,sF=Ze,uF=He,qm=wo,lF=oo,jE=Function,cF=LE([].concat),hF=LE([].join),dc={},dF=function(t,i,e){if(!uF(dc,i)){for(var r=[],n=0;n<i;n++)r[n]="a["+n+"]";dc[i]=jE("C,a","return new C("+hF(r,",")+")")}return dc[i](t,e)},zE=lF?jE.bind:function(i){var e=oF(this),r=e.prototype,n=qm(arguments,1),a=function(){var s=cF(n,qm(arguments));return this instanceof a?dF(e,s.length,s):e.apply(i,s)};return sF(r)&&(a.prototype=r),a},fF=U,Ym=zE;fF({target:"Function",proto:!0,forced:Function.bind!==Ym},{bind:Ym});var vF=ye,We=function(t){return vF[t+"Prototype"]},pF=We,gF=pF("Function").bind,yF=Ee,mF=gF,fc=Function.prototype,$F=function(t){var i=t.bind;return t===fc||yF(fc,t)&&i===fc.bind?mF:i},bF=$F,HE=bF;(function(t){t.exports=HE})(aF);var WE=Q(Td),xd={},wF={get exports(){return xd},set exports(t){xd=t}},_F=xt,EF=Pt,SF=Gu,OF=Dt,TF=TypeError,Xm=function(t){return function(i,e,r,n){_F(e);var a=EF(i),o=SF(a),s=OF(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 TF("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}},xF={left:Xm(!1),right:Xm(!0)},PF=oe,Eo=function(t,i){var e=[][t];return!!e&&PF(function(){e.call(null,i||function(){return 1},1)})},kF=Rr,So=typeof process<"u"&&kF(process)=="process",IF=U,CF=xF.left,AF=Eo,Qm=qi,RF=So,DF=!RF&&Qm>79&&Qm<83,MF=DF||!AF("reduce");IF({target:"Array",proto:!0,forced:MF},{reduce:function(i){var e=arguments.length;return CF(this,i,e,e>1?arguments[1]:void 0)}});var NF=We,FF=NF("Array").reduce,BF=Ee,LF=FF,vc=Array.prototype,jF=function(t){var i=t.reduce;return t===vc||BF(vc,t)&&i===vc.reduce?LF:i},zF=jF,HF=zF;(function(t){t.exports=HF})(wF);var WF=Q(xd),Pd={},VF={get exports(){return Pd},set exports(t){Pd=t}},UF=U,GF=ea.filter,KF=fo,qF=KF("filter");UF({target:"Array",proto:!0,forced:!qF},{filter:function(i){return GF(this,i,arguments.length>1?arguments[1]:void 0)}});var YF=We,XF=YF("Array").filter,QF=Ee,ZF=XF,pc=Array.prototype,JF=function(t){var i=t.filter;return t===pc||QF(pc,t)&&i===pc.filter?ZF:i},eB=JF,tB=eB;(function(t){t.exports=tB})(VF);var $i=Q(Pd),kd={},rB={get exports(){return kd},set exports(t){kd=t}},nB=U,iB=ea.map,aB=fo,oB=aB("map");nB({target:"Array",proto:!0,forced:!oB},{map:function(i){return iB(this,i,arguments.length>1?arguments[1]:void 0)}});var sB=We,uB=sB("Array").map,lB=Ee,cB=uB,gc=Array.prototype,hB=function(t){var i=t.map;return t===gc||lB(gc,t)&&i===gc.map?cB:i},dB=hB,fB=dB;(function(t){t.exports=fB})(rB);var qt=Q(kd),Zm={},vB={get exports(){return Zm},set exports(t){Zm=t}},pB=dn,gB=Dt,yB=ng,mB=hn,VE=function(t,i,e,r,n,a,o,s){for(var u=n,l=0,c=o?mB(o,s):!1,h,d;l<r;)l in e&&(h=c?c(e[l],l,i):e[l],a>0&&pB(h)?(d=gB(h),u=VE(t,i,h,d,u,a-1)-1):(yB(u+1),t[u]=h),u++),l++;return u},$B=VE,bB=U,wB=$B,_B=xt,EB=Pt,SB=Dt,OB=Zu;bB({target:"Array",proto:!0},{flatMap:function(i){var e=EB(this),r=SB(e),n;return _B(i),n=OB(e,0),n.length=wB(n,e,e,r,0,1,i,arguments.length>1?arguments[1]:void 0),n}});var TB=We,xB=TB("Array").flatMap,PB=Ee,kB=xB,yc=Array.prototype,IB=function(t){var i=t.flatMap;return t===yc||PB(yc,t)&&i===yc.flatMap?kB:i},CB=IB,AB=CB;(function(t){t.exports=AB})(vB);var Id={},RB={get exports(){return Id},set exports(t){Id=t}},DB=Qe,Jm=Rt,MB=eg,UE=function(t,i,e){var r,n;Jm(t);try{if(r=MB(t,"return"),!r){if(i==="throw")throw e;return e}r=DB(r,t)}catch(a){n=!0,r=a}if(i==="throw")throw e;if(n)throw r;return Jm(r),e},NB=Rt,FB=UE,BB=function(t,i,e,r){try{return r?i(NB(e)[0],e[1]):i(e)}catch(n){FB(t,"throw",n)}},LB=Se,jB=ta,zB=LB("iterator"),HB=Array.prototype,GE=function(t){return t!==void 0&&(jB.Array===t||HB[zB]===t)},WB=Mr,e$=eg,VB=uo,UB=ta,GB=Se,KB=GB("iterator"),ul=function(t){if(!VB(t))return e$(t,KB)||e$(t,"@@iterator")||UB[WB(t)]},qB=Qe,YB=xt,XB=Rt,QB=Xi,ZB=ul,JB=TypeError,$g=function(t,i){var e=arguments.length<2?ZB(t):i;if(YB(e))return XB(qB(e,t));throw JB(QB(t)+" is not iterable")},eL=hn,tL=Qe,rL=Pt,nL=BB,iL=GE,aL=Qu,oL=Dt,t$=Qi,sL=$g,uL=ul,r$=Array,lL=function(i){var e=rL(i),r=aL(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=eL(a,n>2?arguments[2]:void 0));var s=uL(e),u=0,l,c,h,d,f,v;if(s&&!(this===r$&&iL(s)))for(d=sL(e,s),f=d.next,c=r?new this:[];!(h=tL(f,d)).done;u++)v=o?nL(d,a,[h.value,u],!0):h.value,t$(c,u,v);else for(l=oL(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},cL=Se,KE=cL("iterator"),qE=!1;try{var hL=0,n$={next:function(){return{done:!!hL++}},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},dL=U,fL=lL,vL=YE,pL=!vL(function(t){Array.from(t)});dL({target:"Array",stat:!0,forced:pL},{from:fL});var gL=ye,yL=gL.Array.from,mL=yL,XE=mL;(function(t){t.exports=XE})(RB);var bg=Q(Id),Cd={},$L={get exports(){return Cd},set exports(t){Cd=t}},Ad={},bL={get exports(){return Ad},set exports(t){Ad=t}},wL=ul,_L=wL,EL=_L,SL=EL,OL=SL,TL=OL,xL=TL,PL=xL;(function(t){t.exports=PL})(bL);(function(t){t.exports=Ad})($L);var Oo=Q(Cd),Rd={},kL={get exports(){return Rd},set exports(t){Rd=t}},IL=ye,CL=IL.Object.getOwnPropertySymbols,AL=CL,RL=AL;(function(t){t.exports=RL})(kL);var i$=Q(Rd),Dd={},DL={get exports(){return Dd},set exports(t){Dd=t}},Md={},ML={get exports(){return Md},set exports(t){Md=t}},NL=U,FL=oe,BL=rr,QE=Un.f,ZE=Ue,LL=!ZE||FL(function(){QE(1)});NL({target:"Object",stat:!0,forced:LL,sham:!ZE},{getOwnPropertyDescriptor:function(i,e){return QE(BL(i),e)}});var jL=ye,JE=jL.Object,zL=ML.exports=function(i,e){return JE.getOwnPropertyDescriptor(i,e)};JE.getOwnPropertyDescriptor.sham&&(zL.sham=!0);var HL=Md,WL=HL;(function(t){t.exports=WL})(DL);var eS=Q(Dd),Nd={},VL={get exports(){return Nd},set exports(t){Nd=t}},UL=pt,GL=de,KL=yo,qL=mo,YL=Rt,XL=GL([].concat),wg=UL("Reflect","ownKeys")||function(i){var e=KL.f(YL(i)),r=qL.f;return r?XL(e,r(i)):e},QL=U,ZL=Ue,JL=wg,ej=rr,tj=Un,rj=Qi;QL({target:"Object",stat:!0,sham:!ZL},{getOwnPropertyDescriptors:function(i){for(var e=ej(i),r=tj.f,n=JL(e),a={},o=0,s,u;n.length>o;)u=r(e,s=n[o++]),u!==void 0&&rj(a,s,u);return a}});var nj=ye,ij=nj.Object.getOwnPropertyDescriptors,aj=ij,oj=aj;(function(t){t.exports=oj})(VL);var a$=Q(Nd),Fd={},sj={get exports(){return Fd},set exports(t){Fd=t}},Bd={},uj={get exports(){return Bd},set exports(t){Bd=t}},lj=U,cj=Ue,o$=Ju.f;lj({target:"Object",stat:!0,forced:Object.defineProperties!==o$,sham:!cj},{defineProperties:o$});var hj=ye,tS=hj.Object,dj=uj.exports=function(i,e){return tS.defineProperties(i,e)};tS.defineProperties.sham&&(dj.sham=!0);var fj=Bd,vj=fj;(function(t){t.exports=vj})(sj);var pj=Q(Fd),Ld={},gj={get exports(){return Ld},set exports(t){Ld=t}};(function(t){t.exports=L_})(gj);var yj=Q(Ld),jd={},mj={get exports(){return jd},set exports(t){jd=t}},zd={},$j={get exports(){return zd},set exports(t){zd=t}},bj=U,wj=dn;bj({target:"Array",stat:!0},{isArray:wj});var _j=ye,Ej=_j.Array.isArray,Sj=Ej,rS=Sj,Oj=rS,Tj=Oj,xj=Tj,Pj=xj;(function(t){t.exports=Pj})($j);(function(t){t.exports=zd})(mj);var nS=Q(jd);function kj(t){if(nS(t))return t}function Ij(t,i){var e=t==null?null:typeof mi<"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={},Cj={get exports(){return yu},set exports(t){yu=t}},Hd={},Aj={get exports(){return Hd},set exports(t){Hd=t}},Rj=U,s$=dn,Dj=Qu,Mj=Ze,u$=vo,Nj=Dt,Fj=rr,Bj=Qi,Lj=Se,jj=fo,zj=wo,Hj=jj("slice"),Wj=Lj("species"),mc=Array,Vj=Math.max;Rj({target:"Array",proto:!0,forced:!Hj},{slice:function(i,e){var r=Fj(this),n=Nj(r),a=u$(i,n),o=u$(e===void 0?n:e,n),s,u,l;if(s$(r)&&(s=r.constructor,Dj(s)&&(s===mc||s$(s.prototype))?s=void 0:Mj(s)&&(s=s[Wj],s===null&&(s=void 0)),s===mc||s===void 0))return zj(r,a,o);for(u=new(s===void 0?mc:s)(Vj(o-a,0)),l=0;a<o;a++,l++)a in r&&Bj(u,l,r[a]);return u.length=l,u}});var Uj=We,Gj=Uj("Array").slice,Kj=Ee,qj=Gj,$c=Array.prototype,Yj=function(t){var i=t.slice;return t===$c||Kj($c,t)&&i===$c.slice?qj:i},Xj=Yj,iS=Xj,Qj=iS,Zj=Qj,Jj=Zj,ez=Jj;(function(t){t.exports=ez})(Aj);(function(t){t.exports=Hd})(Cj);var tz=Q(yu),Wd={},rz={get exports(){return Wd},set exports(t){Wd=t}},Vd={},nz={get exports(){return Vd},set exports(t){Vd=t}},iz=XE,az=iz,oz=az,sz=oz;(function(t){t.exports=sz})(nz);(function(t){t.exports=Vd})(rz);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=tz(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 uz(){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 kj(t)||Ij(t,i)||oS(t,i)||uz()}function lz(t){if(nS(t))return Ud(t)}function cz(t){if(typeof mi<"u"&&Oo(t)!=null||t["@@iterator"]!=null)return aS(t)}function hz(){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 lz(t)||cz(t)||oS(t)||hz()}var Gd={},dz={get exports(){return Gd},set exports(t){Gd=t}};(function(t){t.exports=CE})(dz);var ll=Q(Gd),Kd={},fz={get exports(){return Kd},set exports(t){Kd=t}},vz=We,pz=vz("Array").concat,gz=Ee,yz=pz,bc=Array.prototype,mz=function(t){var i=t.concat;return t===bc||gz(bc,t)&&i===bc.concat?yz:i},$z=mz,bz=$z;(function(t){t.exports=bz})(fz);var cl=Q(Kd),qd={},wz={get exports(){return qd},set exports(t){qd=t}};(function(t){t.exports=iS})(wz);var hl=Q(qd),Yd={},_z={get exports(){return Yd},set exports(t){Yd=t}},Ez=U,Sz=wg;Ez({target:"Reflect",stat:!0},{ownKeys:Sz});var Oz=ye,Tz=Oz.Reflect.ownKeys,xz=Tz,Pz=xz;(function(t){t.exports=Pz})(_z);var kz=Q(Yd),Xd={},Iz={get exports(){return Xd},set exports(t){Xd=t}};(function(t){t.exports=rS})(Iz);var It=Q(Xd),Qd={},Cz={get exports(){return Qd},set exports(t){Qd=t}},Az=U,Rz=Pt,sS=go,Dz=oe,Mz=Dz(function(){sS(1)});Az({target:"Object",stat:!0,forced:Mz},{keys:function(i){return sS(Rz(i))}});var Nz=ye,Fz=Nz.Object.keys,Bz=Fz,Lz=Bz;(function(t){t.exports=Lz})(Cz);var _g=Q(Qd),l$={},jz={get exports(){return l$},set exports(t){l$=t}},zz=U,Hz=de,uS=Date,Wz=Hz(uS.prototype.getTime);zz({target:"Date",stat:!0},{now:function(){return Wz(new uS)}});var Vz=ye,Uz=Vz.Date.now,Gz=Uz,Kz=Gz;(function(t){t.exports=Kz})(jz);var Zd={},qz={get exports(){return Zd},set exports(t){Zd=t}},Yz=ea.forEach,Xz=Eo,Qz=Xz("forEach"),Zz=Qz?[].forEach:function(i){return Yz(this,i,arguments.length>1?arguments[1]:void 0)},Jz=U,c$=Zz;Jz({target:"Array",proto:!0,forced:[].forEach!=c$},{forEach:c$});var e3=We,t3=e3("Array").forEach,r3=t3,n3=r3,i3=Mr,a3=He,o3=Ee,s3=n3,wc=Array.prototype,u3={DOMTokenList:!0,NodeList:!0},lS=function(t){var i=t.forEach;return t===wc||o3(wc,t)&&i===wc.forEach||a3(u3,i3(t))?s3:i};(function(t){t.exports=lS})(qz);var Nn=Q(Zd),Jd={},l3={get exports(){return Jd},set exports(t){Jd=t}},c3=U,h3=de,d3=dn,f3=h3([].reverse),h$=[1,2];c3({target:"Array",proto:!0,forced:String(h$)===String(h$.reverse())},{reverse:function(){return d3(this)&&(this.length=this.length),f3(this)}});var v3=We,p3=v3("Array").reverse,g3=Ee,y3=p3,_c=Array.prototype,m3=function(t){var i=t.reverse;return t===_c||g3(_c,t)&&i===_c.reverse?y3:i},$3=m3,cS=$3;(function(t){t.exports=cS})(l3);var b3=Q(Jd),ef={},w3={get exports(){return ef},set exports(t){ef=t}},_3=Ue,E3=dn,S3=TypeError,O3=Object.getOwnPropertyDescriptor,T3=_3&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),x3=T3?function(t,i){if(E3(t)&&!O3(t,"length").writable)throw S3("Cannot set read only .length");return t.length=i}:function(t,i){return t.length=i},d$=Xi,P3=TypeError,hS=function(t,i){if(!delete t[i])throw P3("Cannot delete property "+d$(i)+" of "+d$(t))},k3=U,I3=Pt,C3=vo,A3=Xu,R3=Dt,D3=x3,M3=ng,N3=Zu,F3=Qi,Ec=hS,B3=fo,L3=B3("splice"),j3=Math.max,z3=Math.min;k3({target:"Array",proto:!0,forced:!L3},{splice:function(i,e){var r=I3(this),n=R3(r),a=C3(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=z3(j3(A3(e),0),n-a)),M3(n+s-u),l=N3(r,u),c=0;c<u;c++)h=a+c,h in r&&F3(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 D3(r,n-u+s),l}});var H3=We,W3=H3("Array").splice,V3=Ee,U3=W3,Sc=Array.prototype,G3=function(t){var i=t.splice;return t===Sc||V3(Sc,t)&&i===Sc.splice?U3:i},K3=G3,q3=K3;(function(t){t.exports=q3})(w3);var dS=Q(ef),tf={},Y3={get exports(){return tf},set exports(t){tf=t}},f$=Ue,X3=de,Q3=Qe,Z3=oe,Oc=go,J3=mo,e5=so,t5=Pt,r5=Gu,si=Object.assign,v$=Object.defineProperty,n5=X3([].concat),i5=!si||Z3(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=t5(i),n=arguments.length,a=1,o=J3.f,s=e5.f;n>a;)for(var u=r5(arguments[a++]),l=o?n5(Oc(u),o(u)):Oc(u),c=l.length,h=0,d;c>h;)d=l[h++],(!f$||Q3(s,u,d))&&(r[d]=u[d]);return r}:si,a5=U,p$=i5;a5({target:"Object",stat:!0,arity:2,forced:Object.assign!==p$},{assign:p$});var o5=ye,s5=o5.Object.assign,u5=s5,l5=u5;(function(t){t.exports=l5})(Y3);var c5=Q(tf),g$={},h5={get exports(){return g$},set exports(t){g$=t}},d5=U,f5=og.includes,v5=oe,p5=v5(function(){return!Array(1).includes()});d5({target:"Array",proto:!0,forced:p5},{includes:function(i){return f5(this,i,arguments.length>1?arguments[1]:void 0)}});var g5=We,y5=g5("Array").includes,m5=Ze,$5=Rr,b5=Se,w5=b5("match"),_5=function(t){var i;return m5(t)&&((i=t[w5])!==void 0?!!i:$5(t)=="RegExp")},E5=_5,S5=TypeError,O5=function(t){if(E5(t))throw S5("The method doesn't accept regular expressions");return t},T5=Se,x5=T5("match"),P5=function(t){var i=/./;try{"/./"[t](i)}catch{try{return i[x5]=!1,"/./"[t](i)}catch{}}return!1},k5=U,I5=de,C5=O5,A5=lo,y$=yr,R5=P5,D5=I5("".indexOf);k5({target:"String",proto:!0,forced:!R5("includes")},{includes:function(i){return!!~D5(y$(A5(this)),y$(C5(i)),arguments.length>1?arguments[1]:void 0)}});var M5=We,N5=M5("String").includes,m$=Ee,F5=y5,B5=N5,Tc=Array.prototype,xc=String.prototype,L5=function(t){var i=t.includes;return t===Tc||m$(Tc,t)&&i===Tc.includes?F5:typeof t=="string"||t===xc||m$(xc,t)&&i===xc.includes?B5:i},j5=L5,z5=j5;(function(t){t.exports=z5})(h5);var $$={},H5={get exports(){return $$},set exports(t){$$=t}},W5=U,V5=oe,U5=Pt,fS=ol,G5=OE,K5=V5(function(){fS(1)});W5({target:"Object",stat:!0,forced:K5,sham:!G5},{getPrototypeOf:function(i){return fS(U5(i))}});var q5=ye,Y5=q5.Object.getPrototypeOf,X5=Y5,vS=X5;(function(t){t.exports=vS})(H5);var b$={},Q5={get exports(){return b$},set exports(t){b$=t}},Z5=Ue,pS=de,J5=go,e4=rr,t4=so.f,r4=pS(t4),n4=pS([].push),w$=function(t){return function(i){for(var e=e4(i),r=J5(e),n=r.length,a=0,o=[],s;n>a;)s=r[a++],(!Z5||r4(e,s))&&n4(o,t?[s,e[s]]:e[s]);return o}},i4={entries:w$(!0),values:w$(!1)},a4=U,o4=i4.values;a4({target:"Object",stat:!0},{values:function(i){return o4(i)}});var s4=ye,u4=s4.Object.values,l4=u4,c4=l4;(function(t){t.exports=c4})(Q5);var _$={},h4={get exports(){return _$},set exports(t){_$=t}},Eg=`
28
- \v\f\r                 \u2028\u2029\uFEFF`,d4=de,f4=lo,v4=yr,rf=Eg,E$=d4("".replace),p4=RegExp("^["+rf+"]+"),g4=RegExp("(^|[^"+rf+"])["+rf+"]+$"),Pc=function(t){return function(i){var e=v4(f4(i));return t&1&&(e=E$(e,p4,"")),t&2&&(e=E$(e,g4,"$1")),e}},gS={start:Pc(1),end:Pc(2),trim:Pc(3)},yS=Pe,y4=oe,m4=de,$4=yr,b4=gS.trim,S$=Eg,ka=yS.parseInt,O$=yS.Symbol,T$=O$&&O$.iterator,mS=/^[+-]?0x/i,w4=m4(mS.exec),_4=ka(S$+"08")!==8||ka(S$+"0x16")!==22||T$&&!y4(function(){ka(Object(T$))}),E4=_4?function(i,e){var r=b4($4(i));return ka(r,e>>>0||(w4(mS,r)?16:10))}:ka,S4=U,x$=E4;S4({global:!0,forced:parseInt!=x$},{parseInt:x$});var O4=ye,T4=O4.parseInt,x4=T4,P4=x4;(function(t){t.exports=P4})(h4);var P$={},k4={get exports(){return P$},set exports(t){P$=t}},I4=U,C4=Jp,A4=og.indexOf,R4=Eo,nf=C4([].indexOf),$S=!!nf&&1/nf([1],1,-0)<0,D4=$S||!R4("indexOf");I4({target:"Array",proto:!0,forced:D4},{indexOf:function(i){var e=arguments.length>1?arguments[1]:void 0;return $S?nf(this,i,e)||0:A4(this,i,e)}});var M4=We,N4=M4("Array").indexOf,F4=Ee,B4=N4,kc=Array.prototype,L4=function(t){var i=t.indexOf;return t===kc||F4(kc,t)&&i===kc.indexOf?B4:i},j4=L4,z4=j4;(function(t){t.exports=z4})(k4);var k$={},H4={get exports(){return k$},set exports(t){k$=t}},W4=SE.PROPER,V4=oe,I$=Eg,C$="​…᠎",U4=function(t){return V4(function(){return!!I$[t]()||C$[t]()!==C$||W4&&I$[t].name!==t})},G4=U,K4=gS.trim,q4=U4;G4({target:"String",proto:!0,forced:q4("trim")},{trim:function(){return K4(this)}});var Y4=We,X4=Y4("String").trim,Q4=Ee,Z4=X4,Ic=String.prototype,J4=function(t){var i=t.trim;return typeof t=="string"||t===Ic||Q4(Ic,t)&&i===Ic.trim?Z4:i},eH=J4,tH=eH;(function(t){t.exports=tH})(H4);var af={},rH={get exports(){return af},set exports(t){af=t}},nH=U,iH=Ue,aH=Kn;nH({target:"Object",stat:!0,sham:!iH},{create:aH});var oH=ye,sH=oH.Object,uH=function(i,e){return sH.create(i,e)},lH=uH,bS=lH;(function(t){t.exports=bS})(rH);var cH=Q(af),of={},hH={get exports(){return of},set exports(t){of=t}},sf=ye,dH=Ki;sf.JSON||(sf.JSON={stringify:JSON.stringify});var fH=function(i,e,r){return dH(sf.JSON.stringify,null,arguments)},vH=fH,pH=vH;(function(t){t.exports=pH})(hH);var gH=Q(of),uf={},yH={get exports(){return uf},set exports(t){uf=t}},mH=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",$H=TypeError,wS=function(t,i){if(t<i)throw $H("Not enough arguments");return t},_S=Pe,bH=Ki,wH=ke,_H=mH,EH=cn,SH=wo,OH=wS,TH=_S.Function,xH=/MSIE .\./.test(EH)||_H&&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 xH?function(r,n){var a=OH(arguments.length,1)>e,o=wH(r)?r:TH(r),s=a?SH(arguments,e):[],u=a?function(){bH(o,this,s)}:o;return i?t(u,n):t(u)}:t},PH=U,SS=Pe,kH=ES,A$=kH(SS.setInterval,!0);PH({global:!0,bind:!0,forced:SS.setInterval!==A$},{setInterval:A$});var IH=U,OS=Pe,CH=ES,R$=CH(OS.setTimeout,!0);IH({global:!0,bind:!0,forced:OS.setTimeout!==R$},{setTimeout:R$});var AH=ye,RH=AH.setTimeout;(function(t){t.exports=RH})(yH);var DH=Q(uf),D$={},MH={get exports(){return D$},set exports(t){D$=t}},NH=Pt,M$=vo,FH=Dt,BH=function(i){for(var e=NH(this),r=FH(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},LH=U,jH=BH;LH({target:"Array",proto:!0},{fill:jH});var zH=We,HH=zH("Array").fill,WH=Ee,VH=HH,Cc=Array.prototype,UH=function(t){var i=t.fill;return t===Cc||WH(Cc,t)&&i===Cc.fill?VH:i},GH=UH,KH=GH;(function(t){t.exports=KH})(MH);var lf={},qH={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}})(qH);var YH=lf;/*! Hammer.JS - v2.0.17-rc - 2019-12-16
25
+ */function Uu(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}var Ay=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={},Kk={get exports(){return hu},set exports(t){hu=t}},od={},qk={get exports(){return od},set exports(t){od=t}},sd={},Yk={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 Ay=="object"&&Ay)||function(){return this}()||Function("return this")(),oe=function(t){try{return!!t()}catch{return!0}},Xk=oe,oo=!Xk(function(){var t=function(){}.bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),Qk=oo,O_=Function.prototype,Ry=O_.apply,Dy=O_.call,Ki=typeof Reflect=="object"&&Reflect.apply||(Qk?Dy.bind(Ry):function(){return Dy.apply(Ry,arguments)}),T_=oo,x_=Function.prototype,ud=x_.call,Zk=T_&&x_.bind.bind(ud,ud),de=T_?Zk:function(t){return function(){return ud.apply(t,arguments)}},P_=de,Jk=P_({}.toString),eI=P_("".slice),Rr=function(t){return eI(Jk(t),8,-1)},tI=Rr,rI=de,Jp=function(t){if(tI(t)==="Function")return rI(t)},ld=typeof document=="object"&&document.all,nI=typeof ld>"u"&&ld!==void 0,k_={all:ld,IS_HTMLDDA:nI},I_=k_,iI=I_.all,ke=I_.IS_HTMLDDA?function(t){return typeof t=="function"||t===iI}:function(t){return typeof t=="function"},Un={},aI=oe,Ue=!aI(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),oI=oo,ls=Function.prototype.call,Qe=oI?ls.bind(ls):function(){return ls.apply(ls,arguments)},so={},C_={}.propertyIsEnumerable,A_=Object.getOwnPropertyDescriptor,sI=A_&&!C_.call({1:2},1);so.f=sI?function(i){var e=A_(this,i);return!!e&&e.enumerable}:C_;var Gn=function(t,i){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:i}},uI=de,lI=oe,cI=Rr,zl=Object,hI=uI("".split),Gu=lI(function(){return!zl("z").propertyIsEnumerable(0)})?function(t){return cI(t)=="String"?hI(t,""):zl(t)}:zl,uo=function(t){return t==null},dI=uo,fI=TypeError,lo=function(t){if(dI(t))throw fI("Can't call method on "+t);return t},vI=Gu,pI=lo,rr=function(t){return vI(pI(t))},My=ke,R_=k_,gI=R_.all,Ze=R_.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:My(t)||t===gI}:function(t){return typeof t=="object"?t!==null:My(t)},ye={},Hl=ye,Wl=Pe,yI=ke,Ny=function(t){return yI(t)?t:void 0},pt=function(t,i){return arguments.length<2?Ny(Hl[t])||Ny(Wl[t]):Hl[t]&&Hl[t][i]||Wl[t]&&Wl[t][i]},mI=de,Ee=mI({}.isPrototypeOf),cn=typeof navigator<"u"&&String(navigator.userAgent)||"",D_=Pe,Vl=cn,Fy=D_.process,By=D_.Deno,Ly=Fy&&Fy.versions||By&&By.version,jy=Ly&&Ly.v8,Kt,du;jy&&(Kt=jy.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 qi=du,zy=qi,$I=oe,Yi=!!Object.getOwnPropertySymbols&&!$I(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&zy&&zy<41}),bI=Yi,M_=bI&&!Symbol.sham&&typeof Symbol.iterator=="symbol",wI=pt,_I=ke,EI=Ee,SI=M_,OI=Object,co=SI?function(t){return typeof t=="symbol"}:function(t){var i=wI("Symbol");return _I(i)&&EI(i.prototype,OI(t))},TI=String,Xi=function(t){try{return TI(t)}catch{return"Object"}},xI=ke,PI=Xi,kI=TypeError,xt=function(t){if(xI(t))return t;throw kI(PI(t)+" is not a function")},II=xt,CI=uo,eg=function(t,i){var e=t[i];return CI(e)?void 0:II(e)},Ul=Qe,Gl=ke,Kl=Ze,AI=TypeError,RI=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 AI("Can't convert object to primitive value")},nn={},DI={get exports(){return nn},set exports(t){nn=t}},MI=!0,Hy=Pe,NI=Object.defineProperty,FI=function(t,i){try{NI(Hy,t,{value:i,configurable:!0,writable:!0})}catch{Hy[t]=i}return i},BI=Pe,LI=FI,Wy="__core-js_shared__",jI=BI[Wy]||LI(Wy,{}),tg=jI,Vy=tg;(DI.exports=function(t,i){return Vy[t]||(Vy[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 zI=lo,HI=Object,Pt=function(t){return HI(zI(t))},WI=de,VI=Pt,UI=WI({}.hasOwnProperty),He=Object.hasOwn||function(i,e){return UI(VI(i),e)},GI=de,KI=0,qI=Math.random(),YI=GI(1 .toString),Ku=function(t){return"Symbol("+(t===void 0?"":t)+")_"+YI(++KI+qI,36)},XI=Pe,QI=nn,Uy=He,ZI=Ku,JI=Yi,eC=M_,yi=XI.Symbol,ql=QI("wks"),tC=eC?yi.for||yi:yi&&yi.withoutSetter||ZI,Se=function(t){return Uy(ql,t)||(ql[t]=JI&&Uy(yi,t)?yi[t]:tC("Symbol."+t)),ql[t]},rC=Qe,Gy=Ze,Ky=co,nC=eg,iC=RI,aC=Se,oC=TypeError,sC=aC("toPrimitive"),uC=function(t,i){if(!Gy(t)||Ky(t))return t;var e=nC(t,sC),r;if(e){if(i===void 0&&(i="default"),r=rC(e,t,i),!Gy(r)||Ky(r))return r;throw oC("Can't convert object to primitive value")}return i===void 0&&(i="number"),iC(t,i)},lC=uC,cC=co,qu=function(t){var i=lC(t,"string");return cC(i)?i:i+""},hC=Pe,qy=Ze,cd=hC.document,dC=qy(cd)&&qy(cd.createElement),rg=function(t){return dC?cd.createElement(t):{}},fC=Ue,vC=oe,pC=rg,N_=!fC&&!vC(function(){return Object.defineProperty(pC("div"),"a",{get:function(){return 7}}).a!=7}),gC=Ue,yC=Qe,mC=so,$C=Gn,bC=rr,wC=qu,_C=He,EC=N_,Yy=Object.getOwnPropertyDescriptor;Un.f=gC?Yy:function(i,e){if(i=bC(i),e=wC(e),EC)try{return Yy(i,e)}catch{}if(_C(i,e))return $C(!yC(mC.f,i,e),i[e])};var SC=oe,OC=ke,TC=/#|\.prototype\./,ho=function(t,i){var e=PC[xC(t)];return e==IC?!0:e==kC?!1:OC(i)?SC(i):!!i},xC=ho.normalize=function(t){return String(t).replace(TC,".").toLowerCase()},PC=ho.data={},kC=ho.NATIVE="N",IC=ho.POLYFILL="P",F_=ho,Xy=Jp,CC=xt,AC=oo,RC=Xy(Xy.bind),hn=function(t,i){return CC(t),i===void 0?t:AC?RC(t,i):function(){return t.apply(i,arguments)}},At={},DC=Ue,MC=oe,B_=DC&&MC(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),NC=Ze,FC=String,BC=TypeError,Rt=function(t){if(NC(t))return t;throw BC(FC(t)+" is not an object")},LC=Ue,jC=N_,zC=B_,cs=Rt,Qy=qu,HC=TypeError,Yl=Object.defineProperty,WC=Object.getOwnPropertyDescriptor,Xl="enumerable",Ql="configurable",Zl="writable";At.f=LC?zC?function(i,e,r){if(cs(i),e=Qy(e),cs(r),typeof i=="function"&&e==="prototype"&&"value"in r&&Zl in r&&!r[Zl]){var n=WC(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=Qy(e),cs(r),jC)try{return Yl(i,e,r)}catch{}if("get"in r||"set"in r)throw HC("Accessors not supported");return"value"in r&&(i[e]=r.value),i};var VC=Ue,UC=At,GC=Gn,Dr=VC?function(t,i,e){return UC.f(t,i,GC(1,e))}:function(t,i,e){return t[i]=e,t},hs=Pe,KC=Ki,qC=Jp,YC=ke,XC=Un.f,QC=F_,ii=ye,ZC=hn,ai=Dr,Zy=He,JC=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 KC(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=QC(r?d:e+(n?".":"#")+d,t.forced),c=!l&&o&&Zy(o,d),v=s[d],c&&(t.dontCallGetSet?(p=XC(o,d),g=p&&p.value):g=o[d]),f=c&&g?g:i[d],!(c&&typeof v==typeof f)&&(t.bind&&c?b=ZC(f,hs):t.wrap&&c?b=JC(f):a&&YC(f)?b=qC(f):b=f,(t.sham||f&&f.sham||v&&v.sham)&&ai(b,"sham",!0),ai(s,d,b),a&&(h=e+"Prototype",Zy(ii,h)||ai(ii,h,{}),ai(ii[h],d,f),t.real&&u&&(l||!u[d])&&ai(u,d,f)))},eA=U,tA=Ue,Jy=At.f;eA({target:"Object",stat:!0,forced:Object.defineProperty!==Jy,sham:!tA},{defineProperty:Jy});var rA=ye,L_=rA.Object,nA=Yk.exports=function(i,e,r){return L_.defineProperty(i,e,r)};L_.defineProperty.sham&&(nA.sham=!0);var iA=sd,j_=iA,aA=j_,oA=aA,sA=oA,uA=sA;(function(t){t.exports=uA})(qk);(function(t){t.exports=od})(Kk);var Yu=Q(hu),za={},lA={get exports(){return za},set exports(t){za=t}},hd={},cA={get exports(){return hd},set exports(t){hd=t}},hA=Rr,dn=Array.isArray||function(i){return hA(i)=="Array"},dA=Math.ceil,fA=Math.floor,vA=Math.trunc||function(i){var e=+i;return(e>0?fA:dA)(e)},pA=vA,Xu=function(t){var i=+t;return i!==i||i===0?0:pA(i)},gA=Xu,yA=Math.min,mA=function(t){return t>0?yA(gA(t),9007199254740991):0},$A=mA,Dt=function(t){return $A(t.length)},bA=TypeError,wA=9007199254740991,ng=function(t){if(t>wA)throw bA("Maximum allowed index exceeded");return t},_A=qu,EA=At,SA=Gn,Qi=function(t,i,e){var r=_A(i);r in t?EA.f(t,r,SA(0,e)):t[r]=e},OA=Se,TA=OA("toStringTag"),z_={};z_[TA]="z";var ig=String(z_)==="[object z]",xA=ig,PA=ke,Ks=Rr,kA=Se,IA=kA("toStringTag"),CA=Object,AA=Ks(function(){return arguments}())=="Arguments",RA=function(t,i){try{return t[i]}catch{}},Mr=xA?Ks:function(t){var i,e,r;return t===void 0?"Undefined":t===null?"Null":typeof(e=RA(i=CA(t),IA))=="string"?e:AA?Ks(i):(r=Ks(i))=="Object"&&PA(i.callee)?"Arguments":r},DA=de,MA=ke,dd=tg,NA=DA(Function.toString);MA(dd.inspectSource)||(dd.inspectSource=function(t){return NA(t)});var H_=dd.inspectSource,FA=de,BA=oe,W_=ke,LA=Mr,jA=pt,zA=H_,V_=function(){},HA=[],U_=jA("Reflect","construct"),ag=/^\s*(?:class|function)\b/,WA=FA(ag.exec),VA=!ag.exec(V_),ya=function(i){if(!W_(i))return!1;try{return U_(V_,HA,i),!0}catch{return!1}},G_=function(i){if(!W_(i))return!1;switch(LA(i)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return VA||!!WA(ag,zA(i))}catch{return!0}};G_.sham=!0;var Qu=!U_||BA(function(){var t;return ya(ya.call)||!ya(Object)||!ya(function(){t=!0})||t})?G_:ya,em=dn,UA=Qu,GA=Ze,KA=Se,qA=KA("species"),tm=Array,YA=function(t){var i;return em(t)&&(i=t.constructor,UA(i)&&(i===tm||em(i.prototype))?i=void 0:GA(i)&&(i=i[qA],i===null&&(i=void 0))),i===void 0?tm:i},XA=YA,Zu=function(t,i){return new(XA(t))(i===0?0:i)},QA=oe,ZA=Se,JA=qi,eR=ZA("species"),fo=function(t){return JA>=51||!QA(function(){var i=[],e=i.constructor={};return e[eR]=function(){return{foo:1}},i[t](Boolean).foo!==1})},tR=U,rR=oe,nR=dn,iR=Ze,aR=Pt,oR=Dt,rm=ng,nm=Qi,sR=Zu,uR=fo,lR=Se,cR=qi,K_=lR("isConcatSpreadable"),hR=cR>=51||!rR(function(){var t=[];return t[K_]=!1,t.concat()[0]!==t}),dR=function(t){if(!iR(t))return!1;var i=t[K_];return i!==void 0?!!i:nR(t)},fR=!hR||!uR("concat");tR({target:"Array",proto:!0,arity:1,forced:fR},{concat:function(i){var e=aR(this),r=sR(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],dR(l))for(u=oR(l),rm(n+u),o=0;o<u;o++,n++)o in l&&nm(r,n,l[o]);else rm(n+1),nm(r,n++,l);return r.length=n,r}});var vR=Mr,pR=String,yr=function(t){if(vR(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return pR(t)},Ju={},gR=Xu,yR=Math.max,mR=Math.min,vo=function(t,i){var e=gR(t);return e<0?yR(e+i,0):mR(e,i)},$R=rr,bR=vo,wR=Dt,im=function(t){return function(i,e,r){var n=$R(i),a=wR(n),o=bR(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:im(!0),indexOf:im(!1)},po={},_R=de,Jl=He,ER=rr,SR=og.indexOf,OR=po,am=_R([].push),q_=function(t,i){var e=ER(t),r=0,n=[],a;for(a in e)!Jl(OR,a)&&Jl(e,a)&&am(n,a);for(;i.length>r;)Jl(e,a=i[r++])&&(~SR(n,a)||am(n,a));return n},sg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],TR=q_,xR=sg,go=Object.keys||function(i){return TR(i,xR)},PR=Ue,kR=B_,IR=At,CR=Rt,AR=rr,RR=go;Ju.f=PR&&!kR?Object.defineProperties:function(i,e){CR(i);for(var r=AR(e),n=RR(e),a=n.length,o=0,s;a>o;)IR.f(i,s=n[o++],r[s]);return i};var DR=pt,Y_=DR("document","documentElement"),MR=nn,NR=Ku,om=MR("keys"),el=function(t){return om[t]||(om[t]=NR(t))},FR=Rt,BR=Ju,sm=sg,LR=po,jR=Y_,zR=rg,HR=el,um=">",lm="<",fd="prototype",vd="script",X_=HR("IE_PROTO"),ec=function(){},Q_=function(t){return lm+vd+um+t+lm+"/"+vd+um},cm=function(t){t.write(Q_("")),t.close();var i=t.parentWindow.Object;return t=null,i},WR=function(){var t=zR("iframe"),i="java"+vd+":",e;return t.style.display="none",jR.appendChild(t),t.src=String(i),e=t.contentWindow.document,e.open(),e.write(Q_("document.F=Object")),e.close(),e.F},ds,qs=function(){try{ds=new ActiveXObject("htmlfile")}catch{}qs=typeof document<"u"?document.domain&&ds?cm(ds):WR():cm(ds);for(var t=sm.length;t--;)delete qs[fd][sm[t]];return qs()};LR[X_]=!0;var Kn=Object.create||function(i,e){var r;return i!==null?(ec[fd]=FR(i),r=new ec,ec[fd]=null,r[X_]=i):r=qs(),e===void 0?r:BR.f(r,e)},yo={},VR=q_,UR=sg,GR=UR.concat("length","prototype");yo.f=Object.getOwnPropertyNames||function(i){return VR(i,GR)};var ug={},hm=vo,KR=Dt,qR=Qi,YR=Array,XR=Math.max,Z_=function(t,i,e){for(var r=KR(t),n=hm(i,r),a=hm(e===void 0?r:e,r),o=YR(XR(a-n,0)),s=0;n<a;n++,s++)qR(o,s,t[n]);return o.length=s,o},QR=Rr,ZR=rr,J_=yo.f,JR=Z_,eE=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],eD=function(t){try{return J_(t)}catch{return JR(eE)}};ug.f=function(i){return eE&&QR(i)=="Window"?eD(i):J_(ZR(i))};var mo={};mo.f=Object.getOwnPropertySymbols;var tD=Dr,Zi=function(t,i,e,r){return r&&r.enumerable?t[i]=e:tD(t,i,e),t},rD=At,lg=function(t,i,e){return rD.f(t,i,e)},$o={},nD=Se;$o.f=nD;var dm=ye,iD=He,aD=$o,oD=At.f,Ie=function(t){var i=dm.Symbol||(dm.Symbol={});iD(i,t)||oD(i,t,{value:aD.f(t)})},sD=Qe,uD=pt,lD=Se,cD=Zi,tE=function(){var t=uD("Symbol"),i=t&&t.prototype,e=i&&i.valueOf,r=lD("toPrimitive");i&&!i[r]&&cD(i,r,function(n){return sD(e,this)},{arity:1})},hD=ig,dD=Mr,fD=hD?{}.toString:function(){return"[object "+dD(this)+"]"},vD=ig,pD=At.f,gD=Dr,yD=He,mD=fD,$D=Se,fm=$D("toStringTag"),qn=function(t,i,e,r){if(t){var n=e?t:t.prototype;yD(n,fm)||pD(n,fm,{configurable:!0,value:i}),r&&!vD&&gD(n,"toString",mD)}},bD=Pe,wD=ke,vm=bD.WeakMap,_D=wD(vm)&&/native code/.test(String(vm)),ED=_D,rE=Pe,SD=Ze,OD=Dr,tc=He,rc=tg,TD=el,xD=po,pm="Object already initialized",pd=rE.TypeError,PD=rE.WeakMap,fu,Ha,vu,kD=function(t){return vu(t)?Ha(t):fu(t,{})},ID=function(t){return function(i){var e;if(!SD(i)||(e=Ha(i)).type!==t)throw pd("Incompatible receiver, "+t+" required");return e}};if(ED||rc.state){var or=rc.state||(rc.state=new PD);or.get=or.get,or.has=or.has,or.set=or.set,fu=function(t,i){if(or.has(t))throw pd(pm);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=TD("state");xD[oi]=!0,fu=function(t,i){if(tc(t,oi))throw pd(pm);return i.facade=t,OD(t,oi,i),i},Ha=function(t){return tc(t,oi)?t[oi]:{}},vu=function(t){return tc(t,oi)}}var Ji={set:fu,get:Ha,has:vu,enforce:kD,getterFor:ID},CD=hn,AD=de,RD=Gu,DD=Pt,MD=Dt,ND=Zu,gm=AD([].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=DD(u),f=RD(d),v=CD(l,c),g=MD(f),b=0,p=h||ND,$=i?p(u,g):e||o?p(u,0):void 0,m,y;g>b;b++)if((s||b in f)&&(m=f[b],y=v(m,b,d),t))if(i)$[b]=y;else if(y)switch(t){case 3:return!0;case 5:return m;case 6:return b;case 2:gm($,m)}else switch(t){case 4:return!1;case 7:gm($,m)}return a?-1:r||n?n:$}},ea={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=Qe,FD=de,Ai=Ue,Ri=Yi,BD=oe,Ye=He,LD=Ee,gd=Rt,rl=rr,dg=qu,jD=yr,yd=Gn,Wa=Kn,nE=go,zD=yo,iE=ug,HD=mo,aE=Un,oE=At,WD=Ju,sE=so,ym=Zi,VD=lg,fg=nn,UD=el,uE=po,mm=Ku,GD=Se,KD=$o,qD=Ie,YD=tE,XD=qn,lE=Ji,nl=ea.forEach,wt=UD("hidden"),il="Symbol",Va="prototype",QD=lE.set,$m=lE.getterFor(il),Zt=Object[Va],Pn=cg.Symbol,Oa=Pn&&Pn[Va],ZD=cg.TypeError,nc=cg.QObject,cE=aE.f,_n=oE.f,hE=iE.f,JD=sE.f,dE=FD([].push),kr=fg("symbols"),bo=fg("op-symbols"),eM=fg("wks"),md=!nc||!nc[Va]||!nc[Va].findChild,$d=Ai&&BD(function(){return Wa(_n({},"a",{get:function(){return _n(this,"a",{value:7}).a}})).a!=7})?function(t,i,e){var r=cE(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 QD(e,{type:il,tag:t,description:i}),Ai||(e.description=i),e},al=function(i,e,r){i===Zt&&al(bo,e,r),gd(i);var n=dg(e);return gd(r),Ye(kr,n)?(r.enumerable?(Ye(i,wt)&&i[wt][n]&&(i[wt][n]=!1),r=Wa(r,{enumerable:yd(0,!1)})):(Ye(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=nE(r).concat(gE(r));return nl(n,function(a){(!Ai||hg(fE,r,a))&&al(i,a,r[a])}),i},tM=function(i,e){return e===void 0?Wa(i):vg(Wa(i),e)},fE=function(i){var e=dg(i),r=hg(JD,this,e);return this===Zt&&Ye(kr,e)&&!Ye(bo,e)?!1:r||!Ye(this,e)||!Ye(kr,e)||Ye(this,wt)&&this[wt][e]?r:!0},vE=function(i,e){var r=rl(i),n=dg(e);if(!(r===Zt&&Ye(kr,n)&&!Ye(bo,n))){var a=cE(r,n);return a&&Ye(kr,n)&&!(Ye(r,wt)&&r[wt][n])&&(a.enumerable=!0),a}},pE=function(i){var e=hE(rl(i)),r=[];return nl(e,function(n){!Ye(kr,n)&&!Ye(uE,n)&&dE(r,n)}),r},gE=function(t){var i=t===Zt,e=hE(i?bo:rl(t)),r=[];return nl(e,function(n){Ye(kr,n)&&(!i||Ye(Zt,n))&&dE(r,kr[n])}),r};Ri||(Pn=function(){if(LD(Oa,this))throw ZD("Symbol is not a constructor");var i=!arguments.length||arguments[0]===void 0?void 0:jD(arguments[0]),e=mm(i),r=function(n){this===Zt&&hg(r,bo,n),Ye(this,wt)&&Ye(this[wt],e)&&(this[wt][e]=!1),$d(this,e,yd(1,n))};return Ai&&md&&$d(Zt,e,{configurable:!0,set:r}),ic(e,i)},Oa=Pn[Va],ym(Oa,"toString",function(){return $m(this).tag}),ym(Pn,"withoutSetter",function(t){return ic(mm(t),t)}),sE.f=fE,oE.f=al,WD.f=vg,aE.f=vE,zD.f=iE.f=pE,HD.f=gE,KD.f=function(t){return ic(GD(t),t)},Ai&&VD(Oa,"description",{configurable:!0,get:function(){return $m(this).description}}));tl({global:!0,constructor:!0,wrap:!0,forced:!Ri,sham:!Ri},{Symbol:Pn});nl(nE(eM),function(t){qD(t)});tl({target:il,stat:!0,forced:!Ri},{useSetter:function(){md=!0},useSimple:function(){md=!1}});tl({target:"Object",stat:!0,forced:!Ri,sham:!Ai},{create:tM,defineProperty:al,defineProperties:vg,getOwnPropertyDescriptor:vE});tl({target:"Object",stat:!0,forced:!Ri},{getOwnPropertyNames:pE});YD();XD(Pn,il);uE[wt]=!0;var rM=Yi,yE=rM&&!!Symbol.for&&!!Symbol.keyFor,nM=U,iM=pt,aM=He,oM=yr,mE=nn,sM=yE,ac=mE("string-to-symbol-registry"),uM=mE("symbol-to-string-registry");nM({target:"Symbol",stat:!0,forced:!sM},{for:function(t){var i=oM(t);if(aM(ac,i))return ac[i];var e=iM("Symbol")(i);return ac[i]=e,uM[e]=i,e}});var lM=U,cM=He,hM=co,dM=Xi,fM=nn,vM=yE,bm=fM("symbol-to-string-registry");lM({target:"Symbol",stat:!0,forced:!vM},{keyFor:function(i){if(!hM(i))throw TypeError(dM(i)+" is not a symbol");if(cM(bm,i))return bm[i]}});var pM=de,wo=pM([].slice),gM=de,wm=dn,yM=ke,_m=Rr,mM=yr,Em=gM([].push),$M=function(t){if(yM(t))return t;if(wm(t)){for(var i=t.length,e=[],r=0;r<i;r++){var n=t[r];typeof n=="string"?Em(e,n):(typeof n=="number"||_m(n)=="Number"||_m(n)=="String")&&Em(e,mM(n))}var a=e.length,o=!0;return function(s,u){if(o)return o=!1,u;if(wm(this))return u;for(var l=0;l<a;l++)if(e[l]===s)return u}}},bM=U,$E=pt,bE=Ki,wM=Qe,_o=de,wE=oe,Sm=ke,Om=co,_E=wo,_M=$M,EM=Yi,SM=String,Qr=$E("JSON","stringify"),fs=_o(/./.exec),Tm=_o("".charAt),OM=_o("".charCodeAt),TM=_o("".replace),xM=_o(1 .toString),PM=/[\uD800-\uDFFF]/g,xm=/^[\uD800-\uDBFF]$/,Pm=/^[\uDC00-\uDFFF]$/,km=!EM||wE(function(){var t=$E("Symbol")();return Qr([t])!="[null]"||Qr({a:t})!="{}"||Qr(Object(t))!="{}"}),Im=wE(function(){return Qr("\uDF06\uD834")!=='"\\udf06\\ud834"'||Qr("\uDEAD")!=='"\\udead"'}),kM=function(t,i){var e=_E(arguments),r=_M(i);if(!(!Sm(r)&&(t===void 0||Om(t))))return e[1]=function(n,a){if(Sm(r)&&(a=wM(r,this,SM(n),a)),!Om(a))return a},bE(Qr,null,e)},IM=function(t,i,e){var r=Tm(e,i-1),n=Tm(e,i+1);return fs(xm,t)&&!fs(Pm,n)||fs(Pm,t)&&!fs(xm,r)?"\\u"+xM(OM(t,0),16):t};Qr&&bM({target:"JSON",stat:!0,arity:3,forced:km||Im},{stringify:function(i,e,r){var n=_E(arguments),a=bE(km?kM:Qr,null,n);return Im&&typeof a=="string"?TM(a,PM,IM):a}});var CM=U,AM=Yi,RM=oe,EE=mo,DM=Pt,MM=!AM||RM(function(){EE.f(1)});CM({target:"Object",stat:!0,forced:MM},{getOwnPropertySymbols:function(i){var e=EE.f;return e?e(DM(i)):[]}});var NM=Ie;NM("asyncIterator");var FM=Ie;FM("hasInstance");var BM=Ie;BM("isConcatSpreadable");var LM=Ie;LM("iterator");var jM=Ie;jM("match");var zM=Ie;zM("matchAll");var HM=Ie;HM("replace");var WM=Ie;WM("search");var VM=Ie;VM("species");var UM=Ie;UM("split");var GM=Ie,KM=tE;GM("toPrimitive");KM();var qM=pt,YM=Ie,XM=qn;YM("toStringTag");XM(qM("Symbol"),"Symbol");var QM=Ie;QM("unscopables");var ZM=Pe,JM=qn;JM(ZM.JSON,"JSON",!0);var e2=ye,t2=e2.Symbol,ta={},bd=Ue,r2=He,SE=Function.prototype,n2=bd&&Object.getOwnPropertyDescriptor,pg=r2(SE,"name"),i2=pg&&function(){}.name==="something",a2=pg&&(!bd||bd&&n2(SE,"name").configurable),OE={EXISTS:pg,PROPER:i2,CONFIGURABLE:a2},o2=oe,TE=!o2(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),s2=He,u2=ke,l2=Pt,c2=el,h2=TE,Cm=c2("IE_PROTO"),wd=Object,d2=wd.prototype,ol=h2?wd.getPrototypeOf:function(t){var i=l2(t);if(s2(i,Cm))return i[Cm];var e=i.constructor;return u2(e)&&i instanceof e?e.prototype:i instanceof wd?d2:null},f2=oe,v2=ke,p2=Ze,g2=Kn,Am=ol,y2=Zi,m2=Se,_d=m2("iterator"),xE=!1,br,oc,sc;[].keys&&(sc=[].keys(),"next"in sc?(oc=Am(Am(sc)),oc!==Object.prototype&&(br=oc)):xE=!0);var $2=!p2(br)||f2(function(){var t={};return br[_d].call(t)!==t});$2?br={}:br=g2(br);v2(br[_d])||y2(br,_d,function(){return this});var PE={IteratorPrototype:br,BUGGY_SAFARI_ITERATORS:xE},b2=PE.IteratorPrototype,w2=Kn,_2=Gn,E2=qn,S2=ta,O2=function(){return this},T2=function(t,i,e,r){var n=i+" Iterator";return t.prototype=w2(b2,{next:_2(+!r,e)}),E2(t,n,!1,!0),S2[n]=O2,t},x2=de,P2=xt,k2=function(t,i,e){try{return x2(P2(Object.getOwnPropertyDescriptor(t,i)[e]))}catch{}},I2=ke,C2=String,A2=TypeError,R2=function(t){if(typeof t=="object"||I2(t))return t;throw A2("Can't set "+C2(t)+" as a prototype")},D2=k2,M2=Rt,N2=R2,kE=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,i={},e;try{e=D2(Object.prototype,"__proto__","set"),e(i,[]),t=i instanceof Array}catch{}return function(n,a){return M2(n),N2(a),t?e(n,a):n.__proto__=a,n}}():void 0),F2=U,B2=Qe,L2=OE,j2=T2,z2=ol,H2=qn,Rm=Zi,W2=Se,Dm=ta,V2=PE,U2=L2.PROPER,vs=V2.BUGGY_SAFARI_ITERATORS,uc=W2("iterator"),Mm="keys",ps="values",Nm="entries",G2=function(){return this},gg=function(t,i,e,r,n,a,o){j2(e,i,r);var s=function(p){if(p===n&&d)return d;if(!vs&&p in c)return c[p];switch(p){case Mm:return function(){return new e(this,p)};case ps:return function(){return new e(this,p)};case Nm: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=z2(f.call(new t)),v!==Object.prototype&&v.next&&(H2(v,u,!0,!0),Dm[u]=G2)),U2&&n==ps&&h&&h.name!==ps&&(l=!0,d=function(){return B2(h,this)}),n)if(g={values:s(ps),keys:a?d:s(Mm),entries:s(Nm)},o)for(b in g)(vs||l||!(b in c))&&Rm(c,b,g[b]);else F2({target:i,proto:!0,forced:vs||l},g);return o&&c[uc]!==d&&Rm(c,uc,d,{name:n}),Dm[i]=d,g},yg=function(t,i){return{value:t,done:i}},K2=rr,Fm=ta,IE=Ji;At.f;var q2=gg,gs=yg,CE="Array Iterator",Y2=IE.set,X2=IE.getterFor(CE);q2(Array,"Array",function(t,i){Y2(this,{type:CE,target:K2(t),index:0,kind:i})},function(){var t=X2(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");Fm.Arguments=Fm.Array;var Q2={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},Z2=Q2,J2=Pe,eN=Mr,tN=Dr,Bm=ta,rN=Se,Lm=rN("toStringTag");for(var lc in Z2){var jm=J2[lc],cc=jm&&jm.prototype;cc&&eN(cc)!==Lm&&tN(cc,Lm,lc),Bm[lc]=Bm.Array}var nN=t2,AE=nN,iN=Ie;iN("dispose");var aN=AE,oN=aN,sN=Ie;sN("asyncDispose");var uN=U,lN=pt,cN=de,RE=lN("Symbol"),hN=RE.keyFor,dN=cN(RE.prototype.valueOf);uN({target:"Symbol",stat:!0},{isRegistered:function(i){try{return hN(dN(i))!==void 0}catch{return!1}}});var fN=U,vN=nn,DE=pt,pN=de,gN=co,yN=Se,pu=DE("Symbol"),zm=pu.isWellKnown,ME=DE("Object","getOwnPropertyNames"),mN=pN(pu.prototype.valueOf),Hm=vN("wks");for(var hc=0,Wm=ME(pu),$N=Wm.length;hc<$N;hc++)try{var Vm=Wm[hc];gN(pu[Vm])&&yN(Vm)}catch{}fN({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(i){if(zm&&zm(i))return!0;try{for(var e=mN(i),r=0,n=ME(Hm),a=n.length;r<a;r++)if(Hm[n[r]]==e)return!0}catch{}return!1}});var bN=Ie;bN("matcher");var wN=Ie;wN("metadataKey");var _N=Ie;_N("observable");var EN=Ie;EN("metadata");var SN=Ie;SN("patternMatch");var ON=Ie;ON("replaceAll");var TN=oN,xN=TN;(function(t){t.exports=xN})(cA);(function(t){t.exports=hd})(lA);var mi=Q(za),gu={},PN={get exports(){return gu},set exports(t){gu=t}},Ed={},kN={get exports(){return Ed},set exports(t){Ed=t}},mg=de,IN=Xu,CN=yr,AN=lo,RN=mg("".charAt),Um=mg("".charCodeAt),DN=mg("".slice),Gm=function(t){return function(i,e){var r=CN(AN(i)),n=IN(e),a=r.length,o,s;return n<0||n>=a?t?"":void 0:(o=Um(r,n),o<55296||o>56319||n+1===a||(s=Um(r,n+1))<56320||s>57343?t?RN(r,n):o:t?DN(r,n,n+2):(o-55296<<10)+(s-56320)+65536)}},MN={codeAt:Gm(!1),charAt:Gm(!0)},NN=MN.charAt,FN=yr,NE=Ji,BN=gg,Km=yg,FE="String Iterator",LN=NE.set,jN=NE.getterFor(FE);BN(String,"String",function(t){LN(this,{type:FE,string:FN(t),index:0})},function(){var i=jN(this),e=i.string,r=i.index,n;return r>=e.length?Km(void 0,!0):(n=NN(e,r),i.index+=n.length,Km(n,!1))});var zN=$o,HN=zN.f("iterator"),WN=HN,BE=WN,VN=BE,UN=VN,GN=UN,KN=GN;(function(t){t.exports=KN})(kN);(function(t){t.exports=Ed})(PN);var qN=Q(gu);function ot(t){"@babel/helpers - typeof";return ot=typeof mi=="function"&&typeof qN=="symbol"?function(i){return typeof i}:function(i){return i&&typeof mi=="function"&&i.constructor===mi&&i!==mi.prototype?"symbol":typeof i},ot(t)}var Sd={},YN={get exports(){return Sd},set exports(t){Sd=t}},Od={},XN={get exports(){return Od},set exports(t){Od=t}},QN=$o,ZN=QN.f("toPrimitive"),JN=ZN,eF=JN,tF=eF,rF=tF,nF=rF,iF=nF;(function(t){t.exports=iF})(XN);(function(t){t.exports=Od})(YN);var aF=Q(Sd);function oF(t,i){if(ot(t)!=="object"||t===null)return t;var e=t[aF];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 LE(t){var i=oF(t,"string");return ot(i)==="symbol"?i:String(i)}function qm(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,LE(r.key),r)}}function sl(t,i,e){return i&&qm(t.prototype,i),e&&qm(t,e),Yu(t,"prototype",{writable:!1}),t}function De(t,i,e){return i=LE(i),i in t?Yu(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}var Td={},sF={get exports(){return Td},set exports(t){Td=t}},jE=de,uF=xt,lF=Ze,cF=He,Ym=wo,hF=oo,zE=Function,dF=jE([].concat),fF=jE([].join),dc={},vF=function(t,i,e){if(!cF(dc,i)){for(var r=[],n=0;n<i;n++)r[n]="a["+n+"]";dc[i]=zE("C,a","return new C("+fF(r,",")+")")}return dc[i](t,e)},HE=hF?zE.bind:function(i){var e=uF(this),r=e.prototype,n=Ym(arguments,1),a=function(){var s=dF(n,Ym(arguments));return this instanceof a?vF(e,s.length,s):e.apply(i,s)};return lF(r)&&(a.prototype=r),a},pF=U,Xm=HE;pF({target:"Function",proto:!0,forced:Function.bind!==Xm},{bind:Xm});var gF=ye,We=function(t){return gF[t+"Prototype"]},yF=We,mF=yF("Function").bind,$F=Ee,bF=mF,fc=Function.prototype,wF=function(t){var i=t.bind;return t===fc||$F(fc,t)&&i===fc.bind?bF:i},_F=wF,WE=_F;(function(t){t.exports=WE})(sF);var VE=Q(Td),xd={},EF={get exports(){return xd},set exports(t){xd=t}},SF=xt,OF=Pt,TF=Gu,xF=Dt,PF=TypeError,Qm=function(t){return function(i,e,r,n){SF(e);var a=OF(i),o=TF(a),s=xF(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 PF("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}},kF={left:Qm(!1),right:Qm(!0)},IF=oe,Eo=function(t,i){var e=[][t];return!!e&&IF(function(){e.call(null,i||function(){return 1},1)})},CF=Rr,So=typeof process<"u"&&CF(process)=="process",AF=U,RF=kF.left,DF=Eo,Zm=qi,MF=So,NF=!MF&&Zm>79&&Zm<83,FF=NF||!DF("reduce");AF({target:"Array",proto:!0,forced:FF},{reduce:function(i){var e=arguments.length;return RF(this,i,e,e>1?arguments[1]:void 0)}});var BF=We,LF=BF("Array").reduce,jF=Ee,zF=LF,vc=Array.prototype,HF=function(t){var i=t.reduce;return t===vc||jF(vc,t)&&i===vc.reduce?zF:i},WF=HF,VF=WF;(function(t){t.exports=VF})(EF);var UF=Q(xd),Pd={},GF={get exports(){return Pd},set exports(t){Pd=t}},KF=U,qF=ea.filter,YF=fo,XF=YF("filter");KF({target:"Array",proto:!0,forced:!XF},{filter:function(i){return qF(this,i,arguments.length>1?arguments[1]:void 0)}});var QF=We,ZF=QF("Array").filter,JF=Ee,eB=ZF,pc=Array.prototype,tB=function(t){var i=t.filter;return t===pc||JF(pc,t)&&i===pc.filter?eB:i},rB=tB,nB=rB;(function(t){t.exports=nB})(GF);var $i=Q(Pd),kd={},iB={get exports(){return kd},set exports(t){kd=t}},aB=U,oB=ea.map,sB=fo,uB=sB("map");aB({target:"Array",proto:!0,forced:!uB},{map:function(i){return oB(this,i,arguments.length>1?arguments[1]:void 0)}});var lB=We,cB=lB("Array").map,hB=Ee,dB=cB,gc=Array.prototype,fB=function(t){var i=t.map;return t===gc||hB(gc,t)&&i===gc.map?dB:i},vB=fB,pB=vB;(function(t){t.exports=pB})(iB);var qt=Q(kd),Jm={},gB={get exports(){return Jm},set exports(t){Jm=t}},yB=dn,mB=Dt,$B=ng,bB=hn,UE=function(t,i,e,r,n,a,o,s){for(var u=n,l=0,c=o?bB(o,s):!1,h,d;l<r;)l in e&&(h=c?c(e[l],l,i):e[l],a>0&&yB(h)?(d=mB(h),u=UE(t,i,h,d,u,a-1)-1):($B(u+1),t[u]=h),u++),l++;return u},wB=UE,_B=U,EB=wB,SB=xt,OB=Pt,TB=Dt,xB=Zu;_B({target:"Array",proto:!0},{flatMap:function(i){var e=OB(this),r=TB(e),n;return SB(i),n=xB(e,0),n.length=EB(n,e,e,r,0,1,i,arguments.length>1?arguments[1]:void 0),n}});var PB=We,kB=PB("Array").flatMap,IB=Ee,CB=kB,yc=Array.prototype,AB=function(t){var i=t.flatMap;return t===yc||IB(yc,t)&&i===yc.flatMap?CB:i},RB=AB,DB=RB;(function(t){t.exports=DB})(gB);var Id={},MB={get exports(){return Id},set exports(t){Id=t}},NB=Qe,e$=Rt,FB=eg,GE=function(t,i,e){var r,n;e$(t);try{if(r=FB(t,"return"),!r){if(i==="throw")throw e;return e}r=NB(r,t)}catch(a){n=!0,r=a}if(i==="throw")throw e;if(n)throw r;return e$(r),e},BB=Rt,LB=GE,jB=function(t,i,e,r){try{return r?i(BB(e)[0],e[1]):i(e)}catch(n){LB(t,"throw",n)}},zB=Se,HB=ta,WB=zB("iterator"),VB=Array.prototype,KE=function(t){return t!==void 0&&(HB.Array===t||VB[WB]===t)},UB=Mr,t$=eg,GB=uo,KB=ta,qB=Se,YB=qB("iterator"),ul=function(t){if(!GB(t))return t$(t,YB)||t$(t,"@@iterator")||KB[UB(t)]},XB=Qe,QB=xt,ZB=Rt,JB=Xi,eL=ul,tL=TypeError,$g=function(t,i){var e=arguments.length<2?eL(t):i;if(QB(e))return ZB(XB(e,t));throw tL(JB(t)+" is not iterable")},rL=hn,nL=Qe,iL=Pt,aL=jB,oL=KE,sL=Qu,uL=Dt,r$=Qi,lL=$g,cL=ul,n$=Array,hL=function(i){var e=iL(i),r=sL(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=rL(a,n>2?arguments[2]:void 0));var s=cL(e),u=0,l,c,h,d,f,v;if(s&&!(this===n$&&oL(s)))for(d=lL(e,s),f=d.next,c=r?new this:[];!(h=nL(f,d)).done;u++)v=o?aL(d,a,[h.value,u],!0):h.value,r$(c,u,v);else for(l=uL(e),c=r?new this(l):n$(l);l>u;u++)v=o?a(e[u],u):e[u],r$(c,u,v);return c.length=u,c},dL=Se,qE=dL("iterator"),YE=!1;try{var fL=0,i$={next:function(){return{done:!!fL++}},return:function(){YE=!0}};i$[qE]=function(){return this},Array.from(i$,function(){throw 2})}catch{}var XE=function(t,i){if(!i&&!YE)return!1;var e=!1;try{var r={};r[qE]=function(){return{next:function(){return{done:e=!0}}}},t(r)}catch{}return e},vL=U,pL=hL,gL=XE,yL=!gL(function(t){Array.from(t)});vL({target:"Array",stat:!0,forced:yL},{from:pL});var mL=ye,$L=mL.Array.from,bL=$L,QE=bL;(function(t){t.exports=QE})(MB);var bg=Q(Id),Cd={},wL={get exports(){return Cd},set exports(t){Cd=t}},Ad={},_L={get exports(){return Ad},set exports(t){Ad=t}},EL=ul,SL=EL,OL=SL,TL=OL,xL=TL,PL=xL,kL=PL,IL=kL;(function(t){t.exports=IL})(_L);(function(t){t.exports=Ad})(wL);var Oo=Q(Cd),Rd={},CL={get exports(){return Rd},set exports(t){Rd=t}},AL=ye,RL=AL.Object.getOwnPropertySymbols,DL=RL,ML=DL;(function(t){t.exports=ML})(CL);var a$=Q(Rd),Dd={},NL={get exports(){return Dd},set exports(t){Dd=t}},Md={},FL={get exports(){return Md},set exports(t){Md=t}},BL=U,LL=oe,jL=rr,ZE=Un.f,JE=Ue,zL=!JE||LL(function(){ZE(1)});BL({target:"Object",stat:!0,forced:zL,sham:!JE},{getOwnPropertyDescriptor:function(i,e){return ZE(jL(i),e)}});var HL=ye,eS=HL.Object,WL=FL.exports=function(i,e){return eS.getOwnPropertyDescriptor(i,e)};eS.getOwnPropertyDescriptor.sham&&(WL.sham=!0);var VL=Md,UL=VL;(function(t){t.exports=UL})(NL);var tS=Q(Dd),Nd={},GL={get exports(){return Nd},set exports(t){Nd=t}},KL=pt,qL=de,YL=yo,XL=mo,QL=Rt,ZL=qL([].concat),wg=KL("Reflect","ownKeys")||function(i){var e=YL.f(QL(i)),r=XL.f;return r?ZL(e,r(i)):e},JL=U,ej=Ue,tj=wg,rj=rr,nj=Un,ij=Qi;JL({target:"Object",stat:!0,sham:!ej},{getOwnPropertyDescriptors:function(i){for(var e=rj(i),r=nj.f,n=tj(e),a={},o=0,s,u;n.length>o;)u=r(e,s=n[o++]),u!==void 0&&ij(a,s,u);return a}});var aj=ye,oj=aj.Object.getOwnPropertyDescriptors,sj=oj,uj=sj;(function(t){t.exports=uj})(GL);var o$=Q(Nd),Fd={},lj={get exports(){return Fd},set exports(t){Fd=t}},Bd={},cj={get exports(){return Bd},set exports(t){Bd=t}},hj=U,dj=Ue,s$=Ju.f;hj({target:"Object",stat:!0,forced:Object.defineProperties!==s$,sham:!dj},{defineProperties:s$});var fj=ye,rS=fj.Object,vj=cj.exports=function(i,e){return rS.defineProperties(i,e)};rS.defineProperties.sham&&(vj.sham=!0);var pj=Bd,gj=pj;(function(t){t.exports=gj})(lj);var yj=Q(Fd),Ld={},mj={get exports(){return Ld},set exports(t){Ld=t}};(function(t){t.exports=j_})(mj);var $j=Q(Ld),jd={},bj={get exports(){return jd},set exports(t){jd=t}},zd={},wj={get exports(){return zd},set exports(t){zd=t}},_j=U,Ej=dn;_j({target:"Array",stat:!0},{isArray:Ej});var Sj=ye,Oj=Sj.Array.isArray,Tj=Oj,nS=Tj,xj=nS,Pj=xj,kj=Pj,Ij=kj;(function(t){t.exports=Ij})(wj);(function(t){t.exports=zd})(bj);var iS=Q(jd);function Cj(t){if(iS(t))return t}function Aj(t,i){var e=t==null?null:typeof mi<"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={},Rj={get exports(){return yu},set exports(t){yu=t}},Hd={},Dj={get exports(){return Hd},set exports(t){Hd=t}},Mj=U,u$=dn,Nj=Qu,Fj=Ze,l$=vo,Bj=Dt,Lj=rr,jj=Qi,zj=Se,Hj=fo,Wj=wo,Vj=Hj("slice"),Uj=zj("species"),mc=Array,Gj=Math.max;Mj({target:"Array",proto:!0,forced:!Vj},{slice:function(i,e){var r=Lj(this),n=Bj(r),a=l$(i,n),o=l$(e===void 0?n:e,n),s,u,l;if(u$(r)&&(s=r.constructor,Nj(s)&&(s===mc||u$(s.prototype))?s=void 0:Fj(s)&&(s=s[Uj],s===null&&(s=void 0)),s===mc||s===void 0))return Wj(r,a,o);for(u=new(s===void 0?mc:s)(Gj(o-a,0)),l=0;a<o;a++,l++)a in r&&jj(u,l,r[a]);return u.length=l,u}});var Kj=We,qj=Kj("Array").slice,Yj=Ee,Xj=qj,$c=Array.prototype,Qj=function(t){var i=t.slice;return t===$c||Yj($c,t)&&i===$c.slice?Xj:i},Zj=Qj,aS=Zj,Jj=aS,ez=Jj,tz=ez,rz=tz;(function(t){t.exports=rz})(Dj);(function(t){t.exports=Hd})(Rj);var nz=Q(yu),Wd={},iz={get exports(){return Wd},set exports(t){Wd=t}},Vd={},az={get exports(){return Vd},set exports(t){Vd=t}},oz=QE,sz=oz,uz=sz,lz=uz;(function(t){t.exports=lz})(az);(function(t){t.exports=Vd})(iz);var oS=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 sS(t,i){var e;if(t){if(typeof t=="string")return Ud(t,i);var r=nz(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return oS(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ud(t,i)}}function cz(){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 Cj(t)||Aj(t,i)||sS(t,i)||cz()}function hz(t){if(iS(t))return Ud(t)}function dz(t){if(typeof mi<"u"&&Oo(t)!=null||t["@@iterator"]!=null)return oS(t)}function fz(){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 hz(t)||dz(t)||sS(t)||fz()}var Gd={},vz={get exports(){return Gd},set exports(t){Gd=t}};(function(t){t.exports=AE})(vz);var ll=Q(Gd),Kd={},pz={get exports(){return Kd},set exports(t){Kd=t}},gz=We,yz=gz("Array").concat,mz=Ee,$z=yz,bc=Array.prototype,bz=function(t){var i=t.concat;return t===bc||mz(bc,t)&&i===bc.concat?$z:i},wz=bz,_z=wz;(function(t){t.exports=_z})(pz);var cl=Q(Kd),qd={},Ez={get exports(){return qd},set exports(t){qd=t}};(function(t){t.exports=aS})(Ez);var hl=Q(qd),Yd={},Sz={get exports(){return Yd},set exports(t){Yd=t}},Oz=U,Tz=wg;Oz({target:"Reflect",stat:!0},{ownKeys:Tz});var xz=ye,Pz=xz.Reflect.ownKeys,kz=Pz,Iz=kz;(function(t){t.exports=Iz})(Sz);var Cz=Q(Yd),Xd={},Az={get exports(){return Xd},set exports(t){Xd=t}};(function(t){t.exports=nS})(Az);var It=Q(Xd),Qd={},Rz={get exports(){return Qd},set exports(t){Qd=t}},Dz=U,Mz=Pt,uS=go,Nz=oe,Fz=Nz(function(){uS(1)});Dz({target:"Object",stat:!0,forced:Fz},{keys:function(i){return uS(Mz(i))}});var Bz=ye,Lz=Bz.Object.keys,jz=Lz,zz=jz;(function(t){t.exports=zz})(Rz);var _g=Q(Qd),c$={},Hz={get exports(){return c$},set exports(t){c$=t}},Wz=U,Vz=de,lS=Date,Uz=Vz(lS.prototype.getTime);Wz({target:"Date",stat:!0},{now:function(){return Uz(new lS)}});var Gz=ye,Kz=Gz.Date.now,qz=Kz,Yz=qz;(function(t){t.exports=Yz})(Hz);var Zd={},Xz={get exports(){return Zd},set exports(t){Zd=t}},Qz=ea.forEach,Zz=Eo,Jz=Zz("forEach"),e3=Jz?[].forEach:function(i){return Qz(this,i,arguments.length>1?arguments[1]:void 0)},t3=U,h$=e3;t3({target:"Array",proto:!0,forced:[].forEach!=h$},{forEach:h$});var r3=We,n3=r3("Array").forEach,i3=n3,a3=i3,o3=Mr,s3=He,u3=Ee,l3=a3,wc=Array.prototype,c3={DOMTokenList:!0,NodeList:!0},cS=function(t){var i=t.forEach;return t===wc||u3(wc,t)&&i===wc.forEach||s3(c3,o3(t))?l3:i};(function(t){t.exports=cS})(Xz);var Nn=Q(Zd),Jd={},h3={get exports(){return Jd},set exports(t){Jd=t}},d3=U,f3=de,v3=dn,p3=f3([].reverse),d$=[1,2];d3({target:"Array",proto:!0,forced:String(d$)===String(d$.reverse())},{reverse:function(){return v3(this)&&(this.length=this.length),p3(this)}});var g3=We,y3=g3("Array").reverse,m3=Ee,$3=y3,_c=Array.prototype,b3=function(t){var i=t.reverse;return t===_c||m3(_c,t)&&i===_c.reverse?$3:i},w3=b3,hS=w3;(function(t){t.exports=hS})(h3);var _3=Q(Jd),ef={},E3={get exports(){return ef},set exports(t){ef=t}},S3=Ue,O3=dn,T3=TypeError,x3=Object.getOwnPropertyDescriptor,P3=S3&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),k3=P3?function(t,i){if(O3(t)&&!x3(t,"length").writable)throw T3("Cannot set read only .length");return t.length=i}:function(t,i){return t.length=i},f$=Xi,I3=TypeError,dS=function(t,i){if(!delete t[i])throw I3("Cannot delete property "+f$(i)+" of "+f$(t))},C3=U,A3=Pt,R3=vo,D3=Xu,M3=Dt,N3=k3,F3=ng,B3=Zu,L3=Qi,Ec=dS,j3=fo,z3=j3("splice"),H3=Math.max,W3=Math.min;C3({target:"Array",proto:!0,forced:!z3},{splice:function(i,e){var r=A3(this),n=M3(r),a=R3(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=W3(H3(D3(e),0),n-a)),F3(n+s-u),l=B3(r,u),c=0;c<u;c++)h=a+c,h in r&&L3(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 N3(r,n-u+s),l}});var V3=We,U3=V3("Array").splice,G3=Ee,K3=U3,Sc=Array.prototype,q3=function(t){var i=t.splice;return t===Sc||G3(Sc,t)&&i===Sc.splice?K3:i},Y3=q3,X3=Y3;(function(t){t.exports=X3})(E3);var fS=Q(ef),tf={},Q3={get exports(){return tf},set exports(t){tf=t}},v$=Ue,Z3=de,J3=Qe,e5=oe,Oc=go,t5=mo,r5=so,n5=Pt,i5=Gu,si=Object.assign,p$=Object.defineProperty,a5=Z3([].concat),o5=!si||e5(function(){if(v$&&si({b:1},si(p$({},"a",{enumerable:!0,get:function(){p$(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=n5(i),n=arguments.length,a=1,o=t5.f,s=r5.f;n>a;)for(var u=i5(arguments[a++]),l=o?a5(Oc(u),o(u)):Oc(u),c=l.length,h=0,d;c>h;)d=l[h++],(!v$||J3(s,u,d))&&(r[d]=u[d]);return r}:si,s5=U,g$=o5;s5({target:"Object",stat:!0,arity:2,forced:Object.assign!==g$},{assign:g$});var u5=ye,l5=u5.Object.assign,c5=l5,h5=c5;(function(t){t.exports=h5})(Q3);var d5=Q(tf),y$={},f5={get exports(){return y$},set exports(t){y$=t}},v5=U,p5=og.includes,g5=oe,y5=g5(function(){return!Array(1).includes()});v5({target:"Array",proto:!0,forced:y5},{includes:function(i){return p5(this,i,arguments.length>1?arguments[1]:void 0)}});var m5=We,$5=m5("Array").includes,b5=Ze,w5=Rr,_5=Se,E5=_5("match"),S5=function(t){var i;return b5(t)&&((i=t[E5])!==void 0?!!i:w5(t)=="RegExp")},O5=S5,T5=TypeError,x5=function(t){if(O5(t))throw T5("The method doesn't accept regular expressions");return t},P5=Se,k5=P5("match"),I5=function(t){var i=/./;try{"/./"[t](i)}catch{try{return i[k5]=!1,"/./"[t](i)}catch{}}return!1},C5=U,A5=de,R5=x5,D5=lo,m$=yr,M5=I5,N5=A5("".indexOf);C5({target:"String",proto:!0,forced:!M5("includes")},{includes:function(i){return!!~N5(m$(D5(this)),m$(R5(i)),arguments.length>1?arguments[1]:void 0)}});var F5=We,B5=F5("String").includes,$$=Ee,L5=$5,j5=B5,Tc=Array.prototype,xc=String.prototype,z5=function(t){var i=t.includes;return t===Tc||$$(Tc,t)&&i===Tc.includes?L5:typeof t=="string"||t===xc||$$(xc,t)&&i===xc.includes?j5:i},H5=z5,W5=H5;(function(t){t.exports=W5})(f5);var b$={},V5={get exports(){return b$},set exports(t){b$=t}},U5=U,G5=oe,K5=Pt,vS=ol,q5=TE,Y5=G5(function(){vS(1)});U5({target:"Object",stat:!0,forced:Y5,sham:!q5},{getPrototypeOf:function(i){return vS(K5(i))}});var X5=ye,Q5=X5.Object.getPrototypeOf,Z5=Q5,pS=Z5;(function(t){t.exports=pS})(V5);var w$={},J5={get exports(){return w$},set exports(t){w$=t}},e4=Ue,gS=de,t4=go,r4=rr,n4=so.f,i4=gS(n4),a4=gS([].push),_$=function(t){return function(i){for(var e=r4(i),r=t4(e),n=r.length,a=0,o=[],s;n>a;)s=r[a++],(!e4||i4(e,s))&&a4(o,t?[s,e[s]]:e[s]);return o}},o4={entries:_$(!0),values:_$(!1)},s4=U,u4=o4.values;s4({target:"Object",stat:!0},{values:function(i){return u4(i)}});var l4=ye,c4=l4.Object.values,h4=c4,d4=h4;(function(t){t.exports=d4})(J5);var E$={},f4={get exports(){return E$},set exports(t){E$=t}},Eg=`
28
+ \v\f\r                 \u2028\u2029\uFEFF`,v4=de,p4=lo,g4=yr,rf=Eg,S$=v4("".replace),y4=RegExp("^["+rf+"]+"),m4=RegExp("(^|[^"+rf+"])["+rf+"]+$"),Pc=function(t){return function(i){var e=g4(p4(i));return t&1&&(e=S$(e,y4,"")),t&2&&(e=S$(e,m4,"$1")),e}},yS={start:Pc(1),end:Pc(2),trim:Pc(3)},mS=Pe,$4=oe,b4=de,w4=yr,_4=yS.trim,O$=Eg,ka=mS.parseInt,T$=mS.Symbol,x$=T$&&T$.iterator,$S=/^[+-]?0x/i,E4=b4($S.exec),S4=ka(O$+"08")!==8||ka(O$+"0x16")!==22||x$&&!$4(function(){ka(Object(x$))}),O4=S4?function(i,e){var r=_4(w4(i));return ka(r,e>>>0||(E4($S,r)?16:10))}:ka,T4=U,P$=O4;T4({global:!0,forced:parseInt!=P$},{parseInt:P$});var x4=ye,P4=x4.parseInt,k4=P4,I4=k4;(function(t){t.exports=I4})(f4);var k$={},C4={get exports(){return k$},set exports(t){k$=t}},A4=U,R4=Jp,D4=og.indexOf,M4=Eo,nf=R4([].indexOf),bS=!!nf&&1/nf([1],1,-0)<0,N4=bS||!M4("indexOf");A4({target:"Array",proto:!0,forced:N4},{indexOf:function(i){var e=arguments.length>1?arguments[1]:void 0;return bS?nf(this,i,e)||0:D4(this,i,e)}});var F4=We,B4=F4("Array").indexOf,L4=Ee,j4=B4,kc=Array.prototype,z4=function(t){var i=t.indexOf;return t===kc||L4(kc,t)&&i===kc.indexOf?j4:i},H4=z4,W4=H4;(function(t){t.exports=W4})(C4);var I$={},V4={get exports(){return I$},set exports(t){I$=t}},U4=OE.PROPER,G4=oe,C$=Eg,A$="​…᠎",K4=function(t){return G4(function(){return!!C$[t]()||A$[t]()!==A$||U4&&C$[t].name!==t})},q4=U,Y4=yS.trim,X4=K4;q4({target:"String",proto:!0,forced:X4("trim")},{trim:function(){return Y4(this)}});var Q4=We,Z4=Q4("String").trim,J4=Ee,eH=Z4,Ic=String.prototype,tH=function(t){var i=t.trim;return typeof t=="string"||t===Ic||J4(Ic,t)&&i===Ic.trim?eH:i},rH=tH,nH=rH;(function(t){t.exports=nH})(V4);var af={},iH={get exports(){return af},set exports(t){af=t}},aH=U,oH=Ue,sH=Kn;aH({target:"Object",stat:!0,sham:!oH},{create:sH});var uH=ye,lH=uH.Object,cH=function(i,e){return lH.create(i,e)},hH=cH,wS=hH;(function(t){t.exports=wS})(iH);var dH=Q(af),of={},fH={get exports(){return of},set exports(t){of=t}},sf=ye,vH=Ki;sf.JSON||(sf.JSON={stringify:JSON.stringify});var pH=function(i,e,r){return vH(sf.JSON.stringify,null,arguments)},gH=pH,yH=gH;(function(t){t.exports=yH})(fH);var mH=Q(of),uf={},$H={get exports(){return uf},set exports(t){uf=t}},bH=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",wH=TypeError,_S=function(t,i){if(t<i)throw wH("Not enough arguments");return t},ES=Pe,_H=Ki,EH=ke,SH=bH,OH=cn,TH=wo,xH=_S,PH=ES.Function,kH=/MSIE .\./.test(OH)||SH&&function(){var t=ES.Bun.version.split(".");return t.length<3||t[0]==0&&(t[1]<3||t[1]==3&&t[2]==0)}(),SS=function(t,i){var e=i?2:1;return kH?function(r,n){var a=xH(arguments.length,1)>e,o=EH(r)?r:PH(r),s=a?TH(arguments,e):[],u=a?function(){_H(o,this,s)}:o;return i?t(u,n):t(u)}:t},IH=U,OS=Pe,CH=SS,R$=CH(OS.setInterval,!0);IH({global:!0,bind:!0,forced:OS.setInterval!==R$},{setInterval:R$});var AH=U,TS=Pe,RH=SS,D$=RH(TS.setTimeout,!0);AH({global:!0,bind:!0,forced:TS.setTimeout!==D$},{setTimeout:D$});var DH=ye,MH=DH.setTimeout;(function(t){t.exports=MH})($H);var NH=Q(uf),M$={},FH={get exports(){return M$},set exports(t){M$=t}},BH=Pt,N$=vo,LH=Dt,jH=function(i){for(var e=BH(this),r=LH(e),n=arguments.length,a=N$(n>1?arguments[1]:void 0,r),o=n>2?arguments[2]:void 0,s=o===void 0?r:N$(o,r);s>a;)e[a++]=i;return e},zH=U,HH=jH;zH({target:"Array",proto:!0},{fill:HH});var WH=We,VH=WH("Array").fill,UH=Ee,GH=VH,Cc=Array.prototype,KH=function(t){var i=t.fill;return t===Cc||UH(Cc,t)&&i===Cc.fill?GH:i},qH=KH,YH=qH;(function(t){t.exports=YH})(FH);var lf={},XH={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}})(XH);var QH=lf;/*! Hammer.JS - v2.0.17-rc - 2019-12-16
29
29
  * http://naver.github.io/egjs
30
30
  *
31
31
  * Forked By Naver egjs
32
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"],XH=typeof document>"u"?{style:{}}:document.createElement("div"),QH="function",bi=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(XH.style,"touchAction"),xS=TS!==void 0;function ZH(){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=ZH(),JH=/mobile|tablet|ip(ad|hone|od)|android/i,IS="ontouchstart"in wr,eW=dl(wr,"PointerEvent")!==void 0,tW=IS&&JH.test(navigator.userAgent),To="touch",rW="pen",Og="mouse",nW="kinect",iW=25,ft=1,Yn=2,Le=4,Ot=8,mu=1,xo=2,Po=4,ko=8,Di=16,fr=xo|Po,In=ko|Di,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===QH?t.apply(i&&i[0]||void 0,i):t}function On(t,i){return t.indexOf(i)>-1}function aW(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()))}),aW(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:bi(t[0].clientX),y:bi(t[0].clientY)};for(var e=0,r=0,n=0;n<i;)e+=t[n].clientX,r+=t[n].clientY,n++;return{x:bi(e/i),y:bi(r/i)}}function F$(t){for(var i=[],e=0;e<t.pointers.length;)i[e]={clientX:bi(t.pointers[e].clientX),clientY:bi(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:Di}function oW(t,i){var e=i.center,r=t.offsetDelta||{},n=t.prevDelta||{},a=t.prevInput||{};(i.eventType===ft||a.eventType===Le)&&(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 sW(t,i){return bu(i[0],i[1],$u)/bu(t[0],t[1],$u)}function uW(t,i){return df(i[1],i[0],$u)+df(t[1],t[0],$u)}function lW(t,i){var e=t.lastInterval||i,r=i.timeStamp-e.timeStamp,n,a,o,s;if(i.eventType!==Ot&&(r>iW||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 cW(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),oW(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?sW(o.pointers,r):1,i.rotation=o?uW(o.pointers,r):0,i.maxPointers=e.prevInput?i.pointers.length>e.prevInput.maxPointers?i.pointers.length:e.prevInput.maxPointers:i.pointers.length,lW(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 hW(t,i,e){var r=e.pointers.length,n=e.changedPointers.length,a=i&ft&&r-n===0,o=i&(Le|Ot)&&r-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(t.session={}),e.eventType=i,cW(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 ra=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 dW={pointerdown:ft,pointermove:Yn,pointerup:Le,pointercancel:Ot,pointerout:Ot},fW={2:To,3:rW,4:Og,5:nW},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=dW[s],l=fW[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&(Le|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}(ra);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 vW={touchstart:ft,touchmove:Yn,touchend:Le,touchcancel:Ot},pW="touchstart touchmove touchend touchcancel",Pg=function(t){Wt(i,t);function i(){var r;return i.prototype.evTarget=pW,r=t.apply(this,arguments)||this,r.targetIds={},r}var e=i.prototype;return e.handler=function(n){var a=vW[n.type],o=gW.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:To,srcEvent:n})},i}(ra);function gW(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&(Le|Ot)&&delete r[o[n].identifier],n++;if(s.length)return[xg(a.concat(s),"identifier",!0),s]}var yW={mousedown:ft,mousemove:Yn,mouseup:Le},mW="mousedown",$W="mousemove mouseup",kg=function(t){Wt(i,t);function i(){var r,n=i.prototype;return n.evEl=mW,n.evWin=$W,r=t.apply(this,arguments)||this,r.pressed=!1,r}var e=i.prototype;return e.handler=function(n){var a=yW[n.type];a&ft&&n.button===0&&(this.pressed=!0),a&Yn&&n.which!==1&&(a=Le),this.pressed&&(a&Le&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[n],changedPointers:[n],pointerType:Og,srcEvent:n}))},i}(ra),bW=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,bW)}}function wW(t,i){t&ft?(this.primaryTouch=i.changedPointers[0].identifier,j$.call(this,i)):t&(Le|Ot)&&j$.call(this,i)}function _W(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)wW.call(ys(ys(o)),u,l);else if(h&&_W.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}(ra);return t}();function EW(t){var i,e=t.options.inputClass;return e?i=e:eW?i=LS:tW?i=Pg:IS?i=jS:i=kg,new i(t,hW)}function wi(t,i,e){return Array.isArray(t)?(_r(t,e[i],e),!0):!1}var Ys=1,zt=2,Mi=4,Zr=8,Er=Zr,Ya=16,cr=32,SW=1;function OW(){return SW++}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&Mi?"move":t&zt?"start":""}var Io=function(){function t(e){e===void 0&&(e={}),this.options=er({enable:!0},e),this.id=OW(),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(wi(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 wi(r,"dropRecognizeWith",this)?this:(r=$s(r,this),delete this.simultaneous[r.id],this)},i.requireFailure=function(r){if(wi(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(wi(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|Mi|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!==Le)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),Ni=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|Mi),u=this.attrTest(n);return s&&(o&Ot||!u)?a|Ya:s||u?o&Le?a|Zr:a&zt?a|Mi:zt:cr},i}(Io);function zS(t){return t===Di?"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:Di,o=c!==this.pY,s=Math.abs(n.deltaY))),n.direction=u,o&&s>a.threshold&&u&a.direction},e.attrTest=function(n){return Ni.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}(Ni),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&Le},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}(Ni),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}(Ni),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}(Ni),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&(Le|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&Le)return Er;return cr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===Er&&(n&&n.eventType&Le?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]],TW=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 xW(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=EW(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$:TW},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|Mi|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(wi(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(wi(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&&xW(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}(),PW={touchstart:ft,touchmove:Yn,touchend:Le,touchcancel:Ot},kW="touchstart",IW="touchstart touchmove touchend touchcancel",CW=function(t){Wt(i,t);function i(){var r,n=i.prototype;return n.evTarget=kW,n.evWin=IW,r=t.apply(this,arguments)||this,r.started=!1,r}var e=i.prototype;return e.handler=function(n){var a=PW[n.type];if(a===ft&&(this.started=!0),!!this.started){var o=AW.call(this,n,a);a&(Le|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}(ra);function AW(t,i){var e=qa(t.touches),r=qa(t.changedTouches);return i&(Le|Ot)&&(e=xg(e.concat(r),"identifier",!0)),[e,r]}function KS(t,i,e){var r="DEPRECATED METHOD: "+i+`
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,F$=["","webkit","Moz","MS","ms","o"],ZH=typeof document>"u"?{style:{}}:document.createElement("div"),JH="function",bi=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<F$.length;){if(e=F$[a],r=e?e+n:i,r in t)return r;a++}}var wr;typeof window>"u"?wr={}:wr=window;var xS=dl(ZH.style,"touchAction"),PS=xS!==void 0;function eW(){if(!PS)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 kS="compute",IS="auto",hf="manipulation",kn="none",Ua="pan-x",Ga="pan-y",ms=eW(),tW=/mobile|tablet|ip(ad|hone|od)|android/i,CS="ontouchstart"in wr,rW=dl(wr,"PointerEvent")!==void 0,nW=CS&&tW.test(navigator.userAgent),To="touch",iW="pen",Og="mouse",aW="kinect",oW=25,ft=1,Yn=2,Le=4,Ot=8,mu=1,xo=2,Po=4,ko=8,Di=16,fr=xo|Po,In=ko|Di,AS=fr|In,RS=["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===JH?t.apply(i&&i[0]||void 0,i):t}function On(t,i){return t.indexOf(i)>-1}function sW(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:IS}var DS=function(){function t(e,r){this.manager=e,this.set(r)}var i=t.prototype;return i.set=function(r){r===kS&&(r=this.compute()),PS&&this.manager.element.style&&ms[r]&&(this.manager.element.style[xS]=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()))}),sW(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 MS(t){var i=t.length;if(i===1)return{x:bi(t[0].clientX),y:bi(t[0].clientY)};for(var e=0,r=0,n=0;n<i;)e+=t[n].clientX,r+=t[n].clientY,n++;return{x:bi(e/i),y:bi(r/i)}}function B$(t){for(var i=[],e=0;e<t.pointers.length;)i[e]={clientX:bi(t.pointers[e].clientX),clientY:bi(t.pointers[e].clientY)},e++;return{timeStamp:Sg(),pointers:i,center:MS(i),deltaX:t.deltaX,deltaY:t.deltaY}}function bu(t,i,e){e||(e=RS);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=RS);var r=i[e[0]]-t[e[0]],n=i[e[1]]-t[e[1]];return Math.atan2(n,r)*180/Math.PI}function NS(t,i){return t===i?mu:Bn(t)>=Bn(i)?t<0?xo:Po:i<0?ko:Di}function uW(t,i){var e=i.center,r=t.offsetDelta||{},n=t.prevDelta||{},a=t.prevInput||{};(i.eventType===ft||a.eventType===Le)&&(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 FS(t,i,e){return{x:i/t||0,y:e/t||0}}function lW(t,i){return bu(i[0],i[1],$u)/bu(t[0],t[1],$u)}function cW(t,i){return df(i[1],i[0],$u)+df(t[1],t[0],$u)}function hW(t,i){var e=t.lastInterval||i,r=i.timeStamp-e.timeStamp,n,a,o,s;if(i.eventType!==Ot&&(r>oW||e.velocity===void 0)){var u=i.deltaX-e.deltaX,l=i.deltaY-e.deltaY,c=FS(r,u,l);a=c.x,o=c.y,n=Bn(c.x)>Bn(c.y)?c.x:c.y,s=NS(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 dW(t,i){var e=t.session,r=i.pointers,n=r.length;e.firstInput||(e.firstInput=B$(i)),n>1&&!e.firstMultiple?e.firstMultiple=B$(i):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=i.center=MS(r);i.timeStamp=Sg(),i.deltaTime=i.timeStamp-a.timeStamp,i.angle=df(s,u),i.distance=bu(s,u),uW(e,i),i.offsetDirection=NS(i.deltaX,i.deltaY);var l=FS(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?lW(o.pointers,r):1,i.rotation=o?cW(o.pointers,r):0,i.maxPointers=e.prevInput?i.pointers.length>e.prevInput.maxPointers?i.pointers.length:e.prevInput.maxPointers:i.pointers.length,hW(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 fW(t,i,e){var r=e.pointers.length,n=e.changedPointers.length,a=i&ft&&r-n===0,o=i&(Le|Ot)&&r-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(t.session={}),e.eventType=i,dW(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 L$(t){var i=t.ownerDocument||t;return i.defaultView||i.parentWindow||window}var ra=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(L$(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(L$(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 vW={pointerdown:ft,pointermove:Yn,pointerup:Le,pointercancel:Ot,pointerout:Ot},pW={2:To,3:iW,4:Og,5:aW},BS="pointerdown",LS="pointermove pointerup pointercancel";wr.MSPointerEvent&&!wr.PointerEvent&&(BS="MSPointerDown",LS="MSPointerMove MSPointerUp MSPointerCancel");var jS=function(t){Wt(i,t);function i(){var r,n=i.prototype;return n.evEl=BS,n.evWin=LS,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=vW[s],l=pW[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&(Le|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}(ra);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 gW={touchstart:ft,touchmove:Yn,touchend:Le,touchcancel:Ot},yW="touchstart touchmove touchend touchcancel",Pg=function(t){Wt(i,t);function i(){var r;return i.prototype.evTarget=yW,r=t.apply(this,arguments)||this,r.targetIds={},r}var e=i.prototype;return e.handler=function(n){var a=gW[n.type],o=mW.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:To,srcEvent:n})},i}(ra);function mW(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&(Le|Ot)&&delete r[o[n].identifier],n++;if(s.length)return[xg(a.concat(s),"identifier",!0),s]}var $W={mousedown:ft,mousemove:Yn,mouseup:Le},bW="mousedown",wW="mousemove mouseup",kg=function(t){Wt(i,t);function i(){var r,n=i.prototype;return n.evEl=bW,n.evWin=wW,r=t.apply(this,arguments)||this,r.pressed=!1,r}var e=i.prototype;return e.handler=function(n){var a=$W[n.type];a&ft&&n.button===0&&(this.pressed=!0),a&Yn&&n.which!==1&&(a=Le),this.pressed&&(a&Le&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[n],changedPointers:[n],pointerType:Og,srcEvent:n}))},i}(ra),_W=2500,j$=25;function z$(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,_W)}}function EW(t,i){t&ft?(this.primaryTouch=i.changedPointers[0].identifier,z$.call(this,i)):t&(Le|Ot)&&z$.call(this,i)}function SW(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<=j$&&o<=j$)return!0}return!1}var zS=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)EW.call(ys(ys(o)),u,l);else if(h&&SW.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}(ra);return t}();function OW(t){var i,e=t.options.inputClass;return e?i=e:rW?i=jS:nW?i=Pg:CS?i=zS:i=kg,new i(t,fW)}function wi(t,i,e){return Array.isArray(t)?(_r(t,e[i],e),!0):!1}var Ys=1,zt=2,Mi=4,Zr=8,Er=Zr,Ya=16,cr=32,TW=1;function xW(){return TW++}function $s(t,i){var e=i.manager;return e?e.get(t):t}function H$(t){return t&Ya?"cancel":t&Zr?"end":t&Mi?"move":t&zt?"start":""}var Io=function(){function t(e){e===void 0&&(e={}),this.options=er({enable:!0},e),this.id=xW(),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(wi(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 wi(r,"dropRecognizeWith",this)?this:(r=$s(r,this),delete this.simultaneous[r.id],this)},i.requireFailure=function(r){if(wi(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(wi(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+H$(a)),o(n.options.event),r.additionalEvent&&o(r.additionalEvent),a>=Zr&&o(n.options.event+H$(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|Mi|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!==Le)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),Ni=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|Mi),u=this.attrTest(n);return s&&(o&Ot||!u)?a|Ya:s||u?o&Le?a|Zr:a&zt?a|Mi:zt:cr},i}(Io);function HS(t){return t===Di?"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:AS},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:Di,o=c!==this.pY,s=Math.abs(n.deltaY))),n.direction=u,o&&s>a.threshold&&u&a.direction},e.attrTest=function(n){return Ni.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=HS(n.direction);a&&(n.additionalEvent=this.options.event+a),t.prototype.emit.call(this,n)},i}(Ni),WS=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&Le},e.emit=function(n){var a=HS(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},i}(Ni),VS=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}(Ni),US=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}(Ni),GS=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[IS]},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&(Le|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&Le)return Er;return cr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===Er&&(n&&n.eventType&Le?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=Sg(),this.manager.emit(this.options.event,this._input)))},i}(Io),KS={domEvents:!1,touchAction:kS,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},W$=[[US,{enable:!1}],[VS,{enable:!1},["rotate"]],[WS,{direction:fr}],[Ig,{direction:fr},["swipe"]],[ff],[ff,{event:"doubletap",taps:2},["tap"]],[GS]],PW=1,V$=2;function U$(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 kW(t,i){var e=document.createEvent("Event");e.initEvent(t,!0,!0),e.gesture=i,i.target.dispatchEvent(e)}var G$=function(){function t(e,r){var n=this;this.options=Fn({},KS,r||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=OW(this),this.touchAction=new DS(this,this.options.touchAction),U$(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?V$:PW},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!==V$&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(r):a.reset(),!s&&a.state&(zt|Mi|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(wi(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(wi(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&&kW(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&&U$(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),IW={touchstart:ft,touchmove:Yn,touchend:Le,touchcancel:Ot},CW="touchstart",AW="touchstart touchmove touchend touchcancel",RW=function(t){Wt(i,t);function i(){var r,n=i.prototype;return n.evTarget=CW,n.evWin=AW,r=t.apply(this,arguments)||this,r.started=!1,r}var e=i.prototype;return e.handler=function(n){var a=IW[n.type];if(a===ft&&(this.started=!0),!!this.started){var o=DW.call(this,n,a);a&(Le|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}(ra);function DW(t,i){var e=qa(t.touches),r=qa(t.changedTouches);return i&(Le|Ot)&&(e=xg(e.concat(r),"identifier",!0)),[e,r]}function qS(t,i,e){var r="DEPRECATED METHOD: "+i+`
34
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`."),RW=KS(function(t,i){return qS(t,i,!0)},"merge","Use `assign`.");function DW(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 MW=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=Di,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=Di,t.INPUT_START=ft,t.INPUT_MOVE=Yn,t.INPUT_END=Le,t.INPUT_CANCEL=Ot,t.STATE_POSSIBLE=Ys,t.STATE_BEGAN=zt,t.STATE_CHANGED=Mi,t.STATE_ENDED=Zr,t.STATE_RECOGNIZED=Er,t.STATE_CANCELLED=Ya,t.STATE_FAILED=cr,t.Manager=U$,t.Input=ra,t.TouchAction=RS,t.TouchInput=Pg,t.MouseInput=kg,t.PointerEventInput=LS,t.TouchMouseInput=jS,t.SingleTouchInput=CW,t.Recognizer=Io,t.AttrRecognizer=Ni,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=RW,t.extend=qS,t.bindFn=G$,t.assign=Fn,t.inherit=DW,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}(),NW=MW;function YS(t,i){var e=typeof ll<"u"&&Oo(t)||t["@@iterator"];if(!e){if(It(t)||(e=FW(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 FW(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 BW(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(kz(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 LW(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}}}var jW=typeof window<"u"?window.Hammer||NW:function(){return LW()};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=jW(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){zW(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()}}YH($r.prototype);$r.current=null;$r.prototype.destroy=function(){var t,i;this.deactivate();var e=YS(b3(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 zW(t,i){for(;t;){if(t===i)return!0;t=t.parentNode}return!1}var vf={},HW={get exports(){return vf},set exports(t){vf=t}},WW=Qu,VW=Xi,UW=TypeError,eO=function(t){if(WW(t))return t;throw UW(VW(t)+" is not a constructor")},GW=U,KW=pt,Ac=Ki,qW=zE,q$=eO,YW=Rt,Y$=Ze,XW=Kn,tO=oe,Cg=KW("Reflect","construct"),QW=Object.prototype,ZW=[].push,rO=tO(function(){function t(){}return!(Cg(function(){},[],t)instanceof t)}),nO=!tO(function(){Cg(function(){})}),X$=rO||nO;GW({target:"Reflect",stat:!0,forced:X$,sham:X$},{construct:function(i,e){q$(i),YW(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(ZW,n,e),new(Ac(qW,i,n))}var a=r.prototype,o=XW(Y$(a)?a:QW),s=Ac(i,o,e);return Y$(s)?s:o}});var JW=ye,e6=JW.Reflect.construct,t6=e6,r6=t6;(function(t){t.exports=r6})(HW);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={},n6={get exports(){return _u},set exports(t){_u=t}},pf={},i6={get exports(){return pf},set exports(t){pf=t}},a6=bS,o6=a6,s6=o6,u6=s6;(function(t){t.exports=u6})(i6);(function(t){t.exports=pf})(n6);var l6=Q(_u),Eu={},c6={get exports(){return Eu},set exports(t){Eu=t}},gf={},h6={get exports(){return gf},set exports(t){gf=t}},d6=U,f6=PE;d6({target:"Object",stat:!0},{setPrototypeOf:f6});var v6=ye,p6=v6.Object.setPrototypeOf,g6=p6,y6=g6,m6=y6,$6=m6,b6=$6,w6=b6;(function(t){t.exports=w6})(h6);(function(t){t.exports=gf})(c6);var yf=Q(Eu),mf={},_6={get exports(){return mf},set exports(t){mf=t}},$f={},E6={get exports(){return $f},set exports(t){$f=t}},S6=HE,O6=S6,T6=O6,x6=T6;(function(t){t.exports=x6})(E6);(function(t){t.exports=$f})(_6);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 P6(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=l6(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Yu(t,"prototype",{writable:!1}),i&&bf(t,i)}function k6(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={},I6={get exports(){return Su},set exports(t){Su=t}},wf={},C6={get exports(){return wf},set exports(t){wf=t}},A6=vS,R6=A6,D6=R6,M6=D6;(function(t){t.exports=M6})(C6);(function(t){t.exports=wf})(I6);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={},N6={get exports(){return _f},set exports(t){_f=t}},Ef={},F6={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})(F6);var Sf={},B6={get exports(){return Sf},set exports(t){Sf=t}},Of={},L6={get exports(){return Of},set exports(t){Of=t}},j6=lS,z6=j6,H6=z6,W6=H6;(function(t){t.exports=W6})(L6);(function(t){t.exports=Of})(B6);var Tf={},V6={get exports(){return Tf},set exports(t){Tf=t}},xf={},U6={get exports(){return xf},set exports(t){xf=t}},Z$=He,G6=wg,K6=Un,q6=At,Y6=function(t,i,e){for(var r=G6(i),n=q6.f,a=K6.f,o=0;o<r.length;o++){var s=r[o];!Z$(t,s)&&!(e&&Z$(e,s))&&n(t,s,a(i,s))}},X6=Ze,Q6=Dr,Z6=function(t,i){X6(i)&&"cause"in i&&Q6(t,"cause",i.cause)},J6=de,aO=Error,eV=J6("".replace),tV=function(t){return String(aO(t).stack)}("zxcasd"),oO=/\n\s*at [^:]*:[^\n]*/,rV=oO.test(tV),nV=function(t,i){if(rV&&typeof t=="string"&&!aO.prepareStackTrace)for(;i--;)t=eV(t,oO,"");return t},iV=oe,aV=Gn,oV=!iV(function(){var t=Error("a");return"stack"in t?(Object.defineProperty(t,"stack",aV(1,7)),t.stack!==7):!0}),sV=Dr,uV=nV,lV=oV,J$=Error.captureStackTrace,cV=function(t,i,e,r){lV&&(J$?J$(t,i):sV(t,"stack",uV(e,r)))},hV=hn,dV=Qe,fV=Rt,vV=Xi,pV=GE,gV=Dt,eb=Ee,yV=$g,mV=ul,tb=UE,$V=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=hV(i,r),l,c,h,d,f,v,g,b=function($){return l&&tb(l,"normal",$),new Qs(!0,$)},p=function($){return n?(fV($),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=mV(t),!c)throw $V(vV(t)+" is not iterable");if(pV(c)){for(h=0,d=gV(t);d>h;h++)if(f=p(t[h]),f&&eb(rb,f))return f;return new Qs(!1)}l=yV(t,c)}for(v=a?t.next:l.next;!(g=dV(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)},bV=yr,wV=function(t,i){return t===void 0?arguments.length<2?"":i:bV(t)},_V=U,EV=Ee,SV=ol,Tu=PE,OV=Y6,sO=Kn,Rc=Dr,Dc=Gn,TV=Z6,xV=cV,PV=Xn,kV=wV,IV=Se,CV=IV("toStringTag"),xu=Error,AV=[].push,Fi=function(i,e){var r=EV(Mc,this),n;Tu?n=Tu(xu(),r?SV(this):Mc):(n=r?this:sO(Mc),Rc(n,CV,"Error")),e!==void 0&&Rc(n,"message",kV(e)),xV(n,Fi,n.stack,1),arguments.length>2&&TV(n,arguments[2]);var a=[];return PV(i,AV,{that:a}),Rc(n,"errors",a),n};Tu?Tu(Fi,xu):OV(Fi,xu,{name:!0});var Mc=Fi.prototype=sO(xu.prototype,{constructor:Dc(1,Fi),message:Dc(1,""),name:Dc(1,"AggregateError")});_V({global:!0,constructor:!0,arity:2},{AggregateError:Fi});var RV=pt,DV=lg,MV=Se,NV=Ue,nb=MV("species"),uO=function(t){var i=RV(t);NV&&i&&!i[nb]&&DV(i,nb,{configurable:!0,get:function(){return this}})},FV=Ee,BV=TypeError,Ag=function(t,i){if(FV(i,t))return t;throw BV("Incorrect invocation")},ib=Rt,LV=eO,jV=uo,zV=Se,HV=zV("species"),lO=function(t,i){var e=ib(t).constructor,r;return e===void 0||jV(r=ib(e)[HV])?i:LV(r)},WV=cn,cO=/(?:ipad|iphone|ipod).*applewebkit/i.test(WV),Ct=Pe,VV=Ki,UV=hn,ab=ke,GV=He,hO=oe,ob=q_,KV=wo,sb=rg,qV=wS,YV=cO,XV=So,Pf=Ct.setImmediate,kf=Ct.clearImmediate,QV=Ct.process,Nc=Ct.Dispatch,ZV=Ct.Function,ub=Ct.MessageChannel,JV=Ct.String,Fc=0,Aa={},lb="onreadystatechange",Xa,$n,Bc,Lc;hO(function(){Xa=Ct.location});var Rg=function(t){if(GV(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(JV(t),Xa.protocol+"//"+Xa.host)};(!Pf||!kf)&&(Pf=function(i){qV(arguments.length,1);var e=ab(i)?i:ZV(i),r=KV(arguments,1);return Aa[++Fc]=function(){VV(e,void 0,r)},$n(Fc),Fc},kf=function(i){delete Aa[i]},XV?$n=function(t){QV.nextTick(jc(t))}:Nc&&Nc.now?$n=function(t){Nc.now(jc(t))}:ub&&!YV?(Bc=new ub,Lc=Bc.port2,Bc.port1.onmessage=cb,$n=UV(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,e8=cn,t8=/ipad|iphone|ipod/i.test(e8)&&typeof Pebble<"u",r8=cn,n8=/web0s(?!.*chrome)/i.test(r8),jn=Pe,db=hn,i8=Un.f,zc=dO.set,a8=vO,o8=cO,s8=t8,u8=n8,Hc=So,fb=jn.MutationObserver||jn.WebKitMutationObserver,vb=jn.document,pb=jn.process,bs=jn.Promise,gb=i8(jn,"queueMicrotask"),If=gb&&gb.value,ui,Wc,Vc,ws,yb;if(!If){var _s=new a8,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()};!o8&&!Hc&&!u8&&fb&&vb?(Wc=!0,Vc=vb.createTextNode(""),new fb(Es).observe(Vc,{characterData:!0}),ui=function(){Vc.data=Wc=!Wc}):!s8&&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 l8=If,c8=function(t,i){try{arguments.length==1?console.error(t):console.error(t,i)}catch{}},na=function(t){try{return{error:!1,value:t()}}catch(i){return{error:!0,value:i}}},h8=Pe,ia=h8.Promise,pO=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",d8=pO,f8=So,v8=!d8&&!f8&&typeof window=="object"&&typeof document=="object",p8=Pe,Ra=ia,g8=ke,y8=N_,m8=z_,$8=Se,b8=v8,w8=pO,Uc=qi,mb=Ra&&Ra.prototype,_8=$8("species"),Cf=!1,gO=g8(p8.PromiseRejectionEvent),E8=y8("Promise",function(){var t=m8(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[_8]=r,Cf=e.then(function(){})instanceof r,!Cf)return!0}return!i&&(b8||w8)&&!gO}),Co={CONSTRUCTOR:E8,REJECTION_EVENT:gO,SUBCLASSING:Cf},Nr={},$b=xt,S8=TypeError,O8=function(t){var i,e;this.promise=new t(function(r,n){if(i!==void 0||e!==void 0)throw S8("Bad Promise constructor");i=r,e=n}),this.resolve=$b(i),this.reject=$b(e)};Nr.f=function(t){return new O8(t)};var T8=U,Pu=So,an=Pe,Ao=Qe,x8=Zi,P8=qn,k8=uO,I8=xt,Af=ke,C8=Ze,A8=Ag,R8=lO,yO=dO.set,Dg=l8,D8=c8,M8=na,N8=vO,mO=Ji,Rf=ia,$O=Co,bO=Nr,vl="Promise",wO=$O.CONSTRUCTOR,F8=$O.REJECTION_EVENT,Gc=mO.getterFor(vl),B8=mO.set,L8=Rf&&Rf.prototype,_i=Rf,Kc=L8,_O=an.TypeError,Df=an.document,Mg=an.process,Mf=bO.f,j8=Mf,z8=!!(Df&&Df.createEvent&&an.dispatchEvent),EO="unhandledrejection",H8="rejectionhandled",bb=0,SO=1,W8=2,Ng=1,OO=2,Ss,wb,V8,TO=function(t){var i;return C8(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&&G8(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&&U8(t)}))},kO=function(t,i,e){var r,n;z8?(r=Df.createEvent("Event"),r.promise=i,r.reason=e,r.initEvent(t,!1,!0),an.dispatchEvent(r)):r={promise:i,reason:e},!F8&&(n=an["on"+t])?n(r):t===EO&&D8("Unhandled promise rejection",e)},U8=function(t){Ao(yO,an,function(){var i=t.facade,e=t.value,r=_b(t),n;if(r&&(n=M8(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},G8=function(t){Ao(yO,an,function(){var i=t.facade;Pu?Mg.emit("rejectionHandled",i):kO(H8,i,t.value)})},Ei=function(t,i,e){return function(r){t(i,r,e)}},Pi=function(t,i,e){t.done||(t.done=!0,e&&(t=e),t.value=i,t.state=W8,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,Ei(Nf,n,t),Ei(Pi,n,t))}catch(a){Pi(n,a,t)}}):(t.value=i,t.state=SO,PO(t,!1))}catch(n){Pi({done:!1},n,t)}}};wO&&(_i=function(i){A8(this,Kc),I8(i),Ao(Ss,this);var e=Gc(this);try{i(Ei(Nf,e),Ei(Pi,e))}catch(r){Pi(e,r)}},Kc=_i.prototype,Ss=function(i){B8(this,{type:vl,done:!1,notified:!1,parent:!1,reactions:new N8,rejection:!1,state:bb,value:void 0})},Ss.prototype=x8(Kc,"then",function(i,e){var r=Gc(this),n=Mf(R8(this,_i));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=Ei(Nf,i),this.reject=Ei(Pi,i)},bO.f=Mf=function(t){return t===_i||t===V8?new wb(t):j8(t)});T8({global:!0,constructor:!0,wrap:!0,forced:wO},{Promise:_i});P8(_i,vl,!1,!0);k8(vl);var K8=ia,q8=YE,Y8=Co.CONSTRUCTOR,pl=Y8||!q8(function(t){K8.all(t).then(void 0,function(){})}),X8=U,Q8=Qe,Z8=xt,J8=Nr,eU=na,tU=Xn,rU=pl;X8({target:"Promise",stat:!0,forced:rU},{all:function(i){var e=this,r=J8.f(e),n=r.resolve,a=r.reject,o=eU(function(){var s=Z8(e.resolve),u=[],l=0,c=1;tU(i,function(h){var d=l++,f=!1;c++,Q8(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 nU=U,iU=Co.CONSTRUCTOR,Eb=ia;Eb&&Eb.prototype;nU({target:"Promise",proto:!0,forced:iU,real:!0},{catch:function(t){return this.then(void 0,t)}});var aU=U,oU=Qe,sU=xt,uU=Nr,lU=na,cU=Xn,hU=pl;aU({target:"Promise",stat:!0,forced:hU},{race:function(i){var e=this,r=uU.f(e),n=r.reject,a=lU(function(){var o=sU(e.resolve);cU(i,function(s){oU(o,e,s).then(r.resolve,n)})});return a.error&&n(a.value),r.promise}});var dU=U,fU=Qe,vU=Nr,pU=Co.CONSTRUCTOR;dU({target:"Promise",stat:!0,forced:pU},{reject:function(i){var e=vU.f(this);return fU(e.reject,void 0,i),e.promise}});var gU=Rt,yU=Ze,mU=Nr,IO=function(t,i){if(gU(t),yU(i)&&i.constructor===t)return i;var e=mU.f(t),r=e.resolve;return r(i),e.promise},$U=U,bU=pt,wU=RI,_U=ia,EU=Co.CONSTRUCTOR,SU=IO,OU=bU("Promise"),TU=!EU;$U({target:"Promise",stat:!0,forced:wU},{resolve:function(i){return SU(TU&&this===OU?_U:this,i)}});var xU=U,PU=Qe,kU=xt,IU=Nr,CU=na,AU=Xn,RU=pl;xU({target:"Promise",stat:!0,forced:RU},{allSettled:function(i){var e=this,r=IU.f(e),n=r.resolve,a=r.reject,o=CU(function(){var s=kU(e.resolve),u=[],l=0,c=1;AU(i,function(h){var d=l++,f=!1;c++,PU(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 DU=U,MU=Qe,NU=xt,FU=pt,BU=Nr,LU=na,jU=Xn,zU=pl,Sb="No one promise resolved";DU({target:"Promise",stat:!0,forced:zU},{any:function(i){var e=this,r=FU("AggregateError"),n=BU.f(e),a=n.resolve,o=n.reject,s=LU(function(){var u=NU(e.resolve),l=[],c=0,h=1,d=!1;jU(i,function(f){var v=c++,g=!1;h++,MU(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 HU=U,Ff=ia,WU=oe,VU=pt,UU=ke,GU=lO,Ob=IO,KU=Ff&&Ff.prototype,qU=!!Ff&&WU(function(){KU.finally.call({then:function(){}},function(){})});HU({target:"Promise",proto:!0,real:!0,forced:qU},{finally:function(t){var i=GU(this,VU("Promise")),e=UU(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 YU=ye,XU=YU.Promise,QU=XU,ZU=QU,JU=ZU,eG=JU,tG=U,rG=Nr,nG=na;tG({target:"Promise",stat:!0,forced:!0},{try:function(t){var i=rG.f(this),e=nG(t);return(e.error?i.reject:i.resolve)(e.value),i.promise}});var iG=eG,aG=iG;(function(t){t.exports=aG})(U6);(function(t){t.exports=xf})(V6);var Bf={},oG={get exports(){return Bf},set exports(t){Bf=t}},Lf={},sG={get exports(){return Lf},set exports(t){Lf=t}},uG=cS,lG=uG,cG=lG,hG=cG;(function(t){t.exports=hG})(sG);(function(t){t.exports=Lf})(oG);(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",m=b.toStringTag||"@@toStringTag";function y(R,k,D){return e(R,k,{value:D,enumerable:!0,configurable:!0,writable:!0}),R[k]}try{y({},"")}catch{y=function(D,L,G){return D[L]=G}}function w(R,k,D,L){var G=k&&k.prototype instanceof O?k:O,Y=n(G.prototype),Re=new nt(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=w;var T={};function O(){}function _(){}function E(){}var I={};y(I,p,function(){return this});var j=a,B=j&&j(j(_e([])));B&&B!==f&&v.call(B,p)&&(I=B);var X=E.prototype=O.prototype=n(I);function ne(R){var k;o(k=["next","throw","return"]).call(k,function(D){y(R,D,function(L){return this._invoke(D,L)})})}function re(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 nt(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 _.prototype=E,g(X,"constructor",{value:E,configurable:!0}),g(E,"constructor",{value:_,configurable:!0}),_.displayName=y(E,m,"GeneratorFunction"),d.isGeneratorFunction=function(R){var k=typeof R=="function"&&R.constructor;return!!k&&(k===_||(k.displayName||k.name)==="GeneratorFunction")},d.mark=function(R){return s?s(R,E):(R.__proto__=E,y(R,m,"GeneratorFunction")),R.prototype=n(X),R},d.awrap=function(R){return{__await:R}},ne(re.prototype),y(re.prototype,$,function(){return this}),d.AsyncIterator=re,d.async=function(R,k,D,L,G){G===void 0&&(G=u);var Y=new re(w(R,k,D,L),G);return d.isGeneratorFunction(k)?Y:Y.next().then(function(Re){return Re.done?Re.value:Y.next()})},ne(X),y(X,m,"Generator"),y(X,p,function(){return this}),y(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,nt.prototype={constructor:nt,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&&gt){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})(N6);var Zs=_f(),mt=Zs;try{regeneratorRuntime=Zs}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Zs:Function("r","regeneratorRuntime = r")(Zs)}var jf={},dG={get exports(){return jf},set exports(t){jf=t}},ku={},fG={get exports(){return ku},set exports(t){ku=t}},vG=oe,pG=vG(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),gG=oe,yG=Ze,mG=Rr,Tb=pG,Js=Object.isExtensible,$G=gG(function(){Js(1)}),bG=$G||Tb?function(i){return!yG(i)||Tb&&mG(i)=="ArrayBuffer"?!1:Js?Js(i):!0}:Js,wG=oe,_G=!wG(function(){return Object.isExtensible(Object.preventExtensions({}))}),EG=U,SG=de,OG=po,TG=Ze,Fg=He,xG=At.f,xb=yo,PG=ug,Bg=bG,kG=Ku,IG=_G,CO=!1,Ir=kG("meta"),CG=0,Lg=function(t){xG(t,Ir,{value:{objectID:"O"+CG++,weakData:{}}})},AG=function(t,i){if(!TG(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},RG=function(t,i){if(!Fg(t,Ir)){if(!Bg(t))return!0;if(!i)return!1;Lg(t)}return t[Ir].weakData},DG=function(t){return IG&&CO&&Bg(t)&&!Fg(t,Ir)&&Lg(t),t},MG=function(){NG.enable=function(){},CO=!0;var t=xb.f,i=SG([].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},EG({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:PG.f}))},NG=fG.exports={enable:MG,fastKey:AG,getWeakData:RG,onFreeze:DG};OG[Ir]=!0;var FG=U,BG=Pe,LG=ku,jG=oe,zG=Dr,HG=Xn,WG=Ag,VG=ke,UG=Ze,GG=qn,KG=At.f,qG=ea.forEach,YG=Ue,AO=Ji,XG=AO.set,QG=AO.getterFor,RO=function(t,i,e){var r=t.indexOf("Map")!==-1,n=t.indexOf("Weak")!==-1,a=r?"set":"add",o=BG[t],s=o&&o.prototype,u={},l;if(!YG||!VG(o)||!(n||s.forEach&&!jG(function(){new o().entries().next()})))l=e.getConstructor(i,t,r,a),LG.enable();else{l=i(function(d,f){XG(WG(d,c),{type:t,collection:new o}),f!=null&&HG(f,d[a],{that:d,AS_ENTRIES:r})});var c=l.prototype,h=QG(t);qG(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(d){var f=d=="add"||d=="set";d in s&&!(n&&d=="clear")&&zG(c,d,function(v,g){var b=h(this).collection;if(!f&&n&&!UG(v))return d=="get"?void 0:!1;var p=b[d](v===0?0:v,g);return f?this:p})}),n||KG(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}return GG(l,t,!1,!0),u[t]=l,FG({global:!0,forced:!0},u),n||e.setStrong(l,t,r),l},ZG=Zi,JG=function(t,i,e){for(var r in i)e&&e.unsafe&&t[r]?t[r]=i[r]:ZG(t,r,i[r],e);return t},e9=Kn,t9=lg,Pb=JG,r9=hn,n9=Ag,i9=uo,a9=Xn,o9=gg,Os=yg,s9=uO,ma=Ue,kb=ku.fastKey,DO=Ji,Ib=DO.set,qc=DO.getterFor,MO={getConstructor:function(t,i,e,r){var n=t(function(l,c){n9(l,a),Ib(l,{type:i,index:e9(null),first:void 0,last:void 0,size:0}),ma||(l.size=0),i9(c)||a9(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),ma?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,ma?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),ma?h.size--:c.size--}return!!d},forEach:function(c){for(var h=o(this),d=r9(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)}}),ma&&t9(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);o9(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),s9(i)}},u9=RO,l9=MO;u9("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},l9);var c9=ye,h9=c9.Map,d9=h9,f9=d9;(function(t){t.exports=f9})(dG);var NO=Q(jf),zf={},v9={get exports(){return zf},set exports(t){zf=t}},p9=U,g9=ea.some,y9=Eo,m9=y9("some");p9({target:"Array",proto:!0,forced:!m9},{some:function(i){return g9(this,i,arguments.length>1?arguments[1]:void 0)}});var $9=We,b9=$9("Array").some,w9=Ee,_9=b9,Yc=Array.prototype,E9=function(t){var i=t.some;return t===Yc||w9(Yc,t)&&i===Yc.some?_9:i},S9=E9,O9=S9;(function(t){t.exports=O9})(v9);var T9=Q(zf),Hf={},x9={get exports(){return Hf},set exports(t){Hf=t}},P9=We,k9=P9("Array").keys,I9=k9,C9=I9,A9=Mr,R9=He,D9=Ee,M9=C9,Xc=Array.prototype,N9={DOMTokenList:!0,NodeList:!0},F9=function(t){var i=t.keys;return t===Xc||D9(Xc,t)&&i===Xc.keys||R9(N9,A9(t))?M9:i};(function(t){t.exports=F9})(x9);var li=Q(Hf),Wf={},B9={get exports(){return Wf},set exports(t){Wf=t}},Cb=Q_,L9=Math.floor,Vf=function(t,i){var e=t.length,r=L9(e/2);return e<8?j9(t,i):z9(t,Vf(Cb(t,0,r),i),Vf(Cb(t,r),i),i)},j9=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},z9=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},H9=Vf,W9=cn,Ab=W9.match(/firefox\/(\d+)/i),V9=!!Ab&&+Ab[1],U9=cn,G9=/MSIE|Trident/.test(U9),K9=cn,Rb=K9.match(/AppleWebKit\/(\d+)\./),q9=!!Rb&&+Rb[1],Y9=U,FO=de,X9=xt,Q9=Pt,Db=Dt,Z9=hS,Mb=yr,jg=oe,J9=H9,e7=Eo,Nb=V9,t7=G9,Fb=qi,Bb=q9,qr=[],Lb=FO(qr.sort),r7=FO(qr.push),n7=jg(function(){qr.sort(void 0)}),i7=jg(function(){qr.sort(null)}),a7=e7("sort"),BO=!jg(function(){if(Fb)return Fb<70;if(!(Nb&&Nb>3)){if(t7)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"}}),o7=n7||!i7||!a7||!BO,s7=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}};Y9({target:"Array",proto:!0,forced:o7},{sort:function(i){i!==void 0&&X9(i);var e=Q9(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&&r7(r,e[o]);for(J9(r,s7(i)),a=Db(r),o=0;o<a;)e[o]=r[o++];for(;o<n;)Z9(e,o++);return e}});var u7=We,l7=u7("Array").sort,c7=Ee,h7=l7,Qc=Array.prototype,d7=function(t){var i=t.sort;return t===Qc||c7(Qc,t)&&i===Qc.sort?h7:i},f7=d7,v7=f7;(function(t){t.exports=v7})(B9);var Uf=Q(Wf),Gf={},p7={get exports(){return Gf},set exports(t){Gf=t}},g7=We,y7=g7("Array").values,m7=y7,$7=m7,b7=Mr,w7=He,_7=Ee,E7=$7,Zc=Array.prototype,S7={DOMTokenList:!0,NodeList:!0},O7=function(t){var i=t.values;return t===Zc||_7(Zc,t)&&i===Zc.values||w7(S7,b7(t))?E7:i};(function(t){t.exports=O7})(p7);var jb=Q(Gf),Kf={},T7={get exports(){return Kf},set exports(t){Kf=t}};(function(t){t.exports=FE})(T7);var ki=Q(Kf),qf={},x7={get exports(){return qf},set exports(t){qf=t}},P7=We,k7=P7("Array").entries,I7=k7,C7=I7,A7=Mr,R7=He,D7=Ee,M7=C7,Jc=Array.prototype,N7={DOMTokenList:!0,NodeList:!0},F7=function(t){var i=t.entries;return t===Jc||D7(Jc,t)&&i===Jc.entries||R7(N7,A7(t))?M7:i};(function(t){t.exports=F7})(x7);var B7=Q(qf);let Ts;const L7=new Uint8Array(16);function j7(){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(L7)}const it=[];for(let t=0;t<256;++t)it.push((t+256).toString(16).slice(1));function z7(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 H7=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var zb={randomUUID:H7};function W7(t,i,e){if(zb.randomUUID&&!i&&!t)return zb.randomUUID();t=t||{};const r=t.random||(t.rng||j7)();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 z7(r)}function Hb(t){return typeof t=="string"||typeof t=="number"}var V7=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=DH(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}(),U7=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]=$i(n=this._subscribers[e]).call(n,function(a){return a!==r})}}]),t}(),Yf={},G7={get exports(){return Yf},set exports(t){Yf=t}},K7=RO,q7=MO;K7("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},q7);var Y7=ye,X7=Y7.Set,Q7=X7,Z7=Q7;(function(t){t.exports=Z7})(G7);var eh=Q(Yf),Xf={},J7={get exports(){return Xf},set exports(t){Xf=t}},Qf={},eK={get exports(){return Qf},set exports(t){Qf=t}},tK=$g,rK=tK,nK=rK,iK=nK,aK=iK,oK=aK,sK=oK,uK=sK;(function(t){t.exports=uK})(eK);(function(t){t.exports=Qf})(J7);var th=Q(Xf),LO;function sr(t,i){var e=typeof ll<"u"&&Oo(t)||t["@@iterator"];if(!e){if(It(t)||(e=lK(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 lK(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=ki;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=cH(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({},ki,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({},ki,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({},ki,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=$i(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$?pj(t,a$(n)):Nn(r=Ub(Object(n))).call(r,function(a){yj(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=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.
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 cK(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 hK(t){var i=dK();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 k6(this,n)}}function dK(){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 fK(t,i){return t[i]==null&&(t[i]=W7()),t}var Iu=function(t){P6(e,t);var i=hK(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=V7.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(T9(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 m=p,y=c5({},o._data.get($)),w=o._updateItem(m);u.push(w),c.push(m),l.push(y)}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=BW(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&&$i(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,m=f.length;$<m;$++)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 y=u.fields;if(o!=null&&d!=null)d=this._filterFields(d,y);else for(var w=0,S=h.length;w<S;w++)h[w]=this._filterFields(h[w],y)}if(l=="Object"){for(var T={},O=0,_=h.length;O<_;O++){var E=h[O],I=E[this._idProp];T[I]=E}return T}else if(o!=null){var j;return(j=d)!==null&&j!==void 0?j:null}else return h}},{key:"getIds",value:function(n){var a=this._data,o=n&&$i(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 m=u[p],y=this._data.get(m);y!=null&&o(y)&&l.push(y[this._idProp])}else if(s){for(var w=[],S=0,T=u.length;S<T;S++){var O=u[S];w.push(a.get(O))}this._sort(w,s);for(var _=0,E=w.length;_<E;_++)l.push(w[_][this._idProp])}else for(var I=0,j=u.length;I<j;I++){var B=u[I],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&&$i(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&&$i(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&&WF(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=fK(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: "+gH(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({},ki,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({},ki,WE(o=B7(this._data)).call(o,this._data)))}}}]),e}(U7);function vK(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"&&vK(t,i.getDataSet())}/**
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 YS=qS(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`."),MW=qS(function(t,i){return YS(t,i,!0)},"merge","Use `assign`.");function NW(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 K$(t,i){return function(){return t.apply(i,arguments)}}var FW=function(){var t=function(e,r){return r===void 0&&(r={}),new G$(e,er({recognizers:W$.concat()},r))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=AS,t.DIRECTION_DOWN=Di,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=Di,t.INPUT_START=ft,t.INPUT_MOVE=Yn,t.INPUT_END=Le,t.INPUT_CANCEL=Ot,t.STATE_POSSIBLE=Ys,t.STATE_BEGAN=zt,t.STATE_CHANGED=Mi,t.STATE_ENDED=Zr,t.STATE_RECOGNIZED=Er,t.STATE_CANCELLED=Ya,t.STATE_FAILED=cr,t.Manager=G$,t.Input=ra,t.TouchAction=DS,t.TouchInput=Pg,t.MouseInput=kg,t.PointerEventInput=jS,t.TouchMouseInput=zS,t.SingleTouchInput=RW,t.Recognizer=Io,t.AttrRecognizer=Ni,t.Tap=ff,t.Pan=Ig,t.Swipe=WS,t.Pinch=VS,t.Rotate=US,t.Press=GS,t.on=Ia,t.off=Ca,t.each=_r,t.merge=MW,t.extend=YS,t.bindFn=K$,t.assign=Fn,t.inherit=NW,t.bindFn=K$,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({},KS,{preset:W$}),t}(),BW=FW;function XS(t,i){var e=typeof ll<"u"&&Oo(t)||t["@@iterator"];if(!e){if(It(t)||(e=LW(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 LW(t,i){var e;if(t){if(typeof t=="string")return q$(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 q$(t,i)}}function q$(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 QS=ll("DELETE");function jW(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 ZS.apply(void 0,cl(i=[{},t]).call(i,r))}function ZS(){var t=wu.apply(void 0,arguments);return eO(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=[ZS(i[0],i[1])]).call(r,_t(hl(i).call(i,2))))}var n=i[0],a=i[1],o=XS(Cz(a)),s;try{for(o.s();!(s=o.n()).done;){var u=s.value;Object.prototype.propertyIsEnumerable.call(a,u)&&(a[u]===QS?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]=JS(a[u]))}}catch(l){o.e(l)}finally{o.f()}return n}function JS(t){return It(t)?qt(t).call(t,function(i){return JS(i)}):ot(t)==="object"&&t!==null?wu({},t):t}function eO(t){for(var i=0,e=_g(t);i<e.length;i++){var r=e[i];t[r]===QS?delete t[r]:ot(t[r])==="object"&&t[r]!==null&&eO(t[r])}}function zW(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}}}var HW=typeof window<"u"?window.Hammer||BW:function(){return zW()};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=HW(this._dom.overlay);r.on("tap",VE(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){WW(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()}}QH($r.prototype);$r.current=null;$r.prototype.destroy=function(){var t,i;this.deactivate();var e=XS(_3(t=fS(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 WW(t,i){for(;t;){if(t===i)return!0;t=t.parentNode}return!1}var vf={},VW={get exports(){return vf},set exports(t){vf=t}},UW=Qu,GW=Xi,KW=TypeError,tO=function(t){if(UW(t))return t;throw KW(GW(t)+" is not a constructor")},qW=U,YW=pt,Ac=Ki,XW=HE,Y$=tO,QW=Rt,X$=Ze,ZW=Kn,rO=oe,Cg=YW("Reflect","construct"),JW=Object.prototype,e6=[].push,nO=rO(function(){function t(){}return!(Cg(function(){},[],t)instanceof t)}),iO=!rO(function(){Cg(function(){})}),Q$=nO||iO;qW({target:"Reflect",stat:!0,forced:Q$,sham:Q$},{construct:function(i,e){Y$(i),QW(e);var r=arguments.length<3?i:Y$(arguments[2]);if(iO&&!nO)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(e6,n,e),new(Ac(XW,i,n))}var a=r.prototype,o=ZW(X$(a)?a:JW),s=Ac(i,o,e);return X$(s)?s:o}});var t6=ye,r6=t6.Reflect.construct,n6=r6,i6=n6;(function(t){t.exports=i6})(VW);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={},a6={get exports(){return _u},set exports(t){_u=t}},pf={},o6={get exports(){return pf},set exports(t){pf=t}},s6=wS,u6=s6,l6=u6,c6=l6;(function(t){t.exports=c6})(o6);(function(t){t.exports=pf})(a6);var h6=Q(_u),Eu={},d6={get exports(){return Eu},set exports(t){Eu=t}},gf={},f6={get exports(){return gf},set exports(t){gf=t}},v6=U,p6=kE;v6({target:"Object",stat:!0},{setPrototypeOf:p6});var g6=ye,y6=g6.Object.setPrototypeOf,m6=y6,$6=m6,b6=$6,w6=b6,_6=w6,E6=_6;(function(t){t.exports=E6})(f6);(function(t){t.exports=gf})(d6);var yf=Q(Eu),mf={},S6={get exports(){return mf},set exports(t){mf=t}},$f={},O6={get exports(){return $f},set exports(t){$f=t}},T6=WE,x6=T6,P6=x6,k6=P6;(function(t){t.exports=k6})(O6);(function(t){t.exports=$f})(S6);var aO=Q(mf);function bf(t,i){var e;return bf=yf?aO(e=yf).call(e):function(n,a){return n.__proto__=a,n},bf(t,i)}function I6(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=h6(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Yu(t,"prototype",{writable:!1}),i&&bf(t,i)}function C6(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={},A6={get exports(){return Su},set exports(t){Su=t}},wf={},R6={get exports(){return wf},set exports(t){wf=t}},D6=pS,M6=D6,N6=M6,F6=N6;(function(t){t.exports=F6})(R6);(function(t){t.exports=wf})(A6);var Z$=Q(Su);function Ou(t){var i;return Ou=yf?aO(i=Z$).call(i):function(r){return r.__proto__||Z$(r)},Ou(t)}var _f={},B6={get exports(){return _f},set exports(t){_f=t}},Ef={},L6={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})(L6);var Sf={},j6={get exports(){return Sf},set exports(t){Sf=t}},Of={},z6={get exports(){return Of},set exports(t){Of=t}},H6=cS,W6=H6,V6=W6,U6=V6;(function(t){t.exports=U6})(z6);(function(t){t.exports=Of})(j6);var Tf={},G6={get exports(){return Tf},set exports(t){Tf=t}},xf={},K6={get exports(){return xf},set exports(t){xf=t}},J$=He,q6=wg,Y6=Un,X6=At,Q6=function(t,i,e){for(var r=q6(i),n=X6.f,a=Y6.f,o=0;o<r.length;o++){var s=r[o];!J$(t,s)&&!(e&&J$(e,s))&&n(t,s,a(i,s))}},Z6=Ze,J6=Dr,eV=function(t,i){Z6(i)&&"cause"in i&&J6(t,"cause",i.cause)},tV=de,oO=Error,rV=tV("".replace),nV=function(t){return String(oO(t).stack)}("zxcasd"),sO=/\n\s*at [^:]*:[^\n]*/,iV=sO.test(nV),aV=function(t,i){if(iV&&typeof t=="string"&&!oO.prepareStackTrace)for(;i--;)t=rV(t,sO,"");return t},oV=oe,sV=Gn,uV=!oV(function(){var t=Error("a");return"stack"in t?(Object.defineProperty(t,"stack",sV(1,7)),t.stack!==7):!0}),lV=Dr,cV=aV,hV=uV,eb=Error.captureStackTrace,dV=function(t,i,e,r){hV&&(eb?eb(t,i):lV(t,"stack",cV(e,r)))},fV=hn,vV=Qe,pV=Rt,gV=Xi,yV=KE,mV=Dt,tb=Ee,$V=$g,bV=ul,rb=GE,wV=TypeError,Qs=function(t,i){this.stopped=t,this.result=i},nb=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=fV(i,r),l,c,h,d,f,v,g,b=function($){return l&&rb(l,"normal",$),new Qs(!0,$)},p=function($){return n?(pV($),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=bV(t),!c)throw wV(gV(t)+" is not iterable");if(yV(c)){for(h=0,d=mV(t);d>h;h++)if(f=p(t[h]),f&&tb(nb,f))return f;return new Qs(!1)}l=$V(t,c)}for(v=a?t.next:l.next;!(g=vV(v,l)).done;){try{f=p(g.value)}catch($){rb(l,"throw",$)}if(typeof f=="object"&&f&&tb(nb,f))return f}return new Qs(!1)},_V=yr,EV=function(t,i){return t===void 0?arguments.length<2?"":i:_V(t)},SV=U,OV=Ee,TV=ol,Tu=kE,xV=Q6,uO=Kn,Rc=Dr,Dc=Gn,PV=eV,kV=dV,IV=Xn,CV=EV,AV=Se,RV=AV("toStringTag"),xu=Error,DV=[].push,Fi=function(i,e){var r=OV(Mc,this),n;Tu?n=Tu(xu(),r?TV(this):Mc):(n=r?this:uO(Mc),Rc(n,RV,"Error")),e!==void 0&&Rc(n,"message",CV(e)),kV(n,Fi,n.stack,1),arguments.length>2&&PV(n,arguments[2]);var a=[];return IV(i,DV,{that:a}),Rc(n,"errors",a),n};Tu?Tu(Fi,xu):xV(Fi,xu,{name:!0});var Mc=Fi.prototype=uO(xu.prototype,{constructor:Dc(1,Fi),message:Dc(1,""),name:Dc(1,"AggregateError")});SV({global:!0,constructor:!0,arity:2},{AggregateError:Fi});var MV=pt,NV=lg,FV=Se,BV=Ue,ib=FV("species"),lO=function(t){var i=MV(t);BV&&i&&!i[ib]&&NV(i,ib,{configurable:!0,get:function(){return this}})},LV=Ee,jV=TypeError,Ag=function(t,i){if(LV(i,t))return t;throw jV("Incorrect invocation")},ab=Rt,zV=tO,HV=uo,WV=Se,VV=WV("species"),cO=function(t,i){var e=ab(t).constructor,r;return e===void 0||HV(r=ab(e)[VV])?i:zV(r)},UV=cn,hO=/(?:ipad|iphone|ipod).*applewebkit/i.test(UV),Ct=Pe,GV=Ki,KV=hn,ob=ke,qV=He,dO=oe,sb=Y_,YV=wo,ub=rg,XV=_S,QV=hO,ZV=So,Pf=Ct.setImmediate,kf=Ct.clearImmediate,JV=Ct.process,Nc=Ct.Dispatch,e8=Ct.Function,lb=Ct.MessageChannel,t8=Ct.String,Fc=0,Aa={},cb="onreadystatechange",Xa,$n,Bc,Lc;dO(function(){Xa=Ct.location});var Rg=function(t){if(qV(Aa,t)){var i=Aa[t];delete Aa[t],i()}},jc=function(t){return function(){Rg(t)}},hb=function(t){Rg(t.data)},db=function(t){Ct.postMessage(t8(t),Xa.protocol+"//"+Xa.host)};(!Pf||!kf)&&(Pf=function(i){XV(arguments.length,1);var e=ob(i)?i:e8(i),r=YV(arguments,1);return Aa[++Fc]=function(){GV(e,void 0,r)},$n(Fc),Fc},kf=function(i){delete Aa[i]},ZV?$n=function(t){JV.nextTick(jc(t))}:Nc&&Nc.now?$n=function(t){Nc.now(jc(t))}:lb&&!QV?(Bc=new lb,Lc=Bc.port2,Bc.port1.onmessage=hb,$n=KV(Lc.postMessage,Lc)):Ct.addEventListener&&ob(Ct.postMessage)&&!Ct.importScripts&&Xa&&Xa.protocol!=="file:"&&!dO(db)?($n=db,Ct.addEventListener("message",hb,!1)):cb in ub("script")?$n=function(t){sb.appendChild(ub("script"))[cb]=function(){sb.removeChild(this),Rg(t)}}:$n=function(t){setTimeout(jc(t),0)});var fO={set:Pf,clear:kf},vO=function(){this.head=null,this.tail=null};vO.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 pO=vO,r8=cn,n8=/ipad|iphone|ipod/i.test(r8)&&typeof Pebble<"u",i8=cn,a8=/web0s(?!.*chrome)/i.test(i8),jn=Pe,fb=hn,o8=Un.f,zc=fO.set,s8=pO,u8=hO,l8=n8,c8=a8,Hc=So,vb=jn.MutationObserver||jn.WebKitMutationObserver,pb=jn.document,gb=jn.process,bs=jn.Promise,yb=o8(jn,"queueMicrotask"),If=yb&&yb.value,ui,Wc,Vc,ws,mb;if(!If){var _s=new s8,Es=function(){var t,i;for(Hc&&(t=gb.domain)&&t.exit();i=_s.get();)try{i()}catch(e){throw _s.head&&ui(),e}t&&t.enter()};!u8&&!Hc&&!c8&&vb&&pb?(Wc=!0,Vc=pb.createTextNode(""),new vb(Es).observe(Vc,{characterData:!0}),ui=function(){Vc.data=Wc=!Wc}):!l8&&bs&&bs.resolve?(ws=bs.resolve(void 0),ws.constructor=bs,mb=fb(ws.then,ws),ui=function(){mb(Es)}):Hc?ui=function(){gb.nextTick(Es)}:(zc=fb(zc,jn),ui=function(){zc(Es)}),If=function(t){_s.head||ui(),_s.add(t)}}var h8=If,d8=function(t,i){try{arguments.length==1?console.error(t):console.error(t,i)}catch{}},na=function(t){try{return{error:!1,value:t()}}catch(i){return{error:!0,value:i}}},f8=Pe,ia=f8.Promise,gO=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",v8=gO,p8=So,g8=!v8&&!p8&&typeof window=="object"&&typeof document=="object",y8=Pe,Ra=ia,m8=ke,$8=F_,b8=H_,w8=Se,_8=g8,E8=gO,Uc=qi,$b=Ra&&Ra.prototype,S8=w8("species"),Cf=!1,yO=m8(y8.PromiseRejectionEvent),O8=$8("Promise",function(){var t=b8(Ra),i=t!==String(Ra);if(!i&&Uc===66||!($b.catch&&$b.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[S8]=r,Cf=e.then(function(){})instanceof r,!Cf)return!0}return!i&&(_8||E8)&&!yO}),Co={CONSTRUCTOR:O8,REJECTION_EVENT:yO,SUBCLASSING:Cf},Nr={},bb=xt,T8=TypeError,x8=function(t){var i,e;this.promise=new t(function(r,n){if(i!==void 0||e!==void 0)throw T8("Bad Promise constructor");i=r,e=n}),this.resolve=bb(i),this.reject=bb(e)};Nr.f=function(t){return new x8(t)};var P8=U,Pu=So,an=Pe,Ao=Qe,k8=Zi,I8=qn,C8=lO,A8=xt,Af=ke,R8=Ze,D8=Ag,M8=cO,mO=fO.set,Dg=h8,N8=d8,F8=na,B8=pO,$O=Ji,Rf=ia,bO=Co,wO=Nr,vl="Promise",_O=bO.CONSTRUCTOR,L8=bO.REJECTION_EVENT,Gc=$O.getterFor(vl),j8=$O.set,z8=Rf&&Rf.prototype,_i=Rf,Kc=z8,EO=an.TypeError,Df=an.document,Mg=an.process,Mf=wO.f,H8=Mf,W8=!!(Df&&Df.createEvent&&an.dispatchEvent),SO="unhandledrejection",V8="rejectionhandled",wb=0,OO=1,U8=2,Ng=1,TO=2,Ss,_b,G8,xO=function(t){var i;return R8(t)&&Af(i=t.then)?i:!1},PO=function(t,i){var e=i.value,r=i.state==OO,n=r?t.ok:t.fail,a=t.resolve,o=t.reject,s=t.domain,u,l,c;try{n?(r||(i.rejection===TO&&q8(i),i.rejection=Ng),n===!0?u=e:(s&&s.enter(),u=n(e),s&&(s.exit(),c=!0)),u===t.promise?o(EO("Promise-chain cycle")):(l=xO(u))?Ao(l,u,a,o):a(u)):o(e)}catch(h){s&&!c&&s.exit(),o(h)}},kO=function(t,i){t.notified||(t.notified=!0,Dg(function(){for(var e=t.reactions,r;r=e.get();)PO(r,t);t.notified=!1,i&&!t.rejection&&K8(t)}))},IO=function(t,i,e){var r,n;W8?(r=Df.createEvent("Event"),r.promise=i,r.reason=e,r.initEvent(t,!1,!0),an.dispatchEvent(r)):r={promise:i,reason:e},!L8&&(n=an["on"+t])?n(r):t===SO&&N8("Unhandled promise rejection",e)},K8=function(t){Ao(mO,an,function(){var i=t.facade,e=t.value,r=Eb(t),n;if(r&&(n=F8(function(){Pu?Mg.emit("unhandledRejection",e,i):IO(SO,i,e)}),t.rejection=Pu||Eb(t)?TO:Ng,n.error))throw n.value})},Eb=function(t){return t.rejection!==Ng&&!t.parent},q8=function(t){Ao(mO,an,function(){var i=t.facade;Pu?Mg.emit("rejectionHandled",i):IO(V8,i,t.value)})},Ei=function(t,i,e){return function(r){t(i,r,e)}},Pi=function(t,i,e){t.done||(t.done=!0,e&&(t=e),t.value=i,t.state=U8,kO(t,!0))},Nf=function(t,i,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===i)throw EO("Promise can't be resolved itself");var r=xO(i);r?Dg(function(){var n={done:!1};try{Ao(r,i,Ei(Nf,n,t),Ei(Pi,n,t))}catch(a){Pi(n,a,t)}}):(t.value=i,t.state=OO,kO(t,!1))}catch(n){Pi({done:!1},n,t)}}};_O&&(_i=function(i){D8(this,Kc),A8(i),Ao(Ss,this);var e=Gc(this);try{i(Ei(Nf,e),Ei(Pi,e))}catch(r){Pi(e,r)}},Kc=_i.prototype,Ss=function(i){j8(this,{type:vl,done:!1,notified:!1,parent:!1,reactions:new B8,rejection:!1,state:wb,value:void 0})},Ss.prototype=k8(Kc,"then",function(i,e){var r=Gc(this),n=Mf(M8(this,_i));return r.parent=!0,n.ok=Af(i)?i:!0,n.fail=Af(e)&&e,n.domain=Pu?Mg.domain:void 0,r.state==wb?r.reactions.add(n):Dg(function(){PO(n,r)}),n.promise}),_b=function(){var t=new Ss,i=Gc(t);this.promise=t,this.resolve=Ei(Nf,i),this.reject=Ei(Pi,i)},wO.f=Mf=function(t){return t===_i||t===G8?new _b(t):H8(t)});P8({global:!0,constructor:!0,wrap:!0,forced:_O},{Promise:_i});I8(_i,vl,!1,!0);C8(vl);var Y8=ia,X8=XE,Q8=Co.CONSTRUCTOR,pl=Q8||!X8(function(t){Y8.all(t).then(void 0,function(){})}),Z8=U,J8=Qe,eU=xt,tU=Nr,rU=na,nU=Xn,iU=pl;Z8({target:"Promise",stat:!0,forced:iU},{all:function(i){var e=this,r=tU.f(e),n=r.resolve,a=r.reject,o=rU(function(){var s=eU(e.resolve),u=[],l=0,c=1;nU(i,function(h){var d=l++,f=!1;c++,J8(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 aU=U,oU=Co.CONSTRUCTOR,Sb=ia;Sb&&Sb.prototype;aU({target:"Promise",proto:!0,forced:oU,real:!0},{catch:function(t){return this.then(void 0,t)}});var sU=U,uU=Qe,lU=xt,cU=Nr,hU=na,dU=Xn,fU=pl;sU({target:"Promise",stat:!0,forced:fU},{race:function(i){var e=this,r=cU.f(e),n=r.reject,a=hU(function(){var o=lU(e.resolve);dU(i,function(s){uU(o,e,s).then(r.resolve,n)})});return a.error&&n(a.value),r.promise}});var vU=U,pU=Qe,gU=Nr,yU=Co.CONSTRUCTOR;vU({target:"Promise",stat:!0,forced:yU},{reject:function(i){var e=gU.f(this);return pU(e.reject,void 0,i),e.promise}});var mU=Rt,$U=Ze,bU=Nr,CO=function(t,i){if(mU(t),$U(i)&&i.constructor===t)return i;var e=bU.f(t),r=e.resolve;return r(i),e.promise},wU=U,_U=pt,EU=MI,SU=ia,OU=Co.CONSTRUCTOR,TU=CO,xU=_U("Promise"),PU=!OU;wU({target:"Promise",stat:!0,forced:EU},{resolve:function(i){return TU(PU&&this===xU?SU:this,i)}});var kU=U,IU=Qe,CU=xt,AU=Nr,RU=na,DU=Xn,MU=pl;kU({target:"Promise",stat:!0,forced:MU},{allSettled:function(i){var e=this,r=AU.f(e),n=r.resolve,a=r.reject,o=RU(function(){var s=CU(e.resolve),u=[],l=0,c=1;DU(i,function(h){var d=l++,f=!1;c++,IU(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 NU=U,FU=Qe,BU=xt,LU=pt,jU=Nr,zU=na,HU=Xn,WU=pl,Ob="No one promise resolved";NU({target:"Promise",stat:!0,forced:WU},{any:function(i){var e=this,r=LU("AggregateError"),n=jU.f(e),a=n.resolve,o=n.reject,s=zU(function(){var u=BU(e.resolve),l=[],c=0,h=1,d=!1;HU(i,function(f){var v=c++,g=!1;h++,FU(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,Ob)))})}),--h||o(new r(l,Ob))});return s.error&&o(s.value),n.promise}});var VU=U,Ff=ia,UU=oe,GU=pt,KU=ke,qU=cO,Tb=CO,YU=Ff&&Ff.prototype,XU=!!Ff&&UU(function(){YU.finally.call({then:function(){}},function(){})});VU({target:"Promise",proto:!0,real:!0,forced:XU},{finally:function(t){var i=qU(this,GU("Promise")),e=KU(t);return this.then(e?function(r){return Tb(i,t()).then(function(){return r})}:t,e?function(r){return Tb(i,t()).then(function(){throw r})}:t)}});var QU=ye,ZU=QU.Promise,JU=ZU,eG=JU,tG=eG,rG=tG,nG=U,iG=Nr,aG=na;nG({target:"Promise",stat:!0,forced:!0},{try:function(t){var i=iG.f(this),e=aG(t);return(e.error?i.reject:i.resolve)(e.value),i.promise}});var oG=rG,sG=oG;(function(t){t.exports=sG})(K6);(function(t){t.exports=xf})(G6);var Bf={},uG={get exports(){return Bf},set exports(t){Bf=t}},Lf={},lG={get exports(){return Lf},set exports(t){Lf=t}},cG=hS,hG=cG,dG=hG,fG=dG;(function(t){t.exports=fG})(lG);(function(t){t.exports=Lf})(uG);(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",m=b.toStringTag||"@@toStringTag";function y(R,k,D){return e(R,k,{value:D,enumerable:!0,configurable:!0,writable:!0}),R[k]}try{y({},"")}catch{y=function(D,L,G){return D[L]=G}}function w(R,k,D,L){var G=k&&k.prototype instanceof O?k:O,Y=n(G.prototype),Re=new nt(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=w;var T={};function O(){}function _(){}function E(){}var I={};y(I,p,function(){return this});var j=a,B=j&&j(j(_e([])));B&&B!==f&&v.call(B,p)&&(I=B);var X=E.prototype=O.prototype=n(I);function ne(R){var k;o(k=["next","throw","return"]).call(k,function(D){y(R,D,function(L){return this._invoke(D,L)})})}function re(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 nt(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 _.prototype=E,g(X,"constructor",{value:E,configurable:!0}),g(E,"constructor",{value:_,configurable:!0}),_.displayName=y(E,m,"GeneratorFunction"),d.isGeneratorFunction=function(R){var k=typeof R=="function"&&R.constructor;return!!k&&(k===_||(k.displayName||k.name)==="GeneratorFunction")},d.mark=function(R){return s?s(R,E):(R.__proto__=E,y(R,m,"GeneratorFunction")),R.prototype=n(X),R},d.awrap=function(R){return{__await:R}},ne(re.prototype),y(re.prototype,$,function(){return this}),d.AsyncIterator=re,d.async=function(R,k,D,L,G){G===void 0&&(G=u);var Y=new re(w(R,k,D,L),G);return d.isGeneratorFunction(k)?Y:Y.next().then(function(Re){return Re.done?Re.value:Y.next()})},ne(X),y(X,m,"Generator"),y(X,p,function(){return this}),y(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,nt.prototype={constructor:nt,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&&gt){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})(B6);var Zs=_f(),mt=Zs;try{regeneratorRuntime=Zs}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Zs:Function("r","regeneratorRuntime = r")(Zs)}var jf={},vG={get exports(){return jf},set exports(t){jf=t}},ku={},pG={get exports(){return ku},set exports(t){ku=t}},gG=oe,yG=gG(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),mG=oe,$G=Ze,bG=Rr,xb=yG,Js=Object.isExtensible,wG=mG(function(){Js(1)}),_G=wG||xb?function(i){return!$G(i)||xb&&bG(i)=="ArrayBuffer"?!1:Js?Js(i):!0}:Js,EG=oe,SG=!EG(function(){return Object.isExtensible(Object.preventExtensions({}))}),OG=U,TG=de,xG=po,PG=Ze,Fg=He,kG=At.f,Pb=yo,IG=ug,Bg=_G,CG=Ku,AG=SG,AO=!1,Ir=CG("meta"),RG=0,Lg=function(t){kG(t,Ir,{value:{objectID:"O"+RG++,weakData:{}}})},DG=function(t,i){if(!PG(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},MG=function(t,i){if(!Fg(t,Ir)){if(!Bg(t))return!0;if(!i)return!1;Lg(t)}return t[Ir].weakData},NG=function(t){return AG&&AO&&Bg(t)&&!Fg(t,Ir)&&Lg(t),t},FG=function(){BG.enable=function(){},AO=!0;var t=Pb.f,i=TG([].splice),e={};e[Ir]=1,t(e).length&&(Pb.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},OG({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:IG.f}))},BG=pG.exports={enable:FG,fastKey:DG,getWeakData:MG,onFreeze:NG};xG[Ir]=!0;var LG=U,jG=Pe,zG=ku,HG=oe,WG=Dr,VG=Xn,UG=Ag,GG=ke,KG=Ze,qG=qn,YG=At.f,XG=ea.forEach,QG=Ue,RO=Ji,ZG=RO.set,JG=RO.getterFor,DO=function(t,i,e){var r=t.indexOf("Map")!==-1,n=t.indexOf("Weak")!==-1,a=r?"set":"add",o=jG[t],s=o&&o.prototype,u={},l;if(!QG||!GG(o)||!(n||s.forEach&&!HG(function(){new o().entries().next()})))l=e.getConstructor(i,t,r,a),zG.enable();else{l=i(function(d,f){ZG(UG(d,c),{type:t,collection:new o}),f!=null&&VG(f,d[a],{that:d,AS_ENTRIES:r})});var c=l.prototype,h=JG(t);XG(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(d){var f=d=="add"||d=="set";d in s&&!(n&&d=="clear")&&WG(c,d,function(v,g){var b=h(this).collection;if(!f&&n&&!KG(v))return d=="get"?void 0:!1;var p=b[d](v===0?0:v,g);return f?this:p})}),n||YG(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}return qG(l,t,!1,!0),u[t]=l,LG({global:!0,forced:!0},u),n||e.setStrong(l,t,r),l},e9=Zi,t9=function(t,i,e){for(var r in i)e&&e.unsafe&&t[r]?t[r]=i[r]:e9(t,r,i[r],e);return t},r9=Kn,n9=lg,kb=t9,i9=hn,a9=Ag,o9=uo,s9=Xn,u9=gg,Os=yg,l9=lO,ma=Ue,Ib=ku.fastKey,MO=Ji,Cb=MO.set,qc=MO.getterFor,NO={getConstructor:function(t,i,e,r){var n=t(function(l,c){a9(l,a),Cb(l,{type:i,index:r9(null),first:void 0,last:void 0,size:0}),ma||(l.size=0),o9(c)||s9(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=Ib(c,!0),key:c,value:h,previous:v=d.last,next:void 0,removed:!1},d.first||(d.first=f),v&&(v.next=f),ma?d.size++:l.size++,g!=="F"&&(d.index[g]=f)),l},u=function(l,c){var h=o(l),d=Ib(c),f;if(d!=="F")return h.index[d];for(f=h.first;f;f=f.next)if(f.key==c)return f};return kb(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,ma?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),ma?h.size--:c.size--}return!!d},forEach:function(c){for(var h=o(this),d=i9(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)}}),kb(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)}}),ma&&n9(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);u9(t,i,function(o,s){Cb(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),l9(i)}},c9=DO,h9=NO;c9("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},h9);var d9=ye,f9=d9.Map,v9=f9,p9=v9;(function(t){t.exports=p9})(vG);var FO=Q(jf),zf={},g9={get exports(){return zf},set exports(t){zf=t}},y9=U,m9=ea.some,$9=Eo,b9=$9("some");y9({target:"Array",proto:!0,forced:!b9},{some:function(i){return m9(this,i,arguments.length>1?arguments[1]:void 0)}});var w9=We,_9=w9("Array").some,E9=Ee,S9=_9,Yc=Array.prototype,O9=function(t){var i=t.some;return t===Yc||E9(Yc,t)&&i===Yc.some?S9:i},T9=O9,x9=T9;(function(t){t.exports=x9})(g9);var P9=Q(zf),Hf={},k9={get exports(){return Hf},set exports(t){Hf=t}},I9=We,C9=I9("Array").keys,A9=C9,R9=A9,D9=Mr,M9=He,N9=Ee,F9=R9,Xc=Array.prototype,B9={DOMTokenList:!0,NodeList:!0},L9=function(t){var i=t.keys;return t===Xc||N9(Xc,t)&&i===Xc.keys||M9(B9,D9(t))?F9:i};(function(t){t.exports=L9})(k9);var li=Q(Hf),Wf={},j9={get exports(){return Wf},set exports(t){Wf=t}},Ab=Z_,z9=Math.floor,Vf=function(t,i){var e=t.length,r=z9(e/2);return e<8?H9(t,i):W9(t,Vf(Ab(t,0,r),i),Vf(Ab(t,r),i),i)},H9=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},W9=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},V9=Vf,U9=cn,Rb=U9.match(/firefox\/(\d+)/i),G9=!!Rb&&+Rb[1],K9=cn,q9=/MSIE|Trident/.test(K9),Y9=cn,Db=Y9.match(/AppleWebKit\/(\d+)\./),X9=!!Db&&+Db[1],Q9=U,BO=de,Z9=xt,J9=Pt,Mb=Dt,e7=dS,Nb=yr,jg=oe,t7=V9,r7=Eo,Fb=G9,n7=q9,Bb=qi,Lb=X9,qr=[],jb=BO(qr.sort),i7=BO(qr.push),a7=jg(function(){qr.sort(void 0)}),o7=jg(function(){qr.sort(null)}),s7=r7("sort"),LO=!jg(function(){if(Bb)return Bb<70;if(!(Fb&&Fb>3)){if(n7)return!0;if(Lb)return Lb<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"}}),u7=a7||!o7||!s7||!LO,l7=function(t){return function(i,e){return e===void 0?-1:i===void 0?1:t!==void 0?+t(i,e)||0:Nb(i)>Nb(e)?1:-1}};Q9({target:"Array",proto:!0,forced:u7},{sort:function(i){i!==void 0&&Z9(i);var e=J9(this);if(LO)return i===void 0?jb(e):jb(e,i);var r=[],n=Mb(e),a,o;for(o=0;o<n;o++)o in e&&i7(r,e[o]);for(t7(r,l7(i)),a=Mb(r),o=0;o<a;)e[o]=r[o++];for(;o<n;)e7(e,o++);return e}});var c7=We,h7=c7("Array").sort,d7=Ee,f7=h7,Qc=Array.prototype,v7=function(t){var i=t.sort;return t===Qc||d7(Qc,t)&&i===Qc.sort?f7:i},p7=v7,g7=p7;(function(t){t.exports=g7})(j9);var Uf=Q(Wf),Gf={},y7={get exports(){return Gf},set exports(t){Gf=t}},m7=We,$7=m7("Array").values,b7=$7,w7=b7,_7=Mr,E7=He,S7=Ee,O7=w7,Zc=Array.prototype,T7={DOMTokenList:!0,NodeList:!0},x7=function(t){var i=t.values;return t===Zc||S7(Zc,t)&&i===Zc.values||E7(T7,_7(t))?O7:i};(function(t){t.exports=x7})(y7);var zb=Q(Gf),Kf={},P7={get exports(){return Kf},set exports(t){Kf=t}};(function(t){t.exports=BE})(P7);var ki=Q(Kf),qf={},k7={get exports(){return qf},set exports(t){qf=t}},I7=We,C7=I7("Array").entries,A7=C7,R7=A7,D7=Mr,M7=He,N7=Ee,F7=R7,Jc=Array.prototype,B7={DOMTokenList:!0,NodeList:!0},L7=function(t){var i=t.entries;return t===Jc||N7(Jc,t)&&i===Jc.entries||M7(B7,D7(t))?F7:i};(function(t){t.exports=L7})(k7);var j7=Q(qf);let Ts;const z7=new Uint8Array(16);function H7(){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(z7)}const it=[];for(let t=0;t<256;++t)it.push((t+256).toString(16).slice(1));function W7(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 V7=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Hb={randomUUID:V7};function U7(t,i,e){if(Hb.randomUUID&&!i&&!t)return Hb.randomUUID();t=t||{};const r=t.random||(t.rng||H7)();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 W7(r)}function Wb(t){return typeof t=="string"||typeof t=="number"}var G7=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=NH(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e,r;Nn(e=fS(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}(),K7=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]=$i(n=this._subscribers[e]).call(n,function(a){return a!==r})}}]),t}(),Yf={},q7={get exports(){return Yf},set exports(t){Yf=t}},Y7=DO,X7=NO;Y7("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},X7);var Q7=ye,Z7=Q7.Set,J7=Z7,eK=J7;(function(t){t.exports=eK})(q7);var eh=Q(Yf),Xf={},tK={get exports(){return Xf},set exports(t){Xf=t}},Qf={},rK={get exports(){return Qf},set exports(t){Qf=t}},nK=$g,iK=nK,aK=iK,oK=aK,sK=oK,uK=sK,lK=uK,cK=lK;(function(t){t.exports=cK})(rK);(function(t){t.exports=Qf})(tK);var th=Q(Xf),jO;function sr(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.
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 hK(t,i){var e;if(t){if(typeof t=="string")return Vb(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 Vb(t,i)}}function Vb(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}jO=ki;var Ub=function(){function t(i){Uu(this,t),De(this,"_pairs",void 0),this._pairs=i}return sl(t,[{key:jO,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=dH(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 FO(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({},ki,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({},ki,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({},ki,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 Gb(t,i){var e=_g(t);if(a$){var r=a$(t);i&&(r=$i(r).call(r,function(n){return tS(t,n).enumerable})),e.push.apply(e,r)}return e}function Kb(t){for(var i=1;i<arguments.length;i++){var e,r,n=arguments[i]!=null?arguments[i]:{};i%2?Nn(e=Gb(Object(n),!0)).call(e,function(a){De(t,a,n[a])}):o$?yj(t,o$(n)):Nn(r=Gb(Object(n))).call(r,function(a){$j(t,a,tS(n,a))})}return t}function rh(t,i){var e=typeof ll<"u"&&Oo(t)||t["@@iterator"];if(!e){if(It(t)||(e=dK(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 dK(t,i){var e;if(t){if(typeof t=="string")return qb(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 qb(t,i)}}function qb(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 fK(t){var i=vK();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 C6(this,n)}}function vK(){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 pK(t,i){return t[i]==null&&(t[i]=U7()),t}var Iu=function(t){I6(e,t);var i=fK(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 FO,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=G7.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(P9(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 m=p,y=d5({},o._data.get($)),w=o._updateItem(m);u.push(w),c.push(m),l.push(y)}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=jW(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;Wb(n)?(o=n,u=a):It(n)?(s=n,u=a):u=n;var l=u&&u.returnType==="Object"?"Object":"Array",c=u&&$i(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,m=f.length;$<m;$++)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 y=u.fields;if(o!=null&&d!=null)d=this._filterFields(d,y);else for(var w=0,S=h.length;w<S;w++)h[w]=this._filterFields(h[w],y)}if(l=="Object"){for(var T={},O=0,_=h.length;O<_;O++){var E=h[O],I=E[this._idProp];T[I]=E}return T}else if(o!=null){var j;return(j=d)!==null&&j!==void 0?j:null}else return h}},{key:"getIds",value:function(n){var a=this._data,o=n&&$i(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 m=u[p],y=this._data.get(m);y!=null&&o(y)&&l.push(y[this._idProp])}else if(s){for(var w=[],S=0,T=u.length;S<T;S++){var O=u[S];w.push(a.get(O))}this._sort(w,s);for(var _=0,E=w.length;_<E;_++)l.push(w[_][this._idProp])}else for(var I=0,j=u.length;I<j;I++){var B=u[I],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&&$i(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&&$i(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&&UF(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(Wb(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(zb(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(zb(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=pK(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: "+mH(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,Kb(Kb({},o),n)),a}},{key:"stream",value:function(n){if(n){var a=this._data;return new Ub(De({},ki,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 Ub(De({},ki,VE(o=j7(this._data)).call(o,this._data)))}}}]),e}(K7);function gK(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 zO(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"&&gK(t,i.getDataSet())}/**
39
39
  * vis-network
40
40
  * https://visjs.github.io/vis-network/
41
41
  *
@@ -59,20 +59,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
59
59
  * http://opensource.org/licenses/MIT
60
60
  *
61
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={},pK={get exports(){return Jf},set exports(t){Jf=t}},xs=function(t){return t&&t.Math==Math&&t},Ve=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}},gK=se,Ro=!gK(function(){var t=function(){}.bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),yK=Ro,zO=Function.prototype,qb=zO.apply,Yb=zO.call,Do=typeof Reflect=="object"&&Reflect.apply||(yK?Yb.bind(qb):function(){return Yb.apply(qb,arguments)}),HO=Ro,WO=Function.prototype,ev=WO.call,mK=HO&&WO.bind.bind(ev,ev),ue=HO?mK:function(t){return function(){return ev.apply(t,arguments)}},VO=ue,$K=VO({}.toString),bK=VO("".slice),Fr=function(t){return bK($K(t),8,-1)},wK=Fr,_K=ue,zg=function(t){if(wK(t)==="Function")return _K(t)},tv=typeof document=="object"&&document.all,EK=typeof tv>"u"&&tv!==void 0,UO={all:tv,IS_HTMLDDA:EK},GO=UO,SK=GO.all,Je=GO.IS_HTMLDDA?function(t){return typeof t=="function"||t===SK}:function(t){return typeof t=="function"},aa={},OK=se,Ge=!OK(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),TK=Ro,Ps=Function.prototype.call,Mt=TK?Ps.bind(Ps):function(){return Ps.apply(Ps,arguments)},Mo={},KO={}.propertyIsEnumerable,qO=Object.getOwnPropertyDescriptor,xK=qO&&!KO.call({1:2},1);Mo.f=xK?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}},PK=ue,kK=se,IK=Fr,nh=Object,CK=PK("".split),gl=kK(function(){return!nh("z").propertyIsEnumerable(0)})?function(t){return IK(t)=="String"?CK(t,""):nh(t)}:nh,Fo=function(t){return t==null},AK=Fo,RK=TypeError,Bo=function(t){if(AK(t))throw RK("Can't call method on "+t);return t},DK=gl,MK=Bo,nr=function(t){return DK(MK(t))},Xb=Je,YO=UO,NK=YO.all,et=YO.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:Xb(t)||t===NK}:function(t){return typeof t=="object"?t!==null:Xb(t)},ie={},ih=ie,ah=Ve,FK=Je,Qb=function(t){return FK(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]},BK=ue,Ne=BK({}.isPrototypeOf),Lo=typeof navigator<"u"&&String(navigator.userAgent)||"",XO=Ve,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,LK=se,oa=!!Object.getOwnPropertySymbols&&!LK(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r1&&r1<41}),jK=oa,QO=jK&&!Symbol.sham&&typeof Symbol.iterator=="symbol",zK=Vt,HK=Je,WK=Ne,VK=QO,UK=Object,zo=VK?function(t){return typeof t=="symbol"}:function(t){var i=zK("Symbol");return HK(i)&&WK(i.prototype,UK(t))},GK=String,sa=function(t){try{return GK(t)}catch{return"Object"}},KK=Je,qK=sa,YK=TypeError,Qn=function(t){if(KK(t))return t;throw YK(qK(t)+" is not a function")},XK=Qn,QK=Fo,Hg=function(t,i){var e=t[i];return QK(e)?void 0:XK(e)},sh=Mt,uh=Je,lh=et,ZK=TypeError,JK=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 ZK("Can't convert object to primitive value")},on={},eq={get exports(){return on},set exports(t){on=t}},n1=Ve,tq=Object.defineProperty,rq=function(t,i){try{tq(n1,t,{value:i,configurable:!0,writable:!0})}catch{n1[t]=i}return i},nq=Ve,iq=rq,i1="__core-js_shared__",aq=nq[i1]||iq(i1,{}),Wg=aq,a1=Wg;(eq.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 oq=Bo,sq=Object,Nt=function(t){return sq(oq(t))},uq=ue,lq=Nt,cq=uq({}.hasOwnProperty),tt=Object.hasOwn||function(i,e){return cq(lq(i),e)},hq=ue,dq=0,fq=Math.random(),vq=hq(1 .toString),yl=function(t){return"Symbol("+(t===void 0?"":t)+")_"+vq(++dq+fq,36)},pq=Ve,gq=on,o1=tt,yq=yl,mq=oa,$q=QO,Si=pq.Symbol,ch=gq("wks"),bq=$q?Si.for||Si:Si&&Si.withoutSetter||yq,Fe=function(t){return o1(ch,t)||(ch[t]=mq&&o1(Si,t)?Si[t]:bq("Symbol."+t)),ch[t]},wq=Mt,s1=et,u1=zo,_q=Hg,Eq=JK,Sq=Fe,Oq=TypeError,Tq=Sq("toPrimitive"),xq=function(t,i){if(!s1(t)||u1(t))return t;var e=_q(t,Tq),r;if(e){if(i===void 0&&(i="default"),r=wq(e,t,i),!s1(r)||u1(r))return r;throw Oq("Can't convert object to primitive value")}return i===void 0&&(i="number"),Eq(t,i)},Pq=xq,kq=zo,ml=function(t){var i=Pq(t,"string");return kq(i)?i:i+""},Iq=Ve,l1=et,rv=Iq.document,Cq=l1(rv)&&l1(rv.createElement),ZO=function(t){return Cq?rv.createElement(t):{}},Aq=Ge,Rq=se,Dq=ZO,JO=!Aq&&!Rq(function(){return Object.defineProperty(Dq("div"),"a",{get:function(){return 7}}).a!=7}),Mq=Ge,Nq=Mt,Fq=Mo,Bq=No,Lq=nr,jq=ml,zq=tt,Hq=JO,c1=Object.getOwnPropertyDescriptor;aa.f=Mq?c1:function(i,e){if(i=Lq(i),e=jq(e),Hq)try{return c1(i,e)}catch{}if(zq(i,e))return Bq(!Nq(Fq.f,i,e),i[e])};var Wq=se,Vq=Je,Uq=/#|\.prototype\./,Ho=function(t,i){var e=Kq[Gq(t)];return e==Yq?!0:e==qq?!1:Vq(i)?Wq(i):!!i},Gq=Ho.normalize=function(t){return String(t).replace(Uq,".").toLowerCase()},Kq=Ho.data={},qq=Ho.NATIVE="N",Yq=Ho.POLYFILL="P",Xq=Ho,h1=zg,Qq=Qn,Zq=Ro,Jq=h1(h1.bind),Wo=function(t,i){return Qq(t),i===void 0?t:Zq?Jq(t,i):function(){return t.apply(i,arguments)}},Ut={},eY=Ge,tY=se,eT=eY&&tY(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),rY=et,nY=String,iY=TypeError,Ft=function(t){if(rY(t))return t;throw iY(nY(t)+" is not an object")},aY=Ge,oY=JO,sY=eT,ks=Ft,d1=ml,uY=TypeError,hh=Object.defineProperty,lY=Object.getOwnPropertyDescriptor,dh="enumerable",fh="configurable",vh="writable";Ut.f=aY?sY?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=lY(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),oY)try{return hh(i,e,r)}catch{}if("get"in r||"set"in r)throw uY("Accessors not supported");return"value"in r&&(i[e]=r.value),i};var cY=Ge,hY=Ut,dY=No,ua=cY?function(t,i,e){return hY.f(t,i,dY(1,e))}:function(t,i,e){return t[i]=e,t},Is=Ve,fY=Do,vY=zg,pY=Je,gY=aa.f,yY=Xq,ci=ie,mY=Wo,hi=ua,f1=tt,$Y=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 fY(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=yY(r?d:e+(n?".":"#")+d,t.forced),c=!l&&o&&f1(o,d),v=s[d],c&&(t.dontCallGetSet?(p=gY(o,d),g=p&&p.value):g=o[d]),f=c&&g?g:i[d],!(c&&typeof v==typeof f)&&(t.bind&&c?b=mY(f,Is):t.wrap&&c?b=$Y(f):a&&pY(f)?b=vY(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)))},bY=Math.ceil,wY=Math.floor,_Y=Math.trunc||function(i){var e=+i;return(e>0?wY:bY)(e)},EY=_Y,$l=function(t){var i=+t;return i!==i||i===0?0:EY(i)},SY=$l,OY=Math.max,TY=Math.min,Vo=function(t,i){var e=SY(t);return e<0?OY(e+i,0):TY(e,i)},xY=$l,PY=Math.min,kY=function(t){return t>0?PY(xY(t),9007199254740991):0},IY=kY,ir=function(t){return IY(t.length)},CY=nr,AY=Vo,RY=ir,v1=function(t){return function(i,e,r){var n=CY(i),a=RY(n),o=AY(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={},DY=ue,ph=tt,MY=nr,NY=Vg.indexOf,FY=Uo,p1=DY([].push),tT=function(t,i){var e=MY(t),r=0,n=[],a;for(a in e)!ph(FY,a)&&ph(e,a)&&p1(n,a);for(;i.length>r;)ph(e,a=i[r++])&&(~NY(n,a)||p1(n,a));return n},Ug=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],BY=tT,LY=Ug,Go=Object.keys||function(i){return BY(i,LY)},Ko={};Ko.f=Object.getOwnPropertySymbols;var g1=Ge,jY=ue,zY=Mt,HY=se,gh=Go,WY=Ko,VY=Mo,UY=Nt,GY=gl,di=Object.assign,y1=Object.defineProperty,KY=jY([].concat),qY=!di||HY(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=UY(i),n=arguments.length,a=1,o=WY.f,s=VY.f;n>a;)for(var u=GY(arguments[a++]),l=o?KY(gh(u),o(u)):gh(u),c=l.length,h=0,d;c>h;)d=l[h++],(!g1||zY(s,u,d))&&(r[d]=u[d]);return r}:di,YY=q,m1=qY;YY({target:"Object",stat:!0,arity:2,forced:Object.assign!==m1},{assign:m1});var XY=ie,QY=XY.Object.assign,ZY=QY,JY=ZY;(function(t){t.exports=JY})(pK);var je=V(Jf),nv={},eX={get exports(){return nv},set exports(t){nv=t}},tX=ue,bl=tX([].slice),rT=ue,rX=Qn,nX=et,iX=tt,$1=bl,aX=Ro,nT=Function,oX=rT([].concat),sX=rT([].join),yh={},uX=function(t,i,e){if(!iX(yh,i)){for(var r=[],n=0;n<i;n++)r[n]="a["+n+"]";yh[i]=nT("C,a","return new C("+sX(r,",")+")")}return yh[i](t,e)},iT=aX?nT.bind:function(i){var e=rX(this),r=e.prototype,n=$1(arguments,1),a=function(){var s=oX(n,$1(arguments));return this instanceof a?uX(e,s.length,s):e.apply(i,s)};return nX(r)&&(a.prototype=r),a},lX=q,b1=iT;lX({target:"Function",proto:!0,forced:Function.bind!==b1},{bind:b1});var cX=ie,rt=function(t){return cX[t+"Prototype"]},hX=rt,dX=hX("Function").bind,fX=Ne,vX=dX,mh=Function.prototype,pX=function(t){var i=t.bind;return t===mh||fX(mh,t)&&i===mh.bind?vX:i},gX=pX,aT=gX;(function(t){t.exports=aT})(eX);var A=V(nv);function Gg(t,i,e,r){t.beginPath(),t.arc(i,e,r,0,2*Math.PI,!1),t.closePath()}function yX(t,i,e,r){t.beginPath(),t.rect(i-r,e-r,r*2,r*2),t.closePath()}function mX(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 $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*=.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 wX(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 _X(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:wX,ellipse:iv,ellipse_vis:iv,hexagon:_X,roundRect:oT,square:yX,star:bX,triangle:mX,triangleDown:$X};function EX(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={},SX={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}})(SX);var lT=av,ov={},OX={get exports(){return ov},set exports(t){ov=t}},TX=Fe,xX=TX("toStringTag"),cT={};cT[xX]="z";var Kg=String(cT)==="[object z]",PX=Kg,kX=Je,eu=Fr,IX=Fe,CX=IX("toStringTag"),AX=Object,RX=eu(function(){return arguments}())=="Arguments",DX=function(t,i){try{return t[i]}catch{}},Zn=PX?eu:function(t){var i,e,r;return t===void 0?"Undefined":t===null?"Null":typeof(e=DX(i=AX(t),CX))=="string"?e:RX?eu(i):(r=eu(i))=="Object"&&kX(i.callee)?"Arguments":r},MX=Zn,NX=String,mr=function(t){if(MX(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return NX(t)},qg=ue,FX=$l,BX=mr,LX=Bo,jX=qg("".charAt),_1=qg("".charCodeAt),zX=qg("".slice),E1=function(t){return function(i,e){var r=BX(LX(i)),n=FX(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?jX(r,n):o:t?zX(r,n,n+2):(o-55296<<10)+(s-56320)+65536)}},HX={codeAt:E1(!1),charAt:E1(!0)},WX=Ve,VX=Je,S1=WX.WeakMap,hT=VX(S1)&&/native code/.test(String(S1)),UX=on,GX=yl,O1=UX("keys"),wl=function(t){return O1[t]||(O1[t]=GX(t))},KX=hT,dT=Ve,qX=et,YX=ua,$h=tt,bh=Wg,XX=wl,QX=Uo,T1="Object already initialized",sv=dT.TypeError,ZX=dT.WeakMap,Au,Qa,Ru,JX=function(t){return Ru(t)?Qa(t):Au(t,{})},eQ=function(t){return function(i){var e;if(!qX(i)||(e=Qa(i)).type!==t)throw sv("Incompatible receiver, "+t+" required");return e}};if(KX||bh.state){var ur=bh.state||(bh.state=new ZX);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=XX("state");QX[fi]=!0,Au=function(t,i){if($h(t,fi))throw sv(T1);return i.facade=t,YX(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:JX,getterFor:eQ},uv=Ge,tQ=tt,fT=Function.prototype,rQ=uv&&Object.getOwnPropertyDescriptor,Yg=tQ(fT,"name"),nQ=Yg&&function(){}.name==="something",iQ=Yg&&(!uv||uv&&rQ(fT,"name").configurable),vT={EXISTS:Yg,PROPER:nQ,CONFIGURABLE:iQ},_l={},aQ=Ge,oQ=eT,sQ=Ut,uQ=Ft,lQ=nr,cQ=Go;_l.f=aQ&&!oQ?Object.defineProperties:function(i,e){uQ(i);for(var r=lQ(e),n=cQ(e),a=n.length,o=0,s;a>o;)sQ.f(i,s=n[o++],r[s]);return i};var hQ=Vt,dQ=hQ("document","documentElement"),fQ=Ft,vQ=_l,x1=Ug,pQ=Uo,gQ=dQ,yQ=ZO,mQ=wl,P1=">",k1="<",lv="prototype",cv="script",pT=mQ("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},$Q=function(){var t=yQ("iframe"),i="java"+cv+":",e;return t.style.display="none",gQ.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):$Q():I1(Cs);for(var t=x1.length;t--;)delete tu[lv][x1[t]];return tu()};pQ[pT]=!0;var la=Object.create||function(i,e){var r;return i!==null?(wh[lv]=fQ(i),r=new wh,wh[lv]=null,r[pT]=i):r=tu(),e===void 0?r:vQ.f(r,e)},bQ=se,yT=!bQ(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),wQ=tt,_Q=Je,EQ=Nt,SQ=wl,OQ=yT,C1=SQ("IE_PROTO"),hv=Object,TQ=hv.prototype,El=OQ?hv.getPrototypeOf:function(t){var i=EQ(t);if(wQ(i,C1))return i[C1];var e=i.constructor;return _Q(e)&&i instanceof e?e.prototype:i instanceof hv?TQ:null},xQ=ua,qo=function(t,i,e,r){return r&&r.enumerable?t[i]=e:xQ(t,i,e),t},PQ=se,kQ=Je,IQ=et,CQ=la,A1=El,AQ=qo,RQ=Fe,dv=RQ("iterator"),mT=!1,Sr,_h,Eh;[].keys&&(Eh=[].keys(),"next"in Eh?(_h=A1(A1(Eh)),_h!==Object.prototype&&(Sr=_h)):mT=!0);var DQ=!IQ(Sr)||PQ(function(){var t={};return Sr[dv].call(t)!==t});DQ?Sr={}:Sr=CQ(Sr);kQ(Sr[dv])||AQ(Sr,dv,function(){return this});var $T={IteratorPrototype:Sr,BUGGY_SAFARI_ITERATORS:mT},MQ=Kg,NQ=Zn,FQ=MQ?{}.toString:function(){return"[object "+NQ(this)+"]"},BQ=Kg,LQ=Ut.f,jQ=ua,zQ=tt,HQ=FQ,WQ=Fe,R1=WQ("toStringTag"),ca=function(t,i,e,r){if(t){var n=e?t:t.prototype;zQ(n,R1)||LQ(n,R1,{configurable:!0,value:i}),r&&!BQ&&jQ(n,"toString",HQ)}},ha={},VQ=$T.IteratorPrototype,UQ=la,GQ=No,KQ=ca,qQ=ha,YQ=function(){return this},XQ=function(t,i,e,r){var n=i+" Iterator";return t.prototype=UQ(VQ,{next:GQ(+!r,e)}),KQ(t,n,!1,!0),qQ[n]=YQ,t},QQ=ue,ZQ=Qn,JQ=function(t,i,e){try{return QQ(ZQ(Object.getOwnPropertyDescriptor(t,i)[e]))}catch{}},eZ=Je,tZ=String,rZ=TypeError,nZ=function(t){if(typeof t=="object"||eZ(t))return t;throw rZ("Can't set "+tZ(t)+" as a prototype")},iZ=JQ,aZ=Ft,oZ=nZ,sZ=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,i={},e;try{e=iZ(Object.prototype,"__proto__","set"),e(i,[]),t=i instanceof Array}catch{}return function(n,a){return aZ(n),oZ(a),t?e(n,a):n.__proto__=a,n}}():void 0),uZ=q,lZ=Mt,cZ=vT,hZ=XQ,dZ=El,fZ=ca,D1=qo,vZ=Fe,M1=ha,pZ=$T,gZ=cZ.PROPER,As=pZ.BUGGY_SAFARI_ITERATORS,Sh=vZ("iterator"),N1="keys",Rs="values",F1="entries",yZ=function(){return this},Xg=function(t,i,e,r,n,a,o){hZ(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=dZ(f.call(new t)),v!==Object.prototype&&v.next&&(fZ(v,u,!0,!0),M1[u]=yZ)),gZ&&n==Rs&&h&&h.name!==Rs&&(l=!0,d=function(){return lZ(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 uZ({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}},mZ=HX.charAt,$Z=mr,bT=Jn,bZ=Xg,B1=Qg,wT="String Iterator",wZ=bT.set,_Z=bT.getterFor(wT);bZ(String,"String",function(t){wZ(this,{type:wT,string:$Z(t),index:0})},function(){var i=_Z(this),e=i.string,r=i.index,n;return r>=e.length?B1(void 0,!0):(n=mZ(e,r),i.index+=n.length,B1(n,!1))});var EZ=Mt,L1=Ft,SZ=Hg,_T=function(t,i,e){var r,n;L1(t);try{if(r=SZ(t,"return"),!r){if(i==="throw")throw e;return e}r=EZ(r,t)}catch(a){n=!0,r=a}if(i==="throw")throw e;if(n)throw r;return L1(r),e},OZ=Ft,TZ=_T,xZ=function(t,i,e,r){try{return r?i(OZ(e)[0],e[1]):i(e)}catch(n){TZ(t,"throw",n)}},PZ=Fe,kZ=ha,IZ=PZ("iterator"),CZ=Array.prototype,ET=function(t){return t!==void 0&&(kZ.Array===t||CZ[IZ]===t)},AZ=ue,RZ=Je,fv=Wg,DZ=AZ(Function.toString);RZ(fv.inspectSource)||(fv.inspectSource=function(t){return DZ(t)});var MZ=fv.inspectSource,NZ=ue,FZ=se,ST=Je,BZ=Zn,LZ=Vt,jZ=MZ,OT=function(){},zZ=[],TT=LZ("Reflect","construct"),Zg=/^\s*(?:class|function)\b/,HZ=NZ(Zg.exec),WZ=!Zg.exec(OT),$a=function(i){if(!ST(i))return!1;try{return TT(OT,zZ,i),!0}catch{return!1}},xT=function(i){if(!ST(i))return!1;switch(BZ(i)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return WZ||!!HZ(Zg,jZ(i))}catch{return!0}};xT.sham=!0;var Sl=!TT||FZ(function(){var t;return $a($a.call)||!$a(Object)||!$a(function(){t=!0})||t})?xT:$a,VZ=ml,UZ=Ut,GZ=No,da=function(t,i,e){var r=VZ(i);r in t?UZ.f(t,r,GZ(0,e)):t[r]=e},KZ=Zn,j1=Hg,qZ=Fo,YZ=ha,XZ=Fe,QZ=XZ("iterator"),Ol=function(t){if(!qZ(t))return j1(t,QZ)||j1(t,"@@iterator")||YZ[KZ(t)]},ZZ=Mt,JZ=Qn,eJ=Ft,tJ=sa,rJ=Ol,nJ=TypeError,PT=function(t,i){var e=arguments.length<2?rJ(t):i;if(JZ(e))return eJ(ZZ(e,t));throw nJ(tJ(t)+" is not iterable")},iJ=Wo,aJ=Mt,oJ=Nt,sJ=xZ,uJ=ET,lJ=Sl,cJ=ir,z1=da,hJ=PT,dJ=Ol,H1=Array,fJ=function(i){var e=oJ(i),r=lJ(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=iJ(a,n>2?arguments[2]:void 0));var s=dJ(e),u=0,l,c,h,d,f,v;if(s&&!(this===H1&&uJ(s)))for(d=hJ(e,s),f=d.next,c=r?new this:[];!(h=aJ(f,d)).done;u++)v=o?sJ(d,a,[h.value,u],!0):h.value,z1(c,u,v);else for(l=cJ(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},vJ=Fe,kT=vJ("iterator"),IT=!1;try{var pJ=0,W1={next:function(){return{done:!!pJ++}},return:function(){IT=!0}};W1[kT]=function(){return this},Array.from(W1,function(){throw 2})}catch{}var gJ=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},yJ=q,mJ=fJ,$J=gJ,bJ=!$J(function(t){Array.from(t)});yJ({target:"Array",stat:!0,forced:bJ},{from:mJ});var wJ=ie,_J=wJ.Array.from,EJ=_J,CT=EJ;(function(t){t.exports=CT})(OX);var ei=V(ov),vv={},SJ={get exports(){return vv},set exports(t){vv=t}},pv={},OJ={get exports(){return pv},set exports(t){pv=t}},TJ=nr,V1=ha,AT=Jn;Ut.f;var xJ=Xg,Ds=Qg,RT="Array Iterator",PJ=AT.set,kJ=AT.getterFor(RT);xJ(Array,"Array",function(t,i){PJ(this,{type:RT,target:TJ(t),index:0,kind:i})},function(){var t=kJ(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 IJ=Ol,CJ=IJ,AJ={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},RJ=AJ,DJ=Ve,MJ=Zn,NJ=ua,U1=ha,FJ=Fe,G1=FJ("toStringTag");for(var Oh in RJ){var K1=DJ[Oh],Th=K1&&K1.prototype;Th&&MJ(Th)!==G1&&NJ(Th,G1,Oh),U1[Oh]=U1.Array}var BJ=CJ,LJ=BJ,jJ=LJ,zJ=jJ,HJ=zJ,WJ=HJ;(function(t){t.exports=WJ})(OJ);(function(t){t.exports=pv})(SJ);var Br=V(vv),gv={},VJ={get exports(){return gv},set exports(t){gv=t}},Yo={},UJ=tT,GJ=Ug,KJ=GJ.concat("length","prototype");Yo.f=Object.getOwnPropertyNames||function(i){return UJ(i,KJ)};var Tl={},q1=Vo,qJ=ir,YJ=da,XJ=Array,QJ=Math.max,DT=function(t,i,e){for(var r=qJ(t),n=q1(i,r),a=q1(e===void 0?r:e,r),o=XJ(QJ(a-n,0)),s=0;n<a;n++,s++)YJ(o,s,t[n]);return o.length=s,o},ZJ=Fr,JJ=nr,MT=Yo.f,eee=DT,NT=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],tee=function(t){try{return MT(t)}catch{return eee(NT)}};Tl.f=function(i){return NT&&ZJ(i)=="Window"?tee(i):MT(JJ(i))};var ree=Ut,Jg=function(t,i,e){return ree.f(t,i,e)},Xo={},nee=Fe;Xo.f=nee;var Y1=ie,iee=tt,aee=Xo,oee=Ut.f,Ce=function(t){var i=Y1.Symbol||(Y1.Symbol={});iee(i,t)||oee(i,t,{value:aee.f(t)})},see=Mt,uee=Vt,lee=Fe,cee=qo,FT=function(){var t=uee("Symbol"),i=t&&t.prototype,e=i&&i.valueOf,r=lee("toPrimitive");i&&!i[r]&&cee(i,r,function(n){return see(e,this)},{arity:1})},hee=Fr,ti=Array.isArray||function(i){return hee(i)=="Array"},X1=ti,dee=Sl,fee=et,vee=Fe,pee=vee("species"),Q1=Array,gee=function(t){var i;return X1(t)&&(i=t.constructor,dee(i)&&(i===Q1||X1(i.prototype))?i=void 0:fee(i)&&(i=i[pee],i===null&&(i=void 0))),i===void 0?Q1:i},yee=gee,ey=function(t,i){return new(yee(t))(i===0?0:i)},mee=Wo,$ee=ue,bee=gl,wee=Nt,_ee=ir,Eee=ey,Z1=$ee([].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=wee(u),f=bee(d),v=mee(l,c),g=_ee(f),b=0,p=h||Eee,$=i?p(u,g):e||o?p(u,0):void 0,m,y;g>b;b++)if((s||b in f)&&(m=f[b],y=v(m,b,d),t))if(i)$[b]=y;else if(y)switch(t){case 3:return!0;case 5:return m;case 6:return b;case 2:Z1($,m)}else switch(t){case 4:return!1;case 7:Z1($,m)}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=Ve,ry=Mt,See=ue,Bi=Ge,Li=oa,Oee=se,Xe=tt,Tee=Ne,yv=Ft,Pl=nr,ny=ml,xee=mr,mv=No,Za=la,BT=Go,Pee=Yo,LT=Tl,kee=Ko,jT=aa,zT=Ut,Iee=_l,HT=Mo,J1=qo,Cee=Jg,iy=on,Aee=wl,WT=Uo,ew=yl,Ree=Fe,Dee=Xo,Mee=Ce,Nee=FT,Fee=ca,VT=Jn,kl=fn.forEach,Et=Aee("hidden"),Il="Symbol",Ja="prototype",Bee=VT.set,tw=VT.getterFor(Il),Jt=Object[Ja],Cn=ty.Symbol,Ta=Cn&&Cn[Ja],Lee=ty.TypeError,xh=ty.QObject,UT=jT.f,En=zT.f,GT=LT.f,jee=HT.f,KT=See([].push),Cr=iy("symbols"),Qo=iy("op-symbols"),zee=iy("wks"),$v=!xh||!xh[Ja]||!xh[Ja].findChild,bv=Bi&&Oee(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 Bee(e,{type:Il,tag:t,description:i}),Bi||(e.description=i),e},Cl=function(i,e,r){i===Jt&&Cl(Qo,e,r),yv(i);var n=ny(e);return yv(r),Xe(Cr,n)?(r.enumerable?(Xe(i,Et)&&i[Et][n]&&(i[Et][n]=!1),r=Za(r,{enumerable:mv(0,!1)})):(Xe(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){(!Bi||ry(qT,r,a))&&Cl(i,a,r[a])}),i},Hee=function(i,e){return e===void 0?Za(i):ay(Za(i),e)},qT=function(i){var e=ny(i),r=ry(jee,this,e);return this===Jt&&Xe(Cr,e)&&!Xe(Qo,e)?!1:r||!Xe(this,e)||!Xe(Cr,e)||Xe(this,Et)&&this[Et][e]?r:!0},YT=function(i,e){var r=Pl(i),n=ny(e);if(!(r===Jt&&Xe(Cr,n)&&!Xe(Qo,n))){var a=UT(r,n);return a&&Xe(Cr,n)&&!(Xe(r,Et)&&r[Et][n])&&(a.enumerable=!0),a}},XT=function(i){var e=GT(Pl(i)),r=[];return kl(e,function(n){!Xe(Cr,n)&&!Xe(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){Xe(Cr,n)&&(!i||Xe(Jt,n))&&KT(r,Cr[n])}),r};Li||(Cn=function(){if(Tee(Ta,this))throw Lee("Symbol is not a constructor");var i=!arguments.length||arguments[0]===void 0?void 0:xee(arguments[0]),e=ew(i),r=function(n){this===Jt&&ry(r,Qo,n),Xe(this,Et)&&Xe(this[Et],e)&&(this[Et][e]=!1),bv(this,e,mv(1,n))};return Bi&&$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,Iee.f=ay,jT.f=YT,Pee.f=LT.f=XT,kee.f=QT,Dee.f=function(t){return Ph(Ree(t),t)},Bi&&Cee(Ta,"description",{configurable:!0,get:function(){return tw(this).description}}));xl({global:!0,constructor:!0,wrap:!0,forced:!Li,sham:!Li},{Symbol:Cn});kl(BT(zee),function(t){Mee(t)});xl({target:Il,stat:!0,forced:!Li},{useSetter:function(){$v=!0},useSimple:function(){$v=!1}});xl({target:"Object",stat:!0,forced:!Li,sham:!Bi},{create:Hee,defineProperty:Cl,defineProperties:ay,getOwnPropertyDescriptor:YT});xl({target:"Object",stat:!0,forced:!Li},{getOwnPropertyNames:XT});Nee();Fee(Cn,Il);WT[Et]=!0;var Wee=oa,ZT=Wee&&!!Symbol.for&&!!Symbol.keyFor,Vee=q,Uee=Vt,Gee=tt,Kee=mr,JT=on,qee=ZT,kh=JT("string-to-symbol-registry"),Yee=JT("symbol-to-string-registry");Vee({target:"Symbol",stat:!0,forced:!qee},{for:function(t){var i=Kee(t);if(Gee(kh,i))return kh[i];var e=Uee("Symbol")(i);return kh[i]=e,Yee[e]=i,e}});var Xee=q,Qee=tt,Zee=zo,Jee=sa,ete=on,tte=ZT,rw=ete("symbol-to-string-registry");Xee({target:"Symbol",stat:!0,forced:!tte},{keyFor:function(i){if(!Zee(i))throw TypeError(Jee(i)+" is not a symbol");if(Qee(rw,i))return rw[i]}});var rte=ue,nw=ti,nte=Je,iw=Fr,ite=mr,aw=rte([].push),ate=function(t){if(nte(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,ite(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}}},ote=q,ex=Vt,tx=Do,ste=Mt,Zo=ue,rx=se,ow=Je,sw=zo,nx=bl,ute=ate,lte=oa,cte=String,Jr=ex("JSON","stringify"),Ms=Zo(/./.exec),uw=Zo("".charAt),hte=Zo("".charCodeAt),dte=Zo("".replace),fte=Zo(1 .toString),vte=/[\uD800-\uDFFF]/g,lw=/^[\uD800-\uDBFF]$/,cw=/^[\uDC00-\uDFFF]$/,hw=!lte||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"'}),pte=function(t,i){var e=nx(arguments),r=ute(i);if(!(!ow(r)&&(t===void 0||sw(t))))return e[1]=function(n,a){if(ow(r)&&(a=ste(r,this,cte(n),a)),!sw(a))return a},tx(Jr,null,e)},gte=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"+fte(hte(t,0),16):t};Jr&&ote({target:"JSON",stat:!0,arity:3,forced:hw||dw},{stringify:function(i,e,r){var n=nx(arguments),a=tx(hw?pte:Jr,null,n);return dw&&typeof a=="string"?dte(a,vte,gte):a}});var yte=q,mte=oa,$te=se,ix=Ko,bte=Nt,wte=!mte||$te(function(){ix.f(1)});yte({target:"Object",stat:!0,forced:wte},{getOwnPropertySymbols:function(i){var e=ix.f;return e?e(bte(i)):[]}});var _te=ie,Ete=_te.Object.getOwnPropertySymbols,Ste=Ete,Ote=Ste;(function(t){t.exports=Ote})(VJ);var sn=V(gv),wv={},Tte={get exports(){return wv},set exports(t){wv=t}},_v={},xte={get exports(){return _v},set exports(t){_v=t}},Pte=q,kte=se,Ite=nr,ax=aa.f,ox=Ge,Cte=!ox||kte(function(){ax(1)});Pte({target:"Object",stat:!0,forced:Cte,sham:!ox},{getOwnPropertyDescriptor:function(i,e){return ax(Ite(i),e)}});var Ate=ie,sx=Ate.Object,Rte=xte.exports=function(i,e){return sx.getOwnPropertyDescriptor(i,e)};sx.getOwnPropertyDescriptor.sham&&(Rte.sham=!0);var Dte=_v,ux=Dte;(function(t){t.exports=ux})(Tte);var vn=V(wv),Ev={},Mte={get exports(){return Ev},set exports(t){Ev=t}},Nte=Vt,Fte=ue,Bte=Yo,Lte=Ko,jte=Ft,zte=Fte([].concat),lx=Nte("Reflect","ownKeys")||function(i){var e=Bte.f(jte(i)),r=Lte.f;return r?zte(e,r(i)):e},Hte=q,Wte=Ge,Vte=lx,Ute=nr,Gte=aa,Kte=da;Hte({target:"Object",stat:!0,sham:!Wte},{getOwnPropertyDescriptors:function(i){for(var e=Ute(i),r=Gte.f,n=Vte(e),a={},o=0,s,u;n.length>o;)u=r(e,s=n[o++]),u!==void 0&&Kte(a,s,u);return a}});var qte=ie,Yte=qte.Object.getOwnPropertyDescriptors,Xte=Yte,Qte=Xte;(function(t){t.exports=Qte})(Mte);var un=V(Ev),Sv={},Zte={get exports(){return Sv},set exports(t){Sv=t}},Ov={},Jte={get exports(){return Ov},set exports(t){Ov=t}},ere=q,tre=Ge,fw=_l.f;ere({target:"Object",stat:!0,forced:Object.defineProperties!==fw,sham:!tre},{defineProperties:fw});var rre=ie,cx=rre.Object,nre=Jte.exports=function(i,e){return cx.defineProperties(i,e)};cx.defineProperties.sham&&(nre.sham=!0);var ire=Ov,are=ire;(function(t){t.exports=are})(Zte);var Al=V(Sv),Tv={},ore={get exports(){return Tv},set exports(t){Tv=t}},xv={},sre={get exports(){return xv},set exports(t){xv=t}},ure=q,lre=Ge,vw=Ut.f;ure({target:"Object",stat:!0,forced:Object.defineProperty!==vw,sham:!lre},{defineProperty:vw});var cre=ie,hx=cre.Object,hre=sre.exports=function(i,e,r){return hx.defineProperty(i,e,r)};hx.defineProperty.sham&&(hre.sham=!0);var dre=xv,dx=dre;(function(t){t.exports=dx})(ore);var Rl=V(Tv);function N(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}var Pv={},fre={get exports(){return Pv},set exports(t){Pv=t}},kv={},vre={get exports(){return kv},set exports(t){kv=t}},pre=dx,gre=pre,yre=gre,mre=yre;(function(t){t.exports=mre})(vre);(function(t){t.exports=kv})(fre);var Dl=V(Pv),Iv={},$re={get exports(){return Iv},set exports(t){Iv=t}},Cv={},bre={get exports(){return Cv},set exports(t){Cv=t}},wre=TypeError,_re=9007199254740991,fx=function(t){if(t>_re)throw wre("Maximum allowed index exceeded");return t},Ere=se,Sre=Fe,Ore=jo,Tre=Sre("species"),Jo=function(t){return Ore>=51||!Ere(function(){var i=[],e=i.constructor={};return e[Tre]=function(){return{foo:1}},i[t](Boolean).foo!==1})},xre=q,Pre=se,kre=ti,Ire=et,Cre=Nt,Are=ir,pw=fx,gw=da,Rre=ey,Dre=Jo,Mre=Fe,Nre=jo,vx=Mre("isConcatSpreadable"),Fre=Nre>=51||!Pre(function(){var t=[];return t[vx]=!1,t.concat()[0]!==t}),Bre=function(t){if(!Ire(t))return!1;var i=t[vx];return i!==void 0?!!i:kre(t)},Lre=!Fre||!Dre("concat");xre({target:"Array",proto:!0,arity:1,forced:Lre},{concat:function(i){var e=Cre(this),r=Rre(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],Bre(l))for(u=Are(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 jre=Ce;jre("asyncIterator");var zre=Ce;zre("hasInstance");var Hre=Ce;Hre("isConcatSpreadable");var Wre=Ce;Wre("iterator");var Vre=Ce;Vre("match");var Ure=Ce;Ure("matchAll");var Gre=Ce;Gre("replace");var Kre=Ce;Kre("search");var qre=Ce;qre("species");var Yre=Ce;Yre("split");var Xre=Ce,Qre=FT;Xre("toPrimitive");Qre();var Zre=Vt,Jre=Ce,ene=ca;Jre("toStringTag");ene(Zre("Symbol"),"Symbol");var tne=Ce;tne("unscopables");var rne=Ve,nne=ca;nne(rne.JSON,"JSON",!0);var ine=ie,ane=ine.Symbol,one=ane,px=one,sne=Ce;sne("dispose");var une=px,lne=une,cne=Ce;cne("asyncDispose");var hne=q,dne=Vt,fne=ue,gx=dne("Symbol"),vne=gx.keyFor,pne=fne(gx.prototype.valueOf);hne({target:"Symbol",stat:!0},{isRegistered:function(i){try{return vne(pne(i))!==void 0}catch{return!1}}});var gne=q,yne=on,yx=Vt,mne=ue,$ne=zo,bne=Fe,Du=yx("Symbol"),yw=Du.isWellKnown,mx=yx("Object","getOwnPropertyNames"),wne=mne(Du.prototype.valueOf),mw=yne("wks");for(var Ih=0,$w=mx(Du),_ne=$w.length;Ih<_ne;Ih++)try{var bw=$w[Ih];$ne(Du[bw])&&bne(bw)}catch{}gne({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(i){if(yw&&yw(i))return!0;try{for(var e=wne(i),r=0,n=mx(mw),a=n.length;r<a;r++)if(mw[n[r]]==e)return!0}catch{}return!1}});var Ene=Ce;Ene("matcher");var Sne=Ce;Sne("metadataKey");var One=Ce;One("observable");var Tne=Ce;Tne("metadata");var xne=Ce;xne("patternMatch");var Pne=Ce;Pne("replaceAll");var kne=lne,Ine=kne;(function(t){t.exports=Ine})(bre);(function(t){t.exports=Cv})($re);var Oi=V(Iv),Av={},Cne={get exports(){return Av},set exports(t){Av=t}},Rv={},Ane={get exports(){return Rv},set exports(t){Rv=t}},Rne=Xo,Dne=Rne.f("iterator"),Mne=Dne,Nne=Mne,Fne=Nne,Bne=Fne,Lne=Bne,jne=Lne;(function(t){t.exports=jne})(Ane);(function(t){t.exports=Rv})(Cne);var zne=V(Av);function he(t){"@babel/helpers - typeof";return he=typeof Oi=="function"&&typeof zne=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Oi=="function"&&i.constructor===Oi&&i!==Oi.prototype?"symbol":typeof i},he(t)}var Dv={},Hne={get exports(){return Dv},set exports(t){Dv=t}},Mv={},Wne={get exports(){return Mv},set exports(t){Mv=t}},Vne=Xo,Une=Vne.f("toPrimitive"),Gne=Une,Kne=Gne,qne=Kne,Yne=qne,Xne=Yne,Qne=Xne;(function(t){t.exports=Qne})(Wne);(function(t){t.exports=Mv})(Hne);var Zne=V(Dv);function Jne(t,i){if(he(t)!=="object"||t===null)return t;var e=t[Zne];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=Jne(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={},eie={get exports(){return Nv},set exports(t){Nv=t}},Fv={},tie={get exports(){return Fv},set exports(t){Fv=t}},rie=q,nie=ti;rie({target:"Array",stat:!0},{isArray:nie});var iie=ie,aie=iie.Array.isArray,oie=aie,bx=oie,sie=bx,uie=sie,lie=uie,cie=lie;(function(t){t.exports=cie})(tie);(function(t){t.exports=Fv})(eie);var wx=V(Nv);function hie(t){if(wx(t))return t}function die(t,i){var e=t==null?null:typeof Oi<"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={},fie={get exports(){return Bv},set exports(t){Bv=t}},Lv={},vie={get exports(){return Lv},set exports(t){Lv=t}},pie=q,_w=ti,gie=Sl,yie=et,Ew=Vo,mie=ir,$ie=nr,bie=da,wie=Fe,_ie=Jo,Eie=bl,Sie=_ie("slice"),Oie=wie("species"),Ch=Array,Tie=Math.max;pie({target:"Array",proto:!0,forced:!Sie},{slice:function(i,e){var r=$ie(this),n=mie(r),a=Ew(i,n),o=Ew(e===void 0?n:e,n),s,u,l;if(_w(r)&&(s=r.constructor,gie(s)&&(s===Ch||_w(s.prototype))?s=void 0:yie(s)&&(s=s[Oie],s===null&&(s=void 0)),s===Ch||s===void 0))return Eie(r,a,o);for(u=new(s===void 0?Ch:s)(Tie(o-a,0)),l=0;a<o;a++,l++)a in r&&bie(u,l,r[a]);return u.length=l,u}});var xie=rt,Pie=xie("Array").slice,kie=Ne,Iie=Pie,Ah=Array.prototype,Cie=function(t){var i=t.slice;return t===Ah||kie(Ah,t)&&i===Ah.slice?Iie:i},Aie=Cie,_x=Aie,Rie=_x,Die=Rie,Mie=Die,Nie=Mie;(function(t){t.exports=Nie})(vie);(function(t){t.exports=Lv})(fie);var Fie=V(Bv),jv={},Bie={get exports(){return jv},set exports(t){jv=t}},zv={},Lie={get exports(){return zv},set exports(t){zv=t}},jie=CT,zie=jie,Hie=zie,Wie=Hie;(function(t){t.exports=Wie})(Lie);(function(t){t.exports=zv})(Bie);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=Fie(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 Vie(){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 hie(t)||die(t,i)||Sx(t,i)||Vie()}function Uie(t){if(wx(t))return Hv(t)}function Gie(t){if(typeof Oi<"u"&&Br(t)!=null||t["@@iterator"]!=null)return Ex(t)}function Kie(){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 Uie(t)||Gie(t)||Sx(t)||Kie()}var Wv={},qie={get exports(){return Wv},set exports(t){Wv=t}};(function(t){t.exports=px})(qie);var pn=V(Wv),Vv={},Yie={get exports(){return Vv},set exports(t){Vv=t}},Xie=rt,Qie=Xie("Array").concat,Zie=Ne,Jie=Qie,Rh=Array.prototype,eae=function(t){var i=t.concat;return t===Rh||Zie(Rh,t)&&i===Rh.concat?Jie:i},tae=eae,rae=tae;(function(t){t.exports=rae})(Yie);var oy=V(Vv),Uv={},nae={get exports(){return Uv},set exports(t){Uv=t}};(function(t){t.exports=_x})(nae);var st=V(Uv),Sw={},iae={get exports(){return Sw},set exports(t){Sw=t}},aae=q,oae=lx;aae({target:"Reflect",stat:!0},{ownKeys:oae});var sae=ie,uae=sae.Reflect.ownKeys,lae=uae,cae=lae;(function(t){t.exports=cae})(iae);var Gv={},hae={get exports(){return Gv},set exports(t){Gv=t}};(function(t){t.exports=bx})(hae);var ve=V(Gv),Kv={},dae={get exports(){return Kv},set exports(t){Kv=t}},fae=q,vae=fn.map,pae=Jo,gae=pae("map");fae({target:"Array",proto:!0,forced:!gae},{map:function(i){return vae(this,i,arguments.length>1?arguments[1]:void 0)}});var yae=rt,mae=yae("Array").map,$ae=Ne,bae=mae,Dh=Array.prototype,wae=function(t){var i=t.map;return t===Dh||$ae(Dh,t)&&i===Dh.map?bae:i},_ae=wae,Eae=_ae;(function(t){t.exports=Eae})(dae);var ji=V(Kv),qv={},Sae={get exports(){return qv},set exports(t){qv=t}},Oae=q,Tae=Nt,Ox=Go,xae=se,Pae=xae(function(){Ox(1)});Oae({target:"Object",stat:!0,forced:Pae},{keys:function(i){return Ox(Tae(i))}});var kae=ie,Iae=kae.Object.keys,Cae=Iae,Aae=Cae;(function(t){t.exports=Aae})(Sae);var Te=V(qv),Yv={},Rae={get exports(){return Yv},set exports(t){Yv=t}},Dae=q,Mae=ue,Tx=Date,Nae=Mae(Tx.prototype.getTime);Dae({target:"Date",stat:!0},{now:function(){return Nae(new Tx)}});var Fae=ie,Bae=Fae.Date.now,Lae=Bae,jae=Lae;(function(t){t.exports=jae})(Rae);var Mu=V(Yv),Xv={},zae={get exports(){return Xv},set exports(t){Xv=t}},Hae=se,fa=function(t,i){var e=[][t];return!!e&&Hae(function(){e.call(null,i||function(){return 1},1)})},Wae=fn.forEach,Vae=fa,Uae=Vae("forEach"),Gae=Uae?[].forEach:function(i){return Wae(this,i,arguments.length>1?arguments[1]:void 0)},Kae=q,Ow=Gae;Kae({target:"Array",proto:!0,forced:[].forEach!=Ow},{forEach:Ow});var qae=rt,Yae=qae("Array").forEach,Xae=Yae,Qae=Xae,Zae=Zn,Jae=tt,eoe=Ne,toe=Qae,Mh=Array.prototype,roe={DOMTokenList:!0,NodeList:!0},noe=function(t){var i=t.forEach;return t===Mh||eoe(Mh,t)&&i===Mh.forEach||Jae(roe,Zae(t))?toe:i};(function(t){t.exports=noe})(zae);var ge=V(Xv),Qv={},ioe={get exports(){return Qv},set exports(t){Qv=t}},aoe=q,ooe=ue,soe=ti,uoe=ooe([].reverse),Tw=[1,2];aoe({target:"Array",proto:!0,forced:String(Tw)===String(Tw.reverse())},{reverse:function(){return soe(this)&&(this.length=this.length),uoe(this)}});var loe=rt,coe=loe("Array").reverse,hoe=Ne,doe=coe,Nh=Array.prototype,foe=function(t){var i=t.reverse;return t===Nh||hoe(Nh,t)&&i===Nh.reverse?doe:i},voe=foe,poe=voe;(function(t){t.exports=poe})(ioe);var An=V(Qv),Zv={},goe={get exports(){return Zv},set exports(t){Zv=t}},yoe=Ge,moe=ti,$oe=TypeError,boe=Object.getOwnPropertyDescriptor,woe=yoe&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),_oe=woe?function(t,i){if(moe(t)&&!boe(t,"length").writable)throw $oe("Cannot set read only .length");return t.length=i}:function(t,i){return t.length=i},xw=sa,Eoe=TypeError,xx=function(t,i){if(!delete t[i])throw Eoe("Cannot delete property "+xw(i)+" of "+xw(t))},Soe=q,Ooe=Nt,Toe=Vo,xoe=$l,Poe=ir,koe=_oe,Ioe=fx,Coe=ey,Aoe=da,Fh=xx,Roe=Jo,Doe=Roe("splice"),Moe=Math.max,Noe=Math.min;Soe({target:"Array",proto:!0,forced:!Doe},{splice:function(i,e){var r=Ooe(this),n=Poe(r),a=Toe(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=Noe(Moe(xoe(e),0),n-a)),Ioe(n+s-u),l=Coe(r,u),c=0;c<u;c++)h=a+c,h in r&&Aoe(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 koe(r,n-u+s),l}});var Foe=rt,Boe=Foe("Array").splice,Loe=Ne,joe=Boe,Bh=Array.prototype,zoe=function(t){var i=t.splice;return t===Bh||Loe(Bh,t)&&i===Bh.splice?joe:i},Hoe=zoe,Woe=Hoe;(function(t){t.exports=Woe})(goe);var Or=V(Zv),Jv={},Voe={get exports(){return Jv},set exports(t){Jv=t}},Uoe=q,Goe=Vg.includes,Koe=se,qoe=Koe(function(){return!Array(1).includes()});Uoe({target:"Array",proto:!0,forced:qoe},{includes:function(i){return Goe(this,i,arguments.length>1?arguments[1]:void 0)}});var Yoe=rt,Xoe=Yoe("Array").includes,Qoe=et,Zoe=Fr,Joe=Fe,ese=Joe("match"),tse=function(t){var i;return Qoe(t)&&((i=t[ese])!==void 0?!!i:Zoe(t)=="RegExp")},rse=tse,nse=TypeError,ise=function(t){if(rse(t))throw nse("The method doesn't accept regular expressions");return t},ase=Fe,ose=ase("match"),sse=function(t){var i=/./;try{"/./"[t](i)}catch{try{return i[ose]=!1,"/./"[t](i)}catch{}}return!1},use=q,lse=ue,cse=ise,hse=Bo,Pw=mr,dse=sse,fse=lse("".indexOf);use({target:"String",proto:!0,forced:!dse("includes")},{includes:function(i){return!!~fse(Pw(hse(this)),Pw(cse(i)),arguments.length>1?arguments[1]:void 0)}});var vse=rt,pse=vse("String").includes,kw=Ne,gse=Xoe,yse=pse,Lh=Array.prototype,jh=String.prototype,mse=function(t){var i=t.includes;return t===Lh||kw(Lh,t)&&i===Lh.includes?gse:typeof t=="string"||t===jh||kw(jh,t)&&i===jh.includes?yse:i},$se=mse,bse=$se;(function(t){t.exports=bse})(Voe);var vr=V(Jv),ep={},wse={get exports(){return ep},set exports(t){ep=t}},_se=q,Ese=se,Sse=Nt,Px=El,Ose=yT,Tse=Ese(function(){Px(1)});_se({target:"Object",stat:!0,forced:Tse,sham:!Ose},{getPrototypeOf:function(i){return Px(Sse(i))}});var xse=ie,Pse=xse.Object.getPrototypeOf,kse=Pse,kx=kse;(function(t){t.exports=kx})(wse);var Iw=V(ep),tp={},Ise={get exports(){return tp},set exports(t){tp=t}},Cse=q,Ase=fn.filter,Rse=Jo,Dse=Rse("filter");Cse({target:"Array",proto:!0,forced:!Dse},{filter:function(i){return Ase(this,i,arguments.length>1?arguments[1]:void 0)}});var Mse=rt,Nse=Mse("Array").filter,Fse=Ne,Bse=Nse,zh=Array.prototype,Lse=function(t){var i=t.filter;return t===zh||Fse(zh,t)&&i===zh.filter?Bse:i},jse=Lse,zse=jse;(function(t){t.exports=zse})(Ise);var St=V(tp),Cw={},Hse={get exports(){return Cw},set exports(t){Cw=t}},Wse=Ge,Ix=ue,Vse=Go,Use=nr,Gse=Mo.f,Kse=Ix(Gse),qse=Ix([].push),Aw=function(t){return function(i){for(var e=Use(i),r=Vse(e),n=r.length,a=0,o=[],s;n>a;)s=r[a++],(!Wse||Kse(e,s))&&qse(o,t?[s,e[s]]:e[s]);return o}},Yse={entries:Aw(!0),values:Aw(!1)},Xse=q,Qse=Yse.values;Xse({target:"Object",stat:!0},{values:function(i){return Qse(i)}});var Zse=ie,Jse=Zse.Object.values,eue=Jse,tue=eue;(function(t){t.exports=tue})(Hse);var rp={},rue={get exports(){return rp},set exports(t){rp=t}},Nl=`
65
- \v\f\r                 \u2028\u2029\uFEFF`,nue=ue,iue=Bo,aue=mr,np=Nl,Rw=nue("".replace),oue=RegExp("^["+np+"]+"),sue=RegExp("(^|[^"+np+"])["+np+"]+$"),Hh=function(t){return function(i){var e=aue(iue(i));return t&1&&(e=Rw(e,oue,"")),t&2&&(e=Rw(e,sue,"$1")),e}},sy={start:Hh(1),end:Hh(2),trim:Hh(3)},Cx=Ve,uue=se,lue=ue,cue=mr,hue=sy.trim,Dw=Nl,Da=Cx.parseInt,Mw=Cx.Symbol,Nw=Mw&&Mw.iterator,Ax=/^[+-]?0x/i,due=lue(Ax.exec),fue=Da(Dw+"08")!==8||Da(Dw+"0x16")!==22||Nw&&!uue(function(){Da(Object(Nw))}),vue=fue?function(i,e){var r=hue(cue(i));return Da(r,e>>>0||(due(Ax,r)?16:10))}:Da,pue=q,Fw=vue;pue({global:!0,forced:parseInt!=Fw},{parseInt:Fw});var gue=ie,yue=gue.parseInt,mue=yue,$ue=mue;(function(t){t.exports=$ue})(rue);var Xt=V(rp),ip={},bue={get exports(){return ip},set exports(t){ip=t}},wue=q,_ue=zg,Eue=Vg.indexOf,Sue=fa,ap=_ue([].indexOf),Rx=!!ap&&1/ap([1],1,-0)<0,Oue=Rx||!Sue("indexOf");wue({target:"Array",proto:!0,forced:Oue},{indexOf:function(i){var e=arguments.length>1?arguments[1]:void 0;return Rx?ap(this,i,e)||0:Eue(this,i,e)}});var Tue=rt,xue=Tue("Array").indexOf,Pue=Ne,kue=xue,Wh=Array.prototype,Iue=function(t){var i=t.indexOf;return t===Wh||Pue(Wh,t)&&i===Wh.indexOf?kue:i},Cue=Iue,Aue=Cue;(function(t){t.exports=Aue})(bue);var ae=V(ip),Bw={},Rue={get exports(){return Bw},set exports(t){Bw=t}},Due=vT.PROPER,Mue=se,Lw=Nl,jw="​…᠎",Nue=function(t){return Mue(function(){return!!Lw[t]()||jw[t]()!==jw||Due&&Lw[t].name!==t})},Fue=q,Bue=sy.trim,Lue=Nue;Fue({target:"String",proto:!0,forced:Lue("trim")},{trim:function(){return Bue(this)}});var jue=rt,zue=jue("String").trim,Hue=Ne,Wue=zue,Vh=String.prototype,Vue=function(t){var i=t.trim;return typeof t=="string"||t===Vh||Hue(Vh,t)&&i===Vh.trim?Wue:i},Uue=Vue,Gue=Uue;(function(t){t.exports=Gue})(Rue);var op={},Kue={get exports(){return op},set exports(t){op=t}},que=q,Yue=Ge,Xue=la;que({target:"Object",stat:!0,sham:!Yue},{create:Xue});var Que=ie,Zue=Que.Object,Jue=function(i,e){return Zue.create(i,e)},ele=Jue,Dx=ele;(function(t){t.exports=Dx})(Kue);var Rn=V(op),sp={},tle={get exports(){return sp},set exports(t){sp=t}},up=ie,rle=Do;up.JSON||(up.JSON={stringify:JSON.stringify});var nle=function(i,e,r){return rle(up.JSON.stringify,null,arguments)},ile=nle,ale=ile;(function(t){t.exports=ale})(tle);var es=V(sp),lp={},ole={get exports(){return lp},set exports(t){lp=t}},sle=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",ule=TypeError,lle=function(t,i){if(t<i)throw ule("Not enough arguments");return t},Mx=Ve,cle=Do,hle=Je,dle=sle,fle=Lo,vle=bl,ple=lle,gle=Mx.Function,yle=/MSIE .\./.test(fle)||dle&&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 yle?function(r,n){var a=ple(arguments.length,1)>e,o=hle(r)?r:gle(r),s=a?vle(arguments,e):[],u=a?function(){cle(o,this,s)}:o;return i?t(u,n):t(u)}:t},mle=q,Fx=Ve,$le=Nx,zw=$le(Fx.setInterval,!0);mle({global:!0,bind:!0,forced:Fx.setInterval!==zw},{setInterval:zw});var ble=q,Bx=Ve,wle=Nx,Hw=wle(Bx.setTimeout,!0);ble({global:!0,bind:!0,forced:Bx.setTimeout!==Hw},{setTimeout:Hw});var _le=ie,Ele=_le.setTimeout;(function(t){t.exports=Ele})(ole);var pr=V(lp),cp={},Sle={get exports(){return cp},set exports(t){cp=t}},Ole=Nt,Ww=Vo,Tle=ir,xle=function(i){for(var e=Ole(this),r=Tle(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},Ple=q,kle=xle;Ple({target:"Array",proto:!0},{fill:kle});var Ile=rt,Cle=Ile("Array").fill,Ale=Ne,Rle=Cle,Uh=Array.prototype,Dle=function(t){var i=t.fill;return t===Uh||Ale(Uh,t)&&i===Uh.fill?Rle:i},Mle=Dle,Nle=Mle;(function(t){t.exports=Nle})(Sle);var ts=V(cp);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
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={},yK={get exports(){return Jf},set exports(t){Jf=t}},xs=function(t){return t&&t.Math==Math&&t},Ve=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}},mK=se,Ro=!mK(function(){var t=function(){}.bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),$K=Ro,HO=Function.prototype,Yb=HO.apply,Xb=HO.call,Do=typeof Reflect=="object"&&Reflect.apply||($K?Xb.bind(Yb):function(){return Xb.apply(Yb,arguments)}),WO=Ro,VO=Function.prototype,ev=VO.call,bK=WO&&VO.bind.bind(ev,ev),ue=WO?bK:function(t){return function(){return ev.apply(t,arguments)}},UO=ue,wK=UO({}.toString),_K=UO("".slice),Fr=function(t){return _K(wK(t),8,-1)},EK=Fr,SK=ue,zg=function(t){if(EK(t)==="Function")return SK(t)},tv=typeof document=="object"&&document.all,OK=typeof tv>"u"&&tv!==void 0,GO={all:tv,IS_HTMLDDA:OK},KO=GO,TK=KO.all,Je=KO.IS_HTMLDDA?function(t){return typeof t=="function"||t===TK}:function(t){return typeof t=="function"},aa={},xK=se,Ge=!xK(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),PK=Ro,Ps=Function.prototype.call,Mt=PK?Ps.bind(Ps):function(){return Ps.apply(Ps,arguments)},Mo={},qO={}.propertyIsEnumerable,YO=Object.getOwnPropertyDescriptor,kK=YO&&!qO.call({1:2},1);Mo.f=kK?function(i){var e=YO(this,i);return!!e&&e.enumerable}:qO;var No=function(t,i){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:i}},IK=ue,CK=se,AK=Fr,nh=Object,RK=IK("".split),gl=CK(function(){return!nh("z").propertyIsEnumerable(0)})?function(t){return AK(t)=="String"?RK(t,""):nh(t)}:nh,Fo=function(t){return t==null},DK=Fo,MK=TypeError,Bo=function(t){if(DK(t))throw MK("Can't call method on "+t);return t},NK=gl,FK=Bo,nr=function(t){return NK(FK(t))},Qb=Je,XO=GO,BK=XO.all,et=XO.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:Qb(t)||t===BK}:function(t){return typeof t=="object"?t!==null:Qb(t)},ie={},ih=ie,ah=Ve,LK=Je,Zb=function(t){return LK(t)?t:void 0},Vt=function(t,i){return arguments.length<2?Zb(ih[t])||Zb(ah[t]):ih[t]&&ih[t][i]||ah[t]&&ah[t][i]},jK=ue,Ne=jK({}.isPrototypeOf),Lo=typeof navigator<"u"&&String(navigator.userAgent)||"",QO=Ve,oh=Lo,Jb=QO.process,e1=QO.Deno,t1=Jb&&Jb.versions||e1&&e1.version,r1=t1&&t1.v8,Yt,Cu;r1&&(Yt=r1.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,n1=jo,zK=se,oa=!!Object.getOwnPropertySymbols&&!zK(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n1&&n1<41}),HK=oa,ZO=HK&&!Symbol.sham&&typeof Symbol.iterator=="symbol",WK=Vt,VK=Je,UK=Ne,GK=ZO,KK=Object,zo=GK?function(t){return typeof t=="symbol"}:function(t){var i=WK("Symbol");return VK(i)&&UK(i.prototype,KK(t))},qK=String,sa=function(t){try{return qK(t)}catch{return"Object"}},YK=Je,XK=sa,QK=TypeError,Qn=function(t){if(YK(t))return t;throw QK(XK(t)+" is not a function")},ZK=Qn,JK=Fo,Hg=function(t,i){var e=t[i];return JK(e)?void 0:ZK(e)},sh=Mt,uh=Je,lh=et,eq=TypeError,tq=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 eq("Can't convert object to primitive value")},on={},rq={get exports(){return on},set exports(t){on=t}},i1=Ve,nq=Object.defineProperty,iq=function(t,i){try{nq(i1,t,{value:i,configurable:!0,writable:!0})}catch{i1[t]=i}return i},aq=Ve,oq=iq,a1="__core-js_shared__",sq=aq[a1]||oq(a1,{}),Wg=sq,o1=Wg;(rq.exports=function(t,i){return o1[t]||(o1[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 uq=Bo,lq=Object,Nt=function(t){return lq(uq(t))},cq=ue,hq=Nt,dq=cq({}.hasOwnProperty),tt=Object.hasOwn||function(i,e){return dq(hq(i),e)},fq=ue,vq=0,pq=Math.random(),gq=fq(1 .toString),yl=function(t){return"Symbol("+(t===void 0?"":t)+")_"+gq(++vq+pq,36)},yq=Ve,mq=on,s1=tt,$q=yl,bq=oa,wq=ZO,Si=yq.Symbol,ch=mq("wks"),_q=wq?Si.for||Si:Si&&Si.withoutSetter||$q,Fe=function(t){return s1(ch,t)||(ch[t]=bq&&s1(Si,t)?Si[t]:_q("Symbol."+t)),ch[t]},Eq=Mt,u1=et,l1=zo,Sq=Hg,Oq=tq,Tq=Fe,xq=TypeError,Pq=Tq("toPrimitive"),kq=function(t,i){if(!u1(t)||l1(t))return t;var e=Sq(t,Pq),r;if(e){if(i===void 0&&(i="default"),r=Eq(e,t,i),!u1(r)||l1(r))return r;throw xq("Can't convert object to primitive value")}return i===void 0&&(i="number"),Oq(t,i)},Iq=kq,Cq=zo,ml=function(t){var i=Iq(t,"string");return Cq(i)?i:i+""},Aq=Ve,c1=et,rv=Aq.document,Rq=c1(rv)&&c1(rv.createElement),JO=function(t){return Rq?rv.createElement(t):{}},Dq=Ge,Mq=se,Nq=JO,eT=!Dq&&!Mq(function(){return Object.defineProperty(Nq("div"),"a",{get:function(){return 7}}).a!=7}),Fq=Ge,Bq=Mt,Lq=Mo,jq=No,zq=nr,Hq=ml,Wq=tt,Vq=eT,h1=Object.getOwnPropertyDescriptor;aa.f=Fq?h1:function(i,e){if(i=zq(i),e=Hq(e),Vq)try{return h1(i,e)}catch{}if(Wq(i,e))return jq(!Bq(Lq.f,i,e),i[e])};var Uq=se,Gq=Je,Kq=/#|\.prototype\./,Ho=function(t,i){var e=Yq[qq(t)];return e==Qq?!0:e==Xq?!1:Gq(i)?Uq(i):!!i},qq=Ho.normalize=function(t){return String(t).replace(Kq,".").toLowerCase()},Yq=Ho.data={},Xq=Ho.NATIVE="N",Qq=Ho.POLYFILL="P",Zq=Ho,d1=zg,Jq=Qn,eY=Ro,tY=d1(d1.bind),Wo=function(t,i){return Jq(t),i===void 0?t:eY?tY(t,i):function(){return t.apply(i,arguments)}},Ut={},rY=Ge,nY=se,tT=rY&&nY(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),iY=et,aY=String,oY=TypeError,Ft=function(t){if(iY(t))return t;throw oY(aY(t)+" is not an object")},sY=Ge,uY=eT,lY=tT,ks=Ft,f1=ml,cY=TypeError,hh=Object.defineProperty,hY=Object.getOwnPropertyDescriptor,dh="enumerable",fh="configurable",vh="writable";Ut.f=sY?lY?function(i,e,r){if(ks(i),e=f1(e),ks(r),typeof i=="function"&&e==="prototype"&&"value"in r&&vh in r&&!r[vh]){var n=hY(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=f1(e),ks(r),uY)try{return hh(i,e,r)}catch{}if("get"in r||"set"in r)throw cY("Accessors not supported");return"value"in r&&(i[e]=r.value),i};var dY=Ge,fY=Ut,vY=No,ua=dY?function(t,i,e){return fY.f(t,i,vY(1,e))}:function(t,i,e){return t[i]=e,t},Is=Ve,pY=Do,gY=zg,yY=Je,mY=aa.f,$Y=Zq,ci=ie,bY=Wo,hi=ua,v1=tt,wY=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 pY(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=$Y(r?d:e+(n?".":"#")+d,t.forced),c=!l&&o&&v1(o,d),v=s[d],c&&(t.dontCallGetSet?(p=mY(o,d),g=p&&p.value):g=o[d]),f=c&&g?g:i[d],!(c&&typeof v==typeof f)&&(t.bind&&c?b=bY(f,Is):t.wrap&&c?b=wY(f):a&&yY(f)?b=gY(f):b=f,(t.sham||f&&f.sham||v&&v.sham)&&hi(b,"sham",!0),hi(s,d,b),a&&(h=e+"Prototype",v1(ci,h)||hi(ci,h,{}),hi(ci[h],d,f),t.real&&u&&(l||!u[d])&&hi(u,d,f)))},_Y=Math.ceil,EY=Math.floor,SY=Math.trunc||function(i){var e=+i;return(e>0?EY:_Y)(e)},OY=SY,$l=function(t){var i=+t;return i!==i||i===0?0:OY(i)},TY=$l,xY=Math.max,PY=Math.min,Vo=function(t,i){var e=TY(t);return e<0?xY(e+i,0):PY(e,i)},kY=$l,IY=Math.min,CY=function(t){return t>0?IY(kY(t),9007199254740991):0},AY=CY,ir=function(t){return AY(t.length)},RY=nr,DY=Vo,MY=ir,p1=function(t){return function(i,e,r){var n=RY(i),a=MY(n),o=DY(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:p1(!0),indexOf:p1(!1)},Uo={},NY=ue,ph=tt,FY=nr,BY=Vg.indexOf,LY=Uo,g1=NY([].push),rT=function(t,i){var e=FY(t),r=0,n=[],a;for(a in e)!ph(LY,a)&&ph(e,a)&&g1(n,a);for(;i.length>r;)ph(e,a=i[r++])&&(~BY(n,a)||g1(n,a));return n},Ug=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],jY=rT,zY=Ug,Go=Object.keys||function(i){return jY(i,zY)},Ko={};Ko.f=Object.getOwnPropertySymbols;var y1=Ge,HY=ue,WY=Mt,VY=se,gh=Go,UY=Ko,GY=Mo,KY=Nt,qY=gl,di=Object.assign,m1=Object.defineProperty,YY=HY([].concat),XY=!di||VY(function(){if(y1&&di({b:1},di(m1({},"a",{enumerable:!0,get:function(){m1(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=KY(i),n=arguments.length,a=1,o=UY.f,s=GY.f;n>a;)for(var u=qY(arguments[a++]),l=o?YY(gh(u),o(u)):gh(u),c=l.length,h=0,d;c>h;)d=l[h++],(!y1||WY(s,u,d))&&(r[d]=u[d]);return r}:di,QY=q,$1=XY;QY({target:"Object",stat:!0,arity:2,forced:Object.assign!==$1},{assign:$1});var ZY=ie,JY=ZY.Object.assign,eX=JY,tX=eX;(function(t){t.exports=tX})(yK);var je=V(Jf),nv={},rX={get exports(){return nv},set exports(t){nv=t}},nX=ue,bl=nX([].slice),nT=ue,iX=Qn,aX=et,oX=tt,b1=bl,sX=Ro,iT=Function,uX=nT([].concat),lX=nT([].join),yh={},cX=function(t,i,e){if(!oX(yh,i)){for(var r=[],n=0;n<i;n++)r[n]="a["+n+"]";yh[i]=iT("C,a","return new C("+lX(r,",")+")")}return yh[i](t,e)},aT=sX?iT.bind:function(i){var e=iX(this),r=e.prototype,n=b1(arguments,1),a=function(){var s=uX(n,b1(arguments));return this instanceof a?cX(e,s.length,s):e.apply(i,s)};return aX(r)&&(a.prototype=r),a},hX=q,w1=aT;hX({target:"Function",proto:!0,forced:Function.bind!==w1},{bind:w1});var dX=ie,rt=function(t){return dX[t+"Prototype"]},fX=rt,vX=fX("Function").bind,pX=Ne,gX=vX,mh=Function.prototype,yX=function(t){var i=t.bind;return t===mh||pX(mh,t)&&i===mh.bind?gX:i},mX=yX,oT=mX;(function(t){t.exports=oT})(rX);var A=V(nv);function Gg(t,i,e,r){t.beginPath(),t.arc(i,e,r,0,2*Math.PI,!1),t.closePath()}function $X(t,i,e,r){t.beginPath(),t.rect(i-r,e-r,r*2,r*2),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*=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 _X(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 EX(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 sT(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 uT(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 lT(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 SX(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 _1={circle:Gg,dashedLine:lT,database:uT,diamond:EX,ellipse:iv,ellipse_vis:iv,hexagon:SX,roundRect:sT,square:$X,star:_X,triangle:bX,triangleDown:wX};function OX(t){return Object.prototype.hasOwnProperty.call(_1,t)?_1[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={},TX={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}})(TX);var cT=av,ov={},xX={get exports(){return ov},set exports(t){ov=t}},PX=Fe,kX=PX("toStringTag"),hT={};hT[kX]="z";var Kg=String(hT)==="[object z]",IX=Kg,CX=Je,eu=Fr,AX=Fe,RX=AX("toStringTag"),DX=Object,MX=eu(function(){return arguments}())=="Arguments",NX=function(t,i){try{return t[i]}catch{}},Zn=IX?eu:function(t){var i,e,r;return t===void 0?"Undefined":t===null?"Null":typeof(e=NX(i=DX(t),RX))=="string"?e:MX?eu(i):(r=eu(i))=="Object"&&CX(i.callee)?"Arguments":r},FX=Zn,BX=String,mr=function(t){if(FX(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return BX(t)},qg=ue,LX=$l,jX=mr,zX=Bo,HX=qg("".charAt),E1=qg("".charCodeAt),WX=qg("".slice),S1=function(t){return function(i,e){var r=jX(zX(i)),n=LX(e),a=r.length,o,s;return n<0||n>=a?t?"":void 0:(o=E1(r,n),o<55296||o>56319||n+1===a||(s=E1(r,n+1))<56320||s>57343?t?HX(r,n):o:t?WX(r,n,n+2):(o-55296<<10)+(s-56320)+65536)}},VX={codeAt:S1(!1),charAt:S1(!0)},UX=Ve,GX=Je,O1=UX.WeakMap,dT=GX(O1)&&/native code/.test(String(O1)),KX=on,qX=yl,T1=KX("keys"),wl=function(t){return T1[t]||(T1[t]=qX(t))},YX=dT,fT=Ve,XX=et,QX=ua,$h=tt,bh=Wg,ZX=wl,JX=Uo,x1="Object already initialized",sv=fT.TypeError,eQ=fT.WeakMap,Au,Qa,Ru,tQ=function(t){return Ru(t)?Qa(t):Au(t,{})},rQ=function(t){return function(i){var e;if(!XX(i)||(e=Qa(i)).type!==t)throw sv("Incompatible receiver, "+t+" required");return e}};if(YX||bh.state){var ur=bh.state||(bh.state=new eQ);ur.get=ur.get,ur.has=ur.has,ur.set=ur.set,Au=function(t,i){if(ur.has(t))throw sv(x1);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=ZX("state");JX[fi]=!0,Au=function(t,i){if($h(t,fi))throw sv(x1);return i.facade=t,QX(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:tQ,getterFor:rQ},uv=Ge,nQ=tt,vT=Function.prototype,iQ=uv&&Object.getOwnPropertyDescriptor,Yg=nQ(vT,"name"),aQ=Yg&&function(){}.name==="something",oQ=Yg&&(!uv||uv&&iQ(vT,"name").configurable),pT={EXISTS:Yg,PROPER:aQ,CONFIGURABLE:oQ},_l={},sQ=Ge,uQ=tT,lQ=Ut,cQ=Ft,hQ=nr,dQ=Go;_l.f=sQ&&!uQ?Object.defineProperties:function(i,e){cQ(i);for(var r=hQ(e),n=dQ(e),a=n.length,o=0,s;a>o;)lQ.f(i,s=n[o++],r[s]);return i};var fQ=Vt,vQ=fQ("document","documentElement"),pQ=Ft,gQ=_l,P1=Ug,yQ=Uo,mQ=vQ,$Q=JO,bQ=wl,k1=">",I1="<",lv="prototype",cv="script",gT=bQ("IE_PROTO"),wh=function(){},yT=function(t){return I1+cv+k1+t+I1+"/"+cv+k1},C1=function(t){t.write(yT("")),t.close();var i=t.parentWindow.Object;return t=null,i},wQ=function(){var t=$Q("iframe"),i="java"+cv+":",e;return t.style.display="none",mQ.appendChild(t),t.src=String(i),e=t.contentWindow.document,e.open(),e.write(yT("document.F=Object")),e.close(),e.F},Cs,tu=function(){try{Cs=new ActiveXObject("htmlfile")}catch{}tu=typeof document<"u"?document.domain&&Cs?C1(Cs):wQ():C1(Cs);for(var t=P1.length;t--;)delete tu[lv][P1[t]];return tu()};yQ[gT]=!0;var la=Object.create||function(i,e){var r;return i!==null?(wh[lv]=pQ(i),r=new wh,wh[lv]=null,r[gT]=i):r=tu(),e===void 0?r:gQ.f(r,e)},_Q=se,mT=!_Q(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),EQ=tt,SQ=Je,OQ=Nt,TQ=wl,xQ=mT,A1=TQ("IE_PROTO"),hv=Object,PQ=hv.prototype,El=xQ?hv.getPrototypeOf:function(t){var i=OQ(t);if(EQ(i,A1))return i[A1];var e=i.constructor;return SQ(e)&&i instanceof e?e.prototype:i instanceof hv?PQ:null},kQ=ua,qo=function(t,i,e,r){return r&&r.enumerable?t[i]=e:kQ(t,i,e),t},IQ=se,CQ=Je,AQ=et,RQ=la,R1=El,DQ=qo,MQ=Fe,dv=MQ("iterator"),$T=!1,Sr,_h,Eh;[].keys&&(Eh=[].keys(),"next"in Eh?(_h=R1(R1(Eh)),_h!==Object.prototype&&(Sr=_h)):$T=!0);var NQ=!AQ(Sr)||IQ(function(){var t={};return Sr[dv].call(t)!==t});NQ?Sr={}:Sr=RQ(Sr);CQ(Sr[dv])||DQ(Sr,dv,function(){return this});var bT={IteratorPrototype:Sr,BUGGY_SAFARI_ITERATORS:$T},FQ=Kg,BQ=Zn,LQ=FQ?{}.toString:function(){return"[object "+BQ(this)+"]"},jQ=Kg,zQ=Ut.f,HQ=ua,WQ=tt,VQ=LQ,UQ=Fe,D1=UQ("toStringTag"),ca=function(t,i,e,r){if(t){var n=e?t:t.prototype;WQ(n,D1)||zQ(n,D1,{configurable:!0,value:i}),r&&!jQ&&HQ(n,"toString",VQ)}},ha={},GQ=bT.IteratorPrototype,KQ=la,qQ=No,YQ=ca,XQ=ha,QQ=function(){return this},ZQ=function(t,i,e,r){var n=i+" Iterator";return t.prototype=KQ(GQ,{next:qQ(+!r,e)}),YQ(t,n,!1,!0),XQ[n]=QQ,t},JQ=ue,eZ=Qn,tZ=function(t,i,e){try{return JQ(eZ(Object.getOwnPropertyDescriptor(t,i)[e]))}catch{}},rZ=Je,nZ=String,iZ=TypeError,aZ=function(t){if(typeof t=="object"||rZ(t))return t;throw iZ("Can't set "+nZ(t)+" as a prototype")},oZ=tZ,sZ=Ft,uZ=aZ,lZ=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,i={},e;try{e=oZ(Object.prototype,"__proto__","set"),e(i,[]),t=i instanceof Array}catch{}return function(n,a){return sZ(n),uZ(a),t?e(n,a):n.__proto__=a,n}}():void 0),cZ=q,hZ=Mt,dZ=pT,fZ=ZQ,vZ=El,pZ=ca,M1=qo,gZ=Fe,N1=ha,yZ=bT,mZ=dZ.PROPER,As=yZ.BUGGY_SAFARI_ITERATORS,Sh=gZ("iterator"),F1="keys",Rs="values",B1="entries",$Z=function(){return this},Xg=function(t,i,e,r,n,a,o){fZ(e,i,r);var s=function(p){if(p===n&&d)return d;if(!As&&p in c)return c[p];switch(p){case F1:return function(){return new e(this,p)};case Rs:return function(){return new e(this,p)};case B1: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=vZ(f.call(new t)),v!==Object.prototype&&v.next&&(pZ(v,u,!0,!0),N1[u]=$Z)),mZ&&n==Rs&&h&&h.name!==Rs&&(l=!0,d=function(){return hZ(h,this)}),n)if(g={values:s(Rs),keys:a?d:s(F1),entries:s(B1)},o)for(b in g)(As||l||!(b in c))&&M1(c,b,g[b]);else cZ({target:i,proto:!0,forced:As||l},g);return o&&c[Sh]!==d&&M1(c,Sh,d,{name:n}),N1[i]=d,g},Qg=function(t,i){return{value:t,done:i}},bZ=VX.charAt,wZ=mr,wT=Jn,_Z=Xg,L1=Qg,_T="String Iterator",EZ=wT.set,SZ=wT.getterFor(_T);_Z(String,"String",function(t){EZ(this,{type:_T,string:wZ(t),index:0})},function(){var i=SZ(this),e=i.string,r=i.index,n;return r>=e.length?L1(void 0,!0):(n=bZ(e,r),i.index+=n.length,L1(n,!1))});var OZ=Mt,j1=Ft,TZ=Hg,ET=function(t,i,e){var r,n;j1(t);try{if(r=TZ(t,"return"),!r){if(i==="throw")throw e;return e}r=OZ(r,t)}catch(a){n=!0,r=a}if(i==="throw")throw e;if(n)throw r;return j1(r),e},xZ=Ft,PZ=ET,kZ=function(t,i,e,r){try{return r?i(xZ(e)[0],e[1]):i(e)}catch(n){PZ(t,"throw",n)}},IZ=Fe,CZ=ha,AZ=IZ("iterator"),RZ=Array.prototype,ST=function(t){return t!==void 0&&(CZ.Array===t||RZ[AZ]===t)},DZ=ue,MZ=Je,fv=Wg,NZ=DZ(Function.toString);MZ(fv.inspectSource)||(fv.inspectSource=function(t){return NZ(t)});var FZ=fv.inspectSource,BZ=ue,LZ=se,OT=Je,jZ=Zn,zZ=Vt,HZ=FZ,TT=function(){},WZ=[],xT=zZ("Reflect","construct"),Zg=/^\s*(?:class|function)\b/,VZ=BZ(Zg.exec),UZ=!Zg.exec(TT),$a=function(i){if(!OT(i))return!1;try{return xT(TT,WZ,i),!0}catch{return!1}},PT=function(i){if(!OT(i))return!1;switch(jZ(i)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return UZ||!!VZ(Zg,HZ(i))}catch{return!0}};PT.sham=!0;var Sl=!xT||LZ(function(){var t;return $a($a.call)||!$a(Object)||!$a(function(){t=!0})||t})?PT:$a,GZ=ml,KZ=Ut,qZ=No,da=function(t,i,e){var r=GZ(i);r in t?KZ.f(t,r,qZ(0,e)):t[r]=e},YZ=Zn,z1=Hg,XZ=Fo,QZ=ha,ZZ=Fe,JZ=ZZ("iterator"),Ol=function(t){if(!XZ(t))return z1(t,JZ)||z1(t,"@@iterator")||QZ[YZ(t)]},eJ=Mt,tJ=Qn,rJ=Ft,nJ=sa,iJ=Ol,aJ=TypeError,kT=function(t,i){var e=arguments.length<2?iJ(t):i;if(tJ(e))return rJ(eJ(e,t));throw aJ(nJ(t)+" is not iterable")},oJ=Wo,sJ=Mt,uJ=Nt,lJ=kZ,cJ=ST,hJ=Sl,dJ=ir,H1=da,fJ=kT,vJ=Ol,W1=Array,pJ=function(i){var e=uJ(i),r=hJ(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=oJ(a,n>2?arguments[2]:void 0));var s=vJ(e),u=0,l,c,h,d,f,v;if(s&&!(this===W1&&cJ(s)))for(d=fJ(e,s),f=d.next,c=r?new this:[];!(h=sJ(f,d)).done;u++)v=o?lJ(d,a,[h.value,u],!0):h.value,H1(c,u,v);else for(l=dJ(e),c=r?new this(l):W1(l);l>u;u++)v=o?a(e[u],u):e[u],H1(c,u,v);return c.length=u,c},gJ=Fe,IT=gJ("iterator"),CT=!1;try{var yJ=0,V1={next:function(){return{done:!!yJ++}},return:function(){CT=!0}};V1[IT]=function(){return this},Array.from(V1,function(){throw 2})}catch{}var mJ=function(t,i){if(!i&&!CT)return!1;var e=!1;try{var r={};r[IT]=function(){return{next:function(){return{done:e=!0}}}},t(r)}catch{}return e},$J=q,bJ=pJ,wJ=mJ,_J=!wJ(function(t){Array.from(t)});$J({target:"Array",stat:!0,forced:_J},{from:bJ});var EJ=ie,SJ=EJ.Array.from,OJ=SJ,AT=OJ;(function(t){t.exports=AT})(xX);var ei=V(ov),vv={},TJ={get exports(){return vv},set exports(t){vv=t}},pv={},xJ={get exports(){return pv},set exports(t){pv=t}},PJ=nr,U1=ha,RT=Jn;Ut.f;var kJ=Xg,Ds=Qg,DT="Array Iterator",IJ=RT.set,CJ=RT.getterFor(DT);kJ(Array,"Array",function(t,i){IJ(this,{type:DT,target:PJ(t),index:0,kind:i})},function(){var t=CJ(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");U1.Arguments=U1.Array;var AJ=Ol,RJ=AJ,DJ={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},MJ=DJ,NJ=Ve,FJ=Zn,BJ=ua,G1=ha,LJ=Fe,K1=LJ("toStringTag");for(var Oh in MJ){var q1=NJ[Oh],Th=q1&&q1.prototype;Th&&FJ(Th)!==K1&&BJ(Th,K1,Oh),G1[Oh]=G1.Array}var jJ=RJ,zJ=jJ,HJ=zJ,WJ=HJ,VJ=WJ,UJ=VJ;(function(t){t.exports=UJ})(xJ);(function(t){t.exports=pv})(TJ);var Br=V(vv),gv={},GJ={get exports(){return gv},set exports(t){gv=t}},Yo={},KJ=rT,qJ=Ug,YJ=qJ.concat("length","prototype");Yo.f=Object.getOwnPropertyNames||function(i){return KJ(i,YJ)};var Tl={},Y1=Vo,XJ=ir,QJ=da,ZJ=Array,JJ=Math.max,MT=function(t,i,e){for(var r=XJ(t),n=Y1(i,r),a=Y1(e===void 0?r:e,r),o=ZJ(JJ(a-n,0)),s=0;n<a;n++,s++)QJ(o,s,t[n]);return o.length=s,o},eee=Fr,tee=nr,NT=Yo.f,ree=MT,FT=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],nee=function(t){try{return NT(t)}catch{return ree(FT)}};Tl.f=function(i){return FT&&eee(i)=="Window"?nee(i):NT(tee(i))};var iee=Ut,Jg=function(t,i,e){return iee.f(t,i,e)},Xo={},aee=Fe;Xo.f=aee;var X1=ie,oee=tt,see=Xo,uee=Ut.f,Ce=function(t){var i=X1.Symbol||(X1.Symbol={});oee(i,t)||uee(i,t,{value:see.f(t)})},lee=Mt,cee=Vt,hee=Fe,dee=qo,BT=function(){var t=cee("Symbol"),i=t&&t.prototype,e=i&&i.valueOf,r=hee("toPrimitive");i&&!i[r]&&dee(i,r,function(n){return lee(e,this)},{arity:1})},fee=Fr,ti=Array.isArray||function(i){return fee(i)=="Array"},Q1=ti,vee=Sl,pee=et,gee=Fe,yee=gee("species"),Z1=Array,mee=function(t){var i;return Q1(t)&&(i=t.constructor,vee(i)&&(i===Z1||Q1(i.prototype))?i=void 0:pee(i)&&(i=i[yee],i===null&&(i=void 0))),i===void 0?Z1:i},$ee=mee,ey=function(t,i){return new($ee(t))(i===0?0:i)},bee=Wo,wee=ue,_ee=gl,Eee=Nt,See=ir,Oee=ey,J1=wee([].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=Eee(u),f=_ee(d),v=bee(l,c),g=See(f),b=0,p=h||Oee,$=i?p(u,g):e||o?p(u,0):void 0,m,y;g>b;b++)if((s||b in f)&&(m=f[b],y=v(m,b,d),t))if(i)$[b]=y;else if(y)switch(t){case 3:return!0;case 5:return m;case 6:return b;case 2:J1($,m)}else switch(t){case 4:return!1;case 7:J1($,m)}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=Ve,ry=Mt,Tee=ue,Bi=Ge,Li=oa,xee=se,Xe=tt,Pee=Ne,yv=Ft,Pl=nr,ny=ml,kee=mr,mv=No,Za=la,LT=Go,Iee=Yo,jT=Tl,Cee=Ko,zT=aa,HT=Ut,Aee=_l,WT=Mo,ew=qo,Ree=Jg,iy=on,Dee=wl,VT=Uo,tw=yl,Mee=Fe,Nee=Xo,Fee=Ce,Bee=BT,Lee=ca,UT=Jn,kl=fn.forEach,Et=Dee("hidden"),Il="Symbol",Ja="prototype",jee=UT.set,rw=UT.getterFor(Il),Jt=Object[Ja],Cn=ty.Symbol,Ta=Cn&&Cn[Ja],zee=ty.TypeError,xh=ty.QObject,GT=zT.f,En=HT.f,KT=jT.f,Hee=WT.f,qT=Tee([].push),Cr=iy("symbols"),Qo=iy("op-symbols"),Wee=iy("wks"),$v=!xh||!xh[Ja]||!xh[Ja].findChild,bv=Bi&&xee(function(){return Za(En({},"a",{get:function(){return En(this,"a",{value:7}).a}})).a!=7})?function(t,i,e){var r=GT(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 jee(e,{type:Il,tag:t,description:i}),Bi||(e.description=i),e},Cl=function(i,e,r){i===Jt&&Cl(Qo,e,r),yv(i);var n=ny(e);return yv(r),Xe(Cr,n)?(r.enumerable?(Xe(i,Et)&&i[Et][n]&&(i[Et][n]=!1),r=Za(r,{enumerable:mv(0,!1)})):(Xe(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=LT(r).concat(ZT(r));return kl(n,function(a){(!Bi||ry(YT,r,a))&&Cl(i,a,r[a])}),i},Vee=function(i,e){return e===void 0?Za(i):ay(Za(i),e)},YT=function(i){var e=ny(i),r=ry(Hee,this,e);return this===Jt&&Xe(Cr,e)&&!Xe(Qo,e)?!1:r||!Xe(this,e)||!Xe(Cr,e)||Xe(this,Et)&&this[Et][e]?r:!0},XT=function(i,e){var r=Pl(i),n=ny(e);if(!(r===Jt&&Xe(Cr,n)&&!Xe(Qo,n))){var a=GT(r,n);return a&&Xe(Cr,n)&&!(Xe(r,Et)&&r[Et][n])&&(a.enumerable=!0),a}},QT=function(i){var e=KT(Pl(i)),r=[];return kl(e,function(n){!Xe(Cr,n)&&!Xe(VT,n)&&qT(r,n)}),r},ZT=function(t){var i=t===Jt,e=KT(i?Qo:Pl(t)),r=[];return kl(e,function(n){Xe(Cr,n)&&(!i||Xe(Jt,n))&&qT(r,Cr[n])}),r};Li||(Cn=function(){if(Pee(Ta,this))throw zee("Symbol is not a constructor");var i=!arguments.length||arguments[0]===void 0?void 0:kee(arguments[0]),e=tw(i),r=function(n){this===Jt&&ry(r,Qo,n),Xe(this,Et)&&Xe(this[Et],e)&&(this[Et][e]=!1),bv(this,e,mv(1,n))};return Bi&&$v&&bv(Jt,e,{configurable:!0,set:r}),Ph(e,i)},Ta=Cn[Ja],ew(Ta,"toString",function(){return rw(this).tag}),ew(Cn,"withoutSetter",function(t){return Ph(tw(t),t)}),WT.f=YT,HT.f=Cl,Aee.f=ay,zT.f=XT,Iee.f=jT.f=QT,Cee.f=ZT,Nee.f=function(t){return Ph(Mee(t),t)},Bi&&Ree(Ta,"description",{configurable:!0,get:function(){return rw(this).description}}));xl({global:!0,constructor:!0,wrap:!0,forced:!Li,sham:!Li},{Symbol:Cn});kl(LT(Wee),function(t){Fee(t)});xl({target:Il,stat:!0,forced:!Li},{useSetter:function(){$v=!0},useSimple:function(){$v=!1}});xl({target:"Object",stat:!0,forced:!Li,sham:!Bi},{create:Vee,defineProperty:Cl,defineProperties:ay,getOwnPropertyDescriptor:XT});xl({target:"Object",stat:!0,forced:!Li},{getOwnPropertyNames:QT});Bee();Lee(Cn,Il);VT[Et]=!0;var Uee=oa,JT=Uee&&!!Symbol.for&&!!Symbol.keyFor,Gee=q,Kee=Vt,qee=tt,Yee=mr,ex=on,Xee=JT,kh=ex("string-to-symbol-registry"),Qee=ex("symbol-to-string-registry");Gee({target:"Symbol",stat:!0,forced:!Xee},{for:function(t){var i=Yee(t);if(qee(kh,i))return kh[i];var e=Kee("Symbol")(i);return kh[i]=e,Qee[e]=i,e}});var Zee=q,Jee=tt,ete=zo,tte=sa,rte=on,nte=JT,nw=rte("symbol-to-string-registry");Zee({target:"Symbol",stat:!0,forced:!nte},{keyFor:function(i){if(!ete(i))throw TypeError(tte(i)+" is not a symbol");if(Jee(nw,i))return nw[i]}});var ite=ue,iw=ti,ate=Je,aw=Fr,ote=mr,ow=ite([].push),ste=function(t){if(ate(t))return t;if(iw(t)){for(var i=t.length,e=[],r=0;r<i;r++){var n=t[r];typeof n=="string"?ow(e,n):(typeof n=="number"||aw(n)=="Number"||aw(n)=="String")&&ow(e,ote(n))}var a=e.length,o=!0;return function(s,u){if(o)return o=!1,u;if(iw(this))return u;for(var l=0;l<a;l++)if(e[l]===s)return u}}},ute=q,tx=Vt,rx=Do,lte=Mt,Zo=ue,nx=se,sw=Je,uw=zo,ix=bl,cte=ste,hte=oa,dte=String,Jr=tx("JSON","stringify"),Ms=Zo(/./.exec),lw=Zo("".charAt),fte=Zo("".charCodeAt),vte=Zo("".replace),pte=Zo(1 .toString),gte=/[\uD800-\uDFFF]/g,cw=/^[\uD800-\uDBFF]$/,hw=/^[\uDC00-\uDFFF]$/,dw=!hte||nx(function(){var t=tx("Symbol")();return Jr([t])!="[null]"||Jr({a:t})!="{}"||Jr(Object(t))!="{}"}),fw=nx(function(){return Jr("\uDF06\uD834")!=='"\\udf06\\ud834"'||Jr("\uDEAD")!=='"\\udead"'}),yte=function(t,i){var e=ix(arguments),r=cte(i);if(!(!sw(r)&&(t===void 0||uw(t))))return e[1]=function(n,a){if(sw(r)&&(a=lte(r,this,dte(n),a)),!uw(a))return a},rx(Jr,null,e)},mte=function(t,i,e){var r=lw(e,i-1),n=lw(e,i+1);return Ms(cw,t)&&!Ms(hw,n)||Ms(hw,t)&&!Ms(cw,r)?"\\u"+pte(fte(t,0),16):t};Jr&&ute({target:"JSON",stat:!0,arity:3,forced:dw||fw},{stringify:function(i,e,r){var n=ix(arguments),a=rx(dw?yte:Jr,null,n);return fw&&typeof a=="string"?vte(a,gte,mte):a}});var $te=q,bte=oa,wte=se,ax=Ko,_te=Nt,Ete=!bte||wte(function(){ax.f(1)});$te({target:"Object",stat:!0,forced:Ete},{getOwnPropertySymbols:function(i){var e=ax.f;return e?e(_te(i)):[]}});var Ste=ie,Ote=Ste.Object.getOwnPropertySymbols,Tte=Ote,xte=Tte;(function(t){t.exports=xte})(GJ);var sn=V(gv),wv={},Pte={get exports(){return wv},set exports(t){wv=t}},_v={},kte={get exports(){return _v},set exports(t){_v=t}},Ite=q,Cte=se,Ate=nr,ox=aa.f,sx=Ge,Rte=!sx||Cte(function(){ox(1)});Ite({target:"Object",stat:!0,forced:Rte,sham:!sx},{getOwnPropertyDescriptor:function(i,e){return ox(Ate(i),e)}});var Dte=ie,ux=Dte.Object,Mte=kte.exports=function(i,e){return ux.getOwnPropertyDescriptor(i,e)};ux.getOwnPropertyDescriptor.sham&&(Mte.sham=!0);var Nte=_v,lx=Nte;(function(t){t.exports=lx})(Pte);var vn=V(wv),Ev={},Fte={get exports(){return Ev},set exports(t){Ev=t}},Bte=Vt,Lte=ue,jte=Yo,zte=Ko,Hte=Ft,Wte=Lte([].concat),cx=Bte("Reflect","ownKeys")||function(i){var e=jte.f(Hte(i)),r=zte.f;return r?Wte(e,r(i)):e},Vte=q,Ute=Ge,Gte=cx,Kte=nr,qte=aa,Yte=da;Vte({target:"Object",stat:!0,sham:!Ute},{getOwnPropertyDescriptors:function(i){for(var e=Kte(i),r=qte.f,n=Gte(e),a={},o=0,s,u;n.length>o;)u=r(e,s=n[o++]),u!==void 0&&Yte(a,s,u);return a}});var Xte=ie,Qte=Xte.Object.getOwnPropertyDescriptors,Zte=Qte,Jte=Zte;(function(t){t.exports=Jte})(Fte);var un=V(Ev),Sv={},ere={get exports(){return Sv},set exports(t){Sv=t}},Ov={},tre={get exports(){return Ov},set exports(t){Ov=t}},rre=q,nre=Ge,vw=_l.f;rre({target:"Object",stat:!0,forced:Object.defineProperties!==vw,sham:!nre},{defineProperties:vw});var ire=ie,hx=ire.Object,are=tre.exports=function(i,e){return hx.defineProperties(i,e)};hx.defineProperties.sham&&(are.sham=!0);var ore=Ov,sre=ore;(function(t){t.exports=sre})(ere);var Al=V(Sv),Tv={},ure={get exports(){return Tv},set exports(t){Tv=t}},xv={},lre={get exports(){return xv},set exports(t){xv=t}},cre=q,hre=Ge,pw=Ut.f;cre({target:"Object",stat:!0,forced:Object.defineProperty!==pw,sham:!hre},{defineProperty:pw});var dre=ie,dx=dre.Object,fre=lre.exports=function(i,e,r){return dx.defineProperty(i,e,r)};dx.defineProperty.sham&&(fre.sham=!0);var vre=xv,fx=vre;(function(t){t.exports=fx})(ure);var Rl=V(Tv);function N(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}var Pv={},pre={get exports(){return Pv},set exports(t){Pv=t}},kv={},gre={get exports(){return kv},set exports(t){kv=t}},yre=fx,mre=yre,$re=mre,bre=$re;(function(t){t.exports=bre})(gre);(function(t){t.exports=kv})(pre);var Dl=V(Pv),Iv={},wre={get exports(){return Iv},set exports(t){Iv=t}},Cv={},_re={get exports(){return Cv},set exports(t){Cv=t}},Ere=TypeError,Sre=9007199254740991,vx=function(t){if(t>Sre)throw Ere("Maximum allowed index exceeded");return t},Ore=se,Tre=Fe,xre=jo,Pre=Tre("species"),Jo=function(t){return xre>=51||!Ore(function(){var i=[],e=i.constructor={};return e[Pre]=function(){return{foo:1}},i[t](Boolean).foo!==1})},kre=q,Ire=se,Cre=ti,Are=et,Rre=Nt,Dre=ir,gw=vx,yw=da,Mre=ey,Nre=Jo,Fre=Fe,Bre=jo,px=Fre("isConcatSpreadable"),Lre=Bre>=51||!Ire(function(){var t=[];return t[px]=!1,t.concat()[0]!==t}),jre=function(t){if(!Are(t))return!1;var i=t[px];return i!==void 0?!!i:Cre(t)},zre=!Lre||!Nre("concat");kre({target:"Array",proto:!0,arity:1,forced:zre},{concat:function(i){var e=Rre(this),r=Mre(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],jre(l))for(u=Dre(l),gw(n+u),o=0;o<u;o++,n++)o in l&&yw(r,n,l[o]);else gw(n+1),yw(r,n++,l);return r.length=n,r}});var Hre=Ce;Hre("asyncIterator");var Wre=Ce;Wre("hasInstance");var Vre=Ce;Vre("isConcatSpreadable");var Ure=Ce;Ure("iterator");var Gre=Ce;Gre("match");var Kre=Ce;Kre("matchAll");var qre=Ce;qre("replace");var Yre=Ce;Yre("search");var Xre=Ce;Xre("species");var Qre=Ce;Qre("split");var Zre=Ce,Jre=BT;Zre("toPrimitive");Jre();var ene=Vt,tne=Ce,rne=ca;tne("toStringTag");rne(ene("Symbol"),"Symbol");var nne=Ce;nne("unscopables");var ine=Ve,ane=ca;ane(ine.JSON,"JSON",!0);var one=ie,sne=one.Symbol,une=sne,gx=une,lne=Ce;lne("dispose");var cne=gx,hne=cne,dne=Ce;dne("asyncDispose");var fne=q,vne=Vt,pne=ue,yx=vne("Symbol"),gne=yx.keyFor,yne=pne(yx.prototype.valueOf);fne({target:"Symbol",stat:!0},{isRegistered:function(i){try{return gne(yne(i))!==void 0}catch{return!1}}});var mne=q,$ne=on,mx=Vt,bne=ue,wne=zo,_ne=Fe,Du=mx("Symbol"),mw=Du.isWellKnown,$x=mx("Object","getOwnPropertyNames"),Ene=bne(Du.prototype.valueOf),$w=$ne("wks");for(var Ih=0,bw=$x(Du),Sne=bw.length;Ih<Sne;Ih++)try{var ww=bw[Ih];wne(Du[ww])&&_ne(ww)}catch{}mne({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(i){if(mw&&mw(i))return!0;try{for(var e=Ene(i),r=0,n=$x($w),a=n.length;r<a;r++)if($w[n[r]]==e)return!0}catch{}return!1}});var One=Ce;One("matcher");var Tne=Ce;Tne("metadataKey");var xne=Ce;xne("observable");var Pne=Ce;Pne("metadata");var kne=Ce;kne("patternMatch");var Ine=Ce;Ine("replaceAll");var Cne=hne,Ane=Cne;(function(t){t.exports=Ane})(_re);(function(t){t.exports=Cv})(wre);var Oi=V(Iv),Av={},Rne={get exports(){return Av},set exports(t){Av=t}},Rv={},Dne={get exports(){return Rv},set exports(t){Rv=t}},Mne=Xo,Nne=Mne.f("iterator"),Fne=Nne,Bne=Fne,Lne=Bne,jne=Lne,zne=jne,Hne=zne;(function(t){t.exports=Hne})(Dne);(function(t){t.exports=Rv})(Rne);var Wne=V(Av);function he(t){"@babel/helpers - typeof";return he=typeof Oi=="function"&&typeof Wne=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Oi=="function"&&i.constructor===Oi&&i!==Oi.prototype?"symbol":typeof i},he(t)}var Dv={},Vne={get exports(){return Dv},set exports(t){Dv=t}},Mv={},Une={get exports(){return Mv},set exports(t){Mv=t}},Gne=Xo,Kne=Gne.f("toPrimitive"),qne=Kne,Yne=qne,Xne=Yne,Qne=Xne,Zne=Qne,Jne=Zne;(function(t){t.exports=Jne})(Une);(function(t){t.exports=Mv})(Vne);var eie=V(Dv);function tie(t,i){if(he(t)!=="object"||t===null)return t;var e=t[eie];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 bx(t){var i=tie(t,"string");return he(i)==="symbol"?i:String(i)}function _w(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,bx(r.key),r)}}function F(t,i,e){return i&&_w(t.prototype,i),e&&_w(t,e),Dl(t,"prototype",{writable:!1}),t}function Ml(t,i,e){return i=bx(i),i in t?Dl(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}var Nv={},rie={get exports(){return Nv},set exports(t){Nv=t}},Fv={},nie={get exports(){return Fv},set exports(t){Fv=t}},iie=q,aie=ti;iie({target:"Array",stat:!0},{isArray:aie});var oie=ie,sie=oie.Array.isArray,uie=sie,wx=uie,lie=wx,cie=lie,hie=cie,die=hie;(function(t){t.exports=die})(nie);(function(t){t.exports=Fv})(rie);var _x=V(Nv);function fie(t){if(_x(t))return t}function vie(t,i){var e=t==null?null:typeof Oi<"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={},pie={get exports(){return Bv},set exports(t){Bv=t}},Lv={},gie={get exports(){return Lv},set exports(t){Lv=t}},yie=q,Ew=ti,mie=Sl,$ie=et,Sw=Vo,bie=ir,wie=nr,_ie=da,Eie=Fe,Sie=Jo,Oie=bl,Tie=Sie("slice"),xie=Eie("species"),Ch=Array,Pie=Math.max;yie({target:"Array",proto:!0,forced:!Tie},{slice:function(i,e){var r=wie(this),n=bie(r),a=Sw(i,n),o=Sw(e===void 0?n:e,n),s,u,l;if(Ew(r)&&(s=r.constructor,mie(s)&&(s===Ch||Ew(s.prototype))?s=void 0:$ie(s)&&(s=s[xie],s===null&&(s=void 0)),s===Ch||s===void 0))return Oie(r,a,o);for(u=new(s===void 0?Ch:s)(Pie(o-a,0)),l=0;a<o;a++,l++)a in r&&_ie(u,l,r[a]);return u.length=l,u}});var kie=rt,Iie=kie("Array").slice,Cie=Ne,Aie=Iie,Ah=Array.prototype,Rie=function(t){var i=t.slice;return t===Ah||Cie(Ah,t)&&i===Ah.slice?Aie:i},Die=Rie,Ex=Die,Mie=Ex,Nie=Mie,Fie=Nie,Bie=Fie;(function(t){t.exports=Bie})(gie);(function(t){t.exports=Lv})(pie);var Lie=V(Bv),jv={},jie={get exports(){return jv},set exports(t){jv=t}},zv={},zie={get exports(){return zv},set exports(t){zv=t}},Hie=AT,Wie=Hie,Vie=Wie,Uie=Vie;(function(t){t.exports=Uie})(zie);(function(t){t.exports=zv})(jie);var Sx=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 Ox(t,i){var e;if(t){if(typeof t=="string")return Hv(t,i);var r=Lie(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Sx(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hv(t,i)}}function Gie(){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 fie(t)||vie(t,i)||Ox(t,i)||Gie()}function Kie(t){if(_x(t))return Hv(t)}function qie(t){if(typeof Oi<"u"&&Br(t)!=null||t["@@iterator"]!=null)return Sx(t)}function Yie(){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 Kie(t)||qie(t)||Ox(t)||Yie()}var Wv={},Xie={get exports(){return Wv},set exports(t){Wv=t}};(function(t){t.exports=gx})(Xie);var pn=V(Wv),Vv={},Qie={get exports(){return Vv},set exports(t){Vv=t}},Zie=rt,Jie=Zie("Array").concat,eae=Ne,tae=Jie,Rh=Array.prototype,rae=function(t){var i=t.concat;return t===Rh||eae(Rh,t)&&i===Rh.concat?tae:i},nae=rae,iae=nae;(function(t){t.exports=iae})(Qie);var oy=V(Vv),Uv={},aae={get exports(){return Uv},set exports(t){Uv=t}};(function(t){t.exports=Ex})(aae);var st=V(Uv),Ow={},oae={get exports(){return Ow},set exports(t){Ow=t}},sae=q,uae=cx;sae({target:"Reflect",stat:!0},{ownKeys:uae});var lae=ie,cae=lae.Reflect.ownKeys,hae=cae,dae=hae;(function(t){t.exports=dae})(oae);var Gv={},fae={get exports(){return Gv},set exports(t){Gv=t}};(function(t){t.exports=wx})(fae);var ve=V(Gv),Kv={},vae={get exports(){return Kv},set exports(t){Kv=t}},pae=q,gae=fn.map,yae=Jo,mae=yae("map");pae({target:"Array",proto:!0,forced:!mae},{map:function(i){return gae(this,i,arguments.length>1?arguments[1]:void 0)}});var $ae=rt,bae=$ae("Array").map,wae=Ne,_ae=bae,Dh=Array.prototype,Eae=function(t){var i=t.map;return t===Dh||wae(Dh,t)&&i===Dh.map?_ae:i},Sae=Eae,Oae=Sae;(function(t){t.exports=Oae})(vae);var ji=V(Kv),qv={},Tae={get exports(){return qv},set exports(t){qv=t}},xae=q,Pae=Nt,Tx=Go,kae=se,Iae=kae(function(){Tx(1)});xae({target:"Object",stat:!0,forced:Iae},{keys:function(i){return Tx(Pae(i))}});var Cae=ie,Aae=Cae.Object.keys,Rae=Aae,Dae=Rae;(function(t){t.exports=Dae})(Tae);var Te=V(qv),Yv={},Mae={get exports(){return Yv},set exports(t){Yv=t}},Nae=q,Fae=ue,xx=Date,Bae=Fae(xx.prototype.getTime);Nae({target:"Date",stat:!0},{now:function(){return Bae(new xx)}});var Lae=ie,jae=Lae.Date.now,zae=jae,Hae=zae;(function(t){t.exports=Hae})(Mae);var Mu=V(Yv),Xv={},Wae={get exports(){return Xv},set exports(t){Xv=t}},Vae=se,fa=function(t,i){var e=[][t];return!!e&&Vae(function(){e.call(null,i||function(){return 1},1)})},Uae=fn.forEach,Gae=fa,Kae=Gae("forEach"),qae=Kae?[].forEach:function(i){return Uae(this,i,arguments.length>1?arguments[1]:void 0)},Yae=q,Tw=qae;Yae({target:"Array",proto:!0,forced:[].forEach!=Tw},{forEach:Tw});var Xae=rt,Qae=Xae("Array").forEach,Zae=Qae,Jae=Zae,eoe=Zn,toe=tt,roe=Ne,noe=Jae,Mh=Array.prototype,ioe={DOMTokenList:!0,NodeList:!0},aoe=function(t){var i=t.forEach;return t===Mh||roe(Mh,t)&&i===Mh.forEach||toe(ioe,eoe(t))?noe:i};(function(t){t.exports=aoe})(Wae);var ge=V(Xv),Qv={},ooe={get exports(){return Qv},set exports(t){Qv=t}},soe=q,uoe=ue,loe=ti,coe=uoe([].reverse),xw=[1,2];soe({target:"Array",proto:!0,forced:String(xw)===String(xw.reverse())},{reverse:function(){return loe(this)&&(this.length=this.length),coe(this)}});var hoe=rt,doe=hoe("Array").reverse,foe=Ne,voe=doe,Nh=Array.prototype,poe=function(t){var i=t.reverse;return t===Nh||foe(Nh,t)&&i===Nh.reverse?voe:i},goe=poe,yoe=goe;(function(t){t.exports=yoe})(ooe);var An=V(Qv),Zv={},moe={get exports(){return Zv},set exports(t){Zv=t}},$oe=Ge,boe=ti,woe=TypeError,_oe=Object.getOwnPropertyDescriptor,Eoe=$oe&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),Soe=Eoe?function(t,i){if(boe(t)&&!_oe(t,"length").writable)throw woe("Cannot set read only .length");return t.length=i}:function(t,i){return t.length=i},Pw=sa,Ooe=TypeError,Px=function(t,i){if(!delete t[i])throw Ooe("Cannot delete property "+Pw(i)+" of "+Pw(t))},Toe=q,xoe=Nt,Poe=Vo,koe=$l,Ioe=ir,Coe=Soe,Aoe=vx,Roe=ey,Doe=da,Fh=Px,Moe=Jo,Noe=Moe("splice"),Foe=Math.max,Boe=Math.min;Toe({target:"Array",proto:!0,forced:!Noe},{splice:function(i,e){var r=xoe(this),n=Ioe(r),a=Poe(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=Boe(Foe(koe(e),0),n-a)),Aoe(n+s-u),l=Roe(r,u),c=0;c<u;c++)h=a+c,h in r&&Doe(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 Coe(r,n-u+s),l}});var Loe=rt,joe=Loe("Array").splice,zoe=Ne,Hoe=joe,Bh=Array.prototype,Woe=function(t){var i=t.splice;return t===Bh||zoe(Bh,t)&&i===Bh.splice?Hoe:i},Voe=Woe,Uoe=Voe;(function(t){t.exports=Uoe})(moe);var Or=V(Zv),Jv={},Goe={get exports(){return Jv},set exports(t){Jv=t}},Koe=q,qoe=Vg.includes,Yoe=se,Xoe=Yoe(function(){return!Array(1).includes()});Koe({target:"Array",proto:!0,forced:Xoe},{includes:function(i){return qoe(this,i,arguments.length>1?arguments[1]:void 0)}});var Qoe=rt,Zoe=Qoe("Array").includes,Joe=et,ese=Fr,tse=Fe,rse=tse("match"),nse=function(t){var i;return Joe(t)&&((i=t[rse])!==void 0?!!i:ese(t)=="RegExp")},ise=nse,ase=TypeError,ose=function(t){if(ise(t))throw ase("The method doesn't accept regular expressions");return t},sse=Fe,use=sse("match"),lse=function(t){var i=/./;try{"/./"[t](i)}catch{try{return i[use]=!1,"/./"[t](i)}catch{}}return!1},cse=q,hse=ue,dse=ose,fse=Bo,kw=mr,vse=lse,pse=hse("".indexOf);cse({target:"String",proto:!0,forced:!vse("includes")},{includes:function(i){return!!~pse(kw(fse(this)),kw(dse(i)),arguments.length>1?arguments[1]:void 0)}});var gse=rt,yse=gse("String").includes,Iw=Ne,mse=Zoe,$se=yse,Lh=Array.prototype,jh=String.prototype,bse=function(t){var i=t.includes;return t===Lh||Iw(Lh,t)&&i===Lh.includes?mse:typeof t=="string"||t===jh||Iw(jh,t)&&i===jh.includes?$se:i},wse=bse,_se=wse;(function(t){t.exports=_se})(Goe);var vr=V(Jv),ep={},Ese={get exports(){return ep},set exports(t){ep=t}},Sse=q,Ose=se,Tse=Nt,kx=El,xse=mT,Pse=Ose(function(){kx(1)});Sse({target:"Object",stat:!0,forced:Pse,sham:!xse},{getPrototypeOf:function(i){return kx(Tse(i))}});var kse=ie,Ise=kse.Object.getPrototypeOf,Cse=Ise,Ix=Cse;(function(t){t.exports=Ix})(Ese);var Cw=V(ep),tp={},Ase={get exports(){return tp},set exports(t){tp=t}},Rse=q,Dse=fn.filter,Mse=Jo,Nse=Mse("filter");Rse({target:"Array",proto:!0,forced:!Nse},{filter:function(i){return Dse(this,i,arguments.length>1?arguments[1]:void 0)}});var Fse=rt,Bse=Fse("Array").filter,Lse=Ne,jse=Bse,zh=Array.prototype,zse=function(t){var i=t.filter;return t===zh||Lse(zh,t)&&i===zh.filter?jse:i},Hse=zse,Wse=Hse;(function(t){t.exports=Wse})(Ase);var St=V(tp),Aw={},Vse={get exports(){return Aw},set exports(t){Aw=t}},Use=Ge,Cx=ue,Gse=Go,Kse=nr,qse=Mo.f,Yse=Cx(qse),Xse=Cx([].push),Rw=function(t){return function(i){for(var e=Kse(i),r=Gse(e),n=r.length,a=0,o=[],s;n>a;)s=r[a++],(!Use||Yse(e,s))&&Xse(o,t?[s,e[s]]:e[s]);return o}},Qse={entries:Rw(!0),values:Rw(!1)},Zse=q,Jse=Qse.values;Zse({target:"Object",stat:!0},{values:function(i){return Jse(i)}});var eue=ie,tue=eue.Object.values,rue=tue,nue=rue;(function(t){t.exports=nue})(Vse);var rp={},iue={get exports(){return rp},set exports(t){rp=t}},Nl=`
65
+ \v\f\r                 \u2028\u2029\uFEFF`,aue=ue,oue=Bo,sue=mr,np=Nl,Dw=aue("".replace),uue=RegExp("^["+np+"]+"),lue=RegExp("(^|[^"+np+"])["+np+"]+$"),Hh=function(t){return function(i){var e=sue(oue(i));return t&1&&(e=Dw(e,uue,"")),t&2&&(e=Dw(e,lue,"$1")),e}},sy={start:Hh(1),end:Hh(2),trim:Hh(3)},Ax=Ve,cue=se,hue=ue,due=mr,fue=sy.trim,Mw=Nl,Da=Ax.parseInt,Nw=Ax.Symbol,Fw=Nw&&Nw.iterator,Rx=/^[+-]?0x/i,vue=hue(Rx.exec),pue=Da(Mw+"08")!==8||Da(Mw+"0x16")!==22||Fw&&!cue(function(){Da(Object(Fw))}),gue=pue?function(i,e){var r=fue(due(i));return Da(r,e>>>0||(vue(Rx,r)?16:10))}:Da,yue=q,Bw=gue;yue({global:!0,forced:parseInt!=Bw},{parseInt:Bw});var mue=ie,$ue=mue.parseInt,bue=$ue,wue=bue;(function(t){t.exports=wue})(iue);var Xt=V(rp),ip={},_ue={get exports(){return ip},set exports(t){ip=t}},Eue=q,Sue=zg,Oue=Vg.indexOf,Tue=fa,ap=Sue([].indexOf),Dx=!!ap&&1/ap([1],1,-0)<0,xue=Dx||!Tue("indexOf");Eue({target:"Array",proto:!0,forced:xue},{indexOf:function(i){var e=arguments.length>1?arguments[1]:void 0;return Dx?ap(this,i,e)||0:Oue(this,i,e)}});var Pue=rt,kue=Pue("Array").indexOf,Iue=Ne,Cue=kue,Wh=Array.prototype,Aue=function(t){var i=t.indexOf;return t===Wh||Iue(Wh,t)&&i===Wh.indexOf?Cue:i},Rue=Aue,Due=Rue;(function(t){t.exports=Due})(_ue);var ae=V(ip),Lw={},Mue={get exports(){return Lw},set exports(t){Lw=t}},Nue=pT.PROPER,Fue=se,jw=Nl,zw="​…᠎",Bue=function(t){return Fue(function(){return!!jw[t]()||zw[t]()!==zw||Nue&&jw[t].name!==t})},Lue=q,jue=sy.trim,zue=Bue;Lue({target:"String",proto:!0,forced:zue("trim")},{trim:function(){return jue(this)}});var Hue=rt,Wue=Hue("String").trim,Vue=Ne,Uue=Wue,Vh=String.prototype,Gue=function(t){var i=t.trim;return typeof t=="string"||t===Vh||Vue(Vh,t)&&i===Vh.trim?Uue:i},Kue=Gue,que=Kue;(function(t){t.exports=que})(Mue);var op={},Yue={get exports(){return op},set exports(t){op=t}},Xue=q,Que=Ge,Zue=la;Xue({target:"Object",stat:!0,sham:!Que},{create:Zue});var Jue=ie,ele=Jue.Object,tle=function(i,e){return ele.create(i,e)},rle=tle,Mx=rle;(function(t){t.exports=Mx})(Yue);var Rn=V(op),sp={},nle={get exports(){return sp},set exports(t){sp=t}},up=ie,ile=Do;up.JSON||(up.JSON={stringify:JSON.stringify});var ale=function(i,e,r){return ile(up.JSON.stringify,null,arguments)},ole=ale,sle=ole;(function(t){t.exports=sle})(nle);var es=V(sp),lp={},ule={get exports(){return lp},set exports(t){lp=t}},lle=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",cle=TypeError,hle=function(t,i){if(t<i)throw cle("Not enough arguments");return t},Nx=Ve,dle=Do,fle=Je,vle=lle,ple=Lo,gle=bl,yle=hle,mle=Nx.Function,$le=/MSIE .\./.test(ple)||vle&&function(){var t=Nx.Bun.version.split(".");return t.length<3||t[0]==0&&(t[1]<3||t[1]==3&&t[2]==0)}(),Fx=function(t,i){var e=i?2:1;return $le?function(r,n){var a=yle(arguments.length,1)>e,o=fle(r)?r:mle(r),s=a?gle(arguments,e):[],u=a?function(){dle(o,this,s)}:o;return i?t(u,n):t(u)}:t},ble=q,Bx=Ve,wle=Fx,Hw=wle(Bx.setInterval,!0);ble({global:!0,bind:!0,forced:Bx.setInterval!==Hw},{setInterval:Hw});var _le=q,Lx=Ve,Ele=Fx,Ww=Ele(Lx.setTimeout,!0);_le({global:!0,bind:!0,forced:Lx.setTimeout!==Ww},{setTimeout:Ww});var Sle=ie,Ole=Sle.setTimeout;(function(t){t.exports=Ole})(ule);var pr=V(lp),cp={},Tle={get exports(){return cp},set exports(t){cp=t}},xle=Nt,Vw=Vo,Ple=ir,kle=function(i){for(var e=xle(this),r=Ple(e),n=arguments.length,a=Vw(n>1?arguments[1]:void 0,r),o=n>2?arguments[2]:void 0,s=o===void 0?r:Vw(o,r);s>a;)e[a++]=i;return e},Ile=q,Cle=kle;Ile({target:"Array",proto:!0},{fill:Cle});var Ale=rt,Rle=Ale("Array").fill,Dle=Ne,Mle=Rle,Uh=Array.prototype,Nle=function(t){var i=t.fill;return t===Uh||Dle(Uh,t)&&i===Uh.fill?Mle:i},Fle=Nle,Ble=Fle;(function(t){t.exports=Ble})(Tle);var ts=V(cp);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
66
66
  * http://naver.github.io/egjs
67
67
  *
68
68
  * Forked By Naver egjs
69
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"],Fle=typeof document>"u"?{style:{}}:document.createElement("div"),Ble="function",Ti=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(Fle.style,"touchAction"),jx=Lx!==void 0;function Lle(){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=Lle(),jle=/mobile|tablet|ip(ad|hone|od)|android/i,Wx="ontouchstart"in Tr,zle=Fl(Tr,"PointerEvent")!==void 0,Hle=Wx&&jle.test(navigator.userAgent),rs="touch",Wle="pen",ly="mouse",Vle="kinect",Ule=25,vt=1,ri=2,ze=4,Tt=8,Nu=1,ns=2,is=4,as=8,zi=16,gr=ns|is,Mn=as|zi,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===Ble?t.apply(i&&i[0]||void 0,i):t}function Tn(t,i){return t.indexOf(i)>-1}function Gle(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()))}),Gle(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:Ti(t[0].clientX),y:Ti(t[0].clientY)};for(var e=0,r=0,n=0;n<i;)e+=t[n].clientX,r+=t[n].clientY,n++;return{x:Ti(e/i),y:Ti(r/i)}}function Uw(t){for(var i=[],e=0;e<t.pointers.length;)i[e]={clientX:Ti(t.pointers[e].clientX),clientY:Ti(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:zi}function Kle(t,i){var e=i.center,r=t.offsetDelta||{},n=t.prevDelta||{},a=t.prevInput||{};(i.eventType===vt||a.eventType===ze)&&(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 qle(t,i){return Bu(i[0],i[1],Fu)/Bu(t[0],t[1],Fu)}function Yle(t,i){return fp(i[1],i[0],Fu)+fp(t[1],t[0],Fu)}function Xle(t,i){var e=t.lastInterval||i,r=i.timeStamp-e.timeStamp,n,a,o,s;if(i.eventType!==Tt&&(r>Ule||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 Qle(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),Kle(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?qle(o.pointers,r):1,i.rotation=o?Yle(o.pointers,r):0,i.maxPointers=e.prevInput?i.pointers.length>e.prevInput.maxPointers?i.pointers.length:e.prevInput.maxPointers:i.pointers.length,Xle(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 Zle(t,i,e){var r=e.pointers.length,n=e.changedPointers.length,a=i&vt&&r-n===0,o=i&(ze|Tt)&&r-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(t.session={}),e.eventType=i,Qle(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 va=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 Jle={pointerdown:vt,pointermove:ri,pointerup:ze,pointercancel:Tt,pointerout:Tt},ece={2:rs,3:Wle,4:ly,5:Vle},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=Jle[s],l=ece[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&(ze|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}(va);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 tce={touchstart:vt,touchmove:ri,touchend:ze,touchcancel:Tt},rce="touchstart touchmove touchend touchcancel",dy=function(t){Gt(i,t);function i(){var r;return i.prototype.evTarget=rce,r=t.apply(this,arguments)||this,r.targetIds={},r}var e=i.prototype;return e.handler=function(n){var a=tce[n.type],o=nce.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:rs,srcEvent:n})},i}(va);function nce(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&(ze|Tt)&&delete r[o[n].identifier],n++;if(s.length)return[hy(a.concat(s),"identifier",!0),s]}var ice={mousedown:vt,mousemove:ri,mouseup:ze},ace="mousedown",oce="mousemove mouseup",fy=function(t){Gt(i,t);function i(){var r,n=i.prototype;return n.evEl=ace,n.evWin=oce,r=t.apply(this,arguments)||this,r.pressed=!1,r}var e=i.prototype;return e.handler=function(n){var a=ice[n.type];a&vt&&n.button===0&&(this.pressed=!0),a&ri&&n.which!==1&&(a=ze),this.pressed&&(a&ze&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[n],changedPointers:[n],pointerType:ly,srcEvent:n}))},i}(va),sce=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,sce)}}function uce(t,i){t&vt?(this.primaryTouch=i.changedPointers[0].identifier,qw.call(this,i)):t&(ze|Tt)&&qw.call(this,i)}function lce(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)uce.call(Ns(Ns(o)),u,l);else if(h&&lce.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}(va);return t}();function cce(t){var i,e=t.options.inputClass;return e?i=e:zle?i=Zx:Hle?i=dy:Wx?i=Jx:i=fy,new i(t,Zle)}function xi(t,i,e){return Array.isArray(t)?(xr(t,e[i],e),!0):!1}var ru=1,Ht=2,Hi=4,en=8,Pr=en,io=16,hr=32,hce=1;function dce(){return hce++}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&Hi?"move":t&Ht?"start":""}var os=function(){function t(e){e===void 0&&(e={}),this.options=tr({enable:!0},e),this.id=dce(),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(xi(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 xi(r,"dropRecognizeWith",this)?this:(r=Bs(r,this),delete this.simultaneous[r.id],this)},i.requireFailure=function(r){if(xi(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(xi(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|Hi|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!==ze)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),Wi=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|Hi),u=this.attrTest(n);return s&&(o&Tt||!u)?a|io:s||u?o&ze?a|en:a&Ht?a|Hi:Ht:hr},i}(os);function eP(t){return t===zi?"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:zi,o=c!==this.pY,s=Math.abs(n.deltaY))),n.direction=u,o&&s>a.threshold&&u&a.direction},e.attrTest=function(n){return Wi.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}(Wi),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&ze},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}(Wi),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}(Wi),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}(Wi),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&(ze|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&ze)return Pr;return hr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===Pr&&(n&&n.eventType&ze?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]],fce=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 vce(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=cce(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:fce},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|Hi|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(xi(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(xi(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&&vce(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}(),pce={touchstart:vt,touchmove:ri,touchend:ze,touchcancel:Tt},gce="touchstart",yce="touchstart touchmove touchend touchcancel",mce=function(t){Gt(i,t);function i(){var r,n=i.prototype;return n.evTarget=gce,n.evWin=yce,r=t.apply(this,arguments)||this,r.started=!1,r}var e=i.prototype;return e.handler=function(n){var a=pce[n.type];if(a===vt&&(this.started=!0),!!this.started){var o=$ce.call(this,n,a);a&(ze|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}(va);function $ce(t,i){var e=no(t.touches),r=no(t.changedTouches);return i&(ze|Tt)&&(e=hy(e.concat(r),"identifier",!0)),[e,r]}function oP(t,i,e){var r="DEPRECATED METHOD: "+i+`
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,Uw=["","webkit","Moz","MS","ms","o"],Lle=typeof document>"u"?{style:{}}:document.createElement("div"),jle="function",Ti=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<Uw.length;){if(e=Uw[a],r=e?e+n:i,r in t)return r;a++}}var Tr;typeof window>"u"?Tr={}:Tr=window;var jx=Fl(Lle.style,"touchAction"),zx=jx!==void 0;function zle(){if(!zx)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 Hx="compute",Wx="auto",dp="manipulation",Dn="none",eo="pan-x",to="pan-y",Fs=zle(),Hle=/mobile|tablet|ip(ad|hone|od)|android/i,Vx="ontouchstart"in Tr,Wle=Fl(Tr,"PointerEvent")!==void 0,Vle=Vx&&Hle.test(navigator.userAgent),rs="touch",Ule="pen",ly="mouse",Gle="kinect",Kle=25,vt=1,ri=2,ze=4,Tt=8,Nu=1,ns=2,is=4,as=8,zi=16,gr=ns|is,Mn=as|zi,Ux=gr|Mn,Gx=["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===jle?t.apply(i&&i[0]||void 0,i):t}function Tn(t,i){return t.indexOf(i)>-1}function qle(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:Wx}var Kx=function(){function t(e,r){this.manager=e,this.set(r)}var i=t.prototype;return i.set=function(r){r===Hx&&(r=this.compute()),zx&&this.manager.element.style&&Fs[r]&&(this.manager.element.style[jx]=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()))}),qle(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 qx(t){var i=t.length;if(i===1)return{x:Ti(t[0].clientX),y:Ti(t[0].clientY)};for(var e=0,r=0,n=0;n<i;)e+=t[n].clientX,r+=t[n].clientY,n++;return{x:Ti(e/i),y:Ti(r/i)}}function Gw(t){for(var i=[],e=0;e<t.pointers.length;)i[e]={clientX:Ti(t.pointers[e].clientX),clientY:Ti(t.pointers[e].clientY)},e++;return{timeStamp:uy(),pointers:i,center:qx(i),deltaX:t.deltaX,deltaY:t.deltaY}}function Bu(t,i,e){e||(e=Gx);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=Gx);var r=i[e[0]]-t[e[0]],n=i[e[1]]-t[e[1]];return Math.atan2(n,r)*180/Math.PI}function Yx(t,i){return t===i?Nu:Hn(t)>=Hn(i)?t<0?ns:is:i<0?as:zi}function Yle(t,i){var e=i.center,r=t.offsetDelta||{},n=t.prevDelta||{},a=t.prevInput||{};(i.eventType===vt||a.eventType===ze)&&(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 Xx(t,i,e){return{x:i/t||0,y:e/t||0}}function Xle(t,i){return Bu(i[0],i[1],Fu)/Bu(t[0],t[1],Fu)}function Qle(t,i){return fp(i[1],i[0],Fu)+fp(t[1],t[0],Fu)}function Zle(t,i){var e=t.lastInterval||i,r=i.timeStamp-e.timeStamp,n,a,o,s;if(i.eventType!==Tt&&(r>Kle||e.velocity===void 0)){var u=i.deltaX-e.deltaX,l=i.deltaY-e.deltaY,c=Xx(r,u,l);a=c.x,o=c.y,n=Hn(c.x)>Hn(c.y)?c.x:c.y,s=Yx(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 Jle(t,i){var e=t.session,r=i.pointers,n=r.length;e.firstInput||(e.firstInput=Gw(i)),n>1&&!e.firstMultiple?e.firstMultiple=Gw(i):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=i.center=qx(r);i.timeStamp=uy(),i.deltaTime=i.timeStamp-a.timeStamp,i.angle=fp(s,u),i.distance=Bu(s,u),Yle(e,i),i.offsetDirection=Yx(i.deltaX,i.deltaY);var l=Xx(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?Xle(o.pointers,r):1,i.rotation=o?Qle(o.pointers,r):0,i.maxPointers=e.prevInput?i.pointers.length>e.prevInput.maxPointers?i.pointers.length:e.prevInput.maxPointers:i.pointers.length,Zle(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 ece(t,i,e){var r=e.pointers.length,n=e.changedPointers.length,a=i&vt&&r-n===0,o=i&(ze|Tt)&&r-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(t.session={}),e.eventType=i,Jle(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 Kw(t){var i=t.ownerDocument||t;return i.defaultView||i.parentWindow||window}var va=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(Kw(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(Kw(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 tce={pointerdown:vt,pointermove:ri,pointerup:ze,pointercancel:Tt,pointerout:Tt},rce={2:rs,3:Ule,4:ly,5:Gle},Qx="pointerdown",Zx="pointermove pointerup pointercancel";Tr.MSPointerEvent&&!Tr.PointerEvent&&(Qx="MSPointerDown",Zx="MSPointerMove MSPointerUp MSPointerCancel");var Jx=function(t){Gt(i,t);function i(){var r,n=i.prototype;return n.evEl=Qx,n.evWin=Zx,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=tce[s],l=rce[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&(ze|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}(va);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 nce={touchstart:vt,touchmove:ri,touchend:ze,touchcancel:Tt},ice="touchstart touchmove touchend touchcancel",dy=function(t){Gt(i,t);function i(){var r;return i.prototype.evTarget=ice,r=t.apply(this,arguments)||this,r.targetIds={},r}var e=i.prototype;return e.handler=function(n){var a=nce[n.type],o=ace.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:rs,srcEvent:n})},i}(va);function ace(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&(ze|Tt)&&delete r[o[n].identifier],n++;if(s.length)return[hy(a.concat(s),"identifier",!0),s]}var oce={mousedown:vt,mousemove:ri,mouseup:ze},sce="mousedown",uce="mousemove mouseup",fy=function(t){Gt(i,t);function i(){var r,n=i.prototype;return n.evEl=sce,n.evWin=uce,r=t.apply(this,arguments)||this,r.pressed=!1,r}var e=i.prototype;return e.handler=function(n){var a=oce[n.type];a&vt&&n.button===0&&(this.pressed=!0),a&ri&&n.which!==1&&(a=ze),this.pressed&&(a&ze&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[n],changedPointers:[n],pointerType:ly,srcEvent:n}))},i}(va),lce=2500,qw=25;function Yw(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,lce)}}function cce(t,i){t&vt?(this.primaryTouch=i.changedPointers[0].identifier,Yw.call(this,i)):t&(ze|Tt)&&Yw.call(this,i)}function hce(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<=qw&&o<=qw)return!0}return!1}var eP=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)cce.call(Ns(Ns(o)),u,l);else if(h&&hce.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}(va);return t}();function dce(t){var i,e=t.options.inputClass;return e?i=e:Wle?i=Jx:Vle?i=dy:Vx?i=eP:i=fy,new i(t,ece)}function xi(t,i,e){return Array.isArray(t)?(xr(t,e[i],e),!0):!1}var ru=1,Ht=2,Hi=4,en=8,Pr=en,io=16,hr=32,fce=1;function vce(){return fce++}function Bs(t,i){var e=i.manager;return e?e.get(t):t}function Xw(t){return t&io?"cancel":t&en?"end":t&Hi?"move":t&Ht?"start":""}var os=function(){function t(e){e===void 0&&(e={}),this.options=tr({enable:!0},e),this.id=vce(),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(xi(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 xi(r,"dropRecognizeWith",this)?this:(r=Bs(r,this),delete this.simultaneous[r.id],this)},i.requireFailure=function(r){if(xi(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(xi(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+Xw(a)),o(n.options.event),r.additionalEvent&&o(r.additionalEvent),a>=en&&o(n.options.event+Xw(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|Hi|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!==ze)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),Wi=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|Hi),u=this.attrTest(n);return s&&(o&Tt||!u)?a|io:s||u?o&ze?a|en:a&Ht?a|Hi:Ht:hr},i}(os);function tP(t){return t===zi?"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:Ux},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:zi,o=c!==this.pY,s=Math.abs(n.deltaY))),n.direction=u,o&&s>a.threshold&&u&a.direction},e.attrTest=function(n){return Wi.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=tP(n.direction);a&&(n.additionalEvent=this.options.event+a),t.prototype.emit.call(this,n)},i}(Wi),rP=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&ze},e.emit=function(n){var a=tP(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},i}(Wi),nP=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}(Wi),iP=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}(Wi),aP=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[Wx]},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&(ze|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&ze)return Pr;return hr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===Pr&&(n&&n.eventType&ze?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=uy(),this.manager.emit(this.options.event,this._input)))},i}(os),oP={domEvents:!1,touchAction:Hx,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Qw=[[iP,{enable:!1}],[nP,{enable:!1},["rotate"]],[rP,{direction:gr}],[vy,{direction:gr},["swipe"]],[vp],[vp,{event:"doubletap",taps:2},["tap"]],[aP]],pce=1,Zw=2;function Jw(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 gce(t,i){var e=document.createEvent("Event");e.initEvent(t,!0,!0),e.gesture=i,i.target.dispatchEvent(e)}var e0=function(){function t(e,r){var n=this;this.options=zn({},oP,r||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=dce(this),this.touchAction=new Kx(this,this.options.touchAction),Jw(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?Zw:pce},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!==Zw&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(r):a.reset(),!s&&a.state&(Ht|Hi|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(xi(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(xi(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&&gce(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&&Jw(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),yce={touchstart:vt,touchmove:ri,touchend:ze,touchcancel:Tt},mce="touchstart",$ce="touchstart touchmove touchend touchcancel",bce=function(t){Gt(i,t);function i(){var r,n=i.prototype;return n.evTarget=mce,n.evWin=$ce,r=t.apply(this,arguments)||this,r.started=!1,r}var e=i.prototype;return e.handler=function(n){var a=yce[n.type];if(a===vt&&(this.started=!0),!!this.started){var o=wce.call(this,n,a);a&(ze|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}(va);function wce(t,i){var e=no(t.touches),r=no(t.changedTouches);return i&(ze|Tt)&&(e=hy(e.concat(r),"identifier",!0)),[e,r]}function sP(t,i,e){var r="DEPRECATED METHOD: "+i+`
71
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`."),bce=oP(function(t,i){return sP(t,i,!0)},"merge","Use `assign`.");function wce(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=zi,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=zi,t.INPUT_START=vt,t.INPUT_MOVE=ri,t.INPUT_END=ze,t.INPUT_CANCEL=Tt,t.STATE_POSSIBLE=ru,t.STATE_BEGAN=Ht,t.STATE_CHANGED=Hi,t.STATE_ENDED=en,t.STATE_RECOGNIZED=Pr,t.STATE_CANCELLED=io,t.STATE_FAILED=hr,t.Manager=Jw,t.Input=va,t.TouchAction=Gx,t.TouchInput=dy,t.MouseInput=fy,t.PointerEventInput=Zx,t.TouchMouseInput=Jx,t.SingleTouchInput=mce,t.Recognizer=os,t.AttrRecognizer=Wi,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=bce,t.extend=sP,t.bindFn=e0,t.assign=zn,t.inherit=wce,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 _ce=uP;function lP(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=Ece(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 Ece(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 Sce(i.length?i:[Mu()])}function Sce(t){var i=Oce(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 Oce(){for(var t=Tce(),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 Tce(){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 xce(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}}}var py=typeof window<"u"?window.Hammer||_ce:function(){return xce()};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",A(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){Pce(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 Pce(t,i){for(;t;){if(t===i)return!0;t=t.parentNode}return!1}var kce=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Ice=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Cce=/^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,Ace=/^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 pa(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 Rce(t){return st(t).call(t)}function Dce(t){return t.getBoundingClientRect().left}function Mce(t){return t.getBoundingClientRect().top}function te(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 Nce(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 Fce(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=Ice.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=kce.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=ji(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=Bce(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 Bce(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 Cce.test(t)}function Lce(t){return Ace.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 m in p)Object.prototype.hasOwnProperty.call(p,m)&&($[m]=p[m])},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 jce={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 zce={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"},Hce=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 zce[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(Lce(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=je({},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=je({},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=A(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=A(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=A(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=A(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 Wce=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},je(this.options,this.defaultOptions),this.configureOptions=r,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Hce(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}(),Vce=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}(),ba=!1,n0,mp="background: #FFeeee; color: #dd0000",Uce=function(){function t(){N(this,t)}return F(t,null,[{key:"validate",value:function(e,r,n){ba=!1,n0=r;var a=r;return n!==void 0&&(a=r[n]),t.parse(e,a,[]),ba}},{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]+'". '),ba=!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]+'"'),ba=!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+`"?
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 uP=sP(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`."),_ce=sP(function(t,i){return uP(t,i,!0)},"merge","Use `assign`.");function Ece(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 t0(t,i){return function(){return t.apply(i,arguments)}}var lP=function(){var t=function(e,r){return r===void 0&&(r={}),new e0(e,tr({recognizers:Qw.concat()},r))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=Ux,t.DIRECTION_DOWN=zi,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=zi,t.INPUT_START=vt,t.INPUT_MOVE=ri,t.INPUT_END=ze,t.INPUT_CANCEL=Tt,t.STATE_POSSIBLE=ru,t.STATE_BEGAN=Ht,t.STATE_CHANGED=Hi,t.STATE_ENDED=en,t.STATE_RECOGNIZED=Pr,t.STATE_CANCELLED=io,t.STATE_FAILED=hr,t.Manager=e0,t.Input=va,t.TouchAction=Kx,t.TouchInput=dy,t.MouseInput=fy,t.PointerEventInput=Jx,t.TouchMouseInput=eP,t.SingleTouchInput=bce,t.Recognizer=os,t.AttrRecognizer=Wi,t.Tap=vp,t.Pan=vy,t.Swipe=rP,t.Pinch=nP,t.Rotate=iP,t.Press=aP,t.on=Ma,t.off=Na,t.each=xr,t.merge=_ce,t.extend=uP,t.bindFn=t0,t.assign=zn,t.inherit=Ece,t.bindFn=t0,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({},oP,{preset:Qw}),t}();lP.defaults;var Sce=lP;function cP(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=Oce(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 Oce(t,i){var e;if(t){if(typeof t=="string")return r0(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 r0(t,i)}}function r0(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 Tce(i.length?i:[Mu()])}function Tce(t){var i=xce(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 xce(){for(var t=Pce(),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 Pce(){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 kce(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}}}var py=typeof window<"u"?window.Hammer||Sce:function(){return kce()};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",A(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){Ice(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()}}cT(dr.prototype);dr.current=null;dr.prototype.destroy=function(){var t,i;this.deactivate();var e=cP(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 Ice(t,i){for(;t;){if(t===i)return!0;t=t.parentNode}return!1}var Cce=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Ace=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Rce=/^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,Dce=/^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 n0(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 hP(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];n0(n)&&n0(a)&&hP(n,a,e)}}function pa(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&&Cw(i[n])===Object.prototype)t[n]===void 0?t[n]=$e({},i[n],e):he(t[n])==="object"&&t[n]!==null&&Cw(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 Mce(t){return st(t).call(t)}function Nce(t){return t.getBoundingClientRect().left}function Fce(t){return t.getBoundingClientRect().top}function te(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 Bce(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 Lce(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=Ace.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=Cce.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 dP(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(vP(e)){var r,n=ji(r=e.substr(4).substr(0,e.length-5).split(",")).call(r,function(d){return Xt(d)});e=dP(n[0],n[1],n[2])}if(fP(e)===!0){var a=jce(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 dP(r.r,r.g,r.b)}function jce(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 fP(t){var i=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t);return i}function vP(t){return Rce.test(t)}function zce(t){return Dce.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 m in p)Object.prototype.hasOwnProperty.call(p,m)&&($[m]=p[m])},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 Hce={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=cP(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 Wce={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"},Vce=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 Wce[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(vP(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(zce(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(fP(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=je({},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=je({},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=A(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=A(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=A(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=A(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 Uce=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},je(this.options,this.defaultOptions),this.configureOptions=r,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new Vce(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}(),Gce=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}(),ba=!1,i0,mp="background: #FFeeee; color: #dd0000",Kce=function(){function t(){N(this,t)}return F(t,null,[{key:"validate",value:function(e,r,n){ba=!1,i0=r;var a=r;return n!==void 0&&(a=r[n]),t.parse(e,a,[]),ba}},{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]+'". '),ba=!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]+'"'),ba=!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,i0,[],!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
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),ba=!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=Rce(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:
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),ba=!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=Mce(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
76
  `,a=`
77
77
 
78
78
  `+n+`options = {
@@ -81,19 +81,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
81
81
  `;for(var l=0;l<e.length+1;l++){for(var c=0;c<e.length-l;c++)a+=" ";a+=`}
82
82
  `}return a+`
83
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}(),Gce=dr,Kce=Wce,Ii=py,qce=Vce,vP=mp,Yce=Uce;function Xce(t){return Yr=t,ehe()}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="",Vi=0,J="",K="",bt=ct.NULL;function Qce(){Vi=0,J=Yr.charAt(0)}function Ke(){Vi++,J=Yr.charAt(Vi)}function vi(){return Yr.charAt(Vi+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 Zce(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 Jce(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===`
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}(),qce=dr,Yce=Uce,Ii=py,Xce=Gce,pP=mp,Qce=Kce;function Zce(t){return Yr=t,rhe()}var gP={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(gP);yy.color="color.color";yy.style="dashes";var ct={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},a0={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},Yr="",Vi=0,J="",K="",bt=ct.NULL;function Jce(){Vi=0,J=Yr.charAt(0)}function Ke(){Vi++,J=Yr.charAt(Vi)}function vi(){return Yr.charAt(Vi+1)}function o0(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 ehe(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 yP(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 the(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 mP(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
85
  `||J==="\r";)Ke();do{var t=!1;if(J==="#"){for(var i=Vi-1;Yr.charAt(i)===" "||Yr.charAt(i)===" ";)i--;if(Yr.charAt(i)===`
86
86
  `||Yr.charAt(i)===""){for(;J!=""&&J!=`
87
87
  `;)Ke();t=!0}}if(J==="/"&&vi()==="/"){for(;J!=""&&J!=`
88
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 ehe(){var t={};if(Qce(),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!="}";)the(t),K===";"&&be()}function the(t){var i=$P(t);if(i){bP(t,i);return}var e=rhe(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 nhe(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 rhe(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 nhe(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);Jce(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++)Zce(n[t].attr,n[t].name,n[t].value);return i}function ht(t){return new SyntaxError(t+', got "'+wP(K,30)+'" (char '+Vi+")")}function wP(t,i){return t.length<=i?t:t.substr(0,27)+"..."}function ihe(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 ahe(t){var i=Xce(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(ihe(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 ohe(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=ji(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=ji(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 she={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"},uhe={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"},lhe={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"},che={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"},hhe={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"},dhe={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ó"},fhe={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},vhe={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},phe={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},ghe={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"},yhe={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"},mhe=Object.freeze({__proto__:null,cn:vhe,cs:yhe,de:uhe,en:she,es:lhe,fr:ghe,it:che,nl:hhe,pt:dhe,ru:fhe,uk:phe});function $he(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 bhe=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}(),whe=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 bhe;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={},_he={get exports(){return $p},set exports(t){$p=t}},Ui={},Ehe={get exports(){return Ui},set exports(t){Ui=t}},She=se,Ohe=She(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),The=se,xhe=et,Phe=Fr,s0=Ohe,iu=Object.isExtensible,khe=The(function(){iu(1)}),Ihe=khe||s0?function(i){return!xhe(i)||s0&&Phe(i)=="ArrayBuffer"?!1:iu?iu(i):!0}:iu,Che=se,_P=!Che(function(){return Object.isExtensible(Object.preventExtensions({}))}),Ahe=q,Rhe=ue,Dhe=Uo,Mhe=et,my=tt,Nhe=Ut.f,u0=Yo,Fhe=Tl,$y=Ihe,Bhe=yl,Lhe=_P,EP=!1,Ar=Bhe("meta"),jhe=0,by=function(t){Nhe(t,Ar,{value:{objectID:"O"+jhe++,weakData:{}}})},zhe=function(t,i){if(!Mhe(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},Hhe=function(t,i){if(!my(t,Ar)){if(!$y(t))return!0;if(!i)return!1;by(t)}return t[Ar].weakData},Whe=function(t){return Lhe&&EP&&$y(t)&&!my(t,Ar)&&by(t),t},Vhe=function(){Uhe.enable=function(){},EP=!0;var t=u0.f,i=Rhe([].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},Ahe({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Fhe.f}))},Uhe=Ehe.exports={enable:Vhe,fastKey:zhe,getWeakData:Hhe,onFreeze:Whe};Dhe[Ar]=!0;var Ghe=Wo,Khe=Mt,qhe=Ft,Yhe=sa,Xhe=ET,Qhe=ir,l0=Ne,Zhe=PT,Jhe=Ol,c0=_T,ede=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=Ghe(i,r),l,c,h,d,f,v,g,b=function($){return l&&c0(l,"normal",$),new au(!0,$)},p=function($){return n?(qhe($),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=Jhe(t),!c)throw ede(Yhe(t)+" is not iterable");if(Xhe(c)){for(h=0,d=Qhe(t);d>h;h++)if(f=p(t[h]),f&&l0(h0,f))return f;return new au(!1)}l=Zhe(t,c)}for(v=a?t.next:l.next;!(g=Khe(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)},tde=Ne,rde=TypeError,_y=function(t,i){if(tde(i,t))return t;throw rde("Incorrect invocation")},nde=q,ide=Ve,ade=Ui,ode=se,sde=ua,ude=wy,lde=_y,cde=Je,hde=et,dde=ca,fde=Ut.f,vde=fn.forEach,pde=Ge,SP=Jn,gde=SP.set,yde=SP.getterFor,Ey=function(t,i,e){var r=t.indexOf("Map")!==-1,n=t.indexOf("Weak")!==-1,a=r?"set":"add",o=ide[t],s=o&&o.prototype,u={},l;if(!pde||!cde(o)||!(n||s.forEach&&!ode(function(){new o().entries().next()})))l=e.getConstructor(i,t,r,a),ade.enable();else{l=i(function(d,f){gde(lde(d,c),{type:t,collection:new o}),f!=null&&ude(f,d[a],{that:d,AS_ENTRIES:r})});var c=l.prototype,h=yde(t);vde(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(d){var f=d=="add"||d=="set";d in s&&!(n&&d=="clear")&&sde(c,d,function(v,g){var b=h(this).collection;if(!f&&n&&!hde(v))return d=="get"?void 0:!1;var p=b[d](v===0?0:v,g);return f?this:p})}),n||fde(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}return dde(l,t,!1,!0),u[t]=l,nde({global:!0,forced:!0},u),n||e.setStrong(l,t,r),l},mde=qo,Sy=function(t,i,e){for(var r in i)e&&e.unsafe&&t[r]?t[r]=i[r]:mde(t,r,i[r],e);return t},$de=Vt,bde=Jg,wde=Fe,_de=Ge,d0=wde("species"),Ede=function(t){var i=$de(t);_de&&i&&!i[d0]&&bde(i,d0,{configurable:!0,get:function(){return this}})},Sde=la,Ode=Jg,f0=Sy,Tde=Wo,xde=_y,Pde=Fo,kde=wy,Ide=Xg,Ls=Qg,Cde=Ede,wa=Ge,v0=Ui.fastKey,OP=Jn,p0=OP.set,Kh=OP.getterFor,TP={getConstructor:function(t,i,e,r){var n=t(function(l,c){xde(l,a),p0(l,{type:i,index:Sde(null),first:void 0,last:void 0,size:0}),wa||(l.size=0),Pde(c)||kde(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),wa?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,wa?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),wa?h.size--:c.size--}return!!d},forEach:function(c){for(var h=o(this),d=Tde(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)}}),wa&&Ode(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);Ide(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),Cde(i)}},Ade=Ey,Rde=TP;Ade("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Rde);var Dde=ie,Mde=Dde.Map,Nde=Mde,Fde=Nde;(function(t){t.exports=Fde})(_he);var xP=V($p),Bde=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},je(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={},Lde={get exports(){return bp},set exports(t){bp=t}},jde=q;jde({target:"Number",stat:!0},{isNaN:function(i){return i!=i}});var zde=ie,Hde=zde.Number.isNaN,Wde=Hde,Vde=Wde;(function(t){t.exports=Vde})(Lde);var wp=V(bp),_p={},Ude={get exports(){return _p},set exports(t){_p=t}},Gde=Ve,Kde=Gde.isFinite,qde=Number.isFinite||function(i){return typeof i=="number"&&Kde(i)},Yde=q,Xde=qde;Yde({target:"Number",stat:!0},{isFinite:Xde});var Qde=ie,Zde=Qde.Number.isFinite,Jde=Zde,efe=Jde;(function(t){t.exports=efe})(Ude);var xn=V(_p),Ep={},tfe={get exports(){return Ep},set exports(t){Ep=t}},rfe=q,nfe=fn.some,ife=fa,afe=ife("some");rfe({target:"Array",proto:!0,forced:!afe},{some:function(i){return nfe(this,i,arguments.length>1?arguments[1]:void 0)}});var ofe=rt,sfe=ofe("Array").some,ufe=Ne,lfe=sfe,qh=Array.prototype,cfe=function(t){var i=t.some;return t===qh||ufe(qh,t)&&i===qh.some?lfe:i},hfe=cfe,dfe=hfe;(function(t){t.exports=dfe})(tfe);var ffe=V(Ep),Sp={},vfe={get exports(){return Sp},set exports(t){Sp=t}},PP=Ve,pfe=se,gfe=ue,yfe=mr,mfe=sy.trim,$fe=Nl,bfe=gfe("".charAt),zu=PP.parseFloat,g0=PP.Symbol,y0=g0&&g0.iterator,wfe=1/zu($fe+"-0")!==-1/0||y0&&!pfe(function(){zu(Object(y0))}),_fe=wfe?function(i){var e=mfe(yfe(i)),r=zu(e);return r===0&&bfe(e,0)=="-"?-0:r}:zu,Efe=q,m0=_fe;Efe({global:!0,forced:parseFloat!=m0},{parseFloat:m0});var Sfe=ie,Ofe=Sfe.parseFloat,Tfe=Ofe,xfe=Tfe;(function(t){t.exports=xfe})(vfe);var kP=V(Sp),Op={},Pfe={get exports(){return Op},set exports(t){Op=t}},kfe=q,Ife=se,Cfe=Tl.f,Afe=Ife(function(){return!Object.getOwnPropertyNames(1)});kfe({target:"Object",stat:!0,forced:Afe},{getOwnPropertyNames:Cfe});var Rfe=ie,Dfe=Rfe.Object,Mfe=function(i){return Dfe.getOwnPropertyNames(i)},Nfe=Mfe,Ffe=Nfe;(function(t){t.exports=Ffe})(Pfe);var Bfe=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={},Lfe={get exports(){return xp},set exports(t){xp=t}},jfe=rt,zfe=jfe("Array").values,Hfe=zfe,Wfe=Hfe,Vfe=Zn,Ufe=tt,Gfe=Ne,Kfe=Wfe,Yh=Array.prototype,qfe={DOMTokenList:!0,NodeList:!0},Yfe=function(t){var i=t.values;return t===Yh||Gfe(Yh,t)&&i===Yh.values||Ufe(qfe,Vfe(t))?Kfe:i};(function(t){t.exports=Yfe})(Lfe);var CP=V(xp),Xfe=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=je({},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={};je(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}(),Qfe={"<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=Qfe[e];a!==void 0?n=a:n=new RegExp(e),r=e.length}return[n,r]}}]),t}(),Zfe=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 Xfe(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,`
89
+ `||J==="\r";)Ke()}while(t);if(J===""){bt=ct.DELIMITER;return}var e=J+vi();if(a0[e]){bt=ct.DELIMITER,K=e,Ke(),Ke();return}if(a0[J]){bt=ct.DELIMITER,K=J,Ke();return}if(o0(J)||J==="-"){for(K+=J,Ke();o0(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 "'+_P(K,30)+'"')}function rhe(){var t={};if(Jce(),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(),$P(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 $P(t){for(;K!==""&&K!="}";)nhe(t),K===";"&&be()}function nhe(t){var i=bP(t);if(i){wP(t,i);return}var e=ihe(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 ahe(t,r)}}function bP(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,$P(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 ihe(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 ahe(t,i){var e={id:i},r=Fa();r&&(e.attr=r),yP(t,e),wP(t,i)}function wP(t,i){for(;K==="->"||K==="--";){var e,r=K;be();var n=bP(t);if(n)e=n;else{if(bt!=ct.IDENTIFIER)throw ht("Identifier or subgraph expected");e=K,yP(t,{id:e}),be()}var a=Fa(),o=mP(t,i,e,r,a);the(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++)ehe(n[t].attr,n[t].name,n[t].value);return i}function ht(t){return new SyntaxError(t+', got "'+_P(K,30)+'" (char '+Vi+")")}function _P(t,i){return t.length<=i?t:t.substr(0,27)+"..."}function ohe(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 s0(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 she(t){var i=Zce(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,s0(o.attr,gP)),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,s0(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(ohe(s,u,function(h,d){var f=mP(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 uhe(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=ji(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=ji(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 lhe={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"},che={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"},hhe={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"},dhe={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"},fhe={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"},vhe={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ó"},phe={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},ghe={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},yhe={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},mhe={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"},$he={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"},bhe=Object.freeze({__proto__:null,cn:ghe,cs:$he,de:che,en:lhe,es:hhe,fr:mhe,it:dhe,nl:fhe,pt:vhe,ru:phe,uk:yhe});function whe(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 _he=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}(),Ehe=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 _he;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={},She={get exports(){return $p},set exports(t){$p=t}},Ui={},Ohe={get exports(){return Ui},set exports(t){Ui=t}},The=se,xhe=The(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),Phe=se,khe=et,Ihe=Fr,u0=xhe,iu=Object.isExtensible,Che=Phe(function(){iu(1)}),Ahe=Che||u0?function(i){return!khe(i)||u0&&Ihe(i)=="ArrayBuffer"?!1:iu?iu(i):!0}:iu,Rhe=se,EP=!Rhe(function(){return Object.isExtensible(Object.preventExtensions({}))}),Dhe=q,Mhe=ue,Nhe=Uo,Fhe=et,my=tt,Bhe=Ut.f,l0=Yo,Lhe=Tl,$y=Ahe,jhe=yl,zhe=EP,SP=!1,Ar=jhe("meta"),Hhe=0,by=function(t){Bhe(t,Ar,{value:{objectID:"O"+Hhe++,weakData:{}}})},Whe=function(t,i){if(!Fhe(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},Vhe=function(t,i){if(!my(t,Ar)){if(!$y(t))return!0;if(!i)return!1;by(t)}return t[Ar].weakData},Uhe=function(t){return zhe&&SP&&$y(t)&&!my(t,Ar)&&by(t),t},Ghe=function(){Khe.enable=function(){},SP=!0;var t=l0.f,i=Mhe([].splice),e={};e[Ar]=1,t(e).length&&(l0.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},Dhe({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Lhe.f}))},Khe=Ohe.exports={enable:Ghe,fastKey:Whe,getWeakData:Vhe,onFreeze:Uhe};Nhe[Ar]=!0;var qhe=Wo,Yhe=Mt,Xhe=Ft,Qhe=sa,Zhe=ST,Jhe=ir,c0=Ne,ede=kT,tde=Ol,h0=ET,rde=TypeError,au=function(t,i){this.stopped=t,this.result=i},d0=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=qhe(i,r),l,c,h,d,f,v,g,b=function($){return l&&h0(l,"normal",$),new au(!0,$)},p=function($){return n?(Xhe($),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=tde(t),!c)throw rde(Qhe(t)+" is not iterable");if(Zhe(c)){for(h=0,d=Jhe(t);d>h;h++)if(f=p(t[h]),f&&c0(d0,f))return f;return new au(!1)}l=ede(t,c)}for(v=a?t.next:l.next;!(g=Yhe(v,l)).done;){try{f=p(g.value)}catch($){h0(l,"throw",$)}if(typeof f=="object"&&f&&c0(d0,f))return f}return new au(!1)},nde=Ne,ide=TypeError,_y=function(t,i){if(nde(i,t))return t;throw ide("Incorrect invocation")},ade=q,ode=Ve,sde=Ui,ude=se,lde=ua,cde=wy,hde=_y,dde=Je,fde=et,vde=ca,pde=Ut.f,gde=fn.forEach,yde=Ge,OP=Jn,mde=OP.set,$de=OP.getterFor,Ey=function(t,i,e){var r=t.indexOf("Map")!==-1,n=t.indexOf("Weak")!==-1,a=r?"set":"add",o=ode[t],s=o&&o.prototype,u={},l;if(!yde||!dde(o)||!(n||s.forEach&&!ude(function(){new o().entries().next()})))l=e.getConstructor(i,t,r,a),sde.enable();else{l=i(function(d,f){mde(hde(d,c),{type:t,collection:new o}),f!=null&&cde(f,d[a],{that:d,AS_ENTRIES:r})});var c=l.prototype,h=$de(t);gde(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(d){var f=d=="add"||d=="set";d in s&&!(n&&d=="clear")&&lde(c,d,function(v,g){var b=h(this).collection;if(!f&&n&&!fde(v))return d=="get"?void 0:!1;var p=b[d](v===0?0:v,g);return f?this:p})}),n||pde(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}return vde(l,t,!1,!0),u[t]=l,ade({global:!0,forced:!0},u),n||e.setStrong(l,t,r),l},bde=qo,Sy=function(t,i,e){for(var r in i)e&&e.unsafe&&t[r]?t[r]=i[r]:bde(t,r,i[r],e);return t},wde=Vt,_de=Jg,Ede=Fe,Sde=Ge,f0=Ede("species"),Ode=function(t){var i=wde(t);Sde&&i&&!i[f0]&&_de(i,f0,{configurable:!0,get:function(){return this}})},Tde=la,xde=Jg,v0=Sy,Pde=Wo,kde=_y,Ide=Fo,Cde=wy,Ade=Xg,Ls=Qg,Rde=Ode,wa=Ge,p0=Ui.fastKey,TP=Jn,g0=TP.set,Kh=TP.getterFor,xP={getConstructor:function(t,i,e,r){var n=t(function(l,c){kde(l,a),g0(l,{type:i,index:Tde(null),first:void 0,last:void 0,size:0}),wa||(l.size=0),Ide(c)||Cde(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=p0(c,!0),key:c,value:h,previous:v=d.last,next:void 0,removed:!1},d.first||(d.first=f),v&&(v.next=f),wa?d.size++:l.size++,g!=="F"&&(d.index[g]=f)),l},u=function(l,c){var h=o(l),d=p0(c),f;if(d!=="F")return h.index[d];for(f=h.first;f;f=f.next)if(f.key==c)return f};return v0(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,wa?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),wa?h.size--:c.size--}return!!d},forEach:function(c){for(var h=o(this),d=Pde(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)}}),v0(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)}}),wa&&xde(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);Ade(t,i,function(o,s){g0(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),Rde(i)}},Dde=Ey,Mde=xP;Dde("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Mde);var Nde=ie,Fde=Nde.Map,Bde=Fde,Lde=Bde;(function(t){t.exports=Lde})(She);var PP=V($p),jde=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},je(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 PP,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={},zde={get exports(){return bp},set exports(t){bp=t}},Hde=q;Hde({target:"Number",stat:!0},{isNaN:function(i){return i!=i}});var Wde=ie,Vde=Wde.Number.isNaN,Ude=Vde,Gde=Ude;(function(t){t.exports=Gde})(zde);var wp=V(bp),_p={},Kde={get exports(){return _p},set exports(t){_p=t}},qde=Ve,Yde=qde.isFinite,Xde=Number.isFinite||function(i){return typeof i=="number"&&Yde(i)},Qde=q,Zde=Xde;Qde({target:"Number",stat:!0},{isFinite:Zde});var Jde=ie,efe=Jde.Number.isFinite,tfe=efe,rfe=tfe;(function(t){t.exports=rfe})(Kde);var xn=V(_p),Ep={},nfe={get exports(){return Ep},set exports(t){Ep=t}},ife=q,afe=fn.some,ofe=fa,sfe=ofe("some");ife({target:"Array",proto:!0,forced:!sfe},{some:function(i){return afe(this,i,arguments.length>1?arguments[1]:void 0)}});var ufe=rt,lfe=ufe("Array").some,cfe=Ne,hfe=lfe,qh=Array.prototype,dfe=function(t){var i=t.some;return t===qh||cfe(qh,t)&&i===qh.some?hfe:i},ffe=dfe,vfe=ffe;(function(t){t.exports=vfe})(nfe);var pfe=V(Ep),Sp={},gfe={get exports(){return Sp},set exports(t){Sp=t}},kP=Ve,yfe=se,mfe=ue,$fe=mr,bfe=sy.trim,wfe=Nl,_fe=mfe("".charAt),zu=kP.parseFloat,y0=kP.Symbol,m0=y0&&y0.iterator,Efe=1/zu(wfe+"-0")!==-1/0||m0&&!yfe(function(){zu(Object(m0))}),Sfe=Efe?function(i){var e=bfe($fe(i)),r=zu(e);return r===0&&_fe(e,0)=="-"?-0:r}:zu,Ofe=q,$0=Sfe;Ofe({global:!0,forced:parseFloat!=$0},{parseFloat:$0});var Tfe=ie,xfe=Tfe.parseFloat,Pfe=xfe,kfe=Pfe;(function(t){t.exports=kfe})(gfe);var IP=V(Sp),Op={},Ife={get exports(){return Op},set exports(t){Op=t}},Cfe=q,Afe=se,Rfe=Tl.f,Dfe=Afe(function(){return!Object.getOwnPropertyNames(1)});Cfe({target:"Object",stat:!0,forced:Dfe},{getOwnPropertyNames:Rfe});var Mfe=ie,Nfe=Mfe.Object,Ffe=function(i){return Nfe.getOwnPropertyNames(i)},Bfe=Ffe,Lfe=Bfe;(function(t){t.exports=Lfe})(Ife);var jfe=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 CP(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={},zfe={get exports(){return xp},set exports(t){xp=t}},Hfe=rt,Wfe=Hfe("Array").values,Vfe=Wfe,Ufe=Vfe,Gfe=Zn,Kfe=tt,qfe=Ne,Yfe=Ufe,Yh=Array.prototype,Xfe={DOMTokenList:!0,NodeList:!0},Qfe=function(t){var i=t.values;return t===Yh||qfe(Yh,t)&&i===Yh.values||Kfe(Xfe,Gfe(t))?Yfe:i};(function(t){t.exports=Qfe})(zfe);var AP=V(xp),Zfe=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=je({},AP(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={};je(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}(),Jfe={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},b0=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=Jfe[e];a!==void 0?n=a:n=new RegExp(e),r=e.length}return[n,r]}}]),t}(),eve=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 Zfe(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
91
  `),e=e.replace(/\r/g,`
92
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,"&lt;","<")||r.replace(r.text,"&amp;","&");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}(),_a=["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(te(_a,function(n){r.fontOptions[n]={}}),t.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}te(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),te(a,function(s,u){s!==void 0&&(Object.prototype.hasOwnProperty.call(r,u)||(ae(_a).call(_a,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=_a[o],l=r.fontOptions[u],c=r.getFontOptions(n,u);te(c,function(h,d){l[d]=h}),l.size=Number(l.size),l.vadjust=Number(l.vadjust)},o=0;o<_a.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 Zfe(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={},Jfe={get exports(){return Pp},set exports(t){Pp=t}},eve=Sl,tve=sa,rve=TypeError,nve=function(t){if(eve(t))return t;throw rve(tve(t)+" is not a constructor")},ive=q,ave=Vt,Xh=Do,ove=iT,b0=nve,sve=Ft,w0=et,uve=la,RP=se,Ty=ave("Reflect","construct"),lve=Object.prototype,cve=[].push,DP=RP(function(){function t(){}return!(Ty(function(){},[],t)instanceof t)}),MP=!RP(function(){Ty(function(){})}),_0=DP||MP;ive({target:"Reflect",stat:!0,forced:_0,sham:_0},{construct:function(i,e){b0(i),sve(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(cve,n,e),new(Xh(ove,i,n))}var a=r.prototype,o=uve(w0(a)?a:lve),s=Xh(i,o,e);return w0(s)?s:o}});var hve=ie,dve=hve.Reflect.construct,fve=dve,vve=fve;(function(t){t.exports=vve})(Jfe);var P=V(Pp),kp={},pve={get exports(){return kp},set exports(t){kp=t}},Ip={},gve={get exports(){return Ip},set exports(t){Ip=t}},yve=Dx,mve=yve,$ve=mve,bve=$ve;(function(t){t.exports=bve})(gve);(function(t){t.exports=Ip})(pve);var wve=V(kp),Cp={},_ve={get exports(){return Cp},set exports(t){Cp=t}},Ap={},Eve={get exports(){return Ap},set exports(t){Ap=t}},Sve=q,Ove=sZ;Sve({target:"Object",stat:!0},{setPrototypeOf:Ove});var Tve=ie,xve=Tve.Object.setPrototypeOf,Pve=xve,kve=Pve,Ive=kve,Cve=Ive,Ave=Cve,Rve=Ave;(function(t){t.exports=Rve})(Eve);(function(t){t.exports=Ap})(_ve);var Rp=V(Cp),Dp={},Dve={get exports(){return Dp},set exports(t){Dp=t}},Mp={},Mve={get exports(){return Mp},set exports(t){Mp=t}},Nve=aT,Fve=Nve,Bve=Fve,Lve=Bve;(function(t){t.exports=Lve})(Mve);(function(t){t.exports=Mp})(Dve);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=wve(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Dl(t,"prototype",{writable:!1}),i&&Np(t,i)}function jve(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 jve(t)}var Fp={},zve={get exports(){return Fp},set exports(t){Fp=t}},Bp={},Hve={get exports(){return Bp},set exports(t){Bp=t}},Wve=kx,Vve=Wve,Uve=Vve,Gve=Uve;(function(t){t.exports=Gve})(Hve);(function(t){t.exports=Bp})(zve);var E0=V(Fp);function z(t){var i;return z=Rp?xy(i=E0).call(i):function(r){return r.__proto__||E0(r)},z(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 Kve(t){var i=qve();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function qve(){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 Yve=function(t){ce(e,t);var i=Kve(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 Xve(t){var i=Qve();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Qve(){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=Xve(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 Zve(t){var i=Jve();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Jve(){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 epe=function(t){ce(e,t);var i=Zve(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 tpe(t){var i=rpe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function rpe(){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=tpe(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 ipe(t){var i=ape();return function(){var r=z(t),n;if(i){var a=z(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 gn=function(t){ce(e,t);var i=ipe(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),EX(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 ope(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 spe(t){var i=upe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function upe(){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=spe(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:ope({},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 cpe(t){var i=hpe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function hpe(){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 dpe=function(t){ce(e,t);var i=cpe(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 fpe(t){var i=vpe();return function(){var r=z(t),n;if(i){var a=z(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 ppe=function(t){ce(e,t);var i=fpe(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 gpe(t){var i=ype();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function ype(){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 mpe=function(t){ce(e,t);var i=gpe(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 $pe(t){var i=bpe();return function(){var r=z(t),n;if(i){var a=z(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 O0=function(t){ce(e,t);var i=$pe(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 wpe(t){var i=_pe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function _pe(){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 Epe=function(t){ce(e,t);var i=wpe(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 Spe(t){var i=Ope();return function(){var r=z(t),n;if(i){var a=z(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 Tpe=function(t){ce(e,t);var i=Spe(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 xpe(t){var i=Ppe();return function(){var r=z(t),n;if(i){var a=z(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 kpe=function(t){ce(e,t);var i=xpe(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 Ipe(t){var i=Cpe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Cpe(){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 Ape=function(t){ce(e,t);var i=Ipe(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 Rpe(t){var i=Dpe();return function(){var r=z(t),n;if(i){var a=z(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 Mpe=function(t){ce(e,t);var i=Rpe(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 Npe(t){var i=Fpe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Fpe(){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 Bpe=function(t){ce(e,t);var i=Npe(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 Lpe(t){var i=jpe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function jpe(){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 zpe=function(t){ce(e,t);var i=Lpe(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 Hpe(t){var i=Wpe();return function(){var r=z(t),n;if(i){var a=z(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 Vpe=function(t){ce(e,t);var i=Hpe(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 Yve(this.options,this.body,this.labelModule);break;case"circle":this.shape=new epe(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new npe(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new lpe(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new dpe(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new ppe(this.options,this.body,this.labelModule);break;case"dot":this.shape=new mpe(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 Epe(this.options,this.body,this.labelModule);break;case"image":this.shape=new Tpe(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new kpe(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new Ape(this.options,this.body,this.labelModule);break;case"star":this.shape=new Mpe(this.options,this.body,this.labelModule);break;case"text":this.shape=new Bpe(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new zpe(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new Vpe(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=Bfe(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 Upe(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=Gpe(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 Gpe(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 Kpe=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=A(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",A(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",A(r=this.refresh).call(r,this)),this.body.emitter.on("destroy",function(){te(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&&te(this.nodesListeners,function(s,u){n.off(u,s)}),this.body.nodes={},this.body.data.nodes){var a=this;te(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=ffe(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;te(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=Upe(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={},qpe={get exports(){return Lp},set exports(t){Lp=t}},jp={},Ype={get exports(){return jp},set exports(t){jp=t}},k0=tt,Xpe=function(t){return t!==void 0&&(k0(t,"value")||k0(t,"writable"))},Qpe=q,Zpe=Mt,Jpe=et,ege=Ft,tge=Xpe,rge=aa,nge=El;function NP(t,i){var e=arguments.length<3?t:arguments[2],r,n;if(ege(t)===e)return t[i];if(r=rge.f(t,i),r)return tge(r)?r.value:r.get===void 0?void 0:Zpe(r.get,e);if(Jpe(n=nge(t)))return NP(n,i,e)}Qpe({target:"Reflect",stat:!0},{get:NP});var ige=ie,age=ige.Reflect.get,oge=age,sge=oge,uge=sge,lge=uge,cge=lge,hge=cge;(function(t){t.exports=hge})(Ype);(function(t){t.exports=jp})(qpe);var I0=V(Lp),zp={},dge={get exports(){return zp},set exports(t){zp=t}},Hp={},fge={get exports(){return Hp},set exports(t){Hp=t}},vge=ux,pge=vge,gge=pge,yge=gge;(function(t){t.exports=yge})(fge);(function(t){t.exports=Hp})(dge);var mge=V(zp);function $ge(t,i){for(;!Object.prototype.hasOwnProperty.call(t,i)&&(t=z(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=$ge(e,r);if(a){var o=mge(a,r);return o.get?o.get.call(arguments.length<3?e:n):o.value}};return ou.apply(this,arguments)}var Wp={},bge={get exports(){return Wp},set exports(t){Wp=t}},wge=q,C0=Math.hypot,_ge=Math.abs,Ege=Math.sqrt,Sge=!!C0&&C0(1/0,NaN)!==1/0;wge({target:"Math",stat:!0,arity:2,forced:Sge},{hypot:function(i,e){for(var r=0,n=0,a=arguments.length,o=0,s,u;n<a;)s=_ge(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*Ege(r)}});var Oge=ie,Tge=Oge.Math.hypot,xge=Tge,Pge=xge;(function(t){t.exports=Pge})(bge);var kge=V(Wp);function FP(t){var i=Ige();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Ige(){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}(),Cge=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),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){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),Rge=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}(),Dge=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}(),Mge=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}(),Nge=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}(),Fge=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}(),Bge=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}(),Lge=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}(),jge=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}(),zge=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}(),Hge=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 Cge.draw(e,r);case"circle":return Bge.draw(e,r);case"box":return jge.draw(e,r);case"crow":return Rge.draw(e,r);case"curve":return Dge.draw(e,r);case"diamond":return zge.draw(e,r);case"inv_curve":return Mge.draw(e,r);case"triangle":return Nge.draw(e,r);case"inv_triangle":return Fge.draw(e,r);case"bar":return Lge.draw(e,r);case"vee":return Hge.draw(e,r);case"arrow":default:return Age.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,m=Math.sqrt(Math.pow(f.x-e.x,2)+Math.pow(f.y-e.y,2)),y=$-m;if(Math.abs(y)<d)break;y>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=kge(c.x-h.x,c.y-h.y),$=b/p;if(r!=="middle")if(this.options.smooth.enabled===!0){var m=this._findBorderPosition(c,e,{via:n}),y=this.getPoint(m.t+$*(r==="from"?1:-1),n);u=Math.atan2(m.y-y.y,m.x-y.x),l=m}else u=Math.atan2(c.y-h.y,c.x-h.x),l=this._findBorderPosition(c,e);else{var w=(d?-$:$)/2,S=this.getPoint(.5+w,n),T=this.getPoint(.5-w,n);u=Math.atan2(S.y-T.y,S.x-T.x),l=this.getPoint(.5,n)}}else{var O=this._getCircleData(e),_=xe(O,3),E=_[0],I=_[1],j=_[2];if(r==="from"){var B=this.options.selfReference.angle,X=this.options.selfReference.angle+Math.PI,ne=this._findBorderPositionCircle(this.from,e,{x:E,y:I,low:B,high:X,direction:-1});u=ne.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,l=ne}else if(r==="to"){var re=this.options.selfReference.angle,le=this.options.selfReference.angle+Math.PI,we=this._findBorderPositionCircle(this.from,e,{x:E,y:I,low:re,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,I,j,Oe),u=Oe*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}var ar=l.x-b*.9*Math.cos(u),nt=l.y-b*.9*Math.sin(u),_e={x:ar,y:nt};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 Wge(t){var i=Vge();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Vge(){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=Wge(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,m=Math.sqrt(Math.pow(f.x-d.x,2)+Math.pow(f.y-d.y,2)),y=$-m;if(Math.abs(y)<u)break;y<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 Uge(t){var i=Gge();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Gge(){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=Uge(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(z(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 Kge(t){var i=qge();return function(){var r=z(t),n;if(i){var a=z(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 F0=function(t){ce(e,t);var i=Kge(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),m=($+(n*.5+.5)*p)%(2*p);return{x:this.from.x+(n*.5+.5)*b*Math.sin(m),y:this.from.y+(n*.5+.5)*b*Math.cos(m)}}else if(a==="curvedCCW"){o=this.to.x-this.from.x,s=this.from.y-this.to.y;var y=Math.sqrt(o*o+s*s),w=Math.PI,S=Math.atan2(s,o),T=(S+(-n*.5+.5)*w)%(2*w);return{x:this.from.x+(n*.5+.5)*y*Math.sin(T),y:this.from.y+(n*.5+.5)*y*Math.cos(T)}}else{var O,_;o<=s?O=_=n*s:O=_=n*o,this.from.x>this.to.x&&(O=-O),this.from.y>=this.to.y&&(_=-_);var E=this.from.x+O,I=this.from.y+_;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?I=this.to.y>I?this.to.y:I:I=this.to.y<I?this.to.y:I,{x:E,y:I}}}},{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 Yge(t){var i=Xge();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Xge(){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 Qge=function(t){ce(e,t);var i=Yge(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,m=g[0]*a+g[1]*c.y+g[2]*h.y+g[3]*s;if(b>0){var y=this._getDistanceToLine(f,v,$,m,u,l);d=y<d?y:d}f=$,v=m}return d}}]),e}(ky);function Zge(t){var i=Jge();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Jge(){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=Zge(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}(Qge);function eye(t){var i=tye();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function tye(){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=eye(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),Ci=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(pa(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}(),rye=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=A(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",A(r=this.refresh).call(r,this)),this.body.emitter.on("refresh",A(n=this.refresh).call(n,this)),this.body.emitter.on("destroy",function(){te(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){Ci.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&&te(this.edgesListeners,function(s,u){a.off(u,s)}),this.body.edges={},this.body.data.edges){te(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;te(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;te(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 Ci(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=[];te(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),m=.5*(s+l),y={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:$-p,maxX:$+p,minY:m-p,maxY:m+p},size:b,calcSize:1/b,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(y.root);for(var w=0;w<a;w++)n=e[r[w]],n.options.mass>0&&this._placeInTree(y.root,n);return y}},{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}(),nye=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}(),iye=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}(),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}},{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 $,m,y=0;y<f.length;y++){var w=f[y];$=Math.min(u,Math.max(-u,v[w].springFx)),m=Math.min(u,Math.max(-u,v[w].springFy)),v[w].x+=$,v[w].y+=m}for(var S=0,T=0,O=0;O<f.length;O++){var _=f[O];S+=v[_].x,T+=v[_].y}for(var E=S/f.length,I=T/f.length,j=0;j<f.length;j++){var B=f[j];v[B].x-=E,v[B].y-=I}}}]),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 oye(t){var i=sye();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function sye(){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 uye=function(t){ce(e,t);var i=oye(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 lye(t){var i=cye();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function cye(){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 hye=function(t){ce(e,t);var i=lye(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),dye=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}},je(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 uye(this.body,this.physicsBody,e),this.edgesSolver=new Qh(this.body,this.physicsBody,e),this.gravitySolver=new hye(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new nye(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 iye(this.body,this.physicsBody,e),this.edgesSolver=new aye(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=A(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(A(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 fye=new Uint8Array(16);function vye(){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(fye)}const at=[];for(let t=0;t<256;++t)at.push((t+256).toString(16).slice(1));function pye(t,i=0){return(at[t[i+0]]+at[t[i+1]]+at[t[i+2]]+at[t[i+3]]+"-"+at[t[i+4]]+at[t[i+5]]+"-"+at[t[i+6]]+at[t[i+7]]+"-"+at[t[i+8]]+at[t[i+9]]+"-"+at[t[i+10]]+at[t[i+11]]+at[t[i+12]]+at[t[i+13]]+at[t[i+14]]+at[t[i+15]]).toLowerCase()}const gye=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var j0={randomUUID:gye};function Ba(t,i,e){if(j0.randomUUID&&!i&&!t)return j0.randomUUID();t=t||{};const r=t.random||(t.rng||vye)();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 pye(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 yye(t){var i=mye();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function mye(){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 $ye=function(t){ce(e,t);var i=yye(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],te(o.edges,function(s){delete a.containedEdges[s.id]}),te(o.containedNodes,function(s,u){a.containedNodes[u]=s}),o.containedNodes={},te(o.containedEdges,function(s,u){a.containedEdges[u]=s}),o.containedEdges={},te(o.edges,function(s){te(a.edges,function(u){var l,c,h=ae(l=u.clusteringEdgeReplacingIds).call(l,s.id);h!==-1&&(te(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),bye=function(){function t(i){var e=this;N(this,t),this.body=i,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},je(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={};te(this.body.nodes,function(s,u){s.options&&r.joinCondition(s.options)===!0&&(a[u]=s,te(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 m=0;m<$.edges.length;m++)u=$.edges[m],n.clusteredEdges[u.id]===void 0&&(u.toId!==u.fromId&&c++,l.push(u));if(c===e){for(var y=function(B){if(r.joinCondition===void 0||r.joinCondition===null)return!0;var X=dt.cloneOptions(B);return r.joinCondition(X)},w=!0,S=0;S<l.length;S++){u=l[S];var T=n._getConnectedId(u,p);if(y($))b[u.id]=u,g[p]=$,g[T]=n.body.nodes[T],s[p]=!0;else{w=!1;break}}if(Te(g).length>0&&Te(b).length>0&&w===!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]},_=O();if(_!==void 0){for(var E in g)_.nodes[E]===void 0&&(_.nodes[E]=g[E]);for(var I in b)_.edges[I]===void 0&&(_.edges[I]=b[I])}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=ji(n=Te(s)).call(n,function(y){return s[y].id});for(var b in s)if(Object.prototype.hasOwnProperty.call(s,b))for(var p=s[b],$=0;$<p.edges.length;$++){var m=p.edges[$];ae(g).call(g,this._getConnectedId(m,p.id))>-1&&(u[m.id]=m)}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 _=b[O],E=T.fromId===_.fromId&&T.toId===_.toId,I=T.fromId===_.toId&&T.toId===_.fromId;if(E||I)return _}return null},$=0;$<f.length;$++){var m=f[$],y=m.edge,w=p(m);w===null?(w=this._createClusteredEdge(m.fromId,m.toId,y,a),b.push(w)):w.clusteringEdgeReplacingIds.push(y.id),this.body.edges[y.id].edgeReplacedById=w.id,this._backupEdgeOptions(y),y.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,$ye);$.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 te(c,function(we){we.options.fixed.x===!1&&(we.x=a.x),we.options.fixed.y===!1&&(we.y=a.y)});for(var m in c)if(Object.prototype.hasOwnProperty.call(c,m)){var y=this.body.nodes[m];y.vx=a.vx,y.vy=a.vy,y.setOptions({physics:!0}),delete this.clusteredNodes[m]}for(var w=[],S=0;S<a.edges.length;S++)w.push(a.edges[S]);for(var T=0;T<w.length;T++){for(var O=w[T],_=this._getConnectedId(O,e),E=this.clusteredNodes[_],I=0;I<O.clusteringEdgeReplacingIds.length;I++){var j=O.clusteringEdgeReplacingIds[I],B=this.body.edges[j];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 ne=B.fromId,re=B.toId;B.toId==_?re=E.clusterId:ne=E.clusterId,this._createClusteredEdge(ne,re,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 Ci){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 te(e,function(a){r(a)&&n.push(a)}),n}},{key:"_updateState",value:function(){var e=this,r,n=[],a={},o=function(v){te(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]];te(this.clusteredEdges,function(f){var v=e.body.edges[f];(v===void 0||!v.endPointsValid())&&(a[f]=f)}),o(function(f){te(f.containedEdges,function(v,g){!v.endPointsValid()&&!a[g]&&(a[g]=g)})}),te(this.body.edges,function(f,v){var g=!0,b=f.clusteringEdgeReplacingIds;if(b!==void 0){var p=0;te(b,function($){var m=e.body.edges[$];m!==void 0&&m.endPointsValid()&&(p+=1)}),g=p>0}(!f.endPointsValid()||!g)&&(a[v]=v)}),o(function(f){te(a,function(v){delete f.containedEdges[v],te(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})})}),te(a,function(f){delete e.clusteredEdges[f]}),te(a,function(f){delete e.body.edges[f]});var l=Te(this.body.edges);te(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 wye(){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 _ye=function(){function t(i,e){N(this,t),wye(),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},je(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,A(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",A(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"];pa(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(A(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,m=u.length;for(p=0;p<$;p++){o=n[s[p]];var y=o.draw(e);y.drawExternalLabel!=null&&f.push(y.drawExternalLabel)}for(p=0;p<m;p++){o=n[u[p]];var w=o.draw(e);w.drawExternalLabel!=null&&f.push(w.drawExternalLabel)}return{drawExternalLabels:function(){for(var T=0,O=f;T<O.length;T++){var _=O[T];_()}}}}},{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={},Eye={get exports(){return Vp},set exports(t){Vp=t}},Sye=ie,Oye=Sye.setInterval;(function(t){t.exports=Oye})(Eye);var Tye=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 xye=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%"},je(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",A(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"];pa(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=Tye(function(){var c=r.setSize();c===!0&&r.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(function(){clearInterval(u)})}var l=A(a=this._onResize).call(a,this);Nce(window,"resize",l),this._cleanupCallbacks.push(function(){Fce(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 Ii(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Ii.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 Ii(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 Pye(t,i){var e=je({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 kye=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",A(r=this.fit).call(r,this)),this.body.emitter.on("animationFinished",function(){n.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",A(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=Pye(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=A(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=A(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=jce[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=A(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 Iye=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 Ii(this.navigationDOM[r[a]]);if(n[a]==="_fit"){var s;Wu(o,A(s=this._fit).call(s,this))}else{var u;Wu(o,A(u=this.bindToRedraw).call(u,this,n[a]))}this.navigationHammers.push(o)}var l=new Ii(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]=A(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,$,m,y,w,S,T,O,_,E;A(r=this.keycharm).call(r,"up",function(){e.bindToRedraw("_moveUp")},"keydown"),A(n=this.keycharm).call(n,"down",function(){e.bindToRedraw("_moveDown")},"keydown"),A(a=this.keycharm).call(a,"left",function(){e.bindToRedraw("_moveLeft")},"keydown"),A(o=this.keycharm).call(o,"right",function(){e.bindToRedraw("_moveRight")},"keydown"),A(s=this.keycharm).call(s,"=",function(){e.bindToRedraw("_zoomIn")},"keydown"),A(u=this.keycharm).call(u,"num+",function(){e.bindToRedraw("_zoomIn")},"keydown"),A(l=this.keycharm).call(l,"num-",function(){e.bindToRedraw("_zoomOut")},"keydown"),A(c=this.keycharm).call(c,"-",function(){e.bindToRedraw("_zoomOut")},"keydown"),A(h=this.keycharm).call(h,"[",function(){e.bindToRedraw("_zoomOut")},"keydown"),A(d=this.keycharm).call(d,"]",function(){e.bindToRedraw("_zoomIn")},"keydown"),A(f=this.keycharm).call(f,"pageup",function(){e.bindToRedraw("_zoomIn")},"keydown"),A(v=this.keycharm).call(v,"pagedown",function(){e.bindToRedraw("_zoomOut")},"keydown"),A(g=this.keycharm).call(g,"up",function(){e.unbindFromRedraw("_moveUp")},"keyup"),A(b=this.keycharm).call(b,"down",function(){e.unbindFromRedraw("_moveDown")},"keyup"),A(p=this.keycharm).call(p,"left",function(){e.unbindFromRedraw("_moveLeft")},"keyup"),A($=this.keycharm).call($,"right",function(){e.unbindFromRedraw("_moveRight")},"keyup"),A(m=this.keycharm).call(m,"=",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),A(y=this.keycharm).call(y,"num+",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),A(w=this.keycharm).call(w,"num-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),A(S=this.keycharm).call(S,"-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),A(T=this.keycharm).call(T,"[",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),A(O=this.keycharm).call(O,"]",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),A(_=this.keycharm).call(_,"pageup",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),A(E=this.keycharm).call(E,"pagedown",function(){e.unbindFromRedraw("_zoomOut")},"keyup")}}}]),t}();function Cye(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=Aye(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 Aye(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 Rye=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 Iye(i,e),this.body.eventListeners.onTap=A(n=this.onTap).call(n,this),this.body.eventListeners.onTouch=A(a=this.onTouch).call(a,this),this.body.eventListeners.onDoubleTap=A(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=A(s=this.onHold).call(s,this),this.body.eventListeners.onDragStart=A(u=this.onDragStart).call(u,this),this.body.eventListeners.onDrag=A(l=this.onDrag).call(l,this),this.body.eventListeners.onDragEnd=A(c=this.onDragEnd).call(c,this),this.body.eventListeners.onMouseWheel=A(h=this.onMouseWheel).call(h,this),this.body.eventListeners.onPinch=A(d=this.onPinch).call(d,this),this.body.eventListeners.onMouseMove=A(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=A(v=this.onRelease).call(v,this),this.body.eventListeners.onContext=A(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=A(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},je(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&&(je(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-Dce(this.canvas.frame.canvas),y:e.y-Mce(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=je({},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=Cye(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 qce(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={},Dye={get exports(){return Up},set exports(t){Up=t}},Mye=Ey,Nye=TP;Mye("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Nye);var Fye=ie,Bye=Fye.Set,Lye=Bye,jye=Lye;(function(t){t.exports=jye})(Dye);var Sn=V(Up),Gp={},zye={get exports(){return Gp},set exports(t){Gp=t}},Hye=ue,W0=Sy,zs=Ui.getWeakData,Wye=_y,Vye=Ft,Uye=Fo,Zh=et,Gye=wy,HP=fn,V0=tt,WP=Jn,Kye=WP.set,qye=WP.getterFor,Yye=HP.find,Xye=HP.findIndex,Qye=Hye([].splice),Zye=0,Hs=function(t){return t.frozen||(t.frozen=new VP)},VP=function(){this.entries=[]},Jh=function(t,i){return Yye(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=Xye(this.entries,function(e){return e[0]===t});return~i&&Qye(this.entries,i,1),!!~i}};var Jye={getConstructor:function(t,i,e,r){var n=t(function(u,l){Wye(u,a),Kye(u,{type:i,id:Zye++,frozen:void 0}),Uye(l)||Gye(l,u[r],{that:u,AS_ENTRIES:e})}),a=n.prototype,o=qye(i),s=function(u,l,c){var h=o(u),d=zs(Vye(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}},eme=_P,U0=Ve,uu=ue,G0=Sy,tme=Ui,rme=Ey,UP=Jye,Ws=et,Vs=Jn.enforce,nme=se,ime=hT,ss=Object,ame=Array.isArray,Us=ss.isExtensible,GP=ss.isFrozen,ome=ss.isSealed,KP=ss.freeze,sme=ss.seal,K0={},q0={},ume=!U0.ActiveXObject&&"ActiveXObject"in U0,Ea,qP=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},YP=rme("WeakMap",qP,UP),gi=YP.prototype,lu=uu(gi.set),lme=function(){return eme&&nme(function(){var t=KP([]);return lu(new YP,t,1),!GP(t)})};if(ime)if(ume){Ea=UP.getConstructor(qP,"WeakMap",!0),tme.enable();var Y0=uu(gi.delete),Gs=uu(gi.has),X0=uu(gi.get);G0(gi,{delete:function(t){if(Ws(t)&&!Us(t)){var i=Vs(this);return i.frozen||(i.frozen=new Ea),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 Ea),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 Ea),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 Ea),Gs(this,i)?lu(this,i,e):r.frozen.set(i,e)}else lu(this,i,e);return this}})}else lme()&&G0(gi,{set:function(i,e){var r;return ame(i)&&(GP(i)?r=K0:ome(i)&&(r=q0)),lu(this,i,e),r==K0&&KP(i),r==q0&&sme(i),this}});var cme=ie,hme=cme.WeakMap,dme=hme,fme=dme;(function(t){t.exports=fme})(zye);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=vme(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 vme(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 pme=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=gme(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 gme(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 yme=function(){function t(i,e){var r=this;N(this,t),this.body=i,this.canvas=e,this._selectionAccumulator=new pme,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},je(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"];pa(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 Ci)&&(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 Ci&&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 Ci&&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 ji(e=this._selectionAccumulator.getNodes()).call(e,function(r){return r.id})}},{key:"getSelectedEdgeIds",value:function(){var e;return ji(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={},mme={get exports(){return Yp},set exports(t){Yp=t}},r_=DT,$me=Math.floor,Xp=function(t,i){var e=t.length,r=$me(e/2);return e<8?bme(t,i):wme(t,Xp(r_(t,0,r),i),Xp(r_(t,r),i),i)},bme=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},wme=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},_me=Xp,Eme=Lo,n_=Eme.match(/firefox\/(\d+)/i),Sme=!!n_&&+n_[1],Ome=Lo,Tme=/MSIE|Trident/.test(Ome),xme=Lo,i_=xme.match(/AppleWebKit\/(\d+)\./),Pme=!!i_&&+i_[1],kme=q,XP=ue,Ime=Qn,Cme=Nt,a_=ir,Ame=xx,o_=mr,Iy=se,Rme=_me,Dme=fa,s_=Sme,Mme=Tme,u_=jo,l_=Pme,Xr=[],c_=XP(Xr.sort),Nme=XP(Xr.push),Fme=Iy(function(){Xr.sort(void 0)}),Bme=Iy(function(){Xr.sort(null)}),Lme=Dme("sort"),QP=!Iy(function(){if(u_)return u_<70;if(!(s_&&s_>3)){if(Mme)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"}}),jme=Fme||!Bme||!Lme||!QP,zme=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}};kme({target:"Array",proto:!0,forced:jme},{sort:function(i){i!==void 0&&Ime(i);var e=Cme(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&&Nme(r,e[o]);for(Rme(r,zme(i)),a=a_(r),o=0;o<a;)e[o]=r[o++];for(;o<n;)Ame(e,o++);return e}});var Hme=rt,Wme=Hme("Array").sort,Vme=Ne,Ume=Wme,ed=Array.prototype,Gme=function(t){var i=t.sort;return t===ed||Vme(ed,t)&&i===ed.sort?Ume:i},Kme=Gme,qme=Kme;(function(t){t.exports=qme})(mme);var td=V(Yp),Qp={},Yme={get exports(){return Qp},set exports(t){Qp=t}},Xme=Qn,Qme=Nt,Zme=gl,Jme=ir,e$e=TypeError,h_=function(t){return function(i,e,r,n){Xme(e);var a=Qme(i),o=Zme(a),s=Jme(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 e$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}},t$e={left:h_(!1),right:h_(!0)},r$e=Fr,n$e=typeof process<"u"&&r$e(process)=="process",i$e=q,a$e=t$e.left,o$e=fa,d_=jo,s$e=n$e,u$e=!s$e&&d_>79&&d_<83,l$e=u$e||!o$e("reduce");i$e({target:"Array",proto:!0,forced:l$e},{reduce:function(i){var e=arguments.length;return a$e(this,i,e,e>1?arguments[1]:void 0)}});var c$e=rt,h$e=c$e("Array").reduce,d$e=Ne,f$e=h$e,rd=Array.prototype,v$e=function(t){var i=t.reduce;return t===rd||d$e(rd,t)&&i===rd.reduce?f$e:i},p$e=v$e,g$e=p$e;(function(t){t.exports=g$e})(Yme);var ZP=V(Qp),ao={},y$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 m=s(p),y=s($),w=0;return m<y?(p*=o[y-m-1],$/=10,w=-1):m>y&&($*=o[m-y-1],p/=10,w=1),p===$?w: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,$,m,y){var w=$+1;if(w===m)return 1;if(y(p[w++],p[$])<0){for(;w<m&&y(p[w],p[w-1])<0;)w++;h(p,$,w)}else for(;w<m&&y(p[w],p[w-1])>=0;)w++;return w-$}function h(p,$,m){for(m--;$<m;){var y=p[$];p[$++]=p[m],p[m--]=y}}function d(p,$,m,y,w){for(y===$&&y++;y<m;y++){for(var S=p[y],T=$,O=y;T<O;){var _=T+O>>>1;w(S,p[_])<0?O=_:T=_+1}var E=y-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,$,m,y,w,S){var T=0,O=0,_=1;if(S(p,$[m+w])>0){for(O=y-w;_<O&&S(p,$[m+w+_])>0;)T=_,_=(_<<1)+1,_<=0&&(_=O);_>O&&(_=O),T+=w,_+=w}else{for(O=w+1;_<O&&S(p,$[m+w-_])<=0;)T=_,_=(_<<1)+1,_<=0&&(_=O);_>O&&(_=O);var E=T;T=w-_,_=w-E}for(T++;T<_;){var I=T+(_-T>>>1);S(p,$[m+I])>0?T=I+1:_=I}return _}function v(p,$,m,y,w,S){var T=0,O=0,_=1;if(S(p,$[m+w])<0){for(O=w+1;_<O&&S(p,$[m+w-_])<0;)T=_,_=(_<<1)+1,_<=0&&(_=O);_>O&&(_=O);var E=T;T=w-_,_=w-E}else{for(O=y-w;_<O&&S(p,$[m+w+_])>=0;)T=_,_=(_<<1)+1,_<=0&&(_=O);_>O&&(_=O),T+=w,_+=w}for(T++;T<_;){var I=T+(_-T>>>1);S(p,$[m+I])<0?_=I:T=I+1}return _}var g=function(){function p($,m){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=m,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(m,y){this.runStart[this.stackSize]=m,this.runLength[this.stackSize]=y,this.stackSize+=1},p.prototype.mergeRuns=function(){for(;this.stackSize>1;){var m=this.stackSize-2;if(m>=1&&this.runLength[m-1]<=this.runLength[m]+this.runLength[m+1]||m>=2&&this.runLength[m-2]<=this.runLength[m]+this.runLength[m-1])this.runLength[m-1]<this.runLength[m+1]&&m--;else if(this.runLength[m]>this.runLength[m+1])break;this.mergeAt(m)}},p.prototype.forceMergeRuns=function(){for(;this.stackSize>1;){var m=this.stackSize-2;m>0&&this.runLength[m-1]<this.runLength[m+1]&&m--,this.mergeAt(m)}},p.prototype.mergeAt=function(m){var y=this.compare,w=this.array,S=this.runStart[m],T=this.runLength[m],O=this.runStart[m+1],_=this.runLength[m+1];this.runLength[m]=T+_,m===this.stackSize-3&&(this.runStart[m+1]=this.runStart[m+2],this.runLength[m+1]=this.runLength[m+2]),this.stackSize--;var E=v(w[O],w,S,T,0,y);S+=E,T-=E,T!==0&&(_=f(w[S+T-1],w,O,_,_-1,y),_!==0&&(T<=_?this.mergeLow(S,T,O,_):this.mergeHigh(S,T,O,_)))},p.prototype.mergeLow=function(m,y,w,S){var T=this.compare,O=this.array,_=this.tmp,E=0;for(E=0;E<y;E++)_[E]=O[m+E];var I=0,j=w,B=m;if(O[B++]=O[j++],--S===0){for(E=0;E<y;E++)O[B+E]=_[I+E];return}if(y===1){for(E=0;E<S;E++)O[B+E]=O[j+E];O[B+S]=_[I];return}for(var X=this.minGallop;;){var ne=0,re=0,le=!1;do if(T(O[j],_[I])<0){if(O[B++]=O[j++],re++,ne=0,--S===0){le=!0;break}}else if(O[B++]=_[I++],ne++,re=0,--y===1){le=!0;break}while((ne|re)<X);if(le)break;do{if(ne=v(O[j],_,I,y,0,T),ne!==0){for(E=0;E<ne;E++)O[B+E]=_[I+E];if(B+=ne,I+=ne,y-=ne,y<=1){le=!0;break}}if(O[B++]=O[j++],--S===0){le=!0;break}if(re=f(_[I],O,j,S,0,T),re!==0){for(E=0;E<re;E++)O[B+E]=O[j+E];if(B+=re,j+=re,S-=re,S===0){le=!0;break}}if(O[B++]=_[I++],--y===1){le=!0;break}X--}while(ne>=n||re>=n);if(le)break;X<0&&(X=0),X+=2}if(this.minGallop=X,X<1&&(this.minGallop=1),y===1){for(E=0;E<S;E++)O[B+E]=O[j+E];O[B+S]=_[I]}else{if(y===0)throw new Error("mergeLow preconditions were not respected");for(E=0;E<y;E++)O[B+E]=_[I+E]}},p.prototype.mergeHigh=function(m,y,w,S){var T=this.compare,O=this.array,_=this.tmp,E=0;for(E=0;E<S;E++)_[E]=O[w+E];var I=m+y-1,j=S-1,B=w+S-1,X=0,ne=0;if(O[B--]=O[I--],--y===0){for(X=B-(S-1),E=0;E<S;E++)O[X+E]=_[E];return}if(S===1){for(B-=y,I-=y,ne=B+1,X=I+1,E=y-1;E>=0;E--)O[ne+E]=O[X+E];O[B]=_[j];return}for(var re=this.minGallop;;){var le=0,we=0,Oe=!1;do if(T(_[j],O[I])<0){if(O[B--]=O[I--],le++,we=0,--y===0){Oe=!0;break}}else if(O[B--]=_[j--],we++,le=0,--S===1){Oe=!0;break}while((le|we)<re);if(Oe)break;do{if(le=y-v(_[j],O,m,y,y-1,T),le!==0){for(B-=le,I-=le,y-=le,ne=B+1,X=I+1,E=le-1;E>=0;E--)O[ne+E]=O[X+E];if(y===0){Oe=!0;break}}if(O[B--]=_[j--],--S===1){Oe=!0;break}if(we=S-f(O[I],_,0,S,S-1,T),we!==0){for(B-=we,j-=we,S-=we,ne=B+1,X=j+1,E=0;E<we;E++)O[ne+E]=_[X+E];if(S<=1){Oe=!0;break}}if(O[B--]=O[I--],--y===0){Oe=!0;break}re--}while(le>=n||we>=n);if(Oe)break;re<0&&(re=0),re+=2}if(this.minGallop=re,re<1&&(this.minGallop=1),S===1){for(B-=y,I-=y,ne=B+1,X=I+1,E=y-1;E>=0;E--)O[ne+E]=O[X+E];O[B]=_[j]}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]=_[E]}},p}();function b(p,$,m,y){if(!Array.isArray(p))throw new TypeError("Can only sort arrays");$?typeof $!="function"&&(y=m,m=$,$=u):$=u,m||(m=0),y||(y=p.length);var w=y-m;if(!(w<2)){var S=0;if(w<r){S=c(p,m,y,$),d(p,m,y,m+S,$);return}var T=new g(p,$),O=l(w);do{if(S=c(p,m,y,$),S<O){var _=w;_>O&&(_=O),d(p,m,m+_,m+S,$),S=_}T.pushRun(m,S),T.mergeRuns(),w-=S,m+=S}while(w!==0);T.forceMergeRuns()}}})})(JP);(function(t){t.exports=JP})(y$e);var f_=V(ao);function ek(t){var i=m$e();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function m$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}(),$$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),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"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={},w$e={get exports(){return Zp},set exports(t){Zp=t}},_$e=q,E$e=fn.every,S$e=fa,O$e=S$e("every");_$e({target:"Array",proto:!0,forced:!O$e},{every:function(i){return E$e(this,i,arguments.length>1?arguments[1]:void 0)}});var T$e=rt,x$e=T$e("Array").every,P$e=Ne,k$e=x$e,nd=Array.prototype,I$e=function(t){var i=t.every;return t===nd||P$e(nd,t)&&i===nd.every?k$e:i},C$e=I$e,A$e=C$e;(function(t){t.exports=A$e})(w$e);var rk=V(Zp);function R$e(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=D$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 D$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 M$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 N$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 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.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=R$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,m,y=function(){var T,O;if(!r.has(g))return"continue";var _=a[m.id]+u;if(ge(T=St(O=m.edges).call(O,function(E){return E.connected&&E.to!==E.from&&E[e]!==m&&r.has(E.toId)&&r.has(E.fromId)})).call(T,function(E){var I=E[s],j=a[I];(j==null||i(_,j))&&(a[I]=_,p.push(E[e]))}),$>o)return{v:{v:M$e(r,a)}};++$};m=p.pop();){var w=y();if(w!=="continue"&&he(w)==="object")return w.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 B$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}(),L$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"}},je(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(pa(["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 B$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 m=s(),y=0,w=0;w<m.length-1;w++){var S=m[w].max-m[w+1].min;y+=S+e.options.hierarchical.treeSpacing,o(w+1,y)}},o=function(m,y){var w=e.hierarchical.trees;for(var S in w)Object.prototype.hasOwnProperty.call(w,S)&&w[S]===m&&e.direction.shift(S,y)},s=function(){for(var m=[],y=0;y<e.hierarchical.numTrees();y++)m.push(e.direction.getTreeSize(y));return m},u=function $(m,y){if(!y[m.id]&&(y[m.id]=!0,e.hierarchical.childrenReference[m.id])){var w=e.hierarchical.childrenReference[m.id];if(w.length>0)for(var S=0;S<w.length;S++)$(e.body.nodes[w[S]],y)}},l=function(m){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,w=1e9,S=1e9,T=1e9,O=-1e9;for(var _ in m)if(Object.prototype.hasOwnProperty.call(m,_)){var E=e.body.nodes[_],I=e.hierarchical.levels[E.id],j=e.direction.getPosition(E),B=e._getSpaceAroundNode(E,m),X=xe(B,2),ne=X[0],re=X[1];w=Math.min(ne,w),S=Math.min(re,S),I<=y&&(T=Math.min(j,T),O=Math.max(j,O))}return[T,O,w,S]},c=function(m,y){var w=e.hierarchical.getMaxLevel(m.id),S=e.hierarchical.getMaxLevel(y.id);return Math.min(w,S)},h=function(m,y,w){for(var S=e.hierarchical,T=0;T<y.length;T++){var O=y[T],_=S.distributionOrdering[O];if(_.length>1)for(var E=0;E<_.length-1;E++){var I=_[E],j=_[E+1];S.hasSameParent(I,j)&&S.inSameSubNetwork(I,j)&&m(I,j,w)}}},d=function(m,y){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,S=e.direction.getPosition(m),T=e.direction.getPosition(y),O=Math.abs(T-S),_=e.options.hierarchical.nodeSpacing;if(O>_){var E={},I={};u(m,E),u(y,I);var j=c(m,y),B=l(E,j),X=l(I,j),ne=B[1],re=X[0],le=X[2],we=Math.abs(ne-re);if(we>_){var Oe=ne-re+_;Oe<-le+_&&(Oe=-le+_),Oe<0&&(e._shiftBlock(y.id,Oe),r=!0,w===!0&&e._centerParent(y))}}},f=function(m,y){for(var w=y.id,S=y.edges,T=e.hierarchical.levels[y.id],O=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,_={},E=[],I=0;I<S.length;I++){var j=S[I];if(j.toId!=j.fromId){var B=j.toId==w?j.from:j.to;_[S[I].id]=B,e.hierarchical.levels[B.id]<T&&E.push(j)}}var X=function(nt,_e){for(var Ae=0,R=0;R<_e.length;R++)if(_[_e[R].id]!==void 0){var k=e.direction.getPosition(_[_e[R].id])-nt;Ae+=k/Math.sqrt(k*k+O)}return Ae},ne=function(nt,_e){for(var Ae=0,R=0;R<_e.length;R++)if(_[_e[R].id]!==void 0){var k=e.direction.getPosition(_[_e[R].id])-nt;Ae-=O*Math.pow(k*k+O,-1.5)}return Ae},re=function(nt,_e){for(var Ae=e.direction.getPosition(y),R={},k=0;k<nt;k++){var D=X(Ae,_e),L=ne(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(nt){var _e=e.direction.getPosition(y);if(n[y.id]===void 0){var Ae={};u(y,Ae),n[y.id]=Ae}var R=l(n[y.id]),k=R[2],D=R[3],L=nt-_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(y.id,G),r=!0)},we=function(nt){var _e=e.direction.getPosition(y),Ae=e._getSpaceAroundNode(y),R=xe(Ae,2),k=R[0],D=R[1],L=nt-_e,G=_e;L>0?G=Math.min(_e+(D-e.options.hierarchical.nodeSpacing),nt):L<0&&(G=Math.max(_e-(k-e.options.hierarchical.nodeSpacing),nt)),G!==_e&&(e.direction.setPosition(y,G),r=!0)},Oe=re(m,E);le(Oe),Oe=re(m,S),we(Oe)},v=function(m){var y=e.hierarchical.getLevels();y=An(y).call(y);for(var w=0;w<m;w++){r=!1;for(var S=0;S<y.length;S++)for(var T=y[S],O=e.hierarchical.distributionOrdering[T],_=0;_<O.length;_++)f(1e3,O[_]);if(r!==!0)break}},g=function(m){var y=e.hierarchical.getLevels();y=An(y).call(y);for(var w=0;w<m&&(r=!1,h(d,y,!0),r===!0);w++);},b=function(){for(var m in e.body.nodes)Object.prototype.hasOwnProperty.call(e.body.nodes,m)&&e._centerParent(e.body.nodes[m])},p=function(){var m=e.hierarchical.getLevels();m=An(m).call(m);for(var y=0;y<m.length;y++)for(var w=m[y],S=e.hierarchical.distributionOrdering[w],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 te(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;te(n,function(o){var s=e.body.nodes[o],u=e._getActiveEdges(s).length;r[u]=!0});var a=[];return te(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";te(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=F$e(n):this.hierarchical.levels=N$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 $$e(this):this.direction=new b$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 j$e(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=z$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 z$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 H$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}},je(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){a._clean()}),this.body.emitter.on("_dataChanged",A(o=this._restore).call(o,this)),this.body.emitter.on("_resetData",A(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,A(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",A(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,A(r=this.toggleEditMode).call(r,this))}this._temporaryBindEvent("click",A(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,A(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",A(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",A(r=this._finishConnect).call(r,this)),this._temporaryBindUI("onDrag",A(n=this._dragControlNode).call(n,this)),this._temporaryBindUI("onRelease",A(a=this._finishConnect).call(a,this)),this._temporaryBindUI("onDragStart",A(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,A(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",A(a=this._controlNodeTouch).call(a,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",A(o=this._controlNodeDragStart).call(o,this)),this._temporaryBindUI("onDrag",A(s=this._controlNodeDrag).call(s,this)),this._temporaryBindUI("onDragEnd",A(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,A(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=j$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,A(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,A(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,A(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,A(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,A(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,A(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 Ii(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=je({},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=je({},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",C="boolean",x="number",Pa="array",W="object",ik="dom",W$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:C,function:"function"},node:{boolean:C,function:"function"},__type__:{object:W,boolean:C}},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:C},y:{boolean:C},__type__:{object:W,boolean:C}},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:C,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:C,number:x}},hidden:{boolean:C},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:C},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:C},scaling:{min:{number:x},max:{number:x},label:{enabled:{boolean:C},min:{number:x},max:{number:x},maxVisible:{number:x},drawThreshold:{number:x},__type__:{object:W,boolean:C}},customScalingFunction:{function:"function"},__type__:{object:W}},shadow:{enabled:{boolean:C},color:{string:M},size:{number:x},x:{number:x},y:{number:x},__type__:{object:W,boolean:C}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:C,array:Pa},borderRadius:{number:x},interpolation:{boolean:C},useImageSize:{boolean:C},useBorderWithImage:{boolean:C},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:C,number:x}},x:{number:x},y:{number:x},__type__:{object:W}},V$e={configure:{enabled:{boolean:C},filter:{boolean:C,string:M,array:Pa,function:"function"},container:{dom:ik},showButton:{boolean:C},__type__:{object:W,boolean:C,string:M,array:Pa,function:"function"}},edges:{arrows:{to:{enabled:{boolean:C},scaleFactor:{number:x},type:{string:id},imageHeight:{number:x},imageWidth:{number:x},src:{string:M},__type__:{object:W,boolean:C}},middle:{enabled:{boolean:C},scaleFactor:{number:x},type:{string:id},imageWidth:{number:x},imageHeight:{number:x},src:{string:M},__type__:{object:W,boolean:C}},from:{enabled:{boolean:C},scaleFactor:{number:x},type:{string:id},imageWidth:{number:x},imageHeight:{number:x},src:{string:M},__type__:{object:W,boolean:C}},__type__:{string:["from","to","middle"],object:W}},endPointOffset:{from:{number:x},to:{number:x},__type__:{object:W,number:x}},arrowStrikethrough:{boolean:C},background:{enabled:{boolean:C},color:{string:M},size:{number:x},dashes:{boolean:C,array:Pa},__type__:{object:W,boolean:C}},chosen:{label:{boolean:C,function:"function"},edge:{boolean:C,function:"function"},__type__:{object:W,boolean:C}},color:{color:{string:M},highlight:{string:M},hover:{string:M},inherit:{string:["from","to","both"],boolean:C},opacity:{number:x},__type__:{object:W,string:M}},dashes:{boolean:C,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:C,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:C},hoverWidth:{function:"function",number:x},label:{string:M,undefined:"undefined"},labelHighlightBold:{boolean:C},length:{number:x,undefined:"undefined"},physics:{boolean:C},scaling:{min:{number:x},max:{number:x},label:{enabled:{boolean:C},min:{number:x},max:{number:x},maxVisible:{number:x},drawThreshold:{number:x},__type__:{object:W,boolean:C}},customScalingFunction:{function:"function"},__type__:{object:W}},selectionWidth:{function:"function",number:x},selfReferenceSize:{number:x},selfReference:{size:{number:x},angle:{number:x},renderBehindTheNode:{boolean:C},__type__:{object:W}},shadow:{enabled:{boolean:C},color:{string:M},size:{number:x},x:{number:x},y:{number:x},__type__:{object:W,boolean:C}},smooth:{enabled:{boolean:C},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:x},forceDirection:{string:["horizontal","vertical","none"],boolean:C},__type__:{object:W,boolean:C}},title:{string:M,undefined:"undefined"},width:{number:x},widthConstraint:{maximum:{number:x},__type__:{object:W,boolean:C,number:x}},value:{number:x,undefined:"undefined"},__type__:{object:W}},groups:{useDefaultGroups:{boolean:C},__any__:ad,__type__:{object:W}},interaction:{dragNodes:{boolean:C},dragView:{boolean:C},hideEdgesOnDrag:{boolean:C},hideEdgesOnZoom:{boolean:C},hideNodesOnDrag:{boolean:C},hover:{boolean:C},keyboard:{enabled:{boolean:C},speed:{x:{number:x},y:{number:x},zoom:{number:x},__type__:{object:W}},bindToWindow:{boolean:C},autoFocus:{boolean:C},__type__:{object:W,boolean:C}},multiselect:{boolean:C},navigationButtons:{boolean:C},selectable:{boolean:C},selectConnectedEdges:{boolean:C},hoverConnectedEdges:{boolean:C},tooltipDelay:{number:x},zoomView:{boolean:C},zoomSpeed:{number:x},__type__:{object:W}},layout:{randomSeed:{undefined:"undefined",number:x,string:M},improvedLayout:{boolean:C},clusterThreshold:{number:x},hierarchical:{enabled:{boolean:C},levelSeparation:{number:x},nodeSpacing:{number:x},treeSpacing:{number:x},blockShifting:{boolean:C},edgeMinimization:{boolean:C},parentCentralization:{boolean:C},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:W,boolean:C}},__type__:{object:W}},manipulation:{enabled:{boolean:C},initiallyActive:{boolean:C},addNode:{boolean:C,function:"function"},addEdge:{boolean:C,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:W,boolean:C,function:"function"}},deleteNode:{boolean:C,function:"function"},deleteEdge:{boolean:C,function:"function"},controlNodeStyle:ad,__type__:{object:W,boolean:C}},nodes:ad,physics:{enabled:{boolean:C},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:C},iterations:{number:x},updateInterval:{number:x},onlyDynamicEdges:{boolean:C},fit:{boolean:C},__type__:{object:W,boolean:C}},timestep:{number:x},adaptiveTimestep:{boolean:C},wind:{x:{number:x},y:{number:x},__type__:{object:W}},__type__:{object:W,boolean:C}},autoResize:{boolean:C},clickToUse:{boolean:C},locale:{string:M},locales:{__any__:{any:W$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]}}},U$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")},G$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],m=a[$],y=p+1;y<f;y++){var w=r[y],S=a[w],T=Math.min(m[w],m[g]+b[w]);m[w]=T,S[$]=T}return a}}]),t}(),K$e=function(){function t(i,e,r){N(this,t),this.body=i,this.springLength=e,this.springConstant=r,this.distanceSolver=new G$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 m=this._getEnergy(d),y=xe(m,3);g=y[0],f=y[1],v=y[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],m=f[g],y=1/Math.pow(Math.pow(c-b,2)+Math.pow(h-p,2),1.5);s+=$*(1-m*Math.pow(h-p,2)*y),u+=$*(m*(c-b)*(h-p)*y),l+=$*(1-m*Math.pow(c-b,2)*y)}}var w=s,S=u,T=r,O=l,_=n,E=(T/w+_/S)/(S/w-O/S),I=-(S*E+T)/w;o[e].x+=I,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,m=1/Math.sqrt(Math.pow(u-p,2)+Math.pow(l-$,2)),y=o[f]*(u-p-s[f]*(u-p)*m),w=o[f]*(l-$-s[f]*(l-$)*m);a[d]=[y,w],c+=y,h+=w;var S=this.E_sums[f];S[0]+=y-g,S[1]+=w-b}}this.E_sums[e]=[c,h]}}]),t}();function H(t,i,e){var r,n,a,o,s=this;if(!(this instanceof H))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:mhe,clickToUse:!1},je(this.options,this.defaultOptions),this.body={container:t,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:A(r=this.on).call(r,this),off:A(n=this.off).call(n,this),emit:A(a=this.emit).call(a,this),once:A(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 whe(function(){return s.body.emitter.emit("_requestRedraw")}),this.groups=new Bde,this.canvas=new xye(this.body),this.selectionHandler=new yme(this.body,this.canvas),this.interactionHandler=new Rye(this.body,this.canvas,this.selectionHandler),this.view=new kye(this.body,this.canvas),this.renderer=new _ye(this.body,this.canvas),this.physics=new dye(this.body),this.layoutEngine=new L$e(this.body),this.clustering=new bye(this.body),this.manipulation=new H$e(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new Kpe(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new rye(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new K$e(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(e),this.setData(i)}lT(H.prototype);H.prototype.setOptions=function(t){var i=this;if(t===null&&(t=void 0),t!==void 0){var e=Yce.validate(t,V$e);e===!0&&console.error("%cErrors have been found in the supplied options object.",vP);var r=["locale","locales","clickToUse"];if(pa(r,this.options,t),t.locale!==void 0&&(t.locale=$he(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 Kce(this,this.body.container,ak,this.canvas.pixelRatio,U$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 Gce(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")}};H.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)}};H.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")})};H.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=ahe(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=ohe(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")};H.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)};H.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)};H.prototype.isActive=function(){return!this.activator||this.activator.active};H.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};H.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};H.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};H.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};H.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};H.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};H.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};H.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};H.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};H.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};H.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};H.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};H.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};H.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};H.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};H.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};H.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};H.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};H.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};H.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};H.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};H.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};H.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};H.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};H.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};H.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};H.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};H.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};H.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};H.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};H.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)};H.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};H.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};H.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};H.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};H.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};H.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};H.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};H.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};H.prototype.getNodeAt=function(){var t=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return t!==void 0&&t.id!==void 0?t.id:t};H.prototype.getEdgeAt=function(){var t=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return t!==void 0&&t.id!==void 0?t.id:t};H.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};H.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};H.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};H.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};H.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};H.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};H.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};H.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};H.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};H.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};H.prototype.getOptionsFromConfigurator=function(){var t={};return this.configurator&&(t=this.configurator.getOptions.apply(this.configurator)),t};const q$e={flex:"~ gap-4 wrap","w-full":""},Y$e=ee("span",{op75:""},"Show pages",-1),X$e=ee("span",{op75:""},"Show layouts",-1),Q$e=ee("span",{op75:""},"Show workspace",-1),Z$e=ee("span",{op75:""},"Show node_modules",-1),J$e=ee("span",{op75:""},"Show global components",-1),ebe=ee("div",{"i-carbon-close":""},null,-1),tbe=ee("div",{"flex-auto":""},null,-1),rbe={relative:"","h-full":"","w-full":""},nbe=ee("div",{grid:"~ cols-[20px_1fr] items-center gap-y-1"},[ee("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-42b883":""}),ee("div",{op50:""}," Component "),ee("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-97c2fc":""}),ee("div",{op50:""}," Global Component "),ee("div",{"h-3":"","w-3":"","bg-hex-42b2b8":""}),ee("div",{op50:""}," Page "),ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 726 628","ml--1px":"","h-3":""},[ee("path",{fill:"#4256b8","stroke-width":"4",d:"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z"})]),ee("div",{op50:""}," Layout "),ee("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b4b842":""}),ee("div",{op50:""}," Library Component "),ee("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b86542":""}),ee("div",{op50:""}," Unknown ")],-1),ibe={key:0,p4:"",pr10:"",pt4:"",flex:"~ col gap4"},abe=Gi({__name:"ComponentsGraph",props:{components:{}},setup(t){const i=t,e=Sa(),r=Sa(),n=uk(),a=Sa(),o=lk(),s=ck(),u=hk(),l=Ek(),{componentsGraphShowNodeModules:c,componentsGraphShowGlobalComponents:h,componentsGraphShowPages:d,componentsGraphShowLayouts:f,componentsGraphShowWorkspace:v}=y_(),g=Sa(),b=rn(()=>{const m=l.value||[];if(g.value){let y=function(S){!S||w.has(S)||(w.add(S),S.deps.forEach(T=>{y(m.find(O=>O.id===T))}))};const w=new Set;return m.find(S=>S.id===a.value?.id),y(g.value),Array.from(w)}return m}),p=rn(()=>{const m=b.value.map(w=>{const S=i.components.find(j=>j.filePath===w.id),T=o.value?.find(j=>j.file===w.id),O=u.value?.find(j=>j.file===w.id),_=w.id.replace(/\?.*$/,"").replace(/\#.*$/,""),E=w.id.includes("/node_modules/")?"lib":S?S.global?"global":"user":O?"layout":T?"page":"unknown";if(!c.value&&E==="lib"||!d.value&&E==="page"||!f.value&&E==="layout"||!v.value&&E==="user"&&s.value&&!w.id.startsWith(s.value.rootDir)||!h.value&&E==="global")return null;const I=E==="layout"?"hexagon":E==="page"?"square":"dot";return{id:w.id,label:_.split("/").splice(-1)[0].replace(/\.\w+$/,""),group:E,shape:I,size:15+Math.min(w.deps.length/2,8),font:{color:n.value==="dark"?"white":"black"},color:g.value?.id===w.id?"#82c742":void 0,extra:{id:w.id,component:S,page:T,layout:O,relationship:w}}}).filter(w=>!!w),y=b.value.flatMap(w=>w.deps.map(S=>({from:w.id,to:S,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:m,edges:y}});dk(()=>{const m={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 H(e.value,p.value,m);y.on("click",w=>{const S=w.nodes?.[0],T=p.value.nodes?.find(O=>O.id===S)?.extra;T&&(a.value=T)}),fk(p,()=>{y.setData(p.value)})});function $(){g.value=a.value?.relationship,a.value=void 0}return(m,y)=>{const w=Ok,S=m_,T=vk,O=E_,_=pk,E=Tk;return fe(),lt(Vr,null,[Be(S,{ref_key:"navbar",ref:r,absolute:"","left-0":"","right-0":"","top-0":""},{search:qe(()=>[ee("div",q$e,[Be(w,{modelValue:Z(d),"onUpdate:modelValue":y[0]||(y[0]=I=>pi(d)?d.value=I:null),n:"primary sm"},{default:qe(()=>[Y$e]),_:1},8,["modelValue"]),Be(w,{modelValue:Z(f),"onUpdate:modelValue":y[1]||(y[1]=I=>pi(f)?f.value=I:null),n:"primary sm"},{default:qe(()=>[X$e]),_:1},8,["modelValue"]),Be(w,{modelValue:Z(v),"onUpdate:modelValue":y[2]||(y[2]=I=>pi(v)?v.value=I:null),n:"primary sm"},{default:qe(()=>[Q$e]),_:1},8,["modelValue"]),Be(w,{modelValue:Z(c),"onUpdate:modelValue":y[3]||(y[3]=I=>pi(c)?c.value=I:null),n:"primary sm"},{default:qe(()=>[Z$e]),_:1},8,["modelValue"]),Be(w,{modelValue:Z(h),"onUpdate:modelValue":y[4]||(y[4]=I=>pi(h)?h.value=I:null),n:"primary sm"},{default:qe(()=>[J$e]),_:1},8,["modelValue"])]),Z(g)?(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[5]||(y[5]=I=>g.value=void 0)},[ja(" Clear filter "),ebe])):Qt("",!0),tbe,Vu(m.$slots,"default")]),_:3},512),ee("div",rbe,[ee("div",{ref_key:"container",ref:e,"h-full":"","w-full":""},null,512),Be(T,{absolute:"","bottom-3":"","left-3":"","border-0":"",p2:"",px3:"","text-sm":"","glass-effect":""},{default:qe(()=>[nbe]),_:1}),Be(E,{"model-value":!!(Z(a)&&Z(a).component),navbar:Z(r),"w-80":"",onClose:y[7]||(y[7]=I=>a.value=void 0)},{default:qe(()=>[Z(a)&&Z(a).component?(fe(),lt("div",ibe,[Be(O,{component:Z(a).component},null,8,["component"]),ee("div",null,[Be(_,{n:"primary solid",onClick:y[6]||(y[6]=I=>$())},{default:qe(()=>[ja(" Filter to this component ")]),_:1})])])):Qt("",!0)]),_:1},8,["model-value","navbar"])])],64)}}}),obe={hover:"bg-active",class:"group",flex:"~ gap2","w-full":"","items-center":"",rounded:"",px2:"",py1:""},sbe={"hover:text-primary":""},ube=Gi({__name:"ComponentItem",props:{component:{}},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",obe,[Be(s,null,{popper:qe(()=>[Be(o,{component:r.component,p4:""},null,8,["component"])]),default:qe(()=>[ee("button",sbe,[Be(a,{component:r.component},null,8,["component"])])]),_:1}),r.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)])}}}),lbe={pl4:""},cbe=Gi({__name:"ComponentsList",props:{components:{}},setup(t){const i=t,e=Sa(""),r=rn(()=>new yk(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&&mk(h.filePath)){const d=$k(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=ube,l=xk,c=Pk;return fe(),lt(Vr,null,[Be(s,{search:Z(e),"onUpdate:search":o[0]||(o[0]=h=>pi(e)?e.value=h:null)},{actions:qe(()=>[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:qe(()=>[(fe(!0),lt(Vr,null,ga(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:qe(()=>[(fe(!0),lt(Vr,null,ga(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:qe(()=>[(fe(!0),lt(Vr,null,ga(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:qe(()=>[(fe(!0),lt(Vr,null,ga(Z(n).lib.entries(),([h,d])=>(fe(),lt("div",{key:h,"ml-2":""},[Be(c,{text:`${h} (${d.length})`,py1:"",op50:""},null,8,["text"]),ee("div",lbe,[(fe(!0),lt(Vr,null,ga(d,f=>(fe(),$t(u,{key:f.filePath,component:f},null,8,["component"]))),128))])]))),128))]),_:1},8,["open","description"])):Qt("",!0)],64)}}}),hbe={relative:"","h-full":"","of-auto":""},dbe={"flex-none":"",flex:"~ gap3"},Sbe=Gi({__name:"components",setup(t){const i=bk(),e=Sk(),{componentsView:r}=y_();function n(){i.value?.inspector?.instance&&i.value.inspector.enable()}function a(){r.value=r.value==="list"?"graph":"list"}return(o,s)=>{const u=g_,l=Dk,c=_k;return fe(),lt(Vr,null,[ee("div",hbe,[(fe(),$t(wk(Z(r)==="list"?cbe:abe),{components:Z(e)},{default:qe(()=>[ee("div",dbe,[Be(u,{"text-lg":"",icon:Z(r)==="graph"?"i-carbon-list":"i-carbon-network-4",title:"Toggle view",onClick:a},null,8,["icon"]),Z(i)?.inspector?.instance?(fe(),$t(u,{key:0,"text-lg":"",icon:"i-tabler-focus-2",title:"Inspect Vue components",onClick:n})):Qt("",!0)])]),_:1},8,["components"]))]),Be(c,null,{default:qe(()=>[Be(l)]),_:1})],64)}}});export{Sbe as default};
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 b0(e),n=function(u){if(/&/.test(u)){var l=r.replace(r.text,"&lt;","<")||r.replace(r.text,"&amp;","&");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 b0(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}(),_a=["bold","ital","boldital","mono"],RP=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(te(_a,function(n){r.fontOptions[n]={}}),t.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}te(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),te(a,function(s,u){s!==void 0&&(Object.prototype.hasOwnProperty.call(r,u)||(ae(_a).call(_a,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=_a[o],l=r.fontOptions[u],c=r.getFontOptions(n,u);te(c,function(h,d){l[d]=h}),l.size=Number(l.size),l.vadjust=Number(l.vadjust)},o=0;o<_a.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 eve(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={},tve={get exports(){return Pp},set exports(t){Pp=t}},rve=Sl,nve=sa,ive=TypeError,ave=function(t){if(rve(t))return t;throw ive(nve(t)+" is not a constructor")},ove=q,sve=Vt,Xh=Do,uve=aT,w0=ave,lve=Ft,_0=et,cve=la,DP=se,Ty=sve("Reflect","construct"),hve=Object.prototype,dve=[].push,MP=DP(function(){function t(){}return!(Ty(function(){},[],t)instanceof t)}),NP=!DP(function(){Ty(function(){})}),E0=MP||NP;ove({target:"Reflect",stat:!0,forced:E0,sham:E0},{construct:function(i,e){w0(i),lve(e);var r=arguments.length<3?i:w0(arguments[2]);if(NP&&!MP)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(dve,n,e),new(Xh(uve,i,n))}var a=r.prototype,o=cve(_0(a)?a:hve),s=Xh(i,o,e);return _0(s)?s:o}});var fve=ie,vve=fve.Reflect.construct,pve=vve,gve=pve;(function(t){t.exports=gve})(tve);var P=V(Pp),kp={},yve={get exports(){return kp},set exports(t){kp=t}},Ip={},mve={get exports(){return Ip},set exports(t){Ip=t}},$ve=Mx,bve=$ve,wve=bve,_ve=wve;(function(t){t.exports=_ve})(mve);(function(t){t.exports=Ip})(yve);var Eve=V(kp),Cp={},Sve={get exports(){return Cp},set exports(t){Cp=t}},Ap={},Ove={get exports(){return Ap},set exports(t){Ap=t}},Tve=q,xve=lZ;Tve({target:"Object",stat:!0},{setPrototypeOf:xve});var Pve=ie,kve=Pve.Object.setPrototypeOf,Ive=kve,Cve=Ive,Ave=Cve,Rve=Ave,Dve=Rve,Mve=Dve;(function(t){t.exports=Mve})(Ove);(function(t){t.exports=Ap})(Sve);var Rp=V(Cp),Dp={},Nve={get exports(){return Dp},set exports(t){Dp=t}},Mp={},Fve={get exports(){return Mp},set exports(t){Mp=t}},Bve=oT,Lve=Bve,jve=Lve,zve=jve;(function(t){t.exports=zve})(Fve);(function(t){t.exports=Mp})(Nve);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=Eve(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Dl(t,"prototype",{writable:!1}),i&&Np(t,i)}function Hve(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 Hve(t)}var Fp={},Wve={get exports(){return Fp},set exports(t){Fp=t}},Bp={},Vve={get exports(){return Bp},set exports(t){Bp=t}},Uve=Ix,Gve=Uve,Kve=Gve,qve=Kve;(function(t){t.exports=qve})(Vve);(function(t){t.exports=Bp})(Wve);var S0=V(Fp);function z(t){var i;return z=Rp?xy(i=S0).call(i):function(r){return r.__proto__||S0(r)},z(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 Yve(t){var i=Xve();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Xve(){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 Qve=function(t){ce(e,t);var i=Yve(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),sT(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 Zve(t){var i=Jve();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Jve(){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=Zve(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 epe(t){var i=tpe();return function(){var r=z(t),n;if(i){var a=z(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 rpe=function(t){ce(e,t);var i=epe(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 npe(t){var i=ipe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function ipe(){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 ape=function(t){ce(e,t);var i=npe(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 ope(t){var i=spe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function spe(){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=ope(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),OX(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 O0(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 upe(t){for(var i=1;i<arguments.length;i++){var e,r,n=arguments[i]!=null?arguments[i]:{};i%2?ge(e=O0(Object(n),!0)).call(e,function(a){Ml(t,a,n[a])}):un?Al(t,un(n)):ge(r=O0(Object(n))).call(r,function(a){Rl(t,a,vn(n,a))})}return t}function lpe(t){var i=cpe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function cpe(){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=lpe(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:upe({},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 dpe(t){var i=fpe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function fpe(){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 vpe=function(t){ce(e,t);var i=dpe(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),uT(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 ppe(t){var i=gpe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function gpe(){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 ype=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,"diamond",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function mpe(t){var i=$pe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function $pe(){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 bpe=function(t){ce(e,t);var i=mpe(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 wpe(t){var i=_pe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function _pe(){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 T0=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:"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 Epe(t){var i=Spe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Spe(){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 Ope=function(t){ce(e,t);var i=Epe(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 Tpe(t){var i=xpe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function xpe(){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 Ppe=function(t){ce(e,t);var i=Tpe(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 kpe(t){var i=Ipe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Ipe(){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=kpe(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 Ape(t){var i=Rpe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Rpe(){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 Dpe=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:"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 Mpe(t){var i=Npe();return function(){var r=z(t),n;if(i){var a=z(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 Fpe=function(t){ce(e,t);var i=Mpe(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 Bpe(t){var i=Lpe();return function(){var r=z(t),n;if(i){var a=z(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 jpe=function(t){ce(e,t);var i=Bpe(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 zpe(t){var i=Hpe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Hpe(){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 Wpe=function(t){ce(e,t);var i=zpe(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 Vpe(t){var i=Upe();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Upe(){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,"triangleDown",3,a,o,s,u,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function x0(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 P0(t){for(var i=1;i<arguments.length;i++){var e,r,n=arguments[i]!=null?arguments[i]:{};i%2?ge(e=x0(Object(n),!0)).call(e,function(a){Ml(t,a,n[a])}):un?Al(t,un(n)):ge(r=x0(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 RP(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=IP(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,P0(P0({},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 Qve(this.options,this.body,this.labelModule);break;case"circle":this.shape=new rpe(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new ape(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new hpe(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new vpe(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new ype(this.options,this.body,this.labelModule);break;case"dot":this.shape=new bpe(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new T0(this.options,this.body,this.labelModule);break;case"icon":this.shape=new Ope(this.options,this.body,this.labelModule);break;case"image":this.shape=new Ppe(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new Cpe(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new Dpe(this.options,this.body,this.labelModule);break;case"star":this.shape=new Fpe(this.options,this.body,this.labelModule);break;case"text":this.shape=new jpe(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new Wpe(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new Gpe(this.options,this.body,this.labelModule);break;default:this.shape=new T0(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=jfe(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);hP(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.",pP),e.mass=1}}}]),t}();function Kpe(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=qpe(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 qpe(t,i){var e;if(t){if(typeof t=="string")return k0(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 k0(t,i)}}function k0(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 Ype=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=A(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",A(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",A(r=this.refresh).call(r,this)),this.body.emitter.on("destroy",function(){te(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(zO("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&&te(this.nodesListeners,function(s,u){n.off(u,s)}),this.body.nodes={},this.body.data.nodes){var a=this;te(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=pfe(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;te(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=Kpe(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={},Xpe={get exports(){return Lp},set exports(t){Lp=t}},jp={},Qpe={get exports(){return jp},set exports(t){jp=t}},I0=tt,Zpe=function(t){return t!==void 0&&(I0(t,"value")||I0(t,"writable"))},Jpe=q,ege=Mt,tge=et,rge=Ft,nge=Zpe,ige=aa,age=El;function FP(t,i){var e=arguments.length<3?t:arguments[2],r,n;if(rge(t)===e)return t[i];if(r=ige.f(t,i),r)return nge(r)?r.value:r.get===void 0?void 0:ege(r.get,e);if(tge(n=age(t)))return FP(n,i,e)}Jpe({target:"Reflect",stat:!0},{get:FP});var oge=ie,sge=oge.Reflect.get,uge=sge,lge=uge,cge=lge,hge=cge,dge=hge,fge=dge;(function(t){t.exports=fge})(Qpe);(function(t){t.exports=jp})(Xpe);var C0=V(Lp),zp={},vge={get exports(){return zp},set exports(t){zp=t}},Hp={},pge={get exports(){return Hp},set exports(t){Hp=t}},gge=lx,yge=gge,mge=yge,$ge=mge;(function(t){t.exports=$ge})(pge);(function(t){t.exports=Hp})(vge);var bge=V(zp);function wge(t,i){for(;!Object.prototype.hasOwnProperty.call(t,i)&&(t=z(t),t!==null););return t}function ou(){if(typeof Reflect<"u"&&C0){var t;ou=xy(t=C0).call(t)}else ou=function(e,r,n){var a=wge(e,r);if(a){var o=bge(a,r);return o.get?o.get.call(arguments.length<3?e:n):o.value}};return ou.apply(this,arguments)}var Wp={},_ge={get exports(){return Wp},set exports(t){Wp=t}},Ege=q,A0=Math.hypot,Sge=Math.abs,Oge=Math.sqrt,Tge=!!A0&&A0(1/0,NaN)!==1/0;Ege({target:"Math",stat:!0,arity:2,forced:Tge},{hypot:function(i,e){for(var r=0,n=0,a=arguments.length,o=0,s,u;n<a;)s=Sge(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*Oge(r)}});var xge=ie,Pge=xge.Math.hypot,kge=Pge,Ige=kge;(function(t){t.exports=Ige})(_ge);var Cge=V(Wp);function BP(t){var i=Age();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Age(){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}(),Rge=function(t){ce(e,t);var i=BP(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),Dge=function(t){ce(e,t);var i=BP(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),Mge=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}(),Nge=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}(),Fge=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}(),Bge=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}(),Lge=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}(),jge=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}(),zge=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}(),Hge=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}(),Wge=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}(),Vge=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}(),LP=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 Rge.draw(e,r);case"circle":return jge.draw(e,r);case"box":return Hge.draw(e,r);case"crow":return Mge.draw(e,r);case"curve":return Nge.draw(e,r);case"diamond":return Wge.draw(e,r);case"inv_curve":return Fge.draw(e,r);case"triangle":return Bge.draw(e,r);case"inv_triangle":return Lge.draw(e,r);case"bar":return zge.draw(e,r);case"vee":return Vge.draw(e,r);case"arrow":default:return Dge.draw(e,r)}}}]),t}();function R0(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 D0(t){for(var i=1;i<arguments.length;i++){var e,r,n=arguments[i]!=null?arguments[i]:{};i%2?ge(e=R0(Object(n),!0)).call(e,function(a){Ml(t,a,n[a])}):un?Al(t,un(n)):ge(r=R0(Object(n))).call(r,function(a){Rl(t,a,vn(n,a))})}return t}var jP=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)lT(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=CP(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,m=Math.sqrt(Math.pow(f.x-e.x,2)+Math.pow(f.y-e.y,2)),y=$-m;if(Math.abs(y)<d)break;y>0?l>0?s=v:u=v:l>0?u=v:s=v,++b}while(s<=u&&b<c);return D0(D0({},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=Cge(c.x-h.x,c.y-h.y),$=b/p;if(r!=="middle")if(this.options.smooth.enabled===!0){var m=this._findBorderPosition(c,e,{via:n}),y=this.getPoint(m.t+$*(r==="from"?1:-1),n);u=Math.atan2(m.y-y.y,m.x-y.x),l=m}else u=Math.atan2(c.y-h.y,c.x-h.x),l=this._findBorderPosition(c,e);else{var w=(d?-$:$)/2,S=this.getPoint(.5+w,n),T=this.getPoint(.5-w,n);u=Math.atan2(S.y-T.y,S.x-T.x),l=this.getPoint(.5,n)}}else{var O=this._getCircleData(e),_=xe(O,3),E=_[0],I=_[1],j=_[2];if(r==="from"){var B=this.options.selfReference.angle,X=this.options.selfReference.angle+Math.PI,ne=this._findBorderPositionCircle(this.from,e,{x:E,y:I,low:B,high:X,direction:-1});u=ne.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,l=ne}else if(r==="to"){var re=this.options.selfReference.angle,le=this.options.selfReference.angle+Math.PI,we=this._findBorderPositionCircle(this.from,e,{x:E,y:I,low:re,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,I,j,Oe),u=Oe*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}var ar=l.x-b*.9*Math.cos(u),nt=l.y-b*.9*Math.sin(u),_e={x:ar,y:nt};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=LP.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 M0(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 N0(t){for(var i=1;i<arguments.length;i++){var e,r,n=arguments[i]!=null?arguments[i]:{};i%2?ge(e=M0(Object(n),!0)).call(e,function(a){Ml(t,a,n[a])}):un?Al(t,un(n)):ge(r=M0(Object(n))).call(r,function(a){Rl(t,a,vn(n,a))})}return t}function Uge(t){var i=Gge();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Gge(){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=Uge(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,m=Math.sqrt(Math.pow(f.x-d.x,2)+Math.pow(f.y-d.y,2)),y=$-m;if(Math.abs(y)<u)break;y<0?l===!1?h=v:c=v:l===!1?c=v:h=v,++b}while(h<=c&&b<s);return N0(N0({},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}(jP);function Kge(t){var i=qge();return function(){var r=z(t),n;if(i){var a=z(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 F0=function(t){ce(e,t);var i=Kge(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(z(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 Yge(t){var i=Xge();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Xge(){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=Yge(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),m=($+(n*.5+.5)*p)%(2*p);return{x:this.from.x+(n*.5+.5)*b*Math.sin(m),y:this.from.y+(n*.5+.5)*b*Math.cos(m)}}else if(a==="curvedCCW"){o=this.to.x-this.from.x,s=this.from.y-this.to.y;var y=Math.sqrt(o*o+s*s),w=Math.PI,S=Math.atan2(s,o),T=(S+(-n*.5+.5)*w)%(2*w);return{x:this.from.x+(n*.5+.5)*y*Math.sin(T),y:this.from.y+(n*.5+.5)*y*Math.cos(T)}}else{var O,_;o<=s?O=_=n*s:O=_=n*o,this.from.x>this.to.x&&(O=-O),this.from.y>=this.to.y&&(_=-_);var E=this.from.x+O,I=this.from.y+_;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?I=this.to.y>I?this.to.y:I:I=this.to.y<I?this.to.y:I,{x:E,y:I}}}},{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 Qge(t){var i=Zge();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function Zge(){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 Jge=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:"_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,m=g[0]*a+g[1]*c.y+g[2]*h.y+g[3]*s;if(b>0){var y=this._getDistanceToLine(f,v,$,m,u,l);d=y<d?y:d}f=$,v=m}return d}}]),e}(ky);function eye(t){var i=tye();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function tye(){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=eye(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}(Jge);function rye(t){var i=nye();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function nye(){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 j0=function(t){ce(e,t);var i=rye(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}(jP),Ci=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 RP(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=IP(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 F0&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof L0&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof B0&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof j0&&e.type.enabled===!1)&&(n=!1),n===!0&&(r=this.cleanup())),n===!0?e.enabled===!0?e.type==="dynamic"?(r=!0,this.edgeType=new F0(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new L0(this.options,this.body,this.labelModule):this.edgeType=new B0(this.options,this.body,this.labelModule):this.edgeType=new j0(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=CP(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(pa(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}(),iye=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=A(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",A(r=this.refresh).call(r,this)),this.body.emitter.on("refresh",A(n=this.refresh).call(n,this)),this.body.emitter.on("destroy",function(){te(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){Ci.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(zO("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&&te(this.edgesListeners,function(s,u){a.off(u,s)}),this.body.edges={},this.body.data.edges){te(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;te(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;te(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 Ci(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=[];te(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}(),zP=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),m=.5*(s+l),y={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:$-p,maxX:$+p,minY:m-p,maxY:m+p},size:b,calcSize:1/b,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(y.root);for(var w=0;w<a;w++)n=e[r[w]],n.options.mass>0&&this._placeInTree(y.root,n);return y}},{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}(),aye=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}(),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,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}(),sye=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 $,m,y=0;y<f.length;y++){var w=f[y];$=Math.min(u,Math.max(-u,v[w].springFx)),m=Math.min(u,Math.max(-u,v[w].springFy)),v[w].x+=$,v[w].y+=m}for(var S=0,T=0,O=0;O<f.length;O++){var _=f[O];S+=v[_].x,T+=v[_].y}for(var E=S/f.length,I=T/f.length,j=0;j<f.length;j++){var B=f[j];v[B].x-=E,v[B].y-=I}}}]),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 uye(t){var i=lye();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function lye(){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 cye=function(t){ce(e,t);var i=uye(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}(zP);function hye(t){var i=dye();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function dye(){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 fye=function(t){ce(e,t);var i=hye(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),vye=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}},je(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 cye(this.body,this.physicsBody,e),this.edgesSolver=new Qh(this.body,this.physicsBody,e),this.gravitySolver=new fye(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new aye(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 oye(this.body,this.physicsBody,e),this.edgesSolver=new sye(this.body,this.physicsBody,e),this.gravitySolver=new su(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new zP(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=A(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(A(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,LP.draw(e,{type:"arrow",point:f,angle:v,length:h}),ts(e).call(e)}}}]),t}();let js;const pye=new Uint8Array(16);function gye(){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(pye)}const at=[];for(let t=0;t<256;++t)at.push((t+256).toString(16).slice(1));function yye(t,i=0){return(at[t[i+0]]+at[t[i+1]]+at[t[i+2]]+at[t[i+3]]+"-"+at[t[i+4]]+at[t[i+5]]+"-"+at[t[i+6]]+at[t[i+7]]+"-"+at[t[i+8]]+at[t[i+9]]+"-"+at[t[i+10]]+at[t[i+11]]+at[t[i+12]]+at[t[i+13]]+at[t[i+14]]+at[t[i+15]]).toLowerCase()}const mye=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var z0={randomUUID:mye};function Ba(t,i,e){if(z0.randomUUID&&!i&&!t)return z0.randomUUID();t=t||{};const r=t.random||(t.rng||gye)();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 yye(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 $ye(t){var i=bye();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function bye(){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 wye=function(t){ce(e,t);var i=$ye(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],te(o.edges,function(s){delete a.containedEdges[s.id]}),te(o.containedNodes,function(s,u){a.containedNodes[u]=s}),o.containedNodes={},te(o.containedEdges,function(s,u){a.containedEdges[u]=s}),o.containedEdges={},te(o.edges,function(s){te(a.edges,function(u){var l,c,h=ae(l=u.clusteringEdgeReplacingIds).call(l,s.id);h!==-1&&(te(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),_ye=function(){function t(i){var e=this;N(this,t),this.body=i,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},je(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={};te(this.body.nodes,function(s,u){s.options&&r.joinCondition(s.options)===!0&&(a[u]=s,te(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 m=0;m<$.edges.length;m++)u=$.edges[m],n.clusteredEdges[u.id]===void 0&&(u.toId!==u.fromId&&c++,l.push(u));if(c===e){for(var y=function(B){if(r.joinCondition===void 0||r.joinCondition===null)return!0;var X=dt.cloneOptions(B);return r.joinCondition(X)},w=!0,S=0;S<l.length;S++){u=l[S];var T=n._getConnectedId(u,p);if(y($))b[u.id]=u,g[p]=$,g[T]=n.body.nodes[T],s[p]=!0;else{w=!1;break}}if(Te(g).length>0&&Te(b).length>0&&w===!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]},_=O();if(_!==void 0){for(var E in g)_.nodes[E]===void 0&&(_.nodes[E]=g[E]);for(var I in b)_.edges[I]===void 0&&(_.edges[I]=b[I])}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=ji(n=Te(s)).call(n,function(y){return s[y].id});for(var b in s)if(Object.prototype.hasOwnProperty.call(s,b))for(var p=s[b],$=0;$<p.edges.length;$++){var m=p.edges[$];ae(g).call(g,this._getConnectedId(m,p.id))>-1&&(u[m.id]=m)}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 _=b[O],E=T.fromId===_.fromId&&T.toId===_.toId,I=T.fromId===_.toId&&T.toId===_.fromId;if(E||I)return _}return null},$=0;$<f.length;$++){var m=f[$],y=m.edge,w=p(m);w===null?(w=this._createClusteredEdge(m.fromId,m.toId,y,a),b.push(w)):w.clusteringEdgeReplacingIds.push(y.id),this.body.edges[y.id].edgeReplacedById=w.id,this._backupEdgeOptions(y),y.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,wye);$.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 te(c,function(we){we.options.fixed.x===!1&&(we.x=a.x),we.options.fixed.y===!1&&(we.y=a.y)});for(var m in c)if(Object.prototype.hasOwnProperty.call(c,m)){var y=this.body.nodes[m];y.vx=a.vx,y.vy=a.vy,y.setOptions({physics:!0}),delete this.clusteredNodes[m]}for(var w=[],S=0;S<a.edges.length;S++)w.push(a.edges[S]);for(var T=0;T<w.length;T++){for(var O=w[T],_=this._getConnectedId(O,e),E=this.clusteredNodes[_],I=0;I<O.clusteringEdgeReplacingIds.length;I++){var j=O.clusteringEdgeReplacingIds[I],B=this.body.edges[j];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 ne=B.fromId,re=B.toId;B.toId==_?re=E.clusterId:ne=E.clusterId,this._createClusteredEdge(ne,re,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 Ci){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 te(e,function(a){r(a)&&n.push(a)}),n}},{key:"_updateState",value:function(){var e=this,r,n=[],a={},o=function(v){te(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]];te(this.clusteredEdges,function(f){var v=e.body.edges[f];(v===void 0||!v.endPointsValid())&&(a[f]=f)}),o(function(f){te(f.containedEdges,function(v,g){!v.endPointsValid()&&!a[g]&&(a[g]=g)})}),te(this.body.edges,function(f,v){var g=!0,b=f.clusteringEdgeReplacingIds;if(b!==void 0){var p=0;te(b,function($){var m=e.body.edges[$];m!==void 0&&m.endPointsValid()&&(p+=1)}),g=p>0}(!f.endPointsValid()||!g)&&(a[v]=v)}),o(function(f){te(a,function(v){delete f.containedEdges[v],te(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})})}),te(a,function(f){delete e.clusteredEdges[f]}),te(a,function(f){delete e.body.edges[f]});var l=Te(this.body.edges);te(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 Eye(){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 Sye=function(){function t(i,e){N(this,t),Eye(),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},je(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,A(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",A(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"];pa(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(A(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,m=u.length;for(p=0;p<$;p++){o=n[s[p]];var y=o.draw(e);y.drawExternalLabel!=null&&f.push(y.drawExternalLabel)}for(p=0;p<m;p++){o=n[u[p]];var w=o.draw(e);w.drawExternalLabel!=null&&f.push(w.drawExternalLabel)}return{drawExternalLabels:function(){for(var T=0,O=f;T<O.length;T++){var _=O[T];_()}}}}},{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={},Oye={get exports(){return Vp},set exports(t){Vp=t}},Tye=ie,xye=Tye.setInterval;(function(t){t.exports=xye})(Oye);var Pye=V(Vp);function Wu(t,i){i.inputHandler=function(e){e.isFirst&&i(e)},t.on("hammer.input",i.inputHandler)}function HP(t,i){return i.inputHandler=function(e){e.isFinal&&i(e)},t.on("hammer.input",i.inputHandler)}var kye=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%"},je(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",A(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"];pa(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=Pye(function(){var c=r.setSize();c===!0&&r.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(function(){clearInterval(u)})}var l=A(a=this._onResize).call(a,this);Bce(window,"resize",l),this._cleanupCallbacks.push(function(){Lce(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 Ii(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Ii.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 Ii(this.frame),HP(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 Iye(t,i){var e=je({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 Cye=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",A(r=this.fit).call(r,this)),this.body.emitter.on("animationFinished",function(){n.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",A(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=Iye(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=A(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=A(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=Hce[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=A(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 H0(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 Aye=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 Ii(this.navigationDOM[r[a]]);if(n[a]==="_fit"){var s;Wu(o,A(s=this._fit).call(s,this))}else{var u;Wu(o,A(u=this.bindToRedraw).call(u,this,n[a]))}this.navigationHammers.push(o)}var l=new Ii(this.canvas.frame);HP(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]=A(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=H0({container:window,preventDefault:!0}):this.keycharm=H0({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,$,m,y,w,S,T,O,_,E;A(r=this.keycharm).call(r,"up",function(){e.bindToRedraw("_moveUp")},"keydown"),A(n=this.keycharm).call(n,"down",function(){e.bindToRedraw("_moveDown")},"keydown"),A(a=this.keycharm).call(a,"left",function(){e.bindToRedraw("_moveLeft")},"keydown"),A(o=this.keycharm).call(o,"right",function(){e.bindToRedraw("_moveRight")},"keydown"),A(s=this.keycharm).call(s,"=",function(){e.bindToRedraw("_zoomIn")},"keydown"),A(u=this.keycharm).call(u,"num+",function(){e.bindToRedraw("_zoomIn")},"keydown"),A(l=this.keycharm).call(l,"num-",function(){e.bindToRedraw("_zoomOut")},"keydown"),A(c=this.keycharm).call(c,"-",function(){e.bindToRedraw("_zoomOut")},"keydown"),A(h=this.keycharm).call(h,"[",function(){e.bindToRedraw("_zoomOut")},"keydown"),A(d=this.keycharm).call(d,"]",function(){e.bindToRedraw("_zoomIn")},"keydown"),A(f=this.keycharm).call(f,"pageup",function(){e.bindToRedraw("_zoomIn")},"keydown"),A(v=this.keycharm).call(v,"pagedown",function(){e.bindToRedraw("_zoomOut")},"keydown"),A(g=this.keycharm).call(g,"up",function(){e.unbindFromRedraw("_moveUp")},"keyup"),A(b=this.keycharm).call(b,"down",function(){e.unbindFromRedraw("_moveDown")},"keyup"),A(p=this.keycharm).call(p,"left",function(){e.unbindFromRedraw("_moveLeft")},"keyup"),A($=this.keycharm).call($,"right",function(){e.unbindFromRedraw("_moveRight")},"keyup"),A(m=this.keycharm).call(m,"=",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),A(y=this.keycharm).call(y,"num+",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),A(w=this.keycharm).call(w,"num-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),A(S=this.keycharm).call(S,"-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),A(T=this.keycharm).call(T,"[",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),A(O=this.keycharm).call(O,"]",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),A(_=this.keycharm).call(_,"pageup",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),A(E=this.keycharm).call(E,"pagedown",function(){e.unbindFromRedraw("_zoomOut")},"keyup")}}}]),t}();function Rye(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=Dye(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 Dye(t,i){var e;if(t){if(typeof t=="string")return W0(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 W0(t,i)}}function W0(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 Mye=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 Aye(i,e),this.body.eventListeners.onTap=A(n=this.onTap).call(n,this),this.body.eventListeners.onTouch=A(a=this.onTouch).call(a,this),this.body.eventListeners.onDoubleTap=A(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=A(s=this.onHold).call(s,this),this.body.eventListeners.onDragStart=A(u=this.onDragStart).call(u,this),this.body.eventListeners.onDrag=A(l=this.onDrag).call(l,this),this.body.eventListeners.onDragEnd=A(c=this.onDragEnd).call(c,this),this.body.eventListeners.onMouseWheel=A(h=this.onMouseWheel).call(h,this),this.body.eventListeners.onPinch=A(d=this.onPinch).call(d,this),this.body.eventListeners.onMouseMove=A(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=A(v=this.onRelease).call(v,this),this.body.eventListeners.onContext=A(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=A(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},je(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&&(je(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-Nce(this.canvas.frame.canvas),y:e.y-Fce(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=je({},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=Rye(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 Xce(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={},Nye={get exports(){return Up},set exports(t){Up=t}},Fye=Ey,Bye=xP;Fye("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Bye);var Lye=ie,jye=Lye.Set,zye=jye,Hye=zye;(function(t){t.exports=Hye})(Nye);var Sn=V(Up),Gp={},Wye={get exports(){return Gp},set exports(t){Gp=t}},Vye=ue,V0=Sy,zs=Ui.getWeakData,Uye=_y,Gye=Ft,Kye=Fo,Zh=et,qye=wy,WP=fn,U0=tt,VP=Jn,Yye=VP.set,Xye=VP.getterFor,Qye=WP.find,Zye=WP.findIndex,Jye=Vye([].splice),eme=0,Hs=function(t){return t.frozen||(t.frozen=new UP)},UP=function(){this.entries=[]},Jh=function(t,i){return Qye(t.entries,function(e){return e[0]===i})};UP.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=Zye(this.entries,function(e){return e[0]===t});return~i&&Jye(this.entries,i,1),!!~i}};var tme={getConstructor:function(t,i,e,r){var n=t(function(u,l){Uye(u,a),Yye(u,{type:i,id:eme++,frozen:void 0}),Kye(l)||qye(l,u[r],{that:u,AS_ENTRIES:e})}),a=n.prototype,o=Xye(i),s=function(u,l,c){var h=o(u),d=zs(Gye(l),!0);return d===!0?Hs(h).set(l,c):d[h.id]=c,u};return V0(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&&U0(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&&U0(h,c.id)}}),V0(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}},rme=EP,G0=Ve,uu=ue,K0=Sy,nme=Ui,ime=Ey,GP=tme,Ws=et,Vs=Jn.enforce,ame=se,ome=dT,ss=Object,sme=Array.isArray,Us=ss.isExtensible,KP=ss.isFrozen,ume=ss.isSealed,qP=ss.freeze,lme=ss.seal,q0={},Y0={},cme=!G0.ActiveXObject&&"ActiveXObject"in G0,Ea,YP=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},XP=ime("WeakMap",YP,GP),gi=XP.prototype,lu=uu(gi.set),hme=function(){return rme&&ame(function(){var t=qP([]);return lu(new XP,t,1),!KP(t)})};if(ome)if(cme){Ea=GP.getConstructor(YP,"WeakMap",!0),nme.enable();var X0=uu(gi.delete),Gs=uu(gi.has),Q0=uu(gi.get);K0(gi,{delete:function(t){if(Ws(t)&&!Us(t)){var i=Vs(this);return i.frozen||(i.frozen=new Ea),X0(this,t)||i.frozen.delete(t)}return X0(this,t)},has:function(i){if(Ws(i)&&!Us(i)){var e=Vs(this);return e.frozen||(e.frozen=new Ea),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 Ea),Gs(this,i)?Q0(this,i):e.frozen.get(i)}return Q0(this,i)},set:function(i,e){if(Ws(i)&&!Us(i)){var r=Vs(this);r.frozen||(r.frozen=new Ea),Gs(this,i)?lu(this,i,e):r.frozen.set(i,e)}else lu(this,i,e);return this}})}else hme()&&K0(gi,{set:function(i,e){var r;return sme(i)&&(KP(i)?r=q0:ume(i)&&(r=Y0)),lu(this,i,e),r==q0&&qP(i),r==Y0&&lme(i),this}});var dme=ie,fme=dme.WeakMap,vme=fme,pme=vme;(function(t){t.exports=pme})(Wye);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=gme(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 gme(t,i){var e;if(t){if(typeof t=="string")return Z0(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 Z0(t,i)}}function Z0(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 J0(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 e_=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(J0(me(this,wn,"f"),me(this,Bt,"f"))),deleted:lr(J0(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 yme=function(){function t(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};N(this,t),Hr.set(this,new e_),Wr.set(this,new e_),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 t_(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=mme(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 mme(t,i){var e;if(t){if(typeof t=="string")return r_(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 r_(t,i)}}function r_(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 $me=function(){function t(i,e){var r=this;N(this,t),this.body=i,this.canvas=e,this._selectionAccumulator=new yme,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},je(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"];pa(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 Ci)&&(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 Ci&&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 Ci&&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 ji(e=this._selectionAccumulator.getNodes()).call(e,function(r){return r.id})}},{key:"getSelectedEdgeIds",value:function(){var e;return ji(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=t_(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=t_(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={},bme={get exports(){return Yp},set exports(t){Yp=t}},n_=MT,wme=Math.floor,Xp=function(t,i){var e=t.length,r=wme(e/2);return e<8?_me(t,i):Eme(t,Xp(n_(t,0,r),i),Xp(n_(t,r),i),i)},_me=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},Eme=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},Sme=Xp,Ome=Lo,i_=Ome.match(/firefox\/(\d+)/i),Tme=!!i_&&+i_[1],xme=Lo,Pme=/MSIE|Trident/.test(xme),kme=Lo,a_=kme.match(/AppleWebKit\/(\d+)\./),Ime=!!a_&&+a_[1],Cme=q,QP=ue,Ame=Qn,Rme=Nt,o_=ir,Dme=Px,s_=mr,Iy=se,Mme=Sme,Nme=fa,u_=Tme,Fme=Pme,l_=jo,c_=Ime,Xr=[],h_=QP(Xr.sort),Bme=QP(Xr.push),Lme=Iy(function(){Xr.sort(void 0)}),jme=Iy(function(){Xr.sort(null)}),zme=Nme("sort"),ZP=!Iy(function(){if(l_)return l_<70;if(!(u_&&u_>3)){if(Fme)return!0;if(c_)return c_<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"}}),Hme=Lme||!jme||!zme||!ZP,Wme=function(t){return function(i,e){return e===void 0?-1:i===void 0?1:t!==void 0?+t(i,e)||0:s_(i)>s_(e)?1:-1}};Cme({target:"Array",proto:!0,forced:Hme},{sort:function(i){i!==void 0&&Ame(i);var e=Rme(this);if(ZP)return i===void 0?h_(e):h_(e,i);var r=[],n=o_(e),a,o;for(o=0;o<n;o++)o in e&&Bme(r,e[o]);for(Mme(r,Wme(i)),a=o_(r),o=0;o<a;)e[o]=r[o++];for(;o<n;)Dme(e,o++);return e}});var Vme=rt,Ume=Vme("Array").sort,Gme=Ne,Kme=Ume,ed=Array.prototype,qme=function(t){var i=t.sort;return t===ed||Gme(ed,t)&&i===ed.sort?Kme:i},Yme=qme,Xme=Yme;(function(t){t.exports=Xme})(bme);var td=V(Yp),Qp={},Qme={get exports(){return Qp},set exports(t){Qp=t}},Zme=Qn,Jme=Nt,e$e=gl,t$e=ir,r$e=TypeError,d_=function(t){return function(i,e,r,n){Zme(e);var a=Jme(i),o=e$e(a),s=t$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 r$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}},n$e={left:d_(!1),right:d_(!0)},i$e=Fr,a$e=typeof process<"u"&&i$e(process)=="process",o$e=q,s$e=n$e.left,u$e=fa,f_=jo,l$e=a$e,c$e=!l$e&&f_>79&&f_<83,h$e=c$e||!u$e("reduce");o$e({target:"Array",proto:!0,forced:h$e},{reduce:function(i){var e=arguments.length;return s$e(this,i,e,e>1?arguments[1]:void 0)}});var d$e=rt,f$e=d$e("Array").reduce,v$e=Ne,p$e=f$e,rd=Array.prototype,g$e=function(t){var i=t.reduce;return t===rd||v$e(rd,t)&&i===rd.reduce?p$e:i},y$e=g$e,m$e=y$e;(function(t){t.exports=m$e})(Qme);var JP=V(Qp),ao={},$$e={get exports(){return ao},set exports(t){ao=t}},ek={};(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 m=s(p),y=s($),w=0;return m<y?(p*=o[y-m-1],$/=10,w=-1):m>y&&($*=o[m-y-1],p/=10,w=1),p===$?w: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,$,m,y){var w=$+1;if(w===m)return 1;if(y(p[w++],p[$])<0){for(;w<m&&y(p[w],p[w-1])<0;)w++;h(p,$,w)}else for(;w<m&&y(p[w],p[w-1])>=0;)w++;return w-$}function h(p,$,m){for(m--;$<m;){var y=p[$];p[$++]=p[m],p[m--]=y}}function d(p,$,m,y,w){for(y===$&&y++;y<m;y++){for(var S=p[y],T=$,O=y;T<O;){var _=T+O>>>1;w(S,p[_])<0?O=_:T=_+1}var E=y-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,$,m,y,w,S){var T=0,O=0,_=1;if(S(p,$[m+w])>0){for(O=y-w;_<O&&S(p,$[m+w+_])>0;)T=_,_=(_<<1)+1,_<=0&&(_=O);_>O&&(_=O),T+=w,_+=w}else{for(O=w+1;_<O&&S(p,$[m+w-_])<=0;)T=_,_=(_<<1)+1,_<=0&&(_=O);_>O&&(_=O);var E=T;T=w-_,_=w-E}for(T++;T<_;){var I=T+(_-T>>>1);S(p,$[m+I])>0?T=I+1:_=I}return _}function v(p,$,m,y,w,S){var T=0,O=0,_=1;if(S(p,$[m+w])<0){for(O=w+1;_<O&&S(p,$[m+w-_])<0;)T=_,_=(_<<1)+1,_<=0&&(_=O);_>O&&(_=O);var E=T;T=w-_,_=w-E}else{for(O=y-w;_<O&&S(p,$[m+w+_])>=0;)T=_,_=(_<<1)+1,_<=0&&(_=O);_>O&&(_=O),T+=w,_+=w}for(T++;T<_;){var I=T+(_-T>>>1);S(p,$[m+I])<0?_=I:T=I+1}return _}var g=function(){function p($,m){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=m,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(m,y){this.runStart[this.stackSize]=m,this.runLength[this.stackSize]=y,this.stackSize+=1},p.prototype.mergeRuns=function(){for(;this.stackSize>1;){var m=this.stackSize-2;if(m>=1&&this.runLength[m-1]<=this.runLength[m]+this.runLength[m+1]||m>=2&&this.runLength[m-2]<=this.runLength[m]+this.runLength[m-1])this.runLength[m-1]<this.runLength[m+1]&&m--;else if(this.runLength[m]>this.runLength[m+1])break;this.mergeAt(m)}},p.prototype.forceMergeRuns=function(){for(;this.stackSize>1;){var m=this.stackSize-2;m>0&&this.runLength[m-1]<this.runLength[m+1]&&m--,this.mergeAt(m)}},p.prototype.mergeAt=function(m){var y=this.compare,w=this.array,S=this.runStart[m],T=this.runLength[m],O=this.runStart[m+1],_=this.runLength[m+1];this.runLength[m]=T+_,m===this.stackSize-3&&(this.runStart[m+1]=this.runStart[m+2],this.runLength[m+1]=this.runLength[m+2]),this.stackSize--;var E=v(w[O],w,S,T,0,y);S+=E,T-=E,T!==0&&(_=f(w[S+T-1],w,O,_,_-1,y),_!==0&&(T<=_?this.mergeLow(S,T,O,_):this.mergeHigh(S,T,O,_)))},p.prototype.mergeLow=function(m,y,w,S){var T=this.compare,O=this.array,_=this.tmp,E=0;for(E=0;E<y;E++)_[E]=O[m+E];var I=0,j=w,B=m;if(O[B++]=O[j++],--S===0){for(E=0;E<y;E++)O[B+E]=_[I+E];return}if(y===1){for(E=0;E<S;E++)O[B+E]=O[j+E];O[B+S]=_[I];return}for(var X=this.minGallop;;){var ne=0,re=0,le=!1;do if(T(O[j],_[I])<0){if(O[B++]=O[j++],re++,ne=0,--S===0){le=!0;break}}else if(O[B++]=_[I++],ne++,re=0,--y===1){le=!0;break}while((ne|re)<X);if(le)break;do{if(ne=v(O[j],_,I,y,0,T),ne!==0){for(E=0;E<ne;E++)O[B+E]=_[I+E];if(B+=ne,I+=ne,y-=ne,y<=1){le=!0;break}}if(O[B++]=O[j++],--S===0){le=!0;break}if(re=f(_[I],O,j,S,0,T),re!==0){for(E=0;E<re;E++)O[B+E]=O[j+E];if(B+=re,j+=re,S-=re,S===0){le=!0;break}}if(O[B++]=_[I++],--y===1){le=!0;break}X--}while(ne>=n||re>=n);if(le)break;X<0&&(X=0),X+=2}if(this.minGallop=X,X<1&&(this.minGallop=1),y===1){for(E=0;E<S;E++)O[B+E]=O[j+E];O[B+S]=_[I]}else{if(y===0)throw new Error("mergeLow preconditions were not respected");for(E=0;E<y;E++)O[B+E]=_[I+E]}},p.prototype.mergeHigh=function(m,y,w,S){var T=this.compare,O=this.array,_=this.tmp,E=0;for(E=0;E<S;E++)_[E]=O[w+E];var I=m+y-1,j=S-1,B=w+S-1,X=0,ne=0;if(O[B--]=O[I--],--y===0){for(X=B-(S-1),E=0;E<S;E++)O[X+E]=_[E];return}if(S===1){for(B-=y,I-=y,ne=B+1,X=I+1,E=y-1;E>=0;E--)O[ne+E]=O[X+E];O[B]=_[j];return}for(var re=this.minGallop;;){var le=0,we=0,Oe=!1;do if(T(_[j],O[I])<0){if(O[B--]=O[I--],le++,we=0,--y===0){Oe=!0;break}}else if(O[B--]=_[j--],we++,le=0,--S===1){Oe=!0;break}while((le|we)<re);if(Oe)break;do{if(le=y-v(_[j],O,m,y,y-1,T),le!==0){for(B-=le,I-=le,y-=le,ne=B+1,X=I+1,E=le-1;E>=0;E--)O[ne+E]=O[X+E];if(y===0){Oe=!0;break}}if(O[B--]=_[j--],--S===1){Oe=!0;break}if(we=S-f(O[I],_,0,S,S-1,T),we!==0){for(B-=we,j-=we,S-=we,ne=B+1,X=j+1,E=0;E<we;E++)O[ne+E]=_[X+E];if(S<=1){Oe=!0;break}}if(O[B--]=O[I--],--y===0){Oe=!0;break}re--}while(le>=n||we>=n);if(Oe)break;re<0&&(re=0),re+=2}if(this.minGallop=re,re<1&&(this.minGallop=1),S===1){for(B-=y,I-=y,ne=B+1,X=I+1,E=y-1;E>=0;E--)O[ne+E]=O[X+E];O[B]=_[j]}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]=_[E]}},p}();function b(p,$,m,y){if(!Array.isArray(p))throw new TypeError("Can only sort arrays");$?typeof $!="function"&&(y=m,m=$,$=u):$=u,m||(m=0),y||(y=p.length);var w=y-m;if(!(w<2)){var S=0;if(w<r){S=c(p,m,y,$),d(p,m,y,m+S,$);return}var T=new g(p,$),O=l(w);do{if(S=c(p,m,y,$),S<O){var _=w;_>O&&(_=O),d(p,m,m+_,m+S,$),S=_}T.pushRun(m,S),T.mergeRuns(),w-=S,m+=S}while(w!==0);T.forceMergeRuns()}}})})(ek);(function(t){t.exports=ek})($$e);var v_=V(ao);function tk(t){var i=b$e();return function(){var r=z(t),n;if(i){var a=z(this).constructor;n=P(r,arguments,a)}else n=r.apply(this,arguments);return pe(this,n)}}function b$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 rk=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}(),w$e=function(t){ce(e,t);var i=tk(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}(rk),_$e=function(t){ce(e,t);var i=tk(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}(rk),Zp={},E$e={get exports(){return Zp},set exports(t){Zp=t}},S$e=q,O$e=fn.every,T$e=fa,x$e=T$e("every");S$e({target:"Array",proto:!0,forced:!x$e},{every:function(i){return O$e(this,i,arguments.length>1?arguments[1]:void 0)}});var P$e=rt,k$e=P$e("Array").every,I$e=Ne,C$e=k$e,nd=Array.prototype,A$e=function(t){var i=t.every;return t===nd||I$e(nd,t)&&i===nd.every?C$e:i},R$e=A$e,D$e=R$e;(function(t){t.exports=D$e})(E$e);var nk=V(Zp);function M$e(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=N$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 N$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}function F$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 B$e(t){return ik(function(i){var e,r;return nk(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 L$e(t){return ik(function(i){var e,r;return nk(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 ik(t,i,e,r){var n,a=Rn(null),o=JP(n=lr(AP(r).call(r))).call(n,function(f,v){return f+1+v.edges.length},0),s=e+"Id",u=e==="to"?1:-1,l=M$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,m,y=function(){var T,O;if(!r.has(g))return"continue";var _=a[m.id]+u;if(ge(T=St(O=m.edges).call(O,function(E){return E.connected&&E.to!==E.from&&E[e]!==m&&r.has(E.toId)&&r.has(E.fromId)})).call(T,function(E){var I=E[s],j=a[I];(j==null||i(_,j))&&(a[I]=_,p.push(E[e]))}),$>o)return{v:{v:F$e(r,a)}};++$};m=p.pop();){var w=y();if(w!=="continue"&&he(w)==="object")return w.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 j$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}(),z$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"}},je(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(pa(["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 j$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 m=s(),y=0,w=0;w<m.length-1;w++){var S=m[w].max-m[w+1].min;y+=S+e.options.hierarchical.treeSpacing,o(w+1,y)}},o=function(m,y){var w=e.hierarchical.trees;for(var S in w)Object.prototype.hasOwnProperty.call(w,S)&&w[S]===m&&e.direction.shift(S,y)},s=function(){for(var m=[],y=0;y<e.hierarchical.numTrees();y++)m.push(e.direction.getTreeSize(y));return m},u=function $(m,y){if(!y[m.id]&&(y[m.id]=!0,e.hierarchical.childrenReference[m.id])){var w=e.hierarchical.childrenReference[m.id];if(w.length>0)for(var S=0;S<w.length;S++)$(e.body.nodes[w[S]],y)}},l=function(m){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,w=1e9,S=1e9,T=1e9,O=-1e9;for(var _ in m)if(Object.prototype.hasOwnProperty.call(m,_)){var E=e.body.nodes[_],I=e.hierarchical.levels[E.id],j=e.direction.getPosition(E),B=e._getSpaceAroundNode(E,m),X=xe(B,2),ne=X[0],re=X[1];w=Math.min(ne,w),S=Math.min(re,S),I<=y&&(T=Math.min(j,T),O=Math.max(j,O))}return[T,O,w,S]},c=function(m,y){var w=e.hierarchical.getMaxLevel(m.id),S=e.hierarchical.getMaxLevel(y.id);return Math.min(w,S)},h=function(m,y,w){for(var S=e.hierarchical,T=0;T<y.length;T++){var O=y[T],_=S.distributionOrdering[O];if(_.length>1)for(var E=0;E<_.length-1;E++){var I=_[E],j=_[E+1];S.hasSameParent(I,j)&&S.inSameSubNetwork(I,j)&&m(I,j,w)}}},d=function(m,y){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,S=e.direction.getPosition(m),T=e.direction.getPosition(y),O=Math.abs(T-S),_=e.options.hierarchical.nodeSpacing;if(O>_){var E={},I={};u(m,E),u(y,I);var j=c(m,y),B=l(E,j),X=l(I,j),ne=B[1],re=X[0],le=X[2],we=Math.abs(ne-re);if(we>_){var Oe=ne-re+_;Oe<-le+_&&(Oe=-le+_),Oe<0&&(e._shiftBlock(y.id,Oe),r=!0,w===!0&&e._centerParent(y))}}},f=function(m,y){for(var w=y.id,S=y.edges,T=e.hierarchical.levels[y.id],O=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,_={},E=[],I=0;I<S.length;I++){var j=S[I];if(j.toId!=j.fromId){var B=j.toId==w?j.from:j.to;_[S[I].id]=B,e.hierarchical.levels[B.id]<T&&E.push(j)}}var X=function(nt,_e){for(var Ae=0,R=0;R<_e.length;R++)if(_[_e[R].id]!==void 0){var k=e.direction.getPosition(_[_e[R].id])-nt;Ae+=k/Math.sqrt(k*k+O)}return Ae},ne=function(nt,_e){for(var Ae=0,R=0;R<_e.length;R++)if(_[_e[R].id]!==void 0){var k=e.direction.getPosition(_[_e[R].id])-nt;Ae-=O*Math.pow(k*k+O,-1.5)}return Ae},re=function(nt,_e){for(var Ae=e.direction.getPosition(y),R={},k=0;k<nt;k++){var D=X(Ae,_e),L=ne(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(nt){var _e=e.direction.getPosition(y);if(n[y.id]===void 0){var Ae={};u(y,Ae),n[y.id]=Ae}var R=l(n[y.id]),k=R[2],D=R[3],L=nt-_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(y.id,G),r=!0)},we=function(nt){var _e=e.direction.getPosition(y),Ae=e._getSpaceAroundNode(y),R=xe(Ae,2),k=R[0],D=R[1],L=nt-_e,G=_e;L>0?G=Math.min(_e+(D-e.options.hierarchical.nodeSpacing),nt):L<0&&(G=Math.max(_e-(k-e.options.hierarchical.nodeSpacing),nt)),G!==_e&&(e.direction.setPosition(y,G),r=!0)},Oe=re(m,E);le(Oe),Oe=re(m,S),we(Oe)},v=function(m){var y=e.hierarchical.getLevels();y=An(y).call(y);for(var w=0;w<m;w++){r=!1;for(var S=0;S<y.length;S++)for(var T=y[S],O=e.hierarchical.distributionOrdering[T],_=0;_<O.length;_++)f(1e3,O[_]);if(r!==!0)break}},g=function(m){var y=e.hierarchical.getLevels();y=An(y).call(y);for(var w=0;w<m&&(r=!1,h(d,y,!0),r===!0);w++);},b=function(){for(var m in e.body.nodes)Object.prototype.hasOwnProperty.call(e.body.nodes,m)&&e._centerParent(e.body.nodes[m])},p=function(){var m=e.hierarchical.getLevels();m=An(m).call(m);for(var y=0;y<m.length;y++)for(var w=m[y],S=e.hierarchical.distributionOrdering[w],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 te(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;te(n,function(o){var s=e.body.nodes[o],u=e._getActiveEdges(s).length;r[u]=!0});var a=[];return te(r,function(o){a.push(Number(o))}),td(v_).call(v_,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";te(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=JP(e=this.body.nodeIndices).call(e,function(a,o){return a.set(o,r.body.nodes[o]),a},new PP);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=L$e(n):this.hierarchical.levels=B$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 w$e(this):this.direction=new _$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 H$e(t,i){var e=typeof pn<"u"&&Br(t)||t["@@iterator"];if(!e){if(ve(t)||(e=W$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 W$e(t,i){var e;if(t){if(typeof t=="string")return g_(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 g_(t,i)}}function g_(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 V$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}},je(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){a._clean()}),this.body.emitter.on("_dataChanged",A(o=this._restore).call(o,this)),this.body.emitter.on("_resetData",A(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,A(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",A(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,A(r=this.toggleEditMode).call(r,this))}this._temporaryBindEvent("click",A(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,A(s=this.toggleEditMode).call(s,this))}this._temporaryBindUI("onTouch",A(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",A(r=this._finishConnect).call(r,this)),this._temporaryBindUI("onDrag",A(n=this._dragControlNode).call(n,this)),this._temporaryBindUI("onRelease",A(a=this._finishConnect).call(a,this)),this._temporaryBindUI("onDragStart",A(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,A(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",A(a=this._controlNodeTouch).call(a,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",A(o=this._controlNodeDragStart).call(o,this)),this._temporaryBindUI("onDrag",A(s=this._controlNodeDrag).call(s,this)),this._temporaryBindUI("onDragEnd",A(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,A(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=H$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,A(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,A(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,A(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,A(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,A(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,A(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 Ii(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=je({},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=je({},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",C="boolean",x="number",Pa="array",W="object",ak="dom",U$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:C,function:"function"},node:{boolean:C,function:"function"},__type__:{object:W,boolean:C}},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:C},y:{boolean:C},__type__:{object:W,boolean:C}},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:C,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:C,number:x}},hidden:{boolean:C},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:C},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:C},scaling:{min:{number:x},max:{number:x},label:{enabled:{boolean:C},min:{number:x},max:{number:x},maxVisible:{number:x},drawThreshold:{number:x},__type__:{object:W,boolean:C}},customScalingFunction:{function:"function"},__type__:{object:W}},shadow:{enabled:{boolean:C},color:{string:M},size:{number:x},x:{number:x},y:{number:x},__type__:{object:W,boolean:C}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:C,array:Pa},borderRadius:{number:x},interpolation:{boolean:C},useImageSize:{boolean:C},useBorderWithImage:{boolean:C},coordinateOrigin:{string:["center","top-left"]},__type__:{object:W}},size:{number:x},title:{string:M,dom:ak,undefined:"undefined"},value:{number:x,undefined:"undefined"},widthConstraint:{minimum:{number:x},maximum:{number:x},__type__:{object:W,boolean:C,number:x}},x:{number:x},y:{number:x},__type__:{object:W}},G$e={configure:{enabled:{boolean:C},filter:{boolean:C,string:M,array:Pa,function:"function"},container:{dom:ak},showButton:{boolean:C},__type__:{object:W,boolean:C,string:M,array:Pa,function:"function"}},edges:{arrows:{to:{enabled:{boolean:C},scaleFactor:{number:x},type:{string:id},imageHeight:{number:x},imageWidth:{number:x},src:{string:M},__type__:{object:W,boolean:C}},middle:{enabled:{boolean:C},scaleFactor:{number:x},type:{string:id},imageWidth:{number:x},imageHeight:{number:x},src:{string:M},__type__:{object:W,boolean:C}},from:{enabled:{boolean:C},scaleFactor:{number:x},type:{string:id},imageWidth:{number:x},imageHeight:{number:x},src:{string:M},__type__:{object:W,boolean:C}},__type__:{string:["from","to","middle"],object:W}},endPointOffset:{from:{number:x},to:{number:x},__type__:{object:W,number:x}},arrowStrikethrough:{boolean:C},background:{enabled:{boolean:C},color:{string:M},size:{number:x},dashes:{boolean:C,array:Pa},__type__:{object:W,boolean:C}},chosen:{label:{boolean:C,function:"function"},edge:{boolean:C,function:"function"},__type__:{object:W,boolean:C}},color:{color:{string:M},highlight:{string:M},hover:{string:M},inherit:{string:["from","to","both"],boolean:C},opacity:{number:x},__type__:{object:W,string:M}},dashes:{boolean:C,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:C,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:C},hoverWidth:{function:"function",number:x},label:{string:M,undefined:"undefined"},labelHighlightBold:{boolean:C},length:{number:x,undefined:"undefined"},physics:{boolean:C},scaling:{min:{number:x},max:{number:x},label:{enabled:{boolean:C},min:{number:x},max:{number:x},maxVisible:{number:x},drawThreshold:{number:x},__type__:{object:W,boolean:C}},customScalingFunction:{function:"function"},__type__:{object:W}},selectionWidth:{function:"function",number:x},selfReferenceSize:{number:x},selfReference:{size:{number:x},angle:{number:x},renderBehindTheNode:{boolean:C},__type__:{object:W}},shadow:{enabled:{boolean:C},color:{string:M},size:{number:x},x:{number:x},y:{number:x},__type__:{object:W,boolean:C}},smooth:{enabled:{boolean:C},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:x},forceDirection:{string:["horizontal","vertical","none"],boolean:C},__type__:{object:W,boolean:C}},title:{string:M,undefined:"undefined"},width:{number:x},widthConstraint:{maximum:{number:x},__type__:{object:W,boolean:C,number:x}},value:{number:x,undefined:"undefined"},__type__:{object:W}},groups:{useDefaultGroups:{boolean:C},__any__:ad,__type__:{object:W}},interaction:{dragNodes:{boolean:C},dragView:{boolean:C},hideEdgesOnDrag:{boolean:C},hideEdgesOnZoom:{boolean:C},hideNodesOnDrag:{boolean:C},hover:{boolean:C},keyboard:{enabled:{boolean:C},speed:{x:{number:x},y:{number:x},zoom:{number:x},__type__:{object:W}},bindToWindow:{boolean:C},autoFocus:{boolean:C},__type__:{object:W,boolean:C}},multiselect:{boolean:C},navigationButtons:{boolean:C},selectable:{boolean:C},selectConnectedEdges:{boolean:C},hoverConnectedEdges:{boolean:C},tooltipDelay:{number:x},zoomView:{boolean:C},zoomSpeed:{number:x},__type__:{object:W}},layout:{randomSeed:{undefined:"undefined",number:x,string:M},improvedLayout:{boolean:C},clusterThreshold:{number:x},hierarchical:{enabled:{boolean:C},levelSeparation:{number:x},nodeSpacing:{number:x},treeSpacing:{number:x},blockShifting:{boolean:C},edgeMinimization:{boolean:C},parentCentralization:{boolean:C},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:W,boolean:C}},__type__:{object:W}},manipulation:{enabled:{boolean:C},initiallyActive:{boolean:C},addNode:{boolean:C,function:"function"},addEdge:{boolean:C,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:W,boolean:C,function:"function"}},deleteNode:{boolean:C,function:"function"},deleteEdge:{boolean:C,function:"function"},controlNodeStyle:ad,__type__:{object:W,boolean:C}},nodes:ad,physics:{enabled:{boolean:C},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:C},iterations:{number:x},updateInterval:{number:x},onlyDynamicEdges:{boolean:C},fit:{boolean:C},__type__:{object:W,boolean:C}},timestep:{number:x},adaptiveTimestep:{boolean:C},wind:{x:{number:x},y:{number:x},__type__:{object:W}},__type__:{object:W,boolean:C}},autoResize:{boolean:C},clickToUse:{boolean:C},locale:{string:M},locales:{__any__:{any:U$e},__type__:{object:W}},height:{string:M},width:{string:M},__type__:{object:W}},ok={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]}}},K$e=function(i,e,r){var n;return!!(vr(i).call(i,"physics")&&vr(n=ok.physics.solver).call(n,e)&&r.physics.solver!==e&&e!=="wind")},q$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],m=a[$],y=p+1;y<f;y++){var w=r[y],S=a[w],T=Math.min(m[w],m[g]+b[w]);m[w]=T,S[$]=T}return a}}]),t}(),Y$e=function(){function t(i,e,r){N(this,t),this.body=i,this.springLength=e,this.springConstant=r,this.distanceSolver=new q$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 m=this._getEnergy(d),y=xe(m,3);g=y[0],f=y[1],v=y[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],m=f[g],y=1/Math.pow(Math.pow(c-b,2)+Math.pow(h-p,2),1.5);s+=$*(1-m*Math.pow(h-p,2)*y),u+=$*(m*(c-b)*(h-p)*y),l+=$*(1-m*Math.pow(c-b,2)*y)}}var w=s,S=u,T=r,O=l,_=n,E=(T/w+_/S)/(S/w-O/S),I=-(S*E+T)/w;o[e].x+=I,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,m=1/Math.sqrt(Math.pow(u-p,2)+Math.pow(l-$,2)),y=o[f]*(u-p-s[f]*(u-p)*m),w=o[f]*(l-$-s[f]*(l-$)*m);a[d]=[y,w],c+=y,h+=w;var S=this.E_sums[f];S[0]+=y-g,S[1]+=w-b}}this.E_sums[e]=[c,h]}}]),t}();function H(t,i,e){var r,n,a,o,s=this;if(!(this instanceof H))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:bhe,clickToUse:!1},je(this.options,this.defaultOptions),this.body={container:t,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:A(r=this.on).call(r,this),off:A(n=this.off).call(n,this),emit:A(a=this.emit).call(a,this),once:A(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 Ehe(function(){return s.body.emitter.emit("_requestRedraw")}),this.groups=new jde,this.canvas=new kye(this.body),this.selectionHandler=new $me(this.body,this.canvas),this.interactionHandler=new Mye(this.body,this.canvas,this.selectionHandler),this.view=new Cye(this.body,this.canvas),this.renderer=new Sye(this.body,this.canvas),this.physics=new vye(this.body),this.layoutEngine=new z$e(this.body),this.clustering=new _ye(this.body),this.manipulation=new V$e(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new Ype(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new iye(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new Y$e(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(e),this.setData(i)}cT(H.prototype);H.prototype.setOptions=function(t){var i=this;if(t===null&&(t=void 0),t!==void 0){var e=Qce.validate(t,G$e);e===!0&&console.error("%cErrors have been found in the supplied options object.",pP);var r=["locale","locales","clickToUse"];if(pa(r,this.options,t),t.locale!==void 0&&(t.locale=whe(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 Yce(this,this.body.container,ok,this.canvas.pixelRatio,K$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 qce(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")}};H.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)}};H.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")})};H.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=she(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=uhe(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")};H.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)};H.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)};H.prototype.isActive=function(){return!this.activator||this.activator.active};H.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};H.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};H.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};H.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};H.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};H.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};H.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};H.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};H.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};H.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};H.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};H.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};H.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};H.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};H.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};H.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};H.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};H.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};H.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};H.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};H.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};H.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};H.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};H.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};H.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};H.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};H.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};H.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};H.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};H.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};H.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)};H.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};H.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};H.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};H.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};H.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};H.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};H.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};H.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};H.prototype.getNodeAt=function(){var t=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return t!==void 0&&t.id!==void 0?t.id:t};H.prototype.getEdgeAt=function(){var t=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return t!==void 0&&t.id!==void 0?t.id:t};H.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};H.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};H.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};H.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};H.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};H.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};H.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};H.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};H.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};H.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};H.prototype.getOptionsFromConfigurator=function(){var t={};return this.configurator&&(t=this.configurator.getOptions.apply(this.configurator)),t};const X$e={flex:"~ gap-4 wrap","w-full":""},Q$e=ee("span",{op75:""},"Show pages",-1),Z$e=ee("span",{op75:""},"Show layouts",-1),J$e=ee("span",{op75:""},"Show workspace",-1),ebe=ee("span",{op75:""},"Show node_modules",-1),tbe=ee("span",{op75:""},"Show global components",-1),rbe=ee("div",{"i-carbon-close":""},null,-1),nbe=ee("div",{"flex-auto":""},null,-1),ibe={relative:"","h-full":"","w-full":""},abe=ee("div",{grid:"~ cols-[20px_1fr] items-center gap-y-1"},[ee("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-42b883":""}),ee("div",{op50:""}," Component "),ee("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-97c2fc":""}),ee("div",{op50:""}," Global Component "),ee("div",{"h-3":"","w-3":"","bg-hex-42b2b8":""}),ee("div",{op50:""}," Page "),ee("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 726 628","ml--1px":"","h-3":""},[ee("path",{fill:"#4256b8","stroke-width":"4",d:"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z"})]),ee("div",{op50:""}," Layout "),ee("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b4b842":""}),ee("div",{op50:""}," Library Component "),ee("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b86542":""}),ee("div",{op50:""}," Unknown ")],-1),obe={key:0,p4:"",pr10:"",pt4:"",flex:"~ col gap4"},sbe=Gi({__name:"ComponentsGraph",props:{components:{}},setup(t){const i=t,e=Sa(),r=Sa(),n=lk(),a=Sa(),o=ck(),s=hk(),u=dk(),l=Ok(),{componentsGraphShowNodeModules:c,componentsGraphShowGlobalComponents:h,componentsGraphShowPages:d,componentsGraphShowLayouts:f,componentsGraphShowWorkspace:v}=m_(),g=Sa(),b=rn(()=>{const m=l.value||[];if(g.value){let y=function(S){!S||w.has(S)||(w.add(S),S.deps.forEach(T=>{y(m.find(O=>O.id===T))}))};const w=new Set;return m.find(S=>S.id===a.value?.id),y(g.value),Array.from(w)}return m}),p=rn(()=>{const m=b.value.map(w=>{const S=i.components.find(j=>j.filePath===w.id),T=o.value?.find(j=>j.file===w.id),O=u.value?.find(j=>j.file===w.id),_=w.id.replace(/\?.*$/,"").replace(/\#.*$/,""),E=w.id.includes("/node_modules/")?"lib":S?S.global?"global":"user":O?"layout":T?"page":"unknown";if(!c.value&&E==="lib"||!d.value&&E==="page"||!f.value&&E==="layout"||!v.value&&E==="user"&&s.value&&!w.id.startsWith(s.value.rootDir)||!h.value&&E==="global")return null;const I=E==="layout"?"hexagon":E==="page"?"square":"dot";return{id:w.id,label:_.split("/").splice(-1)[0].replace(/\.\w+$/,""),group:E,shape:I,size:15+Math.min(w.deps.length/2,8),font:{color:n.value==="dark"?"white":"black"},color:g.value?.id===w.id?"#82c742":void 0,extra:{id:w.id,component:S,page:T,layout:O,relationship:w}}}).filter(w=>!!w),y=b.value.flatMap(w=>w.deps.map(S=>({from:w.id,to:S,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:m,edges:y}});fk(()=>{const m={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 H(e.value,p.value,m);y.on("click",w=>{const S=w.nodes?.[0],T=p.value.nodes?.find(O=>O.id===S)?.extra;T&&(a.value=T)}),vk(p,()=>{y.setData(p.value)})});function $(){g.value=a.value?.relationship,a.value=void 0}return(m,y)=>{const w=xk,S=$_,T=pk,O=S_,_=gk,E=Pk;return fe(),lt(Vr,null,[Be(S,{ref_key:"navbar",ref:r,absolute:"","left-0":"","right-0":"","top-0":""},{search:qe(()=>[ee("div",X$e,[Be(w,{modelValue:Z(d),"onUpdate:modelValue":y[0]||(y[0]=I=>pi(d)?d.value=I:null),n:"primary sm"},{default:qe(()=>[Q$e]),_:1},8,["modelValue"]),Be(w,{modelValue:Z(f),"onUpdate:modelValue":y[1]||(y[1]=I=>pi(f)?f.value=I:null),n:"primary sm"},{default:qe(()=>[Z$e]),_:1},8,["modelValue"]),Be(w,{modelValue:Z(v),"onUpdate:modelValue":y[2]||(y[2]=I=>pi(v)?v.value=I:null),n:"primary sm"},{default:qe(()=>[J$e]),_:1},8,["modelValue"]),Be(w,{modelValue:Z(c),"onUpdate:modelValue":y[3]||(y[3]=I=>pi(c)?c.value=I:null),n:"primary sm"},{default:qe(()=>[ebe]),_:1},8,["modelValue"]),Be(w,{modelValue:Z(h),"onUpdate:modelValue":y[4]||(y[4]=I=>pi(h)?h.value=I:null),n:"primary sm"},{default:qe(()=>[tbe]),_:1},8,["modelValue"])]),Z(g)?(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[5]||(y[5]=I=>g.value=void 0)},[ja(" Clear filter "),rbe])):Qt("",!0),nbe,Vu(m.$slots,"default")]),_:3},512),ee("div",ibe,[ee("div",{ref_key:"container",ref:e,"h-full":"","w-full":""},null,512),Be(T,{absolute:"","bottom-3":"","left-3":"","border-0":"",p2:"",px3:"","text-sm":"","glass-effect":""},{default:qe(()=>[abe]),_:1}),Be(E,{"model-value":!!(Z(a)&&Z(a).component),navbar:Z(r),"w-80":"",onClose:y[7]||(y[7]=I=>a.value=void 0)},{default:qe(()=>[Z(a)&&Z(a).component?(fe(),lt("div",obe,[Be(O,{component:Z(a).component},null,8,["component"]),ee("div",null,[Be(_,{n:"primary solid",onClick:y[6]||(y[6]=I=>$())},{default:qe(()=>[ja(" Filter to this component ")]),_:1})])])):Qt("",!0)]),_:1},8,["model-value","navbar"])])],64)}}}),ube={hover:"bg-active",class:"group",flex:"~ gap2","w-full":"","items-center":"",rounded:"",px2:"",py1:""},lbe={"hover:text-primary":""},cbe=Gi({__name:"ComponentItem",props:{component:{}},setup(t){const i=t,e=rn(()=>i.component.filePath||i.component.file||i.component.__file||"");return(r,n)=>{const a=E_,o=S_,s=yk("VDropdown"),u=b_,l=w_;return fe(),lt("div",ube,[Be(s,null,{popper:qe(()=>[Be(o,{component:r.component,p4:""},null,8,["component"])]),default:qe(()=>[ee("button",lbe,[Be(a,{component:r.component},null,8,["component"])])]),_:1}),r.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)])}}}),hbe={pl4:""},dbe=Gi({__name:"ComponentsList",props:{components:{}},setup(t){const i=t,e=Sa(""),r=rn(()=>new mk(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&&$k(h.filePath)){const d=bk(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=$_,u=cbe,l=kk,c=Ik;return fe(),lt(Vr,null,[Be(s,{search:Z(e),"onUpdate:search":o[0]||(o[0]=h=>pi(e)?e.value=h:null)},{actions:qe(()=>[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:qe(()=>[(fe(!0),lt(Vr,null,ga(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:qe(()=>[(fe(!0),lt(Vr,null,ga(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:qe(()=>[(fe(!0),lt(Vr,null,ga(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:qe(()=>[(fe(!0),lt(Vr,null,ga(Z(n).lib.entries(),([h,d])=>(fe(),lt("div",{key:h,"ml-2":""},[Be(c,{text:`${h} (${d.length})`,py1:"",op50:""},null,8,["text"]),ee("div",hbe,[(fe(!0),lt(Vr,null,ga(d,f=>(fe(),$t(u,{key:f.filePath,component:f},null,8,["component"]))),128))])]))),128))]),_:1},8,["open","description"])):Qt("",!0)],64)}}}),fbe={relative:"","h-full":"","of-auto":""},vbe={"flex-none":"",flex:"~ gap3"},Tbe=Gi({__name:"components",setup(t){const i=wk(),e=Tk(),{componentsView:r}=m_();function n(){i.value?.inspector?.instance&&i.value.inspector.enable()}function a(){r.value=r.value==="list"?"graph":"list"}return(o,s)=>{const u=y_,l=Nk,c=Sk,h=_k("tooltip");return fe(),lt(Vr,null,[ee("div",fbe,[(fe(),$t(Ek(Z(r)==="list"?dbe:sbe),{components:Z(e)},{default:qe(()=>[ee("div",vbe,[Cy(Be(u,{"text-lg":"",icon:Z(r)==="graph"?"i-carbon-list":"i-carbon-network-4",title:"Toggle view",onClick:a},null,8,["icon"]),[[h,"Toggle View",void 0,{"bottom-end":!0}]]),Z(i)?.inspector?.instance?Cy((fe(),$t(u,{key:0,"text-lg":"",icon:"i-tabler-focus-2",title:"Inspect Vue components",onClick:n},null,512)),[[h,"Inspect Vue components",void 0,{"bottom-end":!0}]]):Qt("",!0)])]),_:1},8,["components"]))]),Be(c,null,{default:qe(()=>[Be(l)]),_:1})],64)}}});export{Tbe as default};