@nuxt/devtools 0.7.5 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist/chunks/module-main.mjs +36 -20
  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.809c442f.js → Badge.73590739.js} +1 -1
  8. package/dist/client/_nuxt/{CodeDiff.vue.1cd1f35a.js → CodeDiff.vue.5bc59452.js} +1 -1
  9. package/dist/client/_nuxt/{ComposableItem.vue.a490c449.js → ComposableItem.vue.b891778e.js} +1 -1
  10. package/dist/client/_nuxt/{DataSchemaButton.vue.31fe918d.js → DataSchemaButton.vue.58aa4fbb.js} +1 -1
  11. package/dist/client/_nuxt/{DataSchemaDrawer.7a8538ed.js → DataSchemaDrawer.b54a9c8c.js} +1 -1
  12. package/dist/client/_nuxt/{DrawerRight.vue.3bbd0e76.js → DrawerRight.vue.462f9048.js} +1 -1
  13. package/dist/client/_nuxt/{DurationDisplay.vue.1533a045.js → DurationDisplay.vue.281ea057.js} +1 -1
  14. package/dist/client/_nuxt/{FilepathItem.vue.a9853d6c.js → FilepathItem.vue.3d85c8b7.js} +1 -1
  15. package/dist/client/_nuxt/{HelpFab.vue.5d67494b.js → HelpFab.vue.7e36821f.js} +1 -1
  16. package/dist/client/_nuxt/LaunchPage.vue.fd74a96c.js +1 -0
  17. package/dist/client/_nuxt/{NCheckbox.vue.76b79ec0.js → NCheckbox.vue.1ddacd54.js} +1 -1
  18. package/dist/client/_nuxt/{NCodeBlock.vue.a8601f10.js → NCodeBlock.vue.31f18b3e.js} +1 -1
  19. package/dist/client/_nuxt/{NDropdown.vue.c183f72d.js → NDropdown.vue.ba86ab23.js} +1 -1
  20. package/dist/client/_nuxt/{NIconTitle.vue.e492e44a.js → NIconTitle.vue.9acdbad1.js} +1 -1
  21. package/dist/client/_nuxt/{NLink.vue.e00535a9.js → NLink.vue.a8242afb.js} +1 -1
  22. package/dist/client/_nuxt/{NMarkdown.vue.7d7a1e6e.js → NMarkdown.vue.12b1eecd.js} +1 -1
  23. package/dist/client/_nuxt/{NSectionBlock.6778ba18.js → NSectionBlock.00736ab5.js} +1 -1
  24. package/dist/client/_nuxt/NSelect.vue.d378258a.js +1 -0
  25. package/dist/client/_nuxt/NSelectTabs.vue.515b8214.js +1 -0
  26. package/dist/client/_nuxt/{NSwitch.vue.855c3f98.js → NSwitch.vue.8201d15e.js} +1 -1
  27. package/dist/client/_nuxt/{NTip.vue.6bf7cf97.js → NTip.vue.8812abb8.js} +1 -1
  28. package/dist/client/_nuxt/{Navbar.vue.c8f5ea35.js → Navbar.vue.c509e5d2.js} +1 -1
  29. package/dist/client/_nuxt/{StateEditor.vue.082de4fa.js → StateEditor.vue.2dfb9208.js} +1 -1
  30. package/dist/client/_nuxt/{__blank.8beed58c.js → __blank.6f88f9ac.js} +1 -1
  31. package/dist/client/_nuxt/{analyze-build.88782d48.js → analyze-build.ad9015ef.js} +1 -1
  32. package/dist/client/_nuxt/assets.d0e2ffb5.js +16 -0
  33. package/dist/client/_nuxt/{client.fbe3eaa6.js → client.237dd3ea.js} +1 -1
  34. package/dist/client/_nuxt/{components.99398ea7.js → components.5d298b86.js} +32 -32
  35. package/dist/client/_nuxt/custom-_name_.6bfb7c0f.js +1 -0
  36. package/dist/client/_nuxt/{default.2ae1a40e.js → default.f2c7ccc5.js} +1 -1
  37. package/dist/client/_nuxt/entry.582098fc.css +1 -0
  38. package/dist/client/_nuxt/{entry.704683a1.js → entry.d12f745d.js} +8 -8
  39. package/dist/client/_nuxt/{error-404.bde0cadd.js → error-404.ed94fa51.js} +1 -1
  40. package/dist/client/_nuxt/{error-500.524ae368.js → error-500.7606b55d.js} +1 -1
  41. package/dist/client/_nuxt/{full.6451054a.js → full.69c969de.js} +1 -1
  42. package/dist/client/_nuxt/{hooks.d1ff16ee.js → hooks.2100ca5d.js} +1 -1
  43. package/dist/client/_nuxt/imports.cb581504.js +1 -0
  44. package/dist/client/_nuxt/{index.2ab6466f.js → index.0d56c910.js} +1 -1
  45. package/dist/client/_nuxt/{index.ef0631d4.js → index.f204f87e.js} +1 -1
  46. package/dist/client/_nuxt/{json-editor-vue.d2d6ca22.js → json-editor-vue.ddceb6bb.js} +1 -1
  47. package/dist/client/_nuxt/{middleware.c86c494b.js → middleware.688539e5.js} +1 -1
  48. package/dist/client/_nuxt/{modules.e419f21a.js → modules.bd62827c.js} +2 -2
  49. package/dist/client/_nuxt/{none.bdacb36e.js → none.1af6e0ee.js} +1 -1
  50. package/dist/client/_nuxt/{open-graph.ae9112ee.js → open-graph.11338a0a.js} +2 -2
  51. package/dist/client/_nuxt/overview.94507b31.js +1 -0
  52. package/dist/client/_nuxt/{pages.f4173ed6.js → pages.e761585a.js} +1 -1
  53. package/dist/client/_nuxt/payload.6d63ca94.js +1 -0
  54. package/dist/client/_nuxt/{plugins.192ab129.js → plugins.37532eb5.js} +1 -1
  55. package/dist/client/_nuxt/runtime-configs.5354fdd6.js +1 -0
  56. package/dist/client/_nuxt/server-routes.6fd21992.js +9 -0
  57. package/dist/client/_nuxt/settings.5fe86309.js +1 -0
  58. package/dist/client/_nuxt/{state-components.eea2cf71.js → state-components.7bf3566d.js} +1 -1
  59. package/dist/client/_nuxt/{state-modules.8cc9b26b.js → state-modules.065d01b4.js} +1 -1
  60. package/dist/client/_nuxt/storage-options.f9b1696b.js +1 -0
  61. package/dist/client/_nuxt/{storage.7aca7890.js → storage.228d88e2.js} +1 -1
  62. package/dist/client/_nuxt/{terminals.b71c30e6.js → terminals.0377de90.js} +1 -1
  63. package/dist/client/_nuxt/{timeline.32019995.js → timeline.e89330f3.js} +3 -3
  64. package/dist/client/_nuxt/unocss-runtime.a5ba4c7b.js +2 -0
  65. package/dist/client/_nuxt/{virtual-files.2f2a88f3.js → virtual-files.1f7c68a1.js} +1 -1
  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/{global-ea55645c.d.ts → global-2a48a9e5.d.ts} +5 -1
  87. package/dist/module.d.ts +1 -1
  88. package/dist/module.json +1 -1
  89. package/dist/module.mjs +1 -1
  90. package/dist/runtime/function-metrics-helpers.mjs +17 -12
  91. package/dist/runtime/plugins/devtools.client.mjs +6 -1
  92. package/dist/runtime/plugins/view/FrameBox.vue +1 -1
  93. package/dist/runtime/plugins/view/Main.vue +4 -4
  94. package/dist/runtime/plugins/view/client.mjs +64 -44
  95. package/dist/runtime/use-nuxt-devtools.d.ts +8 -0
  96. package/dist/runtime/use-nuxt-devtools.mjs +23 -0
  97. package/dist/shared/{devtools.c34e61ba.mjs → devtools.6d7e3a3a.mjs} +3 -0
  98. package/dist/types.d.ts +1 -1
  99. package/package.json +11 -11
  100. package/dist/client/_nuxt/CodeSnippets.vue.e2cc365d.js +0 -1
  101. package/dist/client/_nuxt/LaunchPage.vue.304a6918.js +0 -1
  102. package/dist/client/_nuxt/NSelect.vue.6e592a84.js +0 -1
  103. package/dist/client/_nuxt/assets.dec2c564.js +0 -16
  104. package/dist/client/_nuxt/custom-_name_.53810490.js +0 -1
  105. package/dist/client/_nuxt/entry.6293ec9a.css +0 -1
  106. package/dist/client/_nuxt/imports.9142e1cd.js +0 -1
  107. package/dist/client/_nuxt/overview.b36ec18b.js +0 -1
  108. package/dist/client/_nuxt/payload.8138f0c2.js +0 -1
  109. package/dist/client/_nuxt/runtime-configs.399a5d6f.js +0 -1
  110. package/dist/client/_nuxt/server-routes.a3646010.js +0 -9
  111. package/dist/client/_nuxt/settings.2dfbccf3.js +0 -1
  112. package/dist/client/_nuxt/unocss-runtime.0935bd38.js +0 -2
@@ -1,4 +1,4 @@
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,ad as lk,ae as ck,a7 as hk,af as dk,ag as fk,w as vk,j as qe,F as Vr,ah as m_,ai as pk,l as pi,C as gk,aj as yk,ab as mk,ak as $k,al as bk,n as ga,am as wk,a9 as _k,an as Ek,H as Cy}from"./entry.704683a1.js";import{_ as Sk}from"./HelpFab.vue.5d67494b.js";import{u as Ok,a as Tk}from"./state-components.eea2cf71.js";import{_ as xk}from"./NCheckbox.vue.76b79ec0.js";import{_ as $_}from"./Navbar.vue.c8f5ea35.js";import{_ as b_}from"./Badge.809c442f.js";import{_ as w_}from"./FilepathItem.vue.a9853d6c.js";import{_ as Pk}from"./DrawerRight.vue.3bbd0e76.js";import{_ as kk}from"./NSectionBlock.6778ba18.js";import{_ as Ik}from"./NIconTitle.vue.e492e44a.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")])}}});/**
1
+ import{o as te,m as Pe,k as Z,v as ja,d as qi,a as Zt,t as du,f as X,e as lk,i as Te,h as lt,p as ct,F as cr,n as _n,a5 as Gu,_ as $_,r as mi,af as ck,ag as hk,a7 as dk,ah as fk,ai as vk,w as pk,j as Ge,aj as b_,ak as gk,l as En,C as yk,al as mk,E as $k,am as bk,ad as wk,an as _k,ao as Ek,ap as us,a0 as Sk,aq as Ok,a9 as Tk,ar as xk,H as Ry}from"./entry.d12f745d.js";import{_ as Pk}from"./HelpFab.vue.7e36821f.js";import{u as kk,a as Ik}from"./state-components.7bf3566d.js";import{_ as Ck}from"./NCheckbox.vue.1ddacd54.js";import{_ as w_}from"./Navbar.vue.c509e5d2.js";import{_ as __}from"./Badge.73590739.js";import{_ as E_}from"./FilepathItem.vue.3d85c8b7.js";import{_ as Ak}from"./DrawerRight.vue.462f9048.js";import{_ as Rk}from"./NSelectTabs.vue.515b8214.js";import{_ as Dk}from"./NSectionBlock.00736ab5.js";import{_ as Mk}from"./NIconTitle.vue.9acdbad1.js";import{D as Hl}from"./constants.4e5eba24.js";const Nk={class:"markdown-body"},Fk=Z("h1",null,"Components",-1),Bk=Z("p",null,[ja("Vue components under the "),Z("code",null,"components/"),ja(" directory are automatically registered and can be used in your templates without importing them.")],-1),Lk=Z("p",null,[Z("a",{href:"https://nuxt.com/docs/guide/directory-structure/components",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),jk=[Fk,Bk,Lk],zk={__name:"components",setup(t,{expose:i}){return i({frontmatter:{}}),(r,n)=>(te(),Pe("div",Nk,jk))}},Hk=/\d/,Wk=["-","_","/","."];function Vk(t=""){if(!Hk.test(t))return t.toUpperCase()===t}function Uk(t,i){const e=i??Wk,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=Vk(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 Gk(t){return t?t[0].toUpperCase()+t.slice(1):""}function S_(t){return t?(Array.isArray(t)?t:Uk(t)).map(i=>Gk(i)).join(""):""}const Kk={"text-sm":"","font-mono":""},qk=Z("span",{mr1:"",op20:""},"<",-1),Yk=Z("span",{ml1:"",op20:""},"/>",-1),O_=qi({__name:"ComponentName",props:{component:{}},setup(t){const i=t,e=Zt(()=>i.component.pascalName||S_(i.component.name||i.component.__name||i.component.kebabName||""));return(r,n)=>(te(),Pe("code",Kk,[qk,ja(du(X(e)),1),Yk]))}}),Xk={flex:"~ col gap1","items-start":"","of-hidden":""},Qk={flex:"~ gap2",px3:""},Zk={px3:"",pb2:""},Jk={key:0,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},eI={"text-sm":""},tI={"text-primary":""},rI=Z("span",{op50:""}," references",-1),nI={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},iI={key:1,border:"t base","max-h-60":"","w-full":"","of-auto":"",px3:"",py3:""},aI={"text-sm":""},oI={"text-primary":""},sI=Z("span",{op50:""}," dependencies",-1),uI={key:0,flex:"~ col gap-2","items-start":"",pt3:"","text-sm":"",op75:""},T_=qi({__name:"ComponentDetails",props:{component:{},dependencies:{},dependents:{}},setup(t){const i=t,e=Zt(()=>i.component.pascalName||S_(i.component.name||i.component.__name||i.component.kebabName||"")),r=Zt(()=>i.component.filePath||i.component.file||i.component.__file||""),n=lk();return(a,o)=>{const s=O_,u=$_,l=__,c=E_;return te(),Pe("div",Xk,[Z("div",Qk,[Te(s,{component:a.component},null,8,["component"]),Te(u,{title:"Copy name","flex-none":"",icon:"carbon-copy",onClick:o[0]||(o[0]=h=>X(n)(`<${X(e)}></${X(e)}>`))}),a.component.global?(te(),lt(l,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"runtime"})):ct("",!0)]),Z("div",Zk,[X(r)?(te(),lt(c,{key:0,filepath:X(r),"w-full":"","text-sm":"",op40:"","group-hover:op75":""},null,8,["filepath"])):ct("",!0)]),a.dependents?(te(),Pe("div",Jk,[Z("div",eI,[Z("strong",tI,du(a.dependents.length),1),rI]),a.dependents.length?(te(),Pe("div",nI,[(te(!0),Pe(cr,null,_n(a.dependents,h=>(te(),lt(c,{key:h,filepath:h},null,8,["filepath"]))),128))])):ct("",!0)])):ct("",!0),a.dependencies?(te(),Pe("div",iI,[Z("div",aI,[Z("strong",oI,du(a.dependencies.length),1),sI]),a.dependencies.length?(te(),Pe("div",uI,[(te(!0),Pe(cr,null,_n(a.dependencies,h=>(te(),lt(c,{key:h,filepath:h},null,8,["filepath"]))),128))])):ct("",!0)])):ct("",!0),Gu(a.$slots,"default")])}}});/**
2
2
  * vis-data
3
3
  * http://visjs.org/
4
4
  *
@@ -22,20 +22,20 @@ 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
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 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
25
+ */function Ku(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}var Dy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function J(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fu={},lI={get exports(){return fu},set exports(t){fu=t}},ud={},cI={get exports(){return ud},set exports(t){ud=t}},ld={},hI={get exports(){return ld},set exports(t){ld=t}},ls=function(t){return t&&t.Math==Math&&t},Ie=ls(typeof globalThis=="object"&&globalThis)||ls(typeof window=="object"&&window)||ls(typeof self=="object"&&self)||ls(typeof Dy=="object"&&Dy)||function(){return this}()||Function("return this")(),se=function(t){try{return!!t()}catch{return!0}},dI=se,oo=!dI(function(){var t=function(){}.bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),fI=oo,x_=Function.prototype,My=x_.apply,Ny=x_.call,Yi=typeof Reflect=="object"&&Reflect.apply||(fI?Ny.bind(My):function(){return Ny.apply(My,arguments)}),P_=oo,k_=Function.prototype,cd=k_.call,vI=P_&&k_.bind.bind(cd,cd),fe=P_?vI:function(t){return function(){return cd.apply(t,arguments)}},I_=fe,pI=I_({}.toString),gI=I_("".slice),Mr=function(t){return gI(pI(t),8,-1)},yI=Mr,mI=fe,tg=function(t){if(yI(t)==="Function")return mI(t)},hd=typeof document=="object"&&document.all,$I=typeof hd>"u"&&hd!==void 0,C_={all:hd,IS_HTMLDDA:$I},A_=C_,bI=A_.all,Ce=A_.IS_HTMLDDA?function(t){return typeof t=="function"||t===bI}:function(t){return typeof t=="function"},Kn={},wI=se,Ke=!wI(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),_I=oo,cs=Function.prototype.call,Ze=_I?cs.bind(cs):function(){return cs.apply(cs,arguments)},so={},R_={}.propertyIsEnumerable,D_=Object.getOwnPropertyDescriptor,EI=D_&&!R_.call({1:2},1);so.f=EI?function(i){var e=D_(this,i);return!!e&&e.enumerable}:R_;var qn=function(t,i){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:i}},SI=fe,OI=se,TI=Mr,Wl=Object,xI=SI("".split),qu=OI(function(){return!Wl("z").propertyIsEnumerable(0)})?function(t){return TI(t)=="String"?xI(t,""):Wl(t)}:Wl,uo=function(t){return t==null},PI=uo,kI=TypeError,lo=function(t){if(PI(t))throw kI("Can't call method on "+t);return t},II=qu,CI=lo,nr=function(t){return II(CI(t))},Fy=Ce,M_=C_,AI=M_.all,Je=M_.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:Fy(t)||t===AI}:function(t){return typeof t=="object"?t!==null:Fy(t)},ye={},Vl=ye,Ul=Ie,RI=Ce,By=function(t){return RI(t)?t:void 0},yt=function(t,i){return arguments.length<2?By(Vl[t])||By(Ul[t]):Vl[t]&&Vl[t][i]||Ul[t]&&Ul[t][i]},DI=fe,Ee=DI({}.isPrototypeOf),cn=typeof navigator<"u"&&String(navigator.userAgent)||"",N_=Ie,Gl=cn,Ly=N_.process,jy=N_.Deno,zy=Ly&&Ly.versions||jy&&jy.version,Hy=zy&&zy.v8,qt,vu;Hy&&(qt=Hy.split("."),vu=qt[0]>0&&qt[0]<4?1:+(qt[0]+qt[1]));!vu&&Gl&&(qt=Gl.match(/Edge\/(\d+)/),(!qt||qt[1]>=74)&&(qt=Gl.match(/Chrome\/(\d+)/),qt&&(vu=+qt[1])));var Xi=vu,Wy=Xi,MI=se,Qi=!!Object.getOwnPropertySymbols&&!MI(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Wy&&Wy<41}),NI=Qi,F_=NI&&!Symbol.sham&&typeof Symbol.iterator=="symbol",FI=yt,BI=Ce,LI=Ee,jI=F_,zI=Object,co=jI?function(t){return typeof t=="symbol"}:function(t){var i=FI("Symbol");return BI(i)&&LI(i.prototype,zI(t))},HI=String,Zi=function(t){try{return HI(t)}catch{return"Object"}},WI=Ce,VI=Zi,UI=TypeError,Pt=function(t){if(WI(t))return t;throw UI(VI(t)+" is not a function")},GI=Pt,KI=uo,rg=function(t,i){var e=t[i];return KI(e)?void 0:GI(e)},Kl=Ze,ql=Ce,Yl=Je,qI=TypeError,YI=function(t,i){var e,r;if(i==="string"&&ql(e=t.toString)&&!Yl(r=Kl(e,t))||ql(e=t.valueOf)&&!Yl(r=Kl(e,t))||i!=="string"&&ql(e=t.toString)&&!Yl(r=Kl(e,t)))return r;throw qI("Can't convert object to primitive value")},nn={},XI={get exports(){return nn},set exports(t){nn=t}},QI=!0,Vy=Ie,ZI=Object.defineProperty,JI=function(t,i){try{ZI(Vy,t,{value:i,configurable:!0,writable:!0})}catch{Vy[t]=i}return i},eC=Ie,tC=JI,Uy="__core-js_shared__",rC=eC[Uy]||tC(Uy,{}),ng=rC,Gy=ng;(XI.exports=function(t,i){return Gy[t]||(Gy[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 nC=lo,iC=Object,kt=function(t){return iC(nC(t))},aC=fe,oC=kt,sC=aC({}.hasOwnProperty),We=Object.hasOwn||function(i,e){return sC(oC(i),e)},uC=fe,lC=0,cC=Math.random(),hC=uC(1 .toString),Yu=function(t){return"Symbol("+(t===void 0?"":t)+")_"+hC(++lC+cC,36)},dC=Ie,fC=nn,Ky=We,vC=Yu,pC=Qi,gC=F_,$i=dC.Symbol,Xl=fC("wks"),yC=gC?$i.for||$i:$i&&$i.withoutSetter||vC,Se=function(t){return Ky(Xl,t)||(Xl[t]=pC&&Ky($i,t)?$i[t]:yC("Symbol."+t)),Xl[t]},mC=Ze,qy=Je,Yy=co,$C=rg,bC=YI,wC=Se,_C=TypeError,EC=wC("toPrimitive"),SC=function(t,i){if(!qy(t)||Yy(t))return t;var e=$C(t,EC),r;if(e){if(i===void 0&&(i="default"),r=mC(e,t,i),!qy(r)||Yy(r))return r;throw _C("Can't convert object to primitive value")}return i===void 0&&(i="number"),bC(t,i)},OC=SC,TC=co,Xu=function(t){var i=OC(t,"string");return TC(i)?i:i+""},xC=Ie,Xy=Je,dd=xC.document,PC=Xy(dd)&&Xy(dd.createElement),ig=function(t){return PC?dd.createElement(t):{}},kC=Ke,IC=se,CC=ig,B_=!kC&&!IC(function(){return Object.defineProperty(CC("div"),"a",{get:function(){return 7}}).a!=7}),AC=Ke,RC=Ze,DC=so,MC=qn,NC=nr,FC=Xu,BC=We,LC=B_,Qy=Object.getOwnPropertyDescriptor;Kn.f=AC?Qy:function(i,e){if(i=NC(i),e=FC(e),LC)try{return Qy(i,e)}catch{}if(BC(i,e))return MC(!RC(DC.f,i,e),i[e])};var jC=se,zC=Ce,HC=/#|\.prototype\./,ho=function(t,i){var e=VC[WC(t)];return e==GC?!0:e==UC?!1:zC(i)?jC(i):!!i},WC=ho.normalize=function(t){return String(t).replace(HC,".").toLowerCase()},VC=ho.data={},UC=ho.NATIVE="N",GC=ho.POLYFILL="P",L_=ho,Zy=tg,KC=Pt,qC=oo,YC=Zy(Zy.bind),hn=function(t,i){return KC(t),i===void 0?t:qC?YC(t,i):function(){return t.apply(i,arguments)}},Rt={},XC=Ke,QC=se,j_=XC&&QC(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),ZC=Je,JC=String,eA=TypeError,Dt=function(t){if(ZC(t))return t;throw eA(JC(t)+" is not an object")},tA=Ke,rA=B_,nA=j_,hs=Dt,Jy=Xu,iA=TypeError,Ql=Object.defineProperty,aA=Object.getOwnPropertyDescriptor,Zl="enumerable",Jl="configurable",ec="writable";Rt.f=tA?nA?function(i,e,r){if(hs(i),e=Jy(e),hs(r),typeof i=="function"&&e==="prototype"&&"value"in r&&ec in r&&!r[ec]){var n=aA(i,e);n&&n[ec]&&(i[e]=r.value,r={configurable:Jl in r?r[Jl]:n[Jl],enumerable:Zl in r?r[Zl]:n[Zl],writable:!1})}return Ql(i,e,r)}:Ql:function(i,e,r){if(hs(i),e=Jy(e),hs(r),rA)try{return Ql(i,e,r)}catch{}if("get"in r||"set"in r)throw iA("Accessors not supported");return"value"in r&&(i[e]=r.value),i};var oA=Ke,sA=Rt,uA=qn,Nr=oA?function(t,i,e){return sA.f(t,i,uA(1,e))}:function(t,i,e){return t[i]=e,t},ds=Ie,lA=Yi,cA=tg,hA=Ce,dA=Kn.f,fA=L_,oi=ye,vA=hn,si=Nr,em=We,pA=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 lA(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?ds:n?ds[e]:(ds[e]||{}).prototype,s=r?oi:oi[e]||si(oi,e,{})[e],u=s.prototype,l,c,h,d,f,v,p,b,g;for(d in i)l=fA(r?d:e+(n?".":"#")+d,t.forced),c=!l&&o&&em(o,d),v=s[d],c&&(t.dontCallGetSet?(g=dA(o,d),p=g&&g.value):p=o[d]),f=c&&p?p:i[d],!(c&&typeof v==typeof f)&&(t.bind&&c?b=vA(f,ds):t.wrap&&c?b=pA(f):a&&hA(f)?b=cA(f):b=f,(t.sham||f&&f.sham||v&&v.sham)&&si(b,"sham",!0),si(s,d,b),a&&(h=e+"Prototype",em(oi,h)||si(oi,h,{}),si(oi[h],d,f),t.real&&u&&(l||!u[d])&&si(u,d,f)))},gA=U,yA=Ke,tm=Rt.f;gA({target:"Object",stat:!0,forced:Object.defineProperty!==tm,sham:!yA},{defineProperty:tm});var mA=ye,z_=mA.Object,$A=hI.exports=function(i,e,r){return z_.defineProperty(i,e,r)};z_.defineProperty.sham&&($A.sham=!0);var bA=ld,H_=bA,wA=H_,_A=wA,EA=_A,SA=EA;(function(t){t.exports=SA})(cI);(function(t){t.exports=ud})(lI);var Qu=J(fu),za={},OA={get exports(){return za},set exports(t){za=t}},fd={},TA={get exports(){return fd},set exports(t){fd=t}},xA=Mr,dn=Array.isArray||function(i){return xA(i)=="Array"},PA=Math.ceil,kA=Math.floor,IA=Math.trunc||function(i){var e=+i;return(e>0?kA:PA)(e)},CA=IA,Zu=function(t){var i=+t;return i!==i||i===0?0:CA(i)},AA=Zu,RA=Math.min,DA=function(t){return t>0?RA(AA(t),9007199254740991):0},MA=DA,Mt=function(t){return MA(t.length)},NA=TypeError,FA=9007199254740991,ag=function(t){if(t>FA)throw NA("Maximum allowed index exceeded");return t},BA=Xu,LA=Rt,jA=qn,Ji=function(t,i,e){var r=BA(i);r in t?LA.f(t,r,jA(0,e)):t[r]=e},zA=Se,HA=zA("toStringTag"),W_={};W_[HA]="z";var og=String(W_)==="[object z]",WA=og,VA=Ce,qs=Mr,UA=Se,GA=UA("toStringTag"),KA=Object,qA=qs(function(){return arguments}())=="Arguments",YA=function(t,i){try{return t[i]}catch{}},Fr=WA?qs:function(t){var i,e,r;return t===void 0?"Undefined":t===null?"Null":typeof(e=YA(i=KA(t),GA))=="string"?e:qA?qs(i):(r=qs(i))=="Object"&&VA(i.callee)?"Arguments":r},XA=fe,QA=Ce,vd=ng,ZA=XA(Function.toString);QA(vd.inspectSource)||(vd.inspectSource=function(t){return ZA(t)});var V_=vd.inspectSource,JA=fe,eR=se,U_=Ce,tR=Fr,rR=yt,nR=V_,G_=function(){},iR=[],K_=rR("Reflect","construct"),sg=/^\s*(?:class|function)\b/,aR=JA(sg.exec),oR=!sg.exec(G_),ma=function(i){if(!U_(i))return!1;try{return K_(G_,iR,i),!0}catch{return!1}},q_=function(i){if(!U_(i))return!1;switch(tR(i)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return oR||!!aR(sg,nR(i))}catch{return!0}};q_.sham=!0;var Ju=!K_||eR(function(){var t;return ma(ma.call)||!ma(Object)||!ma(function(){t=!0})||t})?q_:ma,rm=dn,sR=Ju,uR=Je,lR=Se,cR=lR("species"),nm=Array,hR=function(t){var i;return rm(t)&&(i=t.constructor,sR(i)&&(i===nm||rm(i.prototype))?i=void 0:uR(i)&&(i=i[cR],i===null&&(i=void 0))),i===void 0?nm:i},dR=hR,el=function(t,i){return new(dR(t))(i===0?0:i)},fR=se,vR=Se,pR=Xi,gR=vR("species"),fo=function(t){return pR>=51||!fR(function(){var i=[],e=i.constructor={};return e[gR]=function(){return{foo:1}},i[t](Boolean).foo!==1})},yR=U,mR=se,$R=dn,bR=Je,wR=kt,_R=Mt,im=ag,am=Ji,ER=el,SR=fo,OR=Se,TR=Xi,Y_=OR("isConcatSpreadable"),xR=TR>=51||!mR(function(){var t=[];return t[Y_]=!1,t.concat()[0]!==t}),PR=function(t){if(!bR(t))return!1;var i=t[Y_];return i!==void 0?!!i:$R(t)},kR=!xR||!SR("concat");yR({target:"Array",proto:!0,arity:1,forced:kR},{concat:function(i){var e=wR(this),r=ER(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],PR(l))for(u=_R(l),im(n+u),o=0;o<u;o++,n++)o in l&&am(r,n,l[o]);else im(n+1),am(r,n++,l);return r.length=n,r}});var IR=Fr,CR=String,$r=function(t){if(IR(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return CR(t)},tl={},AR=Zu,RR=Math.max,DR=Math.min,vo=function(t,i){var e=AR(t);return e<0?RR(e+i,0):DR(e,i)},MR=nr,NR=vo,FR=Mt,om=function(t){return function(i,e,r){var n=MR(i),a=FR(n),o=NR(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}},ug={includes:om(!0),indexOf:om(!1)},po={},BR=fe,tc=We,LR=nr,jR=ug.indexOf,zR=po,sm=BR([].push),X_=function(t,i){var e=LR(t),r=0,n=[],a;for(a in e)!tc(zR,a)&&tc(e,a)&&sm(n,a);for(;i.length>r;)tc(e,a=i[r++])&&(~jR(n,a)||sm(n,a));return n},lg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],HR=X_,WR=lg,go=Object.keys||function(i){return HR(i,WR)},VR=Ke,UR=j_,GR=Rt,KR=Dt,qR=nr,YR=go;tl.f=VR&&!UR?Object.defineProperties:function(i,e){KR(i);for(var r=qR(e),n=YR(e),a=n.length,o=0,s;a>o;)GR.f(i,s=n[o++],r[s]);return i};var XR=yt,Q_=XR("document","documentElement"),QR=nn,ZR=Yu,um=QR("keys"),rl=function(t){return um[t]||(um[t]=ZR(t))},JR=Dt,eD=tl,lm=lg,tD=po,rD=Q_,nD=ig,iD=rl,cm=">",hm="<",pd="prototype",gd="script",Z_=iD("IE_PROTO"),rc=function(){},J_=function(t){return hm+gd+cm+t+hm+"/"+gd+cm},dm=function(t){t.write(J_("")),t.close();var i=t.parentWindow.Object;return t=null,i},aD=function(){var t=nD("iframe"),i="java"+gd+":",e;return t.style.display="none",rD.appendChild(t),t.src=String(i),e=t.contentWindow.document,e.open(),e.write(J_("document.F=Object")),e.close(),e.F},fs,Ys=function(){try{fs=new ActiveXObject("htmlfile")}catch{}Ys=typeof document<"u"?document.domain&&fs?dm(fs):aD():dm(fs);for(var t=lm.length;t--;)delete Ys[pd][lm[t]];return Ys()};tD[Z_]=!0;var Yn=Object.create||function(i,e){var r;return i!==null?(rc[pd]=JR(i),r=new rc,rc[pd]=null,r[Z_]=i):r=Ys(),e===void 0?r:eD.f(r,e)},yo={},oD=X_,sD=lg,uD=sD.concat("length","prototype");yo.f=Object.getOwnPropertyNames||function(i){return oD(i,uD)};var cg={},fm=vo,lD=Mt,cD=Ji,hD=Array,dD=Math.max,eE=function(t,i,e){for(var r=lD(t),n=fm(i,r),a=fm(e===void 0?r:e,r),o=hD(dD(a-n,0)),s=0;n<a;n++,s++)cD(o,s,t[n]);return o.length=s,o},fD=Mr,vD=nr,tE=yo.f,pD=eE,rE=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],gD=function(t){try{return tE(t)}catch{return pD(rE)}};cg.f=function(i){return rE&&fD(i)=="Window"?gD(i):tE(vD(i))};var mo={};mo.f=Object.getOwnPropertySymbols;var yD=Nr,ea=function(t,i,e,r){return r&&r.enumerable?t[i]=e:yD(t,i,e),t},mD=Rt,hg=function(t,i,e){return mD.f(t,i,e)},$o={},$D=Se;$o.f=$D;var vm=ye,bD=We,wD=$o,_D=Rt.f,Ae=function(t){var i=vm.Symbol||(vm.Symbol={});bD(i,t)||_D(i,t,{value:wD.f(t)})},ED=Ze,SD=yt,OD=Se,TD=ea,nE=function(){var t=SD("Symbol"),i=t&&t.prototype,e=i&&i.valueOf,r=OD("toPrimitive");i&&!i[r]&&TD(i,r,function(n){return ED(e,this)},{arity:1})},xD=og,PD=Fr,kD=xD?{}.toString:function(){return"[object "+PD(this)+"]"},ID=og,CD=Rt.f,AD=Nr,RD=We,DD=kD,MD=Se,pm=MD("toStringTag"),Xn=function(t,i,e,r){if(t){var n=e?t:t.prototype;RD(n,pm)||CD(n,pm,{configurable:!0,value:i}),r&&!ID&&AD(n,"toString",DD)}},ND=Ie,FD=Ce,gm=ND.WeakMap,BD=FD(gm)&&/native code/.test(String(gm)),LD=BD,iE=Ie,jD=Je,zD=Nr,nc=We,ic=ng,HD=rl,WD=po,ym="Object already initialized",yd=iE.TypeError,VD=iE.WeakMap,pu,Ha,gu,UD=function(t){return gu(t)?Ha(t):pu(t,{})},GD=function(t){return function(i){var e;if(!jD(i)||(e=Ha(i)).type!==t)throw yd("Incompatible receiver, "+t+" required");return e}};if(LD||ic.state){var sr=ic.state||(ic.state=new VD);sr.get=sr.get,sr.has=sr.has,sr.set=sr.set,pu=function(t,i){if(sr.has(t))throw yd(ym);return i.facade=t,sr.set(t,i),i},Ha=function(t){return sr.get(t)||{}},gu=function(t){return sr.has(t)}}else{var ui=HD("state");WD[ui]=!0,pu=function(t,i){if(nc(t,ui))throw yd(ym);return i.facade=t,zD(t,ui,i),i},Ha=function(t){return nc(t,ui)?t[ui]:{}},gu=function(t){return nc(t,ui)}}var ta={set:pu,get:Ha,has:gu,enforce:UD,getterFor:GD},KD=hn,qD=fe,YD=qu,XD=kt,QD=Mt,ZD=el,mm=qD([].push),Hr=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=XD(u),f=YD(d),v=KD(l,c),p=QD(f),b=0,g=h||ZD,y=i?g(u,p):e||o?g(u,0):void 0,$,m;p>b;b++)if((s||b in f)&&($=f[b],m=v($,b,d),t))if(i)y[b]=m;else if(m)switch(t){case 3:return!0;case 5:return $;case 6:return b;case 2:mm(y,$)}else switch(t){case 4:return!1;case 7:mm(y,$)}return a?-1:r||n?n:y}},ra={forEach:Hr(0),map:Hr(1),filter:Hr(2),some:Hr(3),every:Hr(4),find:Hr(5),findIndex:Hr(6),filterReject:Hr(7)},nl=U,dg=Ie,fg=Ze,JD=fe,Di=Ke,Mi=Qi,eM=se,Xe=We,tM=Ee,md=Dt,il=nr,vg=Xu,rM=$r,$d=qn,Wa=Yn,aE=go,nM=yo,oE=cg,iM=mo,sE=Kn,uE=Rt,aM=tl,lE=so,$m=ea,oM=hg,pg=nn,sM=rl,cE=po,bm=Yu,uM=Se,lM=$o,cM=Ae,hM=nE,dM=Xn,hE=ta,al=ra.forEach,_t=sM("hidden"),ol="Symbol",Va="prototype",fM=hE.set,wm=hE.getterFor(ol),Jt=Object[Va],In=dg.Symbol,Oa=In&&In[Va],vM=dg.TypeError,ac=dg.QObject,dE=sE.f,Sn=uE.f,fE=oE.f,pM=lE.f,vE=JD([].push),Cr=pg("symbols"),bo=pg("op-symbols"),gM=pg("wks"),bd=!ac||!ac[Va]||!ac[Va].findChild,wd=Di&&eM(function(){return Wa(Sn({},"a",{get:function(){return Sn(this,"a",{value:7}).a}})).a!=7})?function(t,i,e){var r=dE(Jt,i);r&&delete Jt[i],Sn(t,i,e),r&&t!==Jt&&Sn(Jt,i,r)}:Sn,oc=function(t,i){var e=Cr[t]=Wa(Oa);return fM(e,{type:ol,tag:t,description:i}),Di||(e.description=i),e},sl=function(i,e,r){i===Jt&&sl(bo,e,r),md(i);var n=vg(e);return md(r),Xe(Cr,n)?(r.enumerable?(Xe(i,_t)&&i[_t][n]&&(i[_t][n]=!1),r=Wa(r,{enumerable:$d(0,!1)})):(Xe(i,_t)||Sn(i,_t,$d(1,{})),i[_t][n]=!0),wd(i,n,r)):Sn(i,n,r)},gg=function(i,e){md(i);var r=il(e),n=aE(r).concat(mE(r));return al(n,function(a){(!Di||fg(pE,r,a))&&sl(i,a,r[a])}),i},yM=function(i,e){return e===void 0?Wa(i):gg(Wa(i),e)},pE=function(i){var e=vg(i),r=fg(pM,this,e);return this===Jt&&Xe(Cr,e)&&!Xe(bo,e)?!1:r||!Xe(this,e)||!Xe(Cr,e)||Xe(this,_t)&&this[_t][e]?r:!0},gE=function(i,e){var r=il(i),n=vg(e);if(!(r===Jt&&Xe(Cr,n)&&!Xe(bo,n))){var a=dE(r,n);return a&&Xe(Cr,n)&&!(Xe(r,_t)&&r[_t][n])&&(a.enumerable=!0),a}},yE=function(i){var e=fE(il(i)),r=[];return al(e,function(n){!Xe(Cr,n)&&!Xe(cE,n)&&vE(r,n)}),r},mE=function(t){var i=t===Jt,e=fE(i?bo:il(t)),r=[];return al(e,function(n){Xe(Cr,n)&&(!i||Xe(Jt,n))&&vE(r,Cr[n])}),r};Mi||(In=function(){if(tM(Oa,this))throw vM("Symbol is not a constructor");var i=!arguments.length||arguments[0]===void 0?void 0:rM(arguments[0]),e=bm(i),r=function(n){this===Jt&&fg(r,bo,n),Xe(this,_t)&&Xe(this[_t],e)&&(this[_t][e]=!1),wd(this,e,$d(1,n))};return Di&&bd&&wd(Jt,e,{configurable:!0,set:r}),oc(e,i)},Oa=In[Va],$m(Oa,"toString",function(){return wm(this).tag}),$m(In,"withoutSetter",function(t){return oc(bm(t),t)}),lE.f=pE,uE.f=sl,aM.f=gg,sE.f=gE,nM.f=oE.f=yE,iM.f=mE,lM.f=function(t){return oc(uM(t),t)},Di&&oM(Oa,"description",{configurable:!0,get:function(){return wm(this).description}}));nl({global:!0,constructor:!0,wrap:!0,forced:!Mi,sham:!Mi},{Symbol:In});al(aE(gM),function(t){cM(t)});nl({target:ol,stat:!0,forced:!Mi},{useSetter:function(){bd=!0},useSimple:function(){bd=!1}});nl({target:"Object",stat:!0,forced:!Mi,sham:!Di},{create:yM,defineProperty:sl,defineProperties:gg,getOwnPropertyDescriptor:gE});nl({target:"Object",stat:!0,forced:!Mi},{getOwnPropertyNames:yE});hM();dM(In,ol);cE[_t]=!0;var mM=Qi,$E=mM&&!!Symbol.for&&!!Symbol.keyFor,$M=U,bM=yt,wM=We,_M=$r,bE=nn,EM=$E,sc=bE("string-to-symbol-registry"),SM=bE("symbol-to-string-registry");$M({target:"Symbol",stat:!0,forced:!EM},{for:function(t){var i=_M(t);if(wM(sc,i))return sc[i];var e=bM("Symbol")(i);return sc[i]=e,SM[e]=i,e}});var OM=U,TM=We,xM=co,PM=Zi,kM=nn,IM=$E,_m=kM("symbol-to-string-registry");OM({target:"Symbol",stat:!0,forced:!IM},{keyFor:function(i){if(!xM(i))throw TypeError(PM(i)+" is not a symbol");if(TM(_m,i))return _m[i]}});var CM=fe,wo=CM([].slice),AM=fe,Em=dn,RM=Ce,Sm=Mr,DM=$r,Om=AM([].push),MM=function(t){if(RM(t))return t;if(Em(t)){for(var i=t.length,e=[],r=0;r<i;r++){var n=t[r];typeof n=="string"?Om(e,n):(typeof n=="number"||Sm(n)=="Number"||Sm(n)=="String")&&Om(e,DM(n))}var a=e.length,o=!0;return function(s,u){if(o)return o=!1,u;if(Em(this))return u;for(var l=0;l<a;l++)if(e[l]===s)return u}}},NM=U,wE=yt,_E=Yi,FM=Ze,_o=fe,EE=se,Tm=Ce,xm=co,SE=wo,BM=MM,LM=Qi,jM=String,Zr=wE("JSON","stringify"),vs=_o(/./.exec),Pm=_o("".charAt),zM=_o("".charCodeAt),HM=_o("".replace),WM=_o(1 .toString),VM=/[\uD800-\uDFFF]/g,km=/^[\uD800-\uDBFF]$/,Im=/^[\uDC00-\uDFFF]$/,Cm=!LM||EE(function(){var t=wE("Symbol")();return Zr([t])!="[null]"||Zr({a:t})!="{}"||Zr(Object(t))!="{}"}),Am=EE(function(){return Zr("\uDF06\uD834")!=='"\\udf06\\ud834"'||Zr("\uDEAD")!=='"\\udead"'}),UM=function(t,i){var e=SE(arguments),r=BM(i);if(!(!Tm(r)&&(t===void 0||xm(t))))return e[1]=function(n,a){if(Tm(r)&&(a=FM(r,this,jM(n),a)),!xm(a))return a},_E(Zr,null,e)},GM=function(t,i,e){var r=Pm(e,i-1),n=Pm(e,i+1);return vs(km,t)&&!vs(Im,n)||vs(Im,t)&&!vs(km,r)?"\\u"+WM(zM(t,0),16):t};Zr&&NM({target:"JSON",stat:!0,arity:3,forced:Cm||Am},{stringify:function(i,e,r){var n=SE(arguments),a=_E(Cm?UM:Zr,null,n);return Am&&typeof a=="string"?HM(a,VM,GM):a}});var KM=U,qM=Qi,YM=se,OE=mo,XM=kt,QM=!qM||YM(function(){OE.f(1)});KM({target:"Object",stat:!0,forced:QM},{getOwnPropertySymbols:function(i){var e=OE.f;return e?e(XM(i)):[]}});var ZM=Ae;ZM("asyncIterator");var JM=Ae;JM("hasInstance");var e2=Ae;e2("isConcatSpreadable");var t2=Ae;t2("iterator");var r2=Ae;r2("match");var n2=Ae;n2("matchAll");var i2=Ae;i2("replace");var a2=Ae;a2("search");var o2=Ae;o2("species");var s2=Ae;s2("split");var u2=Ae,l2=nE;u2("toPrimitive");l2();var c2=yt,h2=Ae,d2=Xn;h2("toStringTag");d2(c2("Symbol"),"Symbol");var f2=Ae;f2("unscopables");var v2=Ie,p2=Xn;p2(v2.JSON,"JSON",!0);var g2=ye,y2=g2.Symbol,na={},_d=Ke,m2=We,TE=Function.prototype,$2=_d&&Object.getOwnPropertyDescriptor,yg=m2(TE,"name"),b2=yg&&function(){}.name==="something",w2=yg&&(!_d||_d&&$2(TE,"name").configurable),xE={EXISTS:yg,PROPER:b2,CONFIGURABLE:w2},_2=se,PE=!_2(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),E2=We,S2=Ce,O2=kt,T2=rl,x2=PE,Rm=T2("IE_PROTO"),Ed=Object,P2=Ed.prototype,ul=x2?Ed.getPrototypeOf:function(t){var i=O2(t);if(E2(i,Rm))return i[Rm];var e=i.constructor;return S2(e)&&i instanceof e?e.prototype:i instanceof Ed?P2:null},k2=se,I2=Ce,C2=Je,A2=Yn,Dm=ul,R2=ea,D2=Se,Sd=D2("iterator"),kE=!1,_r,uc,lc;[].keys&&(lc=[].keys(),"next"in lc?(uc=Dm(Dm(lc)),uc!==Object.prototype&&(_r=uc)):kE=!0);var M2=!C2(_r)||k2(function(){var t={};return _r[Sd].call(t)!==t});M2?_r={}:_r=A2(_r);I2(_r[Sd])||R2(_r,Sd,function(){return this});var IE={IteratorPrototype:_r,BUGGY_SAFARI_ITERATORS:kE},N2=IE.IteratorPrototype,F2=Yn,B2=qn,L2=Xn,j2=na,z2=function(){return this},H2=function(t,i,e,r){var n=i+" Iterator";return t.prototype=F2(N2,{next:B2(+!r,e)}),L2(t,n,!1,!0),j2[n]=z2,t},W2=fe,V2=Pt,U2=function(t,i,e){try{return W2(V2(Object.getOwnPropertyDescriptor(t,i)[e]))}catch{}},G2=Ce,K2=String,q2=TypeError,Y2=function(t){if(typeof t=="object"||G2(t))return t;throw q2("Can't set "+K2(t)+" as a prototype")},X2=U2,Q2=Dt,Z2=Y2,CE=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,i={},e;try{e=X2(Object.prototype,"__proto__","set"),e(i,[]),t=i instanceof Array}catch{}return function(n,a){return Q2(n),Z2(a),t?e(n,a):n.__proto__=a,n}}():void 0),J2=U,eN=Ze,tN=xE,rN=H2,nN=ul,iN=Xn,Mm=ea,aN=Se,Nm=na,oN=IE,sN=tN.PROPER,ps=oN.BUGGY_SAFARI_ITERATORS,cc=aN("iterator"),Fm="keys",gs="values",Bm="entries",uN=function(){return this},mg=function(t,i,e,r,n,a,o){rN(e,i,r);var s=function(g){if(g===n&&d)return d;if(!ps&&g in c)return c[g];switch(g){case Fm:return function(){return new e(this,g)};case gs:return function(){return new e(this,g)};case Bm:return function(){return new e(this,g)}}return function(){return new e(this)}},u=i+" Iterator",l=!1,c=t.prototype,h=c[cc]||c["@@iterator"]||n&&c[n],d=!ps&&h||s(n),f=i=="Array"&&c.entries||h,v,p,b;if(f&&(v=nN(f.call(new t)),v!==Object.prototype&&v.next&&(iN(v,u,!0,!0),Nm[u]=uN)),sN&&n==gs&&h&&h.name!==gs&&(l=!0,d=function(){return eN(h,this)}),n)if(p={values:s(gs),keys:a?d:s(Fm),entries:s(Bm)},o)for(b in p)(ps||l||!(b in c))&&Mm(c,b,p[b]);else J2({target:i,proto:!0,forced:ps||l},p);return o&&c[cc]!==d&&Mm(c,cc,d,{name:n}),Nm[i]=d,p},$g=function(t,i){return{value:t,done:i}},lN=nr,Lm=na,AE=ta;Rt.f;var cN=mg,ys=$g,RE="Array Iterator",hN=AE.set,dN=AE.getterFor(RE);cN(Array,"Array",function(t,i){hN(this,{type:RE,target:lN(t),index:0,kind:i})},function(){var t=dN(this),i=t.target,e=t.kind,r=t.index++;return!i||r>=i.length?(t.target=void 0,ys(void 0,!0)):e=="keys"?ys(r,!1):e=="values"?ys(i[r],!1):ys([r,i[r]],!1)},"values");Lm.Arguments=Lm.Array;var fN={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},vN=fN,pN=Ie,gN=Fr,yN=Nr,jm=na,mN=Se,zm=mN("toStringTag");for(var hc in vN){var Hm=pN[hc],dc=Hm&&Hm.prototype;dc&&gN(dc)!==zm&&yN(dc,zm,hc),jm[hc]=jm.Array}var $N=y2,DE=$N,bN=Ae;bN("dispose");var wN=DE,_N=wN,EN=Ae;EN("asyncDispose");var SN=U,ON=yt,TN=fe,ME=ON("Symbol"),xN=ME.keyFor,PN=TN(ME.prototype.valueOf);SN({target:"Symbol",stat:!0},{isRegistered:function(i){try{return xN(PN(i))!==void 0}catch{return!1}}});var kN=U,IN=nn,NE=yt,CN=fe,AN=co,RN=Se,yu=NE("Symbol"),Wm=yu.isWellKnown,FE=NE("Object","getOwnPropertyNames"),DN=CN(yu.prototype.valueOf),Vm=IN("wks");for(var fc=0,Um=FE(yu),MN=Um.length;fc<MN;fc++)try{var Gm=Um[fc];AN(yu[Gm])&&RN(Gm)}catch{}kN({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(i){if(Wm&&Wm(i))return!0;try{for(var e=DN(i),r=0,n=FE(Vm),a=n.length;r<a;r++)if(Vm[n[r]]==e)return!0}catch{}return!1}});var NN=Ae;NN("matcher");var FN=Ae;FN("metadataKey");var BN=Ae;BN("observable");var LN=Ae;LN("metadata");var jN=Ae;jN("patternMatch");var zN=Ae;zN("replaceAll");var HN=_N,WN=HN;(function(t){t.exports=WN})(TA);(function(t){t.exports=fd})(OA);var bi=J(za),mu={},VN={get exports(){return mu},set exports(t){mu=t}},Od={},UN={get exports(){return Od},set exports(t){Od=t}},bg=fe,GN=Zu,KN=$r,qN=lo,YN=bg("".charAt),Km=bg("".charCodeAt),XN=bg("".slice),qm=function(t){return function(i,e){var r=KN(qN(i)),n=GN(e),a=r.length,o,s;return n<0||n>=a?t?"":void 0:(o=Km(r,n),o<55296||o>56319||n+1===a||(s=Km(r,n+1))<56320||s>57343?t?YN(r,n):o:t?XN(r,n,n+2):(o-55296<<10)+(s-56320)+65536)}},QN={codeAt:qm(!1),charAt:qm(!0)},ZN=QN.charAt,JN=$r,BE=ta,eF=mg,Ym=$g,LE="String Iterator",tF=BE.set,rF=BE.getterFor(LE);eF(String,"String",function(t){tF(this,{type:LE,string:JN(t),index:0})},function(){var i=rF(this),e=i.string,r=i.index,n;return r>=e.length?Ym(void 0,!0):(n=ZN(e,r),i.index+=n.length,Ym(n,!1))});var nF=$o,iF=nF.f("iterator"),aF=iF,jE=aF,oF=jE,sF=oF,uF=sF,lF=uF;(function(t){t.exports=lF})(UN);(function(t){t.exports=Od})(VN);var cF=J(mu);function st(t){"@babel/helpers - typeof";return st=typeof bi=="function"&&typeof cF=="symbol"?function(i){return typeof i}:function(i){return i&&typeof bi=="function"&&i.constructor===bi&&i!==bi.prototype?"symbol":typeof i},st(t)}var Td={},hF={get exports(){return Td},set exports(t){Td=t}},xd={},dF={get exports(){return xd},set exports(t){xd=t}},fF=$o,vF=fF.f("toPrimitive"),pF=vF,gF=pF,yF=gF,mF=yF,$F=mF,bF=$F;(function(t){t.exports=bF})(dF);(function(t){t.exports=xd})(hF);var wF=J(Td);function _F(t,i){if(st(t)!=="object"||t===null)return t;var e=t[wF];if(e!==void 0){var r=e.call(t,i||"default");if(st(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(t)}function zE(t){var i=_F(t,"string");return st(i)==="symbol"?i:String(i)}function Xm(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),Qu(t,zE(r.key),r)}}function ll(t,i,e){return i&&Xm(t.prototype,i),e&&Xm(t,e),Qu(t,"prototype",{writable:!1}),t}function Ne(t,i,e){return i=zE(i),i in t?Qu(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}var Pd={},EF={get exports(){return Pd},set exports(t){Pd=t}},HE=fe,SF=Pt,OF=Je,TF=We,Qm=wo,xF=oo,WE=Function,PF=HE([].concat),kF=HE([].join),vc={},IF=function(t,i,e){if(!TF(vc,i)){for(var r=[],n=0;n<i;n++)r[n]="a["+n+"]";vc[i]=WE("C,a","return new C("+kF(r,",")+")")}return vc[i](t,e)},VE=xF?WE.bind:function(i){var e=SF(this),r=e.prototype,n=Qm(arguments,1),a=function(){var s=PF(n,Qm(arguments));return this instanceof a?IF(e,s.length,s):e.apply(i,s)};return OF(r)&&(a.prototype=r),a},CF=U,Zm=VE;CF({target:"Function",proto:!0,forced:Function.bind!==Zm},{bind:Zm});var AF=ye,Ve=function(t){return AF[t+"Prototype"]},RF=Ve,DF=RF("Function").bind,MF=Ee,NF=DF,pc=Function.prototype,FF=function(t){var i=t.bind;return t===pc||MF(pc,t)&&i===pc.bind?NF:i},BF=FF,UE=BF;(function(t){t.exports=UE})(EF);var GE=J(Pd),kd={},LF={get exports(){return kd},set exports(t){kd=t}},jF=Pt,zF=kt,HF=qu,WF=Mt,VF=TypeError,Jm=function(t){return function(i,e,r,n){jF(e);var a=zF(i),o=HF(a),s=WF(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 VF("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}},UF={left:Jm(!1),right:Jm(!0)},GF=se,Eo=function(t,i){var e=[][t];return!!e&&GF(function(){e.call(null,i||function(){return 1},1)})},KF=Mr,So=typeof process<"u"&&KF(process)=="process",qF=U,YF=UF.left,XF=Eo,e$=Xi,QF=So,ZF=!QF&&e$>79&&e$<83,JF=ZF||!XF("reduce");qF({target:"Array",proto:!0,forced:JF},{reduce:function(i){var e=arguments.length;return YF(this,i,e,e>1?arguments[1]:void 0)}});var eB=Ve,tB=eB("Array").reduce,rB=Ee,nB=tB,gc=Array.prototype,iB=function(t){var i=t.reduce;return t===gc||rB(gc,t)&&i===gc.reduce?nB:i},aB=iB,oB=aB;(function(t){t.exports=oB})(LF);var sB=J(kd),Id={},uB={get exports(){return Id},set exports(t){Id=t}},lB=U,cB=ra.filter,hB=fo,dB=hB("filter");lB({target:"Array",proto:!0,forced:!dB},{filter:function(i){return cB(this,i,arguments.length>1?arguments[1]:void 0)}});var fB=Ve,vB=fB("Array").filter,pB=Ee,gB=vB,yc=Array.prototype,yB=function(t){var i=t.filter;return t===yc||pB(yc,t)&&i===yc.filter?gB:i},mB=yB,$B=mB;(function(t){t.exports=$B})(uB);var wi=J(Id),Cd={},bB={get exports(){return Cd},set exports(t){Cd=t}},wB=U,_B=ra.map,EB=fo,SB=EB("map");wB({target:"Array",proto:!0,forced:!SB},{map:function(i){return _B(this,i,arguments.length>1?arguments[1]:void 0)}});var OB=Ve,TB=OB("Array").map,xB=Ee,PB=TB,mc=Array.prototype,kB=function(t){var i=t.map;return t===mc||xB(mc,t)&&i===mc.map?PB:i},IB=kB,CB=IB;(function(t){t.exports=CB})(bB);var Yt=J(Cd),t$={},AB={get exports(){return t$},set exports(t){t$=t}},RB=dn,DB=Mt,MB=ag,NB=hn,KE=function(t,i,e,r,n,a,o,s){for(var u=n,l=0,c=o?NB(o,s):!1,h,d;l<r;)l in e&&(h=c?c(e[l],l,i):e[l],a>0&&RB(h)?(d=DB(h),u=KE(t,i,h,d,u,a-1)-1):(MB(u+1),t[u]=h),u++),l++;return u},FB=KE,BB=U,LB=FB,jB=Pt,zB=kt,HB=Mt,WB=el;BB({target:"Array",proto:!0},{flatMap:function(i){var e=zB(this),r=HB(e),n;return jB(i),n=WB(e,0),n.length=LB(n,e,e,r,0,1,i,arguments.length>1?arguments[1]:void 0),n}});var VB=Ve,UB=VB("Array").flatMap,GB=Ee,KB=UB,$c=Array.prototype,qB=function(t){var i=t.flatMap;return t===$c||GB($c,t)&&i===$c.flatMap?KB:i},YB=qB,XB=YB;(function(t){t.exports=XB})(AB);var Ad={},QB={get exports(){return Ad},set exports(t){Ad=t}},ZB=Ze,r$=Dt,JB=rg,qE=function(t,i,e){var r,n;r$(t);try{if(r=JB(t,"return"),!r){if(i==="throw")throw e;return e}r=ZB(r,t)}catch(a){n=!0,r=a}if(i==="throw")throw e;if(n)throw r;return r$(r),e},eL=Dt,tL=qE,rL=function(t,i,e,r){try{return r?i(eL(e)[0],e[1]):i(e)}catch(n){tL(t,"throw",n)}},nL=Se,iL=na,aL=nL("iterator"),oL=Array.prototype,YE=function(t){return t!==void 0&&(iL.Array===t||oL[aL]===t)},sL=Fr,n$=rg,uL=uo,lL=na,cL=Se,hL=cL("iterator"),cl=function(t){if(!uL(t))return n$(t,hL)||n$(t,"@@iterator")||lL[sL(t)]},dL=Ze,fL=Pt,vL=Dt,pL=Zi,gL=cl,yL=TypeError,wg=function(t,i){var e=arguments.length<2?gL(t):i;if(fL(e))return vL(dL(e,t));throw yL(pL(t)+" is not iterable")},mL=hn,$L=Ze,bL=kt,wL=rL,_L=YE,EL=Ju,SL=Mt,i$=Ji,OL=wg,TL=cl,a$=Array,xL=function(i){var e=bL(i),r=EL(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=mL(a,n>2?arguments[2]:void 0));var s=TL(e),u=0,l,c,h,d,f,v;if(s&&!(this===a$&&_L(s)))for(d=OL(e,s),f=d.next,c=r?new this:[];!(h=$L(f,d)).done;u++)v=o?wL(d,a,[h.value,u],!0):h.value,i$(c,u,v);else for(l=SL(e),c=r?new this(l):a$(l);l>u;u++)v=o?a(e[u],u):e[u],i$(c,u,v);return c.length=u,c},PL=Se,XE=PL("iterator"),QE=!1;try{var kL=0,o$={next:function(){return{done:!!kL++}},return:function(){QE=!0}};o$[XE]=function(){return this},Array.from(o$,function(){throw 2})}catch{}var ZE=function(t,i){if(!i&&!QE)return!1;var e=!1;try{var r={};r[XE]=function(){return{next:function(){return{done:e=!0}}}},t(r)}catch{}return e},IL=U,CL=xL,AL=ZE,RL=!AL(function(t){Array.from(t)});IL({target:"Array",stat:!0,forced:RL},{from:CL});var DL=ye,ML=DL.Array.from,NL=ML,JE=NL;(function(t){t.exports=JE})(QB);var _g=J(Ad),Rd={},FL={get exports(){return Rd},set exports(t){Rd=t}},Dd={},BL={get exports(){return Dd},set exports(t){Dd=t}},LL=cl,jL=LL,zL=jL,HL=zL,WL=HL,VL=WL,UL=VL,GL=UL;(function(t){t.exports=GL})(BL);(function(t){t.exports=Dd})(FL);var Oo=J(Rd),Md={},KL={get exports(){return Md},set exports(t){Md=t}},qL=ye,YL=qL.Object.getOwnPropertySymbols,XL=YL,QL=XL;(function(t){t.exports=QL})(KL);var s$=J(Md),Nd={},ZL={get exports(){return Nd},set exports(t){Nd=t}},Fd={},JL={get exports(){return Fd},set exports(t){Fd=t}},ej=U,tj=se,rj=nr,eS=Kn.f,tS=Ke,nj=!tS||tj(function(){eS(1)});ej({target:"Object",stat:!0,forced:nj,sham:!tS},{getOwnPropertyDescriptor:function(i,e){return eS(rj(i),e)}});var ij=ye,rS=ij.Object,aj=JL.exports=function(i,e){return rS.getOwnPropertyDescriptor(i,e)};rS.getOwnPropertyDescriptor.sham&&(aj.sham=!0);var oj=Fd,sj=oj;(function(t){t.exports=sj})(ZL);var nS=J(Nd),Bd={},uj={get exports(){return Bd},set exports(t){Bd=t}},lj=yt,cj=fe,hj=yo,dj=mo,fj=Dt,vj=cj([].concat),Eg=lj("Reflect","ownKeys")||function(i){var e=hj.f(fj(i)),r=dj.f;return r?vj(e,r(i)):e},pj=U,gj=Ke,yj=Eg,mj=nr,$j=Kn,bj=Ji;pj({target:"Object",stat:!0,sham:!gj},{getOwnPropertyDescriptors:function(i){for(var e=mj(i),r=$j.f,n=yj(e),a={},o=0,s,u;n.length>o;)u=r(e,s=n[o++]),u!==void 0&&bj(a,s,u);return a}});var wj=ye,_j=wj.Object.getOwnPropertyDescriptors,Ej=_j,Sj=Ej;(function(t){t.exports=Sj})(uj);var u$=J(Bd),Ld={},Oj={get exports(){return Ld},set exports(t){Ld=t}},jd={},Tj={get exports(){return jd},set exports(t){jd=t}},xj=U,Pj=Ke,l$=tl.f;xj({target:"Object",stat:!0,forced:Object.defineProperties!==l$,sham:!Pj},{defineProperties:l$});var kj=ye,iS=kj.Object,Ij=Tj.exports=function(i,e){return iS.defineProperties(i,e)};iS.defineProperties.sham&&(Ij.sham=!0);var Cj=jd,Aj=Cj;(function(t){t.exports=Aj})(Oj);var Rj=J(Ld),zd={},Dj={get exports(){return zd},set exports(t){zd=t}};(function(t){t.exports=H_})(Dj);var Mj=J(zd),Hd={},Nj={get exports(){return Hd},set exports(t){Hd=t}},Wd={},Fj={get exports(){return Wd},set exports(t){Wd=t}},Bj=U,Lj=dn;Bj({target:"Array",stat:!0},{isArray:Lj});var jj=ye,zj=jj.Array.isArray,Hj=zj,aS=Hj,Wj=aS,Vj=Wj,Uj=Vj,Gj=Uj;(function(t){t.exports=Gj})(Fj);(function(t){t.exports=Wd})(Nj);var oS=J(Hd);function Kj(t){if(oS(t))return t}function qj(t,i){var e=t==null?null:typeof bi<"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 $u={},Yj={get exports(){return $u},set exports(t){$u=t}},Vd={},Xj={get exports(){return Vd},set exports(t){Vd=t}},Qj=U,c$=dn,Zj=Ju,Jj=Je,h$=vo,ez=Mt,tz=nr,rz=Ji,nz=Se,iz=fo,az=wo,oz=iz("slice"),sz=nz("species"),bc=Array,uz=Math.max;Qj({target:"Array",proto:!0,forced:!oz},{slice:function(i,e){var r=tz(this),n=ez(r),a=h$(i,n),o=h$(e===void 0?n:e,n),s,u,l;if(c$(r)&&(s=r.constructor,Zj(s)&&(s===bc||c$(s.prototype))?s=void 0:Jj(s)&&(s=s[sz],s===null&&(s=void 0)),s===bc||s===void 0))return az(r,a,o);for(u=new(s===void 0?bc:s)(uz(o-a,0)),l=0;a<o;a++,l++)a in r&&rz(u,l,r[a]);return u.length=l,u}});var lz=Ve,cz=lz("Array").slice,hz=Ee,dz=cz,wc=Array.prototype,fz=function(t){var i=t.slice;return t===wc||hz(wc,t)&&i===wc.slice?dz:i},vz=fz,sS=vz,pz=sS,gz=pz,yz=gz,mz=yz;(function(t){t.exports=mz})(Xj);(function(t){t.exports=Vd})(Yj);var $z=J($u),Ud={},bz={get exports(){return Ud},set exports(t){Ud=t}},Gd={},wz={get exports(){return Gd},set exports(t){Gd=t}},_z=JE,Ez=_z,Sz=Ez,Oz=Sz;(function(t){t.exports=Oz})(wz);(function(t){t.exports=Gd})(bz);var uS=J(Ud);function Kd(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 lS(t,i){var e;if(t){if(typeof t=="string")return Kd(t,i);var r=$z(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return uS(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Kd(t,i)}}function Tz(){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 $t(t,i){return Kj(t)||qj(t,i)||lS(t,i)||Tz()}function xz(t){if(oS(t))return Kd(t)}function Pz(t){if(typeof bi<"u"&&Oo(t)!=null||t["@@iterator"]!=null)return uS(t)}function kz(){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 Et(t){return xz(t)||Pz(t)||lS(t)||kz()}var qd={},Iz={get exports(){return qd},set exports(t){qd=t}};(function(t){t.exports=DE})(Iz);var hl=J(qd),Yd={},Cz={get exports(){return Yd},set exports(t){Yd=t}},Az=Ve,Rz=Az("Array").concat,Dz=Ee,Mz=Rz,_c=Array.prototype,Nz=function(t){var i=t.concat;return t===_c||Dz(_c,t)&&i===_c.concat?Mz:i},Fz=Nz,Bz=Fz;(function(t){t.exports=Bz})(Cz);var dl=J(Yd),Xd={},Lz={get exports(){return Xd},set exports(t){Xd=t}};(function(t){t.exports=sS})(Lz);var fl=J(Xd),Qd={},jz={get exports(){return Qd},set exports(t){Qd=t}},zz=U,Hz=Eg;zz({target:"Reflect",stat:!0},{ownKeys:Hz});var Wz=ye,Vz=Wz.Reflect.ownKeys,Uz=Vz,Gz=Uz;(function(t){t.exports=Gz})(jz);var Kz=J(Qd),Zd={},qz={get exports(){return Zd},set exports(t){Zd=t}};(function(t){t.exports=aS})(qz);var Ct=J(Zd),Jd={},Yz={get exports(){return Jd},set exports(t){Jd=t}},Xz=U,Qz=kt,cS=go,Zz=se,Jz=Zz(function(){cS(1)});Xz({target:"Object",stat:!0,forced:Jz},{keys:function(i){return cS(Qz(i))}});var e3=ye,t3=e3.Object.keys,r3=t3,n3=r3;(function(t){t.exports=n3})(Yz);var Sg=J(Jd),d$={},i3={get exports(){return d$},set exports(t){d$=t}},a3=U,o3=fe,hS=Date,s3=o3(hS.prototype.getTime);a3({target:"Date",stat:!0},{now:function(){return s3(new hS)}});var u3=ye,l3=u3.Date.now,c3=l3,h3=c3;(function(t){t.exports=h3})(i3);var ef={},d3={get exports(){return ef},set exports(t){ef=t}},f3=ra.forEach,v3=Eo,p3=v3("forEach"),g3=p3?[].forEach:function(i){return f3(this,i,arguments.length>1?arguments[1]:void 0)},y3=U,f$=g3;y3({target:"Array",proto:!0,forced:[].forEach!=f$},{forEach:f$});var m3=Ve,$3=m3("Array").forEach,b3=$3,w3=b3,_3=Fr,E3=We,S3=Ee,O3=w3,Ec=Array.prototype,T3={DOMTokenList:!0,NodeList:!0},dS=function(t){var i=t.forEach;return t===Ec||S3(Ec,t)&&i===Ec.forEach||E3(T3,_3(t))?O3:i};(function(t){t.exports=dS})(d3);var Bn=J(ef),tf={},x3={get exports(){return tf},set exports(t){tf=t}},P3=U,k3=fe,I3=dn,C3=k3([].reverse),v$=[1,2];P3({target:"Array",proto:!0,forced:String(v$)===String(v$.reverse())},{reverse:function(){return I3(this)&&(this.length=this.length),C3(this)}});var A3=Ve,R3=A3("Array").reverse,D3=Ee,M3=R3,Sc=Array.prototype,N3=function(t){var i=t.reverse;return t===Sc||D3(Sc,t)&&i===Sc.reverse?M3:i},F3=N3,fS=F3;(function(t){t.exports=fS})(x3);var B3=J(tf),rf={},L3={get exports(){return rf},set exports(t){rf=t}},j3=Ke,z3=dn,H3=TypeError,W3=Object.getOwnPropertyDescriptor,V3=j3&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),U3=V3?function(t,i){if(z3(t)&&!W3(t,"length").writable)throw H3("Cannot set read only .length");return t.length=i}:function(t,i){return t.length=i},p$=Zi,G3=TypeError,vS=function(t,i){if(!delete t[i])throw G3("Cannot delete property "+p$(i)+" of "+p$(t))},K3=U,q3=kt,Y3=vo,X3=Zu,Q3=Mt,Z3=U3,J3=ag,e5=el,t5=Ji,Oc=vS,r5=fo,n5=r5("splice"),i5=Math.max,a5=Math.min;K3({target:"Array",proto:!0,forced:!n5},{splice:function(i,e){var r=q3(this),n=Q3(r),a=Y3(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=a5(i5(X3(e),0),n-a)),J3(n+s-u),l=e5(r,u),c=0;c<u;c++)h=a+c,h in r&&t5(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]:Oc(r,d);for(c=n;c>n-u+s;c--)Oc(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]:Oc(r,d);for(c=0;c<s;c++)r[c+a]=arguments[c+2];return Z3(r,n-u+s),l}});var o5=Ve,s5=o5("Array").splice,u5=Ee,l5=s5,Tc=Array.prototype,c5=function(t){var i=t.splice;return t===Tc||u5(Tc,t)&&i===Tc.splice?l5:i},h5=c5,d5=h5;(function(t){t.exports=d5})(L3);var pS=J(rf),nf={},f5={get exports(){return nf},set exports(t){nf=t}},g$=Ke,v5=fe,p5=Ze,g5=se,xc=go,y5=mo,m5=so,$5=kt,b5=qu,li=Object.assign,y$=Object.defineProperty,w5=v5([].concat),_5=!li||g5(function(){if(g$&&li({b:1},li(y$({},"a",{enumerable:!0,get:function(){y$(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}),li({},t)[e]!=7||xc(li({},i)).join("")!=r})?function(i,e){for(var r=$5(i),n=arguments.length,a=1,o=y5.f,s=m5.f;n>a;)for(var u=b5(arguments[a++]),l=o?w5(xc(u),o(u)):xc(u),c=l.length,h=0,d;c>h;)d=l[h++],(!g$||p5(s,u,d))&&(r[d]=u[d]);return r}:li,E5=U,m$=_5;E5({target:"Object",stat:!0,arity:2,forced:Object.assign!==m$},{assign:m$});var S5=ye,O5=S5.Object.assign,T5=O5,x5=T5;(function(t){t.exports=x5})(f5);var P5=J(nf),$$={},k5={get exports(){return $$},set exports(t){$$=t}},I5=U,C5=ug.includes,A5=se,R5=A5(function(){return!Array(1).includes()});I5({target:"Array",proto:!0,forced:R5},{includes:function(i){return C5(this,i,arguments.length>1?arguments[1]:void 0)}});var D5=Ve,M5=D5("Array").includes,N5=Je,F5=Mr,B5=Se,L5=B5("match"),j5=function(t){var i;return N5(t)&&((i=t[L5])!==void 0?!!i:F5(t)=="RegExp")},z5=j5,H5=TypeError,W5=function(t){if(z5(t))throw H5("The method doesn't accept regular expressions");return t},V5=Se,U5=V5("match"),G5=function(t){var i=/./;try{"/./"[t](i)}catch{try{return i[U5]=!1,"/./"[t](i)}catch{}}return!1},K5=U,q5=fe,Y5=W5,X5=lo,b$=$r,Q5=G5,Z5=q5("".indexOf);K5({target:"String",proto:!0,forced:!Q5("includes")},{includes:function(i){return!!~Z5(b$(X5(this)),b$(Y5(i)),arguments.length>1?arguments[1]:void 0)}});var J5=Ve,e4=J5("String").includes,w$=Ee,t4=M5,r4=e4,Pc=Array.prototype,kc=String.prototype,n4=function(t){var i=t.includes;return t===Pc||w$(Pc,t)&&i===Pc.includes?t4:typeof t=="string"||t===kc||w$(kc,t)&&i===kc.includes?r4:i},i4=n4,a4=i4;(function(t){t.exports=a4})(k5);var _$={},o4={get exports(){return _$},set exports(t){_$=t}},s4=U,u4=se,l4=kt,gS=ul,c4=PE,h4=u4(function(){gS(1)});s4({target:"Object",stat:!0,forced:h4,sham:!c4},{getPrototypeOf:function(i){return gS(l4(i))}});var d4=ye,f4=d4.Object.getPrototypeOf,v4=f4,yS=v4;(function(t){t.exports=yS})(o4);var E$={},p4={get exports(){return E$},set exports(t){E$=t}},g4=Ke,mS=fe,y4=go,m4=nr,$4=so.f,b4=mS($4),w4=mS([].push),S$=function(t){return function(i){for(var e=m4(i),r=y4(e),n=r.length,a=0,o=[],s;n>a;)s=r[a++],(!g4||b4(e,s))&&w4(o,t?[s,e[s]]:e[s]);return o}},_4={entries:S$(!0),values:S$(!1)},E4=U,S4=_4.values;E4({target:"Object",stat:!0},{values:function(i){return S4(i)}});var O4=ye,T4=O4.Object.values,x4=T4,P4=x4;(function(t){t.exports=P4})(p4);var O$={},k4={get exports(){return O$},set exports(t){O$=t}},Og=`
28
+ \v\f\r                 \u2028\u2029\uFEFF`,I4=fe,C4=lo,A4=$r,af=Og,T$=I4("".replace),R4=RegExp("^["+af+"]+"),D4=RegExp("(^|[^"+af+"])["+af+"]+$"),Ic=function(t){return function(i){var e=A4(C4(i));return t&1&&(e=T$(e,R4,"")),t&2&&(e=T$(e,D4,"$1")),e}},$S={start:Ic(1),end:Ic(2),trim:Ic(3)},bS=Ie,M4=se,N4=fe,F4=$r,B4=$S.trim,x$=Og,ka=bS.parseInt,P$=bS.Symbol,k$=P$&&P$.iterator,wS=/^[+-]?0x/i,L4=N4(wS.exec),j4=ka(x$+"08")!==8||ka(x$+"0x16")!==22||k$&&!M4(function(){ka(Object(k$))}),z4=j4?function(i,e){var r=B4(F4(i));return ka(r,e>>>0||(L4(wS,r)?16:10))}:ka,H4=U,I$=z4;H4({global:!0,forced:parseInt!=I$},{parseInt:I$});var W4=ye,V4=W4.parseInt,U4=V4,G4=U4;(function(t){t.exports=G4})(k4);var C$={},K4={get exports(){return C$},set exports(t){C$=t}},q4=U,Y4=tg,X4=ug.indexOf,Q4=Eo,of=Y4([].indexOf),_S=!!of&&1/of([1],1,-0)<0,Z4=_S||!Q4("indexOf");q4({target:"Array",proto:!0,forced:Z4},{indexOf:function(i){var e=arguments.length>1?arguments[1]:void 0;return _S?of(this,i,e)||0:X4(this,i,e)}});var J4=Ve,eH=J4("Array").indexOf,tH=Ee,rH=eH,Cc=Array.prototype,nH=function(t){var i=t.indexOf;return t===Cc||tH(Cc,t)&&i===Cc.indexOf?rH:i},iH=nH,aH=iH;(function(t){t.exports=aH})(K4);var A$={},oH={get exports(){return A$},set exports(t){A$=t}},sH=xE.PROPER,uH=se,R$=Og,D$="​…᠎",lH=function(t){return uH(function(){return!!R$[t]()||D$[t]()!==D$||sH&&R$[t].name!==t})},cH=U,hH=$S.trim,dH=lH;cH({target:"String",proto:!0,forced:dH("trim")},{trim:function(){return hH(this)}});var fH=Ve,vH=fH("String").trim,pH=Ee,gH=vH,Ac=String.prototype,yH=function(t){var i=t.trim;return typeof t=="string"||t===Ac||pH(Ac,t)&&i===Ac.trim?gH:i},mH=yH,$H=mH;(function(t){t.exports=$H})(oH);var sf={},bH={get exports(){return sf},set exports(t){sf=t}},wH=U,_H=Ke,EH=Yn;wH({target:"Object",stat:!0,sham:!_H},{create:EH});var SH=ye,OH=SH.Object,TH=function(i,e){return OH.create(i,e)},xH=TH,ES=xH;(function(t){t.exports=ES})(bH);var PH=J(sf),uf={},kH={get exports(){return uf},set exports(t){uf=t}},lf=ye,IH=Yi;lf.JSON||(lf.JSON={stringify:JSON.stringify});var CH=function(i,e,r){return IH(lf.JSON.stringify,null,arguments)},AH=CH,RH=AH;(function(t){t.exports=RH})(kH);var DH=J(uf),cf={},MH={get exports(){return cf},set exports(t){cf=t}},NH=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",FH=TypeError,SS=function(t,i){if(t<i)throw FH("Not enough arguments");return t},OS=Ie,BH=Yi,LH=Ce,jH=NH,zH=cn,HH=wo,WH=SS,VH=OS.Function,UH=/MSIE .\./.test(zH)||jH&&function(){var t=OS.Bun.version.split(".");return t.length<3||t[0]==0&&(t[1]<3||t[1]==3&&t[2]==0)}(),TS=function(t,i){var e=i?2:1;return UH?function(r,n){var a=WH(arguments.length,1)>e,o=LH(r)?r:VH(r),s=a?HH(arguments,e):[],u=a?function(){BH(o,this,s)}:o;return i?t(u,n):t(u)}:t},GH=U,xS=Ie,KH=TS,M$=KH(xS.setInterval,!0);GH({global:!0,bind:!0,forced:xS.setInterval!==M$},{setInterval:M$});var qH=U,PS=Ie,YH=TS,N$=YH(PS.setTimeout,!0);qH({global:!0,bind:!0,forced:PS.setTimeout!==N$},{setTimeout:N$});var XH=ye,QH=XH.setTimeout;(function(t){t.exports=QH})(MH);var ZH=J(cf),F$={},JH={get exports(){return F$},set exports(t){F$=t}},eW=kt,B$=vo,tW=Mt,rW=function(i){for(var e=eW(this),r=tW(e),n=arguments.length,a=B$(n>1?arguments[1]:void 0,r),o=n>2?arguments[2]:void 0,s=o===void 0?r:B$(o,r);s>a;)e[a++]=i;return e},nW=U,iW=rW;nW({target:"Array",proto:!0},{fill:iW});var aW=Ve,oW=aW("Array").fill,sW=Ee,uW=oW,Rc=Array.prototype,lW=function(t){var i=t.fill;return t===Rc||sW(Rc,t)&&i===Rc.fill?uW:i},cW=lW,hW=cW;(function(t){t.exports=hW})(JH);var hf={},dW={get exports(){return hf},set exports(t){hf=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}})(dW);var fW=hf;/*! 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,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+`
33
+ * 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 Vt(t,i){t.prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i}function ms(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var df;typeof Object.assign!="function"?df=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}:df=Object.assign;var Ln=df,L$=["","webkit","Moz","MS","ms","o"],vW=typeof document>"u"?{style:{}}:document.createElement("div"),pW="function",_i=Math.round,jn=Math.abs,Tg=Date.now;function vl(t,i){for(var e,r,n=i[0].toUpperCase()+i.slice(1),a=0;a<L$.length;){if(e=L$[a],r=e?e+n:i,r in t)return r;a++}}var Er;typeof window>"u"?Er={}:Er=window;var kS=vl(vW.style,"touchAction"),IS=kS!==void 0;function gW(){if(!IS)return!1;var t={},i=Er.CSS&&Er.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return t[e]=i?Er.CSS.supports("touch-action",e):!0}),t}var CS="compute",AS="auto",ff="manipulation",Cn="none",Ua="pan-x",Ga="pan-y",$s=gW(),yW=/mobile|tablet|ip(ad|hone|od)|android/i,RS="ontouchstart"in Er,mW=vl(Er,"PointerEvent")!==void 0,$W=RS&&yW.test(navigator.userAgent),To="touch",bW="pen",xg="mouse",wW="kinect",_W=25,pt=1,Qn=2,je=4,Tt=8,bu=1,xo=2,Po=4,ko=8,Ni=16,pr=xo|Po,An=ko|Ni,DS=pr|An,MS=["x","y"],wu=["clientX","clientY"];function Sr(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 pl(t,i){return typeof t===pW?t.apply(i&&i[0]||void 0,i):t}function xn(t,i){return t.indexOf(i)>-1}function EW(t){if(xn(t,Cn))return Cn;var i=xn(t,Ua),e=xn(t,Ga);return i&&e?Cn:i||e?i?Ua:Ga:xn(t,ff)?ff:AS}var NS=function(){function t(e,r){this.manager=e,this.set(r)}var i=t.prototype;return i.set=function(r){r===CS&&(r=this.compute()),IS&&this.manager.element.style&&$s[r]&&(this.manager.element.style[kS]=r),this.actions=r.toLowerCase().trim()},i.update=function(){this.set(this.manager.options.touchAction)},i.compute=function(){var r=[];return Sr(this.manager.recognizers,function(n){pl(n.options.enable,[n])&&(r=r.concat(n.getTouchAction()))}),EW(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=xn(o,Cn)&&!$s[Cn],u=xn(o,Ga)&&!$s[Ga],l=xn(o,Ua)&&!$s[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&pr||l&&a&An))return this.preventSrc(n)},i.preventSrc=function(r){this.manager.session.prevented=!0,r.preventDefault()},t}();function Pg(t,i){for(;t;){if(t===i)return!0;t=t.parentNode}return!1}function FS(t){var i=t.length;if(i===1)return{x:_i(t[0].clientX),y:_i(t[0].clientY)};for(var e=0,r=0,n=0;n<i;)e+=t[n].clientX,r+=t[n].clientY,n++;return{x:_i(e/i),y:_i(r/i)}}function j$(t){for(var i=[],e=0;e<t.pointers.length;)i[e]={clientX:_i(t.pointers[e].clientX),clientY:_i(t.pointers[e].clientY)},e++;return{timeStamp:Tg(),pointers:i,center:FS(i),deltaX:t.deltaX,deltaY:t.deltaY}}function _u(t,i,e){e||(e=MS);var r=i[e[0]]-t[e[0]],n=i[e[1]]-t[e[1]];return Math.sqrt(r*r+n*n)}function vf(t,i,e){e||(e=MS);var r=i[e[0]]-t[e[0]],n=i[e[1]]-t[e[1]];return Math.atan2(n,r)*180/Math.PI}function BS(t,i){return t===i?bu:jn(t)>=jn(i)?t<0?xo:Po:i<0?ko:Ni}function SW(t,i){var e=i.center,r=t.offsetDelta||{},n=t.prevDelta||{},a=t.prevInput||{};(i.eventType===pt||a.eventType===je)&&(n=t.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=t.offsetDelta={x:e.x,y:e.y}),i.deltaX=n.x+(e.x-r.x),i.deltaY=n.y+(e.y-r.y)}function LS(t,i,e){return{x:i/t||0,y:e/t||0}}function OW(t,i){return _u(i[0],i[1],wu)/_u(t[0],t[1],wu)}function TW(t,i){return vf(i[1],i[0],wu)+vf(t[1],t[0],wu)}function xW(t,i){var e=t.lastInterval||i,r=i.timeStamp-e.timeStamp,n,a,o,s;if(i.eventType!==Tt&&(r>_W||e.velocity===void 0)){var u=i.deltaX-e.deltaX,l=i.deltaY-e.deltaY,c=LS(r,u,l);a=c.x,o=c.y,n=jn(c.x)>jn(c.y)?c.x:c.y,s=BS(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 PW(t,i){var e=t.session,r=i.pointers,n=r.length;e.firstInput||(e.firstInput=j$(i)),n>1&&!e.firstMultiple?e.firstMultiple=j$(i):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=i.center=FS(r);i.timeStamp=Tg(),i.deltaTime=i.timeStamp-a.timeStamp,i.angle=vf(s,u),i.distance=_u(s,u),SW(e,i),i.offsetDirection=BS(i.deltaX,i.deltaY);var l=LS(i.deltaTime,i.deltaX,i.deltaY);i.overallVelocityX=l.x,i.overallVelocityY=l.y,i.overallVelocity=jn(l.x)>jn(l.y)?l.x:l.y,i.scale=o?OW(o.pointers,r):1,i.rotation=o?TW(o.pointers,r):0,i.maxPointers=e.prevInput?i.pointers.length>e.prevInput.maxPointers?i.pointers.length:e.prevInput.maxPointers:i.pointers.length,xW(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,Pg(d,c)&&(c=d),i.target=c}function kW(t,i,e){var r=e.pointers.length,n=e.changedPointers.length,a=i&pt&&r-n===0,o=i&(je|Tt)&&r-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(t.session={}),e.eventType=i,PW(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){Sr(Ka(i),function(r){t.addEventListener(r,e,!1)})}function Ca(t,i,e){Sr(Ka(i),function(r){t.removeEventListener(r,e,!1)})}function z$(t){var i=t.ownerDocument||t;return i.defaultView||i.parentWindow||window}var ia=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){pl(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(z$(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(z$(this.element),this.evWin,this.domHandler)},t}();function zn(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 IW={pointerdown:pt,pointermove:Qn,pointerup:je,pointercancel:Tt,pointerout:Tt},CW={2:To,3:bW,4:xg,5:wW},jS="pointerdown",zS="pointermove pointerup pointercancel";Er.MSPointerEvent&&!Er.PointerEvent&&(jS="MSPointerDown",zS="MSPointerMove MSPointerUp MSPointerCancel");var HS=function(t){Vt(i,t);function i(){var r,n=i.prototype;return n.evEl=jS,n.evWin=zS,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=IW[s],l=CW[n.pointerType]||n.pointerType,c=l===To,h=zn(a,n.pointerId,"pointerId");u&pt&&(n.button===0||c)?h<0&&(a.push(n),h=a.length-1):u&(je|Tt)&&(o=!0),!(h<0)&&(a[h]=n,this.callback(this.manager,u,{pointers:a,changedPointers:[n],pointerType:l,srcEvent:n}),o&&a.splice(h,1))},i}(ia);function qa(t){return Array.prototype.slice.call(t,0)}function kg(t,i,e){for(var r=[],n=[],a=0;a<t.length;){var o=i?t[a][i]:t[a];zn(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 AW={touchstart:pt,touchmove:Qn,touchend:je,touchcancel:Tt},RW="touchstart touchmove touchend touchcancel",Ig=function(t){Vt(i,t);function i(){var r;return i.prototype.evTarget=RW,r=t.apply(this,arguments)||this,r.targetIds={},r}var e=i.prototype;return e.handler=function(n){var a=AW[n.type],o=DW.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:To,srcEvent:n})},i}(ia);function DW(t,i){var e=qa(t.touches),r=this.targetIds;if(i&(pt|Qn)&&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 Pg(l.target,u)}),i===pt)for(n=0;n<a.length;)r[a[n].identifier]=!0,n++;for(n=0;n<o.length;)r[o[n].identifier]&&s.push(o[n]),i&(je|Tt)&&delete r[o[n].identifier],n++;if(s.length)return[kg(a.concat(s),"identifier",!0),s]}var MW={mousedown:pt,mousemove:Qn,mouseup:je},NW="mousedown",FW="mousemove mouseup",Cg=function(t){Vt(i,t);function i(){var r,n=i.prototype;return n.evEl=NW,n.evWin=FW,r=t.apply(this,arguments)||this,r.pressed=!1,r}var e=i.prototype;return e.handler=function(n){var a=MW[n.type];a&pt&&n.button===0&&(this.pressed=!0),a&Qn&&n.which!==1&&(a=je),this.pressed&&(a&je&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[n],changedPointers:[n],pointerType:xg,srcEvent:n}))},i}(ia),BW=2500,H$=25;function W$(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 LW(t,i){t&pt?(this.primaryTouch=i.changedPointers[0].identifier,W$.call(this,i)):t&(je|Tt)&&W$.call(this,i)}function jW(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<=H$&&o<=H$)return!0}return!1}var WS=function(){var t=function(i){Vt(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===xg;if(!(h&&l.sourceCapabilities&&l.sourceCapabilities.firesTouchEvents)){if(c)LW.call(ms(ms(o)),u,l);else if(h&&jW.call(ms(ms(o)),l))return;o.callback(s,u,l)}},o.touch=new Ig(o.manager,o.handler),o.mouse=new Cg(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}(ia);return t}();function zW(t){var i,e=t.options.inputClass;return e?i=e:mW?i=HS:$W?i=Ig:RS?i=WS:i=Cg,new i(t,kW)}function Ei(t,i,e){return Array.isArray(t)?(Sr(t,e[i],e),!0):!1}var Xs=1,Ht=2,Fi=4,Jr=8,Or=Jr,Ya=16,dr=32,HW=1;function WW(){return HW++}function bs(t,i){var e=i.manager;return e?e.get(t):t}function V$(t){return t&Ya?"cancel":t&Jr?"end":t&Fi?"move":t&Ht?"start":""}var Io=function(){function t(e){e===void 0&&(e={}),this.options=tr({enable:!0},e),this.id=WW(),this.manager=null,this.state=Xs,this.simultaneous={},this.requireFail=[]}var i=t.prototype;return i.set=function(r){return Ln(this.options,r),this.manager&&this.manager.touchAction.update(),this},i.recognizeWith=function(r){if(Ei(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 Ei(r,"dropRecognizeWith",this)?this:(r=bs(r,this),delete this.simultaneous[r.id],this)},i.requireFailure=function(r){if(Ei(r,"requireFailure",this))return this;var n=this.requireFail;return r=bs(r,this),zn(n,r)===-1&&(n.push(r),r.requireFailure(this)),this},i.dropRequireFailure=function(r){if(Ei(r,"dropRequireFailure",this))return this;r=bs(r,this);var n=zn(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<Jr&&o(n.options.event+V$(a)),o(n.options.event),r.additionalEvent&&o(r.additionalEvent),a>=Jr&&o(n.options.event+V$(a))},i.tryEmit=function(r){if(this.canEmit())return this.emit(r);this.state=dr},i.canEmit=function(){for(var r=0;r<this.requireFail.length;){if(!(this.requireFail[r].state&(dr|Xs)))return!1;r++}return!0},i.recognize=function(r){var n=Ln({},r);if(!pl(this.options.enable,[this,n])){this.reset(),this.state=dr;return}this.state&(Or|Ya|dr)&&(this.state=Xs),this.state=this.process(n),this.state&(Ht|Fi|Jr|Ya)&&this.tryEmit(n)},i.process=function(r){},i.getTouchAction=function(){},i.reset=function(){},t}(),pf=function(t){Vt(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[ff]},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&pt&&this.count===0)return this.failTimeout();if(u&&l&&s){if(n.eventType!==je)return this.failTimeout();var c=this.pTime?n.timeStamp-this.pTime<o.interval:!0,h=!this.pCenter||_u(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=Or,a.tryEmit()},o.interval),Ht):Or}return dr},e.failTimeout=function(){var n=this;return this._timer=setTimeout(function(){n.state=dr},this.options.interval),dr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(){this.state===Or&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},i}(Io),Bi=function(t){Vt(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|Fi),u=this.attrTest(n);return s&&(o&Tt||!u)?a|Ya:s||u?o&je?a|Jr:a&Ht?a|Fi:Ht:dr},i}(Io);function VS(t){return t===Ni?"down":t===ko?"up":t===xo?"left":t===Po?"right":""}var Ag=function(t){Vt(i,t);function i(r){var n;return r===void 0&&(r={}),n=t.call(this,tr({event:"pan",threshold:10,pointers:1,direction:DS},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&pr&&a.push(Ga),n&An&&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&pr?(u=l===0?bu:l<0?xo:Po,o=l!==this.pX,s=Math.abs(n.deltaX)):(u=c===0?bu:c<0?ko:Ni,o=c!==this.pY,s=Math.abs(n.deltaY))),n.direction=u,o&&s>a.threshold&&u&a.direction},e.attrTest=function(n){return Bi.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=VS(n.direction);a&&(n.additionalEvent=this.options.event+a),t.prototype.emit.call(this,n)},i}(Bi),US=function(t){Vt(i,t);function i(r){return r===void 0&&(r={}),t.call(this,tr({event:"swipe",threshold:10,velocity:.3,direction:pr|An,pointers:1},r))||this}var e=i.prototype;return e.getTouchAction=function(){return Ag.prototype.getTouchAction.call(this)},e.attrTest=function(n){var a=this.options.direction,o;return a&(pr|An)?o=n.overallVelocity:a&pr?o=n.overallVelocityX:a&An&&(o=n.overallVelocityY),t.prototype.attrTest.call(this,n)&&a&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&jn(o)>this.options.velocity&&n.eventType&je},e.emit=function(n){var a=VS(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},i}(Bi),GS=function(t){Vt(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[Cn]},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}(Bi),KS=function(t){Vt(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[Cn]},e.attrTest=function(n){return t.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&Ht)},i}(Bi),qS=function(t){Vt(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[AS]},e.process=function(n){var a=this,o=this.options,s=n.pointers.length===o.pointers,u=n.distance<o.threshold,l=n.deltaTime>o.time;if(this._input=n,!u||!s||n.eventType&(je|Tt)&&!l)this.reset();else if(n.eventType&pt)this.reset(),this._timer=setTimeout(function(){a.state=Or,a.tryEmit()},o.time);else if(n.eventType&je)return Or;return dr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===Or&&(n&&n.eventType&je?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=Tg(),this.manager.emit(this.options.event,this._input)))},i}(Io),YS={domEvents:!1,touchAction:CS,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},U$=[[KS,{enable:!1}],[GS,{enable:!1},["rotate"]],[US,{direction:pr}],[Ag,{direction:pr},["swipe"]],[pf],[pf,{event:"doubletap",taps:2},["tap"]],[qS]],VW=1,G$=2;function K$(t,i){var e=t.element;if(e.style){var r;Sr(t.options.cssProps,function(n,a){r=vl(e.style,a),i?(t.oldCssProps[r]=e.style[r],e.style[r]=n):e.style[r]=t.oldCssProps[r]||""}),i||(t.oldCssProps={})}}function UW(t,i){var e=document.createEvent("Event");e.initEvent(t,!0,!0),e.gesture=i,i.target.dispatchEvent(e)}var q$=function(){function t(e,r){var n=this;this.options=Ln({},YS,r||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=zW(this),this.touchAction=new NS(this,this.options.touchAction),K$(this,!0),Sr(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 Ln(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?G$:VW},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&Or)&&(n.curRecognizer=null,s=null);for(var u=0;u<o.length;)a=o[u],n.stopped!==G$&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(r):a.reset(),!s&&a.state&(Ht|Fi|Jr)&&(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(Ei(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(Ei(r,"remove",this))return this;var n=this.get(r);if(r){var a=this.recognizers,o=zn(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 Sr(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 Sr(Ka(r),function(o){n?a[o]&&a[o].splice(zn(a[o],n),1):delete a[o]}),this},i.emit=function(r,n){this.options.domEvents&&UW(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&&K$(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),GW={touchstart:pt,touchmove:Qn,touchend:je,touchcancel:Tt},KW="touchstart",qW="touchstart touchmove touchend touchcancel",YW=function(t){Vt(i,t);function i(){var r,n=i.prototype;return n.evTarget=KW,n.evWin=qW,r=t.apply(this,arguments)||this,r.started=!1,r}var e=i.prototype;return e.handler=function(n){var a=GW[n.type];if(a===pt&&(this.started=!0),!!this.started){var o=XW.call(this,n,a);a&(je|Tt)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:To,srcEvent:n})}},i}(ia);function XW(t,i){var e=qa(t.touches),r=qa(t.changedTouches);return i&(je|Tt)&&(e=kg(e.concat(r),"identifier",!0)),[e,r]}function XS(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 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())}/**
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=XS(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`."),QW=XS(function(t,i){return QS(t,i,!0)},"merge","Use `assign`.");function ZW(t,i,e){var r=i.prototype,n;n=t.prototype=Object.create(r),n.constructor=t,n._super=r,e&&Ln(n,e)}function Y$(t,i){return function(){return t.apply(i,arguments)}}var JW=function(){var t=function(e,r){return r===void 0&&(r={}),new q$(e,tr({recognizers:U$.concat()},r))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=DS,t.DIRECTION_DOWN=Ni,t.DIRECTION_LEFT=xo,t.DIRECTION_RIGHT=Po,t.DIRECTION_UP=ko,t.DIRECTION_HORIZONTAL=pr,t.DIRECTION_VERTICAL=An,t.DIRECTION_NONE=bu,t.DIRECTION_DOWN=Ni,t.INPUT_START=pt,t.INPUT_MOVE=Qn,t.INPUT_END=je,t.INPUT_CANCEL=Tt,t.STATE_POSSIBLE=Xs,t.STATE_BEGAN=Ht,t.STATE_CHANGED=Fi,t.STATE_ENDED=Jr,t.STATE_RECOGNIZED=Or,t.STATE_CANCELLED=Ya,t.STATE_FAILED=dr,t.Manager=q$,t.Input=ia,t.TouchAction=NS,t.TouchInput=Ig,t.MouseInput=Cg,t.PointerEventInput=HS,t.TouchMouseInput=WS,t.SingleTouchInput=YW,t.Recognizer=Io,t.AttrRecognizer=Bi,t.Tap=pf,t.Pan=Ag,t.Swipe=US,t.Pinch=GS,t.Rotate=KS,t.Press=qS,t.on=Ia,t.off=Ca,t.each=Sr,t.merge=QW,t.extend=QS,t.bindFn=Y$,t.assign=Ln,t.inherit=ZW,t.bindFn=Y$,t.prefixed=vl,t.toArray=qa,t.inArray=zn,t.uniqueArray=kg,t.splitStr=Ka,t.boolOrFn=pl,t.hasParent=Pg,t.addEventListeners=Ia,t.removeEventListeners=Ca,t.defaults=Ln({},YS,{preset:U$}),t}(),e6=JW;function ZS(t,i){var e=typeof hl<"u"&&Oo(t)||t["@@iterator"];if(!e){if(Ct(t)||(e=t6(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 t6(t,i){var e;if(t){if(typeof t=="string")return X$(t,i);var r=fl(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return _g(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X$(t,i)}}function X$(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 JS=hl("DELETE");function r6(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 eO.apply(void 0,dl(i=[{},t]).call(i,r))}function eO(){var t=Eu.apply(void 0,arguments);return rO(t),t}function Eu(){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 Eu.apply(void 0,dl(r=[eO(i[0],i[1])]).call(r,Et(fl(i).call(i,2))))}var n=i[0],a=i[1],o=ZS(Kz(a)),s;try{for(o.s();!(s=o.n()).done;){var u=s.value;Object.prototype.propertyIsEnumerable.call(a,u)&&(a[u]===JS?delete n[u]:n[u]!==null&&a[u]!==null&&st(n[u])==="object"&&st(a[u])==="object"&&!Ct(n[u])&&!Ct(a[u])?n[u]=Eu(n[u],a[u]):n[u]=tO(a[u]))}}catch(l){o.e(l)}finally{o.f()}return n}function tO(t){return Ct(t)?Yt(t).call(t,function(i){return tO(i)}):st(t)==="object"&&t!==null?Eu({},t):t}function rO(t){for(var i=0,e=Sg(t);i<e.length;i++){var r=e[i];t[r]===JS?delete t[r]:st(t[r])==="object"&&t[r]!==null&&rO(t[r])}}function n6(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}}}var i6=typeof window<"u"?window.Hammer||e6:function(){return n6()};function wr(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=i6(this._dom.overlay);r.on("tap",GE(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){r.destroy()});var n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Bn(n).call(n,function(a){r.on(a,function(o){o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(a){a6(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()}}fW(wr.prototype);wr.current=null;wr.prototype.destroy=function(){var t,i;this.deactivate();var e=ZS(B3(t=pS(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()}};wr.prototype.activate=function(){wr.current&&wr.current.deactivate(),wr.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)};wr.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")};wr.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};function a6(t,i){for(;t;){if(t===i)return!0;t=t.parentNode}return!1}var gf={},o6={get exports(){return gf},set exports(t){gf=t}},s6=Ju,u6=Zi,l6=TypeError,nO=function(t){if(s6(t))return t;throw l6(u6(t)+" is not a constructor")},c6=U,h6=yt,Dc=Yi,d6=VE,Q$=nO,f6=Dt,Z$=Je,v6=Yn,iO=se,Rg=h6("Reflect","construct"),p6=Object.prototype,g6=[].push,aO=iO(function(){function t(){}return!(Rg(function(){},[],t)instanceof t)}),oO=!iO(function(){Rg(function(){})}),J$=aO||oO;c6({target:"Reflect",stat:!0,forced:J$,sham:J$},{construct:function(i,e){Q$(i),f6(e);var r=arguments.length<3?i:Q$(arguments[2]);if(oO&&!aO)return Rg(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 Dc(g6,n,e),new(Dc(d6,i,n))}var a=r.prototype,o=v6(Z$(a)?a:p6),s=Dc(i,o,e);return Z$(s)?s:o}});var y6=ye,m6=y6.Reflect.construct,$6=m6,b6=$6;(function(t){t.exports=b6})(o6);var Qs=J(gf);function bn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Su={},w6={get exports(){return Su},set exports(t){Su=t}},yf={},_6={get exports(){return yf},set exports(t){yf=t}},E6=ES,S6=E6,O6=S6,T6=O6;(function(t){t.exports=T6})(_6);(function(t){t.exports=yf})(w6);var x6=J(Su),Ou={},P6={get exports(){return Ou},set exports(t){Ou=t}},mf={},k6={get exports(){return mf},set exports(t){mf=t}},I6=U,C6=CE;I6({target:"Object",stat:!0},{setPrototypeOf:C6});var A6=ye,R6=A6.Object.setPrototypeOf,D6=R6,M6=D6,N6=M6,F6=N6,B6=F6,L6=B6;(function(t){t.exports=L6})(k6);(function(t){t.exports=mf})(P6);var $f=J(Ou),bf={},j6={get exports(){return bf},set exports(t){bf=t}},wf={},z6={get exports(){return wf},set exports(t){wf=t}},H6=UE,W6=H6,V6=W6,U6=V6;(function(t){t.exports=U6})(z6);(function(t){t.exports=wf})(j6);var sO=J(bf);function _f(t,i){var e;return _f=$f?sO(e=$f).call(e):function(n,a){return n.__proto__=a,n},_f(t,i)}function G6(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=x6(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Qu(t,"prototype",{writable:!1}),i&&_f(t,i)}function K6(t,i){if(i&&(st(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 Tu={},q6={get exports(){return Tu},set exports(t){Tu=t}},Ef={},Y6={get exports(){return Ef},set exports(t){Ef=t}},X6=yS,Q6=X6,Z6=Q6,J6=Z6;(function(t){t.exports=J6})(Y6);(function(t){t.exports=Ef})(q6);var eb=J(Tu);function xu(t){var i;return xu=$f?sO(i=eb).call(i):function(r){return r.__proto__||eb(r)},xu(t)}var Sf={},eV={get exports(){return Sf},set exports(t){Sf=t}},Of={},tV={get exports(){return Of},set exports(t){Of=t}};(function(t){var i=za,e=mu;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})(tV);var Tf={},rV={get exports(){return Tf},set exports(t){Tf=t}},xf={},nV={get exports(){return xf},set exports(t){xf=t}},iV=dS,aV=iV,oV=aV,sV=oV;(function(t){t.exports=sV})(nV);(function(t){t.exports=xf})(rV);var Pf={},uV={get exports(){return Pf},set exports(t){Pf=t}},kf={},lV={get exports(){return kf},set exports(t){kf=t}},tb=We,cV=Eg,hV=Kn,dV=Rt,fV=function(t,i,e){for(var r=cV(i),n=dV.f,a=hV.f,o=0;o<r.length;o++){var s=r[o];!tb(t,s)&&!(e&&tb(e,s))&&n(t,s,a(i,s))}},vV=Je,pV=Nr,gV=function(t,i){vV(i)&&"cause"in i&&pV(t,"cause",i.cause)},yV=fe,uO=Error,mV=yV("".replace),$V=function(t){return String(uO(t).stack)}("zxcasd"),lO=/\n\s*at [^:]*:[^\n]*/,bV=lO.test($V),wV=function(t,i){if(bV&&typeof t=="string"&&!uO.prepareStackTrace)for(;i--;)t=mV(t,lO,"");return t},_V=se,EV=qn,SV=!_V(function(){var t=Error("a");return"stack"in t?(Object.defineProperty(t,"stack",EV(1,7)),t.stack!==7):!0}),OV=Nr,TV=wV,xV=SV,rb=Error.captureStackTrace,PV=function(t,i,e,r){xV&&(rb?rb(t,i):OV(t,"stack",TV(e,r)))},kV=hn,IV=Ze,CV=Dt,AV=Zi,RV=YE,DV=Mt,nb=Ee,MV=wg,NV=cl,ib=qE,FV=TypeError,Zs=function(t,i){this.stopped=t,this.result=i},ab=Zs.prototype,Zn=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=kV(i,r),l,c,h,d,f,v,p,b=function(y){return l&&ib(l,"normal",y),new Zs(!0,y)},g=function(y){return n?(CV(y),s?u(y[0],y[1],b):u(y[0],y[1])):s?u(y,b):u(y)};if(a)l=t.iterator;else if(o)l=t;else{if(c=NV(t),!c)throw FV(AV(t)+" is not iterable");if(RV(c)){for(h=0,d=DV(t);d>h;h++)if(f=g(t[h]),f&&nb(ab,f))return f;return new Zs(!1)}l=MV(t,c)}for(v=a?t.next:l.next;!(p=IV(v,l)).done;){try{f=g(p.value)}catch(y){ib(l,"throw",y)}if(typeof f=="object"&&f&&nb(ab,f))return f}return new Zs(!1)},BV=$r,LV=function(t,i){return t===void 0?arguments.length<2?"":i:BV(t)},jV=U,zV=Ee,HV=ul,Pu=CE,WV=fV,cO=Yn,Mc=Nr,Nc=qn,VV=gV,UV=PV,GV=Zn,KV=LV,qV=Se,YV=qV("toStringTag"),ku=Error,XV=[].push,Li=function(i,e){var r=zV(Fc,this),n;Pu?n=Pu(ku(),r?HV(this):Fc):(n=r?this:cO(Fc),Mc(n,YV,"Error")),e!==void 0&&Mc(n,"message",KV(e)),UV(n,Li,n.stack,1),arguments.length>2&&VV(n,arguments[2]);var a=[];return GV(i,XV,{that:a}),Mc(n,"errors",a),n};Pu?Pu(Li,ku):WV(Li,ku,{name:!0});var Fc=Li.prototype=cO(ku.prototype,{constructor:Nc(1,Li),message:Nc(1,""),name:Nc(1,"AggregateError")});jV({global:!0,constructor:!0,arity:2},{AggregateError:Li});var QV=yt,ZV=hg,JV=Se,e8=Ke,ob=JV("species"),hO=function(t){var i=QV(t);e8&&i&&!i[ob]&&ZV(i,ob,{configurable:!0,get:function(){return this}})},t8=Ee,r8=TypeError,Dg=function(t,i){if(t8(i,t))return t;throw r8("Incorrect invocation")},sb=Dt,n8=nO,i8=uo,a8=Se,o8=a8("species"),dO=function(t,i){var e=sb(t).constructor,r;return e===void 0||i8(r=sb(e)[o8])?i:n8(r)},s8=cn,fO=/(?:ipad|iphone|ipod).*applewebkit/i.test(s8),At=Ie,u8=Yi,l8=hn,ub=Ce,c8=We,vO=se,lb=Q_,h8=wo,cb=ig,d8=SS,f8=fO,v8=So,If=At.setImmediate,Cf=At.clearImmediate,p8=At.process,Bc=At.Dispatch,g8=At.Function,hb=At.MessageChannel,y8=At.String,Lc=0,Aa={},db="onreadystatechange",Xa,$n,jc,zc;vO(function(){Xa=At.location});var Mg=function(t){if(c8(Aa,t)){var i=Aa[t];delete Aa[t],i()}},Hc=function(t){return function(){Mg(t)}},fb=function(t){Mg(t.data)},vb=function(t){At.postMessage(y8(t),Xa.protocol+"//"+Xa.host)};(!If||!Cf)&&(If=function(i){d8(arguments.length,1);var e=ub(i)?i:g8(i),r=h8(arguments,1);return Aa[++Lc]=function(){u8(e,void 0,r)},$n(Lc),Lc},Cf=function(i){delete Aa[i]},v8?$n=function(t){p8.nextTick(Hc(t))}:Bc&&Bc.now?$n=function(t){Bc.now(Hc(t))}:hb&&!f8?(jc=new hb,zc=jc.port2,jc.port1.onmessage=fb,$n=l8(zc.postMessage,zc)):At.addEventListener&&ub(At.postMessage)&&!At.importScripts&&Xa&&Xa.protocol!=="file:"&&!vO(vb)?($n=vb,At.addEventListener("message",fb,!1)):db in cb("script")?$n=function(t){lb.appendChild(cb("script"))[db]=function(){lb.removeChild(this),Mg(t)}}:$n=function(t){setTimeout(Hc(t),0)});var pO={set:If,clear:Cf},gO=function(){this.head=null,this.tail=null};gO.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 yO=gO,m8=cn,$8=/ipad|iphone|ipod/i.test(m8)&&typeof Pebble<"u",b8=cn,w8=/web0s(?!.*chrome)/i.test(b8),Hn=Ie,pb=hn,_8=Kn.f,Wc=pO.set,E8=yO,S8=fO,O8=$8,T8=w8,Vc=So,gb=Hn.MutationObserver||Hn.WebKitMutationObserver,yb=Hn.document,mb=Hn.process,ws=Hn.Promise,$b=_8(Hn,"queueMicrotask"),Af=$b&&$b.value,ci,Uc,Gc,_s,bb;if(!Af){var Es=new E8,Ss=function(){var t,i;for(Vc&&(t=mb.domain)&&t.exit();i=Es.get();)try{i()}catch(e){throw Es.head&&ci(),e}t&&t.enter()};!S8&&!Vc&&!T8&&gb&&yb?(Uc=!0,Gc=yb.createTextNode(""),new gb(Ss).observe(Gc,{characterData:!0}),ci=function(){Gc.data=Uc=!Uc}):!O8&&ws&&ws.resolve?(_s=ws.resolve(void 0),_s.constructor=ws,bb=pb(_s.then,_s),ci=function(){bb(Ss)}):Vc?ci=function(){mb.nextTick(Ss)}:(Wc=pb(Wc,Hn),ci=function(){Wc(Ss)}),Af=function(t){Es.head||ci(),Es.add(t)}}var x8=Af,P8=function(t,i){try{arguments.length==1?console.error(t):console.error(t,i)}catch{}},aa=function(t){try{return{error:!1,value:t()}}catch(i){return{error:!0,value:i}}},k8=Ie,oa=k8.Promise,mO=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",I8=mO,C8=So,A8=!I8&&!C8&&typeof window=="object"&&typeof document=="object",R8=Ie,Ra=oa,D8=Ce,M8=L_,N8=V_,F8=Se,B8=A8,L8=mO,Kc=Xi,wb=Ra&&Ra.prototype,j8=F8("species"),Rf=!1,$O=D8(R8.PromiseRejectionEvent),z8=M8("Promise",function(){var t=N8(Ra),i=t!==String(Ra);if(!i&&Kc===66||!(wb.catch&&wb.finally))return!0;if(!Kc||Kc<51||!/native code/.test(t)){var e=new Ra(function(a){a(1)}),r=function(a){a(function(){},function(){})},n=e.constructor={};if(n[j8]=r,Rf=e.then(function(){})instanceof r,!Rf)return!0}return!i&&(B8||L8)&&!$O}),Co={CONSTRUCTOR:z8,REJECTION_EVENT:$O,SUBCLASSING:Rf},Br={},_b=Pt,H8=TypeError,W8=function(t){var i,e;this.promise=new t(function(r,n){if(i!==void 0||e!==void 0)throw H8("Bad Promise constructor");i=r,e=n}),this.resolve=_b(i),this.reject=_b(e)};Br.f=function(t){return new W8(t)};var V8=U,Iu=So,an=Ie,Ao=Ze,U8=ea,G8=Xn,K8=hO,q8=Pt,Df=Ce,Y8=Je,X8=Dg,Q8=dO,bO=pO.set,Ng=x8,Z8=P8,J8=aa,eU=yO,wO=ta,Mf=oa,_O=Co,EO=Br,gl="Promise",SO=_O.CONSTRUCTOR,tU=_O.REJECTION_EVENT,qc=wO.getterFor(gl),rU=wO.set,nU=Mf&&Mf.prototype,Si=Mf,Yc=nU,OO=an.TypeError,Nf=an.document,Fg=an.process,Ff=EO.f,iU=Ff,aU=!!(Nf&&Nf.createEvent&&an.dispatchEvent),TO="unhandledrejection",oU="rejectionhandled",Eb=0,xO=1,sU=2,Bg=1,PO=2,Os,Sb,uU,kO=function(t){var i;return Y8(t)&&Df(i=t.then)?i:!1},IO=function(t,i){var e=i.value,r=i.state==xO,n=r?t.ok:t.fail,a=t.resolve,o=t.reject,s=t.domain,u,l,c;try{n?(r||(i.rejection===PO&&cU(i),i.rejection=Bg),n===!0?u=e:(s&&s.enter(),u=n(e),s&&(s.exit(),c=!0)),u===t.promise?o(OO("Promise-chain cycle")):(l=kO(u))?Ao(l,u,a,o):a(u)):o(e)}catch(h){s&&!c&&s.exit(),o(h)}},CO=function(t,i){t.notified||(t.notified=!0,Ng(function(){for(var e=t.reactions,r;r=e.get();)IO(r,t);t.notified=!1,i&&!t.rejection&&lU(t)}))},AO=function(t,i,e){var r,n;aU?(r=Nf.createEvent("Event"),r.promise=i,r.reason=e,r.initEvent(t,!1,!0),an.dispatchEvent(r)):r={promise:i,reason:e},!tU&&(n=an["on"+t])?n(r):t===TO&&Z8("Unhandled promise rejection",e)},lU=function(t){Ao(bO,an,function(){var i=t.facade,e=t.value,r=Ob(t),n;if(r&&(n=J8(function(){Iu?Fg.emit("unhandledRejection",e,i):AO(TO,i,e)}),t.rejection=Iu||Ob(t)?PO:Bg,n.error))throw n.value})},Ob=function(t){return t.rejection!==Bg&&!t.parent},cU=function(t){Ao(bO,an,function(){var i=t.facade;Iu?Fg.emit("rejectionHandled",i):AO(oU,i,t.value)})},Oi=function(t,i,e){return function(r){t(i,r,e)}},Ii=function(t,i,e){t.done||(t.done=!0,e&&(t=e),t.value=i,t.state=sU,CO(t,!0))},Bf=function(t,i,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===i)throw OO("Promise can't be resolved itself");var r=kO(i);r?Ng(function(){var n={done:!1};try{Ao(r,i,Oi(Bf,n,t),Oi(Ii,n,t))}catch(a){Ii(n,a,t)}}):(t.value=i,t.state=xO,CO(t,!1))}catch(n){Ii({done:!1},n,t)}}};SO&&(Si=function(i){X8(this,Yc),q8(i),Ao(Os,this);var e=qc(this);try{i(Oi(Bf,e),Oi(Ii,e))}catch(r){Ii(e,r)}},Yc=Si.prototype,Os=function(i){rU(this,{type:gl,done:!1,notified:!1,parent:!1,reactions:new eU,rejection:!1,state:Eb,value:void 0})},Os.prototype=U8(Yc,"then",function(i,e){var r=qc(this),n=Ff(Q8(this,Si));return r.parent=!0,n.ok=Df(i)?i:!0,n.fail=Df(e)&&e,n.domain=Iu?Fg.domain:void 0,r.state==Eb?r.reactions.add(n):Ng(function(){IO(n,r)}),n.promise}),Sb=function(){var t=new Os,i=qc(t);this.promise=t,this.resolve=Oi(Bf,i),this.reject=Oi(Ii,i)},EO.f=Ff=function(t){return t===Si||t===uU?new Sb(t):iU(t)});V8({global:!0,constructor:!0,wrap:!0,forced:SO},{Promise:Si});G8(Si,gl,!1,!0);K8(gl);var hU=oa,dU=ZE,fU=Co.CONSTRUCTOR,yl=fU||!dU(function(t){hU.all(t).then(void 0,function(){})}),vU=U,pU=Ze,gU=Pt,yU=Br,mU=aa,$U=Zn,bU=yl;vU({target:"Promise",stat:!0,forced:bU},{all:function(i){var e=this,r=yU.f(e),n=r.resolve,a=r.reject,o=mU(function(){var s=gU(e.resolve),u=[],l=0,c=1;$U(i,function(h){var d=l++,f=!1;c++,pU(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 wU=U,_U=Co.CONSTRUCTOR,Tb=oa;Tb&&Tb.prototype;wU({target:"Promise",proto:!0,forced:_U,real:!0},{catch:function(t){return this.then(void 0,t)}});var EU=U,SU=Ze,OU=Pt,TU=Br,xU=aa,PU=Zn,kU=yl;EU({target:"Promise",stat:!0,forced:kU},{race:function(i){var e=this,r=TU.f(e),n=r.reject,a=xU(function(){var o=OU(e.resolve);PU(i,function(s){SU(o,e,s).then(r.resolve,n)})});return a.error&&n(a.value),r.promise}});var IU=U,CU=Ze,AU=Br,RU=Co.CONSTRUCTOR;IU({target:"Promise",stat:!0,forced:RU},{reject:function(i){var e=AU.f(this);return CU(e.reject,void 0,i),e.promise}});var DU=Dt,MU=Je,NU=Br,RO=function(t,i){if(DU(t),MU(i)&&i.constructor===t)return i;var e=NU.f(t),r=e.resolve;return r(i),e.promise},FU=U,BU=yt,LU=QI,jU=oa,zU=Co.CONSTRUCTOR,HU=RO,WU=BU("Promise"),VU=!zU;FU({target:"Promise",stat:!0,forced:LU},{resolve:function(i){return HU(VU&&this===WU?jU:this,i)}});var UU=U,GU=Ze,KU=Pt,qU=Br,YU=aa,XU=Zn,QU=yl;UU({target:"Promise",stat:!0,forced:QU},{allSettled:function(i){var e=this,r=qU.f(e),n=r.resolve,a=r.reject,o=YU(function(){var s=KU(e.resolve),u=[],l=0,c=1;XU(i,function(h){var d=l++,f=!1;c++,GU(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 ZU=U,JU=Ze,eG=Pt,tG=yt,rG=Br,nG=aa,iG=Zn,aG=yl,xb="No one promise resolved";ZU({target:"Promise",stat:!0,forced:aG},{any:function(i){var e=this,r=tG("AggregateError"),n=rG.f(e),a=n.resolve,o=n.reject,s=nG(function(){var u=eG(e.resolve),l=[],c=0,h=1,d=!1;iG(i,function(f){var v=c++,p=!1;h++,JU(u,e,f).then(function(b){p||d||(d=!0,a(b))},function(b){p||d||(p=!0,l[v]=b,--h||o(new r(l,xb)))})}),--h||o(new r(l,xb))});return s.error&&o(s.value),n.promise}});var oG=U,Lf=oa,sG=se,uG=yt,lG=Ce,cG=dO,Pb=RO,hG=Lf&&Lf.prototype,dG=!!Lf&&sG(function(){hG.finally.call({then:function(){}},function(){})});oG({target:"Promise",proto:!0,real:!0,forced:dG},{finally:function(t){var i=cG(this,uG("Promise")),e=lG(t);return this.then(e?function(r){return Pb(i,t()).then(function(){return r})}:t,e?function(r){return Pb(i,t()).then(function(){throw r})}:t)}});var fG=ye,vG=fG.Promise,pG=vG,gG=pG,yG=gG,mG=yG,$G=U,bG=Br,wG=aa;$G({target:"Promise",stat:!0,forced:!0},{try:function(t){var i=bG.f(this),e=wG(t);return(e.error?i.reject:i.resolve)(e.value),i.promise}});var _G=mG,EG=_G;(function(t){t.exports=EG})(lV);(function(t){t.exports=kf})(uV);var jf={},SG={get exports(){return jf},set exports(t){jf=t}},zf={},OG={get exports(){return zf},set exports(t){zf=t}},TG=fS,xG=TG,PG=xG,kG=PG;(function(t){t.exports=kG})(OG);(function(t){t.exports=zf})(SG);(function(t){var i=Of.default,e=fu,r=za,n=Su,a=Tu,o=Tf,s=Ou,u=Pf,l=jf,c=$u;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,p=e||function(R,k,D){R[k]=D.value},b=typeof r=="function"?r:{},g=b.iterator||"@@iterator",y=b.asyncIterator||"@@asyncIterator",$=b.toStringTag||"@@toStringTag";function m(R,k,D){return e(R,k,{value:D,enumerable:!0,configurable:!0,writable:!0}),R[k]}try{m({},"")}catch{m=function(D,j,G){return D[j]=G}}function w(R,k,D,j){var G=k&&k.prototype instanceof O?k:O,Y=n(G.prototype),Me=new it(j||[]);return p(Y,"_invoke",{value:ce(R,D,Me)}),Y}function E(R,k,D){try{return{type:"normal",arg:R.call(k,D)}}catch(j){return{type:"throw",arg:j}}}d.wrap=w;var T={};function O(){}function _(){}function S(){}var I={};m(I,g,function(){return this});var L=a,B=L&&L(L(_e([])));B&&B!==f&&v.call(B,g)&&(I=B);var Q=S.prototype=O.prototype=n(I);function ie(R){var k;o(k=["next","throw","return"]).call(k,function(D){m(R,D,function(j){return this._invoke(D,j)})})}function ne(R,k){function D(G,Y,Me,ht){var mt=E(R[G],R,Y);if(mt.type!=="throw"){var yn=mt.arg,zr=yn.value;return zr&&i(zr)=="object"&&v.call(zr,"__await")?k.resolve(zr.__await).then(function(mn){D("next",mn,Me,ht)},function(mn){D("throw",mn,Me,ht)}):k.resolve(zr).then(function(mn){yn.value=mn,Me(yn)},function(mn){return D("throw",mn,Me,ht)})}ht(mt.arg)}var j;p(this,"_invoke",{value:function(Y,Me){function ht(){return new k(function(mt,yn){D(Y,Me,mt,yn)})}return j=j?j.then(ht,ht):ht()}})}function ce(R,k,D){var j="suspendedStart";return function(G,Y){if(j==="executing")throw new Error("Generator is already running");if(j==="completed"){if(G==="throw")throw Y;return De()}for(D.method=G,D.arg=Y;;){var Me=D.delegate;if(Me){var ht=we(Me,D);if(ht){if(ht===T)continue;return ht}}if(D.method==="next")D.sent=D._sent=D.arg;else if(D.method==="throw"){if(j==="suspendedStart")throw j="completed",D.arg;D.dispatchException(D.arg)}else D.method==="return"&&D.abrupt("return",D.arg);j="executing";var mt=E(R,k,D);if(mt.type==="normal"){if(j=D.done?"completed":"suspendedYield",mt.arg===T)continue;return{value:mt.arg,done:D.done}}mt.type==="throw"&&(j="completed",D.method="throw",D.arg=mt.arg)}}}function we(R,k){var D=k.method,j=R.iterator[D];if(j===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=E(j,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 or(R){var k=R.completion||{};k.type="normal",delete k.arg,R.completion=k}function it(R){this.tryEntries=[{tryLoc:"root"}],o(R).call(R,Oe,this),this.reset(!0)}function _e(R){if(R){var k=R[g];if(k)return k.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var D=-1,j=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 j.next=j}}return{next:De}}function De(){return{value:void 0,done:!0}}return _.prototype=S,p(Q,"constructor",{value:S,configurable:!0}),p(S,"constructor",{value:_,configurable:!0}),_.displayName=m(S,$,"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,S):(R.__proto__=S,m(R,$,"GeneratorFunction")),R.prototype=n(Q),R},d.awrap=function(R){return{__await:R}},ie(ne.prototype),m(ne.prototype,y,function(){return this}),d.AsyncIterator=ne,d.async=function(R,k,D,j,G){G===void 0&&(G=u);var Y=new ne(w(R,k,D,j),G);return d.isGeneratorFunction(k)?Y:Y.next().then(function(Me){return Me.done?Me.value:Y.next()})},ie(Q),m(Q,$,"Generator"),m(Q,g,function(){return this}),m(Q,"toString",function(){return"[object Generator]"}),d.keys=function(R){var k=Object(R),D=[];for(var j in k)D.push(j);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,it.prototype={constructor:it,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,or),!k)for(var j in this)j.charAt(0)==="t"&&v.call(this,j)&&!isNaN(+c(j).call(j,1))&&(this[j]=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 j(yn,zr){return Me.type="throw",Me.arg=k,D.next=yn,zr&&(D.method="next",D.arg=void 0),!!zr}for(var G=this.tryEntries.length-1;G>=0;--G){var Y=this.tryEntries[G],Me=Y.completion;if(Y.tryLoc==="root")return j("end");if(Y.tryLoc<=this.prev){var ht=v.call(Y,"catchLoc"),mt=v.call(Y,"finallyLoc");if(ht&&mt){if(this.prev<Y.catchLoc)return j(Y.catchLoc,!0);if(this.prev<Y.finallyLoc)return j(Y.finallyLoc)}else if(ht){if(this.prev<Y.catchLoc)return j(Y.catchLoc,!0)}else{if(!mt)throw new Error("try statement without catch or finally");if(this.prev<Y.finallyLoc)return j(Y.finallyLoc)}}}},abrupt:function(k,D){for(var j=this.tryEntries.length-1;j>=0;--j){var G=this.tryEntries[j];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 Me=Y?Y.completion:{};return Me.type=k,Me.arg=D,Y?(this.method="next",this.next=Y.finallyLoc,T):this.complete(Me)},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 j=this.tryEntries[D];if(j.finallyLoc===k)return this.complete(j.completion,j.afterLoc),or(j),T}},catch:function(k){for(var D=this.tryEntries.length-1;D>=0;--D){var j=this.tryEntries[D];if(j.tryLoc===k){var G=j.completion;if(G.type==="throw"){var Y=G.arg;or(j)}return Y}}throw new Error("illegal catch attempt")},delegateYield:function(k,D,j){return this.delegate={iterator:_e(k),resultName:D,nextLoc:j},this.method==="next"&&(this.arg=void 0),T}},d}t.exports=h,t.exports.__esModule=!0,t.exports.default=t.exports})(eV);var Js=Sf(),bt=Js;try{regeneratorRuntime=Js}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=Js:Function("r","regeneratorRuntime = r")(Js)}var Hf={},IG={get exports(){return Hf},set exports(t){Hf=t}},Cu={},CG={get exports(){return Cu},set exports(t){Cu=t}},AG=se,RG=AG(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),DG=se,MG=Je,NG=Mr,kb=RG,eu=Object.isExtensible,FG=DG(function(){eu(1)}),BG=FG||kb?function(i){return!MG(i)||kb&&NG(i)=="ArrayBuffer"?!1:eu?eu(i):!0}:eu,LG=se,jG=!LG(function(){return Object.isExtensible(Object.preventExtensions({}))}),zG=U,HG=fe,WG=po,VG=Je,Lg=We,UG=Rt.f,Ib=yo,GG=cg,jg=BG,KG=Yu,qG=jG,DO=!1,Ar=KG("meta"),YG=0,zg=function(t){UG(t,Ar,{value:{objectID:"O"+YG++,weakData:{}}})},XG=function(t,i){if(!VG(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!Lg(t,Ar)){if(!jg(t))return"F";if(!i)return"E";zg(t)}return t[Ar].objectID},QG=function(t,i){if(!Lg(t,Ar)){if(!jg(t))return!0;if(!i)return!1;zg(t)}return t[Ar].weakData},ZG=function(t){return qG&&DO&&jg(t)&&!Lg(t,Ar)&&zg(t),t},JG=function(){e9.enable=function(){},DO=!0;var t=Ib.f,i=HG([].splice),e={};e[Ar]=1,t(e).length&&(Ib.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},zG({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:GG.f}))},e9=CG.exports={enable:JG,fastKey:XG,getWeakData:QG,onFreeze:ZG};WG[Ar]=!0;var t9=U,r9=Ie,n9=Cu,i9=se,a9=Nr,o9=Zn,s9=Dg,u9=Ce,l9=Je,c9=Xn,h9=Rt.f,d9=ra.forEach,f9=Ke,MO=ta,v9=MO.set,p9=MO.getterFor,NO=function(t,i,e){var r=t.indexOf("Map")!==-1,n=t.indexOf("Weak")!==-1,a=r?"set":"add",o=r9[t],s=o&&o.prototype,u={},l;if(!f9||!u9(o)||!(n||s.forEach&&!i9(function(){new o().entries().next()})))l=e.getConstructor(i,t,r,a),n9.enable();else{l=i(function(d,f){v9(s9(d,c),{type:t,collection:new o}),f!=null&&o9(f,d[a],{that:d,AS_ENTRIES:r})});var c=l.prototype,h=p9(t);d9(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(d){var f=d=="add"||d=="set";d in s&&!(n&&d=="clear")&&a9(c,d,function(v,p){var b=h(this).collection;if(!f&&n&&!l9(v))return d=="get"?void 0:!1;var g=b[d](v===0?0:v,p);return f?this:g})}),n||h9(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}return c9(l,t,!1,!0),u[t]=l,t9({global:!0,forced:!0},u),n||e.setStrong(l,t,r),l},g9=ea,y9=function(t,i,e){for(var r in i)e&&e.unsafe&&t[r]?t[r]=i[r]:g9(t,r,i[r],e);return t},m9=Yn,$9=hg,Cb=y9,b9=hn,w9=Dg,_9=uo,E9=Zn,S9=mg,Ts=$g,O9=hO,$a=Ke,Ab=Cu.fastKey,FO=ta,Rb=FO.set,Xc=FO.getterFor,BO={getConstructor:function(t,i,e,r){var n=t(function(l,c){w9(l,a),Rb(l,{type:i,index:m9(null),first:void 0,last:void 0,size:0}),$a||(l.size=0),_9(c)||E9(c,l[r],{that:l,AS_ENTRIES:e})}),a=n.prototype,o=Xc(i),s=function(l,c,h){var d=o(l),f=u(l,c),v,p;return f?f.value=h:(d.last=f={index:p=Ab(c,!0),key:c,value:h,previous:v=d.last,next:void 0,removed:!1},d.first||(d.first=f),v&&(v.next=f),$a?d.size++:l.size++,p!=="F"&&(d.index[p]=f)),l},u=function(l,c){var h=o(l),d=Ab(c),f;if(d!=="F")return h.index[d];for(f=h.first;f;f=f.next)if(f.key==c)return f};return Cb(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,$a?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),$a?h.size--:c.size--}return!!d},forEach:function(c){for(var h=o(this),d=b9(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)}}),Cb(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)}}),$a&&$9(a,"size",{configurable:!0,get:function(){return o(this).size}}),n},setStrong:function(t,i,e){var r=i+" Iterator",n=Xc(i),a=Xc(r);S9(t,i,function(o,s){Rb(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,Ts(void 0,!0)):s=="keys"?Ts(u.key,!1):s=="values"?Ts(u.value,!1):Ts([u.key,u.value],!1)},e?"entries":"values",!e,!0),O9(i)}},T9=NO,x9=BO;T9("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},x9);var P9=ye,k9=P9.Map,I9=k9,C9=I9;(function(t){t.exports=C9})(IG);var LO=J(Hf),Wf={},A9={get exports(){return Wf},set exports(t){Wf=t}},R9=U,D9=ra.some,M9=Eo,N9=M9("some");R9({target:"Array",proto:!0,forced:!N9},{some:function(i){return D9(this,i,arguments.length>1?arguments[1]:void 0)}});var F9=Ve,B9=F9("Array").some,L9=Ee,j9=B9,Qc=Array.prototype,z9=function(t){var i=t.some;return t===Qc||L9(Qc,t)&&i===Qc.some?j9:i},H9=z9,W9=H9;(function(t){t.exports=W9})(A9);var V9=J(Wf),Vf={},U9={get exports(){return Vf},set exports(t){Vf=t}},G9=Ve,K9=G9("Array").keys,q9=K9,Y9=q9,X9=Fr,Q9=We,Z9=Ee,J9=Y9,Zc=Array.prototype,e7={DOMTokenList:!0,NodeList:!0},t7=function(t){var i=t.keys;return t===Zc||Z9(Zc,t)&&i===Zc.keys||Q9(e7,X9(t))?J9:i};(function(t){t.exports=t7})(U9);var hi=J(Vf),Uf={},r7={get exports(){return Uf},set exports(t){Uf=t}},Db=eE,n7=Math.floor,Gf=function(t,i){var e=t.length,r=n7(e/2);return e<8?i7(t,i):a7(t,Gf(Db(t,0,r),i),Gf(Db(t,r),i),i)},i7=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},a7=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},o7=Gf,s7=cn,Mb=s7.match(/firefox\/(\d+)/i),u7=!!Mb&&+Mb[1],l7=cn,c7=/MSIE|Trident/.test(l7),h7=cn,Nb=h7.match(/AppleWebKit\/(\d+)\./),d7=!!Nb&&+Nb[1],f7=U,jO=fe,v7=Pt,p7=kt,Fb=Mt,g7=vS,Bb=$r,Hg=se,y7=o7,m7=Eo,Lb=u7,$7=c7,jb=Xi,zb=d7,Yr=[],Hb=jO(Yr.sort),b7=jO(Yr.push),w7=Hg(function(){Yr.sort(void 0)}),_7=Hg(function(){Yr.sort(null)}),E7=m7("sort"),zO=!Hg(function(){if(jb)return jb<70;if(!(Lb&&Lb>3)){if($7)return!0;if(zb)return zb<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++)Yr.push({k:e+n,v:r})}for(Yr.sort(function(a,o){return o.v-a.v}),n=0;n<Yr.length;n++)e=Yr[n].k.charAt(0),t.charAt(t.length-1)!==e&&(t+=e);return t!=="DGBEFHACIJK"}}),S7=w7||!_7||!E7||!zO,O7=function(t){return function(i,e){return e===void 0?-1:i===void 0?1:t!==void 0?+t(i,e)||0:Bb(i)>Bb(e)?1:-1}};f7({target:"Array",proto:!0,forced:S7},{sort:function(i){i!==void 0&&v7(i);var e=p7(this);if(zO)return i===void 0?Hb(e):Hb(e,i);var r=[],n=Fb(e),a,o;for(o=0;o<n;o++)o in e&&b7(r,e[o]);for(y7(r,O7(i)),a=Fb(r),o=0;o<a;)e[o]=r[o++];for(;o<n;)g7(e,o++);return e}});var T7=Ve,x7=T7("Array").sort,P7=Ee,k7=x7,Jc=Array.prototype,I7=function(t){var i=t.sort;return t===Jc||P7(Jc,t)&&i===Jc.sort?k7:i},C7=I7,A7=C7;(function(t){t.exports=A7})(r7);var Kf=J(Uf),qf={},R7={get exports(){return qf},set exports(t){qf=t}},D7=Ve,M7=D7("Array").values,N7=M7,F7=N7,B7=Fr,L7=We,j7=Ee,z7=F7,eh=Array.prototype,H7={DOMTokenList:!0,NodeList:!0},W7=function(t){var i=t.values;return t===eh||j7(eh,t)&&i===eh.values||L7(H7,B7(t))?z7:i};(function(t){t.exports=W7})(R7);var Wb=J(qf),Yf={},V7={get exports(){return Yf},set exports(t){Yf=t}};(function(t){t.exports=jE})(V7);var Ci=J(Yf),Xf={},U7={get exports(){return Xf},set exports(t){Xf=t}},G7=Ve,K7=G7("Array").entries,q7=K7,Y7=q7,X7=Fr,Q7=We,Z7=Ee,J7=Y7,th=Array.prototype,eK={DOMTokenList:!0,NodeList:!0},tK=function(t){var i=t.entries;return t===th||Z7(th,t)&&i===th.entries||Q7(eK,X7(t))?J7:i};(function(t){t.exports=tK})(U7);var rK=J(Xf);let xs;const nK=new Uint8Array(16);function iK(){if(!xs&&(xs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!xs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return xs(nK)}const at=[];for(let t=0;t<256;++t)at.push((t+256).toString(16).slice(1));function aK(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 oK=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Vb={randomUUID:oK};function sK(t,i,e){if(Vb.randomUUID&&!i&&!t)return Vb.randomUUID();t=t||{};const r=t.random||(t.rng||iK)();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 aK(r)}function Ub(t){return typeof t=="string"||typeof t=="number"}var uK=function(){function t(i){Ku(this,t),Ne(this,"delay",void 0),Ne(this,"max",void 0),Ne(this,"_queue",[]),Ne(this,"_timeout",null),Ne(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(i)}return ll(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=ZH(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e,r;Bn(e=pS(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}(),lK=function(){function t(){Ku(this,t),Ne(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),Ne(this,"subscribe",t.prototype.on),Ne(this,"unsubscribe",t.prototype.off)}return ll(t,[{key:"_trigger",value:function(e,r,n){var a,o;if(e==="*")throw new Error("Cannot trigger event *");Bn(a=dl(o=[]).call(o,Et(this._subscribers[e]),Et(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]=wi(n=this._subscribers[e]).call(n,function(a){return a!==r})}}]),t}(),Qf={},cK={get exports(){return Qf},set exports(t){Qf=t}},hK=NO,dK=BO;hK("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},dK);var fK=ye,vK=fK.Set,pK=vK,gK=pK;(function(t){t.exports=gK})(cK);var rh=J(Qf),Zf={},yK={get exports(){return Zf},set exports(t){Zf=t}},Jf={},mK={get exports(){return Jf},set exports(t){Jf=t}},$K=wg,bK=$K,wK=bK,_K=wK,EK=_K,SK=EK,OK=SK,TK=OK;(function(t){t.exports=TK})(mK);(function(t){t.exports=Jf})(yK);var nh=J(Zf),HO;function ur(t,i){var e=typeof hl<"u"&&Oo(t)||t["@@iterator"];if(!e){if(Ct(t)||(e=xK(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 xK(t,i){var e;if(t){if(typeof t=="string")return Gb(t,i);var r=fl(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return _g(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gb(t,i)}}function Gb(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}HO=Ci;var Kb=function(){function t(i){Ku(this,t),Ne(this,"_pairs",void 0),this._pairs=i}return ll(t,[{key:HO,value:bt.mark(function i(){var e,r,n,a,o;return bt.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:e=ur(this._pairs),u.prev=1,e.s();case 3:if((r=e.n()).done){u.next=9;break}return n=$t(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:bt.mark(function i(){var e,r,n,a,o;return bt.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:e=ur(this._pairs),u.prev=1,e.s();case 3:if((r=e.n()).done){u.next=9;break}return n=$t(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:bt.mark(function i(){var e,r,n,a;return bt.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=ur(this._pairs),s.prev=1,e.s();case 3:if((r=e.n()).done){s.next=9;break}return n=$t(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:bt.mark(function i(){var e,r,n,a;return bt.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=ur(this._pairs),s.prev=1,e.s();case 3:if((r=e.n()).done){s.next=9;break}return n=$t(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 Yt(e=Et(this._pairs)).call(e,function(r){return r[0]})}},{key:"toItemArray",value:function(){var e;return Yt(e=Et(this._pairs)).call(e,function(r){return r[1]})}},{key:"toEntryArray",value:function(){return Et(this._pairs)}},{key:"toObjectMap",value:function(){var e=PH(null),r=ur(this._pairs),n;try{for(r.s();!(n=r.n()).done;){var a=$t(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 LO(this._pairs)}},{key:"toIdSet",value:function(){return new rh(this.toIdArray())}},{key:"toItemSet",value:function(){return new rh(this.toItemArray())}},{key:"cache",value:function(){return new t(Et(this._pairs))}},{key:"distinct",value:function(e){var r=new rh,n=ur(this._pairs),a;try{for(n.s();!(a=n.n()).done;){var o=$t(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(Ne({},Ci,bt.mark(function n(){var a,o,s,u,l;return bt.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:a=ur(r),h.prev=1,a.s();case 3:if((o=a.n()).done){h.next=10;break}if(s=$t(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=ur(this._pairs),n;try{for(r.s();!(n=r.n()).done;){var a=$t(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(Ne({},Ci,bt.mark(function n(){var a,o,s,u,l;return bt.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:a=ur(r),h.prev=1,a.s();case 3:if((o=a.n()).done){h.next=9;break}return s=$t(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=nh(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=$t(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=nh(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=$t(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=ur(this._pairs),a;try{for(n.s();!(a=n.n()).done;){var o=$t(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(Ne({},Ci,function(){var n;return nh(Kf(n=Et(r._pairs)).call(n,function(a,o){var s=$t(a,2),u=s[0],l=s[1],c=$t(o,2),h=c[0],d=c[1];return e(l,d,u,h)}))}))}}]),t}();function qb(t,i){var e=Sg(t);if(s$){var r=s$(t);i&&(r=wi(r).call(r,function(n){return nS(t,n).enumerable})),e.push.apply(e,r)}return e}function Yb(t){for(var i=1;i<arguments.length;i++){var e,r,n=arguments[i]!=null?arguments[i]:{};i%2?Bn(e=qb(Object(n),!0)).call(e,function(a){Ne(t,a,n[a])}):u$?Rj(t,u$(n)):Bn(r=qb(Object(n))).call(r,function(a){Mj(t,a,nS(n,a))})}return t}function ih(t,i){var e=typeof hl<"u"&&Oo(t)||t["@@iterator"];if(!e){if(Ct(t)||(e=PK(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 PK(t,i){var e;if(t){if(typeof t=="string")return Xb(t,i);var r=fl(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return _g(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xb(t,i)}}function Xb(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 kK(t){var i=IK();return function(){var r=xu(t),n;if(i){var a=xu(this).constructor;n=Qs(r,arguments,a)}else n=r.apply(this,arguments);return K6(this,n)}}function IK(){if(typeof Reflect>"u"||!Qs||Qs.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Qs(Boolean,[],function(){})),!0}catch{return!1}}function CK(t,i){return t[i]==null&&(t[i]=sK()),t}var Au=function(t){G6(e,t);var i=kK(e);function e(r,n){var a;return Ku(this,e),a=i.call(this),Ne(bn(a),"flush",void 0),Ne(bn(a),"length",void 0),Ne(bn(a),"_options",void 0),Ne(bn(a),"_data",void 0),Ne(bn(a),"_idProp",void 0),Ne(bn(a),"_queue",null),r&&!Ct(r)&&(n=r,r=[]),a._options=n||{},a._data=new LO,a.length=0,a._idProp=a._options.fieldId||"id",r&&r.length&&a.add(r),a.setOptions(n),a}return ll(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=uK.extend(this,{replace:["add","update","remove"]})),n.queue&&st(n.queue)==="object"&&this._queue.setOptions(n.queue)))}},{key:"add",value:function(n,a){var o=this,s=[],u;if(Ct(n)){var l=Yt(n).call(n,function(d){return d[o._idProp]});if(V9(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&&st(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(g){var y=g[h];if(y!=null&&o._data.has(y)){var $=g,m=P5({},o._data.get(y)),w=o._updateItem($);u.push(w),c.push($),l.push(m)}else{var E=o._addItem(g);s.push(E)}};if(Ct(n))for(var f=0,v=n.length;f<v;f++)n[f]&&st(n[f])==="object"?d(n[f]):console.warn("Ignoring input item, which is not an object at index "+f);else if(n&&st(n)==="object")d(n);else throw new Error("Unknown dataType");if(s.length&&this._trigger("add",{items:s},a),u.length){var p={items:u,oldData:l,data:c};this._trigger("update",p,a)}return dl(s).call(s,u)}},{key:"updateOnly",value:function(n,a){var o,s=this;Ct(n)||(n=[n]);var u=Yt(o=Yt(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=r6(h,d);return s._data.set(f,v),{id:f,oldData:h,updatedData:v}});if(u.length){var l={items:Yt(u).call(u,function(c){return c.id}),oldData:Yt(u).call(u,function(c){return c.oldData}),data:Yt(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;Ub(n)?(o=n,u=a):Ct(n)?(s=n,u=a):u=n;var l=u&&u.returnType==="Object"?"Object":"Array",c=u&&wi(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 p=0,b=s.length;p<b;p++)d=this._data.get(s[p]),d!=null&&(!c||c(d))&&h.push(d);else{var g;f=Et(hi(g=this._data).call(g));for(var y=0,$=f.length;y<$;y++)v=f[y],d=this._data.get(v),d!=null&&(!c||c(d))&&h.push(d)}if(u&&u.order&&o==null&&this._sort(h,u.order),u&&u.fields){var m=u.fields;if(o!=null&&d!=null)d=this._filterFields(d,m);else for(var w=0,E=h.length;w<E;w++)h[w]=this._filterFields(h[w],m)}if(l=="Object"){for(var T={},O=0,_=h.length;O<_;O++){var S=h[O],I=S[this._idProp];T[I]=S}return T}else if(o!=null){var L;return(L=d)!==null&&L!==void 0?L:null}else return h}},{key:"getIds",value:function(n){var a=this._data,o=n&&wi(n),s=n&&n.order,u=Et(hi(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 p=0,b=c.length;p<b;p++)l.push(c[p][this._idProp])}else for(var g=0,y=u.length;g<y;g++){var $=u[g],m=this._data.get($);m!=null&&o(m)&&l.push(m[this._idProp])}else if(s){for(var w=[],E=0,T=u.length;E<T;E++){var O=u[E];w.push(a.get(O))}this._sort(w,s);for(var _=0,S=w.length;_<S;_++)l.push(w[_][this._idProp])}else for(var I=0,L=u.length;I<L;I++){var B=u[I],Q=a.get(B);Q!=null&&l.push(Q[this._idProp])}return l}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(n,a){var o=a&&wi(a),s=this._data,u=Et(hi(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,p=u.length;v<p;v++){var b=u[v],g=this._data.get(b);g!=null&&(!o||o(g))&&n(g,b)}}},{key:"map",value:function(n,a){for(var o=a&&wi(a),s=[],u=this._data,l=Et(hi(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&&sB(o=Ct(a)?a:Sg(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;Kf(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")Kf(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=Ct(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(Ub(n)?a=n:n&&st(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=Et(hi(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=ih(Wb(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=ih(Wb(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=Et(hi(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,p=0;p<u;p++)if(s[p]==f){v=!0;break}!v&&f!==void 0&&(s[u]=f,u++)}return s}},{key:"_addItem",value:function(n){var a=CK(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: "+DH(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,Yb(Yb({},o),n)),a}},{key:"stream",value:function(n){if(n){var a=this._data;return new Kb(Ne({},Ci,bt.mark(function s(){var u,l,c,h;return bt.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:u=ih(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 Kb(Ne({},Ci,GE(o=rK(this._data)).call(o,this._data)))}}}]),e}(lK);function AK(t,i){return st(i)==="object"&&i!==null&&t===i.idProp&&typeof i.add=="function"&&typeof i.clear=="function"&&typeof i.distinct=="function"&&typeof Bn(i)=="function"&&typeof i.get=="function"&&typeof i.getDataSet=="function"&&typeof i.getIds=="function"&&typeof i.length=="number"&&typeof Yt(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 WO(t,i){return st(i)==="object"&&i!==null&&t===i.idProp&&typeof Bn(i)=="function"&&typeof i.get=="function"&&typeof i.getDataSet=="function"&&typeof i.getIds=="function"&&typeof i.length=="number"&&typeof Yt(i)=="function"&&typeof i.off=="function"&&typeof i.on=="function"&&typeof i.stream=="function"&&AK(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={},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
62
+ */var ev=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 tv={},RK={get exports(){return tv},set exports(t){tv=t}},Ps=function(t){return t&&t.Math==Math&&t},Ue=Ps(typeof globalThis=="object"&&globalThis)||Ps(typeof window=="object"&&window)||Ps(typeof self=="object"&&self)||Ps(typeof ev=="object"&&ev)||function(){return this}()||Function("return this")(),ue=function(t){try{return!!t()}catch{return!0}},DK=ue,Ro=!DK(function(){var t=function(){}.bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),MK=Ro,VO=Function.prototype,Qb=VO.apply,Zb=VO.call,Do=typeof Reflect=="object"&&Reflect.apply||(MK?Zb.bind(Qb):function(){return Zb.apply(Qb,arguments)}),UO=Ro,GO=Function.prototype,rv=GO.call,NK=UO&&GO.bind.bind(rv,rv),le=UO?NK:function(t){return function(){return rv.apply(t,arguments)}},KO=le,FK=KO({}.toString),BK=KO("".slice),Lr=function(t){return BK(FK(t),8,-1)},LK=Lr,jK=le,Wg=function(t){if(LK(t)==="Function")return jK(t)},nv=typeof document=="object"&&document.all,zK=typeof nv>"u"&&nv!==void 0,qO={all:nv,IS_HTMLDDA:zK},YO=qO,HK=YO.all,et=YO.IS_HTMLDDA?function(t){return typeof t=="function"||t===HK}:function(t){return typeof t=="function"},sa={},WK=ue,qe=!WK(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),VK=Ro,ks=Function.prototype.call,Nt=VK?ks.bind(ks):function(){return ks.apply(ks,arguments)},Mo={},XO={}.propertyIsEnumerable,QO=Object.getOwnPropertyDescriptor,UK=QO&&!XO.call({1:2},1);Mo.f=UK?function(i){var e=QO(this,i);return!!e&&e.enumerable}:XO;var No=function(t,i){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:i}},GK=le,KK=ue,qK=Lr,ah=Object,YK=GK("".split),ml=KK(function(){return!ah("z").propertyIsEnumerable(0)})?function(t){return qK(t)=="String"?YK(t,""):ah(t)}:ah,Fo=function(t){return t==null},XK=Fo,QK=TypeError,Bo=function(t){if(XK(t))throw QK("Can't call method on "+t);return t},ZK=ml,JK=Bo,ir=function(t){return ZK(JK(t))},Jb=et,ZO=qO,eq=ZO.all,tt=ZO.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:Jb(t)||t===eq}:function(t){return typeof t=="object"?t!==null:Jb(t)},ae={},oh=ae,sh=Ue,tq=et,e1=function(t){return tq(t)?t:void 0},Ut=function(t,i){return arguments.length<2?e1(oh[t])||e1(sh[t]):oh[t]&&oh[t][i]||sh[t]&&sh[t][i]},rq=le,Be=rq({}.isPrototypeOf),Lo=typeof navigator<"u"&&String(navigator.userAgent)||"",JO=Ue,uh=Lo,t1=JO.process,r1=JO.Deno,n1=t1&&t1.versions||r1&&r1.version,i1=n1&&n1.v8,Xt,Ru;i1&&(Xt=i1.split("."),Ru=Xt[0]>0&&Xt[0]<4?1:+(Xt[0]+Xt[1]));!Ru&&uh&&(Xt=uh.match(/Edge\/(\d+)/),(!Xt||Xt[1]>=74)&&(Xt=uh.match(/Chrome\/(\d+)/),Xt&&(Ru=+Xt[1])));var jo=Ru,a1=jo,nq=ue,ua=!!Object.getOwnPropertySymbols&&!nq(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&a1&&a1<41}),iq=ua,eT=iq&&!Symbol.sham&&typeof Symbol.iterator=="symbol",aq=Ut,oq=et,sq=Be,uq=eT,lq=Object,zo=uq?function(t){return typeof t=="symbol"}:function(t){var i=aq("Symbol");return oq(i)&&sq(i.prototype,lq(t))},cq=String,la=function(t){try{return cq(t)}catch{return"Object"}},hq=et,dq=la,fq=TypeError,Jn=function(t){if(hq(t))return t;throw fq(dq(t)+" is not a function")},vq=Jn,pq=Fo,Vg=function(t,i){var e=t[i];return pq(e)?void 0:vq(e)},lh=Nt,ch=et,hh=tt,gq=TypeError,yq=function(t,i){var e,r;if(i==="string"&&ch(e=t.toString)&&!hh(r=lh(e,t))||ch(e=t.valueOf)&&!hh(r=lh(e,t))||i!=="string"&&ch(e=t.toString)&&!hh(r=lh(e,t)))return r;throw gq("Can't convert object to primitive value")},on={},mq={get exports(){return on},set exports(t){on=t}},o1=Ue,$q=Object.defineProperty,bq=function(t,i){try{$q(o1,t,{value:i,configurable:!0,writable:!0})}catch{o1[t]=i}return i},wq=Ue,_q=bq,s1="__core-js_shared__",Eq=wq[s1]||_q(s1,{}),Ug=Eq,u1=Ug;(mq.exports=function(t,i){return u1[t]||(u1[t]=i!==void 0?i:{})})("versions",[]).push({version:"3.29.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Sq=Bo,Oq=Object,Ft=function(t){return Oq(Sq(t))},Tq=le,xq=Ft,Pq=Tq({}.hasOwnProperty),rt=Object.hasOwn||function(i,e){return Pq(xq(i),e)},kq=le,Iq=0,Cq=Math.random(),Aq=kq(1 .toString),$l=function(t){return"Symbol("+(t===void 0?"":t)+")_"+Aq(++Iq+Cq,36)},Rq=Ue,Dq=on,l1=rt,Mq=$l,Nq=ua,Fq=eT,Ti=Rq.Symbol,dh=Dq("wks"),Bq=Fq?Ti.for||Ti:Ti&&Ti.withoutSetter||Mq,Le=function(t){return l1(dh,t)||(dh[t]=Nq&&l1(Ti,t)?Ti[t]:Bq("Symbol."+t)),dh[t]},Lq=Nt,c1=tt,h1=zo,jq=Vg,zq=yq,Hq=Le,Wq=TypeError,Vq=Hq("toPrimitive"),Uq=function(t,i){if(!c1(t)||h1(t))return t;var e=jq(t,Vq),r;if(e){if(i===void 0&&(i="default"),r=Lq(e,t,i),!c1(r)||h1(r))return r;throw Wq("Can't convert object to primitive value")}return i===void 0&&(i="number"),zq(t,i)},Gq=Uq,Kq=zo,bl=function(t){var i=Gq(t,"string");return Kq(i)?i:i+""},qq=Ue,d1=tt,iv=qq.document,Yq=d1(iv)&&d1(iv.createElement),tT=function(t){return Yq?iv.createElement(t):{}},Xq=qe,Qq=ue,Zq=tT,rT=!Xq&&!Qq(function(){return Object.defineProperty(Zq("div"),"a",{get:function(){return 7}}).a!=7}),Jq=qe,eY=Nt,tY=Mo,rY=No,nY=ir,iY=bl,aY=rt,oY=rT,f1=Object.getOwnPropertyDescriptor;sa.f=Jq?f1:function(i,e){if(i=nY(i),e=iY(e),oY)try{return f1(i,e)}catch{}if(aY(i,e))return rY(!eY(tY.f,i,e),i[e])};var sY=ue,uY=et,lY=/#|\.prototype\./,Ho=function(t,i){var e=hY[cY(t)];return e==fY?!0:e==dY?!1:uY(i)?sY(i):!!i},cY=Ho.normalize=function(t){return String(t).replace(lY,".").toLowerCase()},hY=Ho.data={},dY=Ho.NATIVE="N",fY=Ho.POLYFILL="P",vY=Ho,v1=Wg,pY=Jn,gY=Ro,yY=v1(v1.bind),Wo=function(t,i){return pY(t),i===void 0?t:gY?yY(t,i):function(){return t.apply(i,arguments)}},Gt={},mY=qe,$Y=ue,nT=mY&&$Y(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),bY=tt,wY=String,_Y=TypeError,Bt=function(t){if(bY(t))return t;throw _Y(wY(t)+" is not an object")},EY=qe,SY=rT,OY=nT,Is=Bt,p1=bl,TY=TypeError,fh=Object.defineProperty,xY=Object.getOwnPropertyDescriptor,vh="enumerable",ph="configurable",gh="writable";Gt.f=EY?OY?function(i,e,r){if(Is(i),e=p1(e),Is(r),typeof i=="function"&&e==="prototype"&&"value"in r&&gh in r&&!r[gh]){var n=xY(i,e);n&&n[gh]&&(i[e]=r.value,r={configurable:ph in r?r[ph]:n[ph],enumerable:vh in r?r[vh]:n[vh],writable:!1})}return fh(i,e,r)}:fh:function(i,e,r){if(Is(i),e=p1(e),Is(r),SY)try{return fh(i,e,r)}catch{}if("get"in r||"set"in r)throw TY("Accessors not supported");return"value"in r&&(i[e]=r.value),i};var PY=qe,kY=Gt,IY=No,ca=PY?function(t,i,e){return kY.f(t,i,IY(1,e))}:function(t,i,e){return t[i]=e,t},Cs=Ue,CY=Do,AY=Wg,RY=et,DY=sa.f,MY=vY,di=ae,NY=Wo,fi=ca,g1=rt,FY=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 CY(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?Cs:n?Cs[e]:(Cs[e]||{}).prototype,s=r?di:di[e]||fi(di,e,{})[e],u=s.prototype,l,c,h,d,f,v,p,b,g;for(d in i)l=MY(r?d:e+(n?".":"#")+d,t.forced),c=!l&&o&&g1(o,d),v=s[d],c&&(t.dontCallGetSet?(g=DY(o,d),p=g&&g.value):p=o[d]),f=c&&p?p:i[d],!(c&&typeof v==typeof f)&&(t.bind&&c?b=NY(f,Cs):t.wrap&&c?b=FY(f):a&&RY(f)?b=AY(f):b=f,(t.sham||f&&f.sham||v&&v.sham)&&fi(b,"sham",!0),fi(s,d,b),a&&(h=e+"Prototype",g1(di,h)||fi(di,h,{}),fi(di[h],d,f),t.real&&u&&(l||!u[d])&&fi(u,d,f)))},BY=Math.ceil,LY=Math.floor,jY=Math.trunc||function(i){var e=+i;return(e>0?LY:BY)(e)},zY=jY,wl=function(t){var i=+t;return i!==i||i===0?0:zY(i)},HY=wl,WY=Math.max,VY=Math.min,Vo=function(t,i){var e=HY(t);return e<0?WY(e+i,0):VY(e,i)},UY=wl,GY=Math.min,KY=function(t){return t>0?GY(UY(t),9007199254740991):0},qY=KY,ar=function(t){return qY(t.length)},YY=ir,XY=Vo,QY=ar,y1=function(t){return function(i,e,r){var n=YY(i),a=QY(n),o=XY(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}},Gg={includes:y1(!0),indexOf:y1(!1)},Uo={},ZY=le,yh=rt,JY=ir,eX=Gg.indexOf,tX=Uo,m1=ZY([].push),iT=function(t,i){var e=JY(t),r=0,n=[],a;for(a in e)!yh(tX,a)&&yh(e,a)&&m1(n,a);for(;i.length>r;)yh(e,a=i[r++])&&(~eX(n,a)||m1(n,a));return n},Kg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],rX=iT,nX=Kg,Go=Object.keys||function(i){return rX(i,nX)},Ko={};Ko.f=Object.getOwnPropertySymbols;var $1=qe,iX=le,aX=Nt,oX=ue,mh=Go,sX=Ko,uX=Mo,lX=Ft,cX=ml,vi=Object.assign,b1=Object.defineProperty,hX=iX([].concat),dX=!vi||oX(function(){if($1&&vi({b:1},vi(b1({},"a",{enumerable:!0,get:function(){b1(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}),vi({},t)[e]!=7||mh(vi({},i)).join("")!=r})?function(i,e){for(var r=lX(i),n=arguments.length,a=1,o=sX.f,s=uX.f;n>a;)for(var u=cX(arguments[a++]),l=o?hX(mh(u),o(u)):mh(u),c=l.length,h=0,d;c>h;)d=l[h++],(!$1||aX(s,u,d))&&(r[d]=u[d]);return r}:vi,fX=q,w1=dX;fX({target:"Object",stat:!0,arity:2,forced:Object.assign!==w1},{assign:w1});var vX=ae,pX=vX.Object.assign,gX=pX,yX=gX;(function(t){t.exports=yX})(RK);var ze=V(tv),av={},mX={get exports(){return av},set exports(t){av=t}},$X=le,_l=$X([].slice),aT=le,bX=Jn,wX=tt,_X=rt,_1=_l,EX=Ro,oT=Function,SX=aT([].concat),OX=aT([].join),$h={},TX=function(t,i,e){if(!_X($h,i)){for(var r=[],n=0;n<i;n++)r[n]="a["+n+"]";$h[i]=oT("C,a","return new C("+OX(r,",")+")")}return $h[i](t,e)},sT=EX?oT.bind:function(i){var e=bX(this),r=e.prototype,n=_1(arguments,1),a=function(){var s=SX(n,_1(arguments));return this instanceof a?TX(e,s.length,s):e.apply(i,s)};return wX(r)&&(a.prototype=r),a},xX=q,E1=sT;xX({target:"Function",proto:!0,forced:Function.bind!==E1},{bind:E1});var PX=ae,nt=function(t){return PX[t+"Prototype"]},kX=nt,IX=kX("Function").bind,CX=Be,AX=IX,bh=Function.prototype,RX=function(t){var i=t.bind;return t===bh||CX(bh,t)&&i===bh.bind?AX:i},DX=RX,uT=DX;(function(t){t.exports=uT})(mX);var A=V(av);function qg(t,i,e,r){t.beginPath(),t.arc(i,e,r,0,2*Math.PI,!1),t.closePath()}function MX(t,i,e,r){t.beginPath(),t.rect(i-r,e-r,r*2,r*2),t.closePath()}function NX(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 FX(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 LX(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 lT(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 ov(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 cT(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,p=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,p),t.bezierCurveTo(h,p+c,f+l,b,f,b),t.bezierCurveTo(f-l,b,i,p+c,i,p),t.lineTo(i,v)}function hT(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 jX(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 S1={circle:qg,dashedLine:hT,database:cT,diamond:LX,ellipse:ov,ellipse_vis:ov,hexagon:jX,roundRect:lT,square:MX,star:BX,triangle:NX,triangleDown:FX};function zX(t){return Object.prototype.hasOwnProperty.call(S1,t)?S1[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 sv={},HX={get exports(){return sv},set exports(t){sv=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}})(HX);var dT=sv,uv={},WX={get exports(){return uv},set exports(t){uv=t}},VX=Le,UX=VX("toStringTag"),fT={};fT[UX]="z";var Yg=String(fT)==="[object z]",GX=Yg,KX=et,tu=Lr,qX=Le,YX=qX("toStringTag"),XX=Object,QX=tu(function(){return arguments}())=="Arguments",ZX=function(t,i){try{return t[i]}catch{}},ei=GX?tu:function(t){var i,e,r;return t===void 0?"Undefined":t===null?"Null":typeof(e=ZX(i=XX(t),YX))=="string"?e:QX?tu(i):(r=tu(i))=="Object"&&KX(i.callee)?"Arguments":r},JX=ei,eQ=String,br=function(t){if(JX(t)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return eQ(t)},Xg=le,tQ=wl,rQ=br,nQ=Bo,iQ=Xg("".charAt),O1=Xg("".charCodeAt),aQ=Xg("".slice),T1=function(t){return function(i,e){var r=rQ(nQ(i)),n=tQ(e),a=r.length,o,s;return n<0||n>=a?t?"":void 0:(o=O1(r,n),o<55296||o>56319||n+1===a||(s=O1(r,n+1))<56320||s>57343?t?iQ(r,n):o:t?aQ(r,n,n+2):(o-55296<<10)+(s-56320)+65536)}},oQ={codeAt:T1(!1),charAt:T1(!0)},sQ=Ue,uQ=et,x1=sQ.WeakMap,vT=uQ(x1)&&/native code/.test(String(x1)),lQ=on,cQ=$l,P1=lQ("keys"),El=function(t){return P1[t]||(P1[t]=cQ(t))},hQ=vT,pT=Ue,dQ=tt,fQ=ca,wh=rt,_h=Ug,vQ=El,pQ=Uo,k1="Object already initialized",lv=pT.TypeError,gQ=pT.WeakMap,Du,Qa,Mu,yQ=function(t){return Mu(t)?Qa(t):Du(t,{})},mQ=function(t){return function(i){var e;if(!dQ(i)||(e=Qa(i)).type!==t)throw lv("Incompatible receiver, "+t+" required");return e}};if(hQ||_h.state){var lr=_h.state||(_h.state=new gQ);lr.get=lr.get,lr.has=lr.has,lr.set=lr.set,Du=function(t,i){if(lr.has(t))throw lv(k1);return i.facade=t,lr.set(t,i),i},Qa=function(t){return lr.get(t)||{}},Mu=function(t){return lr.has(t)}}else{var pi=vQ("state");pQ[pi]=!0,Du=function(t,i){if(wh(t,pi))throw lv(k1);return i.facade=t,fQ(t,pi,i),i},Qa=function(t){return wh(t,pi)?t[pi]:{}},Mu=function(t){return wh(t,pi)}}var ti={set:Du,get:Qa,has:Mu,enforce:yQ,getterFor:mQ},cv=qe,$Q=rt,gT=Function.prototype,bQ=cv&&Object.getOwnPropertyDescriptor,Qg=$Q(gT,"name"),wQ=Qg&&function(){}.name==="something",_Q=Qg&&(!cv||cv&&bQ(gT,"name").configurable),yT={EXISTS:Qg,PROPER:wQ,CONFIGURABLE:_Q},Sl={},EQ=qe,SQ=nT,OQ=Gt,TQ=Bt,xQ=ir,PQ=Go;Sl.f=EQ&&!SQ?Object.defineProperties:function(i,e){TQ(i);for(var r=xQ(e),n=PQ(e),a=n.length,o=0,s;a>o;)OQ.f(i,s=n[o++],r[s]);return i};var kQ=Ut,IQ=kQ("document","documentElement"),CQ=Bt,AQ=Sl,I1=Kg,RQ=Uo,DQ=IQ,MQ=tT,NQ=El,C1=">",A1="<",hv="prototype",dv="script",mT=NQ("IE_PROTO"),Eh=function(){},$T=function(t){return A1+dv+C1+t+A1+"/"+dv+C1},R1=function(t){t.write($T("")),t.close();var i=t.parentWindow.Object;return t=null,i},FQ=function(){var t=MQ("iframe"),i="java"+dv+":",e;return t.style.display="none",DQ.appendChild(t),t.src=String(i),e=t.contentWindow.document,e.open(),e.write($T("document.F=Object")),e.close(),e.F},As,ru=function(){try{As=new ActiveXObject("htmlfile")}catch{}ru=typeof document<"u"?document.domain&&As?R1(As):FQ():R1(As);for(var t=I1.length;t--;)delete ru[hv][I1[t]];return ru()};RQ[mT]=!0;var ha=Object.create||function(i,e){var r;return i!==null?(Eh[hv]=CQ(i),r=new Eh,Eh[hv]=null,r[mT]=i):r=ru(),e===void 0?r:AQ.f(r,e)},BQ=ue,bT=!BQ(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),LQ=rt,jQ=et,zQ=Ft,HQ=El,WQ=bT,D1=HQ("IE_PROTO"),fv=Object,VQ=fv.prototype,Ol=WQ?fv.getPrototypeOf:function(t){var i=zQ(t);if(LQ(i,D1))return i[D1];var e=i.constructor;return jQ(e)&&i instanceof e?e.prototype:i instanceof fv?VQ:null},UQ=ca,qo=function(t,i,e,r){return r&&r.enumerable?t[i]=e:UQ(t,i,e),t},GQ=ue,KQ=et,qQ=tt,YQ=ha,M1=Ol,XQ=qo,QQ=Le,vv=QQ("iterator"),wT=!1,Tr,Sh,Oh;[].keys&&(Oh=[].keys(),"next"in Oh?(Sh=M1(M1(Oh)),Sh!==Object.prototype&&(Tr=Sh)):wT=!0);var ZQ=!qQ(Tr)||GQ(function(){var t={};return Tr[vv].call(t)!==t});ZQ?Tr={}:Tr=YQ(Tr);KQ(Tr[vv])||XQ(Tr,vv,function(){return this});var _T={IteratorPrototype:Tr,BUGGY_SAFARI_ITERATORS:wT},JQ=Yg,eZ=ei,tZ=JQ?{}.toString:function(){return"[object "+eZ(this)+"]"},rZ=Yg,nZ=Gt.f,iZ=ca,aZ=rt,oZ=tZ,sZ=Le,N1=sZ("toStringTag"),da=function(t,i,e,r){if(t){var n=e?t:t.prototype;aZ(n,N1)||nZ(n,N1,{configurable:!0,value:i}),r&&!rZ&&iZ(n,"toString",oZ)}},fa={},uZ=_T.IteratorPrototype,lZ=ha,cZ=No,hZ=da,dZ=fa,fZ=function(){return this},vZ=function(t,i,e,r){var n=i+" Iterator";return t.prototype=lZ(uZ,{next:cZ(+!r,e)}),hZ(t,n,!1,!0),dZ[n]=fZ,t},pZ=le,gZ=Jn,yZ=function(t,i,e){try{return pZ(gZ(Object.getOwnPropertyDescriptor(t,i)[e]))}catch{}},mZ=et,$Z=String,bZ=TypeError,wZ=function(t){if(typeof t=="object"||mZ(t))return t;throw bZ("Can't set "+$Z(t)+" as a prototype")},_Z=yZ,EZ=Bt,SZ=wZ,OZ=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,i={},e;try{e=_Z(Object.prototype,"__proto__","set"),e(i,[]),t=i instanceof Array}catch{}return function(n,a){return EZ(n),SZ(a),t?e(n,a):n.__proto__=a,n}}():void 0),TZ=q,xZ=Nt,PZ=yT,kZ=vZ,IZ=Ol,CZ=da,F1=qo,AZ=Le,B1=fa,RZ=_T,DZ=PZ.PROPER,Rs=RZ.BUGGY_SAFARI_ITERATORS,Th=AZ("iterator"),L1="keys",Ds="values",j1="entries",MZ=function(){return this},Zg=function(t,i,e,r,n,a,o){kZ(e,i,r);var s=function(g){if(g===n&&d)return d;if(!Rs&&g in c)return c[g];switch(g){case L1:return function(){return new e(this,g)};case Ds:return function(){return new e(this,g)};case j1:return function(){return new e(this,g)}}return function(){return new e(this)}},u=i+" Iterator",l=!1,c=t.prototype,h=c[Th]||c["@@iterator"]||n&&c[n],d=!Rs&&h||s(n),f=i=="Array"&&c.entries||h,v,p,b;if(f&&(v=IZ(f.call(new t)),v!==Object.prototype&&v.next&&(CZ(v,u,!0,!0),B1[u]=MZ)),DZ&&n==Ds&&h&&h.name!==Ds&&(l=!0,d=function(){return xZ(h,this)}),n)if(p={values:s(Ds),keys:a?d:s(L1),entries:s(j1)},o)for(b in p)(Rs||l||!(b in c))&&F1(c,b,p[b]);else TZ({target:i,proto:!0,forced:Rs||l},p);return o&&c[Th]!==d&&F1(c,Th,d,{name:n}),B1[i]=d,p},Jg=function(t,i){return{value:t,done:i}},NZ=oQ.charAt,FZ=br,ET=ti,BZ=Zg,z1=Jg,ST="String Iterator",LZ=ET.set,jZ=ET.getterFor(ST);BZ(String,"String",function(t){LZ(this,{type:ST,string:FZ(t),index:0})},function(){var i=jZ(this),e=i.string,r=i.index,n;return r>=e.length?z1(void 0,!0):(n=NZ(e,r),i.index+=n.length,z1(n,!1))});var zZ=Nt,H1=Bt,HZ=Vg,OT=function(t,i,e){var r,n;H1(t);try{if(r=HZ(t,"return"),!r){if(i==="throw")throw e;return e}r=zZ(r,t)}catch(a){n=!0,r=a}if(i==="throw")throw e;if(n)throw r;return H1(r),e},WZ=Bt,VZ=OT,UZ=function(t,i,e,r){try{return r?i(WZ(e)[0],e[1]):i(e)}catch(n){VZ(t,"throw",n)}},GZ=Le,KZ=fa,qZ=GZ("iterator"),YZ=Array.prototype,TT=function(t){return t!==void 0&&(KZ.Array===t||YZ[qZ]===t)},XZ=le,QZ=et,pv=Ug,ZZ=XZ(Function.toString);QZ(pv.inspectSource)||(pv.inspectSource=function(t){return ZZ(t)});var JZ=pv.inspectSource,eJ=le,tJ=ue,xT=et,rJ=ei,nJ=Ut,iJ=JZ,PT=function(){},aJ=[],kT=nJ("Reflect","construct"),ey=/^\s*(?:class|function)\b/,oJ=eJ(ey.exec),sJ=!ey.exec(PT),ba=function(i){if(!xT(i))return!1;try{return kT(PT,aJ,i),!0}catch{return!1}},IT=function(i){if(!xT(i))return!1;switch(rJ(i)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return sJ||!!oJ(ey,iJ(i))}catch{return!0}};IT.sham=!0;var Tl=!kT||tJ(function(){var t;return ba(ba.call)||!ba(Object)||!ba(function(){t=!0})||t})?IT:ba,uJ=bl,lJ=Gt,cJ=No,va=function(t,i,e){var r=uJ(i);r in t?lJ.f(t,r,cJ(0,e)):t[r]=e},hJ=ei,W1=Vg,dJ=Fo,fJ=fa,vJ=Le,pJ=vJ("iterator"),xl=function(t){if(!dJ(t))return W1(t,pJ)||W1(t,"@@iterator")||fJ[hJ(t)]},gJ=Nt,yJ=Jn,mJ=Bt,$J=la,bJ=xl,wJ=TypeError,CT=function(t,i){var e=arguments.length<2?bJ(t):i;if(yJ(e))return mJ(gJ(e,t));throw wJ($J(t)+" is not iterable")},_J=Wo,EJ=Nt,SJ=Ft,OJ=UZ,TJ=TT,xJ=Tl,PJ=ar,V1=va,kJ=CT,IJ=xl,U1=Array,CJ=function(i){var e=SJ(i),r=xJ(this),n=arguments.length,a=n>1?arguments[1]:void 0,o=a!==void 0;o&&(a=_J(a,n>2?arguments[2]:void 0));var s=IJ(e),u=0,l,c,h,d,f,v;if(s&&!(this===U1&&TJ(s)))for(d=kJ(e,s),f=d.next,c=r?new this:[];!(h=EJ(f,d)).done;u++)v=o?OJ(d,a,[h.value,u],!0):h.value,V1(c,u,v);else for(l=PJ(e),c=r?new this(l):U1(l);l>u;u++)v=o?a(e[u],u):e[u],V1(c,u,v);return c.length=u,c},AJ=Le,AT=AJ("iterator"),RT=!1;try{var RJ=0,G1={next:function(){return{done:!!RJ++}},return:function(){RT=!0}};G1[AT]=function(){return this},Array.from(G1,function(){throw 2})}catch{}var DJ=function(t,i){if(!i&&!RT)return!1;var e=!1;try{var r={};r[AT]=function(){return{next:function(){return{done:e=!0}}}},t(r)}catch{}return e},MJ=q,NJ=CJ,FJ=DJ,BJ=!FJ(function(t){Array.from(t)});MJ({target:"Array",stat:!0,forced:BJ},{from:NJ});var LJ=ae,jJ=LJ.Array.from,zJ=jJ,DT=zJ;(function(t){t.exports=DT})(WX);var ri=V(uv),gv={},HJ={get exports(){return gv},set exports(t){gv=t}},yv={},WJ={get exports(){return yv},set exports(t){yv=t}},VJ=ir,K1=fa,MT=ti;Gt.f;var UJ=Zg,Ms=Jg,NT="Array Iterator",GJ=MT.set,KJ=MT.getterFor(NT);UJ(Array,"Array",function(t,i){GJ(this,{type:NT,target:VJ(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,Ms(void 0,!0)):e=="keys"?Ms(r,!1):e=="values"?Ms(i[r],!1):Ms([r,i[r]],!1)},"values");K1.Arguments=K1.Array;var qJ=xl,YJ=qJ,XJ={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},QJ=XJ,ZJ=Ue,JJ=ei,eee=ca,q1=fa,tee=Le,Y1=tee("toStringTag");for(var xh in QJ){var X1=ZJ[xh],Ph=X1&&X1.prototype;Ph&&JJ(Ph)!==Y1&&eee(Ph,Y1,xh),q1[xh]=q1.Array}var ree=YJ,nee=ree,iee=nee,aee=iee,oee=aee,see=oee;(function(t){t.exports=see})(WJ);(function(t){t.exports=yv})(HJ);var jr=V(gv),mv={},uee={get exports(){return mv},set exports(t){mv=t}},Yo={},lee=iT,cee=Kg,hee=cee.concat("length","prototype");Yo.f=Object.getOwnPropertyNames||function(i){return lee(i,hee)};var Pl={},Q1=Vo,dee=ar,fee=va,vee=Array,pee=Math.max,FT=function(t,i,e){for(var r=dee(t),n=Q1(i,r),a=Q1(e===void 0?r:e,r),o=vee(pee(a-n,0)),s=0;n<a;n++,s++)fee(o,s,t[n]);return o.length=s,o},gee=Lr,yee=ir,BT=Yo.f,mee=FT,LT=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],$ee=function(t){try{return BT(t)}catch{return mee(LT)}};Pl.f=function(i){return LT&&gee(i)=="Window"?$ee(i):BT(yee(i))};var bee=Gt,ty=function(t,i,e){return bee.f(t,i,e)},Xo={},wee=Le;Xo.f=wee;var Z1=ae,_ee=rt,Eee=Xo,See=Gt.f,Re=function(t){var i=Z1.Symbol||(Z1.Symbol={});_ee(i,t)||See(i,t,{value:Eee.f(t)})},Oee=Nt,Tee=Ut,xee=Le,Pee=qo,jT=function(){var t=Tee("Symbol"),i=t&&t.prototype,e=i&&i.valueOf,r=xee("toPrimitive");i&&!i[r]&&Pee(i,r,function(n){return Oee(e,this)},{arity:1})},kee=Lr,ni=Array.isArray||function(i){return kee(i)=="Array"},J1=ni,Iee=Tl,Cee=tt,Aee=Le,Ree=Aee("species"),ew=Array,Dee=function(t){var i;return J1(t)&&(i=t.constructor,Iee(i)&&(i===ew||J1(i.prototype))?i=void 0:Cee(i)&&(i=i[Ree],i===null&&(i=void 0))),i===void 0?ew:i},Mee=Dee,ry=function(t,i){return new(Mee(t))(i===0?0:i)},Nee=Wo,Fee=le,Bee=ml,Lee=Ft,jee=ar,zee=ry,tw=Fee([].push),Wr=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=Lee(u),f=Bee(d),v=Nee(l,c),p=jee(f),b=0,g=h||zee,y=i?g(u,p):e||o?g(u,0):void 0,$,m;p>b;b++)if((s||b in f)&&($=f[b],m=v($,b,d),t))if(i)y[b]=m;else if(m)switch(t){case 3:return!0;case 5:return $;case 6:return b;case 2:tw(y,$)}else switch(t){case 4:return!1;case 7:tw(y,$)}return a?-1:r||n?n:y}},fn={forEach:Wr(0),map:Wr(1),filter:Wr(2),some:Wr(3),every:Wr(4),find:Wr(5),findIndex:Wr(6),filterReject:Wr(7)},kl=q,ny=Ue,iy=Nt,Hee=le,ji=qe,zi=ua,Wee=ue,Qe=rt,Vee=Be,$v=Bt,Il=ir,ay=bl,Uee=br,bv=No,Za=ha,zT=Go,Gee=Yo,HT=Pl,Kee=Ko,WT=sa,VT=Gt,qee=Sl,UT=Mo,rw=qo,Yee=ty,oy=on,Xee=El,GT=Uo,nw=$l,Qee=Le,Zee=Xo,Jee=Re,ete=jT,tte=da,KT=ti,Cl=fn.forEach,St=Xee("hidden"),Al="Symbol",Ja="prototype",rte=KT.set,iw=KT.getterFor(Al),er=Object[Ja],Rn=ny.Symbol,Ta=Rn&&Rn[Ja],nte=ny.TypeError,kh=ny.QObject,qT=WT.f,On=VT.f,YT=HT.f,ite=UT.f,XT=Hee([].push),Rr=oy("symbols"),Qo=oy("op-symbols"),ate=oy("wks"),wv=!kh||!kh[Ja]||!kh[Ja].findChild,_v=ji&&Wee(function(){return Za(On({},"a",{get:function(){return On(this,"a",{value:7}).a}})).a!=7})?function(t,i,e){var r=qT(er,i);r&&delete er[i],On(t,i,e),r&&t!==er&&On(er,i,r)}:On,Ih=function(t,i){var e=Rr[t]=Za(Ta);return rte(e,{type:Al,tag:t,description:i}),ji||(e.description=i),e},Rl=function(i,e,r){i===er&&Rl(Qo,e,r),$v(i);var n=ay(e);return $v(r),Qe(Rr,n)?(r.enumerable?(Qe(i,St)&&i[St][n]&&(i[St][n]=!1),r=Za(r,{enumerable:bv(0,!1)})):(Qe(i,St)||On(i,St,bv(1,{})),i[St][n]=!0),_v(i,n,r)):On(i,n,r)},sy=function(i,e){$v(i);var r=Il(e),n=zT(r).concat(ex(r));return Cl(n,function(a){(!ji||iy(QT,r,a))&&Rl(i,a,r[a])}),i},ote=function(i,e){return e===void 0?Za(i):sy(Za(i),e)},QT=function(i){var e=ay(i),r=iy(ite,this,e);return this===er&&Qe(Rr,e)&&!Qe(Qo,e)?!1:r||!Qe(this,e)||!Qe(Rr,e)||Qe(this,St)&&this[St][e]?r:!0},ZT=function(i,e){var r=Il(i),n=ay(e);if(!(r===er&&Qe(Rr,n)&&!Qe(Qo,n))){var a=qT(r,n);return a&&Qe(Rr,n)&&!(Qe(r,St)&&r[St][n])&&(a.enumerable=!0),a}},JT=function(i){var e=YT(Il(i)),r=[];return Cl(e,function(n){!Qe(Rr,n)&&!Qe(GT,n)&&XT(r,n)}),r},ex=function(t){var i=t===er,e=YT(i?Qo:Il(t)),r=[];return Cl(e,function(n){Qe(Rr,n)&&(!i||Qe(er,n))&&XT(r,Rr[n])}),r};zi||(Rn=function(){if(Vee(Ta,this))throw nte("Symbol is not a constructor");var i=!arguments.length||arguments[0]===void 0?void 0:Uee(arguments[0]),e=nw(i),r=function(n){this===er&&iy(r,Qo,n),Qe(this,St)&&Qe(this[St],e)&&(this[St][e]=!1),_v(this,e,bv(1,n))};return ji&&wv&&_v(er,e,{configurable:!0,set:r}),Ih(e,i)},Ta=Rn[Ja],rw(Ta,"toString",function(){return iw(this).tag}),rw(Rn,"withoutSetter",function(t){return Ih(nw(t),t)}),UT.f=QT,VT.f=Rl,qee.f=sy,WT.f=ZT,Gee.f=HT.f=JT,Kee.f=ex,Zee.f=function(t){return Ih(Qee(t),t)},ji&&Yee(Ta,"description",{configurable:!0,get:function(){return iw(this).description}}));kl({global:!0,constructor:!0,wrap:!0,forced:!zi,sham:!zi},{Symbol:Rn});Cl(zT(ate),function(t){Jee(t)});kl({target:Al,stat:!0,forced:!zi},{useSetter:function(){wv=!0},useSimple:function(){wv=!1}});kl({target:"Object",stat:!0,forced:!zi,sham:!ji},{create:ote,defineProperty:Rl,defineProperties:sy,getOwnPropertyDescriptor:ZT});kl({target:"Object",stat:!0,forced:!zi},{getOwnPropertyNames:JT});ete();tte(Rn,Al);GT[St]=!0;var ste=ua,tx=ste&&!!Symbol.for&&!!Symbol.keyFor,ute=q,lte=Ut,cte=rt,hte=br,rx=on,dte=tx,Ch=rx("string-to-symbol-registry"),fte=rx("symbol-to-string-registry");ute({target:"Symbol",stat:!0,forced:!dte},{for:function(t){var i=hte(t);if(cte(Ch,i))return Ch[i];var e=lte("Symbol")(i);return Ch[i]=e,fte[e]=i,e}});var vte=q,pte=rt,gte=zo,yte=la,mte=on,$te=tx,aw=mte("symbol-to-string-registry");vte({target:"Symbol",stat:!0,forced:!$te},{keyFor:function(i){if(!gte(i))throw TypeError(yte(i)+" is not a symbol");if(pte(aw,i))return aw[i]}});var bte=le,ow=ni,wte=et,sw=Lr,_te=br,uw=bte([].push),Ete=function(t){if(wte(t))return t;if(ow(t)){for(var i=t.length,e=[],r=0;r<i;r++){var n=t[r];typeof n=="string"?uw(e,n):(typeof n=="number"||sw(n)=="Number"||sw(n)=="String")&&uw(e,_te(n))}var a=e.length,o=!0;return function(s,u){if(o)return o=!1,u;if(ow(this))return u;for(var l=0;l<a;l++)if(e[l]===s)return u}}},Ste=q,nx=Ut,ix=Do,Ote=Nt,Zo=le,ax=ue,lw=et,cw=zo,ox=_l,Tte=Ete,xte=ua,Pte=String,en=nx("JSON","stringify"),Ns=Zo(/./.exec),hw=Zo("".charAt),kte=Zo("".charCodeAt),Ite=Zo("".replace),Cte=Zo(1 .toString),Ate=/[\uD800-\uDFFF]/g,dw=/^[\uD800-\uDBFF]$/,fw=/^[\uDC00-\uDFFF]$/,vw=!xte||ax(function(){var t=nx("Symbol")();return en([t])!="[null]"||en({a:t})!="{}"||en(Object(t))!="{}"}),pw=ax(function(){return en("\uDF06\uD834")!=='"\\udf06\\ud834"'||en("\uDEAD")!=='"\\udead"'}),Rte=function(t,i){var e=ox(arguments),r=Tte(i);if(!(!lw(r)&&(t===void 0||cw(t))))return e[1]=function(n,a){if(lw(r)&&(a=Ote(r,this,Pte(n),a)),!cw(a))return a},ix(en,null,e)},Dte=function(t,i,e){var r=hw(e,i-1),n=hw(e,i+1);return Ns(dw,t)&&!Ns(fw,n)||Ns(fw,t)&&!Ns(dw,r)?"\\u"+Cte(kte(t,0),16):t};en&&Ste({target:"JSON",stat:!0,arity:3,forced:vw||pw},{stringify:function(i,e,r){var n=ox(arguments),a=ix(vw?Rte:en,null,n);return pw&&typeof a=="string"?Ite(a,Ate,Dte):a}});var Mte=q,Nte=ua,Fte=ue,sx=Ko,Bte=Ft,Lte=!Nte||Fte(function(){sx.f(1)});Mte({target:"Object",stat:!0,forced:Lte},{getOwnPropertySymbols:function(i){var e=sx.f;return e?e(Bte(i)):[]}});var jte=ae,zte=jte.Object.getOwnPropertySymbols,Hte=zte,Wte=Hte;(function(t){t.exports=Wte})(uee);var sn=V(mv),Ev={},Vte={get exports(){return Ev},set exports(t){Ev=t}},Sv={},Ute={get exports(){return Sv},set exports(t){Sv=t}},Gte=q,Kte=ue,qte=ir,ux=sa.f,lx=qe,Yte=!lx||Kte(function(){ux(1)});Gte({target:"Object",stat:!0,forced:Yte,sham:!lx},{getOwnPropertyDescriptor:function(i,e){return ux(qte(i),e)}});var Xte=ae,cx=Xte.Object,Qte=Ute.exports=function(i,e){return cx.getOwnPropertyDescriptor(i,e)};cx.getOwnPropertyDescriptor.sham&&(Qte.sham=!0);var Zte=Sv,hx=Zte;(function(t){t.exports=hx})(Vte);var vn=V(Ev),Ov={},Jte={get exports(){return Ov},set exports(t){Ov=t}},ere=Ut,tre=le,rre=Yo,nre=Ko,ire=Bt,are=tre([].concat),dx=ere("Reflect","ownKeys")||function(i){var e=rre.f(ire(i)),r=nre.f;return r?are(e,r(i)):e},ore=q,sre=qe,ure=dx,lre=ir,cre=sa,hre=va;ore({target:"Object",stat:!0,sham:!sre},{getOwnPropertyDescriptors:function(i){for(var e=lre(i),r=cre.f,n=ure(e),a={},o=0,s,u;n.length>o;)u=r(e,s=n[o++]),u!==void 0&&hre(a,s,u);return a}});var dre=ae,fre=dre.Object.getOwnPropertyDescriptors,vre=fre,pre=vre;(function(t){t.exports=pre})(Jte);var un=V(Ov),Tv={},gre={get exports(){return Tv},set exports(t){Tv=t}},xv={},yre={get exports(){return xv},set exports(t){xv=t}},mre=q,$re=qe,gw=Sl.f;mre({target:"Object",stat:!0,forced:Object.defineProperties!==gw,sham:!$re},{defineProperties:gw});var bre=ae,fx=bre.Object,wre=yre.exports=function(i,e){return fx.defineProperties(i,e)};fx.defineProperties.sham&&(wre.sham=!0);var _re=xv,Ere=_re;(function(t){t.exports=Ere})(gre);var Dl=V(Tv),Pv={},Sre={get exports(){return Pv},set exports(t){Pv=t}},kv={},Ore={get exports(){return kv},set exports(t){kv=t}},Tre=q,xre=qe,yw=Gt.f;Tre({target:"Object",stat:!0,forced:Object.defineProperty!==yw,sham:!xre},{defineProperty:yw});var Pre=ae,vx=Pre.Object,kre=Ore.exports=function(i,e,r){return vx.defineProperty(i,e,r)};vx.defineProperty.sham&&(kre.sham=!0);var Ire=kv,px=Ire;(function(t){t.exports=px})(Sre);var Ml=V(Pv);function N(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}var Iv={},Cre={get exports(){return Iv},set exports(t){Iv=t}},Cv={},Are={get exports(){return Cv},set exports(t){Cv=t}},Rre=px,Dre=Rre,Mre=Dre,Nre=Mre;(function(t){t.exports=Nre})(Are);(function(t){t.exports=Cv})(Cre);var Nl=V(Iv),Av={},Fre={get exports(){return Av},set exports(t){Av=t}},Rv={},Bre={get exports(){return Rv},set exports(t){Rv=t}},Lre=TypeError,jre=9007199254740991,gx=function(t){if(t>jre)throw Lre("Maximum allowed index exceeded");return t},zre=ue,Hre=Le,Wre=jo,Vre=Hre("species"),Jo=function(t){return Wre>=51||!zre(function(){var i=[],e=i.constructor={};return e[Vre]=function(){return{foo:1}},i[t](Boolean).foo!==1})},Ure=q,Gre=ue,Kre=ni,qre=tt,Yre=Ft,Xre=ar,mw=gx,$w=va,Qre=ry,Zre=Jo,Jre=Le,ene=jo,yx=Jre("isConcatSpreadable"),tne=ene>=51||!Gre(function(){var t=[];return t[yx]=!1,t.concat()[0]!==t}),rne=function(t){if(!qre(t))return!1;var i=t[yx];return i!==void 0?!!i:Kre(t)},nne=!tne||!Zre("concat");Ure({target:"Array",proto:!0,arity:1,forced:nne},{concat:function(i){var e=Yre(this),r=Qre(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],rne(l))for(u=Xre(l),mw(n+u),o=0;o<u;o++,n++)o in l&&$w(r,n,l[o]);else mw(n+1),$w(r,n++,l);return r.length=n,r}});var ine=Re;ine("asyncIterator");var ane=Re;ane("hasInstance");var one=Re;one("isConcatSpreadable");var sne=Re;sne("iterator");var une=Re;une("match");var lne=Re;lne("matchAll");var cne=Re;cne("replace");var hne=Re;hne("search");var dne=Re;dne("species");var fne=Re;fne("split");var vne=Re,pne=jT;vne("toPrimitive");pne();var gne=Ut,yne=Re,mne=da;yne("toStringTag");mne(gne("Symbol"),"Symbol");var $ne=Re;$ne("unscopables");var bne=Ue,wne=da;wne(bne.JSON,"JSON",!0);var _ne=ae,Ene=_ne.Symbol,Sne=Ene,mx=Sne,One=Re;One("dispose");var Tne=mx,xne=Tne,Pne=Re;Pne("asyncDispose");var kne=q,Ine=Ut,Cne=le,$x=Ine("Symbol"),Ane=$x.keyFor,Rne=Cne($x.prototype.valueOf);kne({target:"Symbol",stat:!0},{isRegistered:function(i){try{return Ane(Rne(i))!==void 0}catch{return!1}}});var Dne=q,Mne=on,bx=Ut,Nne=le,Fne=zo,Bne=Le,Nu=bx("Symbol"),bw=Nu.isWellKnown,wx=bx("Object","getOwnPropertyNames"),Lne=Nne(Nu.prototype.valueOf),ww=Mne("wks");for(var Ah=0,_w=wx(Nu),jne=_w.length;Ah<jne;Ah++)try{var Ew=_w[Ah];Fne(Nu[Ew])&&Bne(Ew)}catch{}Dne({target:"Symbol",stat:!0,forced:!0},{isWellKnown:function(i){if(bw&&bw(i))return!0;try{for(var e=Lne(i),r=0,n=wx(ww),a=n.length;r<a;r++)if(ww[n[r]]==e)return!0}catch{}return!1}});var zne=Re;zne("matcher");var Hne=Re;Hne("metadataKey");var Wne=Re;Wne("observable");var Vne=Re;Vne("metadata");var Une=Re;Une("patternMatch");var Gne=Re;Gne("replaceAll");var Kne=xne,qne=Kne;(function(t){t.exports=qne})(Bre);(function(t){t.exports=Rv})(Fre);var xi=V(Av),Dv={},Yne={get exports(){return Dv},set exports(t){Dv=t}},Mv={},Xne={get exports(){return Mv},set exports(t){Mv=t}},Qne=Xo,Zne=Qne.f("iterator"),Jne=Zne,eie=Jne,tie=eie,rie=tie,nie=rie,iie=nie;(function(t){t.exports=iie})(Xne);(function(t){t.exports=Mv})(Yne);var aie=V(Dv);function de(t){"@babel/helpers - typeof";return de=typeof xi=="function"&&typeof aie=="symbol"?function(i){return typeof i}:function(i){return i&&typeof xi=="function"&&i.constructor===xi&&i!==xi.prototype?"symbol":typeof i},de(t)}var Nv={},oie={get exports(){return Nv},set exports(t){Nv=t}},Fv={},sie={get exports(){return Fv},set exports(t){Fv=t}},uie=Xo,lie=uie.f("toPrimitive"),cie=lie,hie=cie,die=hie,fie=die,vie=fie,pie=vie;(function(t){t.exports=pie})(sie);(function(t){t.exports=Fv})(oie);var gie=V(Nv);function yie(t,i){if(de(t)!=="object"||t===null)return t;var e=t[gie];if(e!==void 0){var r=e.call(t,i||"default");if(de(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(t)}function _x(t){var i=yie(t,"string");return de(i)==="symbol"?i:String(i)}function Sw(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),Nl(t,_x(r.key),r)}}function F(t,i,e){return i&&Sw(t.prototype,i),e&&Sw(t,e),Nl(t,"prototype",{writable:!1}),t}function Fl(t,i,e){return i=_x(i),i in t?Nl(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}var Bv={},mie={get exports(){return Bv},set exports(t){Bv=t}},Lv={},$ie={get exports(){return Lv},set exports(t){Lv=t}},bie=q,wie=ni;bie({target:"Array",stat:!0},{isArray:wie});var _ie=ae,Eie=_ie.Array.isArray,Sie=Eie,Ex=Sie,Oie=Ex,Tie=Oie,xie=Tie,Pie=xie;(function(t){t.exports=Pie})($ie);(function(t){t.exports=Lv})(mie);var Sx=V(Bv);function kie(t){if(Sx(t))return t}function Iie(t,i){var e=t==null?null:typeof xi<"u"&&jr(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 jv={},Cie={get exports(){return jv},set exports(t){jv=t}},zv={},Aie={get exports(){return zv},set exports(t){zv=t}},Rie=q,Ow=ni,Die=Tl,Mie=tt,Tw=Vo,Nie=ar,Fie=ir,Bie=va,Lie=Le,jie=Jo,zie=_l,Hie=jie("slice"),Wie=Lie("species"),Rh=Array,Vie=Math.max;Rie({target:"Array",proto:!0,forced:!Hie},{slice:function(i,e){var r=Fie(this),n=Nie(r),a=Tw(i,n),o=Tw(e===void 0?n:e,n),s,u,l;if(Ow(r)&&(s=r.constructor,Die(s)&&(s===Rh||Ow(s.prototype))?s=void 0:Mie(s)&&(s=s[Wie],s===null&&(s=void 0)),s===Rh||s===void 0))return zie(r,a,o);for(u=new(s===void 0?Rh:s)(Vie(o-a,0)),l=0;a<o;a++,l++)a in r&&Bie(u,l,r[a]);return u.length=l,u}});var Uie=nt,Gie=Uie("Array").slice,Kie=Be,qie=Gie,Dh=Array.prototype,Yie=function(t){var i=t.slice;return t===Dh||Kie(Dh,t)&&i===Dh.slice?qie:i},Xie=Yie,Ox=Xie,Qie=Ox,Zie=Qie,Jie=Zie,eae=Jie;(function(t){t.exports=eae})(Aie);(function(t){t.exports=zv})(Cie);var tae=V(jv),Hv={},rae={get exports(){return Hv},set exports(t){Hv=t}},Wv={},nae={get exports(){return Wv},set exports(t){Wv=t}},iae=DT,aae=iae,oae=aae,sae=oae;(function(t){t.exports=sae})(nae);(function(t){t.exports=Wv})(rae);var Tx=V(Hv);function Vv(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 xx(t,i){var e;if(t){if(typeof t=="string")return Vv(t,i);var r=tae(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Tx(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vv(t,i)}}function uae(){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 ke(t,i){return kie(t)||Iie(t,i)||xx(t,i)||uae()}function lae(t){if(Sx(t))return Vv(t)}function cae(t){if(typeof xi<"u"&&jr(t)!=null||t["@@iterator"]!=null)return Tx(t)}function hae(){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 hr(t){return lae(t)||cae(t)||xx(t)||hae()}var Uv={},dae={get exports(){return Uv},set exports(t){Uv=t}};(function(t){t.exports=mx})(dae);var pn=V(Uv),Gv={},fae={get exports(){return Gv},set exports(t){Gv=t}},vae=nt,pae=vae("Array").concat,gae=Be,yae=pae,Mh=Array.prototype,mae=function(t){var i=t.concat;return t===Mh||gae(Mh,t)&&i===Mh.concat?yae:i},$ae=mae,bae=$ae;(function(t){t.exports=bae})(fae);var uy=V(Gv),Kv={},wae={get exports(){return Kv},set exports(t){Kv=t}};(function(t){t.exports=Ox})(wae);var ut=V(Kv),xw={},_ae={get exports(){return xw},set exports(t){xw=t}},Eae=q,Sae=dx;Eae({target:"Reflect",stat:!0},{ownKeys:Sae});var Oae=ae,Tae=Oae.Reflect.ownKeys,xae=Tae,Pae=xae;(function(t){t.exports=Pae})(_ae);var qv={},kae={get exports(){return qv},set exports(t){qv=t}};(function(t){t.exports=Ex})(kae);var ve=V(qv),Yv={},Iae={get exports(){return Yv},set exports(t){Yv=t}},Cae=q,Aae=fn.map,Rae=Jo,Dae=Rae("map");Cae({target:"Array",proto:!0,forced:!Dae},{map:function(i){return Aae(this,i,arguments.length>1?arguments[1]:void 0)}});var Mae=nt,Nae=Mae("Array").map,Fae=Be,Bae=Nae,Nh=Array.prototype,Lae=function(t){var i=t.map;return t===Nh||Fae(Nh,t)&&i===Nh.map?Bae:i},jae=Lae,zae=jae;(function(t){t.exports=zae})(Iae);var Hi=V(Yv),Xv={},Hae={get exports(){return Xv},set exports(t){Xv=t}},Wae=q,Vae=Ft,Px=Go,Uae=ue,Gae=Uae(function(){Px(1)});Wae({target:"Object",stat:!0,forced:Gae},{keys:function(i){return Px(Vae(i))}});var Kae=ae,qae=Kae.Object.keys,Yae=qae,Xae=Yae;(function(t){t.exports=Xae})(Hae);var xe=V(Xv),Qv={},Qae={get exports(){return Qv},set exports(t){Qv=t}},Zae=q,Jae=le,kx=Date,eoe=Jae(kx.prototype.getTime);Zae({target:"Date",stat:!0},{now:function(){return eoe(new kx)}});var toe=ae,roe=toe.Date.now,noe=roe,ioe=noe;(function(t){t.exports=ioe})(Qae);var Fu=V(Qv),Zv={},aoe={get exports(){return Zv},set exports(t){Zv=t}},ooe=ue,pa=function(t,i){var e=[][t];return!!e&&ooe(function(){e.call(null,i||function(){return 1},1)})},soe=fn.forEach,uoe=pa,loe=uoe("forEach"),coe=loe?[].forEach:function(i){return soe(this,i,arguments.length>1?arguments[1]:void 0)},hoe=q,Pw=coe;hoe({target:"Array",proto:!0,forced:[].forEach!=Pw},{forEach:Pw});var doe=nt,foe=doe("Array").forEach,voe=foe,poe=voe,goe=ei,yoe=rt,moe=Be,$oe=poe,Fh=Array.prototype,boe={DOMTokenList:!0,NodeList:!0},woe=function(t){var i=t.forEach;return t===Fh||moe(Fh,t)&&i===Fh.forEach||yoe(boe,goe(t))?$oe:i};(function(t){t.exports=woe})(aoe);var ge=V(Zv),Jv={},_oe={get exports(){return Jv},set exports(t){Jv=t}},Eoe=q,Soe=le,Ooe=ni,Toe=Soe([].reverse),kw=[1,2];Eoe({target:"Array",proto:!0,forced:String(kw)===String(kw.reverse())},{reverse:function(){return Ooe(this)&&(this.length=this.length),Toe(this)}});var xoe=nt,Poe=xoe("Array").reverse,koe=Be,Ioe=Poe,Bh=Array.prototype,Coe=function(t){var i=t.reverse;return t===Bh||koe(Bh,t)&&i===Bh.reverse?Ioe:i},Aoe=Coe,Roe=Aoe;(function(t){t.exports=Roe})(_oe);var Dn=V(Jv),ep={},Doe={get exports(){return ep},set exports(t){ep=t}},Moe=qe,Noe=ni,Foe=TypeError,Boe=Object.getOwnPropertyDescriptor,Loe=Moe&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),joe=Loe?function(t,i){if(Noe(t)&&!Boe(t,"length").writable)throw Foe("Cannot set read only .length");return t.length=i}:function(t,i){return t.length=i},Iw=la,zoe=TypeError,Ix=function(t,i){if(!delete t[i])throw zoe("Cannot delete property "+Iw(i)+" of "+Iw(t))},Hoe=q,Woe=Ft,Voe=Vo,Uoe=wl,Goe=ar,Koe=joe,qoe=gx,Yoe=ry,Xoe=va,Lh=Ix,Qoe=Jo,Zoe=Qoe("splice"),Joe=Math.max,ese=Math.min;Hoe({target:"Array",proto:!0,forced:!Zoe},{splice:function(i,e){var r=Woe(this),n=Goe(r),a=Voe(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=ese(Joe(Uoe(e),0),n-a)),qoe(n+s-u),l=Yoe(r,u),c=0;c<u;c++)h=a+c,h in r&&Xoe(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]:Lh(r,d);for(c=n;c>n-u+s;c--)Lh(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]:Lh(r,d);for(c=0;c<s;c++)r[c+a]=arguments[c+2];return Koe(r,n-u+s),l}});var tse=nt,rse=tse("Array").splice,nse=Be,ise=rse,jh=Array.prototype,ase=function(t){var i=t.splice;return t===jh||nse(jh,t)&&i===jh.splice?ise:i},ose=ase,sse=ose;(function(t){t.exports=sse})(Doe);var xr=V(ep),tp={},use={get exports(){return tp},set exports(t){tp=t}},lse=q,cse=Gg.includes,hse=ue,dse=hse(function(){return!Array(1).includes()});lse({target:"Array",proto:!0,forced:dse},{includes:function(i){return cse(this,i,arguments.length>1?arguments[1]:void 0)}});var fse=nt,vse=fse("Array").includes,pse=tt,gse=Lr,yse=Le,mse=yse("match"),$se=function(t){var i;return pse(t)&&((i=t[mse])!==void 0?!!i:gse(t)=="RegExp")},bse=$se,wse=TypeError,_se=function(t){if(bse(t))throw wse("The method doesn't accept regular expressions");return t},Ese=Le,Sse=Ese("match"),Ose=function(t){var i=/./;try{"/./"[t](i)}catch{try{return i[Sse]=!1,"/./"[t](i)}catch{}}return!1},Tse=q,xse=le,Pse=_se,kse=Bo,Cw=br,Ise=Ose,Cse=xse("".indexOf);Tse({target:"String",proto:!0,forced:!Ise("includes")},{includes:function(i){return!!~Cse(Cw(kse(this)),Cw(Pse(i)),arguments.length>1?arguments[1]:void 0)}});var Ase=nt,Rse=Ase("String").includes,Aw=Be,Dse=vse,Mse=Rse,zh=Array.prototype,Hh=String.prototype,Nse=function(t){var i=t.includes;return t===zh||Aw(zh,t)&&i===zh.includes?Dse:typeof t=="string"||t===Hh||Aw(Hh,t)&&i===Hh.includes?Mse:i},Fse=Nse,Bse=Fse;(function(t){t.exports=Bse})(use);var gr=V(tp),rp={},Lse={get exports(){return rp},set exports(t){rp=t}},jse=q,zse=ue,Hse=Ft,Cx=Ol,Wse=bT,Vse=zse(function(){Cx(1)});jse({target:"Object",stat:!0,forced:Vse,sham:!Wse},{getPrototypeOf:function(i){return Cx(Hse(i))}});var Use=ae,Gse=Use.Object.getPrototypeOf,Kse=Gse,Ax=Kse;(function(t){t.exports=Ax})(Lse);var Rw=V(rp),np={},qse={get exports(){return np},set exports(t){np=t}},Yse=q,Xse=fn.filter,Qse=Jo,Zse=Qse("filter");Yse({target:"Array",proto:!0,forced:!Zse},{filter:function(i){return Xse(this,i,arguments.length>1?arguments[1]:void 0)}});var Jse=nt,eue=Jse("Array").filter,tue=Be,rue=eue,Wh=Array.prototype,nue=function(t){var i=t.filter;return t===Wh||tue(Wh,t)&&i===Wh.filter?rue:i},iue=nue,aue=iue;(function(t){t.exports=aue})(qse);var Ot=V(np),Dw={},oue={get exports(){return Dw},set exports(t){Dw=t}},sue=qe,Rx=le,uue=Go,lue=ir,cue=Mo.f,hue=Rx(cue),due=Rx([].push),Mw=function(t){return function(i){for(var e=lue(i),r=uue(e),n=r.length,a=0,o=[],s;n>a;)s=r[a++],(!sue||hue(e,s))&&due(o,t?[s,e[s]]:e[s]);return o}},fue={entries:Mw(!0),values:Mw(!1)},vue=q,pue=fue.values;vue({target:"Object",stat:!0},{values:function(i){return pue(i)}});var gue=ae,yue=gue.Object.values,mue=yue,$ue=mue;(function(t){t.exports=$ue})(oue);var ip={},bue={get exports(){return ip},set exports(t){ip=t}},Bl=`
65
+ \v\f\r                 \u2028\u2029\uFEFF`,wue=le,_ue=Bo,Eue=br,ap=Bl,Nw=wue("".replace),Sue=RegExp("^["+ap+"]+"),Oue=RegExp("(^|[^"+ap+"])["+ap+"]+$"),Vh=function(t){return function(i){var e=Eue(_ue(i));return t&1&&(e=Nw(e,Sue,"")),t&2&&(e=Nw(e,Oue,"$1")),e}},ly={start:Vh(1),end:Vh(2),trim:Vh(3)},Dx=Ue,Tue=ue,xue=le,Pue=br,kue=ly.trim,Fw=Bl,Da=Dx.parseInt,Bw=Dx.Symbol,Lw=Bw&&Bw.iterator,Mx=/^[+-]?0x/i,Iue=xue(Mx.exec),Cue=Da(Fw+"08")!==8||Da(Fw+"0x16")!==22||Lw&&!Tue(function(){Da(Object(Lw))}),Aue=Cue?function(i,e){var r=kue(Pue(i));return Da(r,e>>>0||(Iue(Mx,r)?16:10))}:Da,Rue=q,jw=Aue;Rue({global:!0,forced:parseInt!=jw},{parseInt:jw});var Due=ae,Mue=Due.parseInt,Nue=Mue,Fue=Nue;(function(t){t.exports=Fue})(bue);var Qt=V(ip),op={},Bue={get exports(){return op},set exports(t){op=t}},Lue=q,jue=Wg,zue=Gg.indexOf,Hue=pa,sp=jue([].indexOf),Nx=!!sp&&1/sp([1],1,-0)<0,Wue=Nx||!Hue("indexOf");Lue({target:"Array",proto:!0,forced:Wue},{indexOf:function(i){var e=arguments.length>1?arguments[1]:void 0;return Nx?sp(this,i,e)||0:zue(this,i,e)}});var Vue=nt,Uue=Vue("Array").indexOf,Gue=Be,Kue=Uue,Uh=Array.prototype,que=function(t){var i=t.indexOf;return t===Uh||Gue(Uh,t)&&i===Uh.indexOf?Kue:i},Yue=que,Xue=Yue;(function(t){t.exports=Xue})(Bue);var oe=V(op),zw={},Que={get exports(){return zw},set exports(t){zw=t}},Zue=yT.PROPER,Jue=ue,Hw=Bl,Ww="​…᠎",ele=function(t){return Jue(function(){return!!Hw[t]()||Ww[t]()!==Ww||Zue&&Hw[t].name!==t})},tle=q,rle=ly.trim,nle=ele;tle({target:"String",proto:!0,forced:nle("trim")},{trim:function(){return rle(this)}});var ile=nt,ale=ile("String").trim,ole=Be,sle=ale,Gh=String.prototype,ule=function(t){var i=t.trim;return typeof t=="string"||t===Gh||ole(Gh,t)&&i===Gh.trim?sle:i},lle=ule,cle=lle;(function(t){t.exports=cle})(Que);var up={},hle={get exports(){return up},set exports(t){up=t}},dle=q,fle=qe,vle=ha;dle({target:"Object",stat:!0,sham:!fle},{create:vle});var ple=ae,gle=ple.Object,yle=function(i,e){return gle.create(i,e)},mle=yle,Fx=mle;(function(t){t.exports=Fx})(hle);var Mn=V(up),lp={},$le={get exports(){return lp},set exports(t){lp=t}},cp=ae,ble=Do;cp.JSON||(cp.JSON={stringify:JSON.stringify});var wle=function(i,e,r){return ble(cp.JSON.stringify,null,arguments)},_le=wle,Ele=_le;(function(t){t.exports=Ele})($le);var es=V(lp),hp={},Sle={get exports(){return hp},set exports(t){hp=t}},Ole=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",Tle=TypeError,xle=function(t,i){if(t<i)throw Tle("Not enough arguments");return t},Bx=Ue,Ple=Do,kle=et,Ile=Ole,Cle=Lo,Ale=_l,Rle=xle,Dle=Bx.Function,Mle=/MSIE .\./.test(Cle)||Ile&&function(){var t=Bx.Bun.version.split(".");return t.length<3||t[0]==0&&(t[1]<3||t[1]==3&&t[2]==0)}(),Lx=function(t,i){var e=i?2:1;return Mle?function(r,n){var a=Rle(arguments.length,1)>e,o=kle(r)?r:Dle(r),s=a?Ale(arguments,e):[],u=a?function(){Ple(o,this,s)}:o;return i?t(u,n):t(u)}:t},Nle=q,jx=Ue,Fle=Lx,Vw=Fle(jx.setInterval,!0);Nle({global:!0,bind:!0,forced:jx.setInterval!==Vw},{setInterval:Vw});var Ble=q,zx=Ue,Lle=Lx,Uw=Lle(zx.setTimeout,!0);Ble({global:!0,bind:!0,forced:zx.setTimeout!==Uw},{setTimeout:Uw});var jle=ae,zle=jle.setTimeout;(function(t){t.exports=zle})(Sle);var yr=V(hp),dp={},Hle={get exports(){return dp},set exports(t){dp=t}},Wle=Ft,Gw=Vo,Vle=ar,Ule=function(i){for(var e=Wle(this),r=Vle(e),n=arguments.length,a=Gw(n>1?arguments[1]:void 0,r),o=n>2?arguments[2]:void 0,s=o===void 0?r:Gw(o,r);s>a;)e[a++]=i;return e},Gle=q,Kle=Ule;Gle({target:"Array",proto:!0},{fill:Kle});var qle=nt,Yle=qle("Array").fill,Xle=Be,Qle=Yle,Kh=Array.prototype,Zle=function(t){var i=t.fill;return t===Kh||Xle(Kh,t)&&i===Kh.fill?Qle:i},Jle=Zle,ece=Jle;(function(t){t.exports=ece})(Hle);var ts=V(dp);/*! 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,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+`
70
+ * Licensed under the MIT license */function rr(){return rr=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},rr.apply(this,arguments)}function Kt(t,i){t.prototype=Object.create(i.prototype),t.prototype.constructor=t,t.__proto__=i}function Fs(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var fp;typeof Object.assign!="function"?fp=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}:fp=Object.assign;var Wn=fp,Kw=["","webkit","Moz","MS","ms","o"],tce=typeof document>"u"?{style:{}}:document.createElement("div"),rce="function",Pi=Math.round,Vn=Math.abs,cy=Date.now;function Ll(t,i){for(var e,r,n=i[0].toUpperCase()+i.slice(1),a=0;a<Kw.length;){if(e=Kw[a],r=e?e+n:i,r in t)return r;a++}}var Pr;typeof window>"u"?Pr={}:Pr=window;var Hx=Ll(tce.style,"touchAction"),Wx=Hx!==void 0;function nce(){if(!Wx)return!1;var t={},i=Pr.CSS&&Pr.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return t[e]=i?Pr.CSS.supports("touch-action",e):!0}),t}var Vx="compute",Ux="auto",vp="manipulation",Nn="none",eo="pan-x",to="pan-y",Bs=nce(),ice=/mobile|tablet|ip(ad|hone|od)|android/i,Gx="ontouchstart"in Pr,ace=Ll(Pr,"PointerEvent")!==void 0,oce=Gx&&ice.test(navigator.userAgent),rs="touch",sce="pen",hy="mouse",uce="kinect",lce=25,gt=1,ii=2,He=4,xt=8,Bu=1,ns=2,is=4,as=8,Wi=16,mr=ns|is,Fn=as|Wi,Kx=mr|Fn,qx=["x","y"],Lu=["clientX","clientY"];function kr(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 jl(t,i){return typeof t===rce?t.apply(i&&i[0]||void 0,i):t}function Pn(t,i){return t.indexOf(i)>-1}function cce(t){if(Pn(t,Nn))return Nn;var i=Pn(t,eo),e=Pn(t,to);return i&&e?Nn:i||e?i?eo:to:Pn(t,vp)?vp:Ux}var Yx=function(){function t(e,r){this.manager=e,this.set(r)}var i=t.prototype;return i.set=function(r){r===Vx&&(r=this.compute()),Wx&&this.manager.element.style&&Bs[r]&&(this.manager.element.style[Hx]=r),this.actions=r.toLowerCase().trim()},i.update=function(){this.set(this.manager.options.touchAction)},i.compute=function(){var r=[];return kr(this.manager.recognizers,function(n){jl(n.options.enable,[n])&&(r=r.concat(n.getTouchAction()))}),cce(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=Pn(o,Nn)&&!Bs[Nn],u=Pn(o,to)&&!Bs[to],l=Pn(o,eo)&&!Bs[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&mr||l&&a&Fn))return this.preventSrc(n)},i.preventSrc=function(r){this.manager.session.prevented=!0,r.preventDefault()},t}();function dy(t,i){for(;t;){if(t===i)return!0;t=t.parentNode}return!1}function Xx(t){var i=t.length;if(i===1)return{x:Pi(t[0].clientX),y:Pi(t[0].clientY)};for(var e=0,r=0,n=0;n<i;)e+=t[n].clientX,r+=t[n].clientY,n++;return{x:Pi(e/i),y:Pi(r/i)}}function qw(t){for(var i=[],e=0;e<t.pointers.length;)i[e]={clientX:Pi(t.pointers[e].clientX),clientY:Pi(t.pointers[e].clientY)},e++;return{timeStamp:cy(),pointers:i,center:Xx(i),deltaX:t.deltaX,deltaY:t.deltaY}}function ju(t,i,e){e||(e=qx);var r=i[e[0]]-t[e[0]],n=i[e[1]]-t[e[1]];return Math.sqrt(r*r+n*n)}function pp(t,i,e){e||(e=qx);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?Bu:Vn(t)>=Vn(i)?t<0?ns:is:i<0?as:Wi}function hce(t,i){var e=i.center,r=t.offsetDelta||{},n=t.prevDelta||{},a=t.prevInput||{};(i.eventType===gt||a.eventType===He)&&(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 Zx(t,i,e){return{x:i/t||0,y:e/t||0}}function dce(t,i){return ju(i[0],i[1],Lu)/ju(t[0],t[1],Lu)}function fce(t,i){return pp(i[1],i[0],Lu)+pp(t[1],t[0],Lu)}function vce(t,i){var e=t.lastInterval||i,r=i.timeStamp-e.timeStamp,n,a,o,s;if(i.eventType!==xt&&(r>lce||e.velocity===void 0)){var u=i.deltaX-e.deltaX,l=i.deltaY-e.deltaY,c=Zx(r,u,l);a=c.x,o=c.y,n=Vn(c.x)>Vn(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 pce(t,i){var e=t.session,r=i.pointers,n=r.length;e.firstInput||(e.firstInput=qw(i)),n>1&&!e.firstMultiple?e.firstMultiple=qw(i):n===1&&(e.firstMultiple=!1);var a=e.firstInput,o=e.firstMultiple,s=o?o.center:a.center,u=i.center=Xx(r);i.timeStamp=cy(),i.deltaTime=i.timeStamp-a.timeStamp,i.angle=pp(s,u),i.distance=ju(s,u),hce(e,i),i.offsetDirection=Qx(i.deltaX,i.deltaY);var l=Zx(i.deltaTime,i.deltaX,i.deltaY);i.overallVelocityX=l.x,i.overallVelocityY=l.y,i.overallVelocity=Vn(l.x)>Vn(l.y)?l.x:l.y,i.scale=o?dce(o.pointers,r):1,i.rotation=o?fce(o.pointers,r):0,i.maxPointers=e.prevInput?i.pointers.length>e.prevInput.maxPointers?i.pointers.length:e.prevInput.maxPointers:i.pointers.length,vce(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,dy(d,c)&&(c=d),i.target=c}function gce(t,i,e){var r=e.pointers.length,n=e.changedPointers.length,a=i&gt&&r-n===0,o=i&(He|xt)&&r-n===0;e.isFirst=!!a,e.isFinal=!!o,a&&(t.session={}),e.eventType=i,pce(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){kr(ro(i),function(r){t.addEventListener(r,e,!1)})}function Na(t,i,e){kr(ro(i),function(r){t.removeEventListener(r,e,!1)})}function Yw(t){var i=t.ownerDocument||t;return i.defaultView||i.parentWindow||window}var ga=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){jl(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(Yw(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(Yw(this.element),this.evWin,this.domHandler)},t}();function Un(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 yce={pointerdown:gt,pointermove:ii,pointerup:He,pointercancel:xt,pointerout:xt},mce={2:rs,3:sce,4:hy,5:uce},Jx="pointerdown",eP="pointermove pointerup pointercancel";Pr.MSPointerEvent&&!Pr.PointerEvent&&(Jx="MSPointerDown",eP="MSPointerMove MSPointerUp MSPointerCancel");var tP=function(t){Kt(i,t);function i(){var r,n=i.prototype;return n.evEl=Jx,n.evWin=eP,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=yce[s],l=mce[n.pointerType]||n.pointerType,c=l===rs,h=Un(a,n.pointerId,"pointerId");u&gt&&(n.button===0||c)?h<0&&(a.push(n),h=a.length-1):u&(He|xt)&&(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}(ga);function no(t){return Array.prototype.slice.call(t,0)}function fy(t,i,e){for(var r=[],n=[],a=0;a<t.length;){var o=i?t[a][i]:t[a];Un(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 $ce={touchstart:gt,touchmove:ii,touchend:He,touchcancel:xt},bce="touchstart touchmove touchend touchcancel",vy=function(t){Kt(i,t);function i(){var r;return i.prototype.evTarget=bce,r=t.apply(this,arguments)||this,r.targetIds={},r}var e=i.prototype;return e.handler=function(n){var a=$ce[n.type],o=wce.call(this,n,a);o&&this.callback(this.manager,a,{pointers:o[0],changedPointers:o[1],pointerType:rs,srcEvent:n})},i}(ga);function wce(t,i){var e=no(t.touches),r=this.targetIds;if(i&(gt|ii)&&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 dy(l.target,u)}),i===gt)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&(He|xt)&&delete r[o[n].identifier],n++;if(s.length)return[fy(a.concat(s),"identifier",!0),s]}var _ce={mousedown:gt,mousemove:ii,mouseup:He},Ece="mousedown",Sce="mousemove mouseup",py=function(t){Kt(i,t);function i(){var r,n=i.prototype;return n.evEl=Ece,n.evWin=Sce,r=t.apply(this,arguments)||this,r.pressed=!1,r}var e=i.prototype;return e.handler=function(n){var a=_ce[n.type];a&gt&&n.button===0&&(this.pressed=!0),a&ii&&n.which!==1&&(a=He),this.pressed&&(a&He&&(this.pressed=!1),this.callback(this.manager,a,{pointers:[n],changedPointers:[n],pointerType:hy,srcEvent:n}))},i}(ga),Oce=2500,Xw=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,Oce)}}function Tce(t,i){t&gt?(this.primaryTouch=i.changedPointers[0].identifier,Qw.call(this,i)):t&(He|xt)&&Qw.call(this,i)}function xce(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<=Xw&&o<=Xw)return!0}return!1}var rP=function(){var t=function(i){Kt(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===hy;if(!(h&&l.sourceCapabilities&&l.sourceCapabilities.firesTouchEvents)){if(c)Tce.call(Fs(Fs(o)),u,l);else if(h&&xce.call(Fs(Fs(o)),l))return;o.callback(s,u,l)}},o.touch=new vy(o.manager,o.handler),o.mouse=new py(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}(ga);return t}();function Pce(t){var i,e=t.options.inputClass;return e?i=e:ace?i=tP:oce?i=vy:Gx?i=rP:i=py,new i(t,gce)}function ki(t,i,e){return Array.isArray(t)?(kr(t,e[i],e),!0):!1}var nu=1,Wt=2,Vi=4,tn=8,Ir=tn,io=16,fr=32,kce=1;function Ice(){return kce++}function Ls(t,i){var e=i.manager;return e?e.get(t):t}function Zw(t){return t&io?"cancel":t&tn?"end":t&Vi?"move":t&Wt?"start":""}var os=function(){function t(e){e===void 0&&(e={}),this.options=rr({enable:!0},e),this.id=Ice(),this.manager=null,this.state=nu,this.simultaneous={},this.requireFail=[]}var i=t.prototype;return i.set=function(r){return Wn(this.options,r),this.manager&&this.manager.touchAction.update(),this},i.recognizeWith=function(r){if(ki(r,"recognizeWith",this))return this;var n=this.simultaneous;return r=Ls(r,this),n[r.id]||(n[r.id]=r,r.recognizeWith(this)),this},i.dropRecognizeWith=function(r){return ki(r,"dropRecognizeWith",this)?this:(r=Ls(r,this),delete this.simultaneous[r.id],this)},i.requireFailure=function(r){if(ki(r,"requireFailure",this))return this;var n=this.requireFail;return r=Ls(r,this),Un(n,r)===-1&&(n.push(r),r.requireFailure(this)),this},i.dropRequireFailure=function(r){if(ki(r,"dropRequireFailure",this))return this;r=Ls(r,this);var n=Un(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<tn&&o(n.options.event+Zw(a)),o(n.options.event),r.additionalEvent&&o(r.additionalEvent),a>=tn&&o(n.options.event+Zw(a))},i.tryEmit=function(r){if(this.canEmit())return this.emit(r);this.state=fr},i.canEmit=function(){for(var r=0;r<this.requireFail.length;){if(!(this.requireFail[r].state&(fr|nu)))return!1;r++}return!0},i.recognize=function(r){var n=Wn({},r);if(!jl(this.options.enable,[this,n])){this.reset(),this.state=fr;return}this.state&(Ir|io|fr)&&(this.state=nu),this.state=this.process(n),this.state&(Wt|Vi|tn|io)&&this.tryEmit(n)},i.process=function(r){},i.getTouchAction=function(){},i.reset=function(){},t}(),gp=function(t){Kt(i,t);function i(r){var n;return r===void 0&&(r={}),n=t.call(this,rr({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[vp]},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&gt&&this.count===0)return this.failTimeout();if(u&&l&&s){if(n.eventType!==He)return this.failTimeout();var c=this.pTime?n.timeStamp-this.pTime<o.interval:!0,h=!this.pCenter||ju(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=Ir,a.tryEmit()},o.interval),Wt):Ir}return fr},e.failTimeout=function(){var n=this;return this._timer=setTimeout(function(){n.state=fr},this.options.interval),fr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(){this.state===Ir&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},i}(os),Ui=function(t){Kt(i,t);function i(r){return r===void 0&&(r={}),t.call(this,rr({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&(Wt|Vi),u=this.attrTest(n);return s&&(o&xt||!u)?a|io:s||u?o&He?a|tn:a&Wt?a|Vi:Wt:fr},i}(os);function nP(t){return t===Wi?"down":t===as?"up":t===ns?"left":t===is?"right":""}var gy=function(t){Kt(i,t);function i(r){var n;return r===void 0&&(r={}),n=t.call(this,rr({event:"pan",threshold:10,pointers:1,direction:Kx},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&mr&&a.push(to),n&Fn&&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&mr?(u=l===0?Bu:l<0?ns:is,o=l!==this.pX,s=Math.abs(n.deltaX)):(u=c===0?Bu:c<0?as:Wi,o=c!==this.pY,s=Math.abs(n.deltaY))),n.direction=u,o&&s>a.threshold&&u&a.direction},e.attrTest=function(n){return Ui.prototype.attrTest.call(this,n)&&(this.state&Wt||!(this.state&Wt)&&this.directionTest(n))},e.emit=function(n){this.pX=n.deltaX,this.pY=n.deltaY;var a=nP(n.direction);a&&(n.additionalEvent=this.options.event+a),t.prototype.emit.call(this,n)},i}(Ui),iP=function(t){Kt(i,t);function i(r){return r===void 0&&(r={}),t.call(this,rr({event:"swipe",threshold:10,velocity:.3,direction:mr|Fn,pointers:1},r))||this}var e=i.prototype;return e.getTouchAction=function(){return gy.prototype.getTouchAction.call(this)},e.attrTest=function(n){var a=this.options.direction,o;return a&(mr|Fn)?o=n.overallVelocity:a&mr?o=n.overallVelocityX:a&Fn&&(o=n.overallVelocityY),t.prototype.attrTest.call(this,n)&&a&n.offsetDirection&&n.distance>this.options.threshold&&n.maxPointers===this.options.pointers&&Vn(o)>this.options.velocity&&n.eventType&He},e.emit=function(n){var a=nP(n.offsetDirection);a&&this.manager.emit(this.options.event+a,n),this.manager.emit(this.options.event,n)},i}(Ui),aP=function(t){Kt(i,t);function i(r){return r===void 0&&(r={}),t.call(this,rr({event:"pinch",threshold:0,pointers:2},r))||this}var e=i.prototype;return e.getTouchAction=function(){return[Nn]},e.attrTest=function(n){return t.prototype.attrTest.call(this,n)&&(Math.abs(n.scale-1)>this.options.threshold||this.state&Wt)},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}(Ui),oP=function(t){Kt(i,t);function i(r){return r===void 0&&(r={}),t.call(this,rr({event:"rotate",threshold:0,pointers:2},r))||this}var e=i.prototype;return e.getTouchAction=function(){return[Nn]},e.attrTest=function(n){return t.prototype.attrTest.call(this,n)&&(Math.abs(n.rotation)>this.options.threshold||this.state&Wt)},i}(Ui),sP=function(t){Kt(i,t);function i(r){var n;return r===void 0&&(r={}),n=t.call(this,rr({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[Ux]},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&(He|xt)&&!l)this.reset();else if(n.eventType&gt)this.reset(),this._timer=setTimeout(function(){a.state=Ir,a.tryEmit()},o.time);else if(n.eventType&He)return Ir;return fr},e.reset=function(){clearTimeout(this._timer)},e.emit=function(n){this.state===Ir&&(n&&n.eventType&He?this.manager.emit(this.options.event+"up",n):(this._input.timeStamp=cy(),this.manager.emit(this.options.event,this._input)))},i}(os),uP={domEvents:!1,touchAction:Vx,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Jw=[[oP,{enable:!1}],[aP,{enable:!1},["rotate"]],[iP,{direction:mr}],[gy,{direction:mr},["swipe"]],[gp],[gp,{event:"doubletap",taps:2},["tap"]],[sP]],Cce=1,e0=2;function t0(t,i){var e=t.element;if(e.style){var r;kr(t.options.cssProps,function(n,a){r=Ll(e.style,a),i?(t.oldCssProps[r]=e.style[r],e.style[r]=n):e.style[r]=t.oldCssProps[r]||""}),i||(t.oldCssProps={})}}function Ace(t,i){var e=document.createEvent("Event");e.initEvent(t,!0,!0),e.gesture=i,i.target.dispatchEvent(e)}var r0=function(){function t(e,r){var n=this;this.options=Wn({},uP,r||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=Pce(this),this.touchAction=new Yx(this,this.options.touchAction),t0(this,!0),kr(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 Wn(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?e0:Cce},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&Ir)&&(n.curRecognizer=null,s=null);for(var u=0;u<o.length;)a=o[u],n.stopped!==e0&&(!s||a===s||a.canRecognizeWith(s))?a.recognize(r):a.reset(),!s&&a.state&(Wt|Vi|tn)&&(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(ki(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(ki(r,"remove",this))return this;var n=this.get(r);if(r){var a=this.recognizers,o=Un(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 kr(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 kr(ro(r),function(o){n?a[o]&&a[o].splice(Un(a[o],n),1):delete a[o]}),this},i.emit=function(r,n){this.options.domEvents&&Ace(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&&t0(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),Rce={touchstart:gt,touchmove:ii,touchend:He,touchcancel:xt},Dce="touchstart",Mce="touchstart touchmove touchend touchcancel",Nce=function(t){Kt(i,t);function i(){var r,n=i.prototype;return n.evTarget=Dce,n.evWin=Mce,r=t.apply(this,arguments)||this,r.started=!1,r}var e=i.prototype;return e.handler=function(n){var a=Rce[n.type];if(a===gt&&(this.started=!0),!!this.started){var o=Fce.call(this,n,a);a&(He|xt)&&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}(ga);function Fce(t,i){var e=no(t.touches),r=no(t.changedTouches);return i&(He|xt)&&(e=fy(e.concat(r),"identifier",!0)),[e,r]}function lP(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 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+`"?
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 cP=lP(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=lP(function(t,i){return cP(t,i,!0)},"merge","Use `assign`.");function Lce(t,i,e){var r=i.prototype,n;n=t.prototype=Object.create(r),n.constructor=t,n._super=r,e&&Wn(n,e)}function n0(t,i){return function(){return t.apply(i,arguments)}}var hP=function(){var t=function(e,r){return r===void 0&&(r={}),new r0(e,rr({recognizers:Jw.concat()},r))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=Kx,t.DIRECTION_DOWN=Wi,t.DIRECTION_LEFT=ns,t.DIRECTION_RIGHT=is,t.DIRECTION_UP=as,t.DIRECTION_HORIZONTAL=mr,t.DIRECTION_VERTICAL=Fn,t.DIRECTION_NONE=Bu,t.DIRECTION_DOWN=Wi,t.INPUT_START=gt,t.INPUT_MOVE=ii,t.INPUT_END=He,t.INPUT_CANCEL=xt,t.STATE_POSSIBLE=nu,t.STATE_BEGAN=Wt,t.STATE_CHANGED=Vi,t.STATE_ENDED=tn,t.STATE_RECOGNIZED=Ir,t.STATE_CANCELLED=io,t.STATE_FAILED=fr,t.Manager=r0,t.Input=ga,t.TouchAction=Yx,t.TouchInput=vy,t.MouseInput=py,t.PointerEventInput=tP,t.TouchMouseInput=rP,t.SingleTouchInput=Nce,t.Recognizer=os,t.AttrRecognizer=Ui,t.Tap=gp,t.Pan=gy,t.Swipe=iP,t.Pinch=aP,t.Rotate=oP,t.Press=sP,t.on=Ma,t.off=Na,t.each=kr,t.merge=Bce,t.extend=cP,t.bindFn=n0,t.assign=Wn,t.inherit=Lce,t.bindFn=n0,t.prefixed=Ll,t.toArray=no,t.inArray=Un,t.uniqueArray=fy,t.splitStr=ro,t.boolOrFn=jl,t.hasParent=dy,t.addEventListeners=Ma,t.removeEventListeners=Na,t.defaults=Wn({},uP,{preset:Jw}),t}();hP.defaults;var jce=hP;function dP(t,i){var e=typeof pn<"u"&&jr(t)||t["@@iterator"];if(!e){if(ve(t)||(e=zce(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 zce(t,i){var e;if(t){if(typeof t=="string")return i0(t,i);var r=ut(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ri(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i0(t,i)}}function i0(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 zl(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];return Hce(i.length?i:[Fu()])}function Hce(t){var i=Wce(t),e=ke(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 Wce(){for(var t=Vce(),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 Vce(){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 Uce(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get:function(){return{set:t}}}}var yy=typeof window<"u"?window.Hammer||jce:function(){return Uce()};function vr(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=yy(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){Gce(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()}}dT(vr.prototype);vr.current=null;vr.prototype.destroy=function(){var t,i;this.deactivate();var e=dP(Dn(t=xr(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()}};vr.prototype.activate=function(){vr.current&&vr.current.deactivate(),vr.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)};vr.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")};vr.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};function Gce(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,qce=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Yce=/^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,Xce=/^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 Gr(t){if(t)for(;t.hasChildNodes()===!0;){var i=t.firstChild;i&&(Gr(i),t.removeChild(i))}}function qr(t){return t instanceof String||typeof t=="string"}function a0(t){return de(t)==="object"&&t!==null}function Gn(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 fP(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||de(i[r])!=="object")Gn(t,i,r,e);else{var n=t[r],a=i[r];a0(n)&&a0(a)&&fP(n,a,e)}}function ya(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):Gn(i,e,a,r);else{if(ve(e[a]))throw new TypeError("Arrays are not supported by deepExtend");Gn(i,e,a,r)}}return i}function zu(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)&&!gr(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]):Gn(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 Gn(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(de(i[n])==="object"&&i[n]!==null&&Rw(i[n])===Object.prototype)t[n]===void 0?t[n]=$e({},i[n],e):de(t[n])==="object"&&t[n]!==null&&Rw(t[n])===Object.prototype?$e(t[n],i[n],e):Gn(t,i,n,r);else if(ve(i[n])){var a;t[n]=ut(a=i[n]).call(a)}else Gn(t,i,n,r);return t}function Hu(t,i){var e;return uy(e=[]).call(e,hr(t),[i])}function Qce(t){return ut(t).call(t)}function Zce(t){return t.getBoundingClientRect().left}function Jce(t){return t.getBoundingClientRect().top}function re(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 ehe(t,i,e,r){if(t.addEventListener){var n;r===void 0&&(r=!1),i==="mousewheel"&&gr(n=navigator.userAgent).call(n,"Firefox")&&(i="DOMMouseScroll"),t.addEventListener(i,e,r)}else t.attachEvent("on"+i,e)}function the(t,i,e,r){if(t.removeEventListener){var n;r===void 0&&(r=!1),i==="mousewheel"&&gr(n=navigator.userAgent).call(n,"Firefox")&&(i="DOMMouseScroll"),t.removeEventListener(i,e,r)}else t.detachEvent("on"+i,e)}function my(t){var i;switch(t.length){case 3:case 4:return i=qce.exec(t),i?{r:Qt(i[1]+i[1],16),g:Qt(i[2]+i[2],16),b:Qt(i[3]+i[3],16)}:null;case 6:case 7:return i=Kce.exec(t),i?{r:Qt(i[1],16),g:Qt(i[2],16),b:Qt(i[3],16)}:null;default:return null}}function zt(t,i){if(gr(t).call(t,"rgba"))return t;if(gr(t).call(t,"rgb")){var e=t.substr(oe(t).call(t,"(")+1).replace(")","").split(",");return"rgba("+e[0]+","+e[1]+","+e[2]+","+i+")"}else{var r=my(t);return r==null?t:"rgba("+r.r+","+r.g+","+r.b+","+i+")"}}function vP(t,i,e){var r;return"#"+ut(r=((1<<24)+(t<<16)+(i<<8)+e).toString(16)).call(r,1)}function yp(t,i){if(qr(t)){var e=t;if(gP(e)){var r,n=Hi(r=e.substr(4).substr(0,e.length-5).split(",")).call(r,function(d){return Qt(d)});e=vP(n[0],n[1],n[2])}if(pP(e)===!0){var a=rhe(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=mp(s.h,s.s,s.v),l=mp(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:qr(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:qr(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:qr(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:qr(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 iu(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 mp(t,i,e){var r=iu(t,i,e);return vP(r.r,r.g,r.b)}function rhe(t){var i=my(t);if(!i)throw new TypeError("'".concat(t,"' is not a valid color."));return xa(i.r,i.g,i.b)}function pP(t){var i=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t);return i}function gP(t){return Yce.test(t)}function nhe(t){return Xce.test(t)}function rn(t){if(t===null||de(t)!=="object")return null;if(t instanceof Element)return t;var i=Mn(t);for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&de(t[e])=="object"&&(i[e]=rn(t[e]));return i}function jt(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&&de(v)==="object"},o=function(v){for(var p in v)if(Object.prototype.hasOwnProperty.call(v,p))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,p,b){a(v[b])||(v[b]={});var g=p[b],y=v[b];for(var $ in g)Object.prototype.hasOwnProperty.call(g,$)&&(y[$]=g[$])},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]=Mn(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 ihe={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 Kr(t,i){var e;ve(i)||(i=[i]);var r=dP(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 ahe={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"},ohe=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 ahe[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),qr(e)===!0){if(gP(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(nhe(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(pP(e)===!0){var u=my(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=ze({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",yr(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=ze({},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=iu(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 yy(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=iu(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 p=h/this.r,b=xa(this.color.r,this.color.g,this.color.b);b.h=v,b.s=p;var g=iu(b.h,b.s,b.v);g.a=this.color.a,this.color=g,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 $p(){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($p.apply(void 0,hr(ut(i).call(i,1)))),r}var she=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},ze(this.options,this.defaultOptions),this.configureOptions=r,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new ohe(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(de(e)==="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),Ot(e)!==void 0&&(this.options.filter=Ot(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);Ot(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=Ot(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||oe(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($p("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&&oe(e).call(e,r)!==-1&&(o=oe(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 p=this._makeLabel(n[n.length-1],n),b=this._makeItem(n,p,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=yr(function(){e.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=yr(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&&(de(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=Ot(this.options),s=!1;for(var u in e)if(Object.prototype.hasOwnProperty.call(e,u)){a=!0;var l=e[u],c=Hu(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=Hu(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 p=this._makeLabel(u,c,!0);this._makeItem(c,p),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($p("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}(),uhe=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=Qt(e),this.y=Qt(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}(),wa=!1,o0,bp="background: #FFeeee; color: #dd0000",lhe=function(){function t(){N(this,t)}return F(t,null,[{key:"validate",value:function(e,r,n){wa=!1,o0=r;var a=r;return n!==void 0&&(a=r[n]),t.parse(e,a,[]),wa}},{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),bp)},l=t.getType(r[e]),c=o[l];c!==void 0?t.getType(c)==="array"&&oe(c).call(c,r[e])===-1?(u('Invalid option detected in "'+e+'". Allowed values are:'+t.print(c)+' not "'+r[e]+'". '),wa=!0):l==="object"&&a!=="__any__"&&(s=Hu(s,e),t.parse(r[e],n[a],s)):o.any===void 0&&(u('Invalid type received for "'+e+'". Expected: '+t.print(xe(o))+". Received ["+l+'] "'+r[e]+'"'),wa=!0)}},{key:"getType",value:function(e){var r=de(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,o0,[],!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=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:
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(xe(r))+t.printLocation(n,e),console.error('%cUnknown option detected: "'+e+'"'+l,bp),wa=!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],Hu(n,h));o>f.distance&&(s=f.closestMatch,u=f.path,o=f.distance,c=f.indexMatch)}else{var v;oe(v=h.toLowerCase()).call(v,l)!==-1&&(c=h),d=t.levenshteinDistance(e,h),o>d&&(s=h,u=Qce(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}(),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
- `||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
- `||Yr.charAt(i)===""){for(;J!=""&&J!=`
87
- `;)Ke();t=!0}}if(J==="/"&&vi()==="/"){for(;J!=""&&J!=`
88
- `;)Ke();t=!0}if(J==="/"&&vi()==="*"){for(;J!="";)if(J==="*"&&vi()==="/"){Ke(),Ke();break}else Ke();t=!0}for(;J===" "||J===" "||J===`
89
- `||J==="\r";)Ke()}while(t);if(J===""){bt=ct.DELIMITER;return}var e=J+vi();if(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,`
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}(),che=vr,hhe=she,Ai=yy,dhe=uhe,yP=bp,fhe=lhe;function vhe(t){return Xr=t,mhe()}var mP={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},$y=Mn(mP);$y.color="color.color";$y.style="dashes";var dt={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},s0={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},Xr="",Gi=0,ee="",K="",wt=dt.NULL;function phe(){Gi=0,ee=Xr.charAt(0)}function Ye(){Gi++,ee=Xr.charAt(Gi)}function gi(){return Xr.charAt(Gi+1)}function u0(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 ghe(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 $P(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=[]),oe(s=u.nodes).call(s,n)===-1&&u.nodes.push(n)}i.attr&&(n.attr=ln(n.attr,i.attr))}function yhe(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 bP(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(wt=dt.NULL,K="";ee===" "||ee===" "||ee===`
85
+ `||ee==="\r";)Ye();do{var t=!1;if(ee==="#"){for(var i=Gi-1;Xr.charAt(i)===" "||Xr.charAt(i)===" ";)i--;if(Xr.charAt(i)===`
86
+ `||Xr.charAt(i)===""){for(;ee!=""&&ee!=`
87
+ `;)Ye();t=!0}}if(ee==="/"&&gi()==="/"){for(;ee!=""&&ee!=`
88
+ `;)Ye();t=!0}if(ee==="/"&&gi()==="*"){for(;ee!="";)if(ee==="*"&&gi()==="/"){Ye(),Ye();break}else Ye();t=!0}for(;ee===" "||ee===" "||ee===`
89
+ `||ee==="\r";)Ye()}while(t);if(ee===""){wt=dt.DELIMITER;return}var e=ee+gi();if(s0[e]){wt=dt.DELIMITER,K=e,Ye(),Ye();return}if(s0[ee]){wt=dt.DELIMITER,K=ee,Ye();return}if(u0(ee)||ee==="-"){for(K+=ee,Ye();u0(ee);)K+=ee,Ye();K==="false"?K=!1:K==="true"?K=!0:isNaN(Number(K))||(K=Number(K)),wt=dt.IDENTIFIER;return}if(ee==='"'){for(Ye();ee!=""&&(ee!='"'||ee==='"'&&gi()==='"');)ee==='"'?(K+=ee,Ye()):ee==="\\"&&gi()==="n"?(K+=`
90
+ `,Ye()):K+=ee,Ye();if(ee!='"')throw ft('End of string " expected');Ye(),wt=dt.IDENTIFIER;return}for(wt=dt.UNKNOWN;ee!="";)K+=ee,Ye();throw new SyntaxError('Syntax error in part "'+SP(K,30)+'"')}function mhe(){var t={};if(phe(),be(),K==="strict"&&(t.strict=!0,be()),(K==="graph"||K==="digraph")&&(t.type=K,be()),wt===dt.IDENTIFIER&&(t.id=K,be()),K!="{")throw ft("Angle bracket { expected");if(be(),wP(t),K!="}")throw ft("Angle bracket } expected");if(be(),K!=="")throw ft("End of file expected");return be(),delete t.node,delete t.edge,delete t.graph,t}function wP(t){for(;K!==""&&K!="}";)$he(t),K===";"&&be()}function $he(t){var i=_P(t);if(i){EP(t,i);return}var e=bhe(t);if(!e){if(wt!=dt.IDENTIFIER)throw ft("Identifier expected");var r=K;if(be(),K==="="){if(be(),wt!=dt.IDENTIFIER)throw ft("Identifier expected");t[r]=K,be()}else whe(t,r)}}function _P(t){var i=null;if(K==="subgraph"&&(i={},i.type="subgraph",be(),wt===dt.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,wP(i),K!="}")throw ft("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 bhe(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 whe(t,i){var e={id:i},r=Fa();r&&(e.attr=r),$P(t,e),EP(t,i)}function EP(t,i){for(;K==="->"||K==="--";){var e,r=K;be();var n=_P(t);if(n)e=n;else{if(wt!=dt.IDENTIFIER)throw ft("Identifier or subgraph expected");e=K,$P(t,{id:e}),be()}var a=Fa(),o=bP(t,i,e,r,a);yhe(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(wt!=dt.IDENTIFIER)throw ft("Attribute name expected");var o=K;if(be(),K!="=")throw ft("Equal sign = expected");if(be(),wt!=dt.IDENTIFIER)throw ft("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 ft("Bracket ] expected");be()}if(gr(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 ft("Invalid value of arrows");else n[t].name==="dir"&&(l.dir=t);var c=n[l.dir].value;if(!gr(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 ft('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}}},xr(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 ft('Invalid dir type "'+c+'"');xr(n).call(n,l.dir,1)}var v;if(gr(a).call(a,"penwidth")){var p=[];for(v=n.length,t=0;t<v;t++)n[t].name!=="width"&&(n[t].name==="penwidth"&&(n[t].name="width"),p.push(n[t]));n=p}for(v=n.length,t=0;t<v;t++)ghe(n[t].attr,n[t].name,n[t].value);return i}function ft(t){return new SyntaxError(t+', got "'+SP(K,30)+'" (char '+Gi+")")}function SP(t,i){return t.length<=i?t:t.substr(0,27)+"..."}function _he(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 qh(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 l0(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){qh(e,a,t[r])}):typeof n=="string"?qh(e,n,t[r]):qh(e,r,t[r])}return e}function Ehe(t){var i=vhe(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,l0(o.attr,mP)),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,l0(s.attr,$y)),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(_he(s,u,function(h,d){var f=bP(e,h.id,d.id,o.type,o.attr),v=a(f);e.edges.push(v)}),o.to instanceof Object&&o.to.edges){var c;ge(c=o.to.edges).call(c,function(h){var d=a(h);e.edges.push(d)})}})}return i.attr&&(e.options=i.attr),e}function She(t,i){var e,r={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};i!=null&&(i.fixed!=null&&(r.nodes.fixed=i.fixed),i.parseColor!=null&&(r.nodes.parseColor=i.parseColor),i.inheritColor!=null&&(r.edges.inheritColor=i.inheritColor));var n=t.edges,a=Hi(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=Hi(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 Ohe={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"},The={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"},xhe={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"},Phe={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"},khe={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"},Ihe={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ó"},Che={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},Ahe={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},Rhe={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},Dhe={addDescription:"Cliquez dans un endroit vide pour placer un nœud.",addEdge:"Ajouter un lien",addNode:"Ajouter un nœud",back:"Retour",close:"Fermer",createEdgeError:"Impossible de créer un lien vers un cluster.",del:"Effacer la sélection",deleteClusterError:"Les clusters ne peuvent pas être effacés.",edgeDescription:"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.",edit:"Éditer",editClusterError:"Les clusters ne peuvent pas être édités.",editEdge:"Éditer le lien",editEdgeDescription:"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.",editNode:"Éditer le nœud"},Mhe={addDescription:"Kluknutím do prázdného prostoru můžete přidat nový vrchol.",addEdge:"Přidat hranu",addNode:"Přidat vrchol",back:"Zpět",close:"Zavřít",createEdgeError:"Nelze připojit hranu ke shluku.",del:"Smazat výběr",deleteClusterError:"Nelze mazat shluky.",edgeDescription:"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.",edit:"Upravit",editClusterError:"Nelze upravovat shluky.",editEdge:"Upravit hranu",editEdgeDescription:"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.",editNode:"Upravit vrchol"},Nhe=Object.freeze({__proto__:null,cn:Ahe,cs:Mhe,de:The,en:Ohe,es:xhe,fr:Dhe,it:Phe,nl:khe,pt:Ihe,ru:Che,uk:Rhe});function Fhe(t,i){try{var e=i.split(/[-_ /]/,2),r=ke(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(uy(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}(),Lhe=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}(),wp={},jhe={get exports(){return wp},set exports(t){wp=t}},Ki={},zhe={get exports(){return Ki},set exports(t){Ki=t}},Hhe=ue,Whe=Hhe(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),Vhe=ue,Uhe=tt,Ghe=Lr,c0=Whe,au=Object.isExtensible,Khe=Vhe(function(){au(1)}),qhe=Khe||c0?function(i){return!Uhe(i)||c0&&Ghe(i)=="ArrayBuffer"?!1:au?au(i):!0}:au,Yhe=ue,OP=!Yhe(function(){return Object.isExtensible(Object.preventExtensions({}))}),Xhe=q,Qhe=le,Zhe=Uo,Jhe=tt,by=rt,ede=Gt.f,h0=Yo,tde=Pl,wy=qhe,rde=$l,nde=OP,TP=!1,Dr=rde("meta"),ide=0,_y=function(t){ede(t,Dr,{value:{objectID:"O"+ide++,weakData:{}}})},ade=function(t,i){if(!Jhe(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!by(t,Dr)){if(!wy(t))return"F";if(!i)return"E";_y(t)}return t[Dr].objectID},ode=function(t,i){if(!by(t,Dr)){if(!wy(t))return!0;if(!i)return!1;_y(t)}return t[Dr].weakData},sde=function(t){return nde&&TP&&wy(t)&&!by(t,Dr)&&_y(t),t},ude=function(){lde.enable=function(){},TP=!0;var t=h0.f,i=Qhe([].splice),e={};e[Dr]=1,t(e).length&&(h0.f=function(r){for(var n=t(r),a=0,o=n.length;a<o;a++)if(n[a]===Dr){i(n,a,1);break}return n},Xhe({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:tde.f}))},lde=zhe.exports={enable:ude,fastKey:ade,getWeakData:ode,onFreeze:sde};Zhe[Dr]=!0;var cde=Wo,hde=Nt,dde=Bt,fde=la,vde=TT,pde=ar,d0=Be,gde=CT,yde=xl,f0=OT,mde=TypeError,ou=function(t,i){this.stopped=t,this.result=i},v0=ou.prototype,Ey=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=cde(i,r),l,c,h,d,f,v,p,b=function(y){return l&&f0(l,"normal",y),new ou(!0,y)},g=function(y){return n?(dde(y),s?u(y[0],y[1],b):u(y[0],y[1])):s?u(y,b):u(y)};if(a)l=t.iterator;else if(o)l=t;else{if(c=yde(t),!c)throw mde(fde(t)+" is not iterable");if(vde(c)){for(h=0,d=pde(t);d>h;h++)if(f=g(t[h]),f&&d0(v0,f))return f;return new ou(!1)}l=gde(t,c)}for(v=a?t.next:l.next;!(p=hde(v,l)).done;){try{f=g(p.value)}catch(y){f0(l,"throw",y)}if(typeof f=="object"&&f&&d0(v0,f))return f}return new ou(!1)},$de=Be,bde=TypeError,Sy=function(t,i){if($de(i,t))return t;throw bde("Incorrect invocation")},wde=q,_de=Ue,Ede=Ki,Sde=ue,Ode=ca,Tde=Ey,xde=Sy,Pde=et,kde=tt,Ide=da,Cde=Gt.f,Ade=fn.forEach,Rde=qe,xP=ti,Dde=xP.set,Mde=xP.getterFor,Oy=function(t,i,e){var r=t.indexOf("Map")!==-1,n=t.indexOf("Weak")!==-1,a=r?"set":"add",o=_de[t],s=o&&o.prototype,u={},l;if(!Rde||!Pde(o)||!(n||s.forEach&&!Sde(function(){new o().entries().next()})))l=e.getConstructor(i,t,r,a),Ede.enable();else{l=i(function(d,f){Dde(xde(d,c),{type:t,collection:new o}),f!=null&&Tde(f,d[a],{that:d,AS_ENTRIES:r})});var c=l.prototype,h=Mde(t);Ade(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(d){var f=d=="add"||d=="set";d in s&&!(n&&d=="clear")&&Ode(c,d,function(v,p){var b=h(this).collection;if(!f&&n&&!kde(v))return d=="get"?void 0:!1;var g=b[d](v===0?0:v,p);return f?this:g})}),n||Cde(c,"size",{configurable:!0,get:function(){return h(this).collection.size}})}return Ide(l,t,!1,!0),u[t]=l,wde({global:!0,forced:!0},u),n||e.setStrong(l,t,r),l},Nde=qo,Ty=function(t,i,e){for(var r in i)e&&e.unsafe&&t[r]?t[r]=i[r]:Nde(t,r,i[r],e);return t},Fde=Ut,Bde=ty,Lde=Le,jde=qe,p0=Lde("species"),zde=function(t){var i=Fde(t);jde&&i&&!i[p0]&&Bde(i,p0,{configurable:!0,get:function(){return this}})},Hde=ha,Wde=ty,g0=Ty,Vde=Wo,Ude=Sy,Gde=Fo,Kde=Ey,qde=Zg,js=Jg,Yde=zde,_a=qe,y0=Ki.fastKey,PP=ti,m0=PP.set,Yh=PP.getterFor,kP={getConstructor:function(t,i,e,r){var n=t(function(l,c){Ude(l,a),m0(l,{type:i,index:Hde(null),first:void 0,last:void 0,size:0}),_a||(l.size=0),Gde(c)||Kde(c,l[r],{that:l,AS_ENTRIES:e})}),a=n.prototype,o=Yh(i),s=function(l,c,h){var d=o(l),f=u(l,c),v,p;return f?f.value=h:(d.last=f={index:p=y0(c,!0),key:c,value:h,previous:v=d.last,next:void 0,removed:!1},d.first||(d.first=f),v&&(v.next=f),_a?d.size++:l.size++,p!=="F"&&(d.index[p]=f)),l},u=function(l,c){var h=o(l),d=y0(c),f;if(d!=="F")return h.index[d];for(f=h.first;f;f=f.next)if(f.key==c)return f};return g0(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,_a?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),_a?h.size--:c.size--}return!!d},forEach:function(c){for(var h=o(this),d=Vde(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)}}),g0(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)}}),_a&&Wde(a,"size",{configurable:!0,get:function(){return o(this).size}}),n},setStrong:function(t,i,e){var r=i+" Iterator",n=Yh(i),a=Yh(r);qde(t,i,function(o,s){m0(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,js(void 0,!0)):s=="keys"?js(u.key,!1):s=="values"?js(u.value,!1):js([u.key,u.value],!1)},e?"entries":"values",!e,!0),Yde(i)}},Xde=Oy,Qde=kP;Xde("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Qde);var Zde=ae,Jde=Zde.Map,efe=Jde,tfe=efe;(function(t){t.exports=tfe})(jhe);var IP=V(wp),rfe=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},ze(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)&&oe(r).call(r,n)===-1){var a=e[n];this.add(n,a)}}}},{key:"clear",value:function(){this._groups=new IP,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}(),_p={},nfe={get exports(){return _p},set exports(t){_p=t}},ife=q;ife({target:"Number",stat:!0},{isNaN:function(i){return i!=i}});var afe=ae,ofe=afe.Number.isNaN,sfe=ofe,ufe=sfe;(function(t){t.exports=ufe})(nfe);var Ep=V(_p),Sp={},lfe={get exports(){return Sp},set exports(t){Sp=t}},cfe=Ue,hfe=cfe.isFinite,dfe=Number.isFinite||function(i){return typeof i=="number"&&hfe(i)},ffe=q,vfe=dfe;ffe({target:"Number",stat:!0},{isFinite:vfe});var pfe=ae,gfe=pfe.Number.isFinite,yfe=gfe,mfe=yfe;(function(t){t.exports=mfe})(lfe);var kn=V(Sp),Op={},$fe={get exports(){return Op},set exports(t){Op=t}},bfe=q,wfe=fn.some,_fe=pa,Efe=_fe("some");bfe({target:"Array",proto:!0,forced:!Efe},{some:function(i){return wfe(this,i,arguments.length>1?arguments[1]:void 0)}});var Sfe=nt,Ofe=Sfe("Array").some,Tfe=Be,xfe=Ofe,Xh=Array.prototype,Pfe=function(t){var i=t.some;return t===Xh||Tfe(Xh,t)&&i===Xh.some?xfe:i},kfe=Pfe,Ife=kfe;(function(t){t.exports=Ife})($fe);var Cfe=V(Op),Tp={},Afe={get exports(){return Tp},set exports(t){Tp=t}},CP=Ue,Rfe=ue,Dfe=le,Mfe=br,Nfe=ly.trim,Ffe=Bl,Bfe=Dfe("".charAt),Wu=CP.parseFloat,$0=CP.Symbol,b0=$0&&$0.iterator,Lfe=1/Wu(Ffe+"-0")!==-1/0||b0&&!Rfe(function(){Wu(Object(b0))}),jfe=Lfe?function(i){var e=Nfe(Mfe(i)),r=Wu(e);return r===0&&Bfe(e,0)=="-"?-0:r}:Wu,zfe=q,w0=jfe;zfe({global:!0,forced:parseFloat!=w0},{parseFloat:w0});var Hfe=ae,Wfe=Hfe.parseFloat,Vfe=Wfe,Ufe=Vfe;(function(t){t.exports=Ufe})(Afe);var AP=V(Tp),xp={},Gfe={get exports(){return xp},set exports(t){xp=t}},Kfe=q,qfe=ue,Yfe=Pl.f,Xfe=qfe(function(){return!Object.getOwnPropertyNames(1)});Kfe({target:"Object",stat:!0,forced:Xfe},{getOwnPropertyNames:Yfe});var Qfe=ae,Zfe=Qfe.Object,Jfe=function(i){return Zfe.getOwnPropertyNames(i)},eve=Jfe,tve=eve;(function(t){t.exports=tve})(Gfe);var rve=V(xp);function xy(t,i){var e=["node","edge","label"],r=!0,n=Kr(i,"chosen");if(typeof n=="boolean")r=n;else if(de(n)==="object"){if(oe(e).call(e,t)===-1)throw new Error("choosify: subOption '"+t+"' should be one of '"+e.join("', '")+"'");var a=Kr(i,["chosen",t]);(typeof a=="boolean"||typeof a=="function")&&(r=a)}return r}function Pp(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 Vu(t){return typeof t=="string"&&t!==""}function RP(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 kp={},nve={get exports(){return kp},set exports(t){kp=t}},ive=nt,ave=ive("Array").values,ove=ave,sve=ove,uve=ei,lve=rt,cve=Be,hve=sve,Qh=Array.prototype,dve={DOMTokenList:!0,NodeList:!0},fve=function(t){var i=t.values;return t===Qh||cve(Qh,t)&&i===Qh.values||lve(dve,uve(t))?hve:i};(function(t){t.exports=fve})(nve);var DP=V(kp),vve=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=ze({},DP(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={};ze(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}(),pve={"<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=ke(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=pve[e];a!==void 0?n=a:n=new RegExp(e),r=e.length}return[n,r]}}]),t}(),gve=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 vve(o)}return F(t,[{key:"process",value:function(e){if(!Vu(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 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};
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 p=0;p<a;p++)this.lines.newLine(n[p]);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(ut(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(ut(s).call(s,0,u),r),a[0]=ut(s).call(s,u)}else{var l=o;a[o-1]===" "?o--:a[l]===" "&&l++;var c=ut(a).call(a,0,o).join("");o==a.length&&n?this.lines.append(c,r):this.lines.newLine(c,r),a=ut(a).call(a,l)}}}}]),t}(),Ea=["bold","ital","boldital","mono"],MP=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),Vu(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(de(e.font)==="object"){var r=e.font.size;r!==void 0&&(this.baseSize=r)}}}},{key:"initFontOptions",value:function(e){var r=this;if(re(Ea,function(n){r.fontOptions[n]={}}),t.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}re(e,function(n,a){n!=null&&de(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=Kr(e,"widthConstraint");if(typeof n=="number")r.maxWdt=Number(n),r.minWdt=Number(n);else if(de(n)==="object"){var a=Kr(e,["widthConstraint","maximum"]);typeof a=="number"&&(r.maxWdt=Number(a));var o=Kr(e,["widthConstraint","minimum"]);typeof o=="number"&&(r.minWdt=Number(o))}var s=Kr(e,"heightConstraint");if(typeof s=="number")r.minHgt=Number(s);else if(de(s)==="object"){var u=Kr(e,["heightConstraint","minimum"]);typeof u=="number"&&(r.minHgt=Number(u));var l=Kr(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=xy("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),re(a,function(s,u){s!==void 0&&(Object.prototype.hasOwnProperty.call(r,u)||(oe(Ea).call(Ea,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=Ea[o],l=r.fontOptions[u],c=r.getFontOptions(n,u);re(c,function(h,d){l[d]=h}),l.size=Number(l.size),l.vadjust=Number(l.vadjust)},o=0;o<Ea.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=ke(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),p=ke(v,2),b=p[0],g=p[1];f.strokeWidth>0&&(e.lineWidth=f.strokeWidth,e.strokeStyle=g,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=zt(a,s),o=zt(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 gve(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}(),Ip={},yve={get exports(){return Ip},set exports(t){Ip=t}},mve=Tl,$ve=la,bve=TypeError,wve=function(t){if(mve(t))return t;throw bve($ve(t)+" is not a constructor")},_ve=q,Eve=Ut,Zh=Do,Sve=sT,E0=wve,Ove=Bt,S0=tt,Tve=ha,NP=ue,Py=Eve("Reflect","construct"),xve=Object.prototype,Pve=[].push,FP=NP(function(){function t(){}return!(Py(function(){},[],t)instanceof t)}),BP=!NP(function(){Py(function(){})}),O0=FP||BP;_ve({target:"Reflect",stat:!0,forced:O0,sham:O0},{construct:function(i,e){E0(i),Ove(e);var r=arguments.length<3?i:E0(arguments[2]);if(BP&&!FP)return Py(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 Zh(Pve,n,e),new(Zh(Sve,i,n))}var a=r.prototype,o=Tve(S0(a)?a:xve),s=Zh(i,o,e);return S0(s)?s:o}});var kve=ae,Ive=kve.Reflect.construct,Cve=Ive,Ave=Cve;(function(t){t.exports=Ave})(yve);var P=V(Ip),Cp={},Rve={get exports(){return Cp},set exports(t){Cp=t}},Ap={},Dve={get exports(){return Ap},set exports(t){Ap=t}},Mve=Fx,Nve=Mve,Fve=Nve,Bve=Fve;(function(t){t.exports=Bve})(Dve);(function(t){t.exports=Ap})(Rve);var Lve=V(Cp),Rp={},jve={get exports(){return Rp},set exports(t){Rp=t}},Dp={},zve={get exports(){return Dp},set exports(t){Dp=t}},Hve=q,Wve=OZ;Hve({target:"Object",stat:!0},{setPrototypeOf:Wve});var Vve=ae,Uve=Vve.Object.setPrototypeOf,Gve=Uve,Kve=Gve,qve=Kve,Yve=qve,Xve=Yve,Qve=Xve;(function(t){t.exports=Qve})(zve);(function(t){t.exports=Dp})(jve);var Mp=V(Rp),Np={},Zve={get exports(){return Np},set exports(t){Np=t}},Fp={},Jve={get exports(){return Fp},set exports(t){Fp=t}},epe=uT,tpe=epe,rpe=tpe,npe=rpe;(function(t){t.exports=npe})(Jve);(function(t){t.exports=Fp})(Zve);var ky=V(Np);function Bp(t,i){var e;return Bp=Mp?ky(e=Mp).call(e):function(n,a){return n.__proto__=a,n},Bp(t,i)}function he(t,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Lve(i&&i.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Nl(t,"prototype",{writable:!1}),i&&Bp(t,i)}function ipe(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&&(de(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ipe(t)}var Lp={},ape={get exports(){return Lp},set exports(t){Lp=t}},jp={},ope={get exports(){return jp},set exports(t){jp=t}},spe=Ax,upe=spe,lpe=upe,cpe=lpe;(function(t){t.exports=cpe})(ope);(function(t){t.exports=jp})(ape);var T0=V(Lp);function z(t){var i;return z=Mp?ky(i=T0).call(i):function(r){return r.__proto__||T0(r)},z(t)}var ai=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&&(de(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 hpe(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 fpe=function(t){he(e,t);var i=hpe(e);function e(r,n,a){var o;return N(this,e),o=i.call(this,r,n,a),o._setMargins(a),o}return F(e,[{key:"resize",value:function(n){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),lT(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}(ai);function vpe(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 Iy=function(t){he(e,t);var i=vpe(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;de(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),qg(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}(ai);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){he(e,t);var i=gpe(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}(Iy);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 wpe=function(t){he(e,t);var i=$pe(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}(Iy);function _pe(t){var i=Epe();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 Epe(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var gn=function(t){he(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,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),zX(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}(ai);function x0(t,i){var e=xe(t);if(sn){var r=sn(t);i&&(r=Ot(r).call(r,function(n){return vn(t,n).enumerable})),e.push.apply(e,r)}return e}function Spe(t){for(var i=1;i<arguments.length;i++){var e,r,n=arguments[i]!=null?arguments[i]:{};i%2?ge(e=x0(Object(n),!0)).call(e,function(a){Fl(t,a,n[a])}):un?Dl(t,un(n)):ge(r=x0(Object(n))).call(r,function(a){Ml(t,a,vn(n,a))})}return t}function Ope(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 xpe=function(t){he(e,t);var i=Ope(e);function e(r,n,a,o){var s;return N(this,e),s=i.call(this,r,n,a,o),s.ctxRenderer=o,s}return F(e,[{key:"draw",value:function(n,a,o,s,u,l){this.resize(n,s,u,l),this.left=a-this.width/2,this.top=o-this.height/2,n.save();var c=this.ctxRenderer({ctx:n,id:this.options.id,x:a,y:o,state:{selected:s,hover:u},style:Spe({},l),label:this.options.label});if(c.drawNode!=null&&c.drawNode(),n.restore(),c.drawExternalLabel){var h=c.drawExternalLabel;c.drawExternalLabel=function(){n.save(),h(),n.restore()}}return c.nodeDimensions&&(this.customSizeWidth=c.nodeDimensions.width,this.customSizeHeight=c.nodeDimensions.height),c}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function Ppe(t){var i=kpe();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 kpe(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Ipe=function(t){he(e,t);var i=Ppe(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),cT(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}(ai);function Cpe(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 Rpe=function(t){he(e,t);var i=Cpe(e);function e(r,n,a){return N(this,e),i.call(this,r,n,a)}return F(e,[{key:"draw",value:function(n,a,o,s,u,l){return this._drawShape(n,"diamond",4,a,o,s,u,l)}},{key:"distanceToBorder",value:function(n,a){return this._distanceToBorder(n,a)}}]),e}(gn);function Dpe(t){var i=Mpe();return function(){var r=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 Mpe(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Npe=function(t){he(e,t);var i=Dpe(e);function e(r,n,a){return N(this,e),i.call(this,r,n,a)}return F(e,[{key:"draw",value:function(n,a,o,s,u,l){return this._drawShape(n,"circle",2,a,o,s,u,l)}},{key:"distanceToBorder",value:function(n){return n&&this.resize(n),this.options.size}}]),e}(gn);function Fpe(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 P0=function(t){he(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:"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),ov(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}(ai);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){he(e,t);var i=Lpe(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}(ai);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){he(e,t);var i=Hpe(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 p=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&&(p=zt(p,l.opacity),b=zt(b,l.opacity)),n.strokeStyle=p,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}(Iy);function Upe(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 Kpe=function(t){he(e,t);var i=Upe(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 qpe(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 Xpe=function(t){he(e,t);var i=qpe(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 Qpe(t){var i=Zpe();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 Zpe(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Jpe=function(t){he(e,t);var i=Qpe(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 ege(t){var i=tge();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 tge(){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 rge=function(t){he(e,t);var i=ege(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}(ai);function nge(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 age=function(t){he(e,t);var i=nge(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 oge(t){var i=sge();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 sge(){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 uge=function(t){he(e,t);var i=oge(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 k0(t,i){var e=xe(t);if(sn){var r=sn(t);i&&(r=Ot(r).call(r,function(n){return vn(t,n).enumerable})),e.push.apply(e,r)}return e}function I0(t){for(var i=1;i<arguments.length;i++){var e,r,n=arguments[i]!=null?arguments[i]:{};i%2?ge(e=k0(Object(n),!0)).call(e,function(a){Fl(t,a,n[a])}):un?Dl(t,un(n)):ge(r=k0(Object(n))).call(r,function(a){Ml(t,a,vn(n,a))})}return t}var It=function(){function t(i,e,r,n,a,o){N(this,t),this.options=rn(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 MP(this.body,this.options,!1),this.setOptions(i)}return F(t,[{key:"attachEdge",value:function(e){var r;oe(r=this.edges).call(r,e)===-1&&this.edges.push(e)}},{key:"detachEdge",value:function(e){var r,n=oe(r=this.edges).call(r,e);if(n!=-1){var a;xr(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=Qt(e.x),this.predefinedPosition=!0)),e.y!==void 0&&(e.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=Qt(e.y),this.predefinedPosition=!0)),e.size!==void 0&&(this.baseSize=e.size),e.value!==void 0&&(e.value=AP(e.value)),t.parseOptions(this.options,e,!0,this.globalOptions,this.grouplist);var n=[e,this.options,this.defaultOptions];return this.chooser=xy("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=zt(e.borderColor,r),e.color=zt(e.color,r),e.shadowColor=zt(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,I0(I0({},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 fpe(this.options,this.body,this.labelModule);break;case"circle":this.shape=new mpe(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new wpe(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new xpe(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new Ipe(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new Rpe(this.options,this.body,this.labelModule);break;case"dot":this.shape=new Npe(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new P0(this.options,this.body,this.labelModule);break;case"icon":this.shape=new zpe(this.options,this.body,this.labelModule);break;case"image":this.shape=new Vpe(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 Xpe(this.options,this.body,this.labelModule);break;case"star":this.shape=new Jpe(this.options,this.body,this.labelModule);break;case"text":this.shape=new rge(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new age(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new uge(this.options,this.body,this.labelModule);break;default:this.shape=new P0(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()&&Pp(this.labelModule.getSize(),e)&&r.push({nodeId:this.id,labelId:0}),Pp(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=Ot(a=rve(r)).call(a,function(c){return r[c]!=null});l.push("font"),zu(l,e,u),e.color=yp(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(zu(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),jt(e,r,"shadow",a),r.color!==void 0&&r.color!==null){var u=yp(r.color);fP(e.color,u)}else n===!0&&r.color===null&&(e.color=rn(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=rn(a.font)),t.updateGroupOptions(e,r,o),r.scaling!==void 0&&jt(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.",yP),e.mass=1}}}]),t}();function lge(t,i){var e=typeof pn<"u"&&jr(t)||t["@@iterator"];if(!e){if(ve(t)||(e=cge(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 cge(t,i){var e;if(t){if(typeof t=="string")return C0(t,i);var r=ut(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ri(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return C0(t,i)}}function C0(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 hge=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=rn(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(){re(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(It.parseOptions(this.options,e),e.opacity!==void 0&&(Ep(e.opacity)||!kn(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=xe(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(WO("id",e))this.body.data.nodes=e;else if(ve(e))this.body.data.nodes=new Au,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new Au;else throw new TypeError("Array or DataSet expected");if(n&&re(this.nodesListeners,function(s,u){n.off(u,s)}),this.body.nodes={},this.body.data.nodes){var a=this;re(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=Cfe(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]:It;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;re(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=lge(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),yr(function(){a.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}]),t}(),zp={},dge={get exports(){return zp},set exports(t){zp=t}},Hp={},fge={get exports(){return Hp},set exports(t){Hp=t}},A0=rt,vge=function(t){return t!==void 0&&(A0(t,"value")||A0(t,"writable"))},pge=q,gge=Nt,yge=tt,mge=Bt,$ge=vge,bge=sa,wge=Ol;function LP(t,i){var e=arguments.length<3?t:arguments[2],r,n;if(mge(t)===e)return t[i];if(r=bge.f(t,i),r)return $ge(r)?r.value:r.get===void 0?void 0:gge(r.get,e);if(yge(n=wge(t)))return LP(n,i,e)}pge({target:"Reflect",stat:!0},{get:LP});var _ge=ae,Ege=_ge.Reflect.get,Sge=Ege,Oge=Sge,Tge=Oge,xge=Tge,Pge=xge,kge=Pge;(function(t){t.exports=kge})(fge);(function(t){t.exports=Hp})(dge);var R0=V(zp),Wp={},Ige={get exports(){return Wp},set exports(t){Wp=t}},Vp={},Cge={get exports(){return Vp},set exports(t){Vp=t}},Age=hx,Rge=Age,Dge=Rge,Mge=Dge;(function(t){t.exports=Mge})(Cge);(function(t){t.exports=Vp})(Ige);var Nge=V(Wp);function Fge(t,i){for(;!Object.prototype.hasOwnProperty.call(t,i)&&(t=z(t),t!==null););return t}function su(){if(typeof Reflect<"u"&&R0){var t;su=ky(t=R0).call(t)}else su=function(e,r,n){var a=Fge(e,r);if(a){var o=Nge(a,r);return o.get?o.get.call(arguments.length<3?e:n):o.value}};return su.apply(this,arguments)}var Up={},Bge={get exports(){return Up},set exports(t){Up=t}},Lge=q,D0=Math.hypot,jge=Math.abs,zge=Math.sqrt,Hge=!!D0&&D0(1/0,NaN)!==1/0;Lge({target:"Math",stat:!0,arity:2,forced:Hge},{hypot:function(i,e){for(var r=0,n=0,a=arguments.length,o=0,s,u;n<a;)s=jge(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*zge(r)}});var Wge=ae,Vge=Wge.Math.hypot,Uge=Vge,Gge=Uge;(function(t){t.exports=Gge})(Bge);var Kge=V(Up);function jP(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 Fe=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}(),Yge=function(t){he(e,t);var i=jP(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}(Fe),Xge=function(t){he(e,t);var i=jP(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 Fe.transform(o,a),Fe.drawPath(n,o),!0}}]),e}(Fe),Qge=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 Fe.transform(n,r),Fe.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:-.4,y:0};Fe.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}(),Jge=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var n={x:-.3,y:0};Fe.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}(),eye=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 Fe.transform(n,r),Fe.drawPath(e,n),!0}}]),t}(),tye=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 Fe.transform(n,r),Fe.drawPath(e,n),!0}}]),t}(),rye=function(){function t(){N(this,t)}return F(t,null,[{key:"draw",value:function(e,r){var n={x:-.4,y:0};return Fe.transform(n,r),qg(e,n.x,n.y,r.length*.4),!0}}]),t}(),nye=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 Fe.transform(n,r),Fe.drawPath(e,n),!0}}]),t}(),iye=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 Fe.transform(n,r),Fe.drawPath(e,n),!0}}]),t}(),aye=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 Fe.transform(n,r),Fe.drawPath(e,n),!0}}]),t}(),oye=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 Fe.transform(n,r),Fe.drawPath(e,n),!0}}]),t}(),zP=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 Yge.draw(e,r);case"circle":return rye.draw(e,r);case"box":return iye.draw(e,r);case"crow":return Qge.draw(e,r);case"curve":return Zge.draw(e,r);case"diamond":return aye.draw(e,r);case"inv_curve":return Jge.draw(e,r);case"triangle":return eye.draw(e,r);case"inv_triangle":return tye.draw(e,r);case"bar":return nye.draw(e,r);case"vee":return oye.draw(e,r);case"arrow":default:return Xge.draw(e,r)}}}]),t}();function M0(t,i){var e=xe(t);if(sn){var r=sn(t);i&&(r=Ot(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){Fl(t,a,n[a])}):un?Dl(t,un(n)):ge(r=M0(Object(n))).call(r,function(a){Ml(t,a,vn(n,a))})}return t}var HP=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=ke(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=ke(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)hT(e,this.from.x,this.from.y,this.to.x,this.to.y,s);else{var f=this._getCircleData(e),v=ke(f,3),p=v[0],b=v[1],g=v[2];this._circle(e,r,p,b,g)}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=ut(r=this._getCircleData(e)).call(r,0,2),a=ke(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=RP(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,p=0;this.options.arrowStrikethrough===!0&&(l===-1?p=this.options.endPointOffset.from:l===1&&(p=this.options.endPointOffset.to));var b=0;do{v=(s+u)*.5,f=this._pointOnCircle(a,o,h,v);var g=Math.atan2(e.y-f.y,e.x-f.x),y=e.distanceToBorder(r,g)+p,$=Math.sqrt(Math.pow(f.x-e.x,2)+Math.pow(f.y-e.y,2)),m=y-$;if(Math.abs(m)<d)break;m>0?l>0?s=v:u=v:l>0?u=v:s=v,++b}while(s<=u&&b<c);return N0(N0({},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=zt(this.from.options.color.border,r.opacity),o=zt(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"?zt(this.to.options.color.border,r.opacity):zt(this.from.options.color.border,r.opacity)}else return zt(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=ke(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,p=f-s;return Math.sqrt(v*v+p*p)}},{key:"getArrowData",value:function(e,r,n,a,o,s){var u,l,c,h,d,f,v,p=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*p;if(c!=h){var g=Kge(c.x-h.x,c.y-h.y),y=b/g;if(r!=="middle")if(this.options.smooth.enabled===!0){var $=this._findBorderPosition(c,e,{via:n}),m=this.getPoint($.t+y*(r==="from"?1:-1),n);u=Math.atan2($.y-m.y,$.x-m.x),l=$}else u=Math.atan2(c.y-h.y,c.x-h.x),l=this._findBorderPosition(c,e);else{var w=(d?-y:y)/2,E=this.getPoint(.5+w,n),T=this.getPoint(.5-w,n);u=Math.atan2(E.y-T.y,E.x-T.x),l=this.getPoint(.5,n)}}else{var O=this._getCircleData(e),_=ke(O,3),S=_[0],I=_[1],L=_[2];if(r==="from"){var B=this.options.selfReference.angle,Q=this.options.selfReference.angle+Math.PI,ie=this._findBorderPositionCircle(this.from,e,{x:S,y:I,low:B,high:Q,direction:-1});u=ie.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,l=ie}else if(r==="to"){var ne=this.options.selfReference.angle,ce=this.options.selfReference.angle+Math.PI,we=this._findBorderPositionCircle(this.from,e,{x:S,y:I,low:ne,high:ce,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(S,I,L,Oe),u=Oe*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}var or=l.x-b*.9*Math.cos(u),it=l.y-b*.9*Math.sin(u),_e={x:or,y:it};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=zP.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 F0(t,i){var e=xe(t);if(sn){var r=sn(t);i&&(r=Ot(r).call(r,function(n){return vn(t,n).enumerable})),e.push.apply(e,r)}return e}function B0(t){for(var i=1;i<arguments.length;i++){var e,r,n=arguments[i]!=null?arguments[i]:{};i%2?ge(e=F0(Object(n),!0)).call(e,function(a){Fl(t,a,n[a])}):un?Dl(t,un(n)):ge(r=F0(Object(n))).call(r,function(a){Ml(t,a,vn(n,a))})}return t}function sye(t){var i=uye();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 uye(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var Cy=function(t){he(e,t);var i=sye(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,p=this.options.endPointOffset?this.options.endPointOffset.to:0;n.id===this.from.id&&(d=this.from,l=!0,p=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(p=0);var b=0;do{v=(h+c)*.5,f=this.getPoint(v,o);var g=Math.atan2(d.y-f.y,d.x-f.x),y=d.distanceToBorder(a,g)+p,$=Math.sqrt(Math.pow(f.x-d.x,2)+Math.pow(f.y-d.y,2)),m=y-$;if(Math.abs(m)<u)break;m<0?l===!1?h=v:c=v:l===!1?c=v:h=v,++b}while(h<=c&&b<s);return B0(B0({},f),{},{t:v})}},{key:"_getDistanceToBezierEdge",value:function(n,a,o,s,u,l,c){var h=1e9,d,f,v,p,b,g=n,y=a;for(f=1;f<10;f++)v=.1*f,p=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(g,y,p,b,u,l),h=d<h?d:h),g=p,y=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}(HP);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 L0=function(t){he(e,t);var i=lye(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){su(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=ke(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}(Cy);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 j0=function(t){he(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:"_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 p=(1-n)*s;return this.from.y<this.to.y&&(p=-p),{x:this.from.x,y:this.to.y+p}}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),g=Math.PI,y=Math.atan2(s,o),$=(y+(n*.5+.5)*g)%(2*g);return{x:this.from.x+(n*.5+.5)*b*Math.sin($),y:this.from.y+(n*.5+.5)*b*Math.cos($)}}else if(a==="curvedCCW"){o=this.to.x-this.from.x,s=this.from.y-this.to.y;var m=Math.sqrt(o*o+s*s),w=Math.PI,E=Math.atan2(s,o),T=(E+(-n*.5+.5)*w)%(2*w);return{x:this.from.x+(n*.5+.5)*m*Math.sin(T),y:this.from.y+(n*.5+.5)*m*Math.cos(T)}}else{var O,_;o<=s?O=_=n*s:O=_=n*o,this.from.x>this.to.x&&(O=-O),this.from.y>=this.to.y&&(_=-_);var S=this.from.x+O,I=this.from.y+_;return o<=s?this.from.x<=this.to.x?S=this.to.x<S?this.to.x:S:S=this.to.x>S?this.to.x:S: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:S,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}(Cy);function fye(t){var i=vye();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 vye(){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 pye=function(t){he(e,t);var i=fye(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,p=[0,0,0,0],b=1;b<10;b++){var g=.1*b;p[0]=Math.pow(1-g,3),p[1]=3*g*Math.pow(1-g,2),p[2]=3*Math.pow(g,2)*(1-g),p[3]=Math.pow(g,3);var y=p[0]*n+p[1]*c.x+p[2]*h.x+p[3]*o,$=p[0]*a+p[1]*c.y+p[2]*h.y+p[3]*s;if(b>0){var m=this._getDistanceToLine(f,v,y,$,u,l);d=m<d?m:d}f=y,v=$}return d}}]),e}(Cy);function gye(t){var i=yye();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 yye(){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 z0=function(t){he(e,t);var i=gye(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=ke(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=ke(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}(pye);function mye(t){var i=$ye();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 $ye(){if(typeof Reflect>"u"||!P||P.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(P(Boolean,[],function(){})),!0}catch{return!1}}var H0=function(t){he(e,t);var i=mye(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}(HP),Ri=function(){function t(i,e,r,n,a){if(N(this,t),e===void 0)throw new Error("No body provided");this.options=rn(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 MP(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=AP(e.value));var n=[e,this.options,this.defaultOptions];return this.chooser=xy("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 L0&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof z0&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof j0&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof H0&&e.type.enabled===!1)&&(n=!1),n===!0&&(r=this.cleanup())),n===!0?e.enabled===!0?e.type==="dynamic"?(r=!0,this.edgeType=new L0(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new z0(this.options,this.body,this.labelModule):this.edgeType=new j0(this.options,this.body,this.labelModule):this.edgeType=new H0(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=RP(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();Pp(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(ya(s,e,r,n),r.endPointOffset!==void 0&&r.endPointOffset.from!==void 0&&(kn(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&&(kn(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"))),Vu(r.label)?e.label=r.label:Vu(e.label)||(e.label=void 0),jt(e,r,"smooth",a),jt(e,r,"shadow",a),jt(e,r,"background",a),r.dashes!==void 0&&r.dashes!==null?e.dashes=r.dashes:n===!0&&r.dashes===null&&(e.dashes=Mn(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),jt(e.scaling,r.scaling,"label",a.scaling)):n===!0&&r.scaling===null&&(e.scaling=Mn(a.scaling)),r.arrows!==void 0&&r.arrows!==null)if(typeof r.arrows=="string"){var u=r.arrows.toLowerCase();e.arrows.to.enabled=oe(u).call(u,"to")!=-1,e.arrows.middle.enabled=oe(u).call(u,"middle")!=-1,e.arrows.from.enabled=oe(u).call(u,"from")!=-1}else if(de(r.arrows)==="object")jt(e.arrows,r.arrows,"to",a.arrows),jt(e.arrows,r.arrows,"middle",a.arrows),jt(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=Mn(a.arrows));if(r.color!==void 0&&r.color!==null){var l=qr(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(qr(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=rn(a.color));n===!0&&r.font===null&&(e.font=rn(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}(),bye=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(){re(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){Ri.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(WO("id",e))this.body.data.edges=e;else if(ve(e))this.body.data.edges=new Au,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new Au;else throw new TypeError("Array or DataSet expected");if(a&&re(this.edgesListeners,function(s,u){a.off(u,s)}),this.body.edges={},this.body.data.edges){re(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;re(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;re(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 Ri(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=[];re(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}(),WP=function(){function t(i,e,r){N(this,t),this.body=i,this.physicsBody=e,this.barnesHutTree,this.setOptions(r),this._rng=zl("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 p=1e-5,b=Math.max(p,Math.abs(u-o)),g=.5*b,y=.5*(o+u),$=.5*(s+l),m={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:y-g,maxX:y+g,minY:$-g,maxY:$+g},size:b,calcSize:1/b,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(m.root);for(var w=0;w<a;w++)n=e[r[w]],n.options.mass>0&&this._placeInTree(m.root,n);return m}},{key:"_updateBranchMass",value:function(e,r){var n=e.centerOfMass,a=e.mass+r.options.mass,o=1/a;n.x=n.x*e.mass+r.x*r.options.mass,n.x*=o,n.y=n.y*e.mass+r.y*r.options.mass,n.y*=o,e.mass=a;var s=Math.max(Math.max(r.height,r.radius),r.width);e.maxWidth=e.maxWidth<s?s:e.maxWidth}},{key:"_placeInTree",value:function(e,r,n){(n!=!0||n===void 0)&&this._updateBranchMass(e,r);var a=e.children.NW.range,o;a.maxX>r.x?a.maxY>r.y?o="NW":o="SW":a.maxY>r.y?o="NE":o="SE",this._placeInRegion(e,r,o)}},{key:"_placeInRegion",value:function(e,r,n){var a=e.children[n];switch(a.childrenCount){case 0:a.children.data=r,a.childrenCount=1,this._updateBranchMass(a,r);break;case 1:a.children.data.x===r.x&&a.children.data.y===r.y?(r.x+=this._rng(),r.y+=this._rng()):(this._splitBranch(a),this._placeInTree(a,r));break;case 4:this._placeInTree(a,r);break}}},{key:"_splitBranch",value:function(e){var r=null;e.childrenCount===1&&(r=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),r!=null&&this._placeInTree(e,r)}},{key:"_insertRegion",value:function(e,r){var n,a,o,s,u=.5*e.size;switch(r){case"NW":n=e.range.minX,a=e.range.minX+u,o=e.range.minY,s=e.range.minY+u;break;case"NE":n=e.range.minX+u,a=e.range.maxX,o=e.range.minY,s=e.range.minY+u;break;case"SW":n=e.range.minX,a=e.range.minX+u,o=e.range.minY+u,s=e.range.maxY;break;case"SE":n=e.range.minX+u,a=e.range.maxX,o=e.range.minY+u,s=e.range.maxY;break}e.children[r]={centerOfMass:{x:0,y:0},mass:0,range:{minX:n,maxX:a,minY:o,maxY:s},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}},{key:"_debug",value:function(e,r){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,r))}},{key:"_drawBranch",value:function(e,r,n){n===void 0&&(n="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,r),this._drawBranch(e.children.NE,r),this._drawBranch(e.children.SE,r),this._drawBranch(e.children.SW,r)),r.strokeStyle=n,r.beginPath(),r.moveTo(e.range.minX,e.range.minY),r.lineTo(e.range.maxX,e.range.minY),r.stroke(),r.beginPath(),r.moveTo(e.range.maxX,e.range.minY),r.lineTo(e.range.maxX,e.range.maxY),r.stroke(),r.beginPath(),r.moveTo(e.range.maxX,e.range.maxY),r.lineTo(e.range.minX,e.range.maxY),r.stroke(),r.beginPath(),r.moveTo(e.range.minX,e.range.maxY),r.lineTo(e.range.minX,e.range.minY),r.stroke()}}]),t}(),wye=function(){function t(i,e,r){N(this,t),this._rng=zl("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,p=4/3,b=0;b<h.length-1;b++){u=c[h[b]];for(var g=b+1;g<h.length;g++)l=c[h[g]],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+p,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}(),_ye=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,p=void 0;f<c?p=-Math.pow(v*f,2)+Math.pow(v*c,2):p=0,f!==0&&(p=p/f);var b=h*p,g=d*p;n[s.id].x-=b,n[s.id].y-=g,n[l.id].x+=b,n[l.id].y+=g}}}}]),t}(),Jh=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}(),Eye=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,p=0;p<f.length;p++){var b=f[p];v[b].springFx=0,v[b].springFy=0}for(var g=0;g<d.length;g++)r=c[d[g]],r.connected===!0&&(e=r.options.length===void 0?this.options.springLength:r.options.length,n=r.from.x-r.to.x,a=r.from.y-r.to.y,l=Math.sqrt(n*n+a*a),l=l===0?.01:l,u=this.options.springConstant*(e-l)/l,o=n*u,s=a*u,r.to.level!=r.from.level?(v[r.toId]!==void 0&&(v[r.toId].springFx-=o,v[r.toId].springFy-=s),v[r.fromId]!==void 0&&(v[r.fromId].springFx+=o,v[r.fromId].springFy+=s)):(v[r.toId]!==void 0&&(v[r.toId].x-=h*o,v[r.toId].y-=h*s),v[r.fromId]!==void 0&&(v[r.fromId].x+=h*o,v[r.fromId].y+=h*s)));u=1;for(var y,$,m=0;m<f.length;m++){var w=f[m];y=Math.min(u,Math.max(-u,v[w].springFx)),$=Math.min(u,Math.max(-u,v[w].springFy)),v[w].x+=y,v[w].y+=$}for(var E=0,T=0,O=0;O<f.length;O++){var _=f[O];E+=v[_].x,T+=v[_].y}for(var S=E/f.length,I=T/f.length,L=0;L<f.length;L++){var B=f[L];v[B].x-=S,v[B].y-=I}}}]),t}(),uu=function(){function t(i,e,r){N(this,t),this.body=i,this.physicsBody=e,this.setOptions(r)}return F(t,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,r,n,a,o=this.body.nodes,s=this.physicsBody.physicsNodeIndices,u=this.physicsBody.forces,l=0;l<s.length;l++){var c=s[l];a=o[c],e=-a.x,r=-a.y,n=Math.sqrt(e*e+r*r),this._calculateForces(n,e,r,u,a)}}},{key:"_calculateForces",value:function(e,r,n,a,o){var s=e===0?0:this.options.centralGravity/e;a[o.id].x=r*s,a[o.id].y=n*s}}]),t}();function Sye(t){var i=Oye();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 Oye(){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 Tye=function(t){he(e,t);var i=Sye(e);function e(r,n,a){var o;return N(this,e),o=i.call(this,r,n,a),o._rng=zl("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}(WP);function xye(t){var i=Pye();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 Pye(){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 kye=function(t){he(e,t);var i=xye(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}(uu),Iye=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}},ze(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,zu(["stabilization"],this.options,e),jt(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"||Ep(r.x))&&(r.x=0),(typeof r.y!="number"||Ep(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 Tye(this.body,this.physicsBody,e),this.edgesSolver=new Jh(this.body,this.physicsBody,e),this.gravitySolver=new kye(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new wye(this.body,this.physicsBody,e),this.edgesSolver=new Jh(this.body,this.physicsBody,e),this.gravitySolver=new uu(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new _ye(this.body,this.physicsBody,e),this.edgesSolver=new Eye(this.body,this.physicsBody,e),this.gravitySolver=new uu(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new WP(this.body,this.physicsBody,e),this.edgesSolver=new Jh(this.body,this.physicsBody,e),this.gravitySolver=new uu(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=Fu();this.physicsTick();var r=Fu()-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)&&yr(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=xe(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,yr(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;yr(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=mp((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,zP.draw(e,{type:"arrow",point:f,angle:v,length:h}),ts(e).call(e)}}}]),t}();let zs;const Cye=new Uint8Array(16);function Aye(){if(!zs&&(zs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!zs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return zs(Cye)}const ot=[];for(let t=0;t<256;++t)ot.push((t+256).toString(16).slice(1));function Rye(t,i=0){return(ot[t[i+0]]+ot[t[i+1]]+ot[t[i+2]]+ot[t[i+3]]+"-"+ot[t[i+4]]+ot[t[i+5]]+"-"+ot[t[i+6]]+ot[t[i+7]]+"-"+ot[t[i+8]]+ot[t[i+9]]+"-"+ot[t[i+10]]+ot[t[i+11]]+ot[t[i+12]]+ot[t[i+13]]+ot[t[i+14]]+ot[t[i+15]]).toLowerCase()}const Dye=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var W0={randomUUID:Dye};function Ba(t,i,e){if(W0.randomUUID&&!i&&!t)return W0.randomUUID();t=t||{};const r=t.random||(t.rng||Aye)();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 Rye(r)}var vt=function(){function t(){N(this,t)}return F(t,null,[{key:"getRange",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,a=-1e9,o=1e9,s=-1e9,u;if(r.length>0)for(var l=0;l<r.length;l++)u=e[r[l]],o>u.shape.boundingBox.left&&(o=u.shape.boundingBox.left),s<u.shape.boundingBox.right&&(s=u.shape.boundingBox.right),n>u.shape.boundingBox.top&&(n=u.shape.boundingBox.top),a<u.shape.boundingBox.bottom&&(a=u.shape.boundingBox.bottom);return o===1e9&&s===-1e9&&n===1e9&&a===-1e9&&(n=0,a=0,o=0,s=0),{minX:o,maxX:s,minY:n,maxY:a}}},{key:"getRangeCore",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,a=-1e9,o=1e9,s=-1e9,u;if(r.length>0)for(var l=0;l<r.length;l++)u=e[r[l]],o>u.x&&(o=u.x),s<u.x&&(s=u.x),n>u.y&&(n=u.y),a<u.y&&(a=u.y);return o===1e9&&s===-1e9&&n===1e9&&a===-1e9&&(n=0,a=0,o=0,s=0),{minX:o,maxX:s,minY:n,maxY:a}}},{key:"findCenter",value:function(e){return{x:.5*(e.maxX+e.minX),y:.5*(e.maxY+e.minY)}}},{key:"cloneOptions",value:function(e,r){var n={};return r===void 0||r==="node"?($e(n,e.options,!0),n.x=e.x,n.y=e.y,n.amountOfConnections=e.edges.length):$e(n,e.options,!0),n}}]),t}();function Mye(t){var i=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 Fye=function(t){he(e,t);var i=Mye(e);function e(r,n,a,o,s,u){var l;return N(this,e),l=i.call(this,r,n,a,o,s,u),l.isCluster=!0,l.containedNodes={},l.containedEdges={},l}return F(e,[{key:"_openChildCluster",value:function(n){var a=this,o=this.body.nodes[n];if(this.containedNodes[n]===void 0)throw new Error("node with id: "+n+" not in current cluster");if(!o.isCluster)throw new Error("node with id: "+n+" is not a cluster");delete this.containedNodes[n],re(o.edges,function(s){delete a.containedEdges[s.id]}),re(o.containedNodes,function(s,u){a.containedNodes[u]=s}),o.containedNodes={},re(o.containedEdges,function(s,u){a.containedEdges[u]=s}),o.containedEdges={},re(o.edges,function(s){re(a.edges,function(u){var l,c,h=oe(l=u.clusteringEdgeReplacingIds).call(l,s.id);h!==-1&&(re(s.clusteringEdgeReplacingIds,function(d){u.clusteringEdgeReplacingIds.push(d),a.body.edges[d].edgeReplacedById=u.id}),xr(c=u.clusteringEdgeReplacingIds).call(c,h,1))})}),o.edges=[]}}]),e}(It),Bye=function(){function t(i){var e=this;N(this,t),this.body=i,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},ze(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():de(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={};re(this.body.nodes,function(s,u){s.options&&r.joinCondition(s.options)===!0&&(a[u]=s,re(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 p={},b={},g=n.body.nodeIndices[d],y=n.body.nodes[g];if(s[g]===void 0){c=0,l=[];for(var $=0;$<y.edges.length;$++)u=y.edges[$],n.clusteredEdges[u.id]===void 0&&(u.toId!==u.fromId&&c++,l.push(u));if(c===e){for(var m=function(B){if(r.joinCondition===void 0||r.joinCondition===null)return!0;var Q=vt.cloneOptions(B);return r.joinCondition(Q)},w=!0,E=0;E<l.length;E++){u=l[E];var T=n._getConnectedId(u,g);if(m(y))b[u.id]=u,p[g]=y,p[T]=n.body.nodes[T],s[g]=!0;else{w=!1;break}}if(xe(p).length>0&&xe(b).length>0&&w===!0){var O=function(){for(var B=0;B<o.length;++B)for(var Q in p)if(o[B].nodes[Q]!==void 0)return o[B]},_=O();if(_!==void 0){for(var S in p)_.nodes[S]===void 0&&(_.nodes[S]=p[S]);for(var I in b)_.edges[I]===void 0&&(_.edges[I]=b[I])}else o.push({nodes:p,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=vt.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=vt.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 p=Hi(n=xe(s)).call(n,function(m){return s[m].id});for(var b in s)if(Object.prototype.hasOwnProperty.call(s,b))for(var g=s[b],y=0;y<g.edges.length;y++){var $=g.edges[y];oe(p).call(p,this._getConnectedId($,g.id))>-1&&(u[$.id]=$)}this._cluster(s,u,r,a)}},{key:"_createClusterEdges",value:function(e,r,n,a){for(var o,s,u,l,c,h,d=xe(e),f=[],v=0;v<d.length;v++){s=d[v],u=e[s];for(var p=0;p<u.edges.length;p++)o=u.edges[p],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=[],g=function(T){for(var O=0;O<b.length;O++){var _=b[O],S=T.fromId===_.fromId&&T.toId===_.toId,I=T.fromId===_.toId&&T.toId===_.fromId;if(S||I)return _}return null},y=0;y<f.length;y++){var $=f[y],m=$.edge,w=g($);w===null?(w=this._createClusteredEdge($.fromId,$.toId,m,a),b.push(w)):w.clusteringEdgeReplacingIds.push(m.id),this.body.edges[m.id].edgeReplacedById=w.id,this._backupEdgeOptions(m),m.setOptions({physics:!1})}}},{key:"_checkOptions",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}},{key:"_cluster",value:function(e,r,n){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,o=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&this.clusteredNodes[s]!==void 0&&o.push(s);for(var u=0;u<o.length;++u)delete e[o[u]];if(xe(e).length!=0&&!(xe(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=vt.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 p=vt.cloneOptions(r[v],"edge");f.push(p)}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 g=void 0;l.x===void 0&&(g=this._getClusterPosition(e),l.x=g.x),l.y===void 0&&(g===void 0&&(g=this._getClusterPosition(e)),l.y=g.y),l.id=b;var y=this.body.functions.createNode(l,Fye);y.containedNodes=e,y.containedEdges=r,y.clusterEdgeProperties=n.clusterEdgeProperties,this.body.nodes[l.id]=y,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=xe(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=oe(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 p=this.body.nodes[v];d[v]={x:p.x,y:p.y}}var b=r.releaseFunction(f,d);for(var g in c)if(Object.prototype.hasOwnProperty.call(c,g)){var y=this.body.nodes[g];b[g]!==void 0&&(y.x=b[g].x===void 0?a.x:b[g].x,y.y=b[g].y===void 0?a.y:b[g].y)}}else re(c,function(we){we.options.fixed.x===!1&&(we.x=a.x),we.options.fixed.y===!1&&(we.y=a.y)});for(var $ in c)if(Object.prototype.hasOwnProperty.call(c,$)){var m=this.body.nodes[$];m.vx=a.vx,m.vy=a.vy,m.setOptions({physics:!0}),delete this.clusteredNodes[$]}for(var w=[],E=0;E<a.edges.length;E++)w.push(a.edges[E]);for(var T=0;T<w.length;T++){for(var O=w[T],_=this._getConnectedId(O,e),S=this.clusteredNodes[_],I=0;I<O.clusteringEdgeReplacingIds.length;I++){var L=O.clusteringEdgeReplacingIds[I],B=this.body.edges[L];if(B!==void 0)if(S!==void 0){var Q=this.body.nodes[S.clusterId];Q.containedEdges[B.id]=B,delete h[B.id];var ie=B.fromId,ne=B.toId;B.toId==_?ne=S.clusterId:ie=S.clusterId,this._createClusteredEdge(ie,ne,B,Q.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(B)}O.remove()}for(var ce in h)Object.prototype.hasOwnProperty.call(h,ce)&&this._restoreEdge(h[ce]);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),Dn(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 Dn(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];oe(r).call(r,c)!==-1||oe(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=vt.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 Ri){var o=r,s={};s[o.id]=o,r=s}if(e instanceof It){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 re(e,function(a){r(a)&&n.push(a)}),n}},{key:"_updateState",value:function(){var e=this,r,n=[],a={},o=function(v){re(e.body.nodes,function(p){p.isCluster===!0&&v(p)})};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]];re(this.clusteredEdges,function(f){var v=e.body.edges[f];(v===void 0||!v.endPointsValid())&&(a[f]=f)}),o(function(f){re(f.containedEdges,function(v,p){!v.endPointsValid()&&!a[p]&&(a[p]=p)})}),re(this.body.edges,function(f,v){var p=!0,b=f.clusteringEdgeReplacingIds;if(b!==void 0){var g=0;re(b,function(y){var $=e.body.edges[y];$!==void 0&&$.endPointsValid()&&(g+=1)}),p=g>0}(!f.endPointsValid()||!p)&&(a[v]=v)}),o(function(f){re(a,function(v){delete f.containedEdges[v],re(f.edges,function(p,b){if(p.id===v){f.edges[b]=null;return}p.clusteringEdgeReplacingIds=e._filter(p.clusteringEdgeReplacingIds,function(g){return!a[g]})}),f.edges=e._filter(f.edges,function(p){return p!==null})})}),re(a,function(f){delete e.clusteredEdges[f]}),re(a,function(f){delete e.body.edges[f]});var l=xe(this.body.edges);re(l,function(f){var v=e.body.edges[f],p=e._isClusteredNode(v.fromId)||e._isClusteredNode(v.toId);if(p!==e._isClusteredEdge(v.id))if(p){var b=e._getClusterNodeForNode(v.fromId);b!==void 0&&e._clusterEdges(e.body.nodes[v.fromId],v,b);var g=e._getClusterNodeForNode(v.toId);g!==void 0&&e._clusterEdges(e.body.nodes[v.toId],v,g)}else delete e._clusterEdges[f],e._restoreEdge(v)});for(var c=!1,h=!0,d=function(){var v=[];o(function(b){var g=xe(b.containedNodes).length,y=b.options.allowSingleNodeCluster===!0;(y&&g<1||!y&&g<2)&&v.push(b.id)});for(var p=0;p<v.length;++p)e.openCluster(v[p],{},!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 Lye(){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 jye=function(){function t(i,e){N(this,t),Lye(),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},ze(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=yr(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"];ya(r,this.options,e)}}},{key:"_requestNextFrame",value:function(e,r){if(!(typeof window>"u")){var n,a=window;return this.requiresTimeout===!0?n=yr(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 p=o.draw(e);p.drawExternalLabel!=null&&f.push(p.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 g,y=s.length,$=u.length;for(g=0;g<y;g++){o=n[s[g]];var m=o.draw(e);m.drawExternalLabel!=null&&f.push(m.drawExternalLabel)}for(g=0;g<$;g++){o=n[u[g]];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,oe(e).call(e,"msie 9.0")!=-1?this.requiresTimeout=!0:oe(e).call(e,"safari")!=-1&&oe(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}(),Gp={},zye={get exports(){return Gp},set exports(t){Gp=t}},Hye=ae,Wye=Hye.setInterval;(function(t){t.exports=Wye})(zye);var Vye=V(Gp);function Uu(t,i){i.inputHandler=function(e){e.isFirst&&i(e)},t.on("hammer.input",i.inputHandler)}function VP(t,i){return i.inputHandler=function(e){e.isFinal&&i(e)},t.on("hammer.input",i.inputHandler)}var Uye=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%"},ze(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"];ya(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=Vye(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);ehe(window,"resize",l),this._cleanupCallbacks.push(function(){the(window,"resize",l)})}}},{key:"_cleanUp",value:function(){var e,r,n;ge(e=Dn(r=xr(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(oe(e).call(e,"%")!==-1||oe(e).call(e,"px")!==-1)return e;if(oe(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 Ai(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Ai.DIRECTION_ALL}),Uu(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 Ai(this.frame),VP(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 Gye(t,i){var e=ze({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=Gye(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=vt.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=vt.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=vt.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,p=n/f,b=a/v;s=p<=b?p:b}s>e.maxZoomLevel?s=e.maxZoomLevel:s<e.minZoomLevel&&(s=e.minZoomLevel);var g=vt.findCenter(o),y={position:g,scale:s,animation:e.animation};this.moveTo(y)}},{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,!kn(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,!kn(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,!kn(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,!kn(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=ihe[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 V0(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 p=0;p<v.length;p++)v[p].fn==h&&v[p].shift==a[c].shift||f.push(n[d][a[c].code][p]);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 qye=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 Ai(this.navigationDOM[r[a]]);if(n[a]==="_fit"){var s;Uu(o,A(s=this._fit).call(s,this))}else{var u;Uu(o,A(u=this.bindToRedraw).call(u,this,n[a]))}this.navigationHammers.push(o)}var l=new Ai(this.canvas.frame);VP(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=V0({container:window,preventDefault:!0}):this.keycharm=V0({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,p,b,g,y,$,m,w,E,T,O,_,S;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(p=this.keycharm).call(p,"up",function(){e.unbindFromRedraw("_moveUp")},"keyup"),A(b=this.keycharm).call(b,"down",function(){e.unbindFromRedraw("_moveDown")},"keyup"),A(g=this.keycharm).call(g,"left",function(){e.unbindFromRedraw("_moveLeft")},"keyup"),A(y=this.keycharm).call(y,"right",function(){e.unbindFromRedraw("_moveRight")},"keyup"),A($=this.keycharm).call($,"=",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),A(m=this.keycharm).call(m,"num+",function(){e.unbindFromRedraw("_zoomIn")},"keyup"),A(w=this.keycharm).call(w,"num-",function(){e.unbindFromRedraw("_zoomOut")},"keyup"),A(E=this.keycharm).call(E,"-",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(S=this.keycharm).call(S,"pagedown",function(){e.unbindFromRedraw("_zoomOut")},"keyup")}}}]),t}();function Yye(t,i){var e=typeof pn<"u"&&jr(t)||t["@@iterator"];if(!e){if(ve(t)||(e=Xye(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 Xye(t,i){var e;if(t){if(typeof t=="string")return U0(t,i);var r=ut(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ri(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return U0(t,i)}}function U0(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 Qye=function(){function t(i,e,r){var n,a,o,s,u,l,c,h,d,f,v,p,b;N(this,t),this.body=i,this.canvas=e,this.selectionHandler=r,this.navigationHandler=new qye(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(p=this.onContext).call(p,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},ze(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"];zu(r,this.options,e),jt(this.options,e,"keyboard"),e.tooltip&&(ze(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=yp(e.tooltip.color)))}this.navigationHandler.setOptions(this.options)}},{key:"getPointer",value:function(e){return{x:e.x-Zce(this.canvas.frame.canvas),y:e.y-Jce(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];oe(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=ze({},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=Yye(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=Ot(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=yr(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,p=this.body.edges,b,g=[],y=0;y<v.length;y++)b=p[v[y]],b.isOverlappingWith(a)===!0&&b.connected===!0&&b.getTitle()!==void 0&&g.push(v[y]);g.length>0&&(this.popupObj=p[g[g.length-1]],u="edge")}this.popupObj!==void 0?this.popupObj.id!==o&&(this.popup===void 0&&(this.popup=new dhe(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}(),Kp={},Zye={get exports(){return Kp},set exports(t){Kp=t}},Jye=Oy,eme=kP;Jye("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},eme);var tme=ae,rme=tme.Set,nme=rme,ime=nme;(function(t){t.exports=ime})(Zye);var Tn=V(Kp),qp={},ame={get exports(){return qp},set exports(t){qp=t}},ome=le,G0=Ty,Hs=Ki.getWeakData,sme=Sy,ume=Bt,lme=Fo,ed=tt,cme=Ey,UP=fn,K0=rt,GP=ti,hme=GP.set,dme=GP.getterFor,fme=UP.find,vme=UP.findIndex,pme=ome([].splice),gme=0,Ws=function(t){return t.frozen||(t.frozen=new KP)},KP=function(){this.entries=[]},td=function(t,i){return fme(t.entries,function(e){return e[0]===i})};KP.prototype={get:function(t){var i=td(this,t);if(i)return i[1]},has:function(t){return!!td(this,t)},set:function(t,i){var e=td(this,t);e?e[1]=i:this.entries.push([t,i])},delete:function(t){var i=vme(this.entries,function(e){return e[0]===t});return~i&&pme(this.entries,i,1),!!~i}};var yme={getConstructor:function(t,i,e,r){var n=t(function(u,l){sme(u,a),hme(u,{type:i,id:gme++,frozen:void 0}),lme(l)||cme(l,u[r],{that:u,AS_ENTRIES:e})}),a=n.prototype,o=dme(i),s=function(u,l,c){var h=o(u),d=Hs(ume(l),!0);return d===!0?Ws(h).set(l,c):d[h.id]=c,u};return G0(a,{delete:function(u){var l=o(this);if(!ed(u))return!1;var c=Hs(u);return c===!0?Ws(l).delete(u):c&&K0(c,l.id)&&delete c[l.id]},has:function(l){var c=o(this);if(!ed(l))return!1;var h=Hs(l);return h===!0?Ws(c).has(l):h&&K0(h,c.id)}}),G0(a,e?{get:function(l){var c=o(this);if(ed(l)){var h=Hs(l);return h===!0?Ws(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}},mme=OP,q0=Ue,lu=le,Y0=Ty,$me=Ki,bme=Oy,qP=yme,Vs=tt,Us=ti.enforce,wme=ue,_me=vT,ss=Object,Eme=Array.isArray,Gs=ss.isExtensible,YP=ss.isFrozen,Sme=ss.isSealed,XP=ss.freeze,Ome=ss.seal,X0={},Q0={},Tme=!q0.ActiveXObject&&"ActiveXObject"in q0,Sa,QP=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},ZP=bme("WeakMap",QP,qP),yi=ZP.prototype,cu=lu(yi.set),xme=function(){return mme&&wme(function(){var t=XP([]);return cu(new ZP,t,1),!YP(t)})};if(_me)if(Tme){Sa=qP.getConstructor(QP,"WeakMap",!0),$me.enable();var Z0=lu(yi.delete),Ks=lu(yi.has),J0=lu(yi.get);Y0(yi,{delete:function(t){if(Vs(t)&&!Gs(t)){var i=Us(this);return i.frozen||(i.frozen=new Sa),Z0(this,t)||i.frozen.delete(t)}return Z0(this,t)},has:function(i){if(Vs(i)&&!Gs(i)){var e=Us(this);return e.frozen||(e.frozen=new Sa),Ks(this,i)||e.frozen.has(i)}return Ks(this,i)},get:function(i){if(Vs(i)&&!Gs(i)){var e=Us(this);return e.frozen||(e.frozen=new Sa),Ks(this,i)?J0(this,i):e.frozen.get(i)}return J0(this,i)},set:function(i,e){if(Vs(i)&&!Gs(i)){var r=Us(this);r.frozen||(r.frozen=new Sa),Ks(this,i)?cu(this,i,e):r.frozen.set(i,e)}else cu(this,i,e);return this}})}else xme()&&Y0(yi,{set:function(i,e){var r;return Eme(i)&&(YP(i)?r=X0:Sme(i)&&(r=Q0)),cu(this,i,e),r==X0&&XP(i),r==Q0&&Ome(i),this}});var Pme=ae,kme=Pme.WeakMap,Ime=kme,Cme=Ime;(function(t){t.exports=Cme})(ame);var La=V(qp);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 Yp(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 Xp(t,i){var e=typeof pn<"u"&&jr(t)||t["@@iterator"];if(!e){if(ve(t)||(e=Ame(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 Ame(t,i){var e;if(t){if(typeof t=="string")return e_(t,i);var r=ut(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ri(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e_(t,i)}}function e_(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,Lt,Vr,Ur,hu;function t_(t,i){var e=new Tn,r=Xp(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 r_=function(){function t(){N(this,t),wn.set(this,new Tn),Lt.set(this,new Tn)}return F(t,[{key:"size",get:function(){return me(this,Lt,"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,Lt,"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,Lt,"f").delete(s)}}},{key:"clear",value:function(){me(this,Lt,"f").clear()}},{key:"getSelection",value:function(){return hr(me(this,Lt,"f"))}},{key:"getChanges",value:function(){return{added:hr(t_(me(this,wn,"f"),me(this,Lt,"f"))),deleted:hr(t_(me(this,Lt,"f"),me(this,wn,"f"))),previous:hr(new Tn(me(this,wn,"f"))),current:hr(new Tn(me(this,Lt,"f")))}}},{key:"commit",value:function(){var e=this.getChanges();Yp(this,wn,me(this,Lt,"f"),"f"),Yp(this,Lt,new Tn(me(this,wn,"f")),"f");var r=Xp(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=Xp(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,Lt=new La;var Rme=function(){function t(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};N(this,t),Vr.set(this,new r_),Ur.set(this,new r_),hu.set(this,void 0),Yp(this,hu,i,"f")}return F(t,[{key:"sizeNodes",get:function(){return me(this,Vr,"f").size}},{key:"sizeEdges",get:function(){return me(this,Ur,"f").size}},{key:"getNodes",value:function(){return me(this,Vr,"f").getSelection()}},{key:"getEdges",value:function(){return me(this,Ur,"f").getSelection()}},{key:"addNodes",value:function(){var e;(e=me(this,Vr,"f")).add.apply(e,arguments)}},{key:"addEdges",value:function(){var e;(e=me(this,Ur,"f")).add.apply(e,arguments)}},{key:"deleteNodes",value:function(e){me(this,Vr,"f").delete(e)}},{key:"deleteEdges",value:function(e){me(this,Ur,"f").delete(e)}},{key:"clear",value:function(){me(this,Vr,"f").clear(),me(this,Ur,"f").clear()}},{key:"commit",value:function(){for(var e,r,n={nodes:me(this,Vr,"f").commit(),edges:me(this,Ur,"f").commit()},a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return(e=me(this,hu,"f")).call.apply(e,uy(r=[this,n]).call(r,o)),n}}]),t}();Vr=new La,Ur=new La,hu=new La;function n_(t,i){var e=typeof pn<"u"&&jr(t)||t["@@iterator"];if(!e){if(ve(t)||(e=Dme(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 Dme(t,i){var e;if(t){if(typeof t=="string")return i_(t,i);var r=ut(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ri(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i_(t,i)}}function i_(t,i){(i==null||i>t.length)&&(i=t.length);for(var e=0,r=new Array(i);e<i;e++)r[e]=t[e];return r}var Mme=function(){function t(i,e){var r=this;N(this,t),this.body=i,this.canvas=e,this._selectionAccumulator=new Rme,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},ze(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"];ya(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 It){if(r===!0){var n;(n=this._selectionAccumulator).addEdges.apply(n,hr(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,p=c.edgeType.getDistanceToEdge(h,d,f,v,n.x,n.y);p<a&&(o=l,a=p)}}if(o!==null)return r===!0?this.body.edges[o]:o}},{key:"_addToHover",value:function(e){e instanceof It?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}},{key:"_removeFromSelection",value:function(e){if(e instanceof It){var r;this._selectionAccumulator.deleteNodes(e),(r=this._selectionAccumulator).deleteEdges.apply(r,hr(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 It?(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 It?(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 It&&n.id!=o||n instanceof Ri)&&(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 Ri&&n.id!=s||n instanceof It&&!n.hover)&&(this.emitBlurEvent(e,r,this.hoverObj.edges[s]),delete this.hoverObj.edges[s],a=!0));if(n!==void 0){var u=xe(this.hoverObj.edges).length,l=xe(this.hoverObj.nodes).length,c=n instanceof Ri&&u===0&&l===0,h=n instanceof It&&u===0&&l===0;(a||c||h)&&(a=this.emitHoverEvent(e,r,n)),n instanceof It&&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 Hi(e=this._selectionAccumulator.getNodes()).call(e,function(r){return r.id})}},{key:"getSelectedEdgeIds",value:function(){var e;return Hi(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=n_(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=n_(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}(),Qp={},Nme={get exports(){return Qp},set exports(t){Qp=t}},a_=FT,Fme=Math.floor,Zp=function(t,i){var e=t.length,r=Fme(e/2);return e<8?Bme(t,i):Lme(t,Zp(a_(t,0,r),i),Zp(a_(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},Lme=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},jme=Zp,zme=Lo,o_=zme.match(/firefox\/(\d+)/i),Hme=!!o_&&+o_[1],Wme=Lo,Vme=/MSIE|Trident/.test(Wme),Ume=Lo,s_=Ume.match(/AppleWebKit\/(\d+)\./),Gme=!!s_&&+s_[1],Kme=q,JP=le,qme=Jn,Yme=Ft,u_=ar,Xme=Ix,l_=br,Ay=ue,Qme=jme,Zme=pa,c_=Hme,Jme=Vme,h_=jo,d_=Gme,Qr=[],f_=JP(Qr.sort),e$e=JP(Qr.push),t$e=Ay(function(){Qr.sort(void 0)}),r$e=Ay(function(){Qr.sort(null)}),n$e=Zme("sort"),ek=!Ay(function(){if(h_)return h_<70;if(!(c_&&c_>3)){if(Jme)return!0;if(d_)return d_<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"}}),i$e=t$e||!r$e||!n$e||!ek,a$e=function(t){return function(i,e){return e===void 0?-1:i===void 0?1:t!==void 0?+t(i,e)||0:l_(i)>l_(e)?1:-1}};Kme({target:"Array",proto:!0,forced:i$e},{sort:function(i){i!==void 0&&qme(i);var e=Yme(this);if(ek)return i===void 0?f_(e):f_(e,i);var r=[],n=u_(e),a,o;for(o=0;o<n;o++)o in e&&e$e(r,e[o]);for(Qme(r,a$e(i)),a=u_(r),o=0;o<a;)e[o]=r[o++];for(;o<n;)Xme(e,o++);return e}});var o$e=nt,s$e=o$e("Array").sort,u$e=Be,l$e=s$e,rd=Array.prototype,c$e=function(t){var i=t.sort;return t===rd||u$e(rd,t)&&i===rd.sort?l$e:i},h$e=c$e,d$e=h$e;(function(t){t.exports=d$e})(Nme);var nd=V(Qp),Jp={},f$e={get exports(){return Jp},set exports(t){Jp=t}},v$e=Jn,p$e=Ft,g$e=ml,y$e=ar,m$e=TypeError,v_=function(t){return function(i,e,r,n){v$e(e);var a=p$e(i),o=g$e(a),s=y$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 m$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}},$$e={left:v_(!1),right:v_(!0)},b$e=Lr,w$e=typeof process<"u"&&b$e(process)=="process",_$e=q,E$e=$$e.left,S$e=pa,p_=jo,O$e=w$e,T$e=!O$e&&p_>79&&p_<83,x$e=T$e||!S$e("reduce");_$e({target:"Array",proto:!0,forced:x$e},{reduce:function(i){var e=arguments.length;return E$e(this,i,e,e>1?arguments[1]:void 0)}});var P$e=nt,k$e=P$e("Array").reduce,I$e=Be,C$e=k$e,id=Array.prototype,A$e=function(t){var i=t.reduce;return t===id||I$e(id,t)&&i===id.reduce?C$e:i},R$e=A$e,D$e=R$e;(function(t){t.exports=D$e})(f$e);var tk=V(Jp),ao={},M$e={get exports(){return ao},set exports(t){ao=t}},rk={};(function(t){(function(i,e){e(t)})(ev,function(i){i.__esModule=!0,i.sort=b;function e(g,y){if(!(g instanceof y))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(g){return g<1e5?g<100?g<10?0:1:g<1e4?g<1e3?2:3:4:g<1e7?g<1e6?5:6:g<1e9?g<1e8?7:8:9}function u(g,y){if(g===y)return 0;if(~~g===g&&~~y===y){if(g===0||y===0)return g<y?-1:1;if(g<0||y<0){if(y>=0)return-1;if(g>=0)return 1;g=-g,y=-y}var $=s(g),m=s(y),w=0;return $<m?(g*=o[m-$-1],y/=10,w=-1):$>m&&(y*=o[$-m-1],g/=10,w=1),g===y?w:g<y?-1:1}var E=String(g),T=String(y);return E===T?0:E<T?-1:1}function l(g){for(var y=0;g>=r;)y|=g&1,g>>=1;return g+y}function c(g,y,$,m){var w=y+1;if(w===$)return 1;if(m(g[w++],g[y])<0){for(;w<$&&m(g[w],g[w-1])<0;)w++;h(g,y,w)}else for(;w<$&&m(g[w],g[w-1])>=0;)w++;return w-y}function h(g,y,$){for($--;y<$;){var m=g[y];g[y++]=g[$],g[$--]=m}}function d(g,y,$,m,w){for(m===y&&m++;m<$;m++){for(var E=g[m],T=y,O=m;T<O;){var _=T+O>>>1;w(E,g[_])<0?O=_:T=_+1}var S=m-T;switch(S){case 3:g[T+3]=g[T+2];case 2:g[T+2]=g[T+1];case 1:g[T+1]=g[T];break;default:for(;S>0;)g[T+S]=g[T+S-1],S--}g[T]=E}}function f(g,y,$,m,w,E){var T=0,O=0,_=1;if(E(g,y[$+w])>0){for(O=m-w;_<O&&E(g,y[$+w+_])>0;)T=_,_=(_<<1)+1,_<=0&&(_=O);_>O&&(_=O),T+=w,_+=w}else{for(O=w+1;_<O&&E(g,y[$+w-_])<=0;)T=_,_=(_<<1)+1,_<=0&&(_=O);_>O&&(_=O);var S=T;T=w-_,_=w-S}for(T++;T<_;){var I=T+(_-T>>>1);E(g,y[$+I])>0?T=I+1:_=I}return _}function v(g,y,$,m,w,E){var T=0,O=0,_=1;if(E(g,y[$+w])<0){for(O=w+1;_<O&&E(g,y[$+w-_])<0;)T=_,_=(_<<1)+1,_<=0&&(_=O);_>O&&(_=O);var S=T;T=w-_,_=w-S}else{for(O=m-w;_<O&&E(g,y[$+w+_])>=0;)T=_,_=(_<<1)+1,_<=0&&(_=O);_>O&&(_=O),T+=w,_+=w}for(T++;T<_;){var I=T+(_-T>>>1);E(g,y[$+I])<0?_=I:T=I+1}return _}var p=function(){function g(y,$){e(this,g),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=y,this.compare=$,this.length=y.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 g.prototype.pushRun=function($,m){this.runStart[this.stackSize]=$,this.runLength[this.stackSize]=m,this.stackSize+=1},g.prototype.mergeRuns=function(){for(;this.stackSize>1;){var $=this.stackSize-2;if($>=1&&this.runLength[$-1]<=this.runLength[$]+this.runLength[$+1]||$>=2&&this.runLength[$-2]<=this.runLength[$]+this.runLength[$-1])this.runLength[$-1]<this.runLength[$+1]&&$--;else if(this.runLength[$]>this.runLength[$+1])break;this.mergeAt($)}},g.prototype.forceMergeRuns=function(){for(;this.stackSize>1;){var $=this.stackSize-2;$>0&&this.runLength[$-1]<this.runLength[$+1]&&$--,this.mergeAt($)}},g.prototype.mergeAt=function($){var m=this.compare,w=this.array,E=this.runStart[$],T=this.runLength[$],O=this.runStart[$+1],_=this.runLength[$+1];this.runLength[$]=T+_,$===this.stackSize-3&&(this.runStart[$+1]=this.runStart[$+2],this.runLength[$+1]=this.runLength[$+2]),this.stackSize--;var S=v(w[O],w,E,T,0,m);E+=S,T-=S,T!==0&&(_=f(w[E+T-1],w,O,_,_-1,m),_!==0&&(T<=_?this.mergeLow(E,T,O,_):this.mergeHigh(E,T,O,_)))},g.prototype.mergeLow=function($,m,w,E){var T=this.compare,O=this.array,_=this.tmp,S=0;for(S=0;S<m;S++)_[S]=O[$+S];var I=0,L=w,B=$;if(O[B++]=O[L++],--E===0){for(S=0;S<m;S++)O[B+S]=_[I+S];return}if(m===1){for(S=0;S<E;S++)O[B+S]=O[L+S];O[B+E]=_[I];return}for(var Q=this.minGallop;;){var ie=0,ne=0,ce=!1;do if(T(O[L],_[I])<0){if(O[B++]=O[L++],ne++,ie=0,--E===0){ce=!0;break}}else if(O[B++]=_[I++],ie++,ne=0,--m===1){ce=!0;break}while((ie|ne)<Q);if(ce)break;do{if(ie=v(O[L],_,I,m,0,T),ie!==0){for(S=0;S<ie;S++)O[B+S]=_[I+S];if(B+=ie,I+=ie,m-=ie,m<=1){ce=!0;break}}if(O[B++]=O[L++],--E===0){ce=!0;break}if(ne=f(_[I],O,L,E,0,T),ne!==0){for(S=0;S<ne;S++)O[B+S]=O[L+S];if(B+=ne,L+=ne,E-=ne,E===0){ce=!0;break}}if(O[B++]=_[I++],--m===1){ce=!0;break}Q--}while(ie>=n||ne>=n);if(ce)break;Q<0&&(Q=0),Q+=2}if(this.minGallop=Q,Q<1&&(this.minGallop=1),m===1){for(S=0;S<E;S++)O[B+S]=O[L+S];O[B+E]=_[I]}else{if(m===0)throw new Error("mergeLow preconditions were not respected");for(S=0;S<m;S++)O[B+S]=_[I+S]}},g.prototype.mergeHigh=function($,m,w,E){var T=this.compare,O=this.array,_=this.tmp,S=0;for(S=0;S<E;S++)_[S]=O[w+S];var I=$+m-1,L=E-1,B=w+E-1,Q=0,ie=0;if(O[B--]=O[I--],--m===0){for(Q=B-(E-1),S=0;S<E;S++)O[Q+S]=_[S];return}if(E===1){for(B-=m,I-=m,ie=B+1,Q=I+1,S=m-1;S>=0;S--)O[ie+S]=O[Q+S];O[B]=_[L];return}for(var ne=this.minGallop;;){var ce=0,we=0,Oe=!1;do if(T(_[L],O[I])<0){if(O[B--]=O[I--],ce++,we=0,--m===0){Oe=!0;break}}else if(O[B--]=_[L--],we++,ce=0,--E===1){Oe=!0;break}while((ce|we)<ne);if(Oe)break;do{if(ce=m-v(_[L],O,$,m,m-1,T),ce!==0){for(B-=ce,I-=ce,m-=ce,ie=B+1,Q=I+1,S=ce-1;S>=0;S--)O[ie+S]=O[Q+S];if(m===0){Oe=!0;break}}if(O[B--]=_[L--],--E===1){Oe=!0;break}if(we=E-f(O[I],_,0,E,E-1,T),we!==0){for(B-=we,L-=we,E-=we,ie=B+1,Q=L+1,S=0;S<we;S++)O[ie+S]=_[Q+S];if(E<=1){Oe=!0;break}}if(O[B--]=O[I--],--m===0){Oe=!0;break}ne--}while(ce>=n||we>=n);if(Oe)break;ne<0&&(ne=0),ne+=2}if(this.minGallop=ne,ne<1&&(this.minGallop=1),E===1){for(B-=m,I-=m,ie=B+1,Q=I+1,S=m-1;S>=0;S--)O[ie+S]=O[Q+S];O[B]=_[L]}else{if(E===0)throw new Error("mergeHigh preconditions were not respected");for(Q=B-(E-1),S=0;S<E;S++)O[Q+S]=_[S]}},g}();function b(g,y,$,m){if(!Array.isArray(g))throw new TypeError("Can only sort arrays");y?typeof y!="function"&&(m=$,$=y,y=u):y=u,$||($=0),m||(m=g.length);var w=m-$;if(!(w<2)){var E=0;if(w<r){E=c(g,$,m,y),d(g,$,m,$+E,y);return}var T=new p(g,y),O=l(w);do{if(E=c(g,$,m,y),E<O){var _=w;_>O&&(_=O),d(g,$,$+_,$+E,y),E=_}T.pushRun($,E),T.mergeRuns(),w-=E,$+=E}while(w!==0);T.forceMergeRuns()}}})})(rk);(function(t){t.exports=rk})(M$e);var g_=V(ao);function nk(t){var i=N$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 N$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 ik=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}(),F$e=function(t){he(e,t);var i=nk(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}(ik),B$e=function(t){he(e,t);var i=nk(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}(ik),eg={},L$e={get exports(){return eg},set exports(t){eg=t}},j$e=q,z$e=fn.every,H$e=pa,W$e=H$e("every");j$e({target:"Array",proto:!0,forced:!W$e},{every:function(i){return z$e(this,i,arguments.length>1?arguments[1]:void 0)}});var V$e=nt,U$e=V$e("Array").every,G$e=Be,K$e=U$e,ad=Array.prototype,q$e=function(t){var i=t.every;return t===ad||G$e(ad,t)&&i===ad.every?K$e:i},Y$e=q$e,X$e=Y$e;(function(t){t.exports=X$e})(L$e);var ak=V(eg);function Q$e(t,i){var e=typeof pn<"u"&&jr(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.
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 Z$e(t,i){var e;if(t){if(typeof t=="string")return y_(t,i);var r=ut(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ri(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y_(t,i)}}function y_(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 J$e(t,i){var e=new Tn;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 ebe(t){return ok(function(i){var e,r;return ak(e=Ot(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 tbe(t){return ok(function(i){var e,r;return ak(e=Ot(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 ok(t,i,e,r){var n,a=Mn(null),o=tk(n=hr(DP(r).call(r))).call(n,function(f,v){return f+1+v.edges.length},0),s=e+"Id",u=e==="to"?1:-1,l=Q$e(r),c;try{var h=function(){var v=ke(c.value,2),p=v[0],b=v[1];if(!r.has(p)||!t(b))return"continue";a[p]=0;for(var g=[b],y=0,$,m=function(){var T,O;if(!r.has(p))return"continue";var _=a[$.id]+u;if(ge(T=Ot(O=$.edges).call(O,function(S){return S.connected&&S.to!==S.from&&S[e]!==$&&r.has(S.toId)&&r.has(S.fromId)})).call(T,function(S){var I=S[s],L=a[I];(L==null||i(_,L))&&(a[I]=_,g.push(S[e]))}),y>o)return{v:{v:J$e(r,a)}};++y};$=g.pop();){var w=m();if(w!=="continue"&&de(w)==="object")return w.v}};for(l.s();!(c=l.n()).done;){var d=h();if(d!=="continue"&&de(d)==="object")return d.v}}catch(f){l.e(f)}finally{l.f()}return a}var rbe=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 xe(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}(),nbe=function(){function t(i){N(this,t),this.body=i,this._resetRNG(Math.random()+":"+Fu()),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"}},ze(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(ya(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),jt(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=zl(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"):de(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 p=this.body.nodes[e[v]];p.predefinedPosition===!1&&(p.x+=(.5-this._rng())*f,p.y+=(.5-this._rng())*f)}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}},{key:"_shiftToCenter",value:function(){for(var e=vt.getRangeCore(this.body.nodes,this.body.nodeIndices),r=vt.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 rbe;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 $=s(),m=0,w=0;w<$.length-1;w++){var E=$[w].max-$[w+1].min;m+=E+e.options.hierarchical.treeSpacing,o(w+1,m)}},o=function($,m){var w=e.hierarchical.trees;for(var E in w)Object.prototype.hasOwnProperty.call(w,E)&&w[E]===$&&e.direction.shift(E,m)},s=function(){for(var $=[],m=0;m<e.hierarchical.numTrees();m++)$.push(e.direction.getTreeSize(m));return $},u=function y($,m){if(!m[$.id]&&(m[$.id]=!0,e.hierarchical.childrenReference[$.id])){var w=e.hierarchical.childrenReference[$.id];if(w.length>0)for(var E=0;E<w.length;E++)y(e.body.nodes[w[E]],m)}},l=function($){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,w=1e9,E=1e9,T=1e9,O=-1e9;for(var _ in $)if(Object.prototype.hasOwnProperty.call($,_)){var S=e.body.nodes[_],I=e.hierarchical.levels[S.id],L=e.direction.getPosition(S),B=e._getSpaceAroundNode(S,$),Q=ke(B,2),ie=Q[0],ne=Q[1];w=Math.min(ie,w),E=Math.min(ne,E),I<=m&&(T=Math.min(L,T),O=Math.max(L,O))}return[T,O,w,E]},c=function($,m){var w=e.hierarchical.getMaxLevel($.id),E=e.hierarchical.getMaxLevel(m.id);return Math.min(w,E)},h=function($,m,w){for(var E=e.hierarchical,T=0;T<m.length;T++){var O=m[T],_=E.distributionOrdering[O];if(_.length>1)for(var S=0;S<_.length-1;S++){var I=_[S],L=_[S+1];E.hasSameParent(I,L)&&E.inSameSubNetwork(I,L)&&$(I,L,w)}}},d=function($,m){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,E=e.direction.getPosition($),T=e.direction.getPosition(m),O=Math.abs(T-E),_=e.options.hierarchical.nodeSpacing;if(O>_){var S={},I={};u($,S),u(m,I);var L=c($,m),B=l(S,L),Q=l(I,L),ie=B[1],ne=Q[0],ce=Q[2],we=Math.abs(ie-ne);if(we>_){var Oe=ie-ne+_;Oe<-ce+_&&(Oe=-ce+_),Oe<0&&(e._shiftBlock(m.id,Oe),r=!0,w===!0&&e._centerParent(m))}}},f=function($,m){for(var w=m.id,E=m.edges,T=e.hierarchical.levels[m.id],O=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,_={},S=[],I=0;I<E.length;I++){var L=E[I];if(L.toId!=L.fromId){var B=L.toId==w?L.from:L.to;_[E[I].id]=B,e.hierarchical.levels[B.id]<T&&S.push(L)}}var Q=function(it,_e){for(var De=0,R=0;R<_e.length;R++)if(_[_e[R].id]!==void 0){var k=e.direction.getPosition(_[_e[R].id])-it;De+=k/Math.sqrt(k*k+O)}return De},ie=function(it,_e){for(var De=0,R=0;R<_e.length;R++)if(_[_e[R].id]!==void 0){var k=e.direction.getPosition(_[_e[R].id])-it;De-=O*Math.pow(k*k+O,-1.5)}return De},ne=function(it,_e){for(var De=e.direction.getPosition(m),R={},k=0;k<it;k++){var D=Q(De,_e),j=ie(De,_e),G=40,Y=Math.max(-G,Math.min(G,Math.round(D/j)));if(De=De-Y,R[De]!==void 0)break;R[De]=k}return De},ce=function(it){var _e=e.direction.getPosition(m);if(n[m.id]===void 0){var De={};u(m,De),n[m.id]=De}var R=l(n[m.id]),k=R[2],D=R[3],j=it-_e,G=0;j>0?G=Math.min(j,D-e.options.hierarchical.nodeSpacing):j<0&&(G=-Math.min(-j,k-e.options.hierarchical.nodeSpacing)),G!=0&&(e._shiftBlock(m.id,G),r=!0)},we=function(it){var _e=e.direction.getPosition(m),De=e._getSpaceAroundNode(m),R=ke(De,2),k=R[0],D=R[1],j=it-_e,G=_e;j>0?G=Math.min(_e+(D-e.options.hierarchical.nodeSpacing),it):j<0&&(G=Math.max(_e-(k-e.options.hierarchical.nodeSpacing),it)),G!==_e&&(e.direction.setPosition(m,G),r=!0)},Oe=ne($,S);ce(Oe),Oe=ne($,E),we(Oe)},v=function($){var m=e.hierarchical.getLevels();m=Dn(m).call(m);for(var w=0;w<$;w++){r=!1;for(var E=0;E<m.length;E++)for(var T=m[E],O=e.hierarchical.distributionOrdering[T],_=0;_<O.length;_++)f(1e3,O[_]);if(r!==!0)break}},p=function($){var m=e.hierarchical.getLevels();m=Dn(m).call(m);for(var w=0;w<$&&(r=!1,h(d,m,!0),r===!0);w++);},b=function(){for(var $ in e.body.nodes)Object.prototype.hasOwnProperty.call(e.body.nodes,$)&&e._centerParent(e.body.nodes[$])},g=function(){var $=e.hierarchical.getLevels();$=Dn($).call($);for(var m=0;m<$.length;m++)for(var w=$[m],E=e.hierarchical.distributionOrdering[w],T=0;T<E.length;T++)e._centerParent(E[T])};this.options.hierarchical.blockShifting===!0&&(p(5),b()),this.options.hierarchical.edgeMinimization===!0&&v(20),this.options.hierarchical.parentCentralization===!0&&g(),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=ke(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=xe(e[r]);a=this._indexArrayToNodes(a),nd(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]]);nd(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 re(e.edges,function(a){var o;oe(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;re(n,function(o){var s=e.body.nodes[o],u=e._getActiveEdges(s).length;r[u]=!0});var a=[];return re(r,function(o){a.push(Number(o))}),nd(g_).call(g_,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";re(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(vt.cloneOptions(s,"node"),vt.cloneOptions(u,"node"),vt.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=tk(e=this.body.nodeIndices).call(e,function(a,o){return a.set(o,r.body.nodes[o]),a},new IP);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=tbe(n):this.hierarchical.levels=ebe(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 p,b=e._getActiveEdges(f),g=0;g<b.length;g++){var y=b[g];y.connected===!0&&(y.toId==f.id?p=y.from:p=y.to,f.id!=p.id&&(r(f,p,y),d(p,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 F$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 ibe(t,i){var e=typeof pn<"u"&&jr(t)||t["@@iterator"];if(!e){if(ve(t)||(e=abe(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 abe(t,i){var e;if(t){if(typeof t=="string")return m_(t,i);var r=ut(e=Object.prototype.toString.call(t)).call(e,8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return ri(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return m_(t,i)}}function m_(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 obe=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}},ze(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",de(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={},Gr(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&&(Gr(this.editModeDiv),Gr(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var e,r=ibe(xr(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(),Gr(this.manipulationDiv),Gr(this.editModeDiv),Gr(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(xe(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 Ai(e,{});Uu(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=oe(r=this.body.edgeIndices).call(r,this.temporaryIds.edges[e]);if(n!==-1){var a;xr(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=oe(s=this.body.nodeIndices).call(s,this.temporaryIds.nodes[o]);if(u!==-1){var l;xr(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=ze({},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=ze({},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(oe(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(oe(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(de(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",sk="dom",sbe="any",od=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],sd={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:sk,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}},ube={configure:{enabled:{boolean:C},filter:{boolean:C,string:M,array:Pa,function:"function"},container:{dom:sk},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:od},imageHeight:{number:x},imageWidth:{number:x},src:{string:M},__type__:{object:W,boolean:C}},middle:{enabled:{boolean:C},scaleFactor:{number:x},type:{string:od},imageWidth:{number:x},imageHeight:{number:x},src:{string:M},__type__:{object:W,boolean:C}},from:{enabled:{boolean:C},scaleFactor:{number:x},type:{string:od},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__:sd,__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:sd,__type__:{object:W,boolean:C}},nodes:sd,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:sbe},__type__:{object:W}},height:{string:M},width:{string:M},__type__:{object:W}},uk={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]}}},lbe=function(i,e,r){var n;return!!(gr(i).call(i,"physics")&&gr(n=uk.physics.solver).call(n,e)&&r.physics.solver!==e&&e!=="wind")},cbe=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 p=r[v],b=a[p],g=0;g<f-1;g++)for(var y=r[g],$=a[y],m=g+1;m<f;m++){var w=r[m],E=a[w],T=Math.min($[w],$[p]+b[w]);$[w]=T,E[y]=T}return a}}]),t}(),hbe=function(){function t(i,e,r){N(this,t),this.body=i,this.springLength=e,this.springConstant=r,this.distanceSolver=new cbe}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,p=0,b=0;h>o&&u<l;){u+=1;var g=this._getHighestEnergyNode(n),y=ke(g,4);for(d=y[0],h=y[1],f=y[2],v=y[3],p=h,b=0;p>s&&b<c;){b+=1,this._moveNode(d,f,v);var $=this._getEnergy(d),m=ke($,3);p=m[0],f=m[1],v=m[2]}}}},{key:"_getHighestEnergyNode",value:function(e){for(var r=this.body.nodeIndices,n=this.body.nodes,a=0,o=r[0],s=0,u=0,l=0;l<r.length;l++){var c=r[l];if(n[c].predefinedPosition!==!0||n[c].isCluster===!0&&e===!0||n[c].options.fixed.x!==!0||n[c].options.fixed.y!==!0){var h=this._getEnergy(c),d=ke(h,3),f=d[0],v=d[1],p=d[2];a<f&&(a=f,o=c,s=v,u=p)}}return[o,a,s,u]}},{key:"_getEnergy",value:function(e){var r=ke(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 p=a[v];if(p!==e){var b=o[p].x,g=o[p].y,y=d[p],$=f[p],m=1/Math.pow(Math.pow(c-b,2)+Math.pow(h-g,2),1.5);s+=y*(1-$*Math.pow(h-g,2)*m),u+=y*($*(c-b)*(h-g)*m),l+=y*(1-$*Math.pow(c-b,2)*m)}}var w=s,E=u,T=r,O=l,_=n,S=(T/w+_/E)/(E/w-O/E),I=-(E*S+T)/w;o[e].x+=I,o[e].y+=S,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,p=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)*p),this.K_matrix[o][d]*(u-v-this.L_matrix[o][d]*(u-v)*p)],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],p=v[0],b=v[1],g=n[f].x,y=n[f].y,$=1/Math.sqrt(Math.pow(u-g,2)+Math.pow(l-y,2)),m=o[f]*(u-g-s[f]*(u-g)*$),w=o[f]*(l-y-s[f]*(l-y)*$);a[d]=[m,w],c+=m,h+=w;var E=this.E_sums[f];E[0]+=m-p,E[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:Nhe,clickToUse:!1},ze(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 Lhe(function(){return s.body.emitter.emit("_requestRedraw")}),this.groups=new rfe,this.canvas=new Uye(this.body),this.selectionHandler=new Mme(this.body,this.canvas),this.interactionHandler=new Qye(this.body,this.canvas,this.selectionHandler),this.view=new Kye(this.body,this.canvas),this.renderer=new jye(this.body,this.canvas),this.physics=new Iye(this.body),this.layoutEngine=new nbe(this.body),this.clustering=new Bye(this.body),this.manipulation=new obe(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new hge(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new bye(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new hbe(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(e),this.setData(i)}dT(H.prototype);H.prototype.setOptions=function(t){var i=this;if(t===null&&(t=void 0),t!==void 0){var e=fhe.validate(t,ube);e===!0&&console.error("%cErrors have been found in the supplied options object.",yP);var r=["locale","locales","clickToUse"];if(ya(r,this.options,t),t.locale!==void 0&&(t.locale=Fhe(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 hhe(this,this.body.container,uk,this.canvas.pixelRatio,lbe)),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 che(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=Ehe(t.dot);this.setData(i);return}else if(t&&t.gephi){console.warn("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");var e=She(t.gephi);this.setData(e);return}else this.nodesHandler.setData(t&&t.nodes,!0),this.edgesHandler.setData(t&&t.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};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];Gr(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 dbe={flex:"~ gap-4 wrap","w-full":""},fbe=Z("span",{op75:""},"Show pages",-1),vbe=Z("span",{op75:""},"Show layouts",-1),pbe=Z("span",{op75:""},"Show workspace",-1),gbe=Z("span",{op75:""},"Show node_modules",-1),ybe=Z("span",{op75:""},"Show global components",-1),mbe=Z("div",{"i-carbon-close":""},null,-1),$be=Z("div",{"flex-auto":""},null,-1),bbe={relative:"","h-full":"","w-full":""},wbe=Z("div",{grid:"~ cols-[20px_1fr] items-center gap-y-1"},[Z("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-42b883":""}),Z("div",{op50:""}," Component "),Z("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-97c2fc":""}),Z("div",{op50:""}," Global Component "),Z("div",{"h-3":"","w-3":"","bg-hex-42b2b8":""}),Z("div",{op50:""}," Page "),Z("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 726 628","ml--1px":"","h-3":""},[Z("path",{fill:"#4256b8","stroke-width":"4",d:"M723 314 543 625.8H183L3 314 183 2.2h360L723 314z"})]),Z("div",{op50:""}," Layout "),Z("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b4b842":""}),Z("div",{op50:""}," Library Component "),Z("div",{"h-3":"","w-3":"","rounded-full":"","bg-hex-b86542":""}),Z("div",{op50:""}," Unknown ")],-1),_be={key:0,py4:"",pt4:"",flex:"~ col"},Ebe={border:"t base",p4:""},Sbe=qi({__name:"ComponentsGraph",props:{components:{},relationships:{}},setup(t){const i=t,e=mi(),r=mi(),n=ck(),a=mi(),o=hk(),s=dk(),u=fk(),{componentsGraphShowNodeModules:l,componentsGraphShowGlobalComponents:c,componentsGraphShowPages:h,componentsGraphShowLayouts:d,componentsGraphShowWorkspace:f}=b_(),v=mi(),p=Zt(()=>{const m=i.relationships||[];if(v.value){let w=function(T){!T||E.has(T)||(E.add(T),T.deps.forEach(O=>{w(m.find(_=>_.id===O))}))};const E=new Set;return w(v.value),Array.from(E)}return m}),b=Zt(()=>{const m=p.value.map(E=>{const T=i.components.find(B=>B.filePath===E.id),O=o.value?.find(B=>B.file===E.id),_=u.value?.find(B=>B.file===E.id),S=E.id.replace(/\?.*$/,"").replace(/\#.*$/,""),I=E.id.includes("/node_modules/")?"lib":T?T.global?"global":"user":_?"layout":O?"page":"unknown";if(!l.value&&I==="lib"||!h.value&&I==="page"||!d.value&&I==="layout"||!f.value&&I==="user"&&s.value&&!E.id.startsWith(s.value.rootDir)||!c.value&&I==="global")return null;const L=I==="layout"?"hexagon":I==="page"?"square":"dot";return{id:E.id,label:S.split("/").splice(-1)[0].replace(/\.\w+$/,""),group:I,shape:L,size:15+Math.min(E.deps.length/2,8),font:{color:n.value==="dark"?"white":"black"},color:v.value?.id===E.id?"#82c742":void 0,extra:{id:E.id,component:T,page:O,layout:_,relationship:E}}}).filter(E=>!!E),w=p.value.flatMap(E=>E.deps.map(T=>({from:E.id,to:T,arrows:{to:{enabled:!0,scaleFactor:.8}}})));return{nodes:m,edges:w}}),g=Zt(()=>a.value?.component?i.relationships?.find(w=>w.id===a.value?.component?.filePath)?.deps?.map(w=>i.relationships?.find(E=>E.id===w)?.id).filter(Boolean):[]),y=Zt(()=>a.value?.component?i.relationships?.filter(w=>w.deps.includes(a.value.component.filePath))?.map(w=>i.relationships?.find(E=>E.id===w.id)?.id).filter(Boolean):[]);vk(()=>{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"}}},w=new H(e.value,b.value,m);w.on("click",E=>{const T=E.nodes?.[0],O=b.value.nodes?.find(_=>_.id===T)?.extra;O&&(a.value=O)}),pk(b,()=>{w.setData(b.value)})});function $(){v.value=a.value?.relationship,a.value=void 0}return(m,w)=>{const E=Ck,T=w_,O=gk,_=T_,S=yk,I=Ak;return te(),Pe(cr,null,[Te(T,{ref_key:"navbar",ref:r,absolute:"","left-0":"","right-0":"","top-0":""},{search:Ge(()=>[Z("div",dbe,[Te(E,{modelValue:X(h),"onUpdate:modelValue":w[0]||(w[0]=L=>En(h)?h.value=L:null),n:"primary sm"},{default:Ge(()=>[fbe]),_:1},8,["modelValue"]),Te(E,{modelValue:X(d),"onUpdate:modelValue":w[1]||(w[1]=L=>En(d)?d.value=L:null),n:"primary sm"},{default:Ge(()=>[vbe]),_:1},8,["modelValue"]),Te(E,{modelValue:X(f),"onUpdate:modelValue":w[2]||(w[2]=L=>En(f)?f.value=L:null),n:"primary sm"},{default:Ge(()=>[pbe]),_:1},8,["modelValue"]),Te(E,{modelValue:X(l),"onUpdate:modelValue":w[3]||(w[3]=L=>En(l)?l.value=L:null),n:"primary sm"},{default:Ge(()=>[gbe]),_:1},8,["modelValue"]),Te(E,{modelValue:X(c),"onUpdate:modelValue":w[4]||(w[4]=L=>En(c)?c.value=L:null),n:"primary sm"},{default:Ge(()=>[ybe]),_:1},8,["modelValue"])]),X(v)?(te(),Pe("button",{key:0,flex:"~ gap-1","items-center":"","rounded-full":"","bg-gray:20":"",py1:"",pl3:"",pr2:"","text-xs":"",op50:"","hover:op100":"",onClick:w[5]||(w[5]=L=>v.value=void 0)},[ja(" Clear filter "),mbe])):ct("",!0),$be,Gu(m.$slots,"default")]),_:3},512),Z("div",bbe,[Z("div",{ref_key:"container",ref:e,"h-full":"","w-full":""},null,512),Te(O,{absolute:"","bottom-3":"","left-3":"","border-0":"",p2:"",px3:"","text-sm":"","glass-effect":""},{default:Ge(()=>[wbe]),_:1}),Te(I,{"model-value":!!(X(a)&&X(a).component),navbar:X(r),"w-80":"",onClose:w[7]||(w[7]=L=>a.value=void 0)},{default:Ge(()=>[X(a)&&X(a).component?(te(),Pe("div",_be,[Te(_,{component:X(a).component,dependencies:X(g),dependents:X(y)},null,8,["component","dependencies","dependents"]),Z("div",Ebe,[Te(S,{n:"primary solid",onClick:w[6]||(w[6]=L=>$())},{default:Ge(()=>[ja(" Filter to this component ")]),_:1})])])):ct("",!0)]),_:1},8,["model-value","navbar"])])],64)}}}),Obe={hover:"bg-active",class:"group",flex:"~ gap2","w-full":"","items-center":"",rounded:"",px2:"",py1:""},Tbe={key:0,"ml--1":"","text-primary":""},xbe=qi({__name:"ComponentItem",props:{component:{},dependencies:{},dependents:{}},setup(t){const i=t,e=Zt(()=>i.component.filePath||i.component.file||i.component.__file||"");return(r,n)=>{const a=O_,o=T_,s=mk("VDropdown"),u=__,l=E_;return te(),Pe("div",Obe,[Te(s,null,{popper:Ge(()=>[Te(o,{component:r.component,dependencies:r.dependencies,dependents:r.dependents,"w-100":"",pt4:""},null,8,["component","dependencies","dependents"])]),default:Ge(()=>[Z("button",{"hover:text-primary":"",class:$k(r.dependents&&r.dependents.length===0?"op50":"")},[Te(a,{component:r.component},null,8,["component"])],2)]),_:1}),r.dependents?.length?(te(),Pe("sup",Tbe," x"+du(r.dependents?.length),1)):ct("",!0),r.component.global?(te(),lt(u,{key:1,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"runtime"})):ct("",!0),Gu(r.$slots,"default"),X(e)?(te(),lt(l,{key:2,filepath:X(e),"text-sm":"",op25:"","group-hover:op75":""},null,8,["filepath"])):ct("",!0)])}}}),Pbe={flex:"~ gap-2 items-center"},kbe={pl4:""},Ibe=qi({__name:"ComponentsList",props:{components:{},relationships:{}},setup(t){const i=t,e=mi(""),r=mi("all"),n=Zt(()=>{const s=i.components.map(u=>bk(u,i.relationships));return r.value==="using"?s.filter(u=>u.dependents?.length):r.value==="not-used"?s.filter(u=>!u.dependents?.length):s}),a=Zt(()=>new wk(n.value,{keys:["component.pascalName","component.filePath","component.kebabName"]})),o=Zt(()=>{const s=[],u=new Map,l=[],c=[],h={user:0,lib:0,builtin:0,runtime:0};return(e.value?a.value.search(e.value).map(f=>f.item):n.value).forEach(f=>{const v=f.component;if(v.filePath&&_k(v.filePath)){const p=Ek(v.filePath);if(!p)return;p==="nuxt"?(l.push(f),h.builtin++):(u.has(p)||u.set(p,[]),u.get(p).push(f),h.lib++)}else v.global&&!v.filePath?(c.push(f),h.runtime++):(s.push(f),h.user++)}),{count:h,user:s,builtin:l,lib:u,runtime:c}});return(s,u)=>{const l=Sk,c=Rk,h=w_,d=xbe,f=Dk,v=Mk;return te(),Pe(cr,null,[Te(h,{search:X(e),"onUpdate:search":u[1]||(u[1]=p=>En(e)?e.value=p:null),pb3:""},{actions:Ge(()=>[Gu(s.$slots,"default")]),default:Ge(()=>[Z("div",Pbe,[Te(l,{icon:"carbon-filter",op50:""}),Te(c,{modelValue:X(r),"onUpdate:modelValue":u[0]||(u[0]=p=>En(r)?r.value=p:null),n:"primary sm",options:[{label:"All",value:"all"},{label:"Using",value:"using"},{label:"Not used",value:"not-used"}]},null,8,["modelValue"])])]),_:3},8,["search"]),X(o).user.length?(te(),lt(f,{key:0,icon:"carbon-nominal",text:"User components",open:X(o).user.length<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:X(Hl)),description:`Total components: ${X(o).count.user}`},{default:Ge(()=>[(te(!0),Pe(cr,null,_n(X(o).user,p=>(te(),lt(d,us({key:p.component.filePath},p),null,16))),128))]),_:1},8,["open","description"])):ct("",!0),X(o).runtime.length?(te(),lt(f,{key:1,icon:"carbon-load-balancer-global",open:X(o).runtime.length<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:X(Hl)),text:"Runtime components",description:`Total components: ${X(o).count.runtime}`},{default:Ge(()=>[(te(!0),Pe(cr,null,_n(X(o).runtime,p=>(te(),lt(d,us({key:p.component.filePath},p),null,16))),128))]),_:1},8,["open","description"])):ct("",!0),X(o).builtin.length?(te(),lt(f,{key:2,icon:"simple-icons-nuxtdotjs",text:"Built-in components",description:`Total components: ${X(o).count.builtin}`},{default:Ge(()=>[(te(!0),Pe(cr,null,_n(X(o).builtin,p=>(te(),lt(d,us({key:p.component.filePath},p),null,16))),128))]),_:1},8,["description"])):ct("",!0),X(o).lib.size?(te(),lt(f,{key:3,open:X(o).count.lib<=("DETAILS_MAX_ITEMS"in s?s.DETAILS_MAX_ITEMS:X(Hl)),icon:"carbon-3d-mpr-toggle",text:"Components from libraries",description:`${X(o).count.lib} components from ${X(o).lib.size} packages`},{default:Ge(()=>[(te(!0),Pe(cr,null,_n(X(o).lib.entries(),([p,b])=>(te(),Pe("div",{key:p,"ml-2":""},[Te(v,{text:`${p} (${b.length})`,py1:"",op50:""},null,8,["text"]),Z("div",kbe,[(te(!0),Pe(cr,null,_n(b,g=>(te(),lt(d,us({key:g.component.filePath},g),null,16))),128))])]))),128))]),_:1},8,["open","description"])):ct("",!0)],64)}}}),Cbe={relative:"","h-full":"","of-auto":""},Abe={"flex-none":"",flex:"~ gap3"},Ube=qi({__name:"components",setup(t){const i=Ok(),e=kk(),r=Ik(),{componentsView:n}=b_();function a(){i.value?.inspector?.instance&&i.value.inspector.enable()}function o(){n.value=n.value==="list"?"graph":"list"}return(s,u)=>{const l=$_,c=zk,h=Pk,d=Tk("tooltip");return te(),Pe(cr,null,[Z("div",Cbe,[(te(),lt(xk(X(n)==="list"?Ibe:Sbe),{components:X(e),relationships:X(r)},{default:Ge(()=>[Z("div",Abe,[Ry(Te(l,{"text-lg":"",icon:X(n)==="graph"?"i-carbon-list":"i-carbon-network-4",title:"Toggle view",onClick:o},null,8,["icon"]),[[d,"Toggle View",void 0,{"bottom-end":!0}]]),X(i)?.inspector?.instance?Ry((te(),lt(l,{key:0,"text-lg":"",icon:"i-tabler-focus-2",title:"Inspect Vue components",onClick:a},null,512)),[[d,"Inspect Vue components",void 0,{"bottom-end":!0}]]):ct("",!0)])]),_:1},8,["components","relationships"]))]),Te(h,null,{default:Ge(()=>[Te(c)]),_:1})],64)}}});export{Ube as default};