@nuxt/devtools 4.0.0-alpha.10 → 4.0.0-alpha.12

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 (147) hide show
  1. package/README.md +2 -0
  2. package/dist/chunks/analyze-build.mjs +5 -6
  3. package/dist/chunks/code-server.mjs +1 -2
  4. package/dist/chunks/data-inspector.mjs +82 -0
  5. package/dist/chunks/module-main.mjs +34 -104
  6. package/dist/chunks/vite-inspect.mjs +5 -6
  7. package/dist/client/200.html +1 -1
  8. package/dist/client/404.html +1 -1
  9. package/dist/client/_nuxt/__blank-ki8oaugs.js +1 -0
  10. package/dist/client/_nuxt/analyze-build-ie32uchi.js +1 -0
  11. package/dist/client/_nuxt/assets-jyg0eofj.js +6 -0
  12. package/dist/client/_nuxt/{auth-required-panel-mm5lidl3.js → auth-required-panel-hlhmg87z.js} +1 -1
  13. package/dist/client/_nuxt/builds/latest.json +1 -1
  14. package/dist/client/_nuxt/builds/meta/1183fbc7-b7db-4404-9ee4-7571849e8ffe.json +1 -0
  15. package/dist/client/_nuxt/cj10ghel.js +2 -0
  16. package/dist/client/_nuxt/{client-botfq0nw.js → client-iet3i2jx.js} +1 -1
  17. package/dist/client/_nuxt/code-diff-nh9ucmoa.js +8 -0
  18. package/dist/client/_nuxt/code-snippets-jzjkfinz.js +1 -0
  19. package/dist/client/_nuxt/{components-k5rsm3c3.js → components-oyl85tqv.js} +1 -1
  20. package/dist/client/_nuxt/{composable-item-o8crh7o9.js → composable-item-flzw59ca.js} +1 -1
  21. package/dist/client/_nuxt/composables-li5sexni.js +1 -0
  22. package/dist/client/_nuxt/{custom-_name_-j6w4b10b.js → custom-_name_-kwr7j680.js} +1 -1
  23. package/dist/client/_nuxt/{data-schema-button-j2dsypzz.js → data-schema-button-nmq5no1t.js} +1 -1
  24. package/dist/client/_nuxt/{data-schema-drawer-9s1351p5.js → data-schema-drawer-bvbzeooy.js} +1 -1
  25. package/dist/client/_nuxt/{debug-muupfuzb.js → debug-ouzogne6.js} +1 -1
  26. package/dist/client/_nuxt/{default-k6jiq1wt.js → default-m4s11ttb.js} +1 -1
  27. package/dist/client/_nuxt/dialog-i2683h8g.js +1 -0
  28. package/dist/client/_nuxt/dist-gklva25a.js +1 -0
  29. package/dist/client/_nuxt/{duration-display-kup58tqe.js → duration-display-fjuy04uz.js} +1 -1
  30. package/dist/client/_nuxt/{editor-bzxz1rcq.js → editor-cv8lunmj.js} +1 -1
  31. package/dist/client/_nuxt/{error-404-25vom0cq.js → error-404-dxv9ojo4.js} +1 -1
  32. package/dist/client/_nuxt/error-404.css-kdbb3rb9.css +1 -0
  33. package/dist/client/_nuxt/{error-500-htafeoa3.js → error-500-modjju3x.js} +1 -1
  34. package/dist/client/_nuxt/error-500.css-hwq7jdp9.css +1 -0
  35. package/dist/client/_nuxt/{error-lj28vdr1.js → error-k3ha3twu.js} +1 -1
  36. package/dist/client/_nuxt/{filepath-item-jdy5gc4m.js → filepath-item-m6tglha3.js} +1 -1
  37. package/dist/client/_nuxt/full-kcw32vsy.js +1 -0
  38. package/dist/client/_nuxt/fuse-ipb957gg.js +1 -0
  39. package/dist/client/_nuxt/{help-fab-ll6mbhgs.js → help-fab-sp6luyzp.js} +1 -1
  40. package/dist/client/_nuxt/{hooks-hgffr865.js → hooks-l1yy9fmc.js} +1 -1
  41. package/dist/client/_nuxt/{imports-i2fnwttt.js → imports-fm9nem8p.js} +1 -1
  42. package/dist/client/_nuxt/{launch-page-ksxhzp2z.js → launch-page-g9x94qn0.js} +1 -1
  43. package/dist/client/_nuxt/modules-ha9lr7ce.js +1 -0
  44. package/dist/client/_nuxt/nbadge-n73p68uz.js +1 -0
  45. package/dist/client/_nuxt/{nbutton-mtj8qzr9.js → nbutton-mxt3cxcx.js} +1 -1
  46. package/dist/client/_nuxt/ncard-kyrmtdmn.js +1 -0
  47. package/dist/client/_nuxt/{ncheckbox-mksfz5p0.js → ncheckbox-fbnq3guy.js} +1 -1
  48. package/dist/client/_nuxt/{ncode-block-pfi5niis.js → ncode-block-ltlsxf5u.js} +1 -1
  49. package/dist/client/_nuxt/ndialog-jnj3j8xn.js +3 -0
  50. package/dist/client/_nuxt/{ndrawer-h46qfenr.js → ndrawer-ll4inus6.js} +1 -1
  51. package/dist/client/_nuxt/{ndropdown-ow0z3stn.js → ndropdown-hviylh0n.js} +1 -1
  52. package/dist/client/_nuxt/nicon-ccnh6x2r.js +4 -0
  53. package/dist/client/_nuxt/{nicon-title-e2gzkzl3.js → nicon-title-ejbxuupx.js} +1 -1
  54. package/dist/client/_nuxt/{nlink-j55iyj5x.js → nlink-h3jrz76l.js} +1 -1
  55. package/dist/client/_nuxt/{nloading-k4sy0f8c.js → nloading-lhpm96ki.js} +1 -1
  56. package/dist/client/_nuxt/{nmarkdown-mnxob7ua.js → nmarkdown-7qnv8atx.js} +1 -1
  57. package/dist/client/_nuxt/{nnavbar-dwxbkqvw.js → nnavbar-f1l2np9t.js} +1 -1
  58. package/dist/client/_nuxt/none-ju85xmqv.js +1 -0
  59. package/dist/client/_nuxt/npanel-grids-fa3ah9jo.js +1 -0
  60. package/dist/client/_nuxt/npm-eisv4i48.js +1 -0
  61. package/dist/client/_nuxt/{nsection-block-cb29dqkc.js → nsection-block-nwojdml4.js} +1 -1
  62. package/dist/client/_nuxt/{nselect-glgbbae4.js → nselect-mnlj28vi.js} +1 -1
  63. package/dist/client/_nuxt/{nselect-tabs-jzyd56a1.js → nselect-tabs-i66uosc4.js} +1 -1
  64. package/dist/client/_nuxt/{nsplit-pane-b5ki4jwa.js → nsplit-pane-lj2kxwh2.js} +1 -1
  65. package/dist/client/_nuxt/{ntext-input-lzyyx3ym.js → ntext-input-j7ulf0ma.js} +1 -1
  66. package/dist/client/_nuxt/{ntip-oohvtkqd.js → ntip-mx3dwcmh.js} +1 -1
  67. package/dist/client/_nuxt/{nuxt-f4tmbbs7.js → nuxt-hj3jyofn.js} +1 -1
  68. package/dist/client/_nuxt/{nuxt-link-dgri2bli.js → nuxt-link-nsgkom6k.js} +1 -1
  69. package/dist/client/_nuxt/{nuxt-logo-gzcu6lh0.js → nuxt-logo-dead1uws.js} +1 -1
  70. package/dist/client/_nuxt/{open-graph-mc8dh9qn.js → open-graph-eytiti5b.js} +1 -1
  71. package/dist/client/_nuxt/{overview-lpfgamus.js → overview-fygybbrw.js} +1 -1
  72. package/dist/client/_nuxt/{pages-bv99uu3p.js → pages-fq4mkuci.js} +1 -1
  73. package/dist/client/_nuxt/{payload-k2hrsm04.js → payload-jw0xxl4z.js} +1 -1
  74. package/dist/client/_nuxt/{plugins-ljid8ktq.js → plugins-lou32v4a.js} +1 -1
  75. package/dist/client/_nuxt/ready-ikhds7hc.js +2 -0
  76. package/dist/client/_nuxt/rolldown-runtime-f96lzs6p.js +1 -0
  77. package/dist/client/_nuxt/{runtime-configs-lvgzbcdu.js → runtime-configs-e7x3t3tj.js} +1 -1
  78. package/dist/client/_nuxt/{server-route-inputs-iwv9ewrw.js → server-route-inputs-kt7x1gp6.js} +1 -1
  79. package/dist/client/_nuxt/server-routes-mr1qgqcl.js +7 -0
  80. package/dist/client/_nuxt/server-tasks-evcqaabt.js +1 -0
  81. package/dist/client/_nuxt/{settings-ngc5p8qn.js → settings-ipg67k9i.js} +1 -1
  82. package/dist/client/_nuxt/{stacktrace-list-chmjyp53.js → stacktrace-list-kruru2d1.js} +1 -1
  83. package/dist/client/_nuxt/{state-commands-f4h87cfl.js → state-commands-cjvbhmr2.js} +1 -1
  84. package/dist/client/_nuxt/{state-components-jymg7dj7.js → state-components-dzfpv5gi.js} +1 -1
  85. package/dist/client/_nuxt/state-editor-eqmkyoyc.js +1 -0
  86. package/dist/client/_nuxt/{state-modules-bewlxq5o.js → state-modules-xt0ltk0c.js} +1 -1
  87. package/dist/client/_nuxt/{state-routes-f5cna95h.js → state-routes-g66ss5o7.js} +1 -1
  88. package/dist/client/_nuxt/state-schema-c04uzwtk.js +1 -0
  89. package/dist/client/_nuxt/{state-tabs-m7neqayd.js → state-tabs-ntcahhqz.js} +1 -1
  90. package/dist/client/_nuxt/storage-if9cwvvr.js +1 -0
  91. package/dist/client/_nuxt/{tab-icon-nktg799o.js → tab-icon-bw4o7q2t.js} +1 -1
  92. package/dist/client/_nuxt/telemetry-gc8f0sai.js +1 -0
  93. package/dist/client/_nuxt/{timeline-o9hhhb94.js → timeline-l8l1qdht.js} +1 -1
  94. package/dist/client/_nuxt/unhead.dnki-vlv7-jmz34zx6.js +1 -0
  95. package/dist/client/_nuxt/{unocss-runtime-bjggyd5e.js → unocss-runtime-htk43m9c.js} +1 -1
  96. package/dist/client/_nuxt/utils-c5p5s7ov.js +1 -0
  97. package/dist/client/_nuxt/vendor/json-editor-vue-h1waqukq.js +3862 -0
  98. package/dist/client/_nuxt/vendor/{markdown-exit-n4f1gsja.js → markdown-exit-nzr6hp55.js} +6 -6
  99. package/dist/client/_nuxt/vendor/quicktype-core-lz5bp16m.js +929 -0
  100. package/dist/client/_nuxt/vendor/shiki-g3svwmfz.js +152 -0
  101. package/dist/client/_nuxt/vendor/unocss-hvwio62w.js +3 -0
  102. package/dist/client/_nuxt/vendor/vis-bjkylbfi.js +30 -0
  103. package/dist/client/_nuxt/{virtual-files-kcs310xn.js → virtual-files-epcme7qw.js} +1 -1
  104. package/dist/client/index.html +1 -1
  105. package/dist/module.json +1 -1
  106. package/dist/module.mjs +1 -1
  107. package/dist/runtime/plugins/vite-devtools.client.js +5 -1
  108. package/dist/shared/{devtools.CCWq4fFE.mjs → devtools.BNZC-DT8.mjs} +1 -0
  109. package/package.json +27 -42
  110. package/dist/client/_nuxt/__blank-dil3nwfh.js +0 -1
  111. package/dist/client/_nuxt/analyze-build-2e03hfez.js +0 -1
  112. package/dist/client/_nuxt/assets-fyld29gf.js +0 -6
  113. package/dist/client/_nuxt/builds/meta/dbb6f1eb-fdec-4078-b409-19d1ed6035a2.json +0 -1
  114. package/dist/client/_nuxt/code-diff-oxve94ak.js +0 -8
  115. package/dist/client/_nuxt/code-snippets-mcrkbsd4.js +0 -1
  116. package/dist/client/_nuxt/composables-ml69kqh9.js +0 -1
  117. package/dist/client/_nuxt/dialog-c7wnj3nl.js +0 -1
  118. package/dist/client/_nuxt/dist-d6zuldkp.js +0 -1
  119. package/dist/client/_nuxt/error-404.css-mpcol2vk.css +0 -1
  120. package/dist/client/_nuxt/error-500.css-273x0c3h.css +0 -1
  121. package/dist/client/_nuxt/full-gpj1mlf5.js +0 -1
  122. package/dist/client/_nuxt/fuse-blwyun20.js +0 -1
  123. package/dist/client/_nuxt/modules-dae72omf.js +0 -1
  124. package/dist/client/_nuxt/nbadge-oyy0wjng.js +0 -1
  125. package/dist/client/_nuxt/ncard-mtvdl2wf.js +0 -1
  126. package/dist/client/_nuxt/ndialog-dj1ywkc1.js +0 -3
  127. package/dist/client/_nuxt/nicon-obdu3k9r.js +0 -3
  128. package/dist/client/_nuxt/nju74r39.js +0 -2
  129. package/dist/client/_nuxt/none-md25735q.js +0 -1
  130. package/dist/client/_nuxt/npanel-grids-ga8arlvs.js +0 -1
  131. package/dist/client/_nuxt/npm-febdntx4.js +0 -1
  132. package/dist/client/_nuxt/ready-h6bi8le4.js +0 -1
  133. package/dist/client/_nuxt/rolldown-runtime-ln9q81id.js +0 -1
  134. package/dist/client/_nuxt/server-routes-mkqbltfh.js +0 -7
  135. package/dist/client/_nuxt/server-tasks-kbf4txeq.js +0 -1
  136. package/dist/client/_nuxt/state-editor-bg13n53w.js +0 -1
  137. package/dist/client/_nuxt/state-schema-espdew31.js +0 -1
  138. package/dist/client/_nuxt/storage-cep8dxy9.js +0 -1
  139. package/dist/client/_nuxt/telemetry-9f19c0i9.js +0 -1
  140. package/dist/client/_nuxt/unhead.dgx-hwv-uc-gaht5h60.js +0 -1
  141. package/dist/client/_nuxt/utils-bisj7255.js +0 -1
  142. package/dist/client/_nuxt/vendor/json-editor-vue-lmhxk84q.js +0 -3862
  143. package/dist/client/_nuxt/vendor/quicktype-core-b6sxxdgw.js +0 -929
  144. package/dist/client/_nuxt/vendor/shiki-abzmnals.js +0 -152
  145. package/dist/client/_nuxt/vendor/unocss-hqrnsbiy.js +0 -3
  146. package/dist/client/_nuxt/vendor/vis-i54ppuvk.js +0 -26
  147. package/types.d.ts +0 -1
@@ -0,0 +1,30 @@
1
+ var e=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var n={exports:{}},r={},i,a;function o(){if(a)return i;a=1;var t=function(e){return e&&e.Math===Math&&e};return i=t(typeof globalThis==`object`&&globalThis)||t(typeof window==`object`&&window)||t(typeof self==`object`&&self)||t(typeof e==`object`&&e)||t(typeof i==`object`&&i)||(function(){return this})()||Function(`return this`)(),i}var s,c;function l(){return c?s:(c=1,s=function(e){try{return!!e()}catch{return!0}},s)}var u,d;function f(){return d?u:(d=1,u=!l()(function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}),u)}var p,m;function h(){if(m)return p;m=1;var e=f(),t=Function.prototype,n=t.apply,r=t.call;return p=typeof Reflect==`object`&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),p}var g,_;function v(){if(_)return g;_=1;var e=f(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return g=e?r:function(e){return function(){return n.apply(e,arguments)}},g}var y,b;function x(){if(b)return y;b=1;var e=v(),t=e({}.toString),n=e(``.slice);return y=function(e){return n(t(e),8,-1)},y}var S,C;function w(){if(C)return S;C=1;var e=x(),t=v();return S=function(n){if(e(n)===`Function`)return t(n)},S}var T,E;function D(){if(E)return T;E=1;var e=typeof document==`object`&&document.all;return T=e===void 0&&e!==void 0?function(t){return typeof t==`function`||t===e}:function(e){return typeof e==`function`},T}var ee={},te,O;function k(){return O?te:(O=1,te=!l()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),te)}var ne,re;function A(){if(re)return ne;re=1;var e=f(),t=Function.prototype.call;return ne=e?t.bind(t):function(){return t.apply(t,arguments)},ne}var ie={},ae;function oe(){if(ae)return ie;ae=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor;return ie.f=t&&!e.call({1:2},1)?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,ie}var se,ce;function le(){return ce?se:(ce=1,se=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},se)}var ue,de;function fe(){if(de)return ue;de=1;var e=v(),t=l(),n=x(),r=Object,i=e(``.split);return ue=t(function(){return!r(`z`).propertyIsEnumerable(0)})?function(e){return n(e)===`String`?i(e,``):r(e)}:r,ue}var pe,me;function he(){return me?pe:(me=1,pe=function(e){return e==null},pe)}var ge,_e;function j(){if(_e)return ge;_e=1;var e=he(),t=TypeError;return ge=function(n){if(e(n))throw new t(`Can't call method on `+n);return n},ge}var ve,ye;function be(){if(ye)return ve;ye=1;var e=fe(),t=j();return ve=function(n){return e(t(n))},ve}var xe,Se;function Ce(){if(Se)return xe;Se=1;var e=D();return xe=function(t){return typeof t==`object`?t!==null:e(t)},xe}var we,Te;function M(){return Te?we:(Te=1,we={},we)}var Ee,De;function N(){if(De)return Ee;De=1;var e=M(),t=o(),n=D(),r=function(e){return n(e)?e:void 0};return Ee=function(n,i){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][i]||t[n]&&t[n][i]},Ee}var Oe,ke;function Ae(){return ke?Oe:(ke=1,Oe=v()({}.isPrototypeOf),Oe)}var je,Me;function Ne(){if(Me)return je;Me=1;var e=o().navigator,t=e&&e.userAgent;return je=t?String(t):``,je}var Pe,Fe;function Ie(){if(Fe)return Pe;Fe=1;var e=o(),t=Ne(),n=e.process,r=e.Deno,i=n&&n.versions||r&&r.version,a=i&&i.v8,s,c;return a&&(s=a.split(`.`),c=s[0]>0&&s[0]<4?1:+(s[0]+s[1])),!c&&t&&(s=t.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=t.match(/Chrome\/(\d+)/),s&&(c=+s[1]))),Pe=c,Pe}var Le,Re;function ze(){if(Re)return Le;Re=1;var e=Ie(),t=l(),n=o().String;return Le=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol(`symbol detection`);return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Le}var Be,Ve;function He(){return Ve?Be:(Ve=1,Be=ze()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,Be)}var Ue,We;function Ge(){if(We)return Ue;We=1;var e=N(),t=D(),n=Ae(),r=He(),i=Object;return Ue=r?function(e){return typeof e==`symbol`}:function(r){var a=e(`Symbol`);return t(a)&&n(a.prototype,i(r))},Ue}var Ke,qe;function Je(){if(qe)return Ke;qe=1;var e=String;return Ke=function(t){try{return e(t)}catch{return`Object`}},Ke}var Ye,Xe;function Ze(){if(Xe)return Ye;Xe=1;var e=D(),t=Je(),n=TypeError;return Ye=function(r){if(e(r))return r;throw new n(t(r)+` is not a function`)},Ye}var Qe,$e;function et(){if($e)return Qe;$e=1;var e=Ze(),t=he();return Qe=function(n,r){var i=n[r];return t(i)?void 0:e(i)},Qe}var tt,nt;function rt(){if(nt)return tt;nt=1;var e=A(),t=D(),n=Ce(),r=TypeError;return tt=function(i,a){var o,s;if(a===`string`&&t(o=i.toString)&&!n(s=e(o,i))||t(o=i.valueOf)&&!n(s=e(o,i))||a!==`string`&&t(o=i.toString)&&!n(s=e(o,i)))return s;throw new r(`Can't convert object to primitive value`)},tt}var it={exports:{}},at,ot;function st(){return ot?at:(ot=1,at=!0,at)}var ct,lt;function ut(){if(lt)return ct;lt=1;var e=o(),t=Object.defineProperty;return ct=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch{e[n]=r}return r},ct}var dt;function ft(){if(dt)return it.exports;dt=1;var e=st(),t=o(),n=ut(),r=`__core-js_shared__`,i=it.exports=t[r]||n(r,{});return(i.versions||=[]).push({version:`3.49.0`,mode:e?`pure`:`global`,copyright:`© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.`,license:`https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE`,source:`https://github.com/zloirock/core-js`}),it.exports}var pt,mt;function ht(){if(mt)return pt;mt=1;var e=ft();return pt=function(t,n){return e[t]||(e[t]=n||{})},pt}var gt,_t;function vt(){if(_t)return gt;_t=1;var e=j(),t=Object;return gt=function(n){return t(e(n))},gt}var yt,bt;function xt(){if(bt)return yt;bt=1;var e=v(),t=vt(),n=e({}.hasOwnProperty);return yt=Object.hasOwn||function(e,r){return n(t(e),r)},yt}var St,Ct;function wt(){if(Ct)return St;Ct=1;var e=v(),t=0,n=Math.random(),r=e(1.1.toString);return St=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+r(++t+n,36)},St}var Tt,Et;function Dt(){if(Et)return Tt;Et=1;var e=o(),t=ht(),n=xt(),r=wt(),i=ze(),a=He(),s=e.Symbol,c=t(`wks`),l=a?s.for||s:s&&s.withoutSetter||r;return Tt=function(e){return n(c,e)||(c[e]=i&&n(s,e)?s[e]:l(`Symbol.`+e)),c[e]},Tt}var Ot,kt;function At(){if(kt)return Ot;kt=1;var e=A(),t=Ce(),n=Ge(),r=et(),i=rt(),a=Dt(),o=TypeError,s=a(`toPrimitive`);return Ot=function(a,c){if(!t(a)||n(a))return a;var l=r(a,s),u;if(l){if(c===void 0&&(c=`default`),u=e(l,a,c),!t(u)||n(u))return u;throw new o(`Can't convert object to primitive value`)}return c===void 0&&(c=`number`),i(a,c)},Ot}var jt,Mt;function Nt(){if(Mt)return jt;Mt=1;var e=At(),t=Ge();return jt=function(n){var r=e(n,`string`);return t(r)?r:r+``},jt}var Pt,Ft;function It(){if(Ft)return Pt;Ft=1;var e=o(),t=Ce(),n=e.document,r=t(n)&&t(n.createElement);return Pt=function(e){return r?n.createElement(e):{}},Pt}var Lt,Rt;function zt(){if(Rt)return Lt;Rt=1;var e=k(),t=l(),n=It();return Lt=!e&&!t(function(){return Object.defineProperty(n(`div`),"a",{get:function(){return 7}}).a!==7}),Lt}var Bt;function Vt(){if(Bt)return ee;Bt=1;var e=k(),t=A(),n=oe(),r=le(),i=be(),a=Nt(),o=xt(),s=zt(),c=Object.getOwnPropertyDescriptor;return ee.f=e?c:function(e,l){if(e=i(e),l=a(l),s)try{return c(e,l)}catch{}if(o(e,l))return r(!t(n.f,e,l),e[l])},ee}var Ht,Ut;function Wt(){if(Ut)return Ht;Ut=1;var e=l(),t=D(),n=/#|\.prototype\./,r=function(n,r){var c=a[i(n)];return c===s?!0:c===o?!1:t(r)?e(r):!!r},i=r.normalize=function(e){return String(e).replace(n,`.`).toLowerCase()},a=r.data={},o=r.NATIVE=`N`,s=r.POLYFILL=`P`;return Ht=r,Ht}var Gt,Kt;function qt(){if(Kt)return Gt;Kt=1;var e=w(),t=Ze(),n=f(),r=e(e.bind);return Gt=function(e,i){return t(e),i===void 0?e:n?r(e,i):function(){return e.apply(i,arguments)}},Gt}var Jt={},Yt,Xt;function Zt(){return Xt?Yt:(Xt=1,Yt=k()&&l()(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Yt)}var Qt,$t;function en(){if($t)return Qt;$t=1;var e=Ce(),t=String,n=TypeError;return Qt=function(r){if(e(r))return r;throw new n(t(r)+` is not an object`)},Qt}var tn;function nn(){if(tn)return Jt;tn=1;var e=k(),t=zt(),n=Zt(),r=en(),i=Nt(),a=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=`enumerable`,l=`configurable`,u=`writable`;return Jt.f=e?n?function(e,t,n){if(r(e),t=i(t),r(n),typeof e==`function`&&t===`prototype`&&`value`in n&&u in n&&!n[u]){var a=s(e,t);a&&a[u]&&(e[t]=n.value,n={configurable:l in n?n[l]:a[l],enumerable:c in n?n[c]:a[c],writable:!1})}return o(e,t,n)}:o:function(e,n,s){if(r(e),n=i(n),r(s),t)try{return o(e,n,s)}catch{}if(`get`in s||`set`in s)throw new a(`Accessors not supported`);return`value`in s&&(e[n]=s.value),e},Jt}var rn,an;function on(){if(an)return rn;an=1;var e=k(),t=nn(),n=le();return rn=e?function(e,r,i){return t.f(e,r,n(1,i))}:function(e,t,n){return e[t]=n,e},rn}var sn,cn;function P(){if(cn)return sn;cn=1;var e=o(),t=h(),n=w(),r=D(),i=Vt().f,a=Wt(),s=M(),c=qt(),l=on(),u=xt(),d=function(e){var n=function(r,i,a){if(this instanceof n){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,i)}return new e(r,i,a)}return t(e,this,arguments)};return n.prototype=e.prototype,n};return sn=function(t,o){var f=t.target,p=t.global,m=t.stat,h=t.proto,g=p?e:m?e[f]:e[f]&&e[f].prototype,_=p?s:s[f]||l(s,f,{})[f],v=_.prototype,y,b,x,S,C,w,T,E,D;for(S in o)y=a(p?S:f+(m?`.`:`#`)+S,t.forced),b=!y&&g&&u(g,S),w=_[S],b&&(t.dontCallGetSet?(D=i(g,S),T=D&&D.value):T=g[S]),C=b&&T?T:o[S],!(!y&&!h&&typeof w==typeof C)&&(E=t.bind&&b?c(C,e):t.wrap&&b?d(C):h&&r(C)?n(C):C,(t.sham||C&&C.sham||w&&w.sham)&&l(E,`sham`,!0),l(_,S,E),h&&(x=f+`Prototype`,u(s,x)||l(s,x,{}),l(s[x],S,C),t.real&&v&&(y||!v[S])&&l(v,S,C)))},sn}var ln;function un(){if(ln)return r;ln=1;var e=P(),t=k(),n=nn().f;return e({target:`Object`,stat:!0,forced:Object.defineProperty!==n,sham:!t},{defineProperty:n}),r}var dn;function fn(){if(dn)return n.exports;dn=1,un();var e=M().Object,t=n.exports=function(t,n,r){return e.defineProperty(t,n,r)};return e.defineProperty.sham&&(t.sham=!0),n.exports}var pn,mn;function hn(){return mn?pn:(mn=1,pn=fn(),pn)}var gn,_n;function vn(){return _n?gn:(_n=1,gn=hn(),gn)}var yn,bn;function xn(){return bn?yn:(bn=1,yn=vn(),yn)}var Sn,Cn;function wn(){return Cn?Sn:(Cn=1,Sn=xn(),Sn)}var Tn=t(wn()),En={},Dn,On;function kn(){if(On)return Dn;On=1;var e=x();return Dn=Array.isArray||function(t){return e(t)===`Array`},Dn}var An,jn;function Mn(){if(jn)return An;jn=1;var e=Math.ceil,t=Math.floor;return An=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},An}var Nn,Pn;function Fn(){if(Pn)return Nn;Pn=1;var e=Mn();return Nn=function(t){var n=+t;return n!==n||n===0?0:e(n)},Nn}var In,Ln;function Rn(){if(Ln)return In;Ln=1;var e=Fn(),t=Math.min;return In=function(n){var r=e(n);return r>0?t(r,9007199254740991):0},In}var zn,Bn;function Vn(){if(Bn)return zn;Bn=1;var e=Rn();return zn=function(t){return e(t.length)},zn}var Hn,Un;function Wn(){if(Un)return Hn;Un=1;var e=TypeError,t=9007199254740991;return Hn=function(n){if(n>t)throw new e(`Maximum allowed index exceeded`);return n},Hn}var Gn,Kn;function qn(){if(Kn)return Gn;Kn=1;var e=k(),t=nn(),n=le();return Gn=function(r,i,a){e?t.f(r,i,n(0,a)):r[i]=a},Gn}var Jn,Yn;function Xn(){if(Yn)return Jn;Yn=1;var e=k(),t=kn(),n=TypeError,r=Object.getOwnPropertyDescriptor;return Jn=e&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,i){if(t(e)&&!r(e,`length`).writable)throw new n(`Cannot set read only .length`);return e.length=i}:function(e,t){return e.length=t},Jn}var Zn,Qn;function $n(){if(Qn)return Zn;Qn=1;var e=Dt()(`toStringTag`),t={};return t[e]=`z`,Zn=String(t)===`[object z]`,Zn}var er,tr;function nr(){if(tr)return er;tr=1;var e=$n(),t=D(),n=x(),r=Dt()(`toStringTag`),i=Object,a=n(function(){return arguments}())===`Arguments`,o=function(e,t){try{return e[t]}catch{}};return er=e?n:function(e){var s,c,l;return e===void 0?`Undefined`:e===null?`Null`:typeof(c=o(s=i(e),r))==`string`?c:a?n(s):(l=n(s))===`Object`&&t(s.callee)?`Arguments`:l},er}var rr,ir;function ar(){if(ir)return rr;ir=1;var e=v(),t=D(),n=ft(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),rr=n.inspectSource,rr}var or,sr;function cr(){if(sr)return or;sr=1;var e=v(),t=l(),n=D(),r=nr(),i=N(),a=ar(),o=function(){},s=i(`Reflect`,`construct`),c=/^\s*(?:class|function)\b/,u=e(c.exec),d=!c.test(o),f=function(e){if(!n(e))return!1;try{return s(o,[],e),!0}catch{return!1}},p=function(e){if(!n(e))return!1;switch(r(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return d||!!u(c,a(e))}catch{return!0}};return p.sham=!0,or=!s||t(function(){var e;return f(f.call)||!f(Object)||!f(function(){e=!0})||e})?p:f,or}var lr,ur;function dr(){if(ur)return lr;ur=1;var e=kn(),t=cr(),n=Ce(),r=Dt()(`species`),i=Array;return lr=function(a){var o;return e(a)&&(o=a.constructor,t(o)&&(o===i||e(o.prototype))?o=void 0:n(o)&&(o=o[r],o===null&&(o=void 0))),o===void 0?i:o},lr}var fr,pr;function mr(){if(pr)return fr;pr=1;var e=dr();return fr=function(t,n){return new(e(t))(n===0?0:n)},fr}var hr,gr;function _r(){if(gr)return hr;gr=1;var e=l(),t=Dt(),n=Ie(),r=t(`species`);return hr=function(t){return n>=51||!e(function(){var e=[],n=e.constructor={};return n[r]=function(){return{foo:1}},e[t](Boolean).foo!==1})},hr}var vr;function yr(){if(vr)return En;vr=1;var e=P(),t=l(),n=kn(),r=Ce(),i=vt(),a=Vn(),o=Wn(),s=qn(),c=Xn(),u=mr(),d=_r(),f=Dt(),p=Ie(),m=f(`isConcatSpreadable`),h=p>=51||!t(function(){var e=[];return e[m]=!1,e.concat()[0]!==e}),g=function(e){if(!r(e))return!1;var t=e[m];return t===void 0?n(e):!!t};return e({target:`Array`,proto:!0,arity:1,forced:!h||!d(`concat`)},{concat:function(e){var t=i(this),n=u(t,0),r=0,l,d,f,p,m;for(l=-1,f=arguments.length;l<f;l++)if(m=l===-1?t:arguments[l],g(m))for(p=a(m),o(r+p),d=0;d<p;d++,r++)d in m&&s(n,r,m[d]);else o(r+1),s(n,r++,m);return c(n,r),n}}),En}var br={},xr={},Sr,Cr;function wr(){if(Cr)return Sr;Cr=1;var e=nr(),t=String;return Sr=function(n){if(e(n)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return t(n)},Sr}var Tr={},Er,Dr;function Or(){if(Dr)return Er;Dr=1;var e=Fn(),t=Math.max,n=Math.min;return Er=function(r,i){var a=e(r);return a<0?t(a+i,0):n(a,i)},Er}var kr,Ar;function jr(){if(Ar)return kr;Ar=1;var e=be(),t=Or(),n=Vn(),r=function(r){return function(i,a,o){var s=e(i),c=n(s);if(c===0)return!r&&-1;var l=t(o,c),u;if(r&&a!==a){for(;c>l;)if(u=s[l++],u!==u)return!0}else for(;c>l;l++)if((r||l in s)&&s[l]===a)return r||l||0;return!r&&-1}};return kr={includes:r(!0),indexOf:r(!1)},kr}var Mr,Nr;function Pr(){return Nr?Mr:(Nr=1,Mr={},Mr)}var Fr,Ir;function Lr(){if(Ir)return Fr;Ir=1;var e=v(),t=xt(),n=be(),r=jr().indexOf,i=Pr(),a=e([].push);return Fr=function(e,o){var s=n(e),c=0,l=[],u;for(u in s)!t(i,u)&&t(s,u)&&a(l,u);for(;o.length>c;)t(s,u=o[c++])&&(~r(l,u)||a(l,u));return l},Fr}var Rr,zr;function Br(){return zr?Rr:(zr=1,Rr=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],Rr)}var Vr,Hr;function Ur(){if(Hr)return Vr;Hr=1;var e=Lr(),t=Br();return Vr=Object.keys||function(n){return e(n,t)},Vr}var Wr;function Gr(){if(Wr)return Tr;Wr=1;var e=k(),t=Zt(),n=nn(),r=en(),i=be(),a=Ur();return Tr.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var o=i(t),s=a(t),c=s.length,l=0,u;c>l;)n.f(e,u=s[l++],o[u]);return e},Tr}var Kr,qr;function Jr(){return qr?Kr:(qr=1,Kr=N()(`document`,`documentElement`),Kr)}var Yr,Xr;function Zr(){if(Xr)return Yr;Xr=1;var e=ht(),t=wt(),n=e(`keys`);return Yr=function(e){return n[e]||(n[e]=t(e))},Yr}var Qr,$r;function ei(){if($r)return Qr;$r=1;var e=en(),t=Gr(),n=Br(),r=Pr(),i=Jr(),a=It(),o=Zr(),s=`>`,c=`<`,l=`prototype`,u=`script`,d=o(`IE_PROTO`),f=function(){},p=function(e){return c+u+s+e+c+`/`+u+s},m=function(e){e.write(p(``)),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){var e=a(`iframe`),t=`java`+u+`:`,n;return e.style.display=`none`,i.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(p(`document.F=Object`)),n.close(),n.F},g,_=function(){try{g=new ActiveXObject(`htmlfile`)}catch{}_=typeof document<`u`?document.domain&&g?m(g):h():m(g);for(var e=n.length;e--;)delete _[l][n[e]];return _()};return r[d]=!0,Qr=Object.create||function(n,r){var i;return n===null?i=_():(f[l]=e(n),i=new f,f[l]=null,i[d]=n),r===void 0?i:t.f(i,r)},Qr}var ti={},ni;function ri(){if(ni)return ti;ni=1;var e=Lr(),t=Br().concat(`length`,`prototype`);return ti.f=Object.getOwnPropertyNames||function(n){return e(n,t)},ti}var ii={},ai,oi;function si(){return oi?ai:(oi=1,ai=v()([].slice),ai)}var ci;function li(){if(ci)return ii;ci=1;var e=x(),t=be(),n=ri().f,r=si(),i=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return n(e)}catch{return r(i)}};return ii.f=function(r){return i&&e(r)===`Window`?a(r):n(t(r))},ii}var ui={},di;function fi(){return di?ui:(di=1,ui.f=Object.getOwnPropertySymbols,ui)}var pi,mi;function hi(){if(mi)return pi;mi=1;var e=on();return pi=function(t,n,r,i){return i&&i.enumerable?t[n]=r:e(t,n,r),t},pi}var gi,_i;function vi(){if(_i)return gi;_i=1;var e=nn();return gi=function(t,n,r){return e.f(t,n,r)},gi}var yi={},bi;function xi(){return bi?yi:(bi=1,yi.f=Dt(),yi)}var Si,Ci;function wi(){if(Ci)return Si;Ci=1;var e=M(),t=xt(),n=xi(),r=nn().f;return Si=function(i){var a=e.Symbol||={};t(a,i)||r(a,i,{value:n.f(i)})},Si}var Ti,Ei;function Di(){if(Ei)return Ti;Ei=1;var e=A(),t=N(),n=Dt(),r=hi();return Ti=function(){var i=t(`Symbol`),a=i&&i.prototype,o=a&&a.valueOf,s=n(`toPrimitive`);a&&!a[s]&&r(a,s,function(t){return e(o,this)},{arity:1})},Ti}var Oi,ki;function Ai(){if(ki)return Oi;ki=1;var e=$n(),t=nr();return Oi=e?{}.toString:function(){return`[object `+t(this)+`]`},Oi}var ji,Mi;function Ni(){if(Mi)return ji;Mi=1;var e=$n(),t=nn().f,n=on(),r=xt(),i=Ai(),a=Dt()(`toStringTag`);return ji=function(o,s,c,l){var u=c?o:o&&o.prototype;u&&(r(u,a)||t(u,a,{configurable:!0,value:s}),l&&!e&&n(u,`toString`,i))},ji}var Pi,Fi;function Ii(){if(Fi)return Pi;Fi=1;var e=o(),t=D(),n=e.WeakMap;return Pi=t(n)&&/native code/.test(String(n)),Pi}var Li,Ri;function zi(){if(Ri)return Li;Ri=1;var e=Ii(),t=o(),n=Ce(),r=on(),i=xt(),a=ft(),s=Zr(),c=Pr(),l=`Object already initialized`,u=t.TypeError,d=t.WeakMap,f,p,m,h=function(e){return m(e)?p(e):f(e,{})},g=function(e){return function(t){var r;if(!n(t)||(r=p(t)).type!==e)throw new u(`Incompatible receiver, `+e+` required`);return r}};if(e||a.state){var _=a.state||=new d;_.get=_.get,_.has=_.has,_.set=_.set,f=function(e,t){if(_.has(e))throw new u(l);return t.facade=e,_.set(e,t),t},p=function(e){return _.get(e)||{}},m=function(e){return _.has(e)}}else{var v=s(`state`);c[v]=!0,f=function(e,t){if(i(e,v))throw new u(l);return t.facade=e,r(e,v,t),t},p=function(e){return i(e,v)?e[v]:{}},m=function(e){return i(e,v)}}return Li={set:f,get:p,has:m,enforce:h,getterFor:g},Li}var Bi,Vi;function Hi(){if(Vi)return Bi;Vi=1;var e=qt(),t=fe(),n=vt(),r=Vn(),i=mr(),a=qn(),o=function(o){var s=o===1,c=o===2,l=o===3,u=o===4,d=o===6,f=o===7,p=o===5||d;return function(m,h,g){for(var _=n(m),v=t(_),y=r(v),b=e(h,g),x=0,S=0,C=s?i(m,y):c||f?i(m,0):void 0,w,T;y>x;x++)if((p||x in v)&&(w=v[x],T=b(w,x,_),o)){if(s)a(C,x,T);else if(T)switch(o){case 3:return!0;case 5:return w;case 6:return x;case 2:a(C,S++,w)}else switch(o){case 4:return!1;case 7:a(C,S++,w)}}return d?-1:l||u?u:C}};return Bi={forEach:o(0),map:o(1),filter:o(2),some:o(3),every:o(4),find:o(5),findIndex:o(6),filterReject:o(7)},Bi}var Ui;function Wi(){if(Ui)return xr;Ui=1;var e=P(),t=o(),n=A(),r=v(),i=st(),a=k(),s=ze(),c=l(),u=xt(),d=Ae(),f=en(),p=be(),m=Nt(),h=wr(),g=le(),_=ei(),y=Ur(),b=ri(),x=li(),S=fi(),C=Vt(),w=nn(),T=Gr(),E=oe(),D=hi(),ee=vi(),te=ht(),O=Zr(),ne=Pr(),re=wt(),ie=Dt(),ae=xi(),se=wi(),ce=Di(),ue=Ni(),de=zi(),fe=Hi().forEach,pe=O(`hidden`),me=`Symbol`,he=`prototype`,ge=de.set,_e=de.getterFor(me),j=Object[he],ve=t.Symbol,ye=ve&&ve[he],xe=t.RangeError,Se=t.TypeError,Ce=t.QObject,we=C.f,Te=w.f,M=x.f,Ee=E.f,De=r([].push),N=te(`symbols`),Oe=te(`op-symbols`),ke=te(`wks`),je=!Ce||!Ce[he]||!Ce[he].findChild,Me=function(e,t,n){var r=we(j,t);return r&&delete j[t],Te(e,t,n),r&&e!==j&&Te(j,t,r),e},Ne=a&&c(function(){return _(Te({},`a`,{get:function(){return Te(this,`a`,{value:7}).a}})).a!==7})?Me:Te,Pe=function(e,t){var n=N[e]=_(ye);return ge(n,{type:me,tag:e,description:t}),a||(n.description=t),n},Fe=function(e,t,n){e===j&&Fe(Oe,t,n),f(e);var r=m(t);return f(n),u(N,r)?((`enumerable`in n?!n.enumerable:!u(e,r)||u(e,pe)&&e[pe][r])?(u(e,pe)||Te(e,pe,g(1,_(null))),e[pe][r]=!0):(u(e,pe)&&e[pe][r]&&(e[pe][r]=!1),n=_(n,{enumerable:g(0,!1)})),Ne(e,r,n)):Te(e,r,n)},Ie=function(e,t){f(e);var r=p(t);return fe(y(r).concat(He(r)),function(t){(!a||n(Re,r,t))&&Fe(e,t,r[t])}),e},Le=function(e,t){return t===void 0?_(e):Ie(_(e),t)},Re=function(e){var t=m(e),r=n(Ee,this,t);return this===j&&u(N,t)&&!u(Oe,t)?!1:r||!u(this,t)||!u(N,t)||u(this,pe)&&this[pe][t]?r:!0},Be=function(e,t){var n=p(e),r=m(t);if(!(n===j&&u(N,r)&&!u(Oe,r))){var i=we(n,r);return i&&u(N,r)&&!(u(n,pe)&&n[pe][r])&&(i.enumerable=!0),i}},Ve=function(e){var t=M(p(e)),n=[];return fe(t,function(e){!u(N,e)&&!u(ne,e)&&De(n,e)}),n},He=function(e){var t=e===j,n=M(t?Oe:p(e)),r=[];return fe(n,function(e){u(N,e)&&(!t||u(j,e))&&De(r,N[e])}),r};return s||(ve=function(){if(d(ye,this))throw new Se(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:h(arguments[0]),r=re(e),i=function(e){var a=this===void 0?t:this;a===j&&n(i,Oe,e),u(a,pe)&&u(a[pe],r)&&(a[pe][r]=!1);var o=g(1,e);try{Ne(a,r,o)}catch(e){if(!(e instanceof xe))throw e;Me(a,r,o)}};return a&&je&&Ne(j,r,{configurable:!0,set:i}),Pe(r,e)},ye=ve[he],D(ye,`toString`,function(){return _e(this).tag}),D(ve,`withoutSetter`,function(e){return Pe(re(e),e)}),E.f=Re,w.f=Fe,T.f=Ie,C.f=Be,b.f=x.f=Ve,S.f=He,ae.f=function(e){return Pe(ie(e),e)},a&&(ee(ye,`description`,{configurable:!0,get:function(){return _e(this).description}}),i||D(j,`propertyIsEnumerable`,Re,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!s,sham:!s},{Symbol:ve}),fe(y(ke),function(e){se(e)}),e({target:me,stat:!0,forced:!s},{useSetter:function(){je=!0},useSimple:function(){je=!1}}),e({target:`Object`,stat:!0,forced:!s,sham:!a},{create:Le,defineProperty:Fe,defineProperties:Ie,getOwnPropertyDescriptor:Be}),e({target:`Object`,stat:!0,forced:!s},{getOwnPropertyNames:Ve}),ce(),ue(ve,me),ne[pe]=!0,xr}var Gi={},Ki,qi;function Ji(){return qi?Ki:(qi=1,Ki=ze()&&!!Symbol.for&&!!Symbol.keyFor,Ki)}var Yi;function Xi(){if(Yi)return Gi;Yi=1;var e=P(),t=N(),n=xt(),r=wr(),i=ht(),a=Ji(),o=i(`string-to-symbol-registry`),s=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{for:function(e){var i=r(e);if(n(o,i))return o[i];var a=t(`Symbol`)(i);return o[i]=a,s[a]=i,a}}),Gi}var Zi={},Qi;function $i(){if(Qi)return Zi;Qi=1;var e=P(),t=xt(),n=Ge(),r=Je(),i=ht(),a=Ji(),o=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{keyFor:function(e){if(!n(e))throw TypeError(r(e)+` is not a symbol`);if(t(o,e))return o[e]}}),Zi}var ea={},ta,na;function ra(){if(na)return ta;na=1;var e=Ce(),t=zi().get;return ta=function(n){if(!e(n))return!1;var r=t(n);return!!r&&r.type===`RawJSON`},ta}var ia,aa;function oa(){if(aa)return ia;aa=1;var e=v(),t=xt(),n=SyntaxError,r=parseInt,i=String.fromCharCode,a=e(``.charAt),o=e(``.slice),s=e(/./.exec),c={'\\"':`"`,"\\\\":`\\`,"\\/":`/`,"\\b":`\b`,"\\f":`\f`,"\\n":`
2
+ `,"\\r":`\r`,"\\t":` `},l=/^[\da-f]{4}$/i,u=/^[\u0000-\u001F]$/;return ia=function(e,d){for(var f=!0,p=``;d<e.length;){var m=a(e,d);if(m===`\\`){var h=o(e,d,d+2);if(t(c,h))p+=c[h],d+=2;else if(h===`\\u`){d+=2;var g=o(e,d,d+4);if(!s(l,g))throw new n(`Bad Unicode escape at: `+d);p+=i(r(g,16)),d+=4}else throw new n(`Unknown escape sequence: "`+h+`"`)}else if(m===`"`){f=!1,d++;break}else{if(s(u,m))throw new n(`Bad control character in string literal at: `+d);p+=m,d++}}if(f)throw new n(`Unterminated string at: `+d);return{value:p,end:d}},ia}var sa,ca;function la(){return ca?sa:(ca=1,sa=!l()(function(){var e=`9007199254740993`,t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e}),sa)}var ua;function da(){if(ua)return ea;ua=1;var e=P(),t=N(),n=h(),r=A(),i=v(),a=l(),o=kn(),s=D(),c=ra(),u=Ge(),d=x(),f=wr(),p=si(),m=oa(),g=wt(),_=ze(),y=la(),b=String,S=t(`JSON`,`stringify`),C=i(/./.exec),w=i(``.charAt),T=i(``.charCodeAt),E=i(``.replace),ee=i(``.slice),te=i([].push),O=i(1.1.toString),k=/[\uD800-\uDFFF]/g,ne=/^[\uD800-\uDBFF]$/,re=/^[\uDC00-\uDFFF]$/,ie=g(),ae=ie.length,oe=!_||a(function(){var e=t(`Symbol`)(`stringify detection`);return S([e])!==`[null]`||S({a:e})!==`{}`||S(Object(e))!==`{}`}),se=a(function(){return S(`\udf06\ud834`)!==`"\\udf06\\ud834"`||S(`\udead`)!==`"\\udead"`}),ce=oe?function(e,t){var i=p(arguments),a=ue(t);if(!(!s(a)&&(e===void 0||u(e))))return i[1]=function(e,t){if(s(a)&&(t=r(a,this,b(e),t)),!u(t))return t},n(S,null,i)}:S,le=function(e,t,n){var r=w(n,t-1),i=w(n,t+1);return C(ne,e)&&!C(re,i)||C(re,e)&&!C(ne,r)?`\\u`+O(T(e,0),16):e},ue=function(e){if(s(e))return e;if(o(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i==`string`?te(n,i):(typeof i==`number`||d(i)===`Number`||d(i)===`String`)&&te(n,f(i))}var a=n.length,c=!0;return function(e,t){if(c)return c=!1,t;if(o(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}};return S&&e({target:`JSON`,stat:!0,arity:3,forced:oe||se||!y},{stringify:function(e,t,n){var i=ue(t),a=[],o=ce(e,function(e,t){var n=s(i)?r(i,this,b(e),t):t;return!y&&c(n)?ie+(te(a,n.rawJSON)-1):n},n);if(typeof o!=`string`||(se&&(o=E(o,k,le)),y))return o;for(var l=``,u=o.length,d=0;d<u;d++){var f=w(o,d);if(f===`"`){var p=m(o,++d).end-1,h=ee(o,d,p);l+=ee(h,0,ae)===ie?a[ee(h,ae)]:`"`+h+`"`,d=p}else l+=f}return l}}),ea}var fa={},pa;function ma(){if(pa)return fa;pa=1;var e=P(),t=ze(),n=l(),r=fi(),i=vt();return e({target:`Object`,stat:!0,forced:!t||n(function(){r.f(1)})},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(i(e)):[]}}),fa}var ha;function ga(){return ha?br:(ha=1,Wi(),Xi(),$i(),da(),ma(),br)}var _a={},va;function ya(){return va?_a:(va=1,wi()(`asyncDispose`),_a)}var ba={},xa;function Sa(){return xa?ba:(xa=1,wi()(`asyncIterator`),ba)}var Ca={},wa;function Ta(){return wa?Ca:(wa=1,wi()(`dispose`),Ca)}var Ea={},Da;function Oa(){return Da?Ea:(Da=1,wi()(`hasInstance`),Ea)}var ka={},Aa;function ja(){return Aa?ka:(Aa=1,wi()(`isConcatSpreadable`),ka)}var Ma={},Na;function Pa(){return Na?Ma:(Na=1,wi()(`iterator`),Ma)}var Fa={},Ia;function La(){return Ia?Fa:(Ia=1,wi()(`match`),Fa)}var Ra={},za;function Ba(){return za?Ra:(za=1,wi()(`matchAll`),Ra)}var Va={},Ha;function Ua(){return Ha?Va:(Ha=1,wi()(`replace`),Va)}var Wa={},Ga;function Ka(){return Ga?Wa:(Ga=1,wi()(`search`),Wa)}var qa={},Ja;function Ya(){return Ja?qa:(Ja=1,wi()(`species`),qa)}var Xa={},Za;function Qa(){return Za?Xa:(Za=1,wi()(`split`),Xa)}var $a={},eo;function to(){if(eo)return $a;eo=1;var e=wi(),t=Di();return e(`toPrimitive`),t(),$a}var no={},ro;function io(){if(ro)return no;ro=1;var e=N(),t=wi(),n=Ni();return t(`toStringTag`),n(e(`Symbol`),`Symbol`),no}var ao={},oo;function so(){return oo?ao:(oo=1,wi()(`unscopables`),ao)}var co={},lo;function uo(){return lo?co:(lo=1,Ni()(o().JSON,`JSON`,!0),co)}var fo,po;function mo(){return po?fo:(po=1,yr(),ga(),ya(),Sa(),Ta(),Oa(),ja(),Pa(),La(),Ba(),Ua(),Ka(),Ya(),Qa(),to(),io(),so(),uo(),fo=M().Symbol,fo)}var ho={},go,_o;function vo(){return _o?go:(_o=1,go=function(){},go)}var yo,bo;function xo(){return bo?yo:(bo=1,yo={},yo)}var So,Co;function wo(){if(Co)return So;Co=1;var e=k(),t=xt(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,i=t(n,`name`);return So={EXISTS:i,PROPER:i&&function(){}.name===`something`,CONFIGURABLE:i&&(!e||e&&r(n,`name`).configurable)},So}var To,Eo;function Do(){return Eo?To:(Eo=1,To=!l()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),To)}var Oo,ko;function Ao(){if(ko)return Oo;ko=1;var e=xt(),t=D(),n=vt(),r=Zr(),i=Do(),a=r(`IE_PROTO`),o=Object,s=o.prototype;return Oo=i?o.getPrototypeOf:function(r){var i=n(r);if(e(i,a))return i[a];var c=i.constructor;return t(c)&&i instanceof c?c.prototype:i instanceof o?s:null},Oo}var jo,Mo;function No(){if(Mo)return jo;Mo=1;var e=l(),t=D(),n=Ce(),r=ei(),i=Ao(),a=hi(),o=Dt(),s=st(),c=o(`iterator`),u=!1,d,f,p;return[].keys&&(p=[].keys(),`next`in p?(f=i(i(p)),f!==Object.prototype&&(d=f)):u=!0),!n(d)||e(function(){var e={};return d[c].call(e)!==e})?d={}:s&&(d=r(d)),t(d[c])||a(d,c,function(){return this}),jo={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:u},jo}var Po,Fo;function Io(){if(Fo)return Po;Fo=1;var e=No().IteratorPrototype,t=ei(),n=le(),r=Ni(),i=xo(),a=function(){return this};return Po=function(o,s,c,l){var u=s+` Iterator`;return o.prototype=t(e,{next:n(+!l,c)}),r(o,u,!1,!0),i[u]=a,o},Po}var Lo,Ro;function zo(){if(Ro)return Lo;Ro=1;var e=v(),t=Ze();return Lo=function(n,r,i){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[i]))}catch{}},Lo}var Bo,Vo;function Ho(){if(Vo)return Bo;Vo=1;var e=Ce();return Bo=function(t){return e(t)||t===null},Bo}var Uo,Wo;function Go(){if(Wo)return Uo;Wo=1;var e=Ho(),t=String,n=TypeError;return Uo=function(r){if(e(r))return r;throw new n(`Can't set `+t(r)+` as a prototype`)},Uo}var Ko,qo;function Jo(){if(qo)return Ko;qo=1;var e=zo(),t=Ce(),n=j(),r=Go();return Ko=Object.setPrototypeOf||(`__proto__`in{}?function(){var i=!1,a={},o;try{o=e(Object.prototype,`__proto__`,`set`),o(a,[]),i=a instanceof Array}catch{}return function(e,a){return n(e),r(a),t(e)&&(i?o(e,a):e.__proto__=a),e}}():void 0),Ko}var Yo,Xo;function Zo(){if(Xo)return Yo;Xo=1;var e=P(),t=A(),n=st(),r=wo(),i=D(),a=Io(),o=Ao(),s=Jo(),c=Ni(),l=on(),u=hi(),d=Dt(),f=xo(),p=No(),m=r.PROPER,h=r.CONFIGURABLE,g=p.IteratorPrototype,_=p.BUGGY_SAFARI_ITERATORS,v=d(`iterator`),y=`keys`,b=`values`,x=`entries`,S=function(){return this};return Yo=function(r,d,p,C,w,T,E){a(p,d,C);var D=function(e){if(e===w&&ne)return ne;if(!_&&e&&e in O)return O[e];switch(e){case y:return function(){return new p(this,e)};case b:return function(){return new p(this,e)};case x:return function(){return new p(this,e)}}return function(){return new p(this)}},ee=d+` Iterator`,te=!1,O=r.prototype,k=O[v]||O[`@@iterator`]||w&&O[w],ne=!_&&k||D(w),re=d===`Array`&&O.entries||k,A,ie,ae;if(re&&(A=o(re.call(new r)),A!==Object.prototype&&A.next&&(!n&&o(A)!==g&&(s?s(A,g):i(A[v])||u(A,v,S)),c(A,ee,!0,!0),n&&(f[ee]=S))),m&&w===b&&k&&k.name!==b&&(!n&&h?l(O,`name`,b):(te=!0,ne=function(){return t(k,this)})),w){if(ie={values:D(b),keys:T?ne:D(y),entries:D(x)},E)for(ae in ie)(_||te||!(ae in O))&&u(O,ae,ie[ae]);else e({target:d,proto:!0,forced:_||te},ie)}return(!n||E)&&O[v]!==ne&&u(O,v,ne,{name:w}),f[d]=ne,ie},Yo}var Qo,$o;function es(){return $o?Qo:($o=1,Qo=function(e,t){return{value:e,done:t}},Qo)}var ts,ns;function rs(){if(ns)return ts;ns=1;var e=be(),t=vo(),n=xo(),r=zi(),i=nn().f,a=Zo(),o=es(),s=st(),c=k(),l=`Array Iterator`,u=r.set,d=r.getterFor(l);ts=a(Array,`Array`,function(t,n){u(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,o(void 0,!0);switch(e.kind){case`keys`:return o(n,!1);case`values`:return o(t[n],!1)}return o([n,t[n]],!1)},`values`);var f=n.Arguments=n.Array;if(t(`keys`),t(`values`),t(`entries`),!s&&c&&f.name!==`values`)try{i(f,`name`,{value:`values`})}catch{}return ts}var is,as;function os(){return as?is:(as=1,is={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},is)}var ss;function cs(){if(ss)return ho;ss=1,rs();var e=os(),t=o(),n=Ni(),r=xo();for(var i in e)n(t[i],i),r[i]=r.Array;return ho}var ls,us;function ds(){if(us)return ls;us=1;var e=mo();return cs(),ls=e,ls}var fs={},ps;function ms(){if(ps)return fs;ps=1;var e=Dt(),t=nn().f,n=e(`metadata`),r=Function.prototype;return r[n]===void 0&&t(r,n,{value:null}),fs}var hs={},gs;function _s(){return gs?hs:(gs=1,ya(),hs)}var vs={},ys;function bs(){return ys?vs:(ys=1,Ta(),vs)}var xs={},Ss;function Cs(){return Ss?xs:(Ss=1,wi()(`metadata`),xs)}var ws,Ts;function Es(){if(Ts)return ws;Ts=1;var e=ds();return ms(),_s(),bs(),Cs(),ws=e,ws}var Ds={},Os,ks;function As(){if(ks)return Os;ks=1;var e=N(),t=v(),n=e(`Symbol`),r=n.keyFor,i=t(n.prototype.valueOf);return Os=n.isRegisteredSymbol||function(e){try{return r(i(e))!==void 0}catch{return!1}},Os}var js;function Ms(){return js?Ds:(js=1,P()({target:`Symbol`,stat:!0},{isRegisteredSymbol:As()}),Ds)}var Ns={},Ps,Fs;function Is(){if(Fs)return Ps;Fs=1;for(var e=ht(),t=N(),n=v(),r=Ge(),i=Dt(),a=t(`Symbol`),o=a.isWellKnownSymbol,s=t(`Object`,`getOwnPropertyNames`),c=n(a.prototype.valueOf),l=e(`wks`),u=0,d=s(a),f=d.length;u<f;u++)try{var p=d[u];r(a[p])&&i(p)}catch{}return Ps=function(e){if(o&&o(e))return!0;try{for(var t=c(e),n=0,r=s(l),i=r.length;n<i;n++)if(l[r[n]]==t)return!0}catch{}return!1},Ps}var Ls;function Rs(){return Ls?Ns:(Ls=1,P()({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:Is()}),Ns)}var zs={},Bs;function Vs(){return Bs?zs:(Bs=1,wi()(`customMatcher`),zs)}var Hs={},Us;function Ws(){return Us?Hs:(Us=1,wi()(`observable`),Hs)}var Gs={},Ks;function qs(){return Ks?Gs:(Ks=1,P()({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:As()}),Gs)}var Js={},Ys;function Xs(){return Ys?Js:(Ys=1,P()({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:Is()}),Js)}var Zs={},Qs;function $s(){return Qs?Zs:(Qs=1,wi()(`matcher`),Zs)}var ec={},tc;function nc(){return tc?ec:(tc=1,wi()(`metadataKey`),ec)}var rc={},ic;function ac(){return ic?rc:(ic=1,wi()(`patternMatch`),rc)}var oc={},sc;function cc(){return sc?oc:(sc=1,wi()(`replaceAll`),oc)}var lc,uc;function dc(){if(uc)return lc;uc=1;var e=Es();return Ms(),Rs(),Vs(),Ws(),qs(),Xs(),$s(),nc(),ac(),cc(),lc=e,lc}var fc,pc;function mc(){return pc?fc:(pc=1,fc=dc(),fc)}var hc=t(mc()),gc={},_c,vc;function yc(){if(vc)return _c;vc=1;var e=v(),t=Fn(),n=wr(),r=j(),i=e(``.charAt),a=e(``.charCodeAt),o=e(``.slice),s=function(e){return function(s,c){var l=n(r(s)),u=t(c),d=l.length,f,p;return u<0||u>=d?e?``:void 0:(f=a(l,u),f<55296||f>56319||u+1===d||(p=a(l,u+1))<56320||p>57343?e?i(l,u):f:e?o(l,u,u+2):(f-55296<<10)+(p-56320)+65536)}};return _c={codeAt:s(!1),charAt:s(!0)},_c}var bc;function xc(){if(bc)return gc;bc=1;var e=yc().charAt,t=wr(),n=zi(),r=Zo(),i=es(),a=`String Iterator`,o=n.set,s=n.getterFor(a);return r(String,`String`,function(e){o(this,{type:a,string:t(e),index:0})},function(){var t=s(this),n=t.string,r=t.index,a;return r>=n.length?i(void 0,!0):(a=e(n,r),t.index+=a.length,i(a,!1))}),gc}var Sc,Cc;function wc(){return Cc?Sc:(Cc=1,rs(),xc(),Pa(),Sc=xi().f(`iterator`),Sc)}var Tc,Ec;function Dc(){if(Ec)return Tc;Ec=1;var e=wc();return cs(),Tc=e,Tc}var Oc,kc;function Ac(){return kc?Oc:(kc=1,Oc=Dc(),Oc)}var jc,Mc;function Nc(){return Mc?jc:(Mc=1,jc=Ac(),jc)}var Pc,Fc;function Ic(){return Fc?Pc:(Fc=1,Pc=Nc(),Pc)}var Lc=t(Ic());function Rc(e){"@babel/helpers - typeof";return Rc=typeof hc==`function`&&typeof Lc==`symbol`?function(e){return typeof e}:function(e){return e&&typeof hc==`function`&&e.constructor===hc&&e!==hc.prototype?`symbol`:typeof e},Rc(e)}var zc,Bc;function Vc(){return Bc?zc:(Bc=1,to(),zc=xi().f(`toPrimitive`),zc)}var Hc,Uc;function Wc(){return Uc?Hc:(Uc=1,Hc=Vc(),Hc)}var Gc,Kc;function qc(){return Kc?Gc:(Kc=1,Gc=Wc(),Gc)}var Jc,Yc;function Xc(){return Yc?Jc:(Yc=1,Jc=qc(),Jc)}var Zc,Qc;function $c(){return Qc?Zc:(Qc=1,Zc=Xc(),Zc)}var el=t($c());function tl(e,t){if(Rc(e)!=`object`||!e)return e;var n=e[el];if(n!==void 0){var r=n.call(e,t);if(Rc(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function nl(e){var t=tl(e,`string`);return Rc(t)==`symbol`?t:t+``}function rl(e,t,n){return(t=nl(t))in e?Tn(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var il={},al,ol;function sl(){if(ol)return al;ol=1;var e=v(),t=Ze(),n=Ce(),r=xt(),i=si(),a=f(),o=Function,s=e([].concat),c=e([].join),l={},u=function(e,t,n){if(!r(l,t)){for(var i=[],a=0;a<t;a++)i[a]=`a[`+a+`]`;l[t]=o(`C,a`,`return new C(`+c(i,`,`)+`)`)}return l[t](e,n)};return al=a?o.bind:function(e){var r=t(this),a=r.prototype,o=i(arguments,1),c=function(){var t=s(o,i(arguments));return this instanceof c?u(r,t.length,t):r.apply(e,t)};return n(a)&&(c.prototype=a),c},al}var cl;function ll(){if(cl)return il;cl=1;var e=P(),t=sl();return e({target:`Function`,proto:!0,forced:Function.bind!==t},{bind:t}),il}var ul,dl;function fl(){if(dl)return ul;dl=1;var e=o(),t=M();return ul=function(n,r){var i=t[n+`Prototype`],a=i&&i[r];if(a)return a;var o=e[n],s=o&&o.prototype;return s&&s[r]},ul}var pl,ml;function hl(){return ml?pl:(ml=1,ll(),pl=fl()(`Function`,`bind`),pl)}var gl,_l;function vl(){if(_l)return gl;_l=1;var e=Ae(),t=hl(),n=Function.prototype;return gl=function(r){var i=r.bind;return r===n||e(n,r)&&i===n.bind?t:i},gl}var yl,bl;function xl(){return bl?yl:(bl=1,yl=vl(),yl)}var Sl,Cl;function wl(){return Cl?Sl:(Cl=1,Sl=xl(),Sl)}var Tl=t(wl()),El={},Dl,Ol;function kl(){if(Ol)return Dl;Ol=1;var e=Ze(),t=vt(),n=fe(),r=Vn(),i=TypeError,a=`Reduce of empty array with no initial value`,o=function(o){return function(s,c,l,u){var d=t(s),f=n(d),p=r(d);if(e(c),p===0&&l<2)throw new i(a);var m=o?p-1:0,h=o?-1:1;if(l<2)for(;;){if(m in f){u=f[m],m+=h;break}if(m+=h,o?m<0:p<=m)throw new i(a)}for(;o?m>=0:p>m;m+=h)m in f&&(u=c(u,f[m],m,d));return u}};return Dl={left:o(!1),right:o(!0)},Dl}var Al,jl;function Ml(){if(jl)return Al;jl=1;var e=l();return Al=function(t,n){var r=[][t];return!!r&&e(function(){r.call(null,n||function(){return 1},1)})},Al}var Nl,Pl;function Fl(){if(Pl)return Nl;Pl=1;var e=o(),t=Ne(),n=x(),r=function(e){return t.slice(0,e.length)===e};return Nl=(function(){return r(`Bun/`)?`BUN`:r(`Cloudflare-Workers`)?`CLOUDFLARE`:r(`Deno/`)?`DENO`:r(`Node.js/`)?`NODE`:e.Bun&&typeof Bun.version==`string`?`BUN`:e.Deno&&typeof Deno.version==`object`?`DENO`:n(e.process)===`process`?`NODE`:e.window&&e.document?`BROWSER`:`REST`})(),Nl}var Il,Ll;function Rl(){return Ll?Il:(Ll=1,Il=Fl()===`NODE`,Il)}var zl;function Bl(){if(zl)return El;zl=1;var e=P(),t=kl().left,n=Ml(),r=Ie();return e({target:`Array`,proto:!0,forced:!Rl()&&r>79&&r<83||!n(`reduce`)},{reduce:function(e){var n=arguments.length;return t(this,e,n,n>1?arguments[1]:void 0)}}),El}var Vl,Hl;function Ul(){return Hl?Vl:(Hl=1,Bl(),Vl=fl()(`Array`,`reduce`),Vl)}var Wl,Gl;function Kl(){if(Gl)return Wl;Gl=1;var e=Ae(),t=Ul(),n=Array.prototype;return Wl=function(r){var i=r.reduce;return r===n||e(n,r)&&i===n.reduce?t:i},Wl}var ql,Jl;function Yl(){return Jl?ql:(Jl=1,ql=Kl(),ql)}var Xl,Zl;function Ql(){return Zl?Xl:(Zl=1,Xl=Yl(),Xl)}var $l=t(Ql()),eu={},tu;function nu(){if(tu)return eu;tu=1;var e=P(),t=Hi().filter;return e({target:`Array`,proto:!0,forced:!_r()(`filter`)},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),eu}var ru,iu;function au(){return iu?ru:(iu=1,nu(),ru=fl()(`Array`,`filter`),ru)}var ou,su;function cu(){if(su)return ou;su=1;var e=Ae(),t=au(),n=Array.prototype;return ou=function(r){var i=r.filter;return r===n||e(n,r)&&i===n.filter?t:i},ou}var lu,uu;function du(){return uu?lu:(uu=1,lu=cu(),lu)}var fu,pu;function mu(){return pu?fu:(pu=1,fu=du(),fu)}var hu=t(mu()),gu={},_u;function vu(){if(_u)return gu;_u=1;var e=P(),t=Hi().map;return e({target:`Array`,proto:!0,forced:!_r()(`map`)},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),gu}var yu,bu;function xu(){return bu?yu:(bu=1,vu(),yu=fl()(`Array`,`map`),yu)}var Su,Cu;function wu(){if(Cu)return Su;Cu=1;var e=Ae(),t=xu(),n=Array.prototype;return Su=function(r){var i=r.map;return r===n||e(n,r)&&i===n.map?t:i},Su}var Tu,Eu;function Du(){return Eu?Tu:(Eu=1,Tu=wu(),Tu)}var Ou,ku;function Au(){return ku?Ou:(ku=1,Ou=Du(),Ou)}var ju=t(Au()),Mu={},Nu,Pu;function Fu(){if(Pu)return Nu;Pu=1;var e=kn(),t=Vn(),n=Wn(),r=qt(),i=qn(),a=function(o,s,c,l,u,d,f,p){for(var m=u,h=0,g=f?r(f,p):!1,_,v;h<l;)h in c&&(_=g?g(c[h],h,s):c[h],d>0&&e(_)?(v=t(_),m=a(o,s,_,v,m,d-1)-1):(n(m+1),i(o,m,_)),m++),h++;return m};return Nu=a,Nu}var Iu;function Lu(){if(Iu)return Mu;Iu=1;var e=P(),t=Fu(),n=Ze(),r=vt(),i=Vn(),a=mr();return e({target:`Array`,proto:!0},{flatMap:function(e){var o=r(this),s=i(o),c;return n(e),c=a(o,0),t(c,o,o,s,0,1,e,arguments.length>1?arguments[1]:void 0),c}}),Mu}var Ru={},zu;function Bu(){return zu?Ru:(zu=1,vo()(`flatMap`),Ru)}var Vu,Hu;function Uu(){return Hu?Vu:(Hu=1,Lu(),Bu(),Vu=fl()(`Array`,`flatMap`),Vu)}var Wu,Gu;function Ku(){if(Gu)return Wu;Gu=1;var e=Ae(),t=Uu(),n=Array.prototype;return Wu=function(r){var i=r.flatMap;return r===n||e(n,r)&&i===n.flatMap?t:i},Wu}var qu,Ju;function Yu(){return Ju?qu:(Ju=1,qu=Ku(),qu)}var Xu,Zu;function Qu(){return Zu?Xu:(Zu=1,Xu=Yu(),Xu)}Qu();var $u={},ed;function td(){return ed?$u:(ed=1,P()({target:`Array`,stat:!0},{isArray:kn()}),$u)}var nd,rd;function id(){return rd?nd:(rd=1,td(),nd=M().Array.isArray,nd)}var ad,od;function sd(){return od?ad:(od=1,ad=id(),ad)}var cd,ld;function ud(){return ld?cd:(ld=1,cd=sd(),cd)}var dd,fd;function pd(){return fd?dd:(fd=1,dd=ud(),dd)}var md,hd;function gd(){return hd?md:(hd=1,md=pd(),md)}var _d=t(gd());function vd(e){if(_d(e))return e}var yd,bd;function xd(){if(bd)return yd;bd=1;var e=nr(),t=et(),n=he(),r=xo(),i=Dt()(`iterator`);return yd=function(a){if(!n(a))return t(a,i)||t(a,`@@iterator`)||r[e(a)]},yd}var Sd,Cd;function wd(){return Cd?Sd:(Cd=1,rs(),xc(),Sd=xd(),Sd)}var Td,Ed;function Dd(){if(Ed)return Td;Ed=1;var e=wd();return cs(),Td=e,Td}var Od,kd;function Ad(){return kd?Od:(kd=1,Od=Dd(),Od)}var jd,Md;function Nd(){return Md?jd:(Md=1,jd=Ad(),jd)}var Pd,Fd;function Id(){return Fd?Pd:(Fd=1,Pd=Nd(),Pd)}var Ld=t(Id()),Rd={},zd;function Bd(){if(zd)return Rd;zd=1;var e=P(),t=vt(),n=Vn(),r=Xn(),i=Wn();return e({target:`Array`,proto:!0,arity:1,forced:l()(function(){return[].push.call({length:4294967296},1)!==4294967297})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var a=t(this),o=n(a),s=arguments.length;i(o+s);for(var c=0;c<s;c++)a[o]=arguments[c],o++;return r(a,o),o}}),Rd}var Vd,Hd;function Ud(){return Hd?Vd:(Hd=1,Bd(),Vd=fl()(`Array`,`push`),Vd)}var Wd,Gd;function Kd(){if(Gd)return Wd;Gd=1;var e=Ae(),t=Ud(),n=Array.prototype;return Wd=function(r){var i=r.push;return r===n||e(n,r)&&i===n.push?t:i},Wd}var qd,Jd;function Yd(){return Jd?qd:(Jd=1,qd=Kd(),qd)}var Xd,Zd;function Qd(){return Zd?Xd:(Zd=1,Xd=Yd(),Xd)}var $d,ef;function tf(){return ef?$d:(ef=1,$d=Qd(),$d)}var nf,rf;function af(){return rf?nf:(rf=1,nf=tf(),nf)}var of=t(af());function sf(e,t){var n=e==null?null:hc!==void 0&&Ld(e)||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(of(s).call(s,r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var cf={},lf;function uf(){if(lf)return cf;lf=1;var e=P(),t=kn(),n=cr(),r=Ce(),i=Or(),a=Vn(),o=be(),s=qn(),c=Xn(),l=Dt(),u=_r(),d=si(),f=u(`slice`),p=l(`species`),m=Array,h=Math.max;return e({target:`Array`,proto:!0,forced:!f},{slice:function(e,l){var u=o(this),f=a(u),g=i(e,f),_=i(l===void 0?f:l,f),v,y,b;if(t(u)&&(v=u.constructor,n(v)&&(v===m||t(v.prototype))?v=void 0:r(v)&&(v=v[p],v===null&&(v=void 0)),v===m||v===void 0))return d(u,g,_);for(y=new(v===void 0?m:v)(h(_-g,0)),b=0;g<_;g++,b++)g in u&&s(y,b,u[g]);return c(y,b),y}}),cf}var df,ff;function pf(){return ff?df:(ff=1,uf(),df=fl()(`Array`,`slice`),df)}var mf,hf;function gf(){if(hf)return mf;hf=1;var e=Ae(),t=pf(),n=Array.prototype;return mf=function(r){var i=r.slice;return r===n||e(n,r)&&i===n.slice?t:i},mf}var _f,vf;function yf(){return vf?_f:(vf=1,_f=gf(),_f)}var bf,xf;function Sf(){return xf?bf:(xf=1,bf=yf(),bf)}var Cf,wf;function Tf(){return wf?Cf:(wf=1,Cf=Sf(),Cf)}var Ef,Df;function Of(){return Df?Ef:(Df=1,Ef=Tf(),Ef)}var kf=t(Of()),Af={},jf,Mf;function Nf(){if(Mf)return jf;Mf=1;var e=A(),t=en(),n=et();return jf=function(r,i,a){var o,s;t(r);try{if(o=n(r,`return`),!o){if(i===`throw`)throw a;return a}o=e(o,r)}catch(e){s=!0,o=e}if(i===`throw`)throw a;if(s)throw o;return t(o),a},jf}var Pf,Ff;function If(){if(Ff)return Pf;Ff=1;var e=en(),t=Nf();return Pf=function(n,r,i,a){try{return a?r(e(i)[0],i[1]):r(i)}catch(e){t(n,`throw`,e)}},Pf}var Lf,Rf;function zf(){if(Rf)return Lf;Rf=1;var e=Dt(),t=xo(),n=e(`iterator`),r=Array.prototype;return Lf=function(e){return e!==void 0&&(t.Array===e||r[n]===e)},Lf}var Bf,Vf;function Hf(){if(Vf)return Bf;Vf=1;var e=A(),t=Ze(),n=en(),r=Je(),i=xd(),a=TypeError;return Bf=function(o,s){var c=arguments.length<2?i(o):s;if(t(c))return n(e(c,o));throw new a(r(o)+` is not iterable`)},Bf}var Uf,Wf;function Gf(){if(Wf)return Uf;Wf=1;var e=qt(),t=A(),n=vt(),r=If(),i=zf(),a=cr(),o=Vn(),s=qn(),c=Xn(),l=Hf(),u=xd(),d=Nf(),f=Array;return Uf=function(p){var m=a(this),h=arguments.length,g=h>1?arguments[1]:void 0,_=g!==void 0;_&&(g=e(g,h>2?arguments[2]:void 0));var v=n(p),y=u(v),b=0,x,S,C,w,T,E;if(y&&!(this===f&&i(y)))for(S=m?new this:[],w=l(v,y),T=w.next;!(C=t(T,w)).done;b++){E=_?r(w,g,[C.value,b],!0):C.value;try{s(S,b,E)}catch(e){d(w,`throw`,e)}}else for(x=o(v),S=m?new this(x):f(x);x>b;b++)E=_?g(v[b],b):v[b],s(S,b,E);return c(S,b),S},Uf}var Kf,qf;function Jf(){if(qf)return Kf;qf=1;var e=Dt()(`iterator`),t=!1;try{var n=0,r={next:function(){return{done:!!n++}},return:function(){t=!0}};r[e]=function(){return this},Array.from(r,function(){throw 2})}catch{}return Kf=function(n,r){try{if(!r&&!t)return!1}catch{return!1}var i=!1;try{var a={};a[e]=function(){return{next:function(){return{done:i=!0}}}},n(a)}catch{}return i},Kf}var Yf;function Xf(){if(Yf)return Af;Yf=1;var e=P(),t=Gf();return e({target:`Array`,stat:!0,forced:!Jf()(function(e){Array.from(e)})},{from:t}),Af}var Zf,Qf;function $f(){return Qf?Zf:(Qf=1,xc(),Xf(),Zf=M().Array.from,Zf)}var ep,tp;function np(){return tp?ep:(tp=1,ep=$f(),ep)}var rp,ip;function ap(){return ip?rp:(ip=1,rp=np(),rp)}var op,sp;function cp(){return sp?op:(sp=1,op=ap(),op)}var lp,up;function dp(){return up?lp:(up=1,lp=cp(),lp)}var fp=t(dp());function pp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mp(e,t){if(e){var n;if(typeof e==`string`)return pp(e,t);var r=kf(n={}.toString.call(e)).call(n,8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?fp(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pp(e,t):void 0}}function hp(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gp(e,t){return vd(e)||sf(e,t)||mp(e,t)||hp()}var _p,vp;function yp(){return vp?_p:(vp=1,_p=ds(),_p)}var bp=t(yp()),xp,Sp;function Cp(){return Sp?xp:(Sp=1,xp=yf(),xp)}var wp=t(Cp()),Tp={},Ep,Dp;function Op(){if(Dp)return Ep;Dp=1;var e=N(),t=v(),n=ri(),r=fi(),i=en(),a=t([].concat);return Ep=e(`Reflect`,`ownKeys`)||function(e){var t=n.f(i(e)),o=r.f;return o?a(t,o(e)):t},Ep}var kp;function Ap(){return kp?Tp:(kp=1,P()({target:`Reflect`,stat:!0},{ownKeys:Op()}),Tp)}var jp,Mp;function Np(){return Mp?jp:(Mp=1,Ap(),jp=M().Reflect.ownKeys,jp)}var Pp,Fp;function Ip(){return Fp?Pp:(Fp=1,Pp=Np(),Pp)}var Lp,Rp;function zp(){return Rp?Lp:(Rp=1,Lp=Ip(),Lp)}var Bp=t(zp()),Vp,Hp;function Up(){return Hp?Vp:(Hp=1,Vp=sd(),Vp)}var Wp=t(Up()),Gp={},Kp;function qp(){if(Kp)return Gp;Kp=1;var e=P(),t=vt(),n=Ur();return e({target:`Object`,stat:!0,forced:l()(function(){n(1)})},{keys:function(e){return n(t(e))}}),Gp}var Jp,Yp;function Xp(){return Yp?Jp:(Yp=1,qp(),Jp=M().Object.keys,Jp)}var Zp,Qp;function $p(){return Qp?Zp:(Qp=1,Zp=Xp(),Zp)}var em,tm;function nm(){return tm?em:(tm=1,em=$p(),em)}var rm=t(nm()),im={},am,om;function sm(){if(om)return am;om=1;var e=Hi().forEach;return am=Ml()(`forEach`)?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},am}var cm;function lm(){if(cm)return im;cm=1;var e=P(),t=sm();return e({target:`Array`,proto:!0,forced:[].forEach!==t},{forEach:t}),im}var um,dm;function fm(){return dm?um:(dm=1,lm(),um=fl()(`Array`,`forEach`),um)}var pm,mm;function hm(){return mm?pm:(mm=1,pm=fm(),pm)}var gm,_m;function vm(){if(_m)return gm;_m=1;var e=nr(),t=xt(),n=Ae(),r=hm(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return gm=function(o){var s=o.forEach;return o===i||n(i,o)&&s===i.forEach||t(a,e(o))?r:s},gm}var ym,bm;function xm(){return bm?ym:(bm=1,ym=vm(),ym)}var Sm=t(xm()),Cm={},wm;function Tm(){if(wm)return Cm;wm=1;var e=P(),t=v(),n=kn(),r=t([].reverse),i=[1,2];return e({target:`Array`,proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return n(this)&&(this.length=this.length),r(this)}}),Cm}var Em,Dm;function Om(){return Dm?Em:(Dm=1,Tm(),Em=fl()(`Array`,`reverse`),Em)}var km,Am;function jm(){if(Am)return km;Am=1;var e=Ae(),t=Om(),n=Array.prototype;return km=function(r){var i=r.reverse;return r===n||e(n,r)&&i===n.reverse?t:i},km}var Mm,Nm;function Pm(){return Nm?Mm:(Nm=1,Mm=jm(),Mm)}var Fm,Im;function Lm(){return Im?Fm:(Im=1,Fm=Pm(),Fm)}var Rm=t(Lm()),zm={},Bm,Vm;function Hm(){if(Vm)return Bm;Vm=1;var e=Je(),t=TypeError;return Bm=function(n,r){if(!delete n[r])throw new t(`Cannot delete property `+e(r)+` of `+e(n))},Bm}var Um;function Wm(){if(Um)return zm;Um=1;var e=P(),t=vt(),n=Or(),r=Fn(),i=Vn(),a=Xn(),o=Wn(),s=mr(),c=qn(),l=Hm(),u=_r()(`splice`),d=Math.max,f=Math.min;return e({target:`Array`,proto:!0,forced:!u},{splice:function(e,u){var p=t(this),m=i(p),h=n(e,m),g=arguments.length,_,v,y,b,x,S;for(g===0?_=v=0:g===1?(_=0,v=m-h):(_=g-2,v=f(d(r(u),0),m-h)),o(m+_-v),y=s(p,v),b=0;b<v;b++)x=h+b,x in p&&c(y,b,p[x]);if(a(y,v),_<v){for(b=h;b<m-v;b++)x=b+v,S=b+_,x in p?p[S]=p[x]:l(p,S);for(b=m;b>m-v+_;b--)l(p,b-1)}else if(_>v)for(b=m-v;b>h;b--)x=b+v-1,S=b+_-1,x in p?p[S]=p[x]:l(p,S);for(b=0;b<_;b++)p[b+h]=arguments[b+2];return a(p,m-v+_),y}}),zm}var Gm,Km;function qm(){return Km?Gm:(Km=1,Wm(),Gm=fl()(`Array`,`splice`),Gm)}var Jm,Ym;function Xm(){if(Ym)return Jm;Ym=1;var e=Ae(),t=qm(),n=Array.prototype;return Jm=function(r){var i=r.splice;return r===n||e(n,r)&&i===n.splice?t:i},Jm}var Zm,Qm;function $m(){return Qm?Zm:(Qm=1,Zm=Xm(),Zm)}var eh,th;function nh(){return th?eh:(th=1,eh=$m(),eh)}var rh=t(nh()),ih={},ah,oh;function sh(){if(oh)return ah;oh=1;var e=k(),t=v(),n=A(),r=l(),i=Ur(),a=fi(),o=oe(),s=vt(),c=fe(),u=Object.assign,d=Object.defineProperty,f=t([].concat);return ah=!u||r(function(){if(e&&u({b:1},u(d({},`a`,{enumerable:!0,get:function(){d(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},n={},r=Symbol(`assign detection`),a=`abcdefghijklmnopqrst`;return t[r]=7,a.split(``).forEach(function(e){n[e]=e}),u({},t)[r]!==7||i(u({},n)).join(``)!==a})?function(t,r){for(var l=s(t),u=arguments.length,d=1,p=a.f,m=o.f;u>d;)for(var h=c(arguments[d++]),g=p?f(i(h),p(h)):i(h),_=g.length,v=0,y;_>v;)y=g[v++],(!e||n(m,h,y))&&(l[y]=h[y]);return l}:u,ah}var ch;function lh(){if(ch)return ih;ch=1;var e=P(),t=sh();return e({target:`Object`,stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),ih}var uh,dh;function fh(){return dh?uh:(dh=1,lh(),uh=M().Object.assign,uh)}var ph,mh;function hh(){return mh?ph:(mh=1,ph=fh(),ph)}var gh,_h;function vh(){return _h?gh:(_h=1,gh=hh(),gh)}var yh=t(vh()),bh,xh;function Sh(){return xh?bh:(xh=1,yr(),bh=fl()(`Array`,`concat`),bh)}var Ch,wh;function Th(){if(wh)return Ch;wh=1;var e=Ae(),t=Sh(),n=Array.prototype;return Ch=function(r){var i=r.concat;return r===n||e(n,r)&&i===n.concat?t:i},Ch}var Eh,Dh;function Oh(){return Dh?Eh:(Dh=1,Eh=Th(),Eh)}var kh,Ah;function jh(){return Ah?kh:(Ah=1,kh=Oh(),kh)}var Mh=t(jh()),Nh={},Ph;function Fh(){return Ph?Nh:(Ph=1,P()({target:`Object`,stat:!0,sham:!k()},{create:ei()}),Nh)}var Ih,Lh;function Rh(){if(Lh)return Ih;Lh=1,Fh();var e=M().Object;return Ih=function(t,n){return e.create(t,n)},Ih}var zh,Bh;function Vh(){return Bh?zh:(Bh=1,zh=Rh(),zh)}var Hh,Uh;function Wh(){return Uh?Hh:(Uh=1,Hh=Vh(),Hh)}var Gh=t(Wh()),Kh={},qh,Jh;function Yh(){if(Jh)return qh;Jh=1;var e=Fn(),t=wr(),n=j(),r=RangeError,i=Math.floor;return qh=function(a){var o=t(n(this)),s=``,c=e(a);if(c<0||c===1/0)throw new r(`Wrong number of repetitions`);for(;c>0;(c=i(c/2))&&(o+=o))c%2&&(s+=o);return s},qh}var Xh,Zh;function Qh(){if(Zh)return Xh;Zh=1;var e=v(),t=Rn(),n=wr(),r=Yh(),i=j(),a=e(r),o=e(``.slice),s=Math.ceil,c=function(e){return function(r,c,l){var u=n(i(r)),d=t(c),f=u.length;if(d<=f)return u;var p=l===void 0?` `:n(l),m,h;return p===``?u:(m=d-f,h=a(p,s(m/p.length)),h.length>m&&(h=o(h,0,m)),e?u+h:h+u)}};return Xh={start:c(!1),end:c(!0)},Xh}var $h,eg;function tg(){if(eg)return $h;eg=1;var e=v(),t=l(),n=Qh().start,r=RangeError,i=isFinite,a=Math.abs,o=Date.prototype,s=o.toISOString,c=e(o.getTime),u=e(o.getUTCDate),d=e(o.getUTCFullYear),f=e(o.getUTCHours),p=e(o.getUTCMilliseconds),m=e(o.getUTCMinutes),h=e(o.getUTCMonth),g=e(o.getUTCSeconds);return $h=t(function(){return s.call(new Date(-5e13-1))!==`0385-07-25T07:06:39.999Z`})||!t(function(){s.call(new Date(NaN))})?function(){if(!i(c(this)))throw new r(`Invalid time value`);var e=this,t=d(e),o=p(e),s=t<0?`-`:t>9999?`+`:``;return s+n(a(t),s?6:4,0)+`-`+n(h(e)+1,2,0)+`-`+n(u(e),2,0)+`T`+n(f(e),2,0)+`:`+n(m(e),2,0)+`:`+n(g(e),2,0)+`.`+n(o,3,0)+`Z`}:s,$h}var ng;function rg(){if(ng)return Kh;ng=1;var e=P(),t=A(),n=vt(),r=At(),i=tg(),a=x();return e({target:`Date`,proto:!0,forced:l()(function(){return new Date(NaN).toJSON()!==null||t(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1})},{toJSON:function(e){var o=n(this),s=r(o,`number`);return typeof s==`number`&&!isFinite(s)?null:!(`toISOString`in o)&&a(o)===`Date`?t(i,o):o.toISOString()}}),Kh}var ig,ag;function og(){if(ag)return ig;ag=1,rg(),da();var e=M(),t=h();return e.JSON||={stringify:JSON.stringify},ig=function(n,r,i){return t(e.JSON.stringify,null,arguments)},ig}var sg,cg;function lg(){return cg?sg:(cg=1,sg=og(),sg)}var ug,dg;function fg(){return dg?ug:(dg=1,ug=lg(),ug)}var pg=t(fg()),mg={},hg={},gg,_g;function vg(){if(_g)return gg;_g=1;var e=TypeError;return gg=function(t,n){if(t<n)throw new e(`Not enough arguments`);return t},gg}var yg,bg;function xg(){if(bg)return yg;bg=1;var e=o(),t=h(),n=D(),r=Fl(),i=Ne(),a=si(),s=vg(),c=e.Function,l=/MSIE .\./.test(i)||r===`BUN`&&(function(){var t=e.Bun.version.split(`.`);return t.length<3||t[0]===`0`&&(t[1]<3||t[1]===`3`&&t[2]===`0`)})();return yg=function(e,r){var i=r?2:1;return l?function(o,l){var u=s(arguments.length,1)>i,d=n(o)?o:c(o),f=u?a(arguments,i):[],p=u?function(){t(d,this,f)}:d;return r?e(p,l):e(p)}:e},yg}var Sg;function Cg(){if(Sg)return hg;Sg=1;var e=P(),t=o(),n=xg()(t.setInterval,!0);return e({global:!0,bind:!0,forced:t.setInterval!==n},{setInterval:n}),hg}var wg={},Tg;function Eg(){if(Tg)return wg;Tg=1;var e=P(),t=o(),n=xg()(t.setTimeout,!0);return e({global:!0,bind:!0,forced:t.setTimeout!==n},{setTimeout:n}),wg}var Dg;function Og(){return Dg?mg:(Dg=1,Cg(),Eg(),mg)}var kg,Ag;function jg(){return Ag?kg:(Ag=1,Og(),kg=M().setTimeout,kg)}var Mg,Ng;function Pg(){return Ng?Mg:(Ng=1,Mg=jg(),Mg)}var Fg=t(Pg()),Ig={exports:{}},Lg;function Rg(){return Lg?Ig.exports:(Lg=1,(function(e){function t(e){if(e)return n(e);this._callbacks=new Map}function n(e){return Object.assign(e,t.prototype),e._callbacks=new Map,e}t.prototype.on=function(e,t){let n=this._callbacks.get(e)??[];return n.push(t),this._callbacks.set(e,n),this},t.prototype.once=function(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return n.fn=t,this.on(e,n),this},t.prototype.off=function(e,t){if(e===void 0&&t===void 0)return this._callbacks.clear(),this;if(t===void 0)return this._callbacks.delete(e),this;let n=this._callbacks.get(e);if(n){for(let[e,r]of n.entries())if(r===t||r.fn===t){n.splice(e,1);break}n.length===0?this._callbacks.delete(e):this._callbacks.set(e,n)}return this},t.prototype.emit=function(e,...t){let n=this._callbacks.get(e);if(n){let e=[...n];for(let n of e)n.apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks.get(e)??[]},t.prototype.listenerCount=function(e){if(e)return this.listeners(e).length;let t=0;for(let e of this._callbacks.values())t+=e.length;return t},t.prototype.hasListeners=function(e){return this.listenerCount(e)>0},t.prototype.addEventListener=t.prototype.on,t.prototype.removeListener=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,e.exports=t})(Ig),Ig.exports)}var zg=t(Rg());function Bg(){return Bg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bg.apply(this,arguments)}function Vg(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Hg(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var Ug=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t},Wg=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],Gg=typeof document>`u`?{style:{}}:document.createElement(`div`),Kg=`function`,qg=Math.round,Jg=Math.abs,Yg=Date.now;function Xg(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<Wg.length;){if(n=Wg[a],r=n?n+i:t,r in e)return r;a++}}var Zg=typeof window>`u`?{}:window,Qg=Xg(Gg.style,`touchAction`),$g=Qg!==void 0;function e_(){if(!$g)return!1;var e={},t=Zg.CSS&&Zg.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach(function(n){return e[n]=!t||Zg.CSS.supports(`touch-action`,n)}),e}var t_=`compute`,n_=`auto`,r_=`manipulation`,i_=`none`,a_=`pan-x`,o_=`pan-y`,s_=e_(),c_=/mobile|tablet|ip(ad|hone|od)|android/i,l_=`ontouchstart`in Zg,u_=Xg(Zg,`PointerEvent`)!==void 0,d_=l_&&c_.test(navigator.userAgent),f_=`touch`,p_=`pen`,m_=`mouse`,h_=`kinect`,g_=25,__=1,v_=2,y_=4,b_=8,x_=1,S_=2,C_=4,w_=8,T_=16,E_=S_|C_,D_=w_|T_,O_=E_|D_,k_=[`x`,`y`],A_=[`clientX`,`clientY`];function j_(e,t,n){var r;if(e){if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}}function M_(e,t){return typeof e===Kg?e.apply(t&&t[0]||void 0,t):e}function N_(e,t){return e.indexOf(t)>-1}function P_(e){if(N_(e,i_))return i_;var t=N_(e,a_),n=N_(e,o_);return t&&n?i_:t||n?t?a_:o_:N_(e,r_)?r_:n_}var F_=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===t_&&(e=this.compute()),$g&&this.manager.element.style&&s_[e]&&(this.manager.element.style[Qg]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return j_(this.manager.recognizers,function(t){M_(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),P_(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented){t.preventDefault();return}var r=this.actions,i=N_(r,i_)&&!s_[i_],a=N_(r,o_)&&!s_[o_],o=N_(r,a_)&&!s_[a_];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!(o&&a)&&(i||a&&n&E_||o&&n&D_))return this.preventSrc(t)},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function I_(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function L_(e){var t=e.length;if(t===1)return{x:qg(e[0].clientX),y:qg(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:qg(n/t),y:qg(r/t)}}function R_(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:qg(e.pointers[n].clientX),clientY:qg(e.pointers[n].clientY)},n++;return{timeStamp:Yg(),pointers:t,center:L_(t),deltaX:e.deltaX,deltaY:e.deltaY}}function z_(e,t,n){n||=k_;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function B_(e,t,n){n||=k_;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.atan2(i,r)*180/Math.PI}function V_(e,t){return e===t?x_:Jg(e)>=Jg(t)?e<0?S_:C_:t<0?w_:T_}function H_(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===__||a.eventType===y_)&&(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}function U_(e,t,n){return{x:t/e||0,y:n/e||0}}function W_(e,t){return z_(t[0],t[1],A_)/z_(e[0],e[1],A_)}function G_(e,t){return B_(t[1],t[0],A_)+B_(e[1],e[0],A_)}function K_(e,t){var n=e.lastInterval||t,r=t.timeStamp-n.timeStamp,i,a,o,s;if(t.eventType!==b_&&(r>g_||n.velocity===void 0)){var c=t.deltaX-n.deltaX,l=t.deltaY-n.deltaY,u=U_(r,c,l);a=u.x,o=u.y,i=Jg(u.x)>Jg(u.y)?u.x:u.y,s=V_(c,l),e.lastInterval=t}else i=n.velocity,a=n.velocityX,o=n.velocityY,s=n.direction;t.velocity=i,t.velocityX=a,t.velocityY=o,t.direction=s}function q_(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=R_(t),i>1&&!n.firstMultiple?n.firstMultiple=R_(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=L_(r);t.timeStamp=Yg(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=B_(s,c),t.distance=z_(s,c),H_(n,t),t.offsetDirection=V_(t.deltaX,t.deltaY);var l=U_(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=Jg(l.x)>Jg(l.y)?l.x:l.y,t.scale=o?W_(o.pointers,r):1,t.rotation=o?G_(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,K_(n,t);var u=e.element,d=t.srcEvent,f=d.composedPath?d.composedPath()[0]:d.path?d.path[0]:d.target;I_(f,u)&&(u=f),t.target=u}function J_(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&__&&r-i===0,o=t&(y_|b_)&&r-i===0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,q_(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function Y_(e){return e.trim().split(/\s+/g)}function X_(e,t,n){j_(Y_(t),function(t){e.addEventListener(t,n,!1)})}function Z_(e,t,n){j_(Y_(t),function(t){e.removeEventListener(t,n,!1)})}function Q_(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var $_=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){M_(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&X_(this.element,this.evEl,this.domHandler),this.evTarget&&X_(this.target,this.evTarget,this.domHandler),this.evWin&&X_(Q_(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&Z_(this.element,this.evEl,this.domHandler),this.evTarget&&Z_(this.target,this.evTarget,this.domHandler),this.evWin&&Z_(Q_(this.element),this.evWin,this.domHandler)},e}();function ev(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var tv={pointerdown:__,pointermove:v_,pointerup:y_,pointercancel:b_,pointerout:b_},nv={2:f_,3:p_,4:m_,5:h_},rv=`pointerdown`,iv=`pointermove pointerup pointercancel`;Zg.MSPointerEvent&&!Zg.PointerEvent&&(rv=`MSPointerDown`,iv=`MSPointerMove MSPointerUp MSPointerCancel`);var av=function(e){Vg(t,e);function t(){var n,r=t.prototype;return r.evEl=rv,r.evWin=iv,n=e.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var n=t.prototype;return n.handler=function(e){var t=this.store,n=!1,r=tv[e.type.toLowerCase().replace(`ms`,``)],i=nv[e.pointerType]||e.pointerType,a=i===f_,o=ev(t,e.pointerId,`pointerId`);r&__&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(y_|b_)&&(n=!0),!(o<0)&&(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))},t}($_);function ov(e){return Array.prototype.slice.call(e,0)}function sv(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];ev(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort(function(e,n){return e[t]>n[t]}):r.sort()),r}var cv={touchstart:__,touchmove:v_,touchend:y_,touchcancel:b_},lv=`touchstart touchmove touchend touchcancel`,uv=function(e){Vg(t,e);function t(){var n;return t.prototype.evTarget=lv,n=e.apply(this,arguments)||this,n.targetIds={},n}var n=t.prototype;return n.handler=function(e){var t=cv[e.type],n=dv.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:f_,srcEvent:e})},t}($_);function dv(e,t){var n=ov(e.touches),r=this.targetIds;if(t&(__|v_)&&n.length===1)return r[n[0].identifier]=!0,[n,n];var i,a,o=ov(e.changedTouches),s=[],c=this.target;if(a=n.filter(function(e){return I_(e.target,c)}),t===__)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),t&(y_|b_)&&delete r[o[i].identifier],i++;if(s.length)return[sv(a.concat(s),`identifier`,!0),s]}var fv={mousedown:__,mousemove:v_,mouseup:y_},pv=`mousedown`,mv=`mousemove mouseup`,hv=function(e){Vg(t,e);function t(){var n,r=t.prototype;return r.evEl=pv,r.evWin=mv,n=e.apply(this,arguments)||this,n.pressed=!1,n}var n=t.prototype;return n.handler=function(e){var t=fv[e.type];t&__&&e.button===0&&(this.pressed=!0),t&v_&&e.which!==1&&(t=y_),this.pressed&&(t&y_&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:m_,srcEvent:e}))},t}($_),gv=2500,_v=25;function vv(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},gv)}}function yv(e,t){e&__?(this.primaryTouch=t.changedPointers[0].identifier,vv.call(this,t)):e&(y_|b_)&&vv.call(this,t)}function bv(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=_v&&o<=_v)return!0}return!1}var xv=function(){return function(e){Vg(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.handler=function(e,t,n){var i=n.pointerType===f_,a=n.pointerType===m_;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)yv.call(Hg(Hg(r)),t,n);else if(a&&bv.call(Hg(Hg(r)),n))return;r.callback(e,t,n)}},r.touch=new uv(r.manager,r.handler),r.mouse=new hv(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}var n=t.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}($_)}();function Sv(e){var t;return t=e.options.inputClass||(u_?av:d_?uv:l_?xv:hv),new t(e,J_)}function Cv(e,t,n){return Array.isArray(e)?(j_(e,n[t],n),!0):!1}var wv=1,Tv=2,Ev=4,Dv=8,Ov=Dv,kv=16,Av=32,jv=1;function Mv(){return jv++}function Nv(e,t){var n=t.manager;return n?n.get(e):e}function Pv(e){return e&kv?`cancel`:e&Dv?`end`:e&Ev?`move`:e&Tv?`start`:``}var Fv=function(){function e(e){e===void 0&&(e={}),this.options=Bg({enable:!0},e),this.id=Mv(),this.manager=null,this.state=wv,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return Ug(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(Cv(e,`recognizeWith`,this))return this;var t=this.simultaneous;return e=Nv(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return Cv(e,`dropRecognizeWith`,this)?this:(e=Nv(e,this),delete this.simultaneous[e.id],this)},t.requireFailure=function(e){if(Cv(e,`requireFailure`,this))return this;var t=this.requireFail;return e=Nv(e,this),ev(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(Cv(e,`dropRequireFailure`,this))return this;e=Nv(e,this);var t=ev(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<Dv&&r(t.options.event+Pv(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=Dv&&r(t.options.event+Pv(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=Av},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(Av|wv)))return!1;e++}return!0},t.recognize=function(e){var t=Ug({},e);if(!M_(this.options.enable,[this,t])){this.reset(),this.state=Av;return}this.state&(Ov|kv|Av)&&(this.state=wv),this.state=this.process(t),this.state&(Tv|Ev|Dv|kv)&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),Iv=function(e){Vg(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,Bg({event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var n=t.prototype;return n.getTouchAction=function(){return[r_]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime<n.time;if(this.reset(),e.eventType&__&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==y_)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<n.interval,s=!this.pCenter||z_(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,!s||!o?this.count=1:this.count+=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){t.state=Ov,t.tryEmit()},n.interval),Tv):Ov}return Av},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=Av},this.options.interval),Av},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===Ov&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(Fv),Lv=function(e){Vg(t,e);function t(t){return t===void 0&&(t={}),e.call(this,Bg({pointers:1},t))||this}var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=t&(Tv|Ev),i=this.attrTest(e);return r&&(n&b_||!i)?t|kv:r||i?n&y_?t|Dv:t&Tv?t|Ev:Tv:Av},t}(Fv);function Rv(e){return e===T_?`down`:e===w_?`up`:e===S_?`left`:e===C_?`right`:``}var zv=function(e){Vg(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,Bg({event:`pan`,threshold:10,pointers:1,direction:O_},t))||this,n.pX=null,n.pY=null,n}var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&E_&&t.push(o_),e&D_&&t.push(a_),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&E_?(i=a===0?x_:a<0?S_:C_,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?x_:o<0?w_:T_,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return Lv.prototype.attrTest.call(this,e)&&(this.state&Tv||!(this.state&Tv)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=Rv(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(Lv),Bv=function(e){Vg(t,e);function t(t){return t===void 0&&(t={}),e.call(this,Bg({event:`swipe`,threshold:10,velocity:.3,direction:E_|D_,pointers:1},t))||this}var n=t.prototype;return n.getTouchAction=function(){return zv.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n=this.options.direction,r;return n&(E_|D_)?r=t.overallVelocity:n&E_?r=t.overallVelocityX:n&D_&&(r=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Jg(r)>this.options.velocity&&t.eventType&y_},n.emit=function(e){var t=Rv(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(Lv),Vv=function(e){Vg(t,e);function t(t){return t===void 0&&(t={}),e.call(this,Bg({event:`pinch`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[i_]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&Tv)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(Lv),Hv=function(e){Vg(t,e);function t(t){return t===void 0&&(t={}),e.call(this,Bg({event:`rotate`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[i_]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&Tv)},t}(Lv),Uv=function(e){Vg(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,Bg({event:`press`,pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var n=t.prototype;return n.getTouchAction=function(){return[n_]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(y_|b_)&&!a)this.reset();else if(e.eventType&__)this.reset(),this._timer=setTimeout(function(){t.state=Ov,t.tryEmit()},n.time);else if(e.eventType&y_)return Ov;return Av},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===Ov&&(e&&e.eventType&y_?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=Yg(),this.manager.emit(this.options.event,this._input)))},t}(Fv),Wv={domEvents:!1,touchAction:t_,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},Gv=[[Hv,{enable:!1}],[Vv,{enable:!1},[`rotate`]],[Bv,{direction:E_}],[zv,{direction:E_},[`swipe`]],[Iv],[Iv,{event:`doubletap`,taps:2},[`tap`]],[Uv]],Kv=1,qv=2;function Jv(e,t){var n=e.element;if(n.style){var r;j_(e.options.cssProps,function(i,a){r=Xg(n.style,a),t?(e.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=e.oldCssProps[r]||``}),t||(e.oldCssProps={})}}function Yv(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var Xv=function(){function e(e,t){var n=this;this.options=Ug({},Wv,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=Sv(this),this.touchAction=new F_(this,this.options.touchAction),Jv(this,!0),j_(this.options.recognizers,function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}var t=e.prototype;return t.set=function(e){return Ug(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?qv:Kv},t.recognize=function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,r=this.recognizers,i=t.curRecognizer;(!i||i&&i.state&Ov)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped!==qv&&(!i||n===i||n.canRecognizeWith(i))?n.recognize(e):n.reset(),!i&&n.state&(Tv|Ev|Dv)&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof Fv)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(Cv(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(Cv(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=ev(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return j_(Y_(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return j_(Y_(e),function(e){t?n[e]&&n[e].splice(ev(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&Yv(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(!(!n||!n.length)){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&Jv(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),Zv={touchstart:__,touchmove:v_,touchend:y_,touchcancel:b_},Qv=`touchstart`,$v=`touchstart touchmove touchend touchcancel`,ey=function(e){Vg(t,e);function t(){var n,r=t.prototype;return r.evTarget=Qv,r.evWin=$v,n=e.apply(this,arguments)||this,n.started=!1,n}var n=t.prototype;return n.handler=function(e){var t=Zv[e.type];if(t===__&&(this.started=!0),this.started){var n=ty.call(this,e,t);t&(y_|b_)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:f_,srcEvent:e})}},t}($_);function ty(e,t){var n=ov(e.touches),r=ov(e.changedTouches);return t&(y_|b_)&&(n=sv(n.concat(r),`identifier`,!0)),[n,r]}function ny(e,t,n){var r=`DEPRECATED METHOD: `+t+`
4
+ `+n+` AT
5
+ `;return function(){var t=Error(`get-stack-trace`),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,``).replace(/^\s+at\s+/gm,``).replace(/^Object.<anonymous>\s*\(/gm,`{anonymous}()@`):`Unknown Stack Trace`,i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),e.apply(this,arguments)}}var ry=ny(function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&e[r[i]]===void 0)&&(e[r[i]]=t[r[i]]),i++;return e},`extend`,"Use `assign`."),iy=ny(function(e,t){return ry(e,t,!0)},`merge`,"Use `assign`.");function ay(e,t,n){var r=t.prototype,i=e.prototype=Object.create(r);i.constructor=e,i._super=r,n&&Ug(i,n)}function oy(e,t){return function(){return e.apply(t,arguments)}}var sy=function(){var e=function(e,t){return t===void 0&&(t={}),new Xv(e,Bg({recognizers:Gv.concat()},t))};return e.VERSION=`2.0.17-rc`,e.DIRECTION_ALL=O_,e.DIRECTION_DOWN=T_,e.DIRECTION_LEFT=S_,e.DIRECTION_RIGHT=C_,e.DIRECTION_UP=w_,e.DIRECTION_HORIZONTAL=E_,e.DIRECTION_VERTICAL=D_,e.DIRECTION_NONE=x_,e.DIRECTION_DOWN=T_,e.INPUT_START=__,e.INPUT_MOVE=v_,e.INPUT_END=y_,e.INPUT_CANCEL=b_,e.STATE_POSSIBLE=wv,e.STATE_BEGAN=Tv,e.STATE_CHANGED=Ev,e.STATE_ENDED=Dv,e.STATE_RECOGNIZED=Ov,e.STATE_CANCELLED=kv,e.STATE_FAILED=Av,e.Manager=Xv,e.Input=$_,e.TouchAction=F_,e.TouchInput=uv,e.MouseInput=hv,e.PointerEventInput=av,e.TouchMouseInput=xv,e.SingleTouchInput=ey,e.Recognizer=Fv,e.AttrRecognizer=Lv,e.Tap=Iv,e.Pan=zv,e.Swipe=Bv,e.Pinch=Vv,e.Rotate=Hv,e.Press=Uv,e.on=X_,e.off=Z_,e.each=j_,e.merge=iy,e.extend=ry,e.bindFn=oy,e.assign=Ug,e.inherit=ay,e.bindFn=oy,e.prefixed=Xg,e.toArray=ov,e.inArray=ev,e.uniqueArray=sv,e.splitStr=Y_,e.boolOrFn=M_,e.hasParent=I_,e.addEventListeners=X_,e.removeEventListeners=Z_,e.defaults=Ug({},Wv,{preset:Gv}),e}(),cy=bp(`DELETE`);function ly(e){return uy({},e,...[...arguments].slice(1))}function uy(){let e=dy(...arguments);return py(e),e}function dy(){var e=[...arguments];if(e.length<2)return e[0];if(e.length>2)return dy(uy(e[0],e[1]),...wp(e).call(e,2));let t=e[0],n=e[1];if(t instanceof Date&&n instanceof Date)return t.setTime(n.getTime()),t;for(let e of Bp(n))Object.prototype.propertyIsEnumerable.call(n,e)&&(n[e]===cy?delete t[e]:t[e]=t[e]!==null&&n[e]!==null&&typeof t[e]==`object`&&typeof n[e]==`object`&&!Wp(t[e])&&!Wp(n[e])?dy(t[e],n[e]):fy(n[e]));return t}function fy(e){return Wp(e)?ju(e).call(e,e=>fy(e)):typeof e==`object`&&e?e instanceof Date?new Date(e.getTime()):dy({},e):e}function py(e){for(let t of rm(e))e[t]===cy?delete e[t]:typeof e[t]==`object`&&e[t]!==null&&py(e[t])}function my(){let e=()=>{};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var hy=typeof window<`u`?window.Hammer||sy:function(){return my()};function gy(e){var t;this._cleanupQueue=[],this.active=!1,this._dom={container:e,overlay:document.createElement(`div`)},this._dom.overlay.classList.add(`vis-overlay`),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});let n=hy(this._dom.overlay);n.on(`tap`,Tl(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push(()=>{n.destroy()});let r=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];Sm(r).call(r,e=>{n.on(e,e=>{e.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=t=>{_y(t.target,e)||this.deactivate()},document.body.addEventListener(`click`,this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener(`click`,this._onClick)})),this._escListener=e=>{(`key`in e?e.key===`Escape`:e.keyCode===27)&&this.deactivate()}}zg(gy.prototype),gy.current=null,gy.prototype.destroy=function(){this.deactivate();for(let n of Rm(e=rh(t=this._cleanupQueue).call(t,0)).call(e)){var e,t;n()}},gy.prototype.activate=function(){gy.current&&gy.current.deactivate(),gy.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)},gy.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`)},gy.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};function _y(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var vy,yy;function by(){return yy?vy:(yy=1,ga(),vy=M().Object.getOwnPropertySymbols,vy)}var xy,Sy;function Cy(){return Sy?xy:(Sy=1,xy=by(),xy)}var wy,Ty;function Ey(){return Ty?wy:(Ty=1,wy=Cy(),wy)}var Dy=t(Ey()),Oy={exports:{}},ky={},Ay;function jy(){if(Ay)return ky;Ay=1;var e=P(),t=l(),n=be(),r=Vt().f,i=k();return e({target:`Object`,stat:!0,forced:!i||t(function(){r(1)}),sham:!i},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}}),ky}var My;function Ny(){if(My)return Oy.exports;My=1,jy();var e=M().Object,t=Oy.exports=function(t,n){return e.getOwnPropertyDescriptor(t,n)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),Oy.exports}var Py,Fy;function Iy(){return Fy?Py:(Fy=1,Py=Ny(),Py)}var Ly,Ry;function zy(){return Ry?Ly:(Ry=1,Ly=Iy(),Ly)}var By=t(zy()),Vy={},Hy;function Uy(){if(Hy)return Vy;Hy=1;var e=P(),t=k(),n=Op(),r=be(),i=Vt(),a=qn();return e({target:`Object`,stat:!0,sham:!t},{getOwnPropertyDescriptors:function(e){for(var t=r(e),o=i.f,s=n(t),c={},l=0,u,d;s.length>l;)d=o(t,u=s[l++]),d!==void 0&&a(c,u,d);return c}}),Vy}var Wy,Gy;function Ky(){return Gy?Wy:(Gy=1,Uy(),Wy=M().Object.getOwnPropertyDescriptors,Wy)}var qy,Jy;function Yy(){return Jy?qy:(Jy=1,qy=Ky(),qy)}var Xy,Zy;function Qy(){return Zy?Xy:(Zy=1,Xy=Yy(),Xy)}var $y=t(Qy()),eb={exports:{}},tb={},nb;function rb(){if(nb)return tb;nb=1;var e=P(),t=k(),n=Gr().f;return e({target:`Object`,stat:!0,forced:Object.defineProperties!==n,sham:!t},{defineProperties:n}),tb}var ib;function ab(){if(ib)return eb.exports;ib=1,rb();var e=M().Object,t=eb.exports=function(t,n){return e.defineProperties(t,n)};return e.defineProperties.sham&&(t.sham=!0),eb.exports}var ob,sb;function cb(){return sb?ob:(sb=1,ob=ab(),ob)}var lb,ub;function db(){return ub?lb:(ub=1,lb=cb(),lb)}var fb=t(db()),pb,mb;function hb(){return mb?pb:(mb=1,pb=hn(),pb)}var gb=t(hb()),_b={},vb={},yb={exports:{}},bb,xb;function Sb(){return xb?bb:(xb=1,bb=l()(function(){if(typeof ArrayBuffer==`function`){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),bb)}var Cb,wb;function Tb(){if(wb)return Cb;wb=1;var e=l(),t=Ce(),n=x(),r=Sb(),i=Object.isExtensible;return Cb=e(function(){})||r?function(e){return!t(e)||r&&n(e)===`ArrayBuffer`?!1:!i||i(e)}:i,Cb}var Eb,Db;function Ob(){return Db?Eb:(Db=1,Eb=!l()(function(){return Object.isExtensible(Object.preventExtensions({}))}),Eb)}var kb;function Ab(){if(kb)return yb.exports;kb=1;var e=P(),t=v(),n=Pr(),r=Ce(),i=xt(),a=nn().f,o=ri(),s=li(),c=Tb(),l=wt(),u=Ob(),d=!1,f=l(`meta`),p=0,m=function(e){a(e,f,{value:{objectID:`O`+p++,weakData:{}}})},h=yb.exports={enable:function(){h.enable=function(){},d=!0;var n=o.f,r=t([].splice),i={};i[f]=1,n(i).length&&(o.f=function(e){for(var t=n(e),i=0,a=t.length;i<a;i++)if(t[i]===f){r(t,i,1);break}return t},e({target:`Object`,stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(e,t){if(!r(e))return typeof e==`symbol`?e:(typeof e==`string`?`S`:`P`)+e;if(!i(e,f)){if(!c(e))return`F`;if(!t)return`E`;m(e)}return e[f].objectID},getWeakData:function(e,t){if(!i(e,f)){if(!c(e))return!0;if(!t)return!1;m(e)}return e[f].weakData},onFreeze:function(e){return u&&d&&c(e)&&!i(e,f)&&m(e),e}};return n[f]=!0,yb.exports}var jb,Mb;function Nb(){if(Mb)return jb;Mb=1;var e=qt(),t=A(),n=en(),r=Je(),i=zf(),a=Vn(),o=Ae(),s=Hf(),c=xd(),l=Nf(),u=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return jb=function(p,m,h){var g=h&&h.that,_=!!(h&&h.AS_ENTRIES),v=!!(h&&h.IS_RECORD),y=!!(h&&h.IS_ITERATOR),b=!!(h&&h.INTERRUPTED),x=e(m,g),S,C,w,T,E,D,ee,te=function(e){var t=S;return S=void 0,t&&l(t,`normal`),new d(!0,e)},O=function(e){return _?(n(e),b?x(e[0],e[1],te):x(e[0],e[1])):b?x(e,te):x(e)};if(v)S=p.iterator;else if(y)S=p;else{if(C=c(p),!C)throw new u(r(p)+` is not iterable`);if(i(C)){for(w=0,T=a(p);T>w;w++)if(E=O(p[w]),E&&o(f,E))return E;return new d(!1)}S=s(p,C)}for(D=v?p.next:S.next;!(ee=t(D,S)).done;){var k=ee.value;try{E=O(k)}catch(e){if(S)l(S,`throw`,e);else throw e}if(typeof E==`object`&&E&&o(f,E))return E}return new d(!1)},jb}var Pb,Fb;function Ib(){if(Fb)return Pb;Fb=1;var e=Ae(),t=TypeError;return Pb=function(n,r){if(e(r,n))return n;throw new t(`Incorrect invocation`)},Pb}var Lb,Rb;function zb(){if(Rb)return Lb;Rb=1;var e=P(),t=o(),n=Ab(),r=A(),i=l(),a=on(),s=Nb(),c=Ib(),u=D(),d=Ce(),f=he(),p=Ni(),m=nn().f,h=Hi().forEach,g=k(),_=zi(),v=_.set,y=_.getterFor;return Lb=function(o,l,_){var b=o.indexOf(`Map`)!==-1,x=o.indexOf(`Weak`)!==-1,S=b?`set`:`add`,C=t[o],w=C&&C.prototype,T={},E;if(!g||!u(C)||!(x||w.forEach&&!i(function(){new C().entries().next()})))E=_.getConstructor(l,o,b,S),n.enable();else{E=l(function(e,t){v(c(e,D),{type:o,collection:new C}),f(t)||s(t,e[S],{that:e,AS_ENTRIES:b})});var D=E.prototype,ee=y(o);h([`add`,`clear`,`delete`,`forEach`,`get`,`has`,`set`,`keys`,`values`,`entries`],function(e){var t=e===`add`||e===`set`;e in w&&!(x&&e===`clear`)&&a(D,e,function(n,i){var a=this,o=ee(a).collection;if(!t&&x&&!d(n))return e===`get`&&void 0;var s=o[e](e===`forEach`?function(e,t){r(n,i,e,t,a)}:n===0?0:n,i);return t?a:s})}),x||m(D,`size`,{configurable:!0,get:function(){return ee(this).collection.size}})}return p(E,o,!1,!0),T[o]=E,e({global:!0,forced:!0},T),x||_.setStrong(E,o,b),E},Lb}var Bb,Vb;function Hb(){if(Vb)return Bb;Vb=1;var e=hi();return Bb=function(t,n,r){for(var i in n)r&&r.unsafe&&t[i]?t[i]=n[i]:e(t,i,n[i],r);return t},Bb}var Ub,Wb;function Gb(){if(Wb)return Ub;Wb=1;var e=N(),t=vi(),n=Dt(),r=k(),i=n(`species`);return Ub=function(n){var a=e(n);r&&a&&!a[i]&&t(a,i,{configurable:!0,get:function(){return this}})},Ub}var Kb,qb;function Jb(){if(qb)return Kb;qb=1;var e=ei(),t=vi(),n=Hb(),r=qt(),i=Ib(),a=he(),o=Nb(),s=Zo(),c=es(),l=Gb(),u=k(),d=Ab().fastKey,f=zi(),p=f.set,m=f.getterFor;return Kb={getConstructor:function(s,c,l,f){var h=s(function(t,n){i(t,g),p(t,{type:c,index:e(null),first:null,last:null,size:0}),u||(t.size=0),a(n)||o(n,t[f],{that:t,AS_ENTRIES:l})}),g=h.prototype,_=m(c),v=function(e,t,n){var r=_(e),i=y(e,t),a,o;return i?i.value=n:(r.last=i={index:o=d(t,!0),key:t,value:n,previous:a=r.last,next:null,removed:!1},r.first||=i,a&&(a.next=i),u?r.size++:e.size++,o!==`F`&&(r.index[o]=i)),e},y=function(e,t){var n=_(e),r=d(t),i;if(r!==`F`)return n.index[r];for(i=n.first;i;i=i.next)if(i.key===t)return i};return n(g,{clear:function(){for(var t=this,n=_(t),r=n.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=null),r=r.next;n.first=n.last=null,n.index=e(null),u?n.size=0:t.size=0},delete:function(e){var t=this,n=_(t),r=y(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first===r&&(n.first=i),n.last===r&&(n.last=a),u?n.size--:t.size--}return!!r},forEach:function(e){for(var t=_(this),n=r(e,arguments.length>1?arguments[1]:void 0),i;i=i?i.next:t.first;)for(n(i.value,i.key,this);i&&i.removed;)i=i.previous},has:function(e){return!!y(this,e)}}),n(g,l?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return v(this,e===0?0:e,t)}}:{add:function(e){return v(this,e=e===0?0:e,e)}}),u&&t(g,`size`,{configurable:!0,get:function(){return _(this).size}}),h},setStrong:function(e,t,n){var r=t+` Iterator`,i=m(t),a=m(r);s(e,t,function(e,t){p(this,{type:r,target:e,state:i(e),kind:t,last:null})},function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return!e.target||!(e.last=n=n?n.next:e.state.first)?(e.target=null,c(void 0,!0)):c(t===`keys`?n.key:t===`values`?n.value:[n.key,n.value],!1)},n?`entries`:`values`,!n,!0),l(t)}},Kb}var Yb;function Xb(){return Yb?vb:(Yb=1,zb()(`Map`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},Jb()),vb)}var Zb;function Qb(){return Zb?_b:(Zb=1,Xb(),_b)}var $b={},ex,tx;function nx(){return tx?ex:(tx=1,ex=function(e,t){return t===1?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},ex)}var rx,ix;function ax(){if(ix)return rx;ix=1;var e=N(),t=nx(),n=e(`Map`);return rx={Map:n,set:t(`set`,2),get:t(`get`,1),has:t(`has`,1),remove:t(`delete`,1),proto:n.prototype},rx}var ox;function sx(){if(ox)return $b;ox=1;var e=P(),t=v(),n=Ze(),r=j(),i=Nb(),a=ax(),o=st(),s=l(),c=a.Map,u=a.has,d=a.get,f=a.set,p=t([].push),m=o||s(function(){return c.groupBy(`ab`,function(e){return e}).get(`a`).length!==1});return e({target:`Map`,stat:!0,forced:o||m},{groupBy:function(e,t){r(e),n(t);var a=new c,o=0;return i(e,function(e){var n=t(e,o++);u(a,n)?p(d(a,n),e):f(a,n,[e])}),a}}),$b}var cx={},lx;function ux(){if(lx)return cx;lx=1;var e=P(),t=ax(),n=st(),r=t.get,i=t.has,a=t.set;return e({target:`Map`,proto:!0,real:!0,forced:n},{getOrInsert:function(e,t){return i(this,e)?r(this,e):(a(this,e,t),t)}}),cx}var dx={},fx;function px(){if(fx)return dx;fx=1;var e=P(),t=Ze(),n=ax(),r=st(),i=n.get,a=n.has,o=n.set;return e({target:`Map`,proto:!0,real:!0,forced:r},{getOrInsertComputed:function(e,n){var r=a(this,e);if(t(n),r)return i(this,e);e===0&&1/e==-1/0&&(e=0);var s=n(e);return o(this,e,s),s}}),dx}var mx,hx;function gx(){return hx?mx:(hx=1,rs(),Qb(),sx(),ux(),px(),xc(),mx=M().Map,mx)}var _x,vx;function yx(){if(vx)return _x;vx=1;var e=gx();return cs(),_x=e,_x}var bx,xx;function Sx(){return xx?bx:(xx=1,bx=yx(),bx)}var Cx=t(Sx()),wx={},Tx;function Ex(){if(Tx)return wx;Tx=1;var e=P(),t=Hi().some;return e({target:`Array`,proto:!0,forced:!Ml()(`some`)},{some:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),wx}var Dx,Ox;function kx(){return Ox?Dx:(Ox=1,Ex(),Dx=fl()(`Array`,`some`),Dx)}var Ax,jx;function Mx(){if(jx)return Ax;jx=1;var e=Ae(),t=kx(),n=Array.prototype;return Ax=function(r){var i=r.some;return r===n||e(n,r)&&i===n.some?t:i},Ax}var Nx,Px;function Fx(){return Px?Nx:(Px=1,Nx=Mx(),Nx)}var Ix,Lx;function Rx(){return Lx?Ix:(Lx=1,Ix=Fx(),Ix)}var zx=t(Rx()),Bx,Vx;function Hx(){return Vx?Bx:(Vx=1,rs(),Bx=fl()(`Array`,`keys`),Bx)}var Ux,Wx;function Gx(){return Wx?Ux:(Wx=1,Ux=Hx(),Ux)}var Kx,qx;function Jx(){if(qx)return Kx;qx=1,cs();var e=nr(),t=xt(),n=Ae(),r=Gx(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return Kx=function(o){var s=o.keys;return o===i||n(i,o)&&s===i.keys||t(a,e(o))?r:s},Kx}var Yx,Xx;function Zx(){return Xx?Yx:(Xx=1,Yx=Jx(),Yx)}var Qx=t(Zx()),$x={},eS,tS;function nS(){if(tS)return eS;tS=1;var e=si(),t=Math.floor,n=function(r,i){var a=r.length;if(a<8)for(var o=1,s,c;o<a;){for(c=o,s=r[o];c&&i(r[c-1],s)>0;)r[c]=r[--c];c!==o++&&(r[c]=s)}else for(var l=t(a/2),u=n(e(r,0,l),i),d=n(e(r,l),i),f=u.length,p=d.length,m=0,h=0;m<f||h<p;)r[m+h]=m<f&&h<p?i(u[m],d[h])<=0?u[m++]:d[h++]:m<f?u[m++]:d[h++];return r};return eS=n,eS}var rS,iS;function aS(){if(iS)return rS;iS=1;var e=Ne().match(/firefox\/(\d+)/i);return rS=!!e&&+e[1],rS}var oS,sS;function cS(){if(sS)return oS;sS=1;var e=Ne();return oS=/MSIE|Trident/.test(e),oS}var lS,uS;function dS(){if(uS)return lS;uS=1;var e=Ne().match(/AppleWebKit\/(\d+)\./);return lS=!!e&&+e[1],lS}var fS;function pS(){if(fS)return $x;fS=1;var e=P(),t=v(),n=Ze(),r=vt(),i=Vn(),a=Hm(),o=wr(),s=l(),c=nS(),u=Ml(),d=aS(),f=cS(),p=Ie(),m=dS(),h=[],g=t(h.sort),_=t(h.push),y=s(function(){h.sort(void 0)}),b=s(function(){h.sort(null)}),x=u(`sort`),S=!s(function(){if(p)return p<70;if(!(d&&d>3)){if(f)return!0;if(m)return m<603;var e=``,t,n,r,i;for(t=65;t<76;t++){switch(n=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(i=0;i<47;i++)h.push({k:n+i,v:r})}for(h.sort(function(e,t){return t.v-e.v}),i=0;i<h.length;i++)n=h[i].k.charAt(0),e.charAt(e.length-1)!==n&&(e+=n);return e!==`DGBEFHACIJK`}}),C=y||!b||!x||!S,w=function(e){return function(t,n){if(n===void 0)return-1;if(t===void 0)return 1;if(e!==void 0)return+e(t,n)||0;var r=o(t),i=o(n);return r===i?0:r>i?1:-1}};return e({target:`Array`,proto:!0,forced:C},{sort:function(e){e!==void 0&&n(e);var t=r(this);if(S)return e===void 0?g(t):g(t,e);var o=[],s=i(t),l,u;for(u=0;u<s;u++)u in t&&_(o,t[u]);for(c(o,w(e)),l=i(o),u=0;u<l;)t[u]=o[u++];for(;u<s;)a(t,u++);return t}}),$x}var mS,hS;function gS(){return hS?mS:(hS=1,pS(),mS=fl()(`Array`,`sort`),mS)}var _S,vS;function yS(){if(vS)return _S;vS=1;var e=Ae(),t=gS(),n=Array.prototype;return _S=function(r){var i=r.sort;return r===n||e(n,r)&&i===n.sort?t:i},_S}var bS,xS;function SS(){return xS?bS:(xS=1,bS=yS(),bS)}var CS,wS;function TS(){return wS?CS:(wS=1,CS=SS(),CS)}var ES=t(TS()),DS,OS;function kS(){return OS?DS:(OS=1,rs(),DS=fl()(`Array`,`values`),DS)}var AS,jS;function MS(){return jS?AS:(jS=1,AS=kS(),AS)}var NS,PS;function FS(){if(PS)return NS;PS=1,cs();var e=nr(),t=xt(),n=Ae(),r=MS(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return NS=function(o){var s=o.values;return o===i||n(i,o)&&s===i.values||t(a,e(o))?r:s},NS}var IS,LS;function RS(){return LS?IS:(LS=1,IS=FS(),IS)}var zS=t(RS()),BS,VS;function HS(){return VS?BS:(VS=1,BS=Dc(),BS)}var US=t(HS()),WS,GS;function KS(){return GS?WS:(GS=1,rs(),WS=fl()(`Array`,`entries`),WS)}var qS,JS;function YS(){return JS?qS:(JS=1,qS=KS(),qS)}var XS,ZS;function QS(){if(ZS)return XS;ZS=1,cs();var e=nr(),t=xt(),n=Ae(),r=YS(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return XS=function(o){var s=o.entries;return o===i||n(i,o)&&s===i.entries||t(a,e(o))?r:s},XS}var $S,eC;function tC(){return eC?$S:(eC=1,$S=QS(),$S)}var nC=t(tC()),rC=[];for(let e=0;e<256;++e)rC.push((e+256).toString(16).slice(1));function iC(e,t=0){return(rC[e[t+0]]+rC[e[t+1]]+rC[e[t+2]]+rC[e[t+3]]+`-`+rC[e[t+4]]+rC[e[t+5]]+`-`+rC[e[t+6]]+rC[e[t+7]]+`-`+rC[e[t+8]]+rC[e[t+9]]+`-`+rC[e[t+10]]+rC[e[t+11]]+rC[e[t+12]]+rC[e[t+13]]+rC[e[t+14]]+rC[e[t+15]]).toLowerCase()}var aC=new Uint8Array(16);function oC(){return crypto.getRandomValues(aC)}function sC(e,t,n){return crypto.randomUUID?crypto.randomUUID():cC(e)}function cC(e,t,n){e||={};let r=e.random??e.rng?.()??oC();if(r.length<16)throw Error(`Random bytes length must be >= 16`);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,iC(r)}function lC(e){return typeof e==`string`||typeof e==`number`}var uC=class e{constructor(){rl(this,`_subscribers`,{"*":[],add:[],remove:[],update:[]}),rl(this,`subscribe`,e.prototype.on),rl(this,`unsubscribe`,e.prototype.off)}_trigger(e,t,n){var r;if(e===`*`)throw Error(`Cannot trigger event *`);Sm(r=[...this._subscribers[e],...this._subscribers[`*`]]).call(r,r=>{r(e,t,n??null)})}on(e,t){typeof t==`function`&&this._subscribers[e].push(t)}off(e,t){var n;this._subscribers[e]=hu(n=this._subscribers[e]).call(n,e=>e!==t)}},dC={},fC={},pC;function mC(){return pC?fC:(pC=1,zb()(`Set`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},Jb()),fC)}var hC;function gC(){return hC?dC:(hC=1,mC(),dC)}var _C={},vC,yC;function bC(){if(yC)return vC;yC=1;var e=Je(),t=TypeError;return vC=function(n){if(typeof n==`object`&&`size`in n&&`has`in n&&`add`in n&&`delete`in n&&`keys`in n)return n;throw new t(e(n)+` is not a set`)},vC}var xC,SC;function CC(){if(SC)return xC;SC=1;var e=N(),t=nx(),n=e(`Set`),r=n.prototype;return xC={Set:n,add:t(`add`,1),has:t(`has`,1),remove:t(`delete`,1),proto:r},xC}var wC,TC;function EC(){if(TC)return wC;TC=1;var e=A();return wC=function(t,n,r){for(var i=r?t:t.iterator,a=t.next,o,s;!(o=e(a,i)).done;)if(s=n(o.value),s!==void 0)return s},wC}var DC,OC;function kC(){if(OC)return DC;OC=1;var e=EC();return DC=function(t,n,r){return r?e(t.keys(),n,!0):t.forEach(n)},DC}var AC,jC;function MC(){if(jC)return AC;jC=1;var e=CC(),t=kC(),n=e.Set,r=e.add;return AC=function(e){var i=new n;return t(e,function(e){r(i,e)}),i},AC}var NC,PC;function FC(){return PC?NC:(PC=1,NC=function(e){return e.size},NC)}var IC,LC;function RC(){return LC?IC:(LC=1,IC=function(e){return{iterator:e,next:e.next,done:!1}},IC)}var zC,BC;function VC(){if(BC)return zC;BC=1;var e=Ze(),t=en(),n=A(),r=Fn(),i=RC(),a=`Invalid size`,o=RangeError,s=TypeError,c=Math.max,l=function(t,n){this.set=t,this.size=c(n,0),this.has=e(t.has),this.keys=e(t.keys)};return l.prototype={getIterator:function(){return i(t(n(this.keys,this.set)))},includes:function(e){return n(this.has,this.set,e)}},zC=function(e){t(e);var n=+e.size;if(n!==n)throw new s(a);var i=r(n);if(i<0)throw new o(a);return new l(e,i)},zC}var HC,UC;function WC(){if(UC)return HC;UC=1;var e=bC(),t=CC(),n=MC(),r=FC(),i=VC(),a=kC(),o=EC(),s=t.has,c=t.remove;return HC=function(t){var l=e(this),u=i(t),d=n(l);return r(d)<=u.size?a(d,function(e){u.includes(e)&&c(d,e)}):o(u.getIterator(),function(e){s(d,e)&&c(d,e)}),d},HC}var GC,KC;function qC(){return KC?GC:(KC=1,GC=function(){return!1},GC)}var JC;function YC(){if(JC)return _C;JC=1;var e=P(),t=WC(),n=l();return e({target:`Set`,proto:!0,real:!0,forced:!qC()(`difference`,function(e){return e.size===0})||n(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var n=e++>1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return t.difference(e).size!==3})},{difference:t}),_C}var XC={},ZC,QC;function $C(){if(QC)return ZC;QC=1;var e=bC(),t=CC(),n=FC(),r=VC(),i=kC(),a=EC(),o=t.Set,s=t.add,c=t.has;return ZC=function(t){var l=e(this),u=r(t),d=new o;return n(l)>u.size?a(u.getIterator(),function(e){c(l,e)&&s(d,e)}):i(l,function(e){u.includes(e)&&s(d,e)}),d},ZC}var ew;function tw(){if(ew)return XC;ew=1;var e=P(),t=l(),n=$C();return e({target:`Set`,proto:!0,real:!0,forced:!qC()(`intersection`,function(e){return e.size===2&&e.has(1)&&e.has(2)})||t(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!==`3,2`})},{intersection:n}),XC}var nw={},rw,iw;function aw(){if(iw)return rw;iw=1;var e=bC(),t=CC().has,n=FC(),r=VC(),i=kC(),a=EC(),o=Nf();return rw=function(s){var c=e(this),l=r(s);if(n(c)<=l.size)return i(c,function(e){if(l.includes(e))return!1},!0)!==!1;var u=l.getIterator();return a(u,function(e){if(t(c,e))return o(u.iterator,`normal`,!1)})!==!1},rw}var ow;function sw(){if(ow)return nw;ow=1;var e=P(),t=aw();return e({target:`Set`,proto:!0,real:!0,forced:!qC()(`isDisjointFrom`,function(e){return!e})},{isDisjointFrom:t}),nw}var cw={},lw,uw;function dw(){if(uw)return lw;uw=1;var e=bC(),t=FC(),n=kC(),r=VC();return lw=function(i){var a=e(this),o=r(i);return t(a)>o.size?!1:n(a,function(e){if(!o.includes(e))return!1},!0)!==!1},lw}var fw;function pw(){if(fw)return cw;fw=1;var e=P(),t=dw();return e({target:`Set`,proto:!0,real:!0,forced:!qC()(`isSubsetOf`,function(e){return e})},{isSubsetOf:t}),cw}var mw={},hw,gw;function _w(){if(gw)return hw;gw=1;var e=bC(),t=CC().has,n=FC(),r=VC(),i=EC(),a=Nf();return hw=function(o){var s=e(this),c=r(o);if(n(s)<c.size)return!1;var l=c.getIterator();return i(l,function(e){if(!t(s,e))return a(l.iterator,`normal`,!1)})!==!1},hw}var vw;function yw(){if(vw)return mw;vw=1;var e=P(),t=_w();return e({target:`Set`,proto:!0,real:!0,forced:!qC()(`isSupersetOf`,function(e){return!e})},{isSupersetOf:t}),mw}var bw={},xw,Sw;function Cw(){if(Sw)return xw;Sw=1;var e=bC(),t=CC(),n=MC(),r=VC(),i=EC(),a=t.add,o=t.has,s=t.remove;return xw=function(t){var c=e(this),l=r(t).getIterator(),u=n(c);return i(l,function(e){o(c,e)?s(u,e):a(u,e)}),u},xw}var ww,Tw;function Ew(){return Tw?ww:(Tw=1,ww=function(e){try{var t=new Set,n=t[e]({size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}});return n.size===1&&n.values().next().value===4}catch{return!1}},ww)}var Dw;function Ow(){if(Dw)return bw;Dw=1;var e=P(),t=Cw(),n=Ew();return e({target:`Set`,proto:!0,real:!0,forced:!qC()(`symmetricDifference`)||!n(`symmetricDifference`)},{symmetricDifference:t}),bw}var kw={},Aw,jw;function Mw(){if(jw)return Aw;jw=1;var e=bC(),t=CC().add,n=MC(),r=VC(),i=EC();return Aw=function(a){var o=e(this),s=r(a).getIterator(),c=n(o);return i(s,function(e){t(c,e)}),c},Aw}var Nw;function Pw(){if(Nw)return kw;Nw=1;var e=P(),t=Mw(),n=Ew();return e({target:`Set`,proto:!0,real:!0,forced:!qC()(`union`)||!n(`union`)},{union:t}),kw}var Fw,Iw;function Lw(){return Iw?Fw:(Iw=1,rs(),gC(),YC(),tw(),sw(),pw(),yw(),Ow(),Pw(),xc(),Fw=M().Set,Fw)}var Rw,zw;function Bw(){if(zw)return Rw;zw=1;var e=Lw();return cs(),Rw=e,Rw}var Vw,Hw;function Uw(){return Hw?Vw:(Hw=1,Vw=Bw(),Vw)}var Ww=t(Uw()),Gw,Kw;function qw(){return Kw?Gw:(Kw=1,rs(),xc(),Gw=Hf(),Gw)}var Jw,Yw;function Xw(){if(Yw)return Jw;Yw=1;var e=qw();return cs(),Jw=e,Jw}var Zw,Qw;function $w(){return Qw?Zw:(Qw=1,Zw=Xw(),Zw)}var eT,tT;function nT(){return tT?eT:(tT=1,eT=$w(),eT)}var rT,iT;function aT(){return iT?rT:(iT=1,rT=nT(),rT)}var oT,sT;function cT(){return sT?oT:(sT=1,oT=aT(),oT)}var lT=t(cT()),uT=class e{constructor(e){this._pairs=e}*[US](){for(let t of this._pairs){var e=gp(t,2);yield[e[0],e[1]]}}*entries(){for(let t of this._pairs){var e=gp(t,2);yield[e[0],e[1]]}}*keys(){for(let e of this._pairs)yield gp(e,1)[0]}*values(){for(let e of this._pairs)yield gp(e,2)[1]}toIdArray(){var e;return ju(e=[...this._pairs]).call(e,e=>e[0])}toItemArray(){var e;return ju(e=[...this._pairs]).call(e,e=>e[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){let e=Gh(null);for(let n of this._pairs){var t=gp(n,2);let r=t[0];e[r]=t[1]}return e}toMap(){return new Cx(this._pairs)}toIdSet(){return new Ww(this.toIdArray())}toItemSet(){return new Ww(this.toItemArray())}cache(){return new e([...this._pairs])}distinct(e){let t=new Ww;for(let r of this._pairs){var n=gp(r,2);let i=n[0],a=n[1];t.add(e(a,i))}return t}filter(t){let n=this._pairs;return new e({*[US](){for(let r of n){var e=gp(r,2);let n=e[0],i=e[1];t(i,n)&&(yield[n,i])}}})}forEach(e){for(let n of this._pairs){var t=gp(n,2);let r=t[0],i=t[1];e(i,r)}}map(t){let n=this._pairs;return new e({*[US](){for(let r of n){var e=gp(r,2);let n=e[0],i=e[1];yield[n,t(i,n)]}}})}max(e){let t=lT(this._pairs),n=t.next();if(n.done)return null;let r=n.value[1],i=e(n.value[1],n.value[0]);for(;!(n=t.next()).done;){let t=gp(n.value,2),a=t[0],o=t[1],s=e(o,a);s>i&&(i=s,r=o)}return r}min(e){let t=lT(this._pairs),n=t.next();if(n.done)return null;let r=n.value[1],i=e(n.value[1],n.value[0]);for(;!(n=t.next()).done;){let t=gp(n.value,2),a=t[0],o=t[1],s=e(o,a);s<i&&(i=s,r=o)}return r}reduce(e,t){for(let r of this._pairs){var n=gp(r,2);let i=n[0],a=n[1];t=e(t,a,i)}return t}sort(t){return new e({[US]:()=>lT([...this._pairs].toSorted((e,n)=>{let r=gp(e,2),i=r[0],a=r[1],o=gp(n,2),s=o[0],c=o[1];return t(a,c,i,s)}))})}},dT=class e{constructor(e){rl(this,`_queue`,[]),rl(this,`_timeout`,null),rl(this,`_extended`,null),this.delay=null,this.max=1/0,this.setOptions(e)}setOptions(e){e&&e.delay!==void 0&&(this.delay=e.delay),e&&e.max!==void 0&&(this.max=e.max),this._flushIfNeeded()}static extend(t,n){let r=new e(n);if(t.flush!==void 0)throw Error(`Target object already has a property flush`);t.flush=()=>{r.flush()};let i=[{name:`flush`,original:void 0}];if(n&&n.replace)for(let e=0;e<n.replace.length;e++){let a=n.replace[e];i.push({name:a,original:t[a]}),r.replace(t,a)}return r._extended={object:t,methods:i},r}destroy(){if(this.flush(),this._extended){let e=this._extended.object,t=this._extended.methods;for(let n=0;n<t.length;n++){let r=t[n];r.original?e[r.name]=r.original:delete e[r.name]}this._extended=null}}replace(e,t){let n=this,r=e[t];if(!r)throw Error(`Method `+t+` undefined`);e[t]=function(){var e=[...arguments];n.queue({args:e,fn:r,context:this})}}queue(e){typeof e==`function`?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}_flushIfNeeded(){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=Fg(()=>{this.flush()},this.delay))}flush(){var e,t;Sm(e=rh(t=this._queue).call(t,0)).call(e,e=>{e.fn.apply(e.context||e.fn,e.args||[])})}};function fT(e,t){var n=rm(e);if(Dy){var r=Dy(e);t&&(r=hu(r).call(r,function(t){return By(e,t).enumerable})),n.push.apply(n,r)}return n}function pT(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?Sm(n=fT(Object(i),!0)).call(n,function(t){rl(e,t,i[t])}):$y?fb(e,$y(i)):Sm(r=fT(Object(i))).call(r,function(t){gb(e,t,By(i,t))})}return e}function mT(e,t){return e[t]??(e[t]=sC()),e}var hT=class extends uC{get idProp(){return this._idProp}constructor(e,t){super(),rl(this,`_queue`,null),e&&!Wp(e)&&(t=e,e=[]),this._options=t||{},this._data=new Cx,this.length=0,this._idProp=this._options.fieldId||`id`,e&&e.length&&this.add(e),this.setOptions(t)}setOptions(e){e&&e.queue!==void 0&&(e.queue===!1?this._queue&&=(this._queue.destroy(),null):(this._queue||=dT.extend(this,{replace:[`add`,`update`,`remove`]}),e.queue&&typeof e.queue==`object`&&this._queue.setOptions(e.queue)))}add(e,t){let n=[],r;if(Wp(e)){let t=ju(e).call(e,e=>e[this._idProp]);if(zx(t).call(t,e=>this._data.has(e)))throw Error(`A duplicate id was found in the parameter array.`);for(let t=0,i=e.length;t<i;t++)r=this._addItem(e[t]),n.push(r)}else if(e&&typeof e==`object`)r=this._addItem(e),n.push(r);else throw Error(`Unknown dataType`);return n.length&&this._trigger(`add`,{items:n},t),n}update(e,t){let n=[],r=[],i=[],a=[],o=this._idProp,s=e=>{let t=e[o];if(t!=null&&this._data.has(t)){let n=e,o=yh({},this._data.get(t)),s=this._updateItem(n);r.push(s),a.push(n),i.push(o)}else{let t=this._addItem(e);n.push(t)}};if(Wp(e))for(let t=0,n=e.length;t<n;t++)e[t]&&typeof e[t]==`object`?s(e[t]):console.warn(`Ignoring input item, which is not an object at index `+t);else if(e&&typeof e==`object`)s(e);else throw Error(`Unknown dataType`);if(n.length&&this._trigger(`add`,{items:n},t),r.length){let e={items:r,oldData:i,data:a};this._trigger(`update`,e,t)}return Mh(n).call(n,r)}updateOnly(e,t){var n;Wp(e)||(e=[e]);let r=ju(n=ju(e).call(e,e=>{let t=this._data.get(e[this._idProp]);if(t==null)throw Error(`Updating non-existent items is not allowed.`);return{oldData:t,update:e}})).call(n,e=>{let t=e.oldData,n=e.update,r=t[this._idProp],i=ly(t,n);return this._data.set(r,i),{id:r,oldData:t,updatedData:i}});if(r.length){let e={items:ju(r).call(r,e=>e.id),oldData:ju(r).call(r,e=>e.oldData),data:ju(r).call(r,e=>e.updatedData)};return this._trigger(`update`,e,t),e.items}return[]}get(e,t){let n,r,i;lC(e)?(n=e,i=t):Wp(e)?(r=e,i=t):i=e;let a=i&&i.returnType===`Object`?`Object`:`Array`,o=i&&hu(i),s=[],c,l,u;if(n!=null)c=this._data.get(n),c&&o&&!o(c)&&(c=void 0);else if(r!=null)for(let e=0,t=r.length;e<t;e++)c=this._data.get(r[e]),c!=null&&(!o||o(c))&&s.push(c);else{var d;l=[...Qx(d=this._data).call(d)];for(let e=0,t=l.length;e<t;e++)u=l[e],c=this._data.get(u),c!=null&&(!o||o(c))&&s.push(c)}if(i&&i.order&&n==null&&this._sort(s,i.order),i&&i.fields){let e=i.fields;if(n!=null&&c!=null)c=this._filterFields(c,e);else for(let t=0,n=s.length;t<n;t++)s[t]=this._filterFields(s[t],e)}if(a==`Object`){let e={};for(let t=0,n=s.length;t<n;t++){let n=s[t],r=n[this._idProp];e[r]=n}return e}return n==null?s:c??null}getIds(e){let t=this._data,n=e&&hu(e),r=e&&e.order,i=[...Qx(t).call(t)],a=[];if(n){if(r){let e=[];for(let t=0,r=i.length;t<r;t++){let r=i[t],a=this._data.get(r);a!=null&&n(a)&&e.push(a)}this._sort(e,r);for(let t=0,n=e.length;t<n;t++)a.push(e[t][this._idProp])}else for(let e=0,t=i.length;e<t;e++){let t=i[e],r=this._data.get(t);r!=null&&n(r)&&a.push(r[this._idProp])}}else if(r){let e=[];for(let n=0,r=i.length;n<r;n++){let r=i[n];e.push(t.get(r))}this._sort(e,r);for(let t=0,n=e.length;t<n;t++)a.push(e[t][this._idProp])}else for(let e=0,n=i.length;e<n;e++){let n=i[e],r=t.get(n);r!=null&&a.push(r[this._idProp])}return a}getDataSet(){return this}forEach(e,t){let n=t&&hu(t),r=this._data,i=[...Qx(r).call(r)];if(t&&t.order){let n=this.get(t);for(let t=0,r=n.length;t<r;t++){let r=n[t],i=r[this._idProp];e(r,i)}}else for(let t=0,r=i.length;t<r;t++){let r=i[t],a=this._data.get(r);a!=null&&(!n||n(a))&&e(a,r)}}map(e,t){let n=t&&hu(t),r=[],i=this._data,a=[...Qx(i).call(i)];for(let t=0,i=a.length;t<i;t++){let i=a[t],o=this._data.get(i);o!=null&&(!n||n(o))&&r.push(e(o,i))}return t&&t.order&&this._sort(r,t.order),r}_filterFields(e,t){var n;return e&&$l(n=Wp(t)?t:rm(t)).call(n,(t,n)=>(t[n]=e[n],t),{})}_sort(e,t){if(typeof t==`string`){let n=t;ES(e).call(e,(e,t)=>{let r=e[n],i=t[n];return r>i?1:r<i?-1:0})}else if(typeof t==`function`)ES(e).call(e,t);else throw TypeError(`Order must be a function or a string`)}remove(e,t){let n=[],r=[],i=Wp(e)?e:[e];for(let e=0,t=i.length;e<t;e++){let t=this._remove(i[e]);if(t){let e=t[this._idProp];e!=null&&(n.push(e),r.push(t))}}return n.length&&this._trigger(`remove`,{items:n,oldData:r},t),n}_remove(e){let t;if(lC(e)?t=e:e&&typeof e==`object`&&(t=e[this._idProp]),t!=null&&this._data.has(t)){let e=this._data.get(t)||null;return this._data.delete(t),--this.length,e}return null}clear(e){var t;let n=[...Qx(t=this._data).call(t)],r=[];for(let e=0,t=n.length;e<t;e++)r.push(this._data.get(n[e]));return this._data.clear(),this.length=0,this._trigger(`remove`,{items:n,oldData:r},e),n}max(e){let t=null,n=null;for(let i of zS(r=this._data).call(r)){var r;let a=i[e];typeof a==`number`&&(n==null||a>n)&&(t=i,n=a)}return t||null}min(e){let t=null,n=null;for(let i of zS(r=this._data).call(r)){var r;let a=i[e];typeof a==`number`&&(n==null||a<n)&&(t=i,n=a)}return t||null}distinct(e){let t=this._data,n=[...Qx(t).call(t)],r=[],i=0;for(let a=0,o=n.length;a<o;a++){let o=n[a],s=t.get(o)[e],c=!1;for(let e=0;e<i;e++)if(r[e]==s){c=!0;break}!c&&s!==void 0&&(r[i]=s,i++)}return r}_addItem(e){let t=mT(e,this._idProp),n=t[this._idProp];if(this._data.has(n))throw Error(`Cannot add item: item with id `+n+` already exists`);return this._data.set(n,t),++this.length,n}_updateItem(e){let t=e[this._idProp];if(t==null)throw Error(`Cannot update item: item has no id (item: `+pg(e)+`)`);let n=this._data.get(t);if(!n)throw Error(`Cannot update item: no item with id `+t+` found`);return this._data.set(t,pT(pT({},n),e)),t}stream(e){if(e){let t=this._data;return new uT({*[US](){for(let n of e){let e=t.get(n);e!=null&&(yield[n,e])}}})}var t;return new uT({[US]:Tl(t=nC(this._data)).call(t,this._data)})}};function gT(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof t.add==`function`&&typeof t.clear==`function`&&typeof t.distinct==`function`&&typeof Sm(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof ju(t)==`function`&&typeof t.max==`function`&&typeof t.min==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.remove==`function`&&typeof t.setOptions==`function`&&typeof t.stream==`function`&&typeof t.update==`function`&&typeof t.updateOnly==`function`}function _T(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof Sm(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof ju(t)==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.stream==`function`&&gT(e,t.getDataSet())}var vT=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function F(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var yT={},bT,xT;function ST(){if(xT)return bT;xT=1;var e=function(e){return e&&e.Math===Math&&e};return bT=e(typeof globalThis==`object`&&globalThis)||e(typeof window==`object`&&window)||e(typeof self==`object`&&self)||e(typeof vT==`object`&&vT)||e(typeof bT==`object`&&bT)||(function(){return this})()||Function(`return this`)(),bT}var CT,wT;function I(){return wT?CT:(wT=1,CT=function(e){try{return!!e()}catch{return!0}},CT)}var TT,ET;function DT(){return ET?TT:(ET=1,TT=!I()(function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}),TT)}var OT,kT;function AT(){if(kT)return OT;kT=1;var e=DT(),t=Function.prototype,n=t.apply,r=t.call;return OT=typeof Reflect==`object`&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),OT}var jT,MT;function L(){if(MT)return jT;MT=1;var e=DT(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return jT=e?r:function(e){return function(){return n.apply(e,arguments)}},jT}var NT,PT;function FT(){if(PT)return NT;PT=1;var e=L(),t=e({}.toString),n=e(``.slice);return NT=function(e){return n(t(e),8,-1)},NT}var IT,LT;function RT(){if(LT)return IT;LT=1;var e=FT(),t=L();return IT=function(n){if(e(n)===`Function`)return t(n)},IT}var zT,BT;function VT(){if(BT)return zT;BT=1;var e=typeof document==`object`&&document.all;return zT=e===void 0&&e!==void 0?function(t){return typeof t==`function`||t===e}:function(e){return typeof e==`function`},zT}var HT={},UT,WT;function GT(){return WT?UT:(WT=1,UT=!I()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),UT)}var KT,qT;function JT(){if(qT)return KT;qT=1;var e=DT(),t=Function.prototype.call;return KT=e?t.bind(t):function(){return t.apply(t,arguments)},KT}var YT={},XT;function ZT(){if(XT)return YT;XT=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor;return YT.f=t&&!e.call({1:2},1)?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,YT}var QT,$T;function eE(){return $T?QT:($T=1,QT=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},QT)}var tE,nE;function rE(){if(nE)return tE;nE=1;var e=L(),t=I(),n=FT(),r=Object,i=e(``.split);return tE=t(function(){return!r(`z`).propertyIsEnumerable(0)})?function(e){return n(e)===`String`?i(e,``):r(e)}:r,tE}var iE,aE;function oE(){return aE?iE:(aE=1,iE=function(e){return e==null},iE)}var sE,cE;function lE(){if(cE)return sE;cE=1;var e=oE(),t=TypeError;return sE=function(n){if(e(n))throw new t(`Can't call method on `+n);return n},sE}var uE,dE;function fE(){if(dE)return uE;dE=1;var e=rE(),t=lE();return uE=function(n){return e(t(n))},uE}var pE,mE;function hE(){if(mE)return pE;mE=1;var e=VT();return pE=function(t){return typeof t==`object`?t!==null:e(t)},pE}var gE,_E;function R(){return _E?gE:(_E=1,gE={},gE)}var vE,yE;function bE(){if(yE)return vE;yE=1;var e=R(),t=ST(),n=VT(),r=function(e){return n(e)?e:void 0};return vE=function(n,i){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][i]||t[n]&&t[n][i]},vE}var xE,SE;function CE(){return SE?xE:(SE=1,xE=L()({}.isPrototypeOf),xE)}var wE,TE;function EE(){if(TE)return wE;TE=1;var e=ST().navigator,t=e&&e.userAgent;return wE=t?String(t):``,wE}var DE,OE;function kE(){if(OE)return DE;OE=1;var e=ST(),t=EE(),n=e.process,r=e.Deno,i=n&&n.versions||r&&r.version,a=i&&i.v8,o,s;return a&&(o=a.split(`.`),s=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!s&&t&&(o=t.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=t.match(/Chrome\/(\d+)/),o&&(s=+o[1]))),DE=s,DE}var AE,jE;function ME(){if(jE)return AE;jE=1;var e=kE(),t=I(),n=ST().String;return AE=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol(`symbol detection`);return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),AE}var NE,PE;function FE(){return PE?NE:(PE=1,NE=ME()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,NE)}var IE,LE;function RE(){if(LE)return IE;LE=1;var e=bE(),t=VT(),n=CE(),r=FE(),i=Object;return IE=r?function(e){return typeof e==`symbol`}:function(r){var a=e(`Symbol`);return t(a)&&n(a.prototype,i(r))},IE}var zE,BE;function VE(){if(BE)return zE;BE=1;var e=String;return zE=function(t){try{return e(t)}catch{return`Object`}},zE}var HE,UE;function WE(){if(UE)return HE;UE=1;var e=VT(),t=VE(),n=TypeError;return HE=function(r){if(e(r))return r;throw new n(t(r)+` is not a function`)},HE}var GE,KE;function qE(){if(KE)return GE;KE=1;var e=WE(),t=oE();return GE=function(n,r){var i=n[r];return t(i)?void 0:e(i)},GE}var JE,YE;function XE(){if(YE)return JE;YE=1;var e=JT(),t=VT(),n=hE(),r=TypeError;return JE=function(i,a){var o,s;if(a===`string`&&t(o=i.toString)&&!n(s=e(o,i))||t(o=i.valueOf)&&!n(s=e(o,i))||a!==`string`&&t(o=i.toString)&&!n(s=e(o,i)))return s;throw new r(`Can't convert object to primitive value`)},JE}var ZE={exports:{}},QE,$E;function eD(){return $E?QE:($E=1,QE=!0,QE)}var tD,nD;function rD(){if(nD)return tD;nD=1;var e=ST(),t=Object.defineProperty;return tD=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch{e[n]=r}return r},tD}var iD;function aD(){if(iD)return ZE.exports;iD=1;var e=eD(),t=ST(),n=rD(),r=`__core-js_shared__`,i=ZE.exports=t[r]||n(r,{});return(i.versions||=[]).push({version:`3.49.0`,mode:e?`pure`:`global`,copyright:`© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.`,license:`https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE`,source:`https://github.com/zloirock/core-js`}),ZE.exports}var oD,sD;function cD(){if(sD)return oD;sD=1;var e=aD();return oD=function(t,n){return e[t]||(e[t]=n||{})},oD}var lD,uD;function dD(){if(uD)return lD;uD=1;var e=lE(),t=Object;return lD=function(n){return t(e(n))},lD}var fD,pD;function mD(){if(pD)return fD;pD=1;var e=L(),t=dD(),n=e({}.hasOwnProperty);return fD=Object.hasOwn||function(e,r){return n(t(e),r)},fD}var hD,gD;function _D(){if(gD)return hD;gD=1;var e=L(),t=0,n=Math.random(),r=e(1.1.toString);return hD=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+r(++t+n,36)},hD}var vD,yD;function bD(){if(yD)return vD;yD=1;var e=ST(),t=cD(),n=mD(),r=_D(),i=ME(),a=FE(),o=e.Symbol,s=t(`wks`),c=a?o.for||o:o&&o.withoutSetter||r;return vD=function(e){return n(s,e)||(s[e]=i&&n(o,e)?o[e]:c(`Symbol.`+e)),s[e]},vD}var xD,SD;function CD(){if(SD)return xD;SD=1;var e=JT(),t=hE(),n=RE(),r=qE(),i=XE(),a=bD(),o=TypeError,s=a(`toPrimitive`);return xD=function(a,c){if(!t(a)||n(a))return a;var l=r(a,s),u;if(l){if(c===void 0&&(c=`default`),u=e(l,a,c),!t(u)||n(u))return u;throw new o(`Can't convert object to primitive value`)}return c===void 0&&(c=`number`),i(a,c)},xD}var wD,TD;function ED(){if(TD)return wD;TD=1;var e=CD(),t=RE();return wD=function(n){var r=e(n,`string`);return t(r)?r:r+``},wD}var DD,OD;function kD(){if(OD)return DD;OD=1;var e=ST(),t=hE(),n=e.document,r=t(n)&&t(n.createElement);return DD=function(e){return r?n.createElement(e):{}},DD}var AD,jD;function MD(){if(jD)return AD;jD=1;var e=GT(),t=I(),n=kD();return AD=!e&&!t(function(){return Object.defineProperty(n(`div`),"a",{get:function(){return 7}}).a!==7}),AD}var ND;function PD(){if(ND)return HT;ND=1;var e=GT(),t=JT(),n=ZT(),r=eE(),i=fE(),a=ED(),o=mD(),s=MD(),c=Object.getOwnPropertyDescriptor;return HT.f=e?c:function(e,l){if(e=i(e),l=a(l),s)try{return c(e,l)}catch{}if(o(e,l))return r(!t(n.f,e,l),e[l])},HT}var FD,ID;function LD(){if(ID)return FD;ID=1;var e=I(),t=VT(),n=/#|\.prototype\./,r=function(n,r){var c=a[i(n)];return c===s?!0:c===o?!1:t(r)?e(r):!!r},i=r.normalize=function(e){return String(e).replace(n,`.`).toLowerCase()},a=r.data={},o=r.NATIVE=`N`,s=r.POLYFILL=`P`;return FD=r,FD}var RD,zD;function BD(){if(zD)return RD;zD=1;var e=RT(),t=WE(),n=DT(),r=e(e.bind);return RD=function(e,i){return t(e),i===void 0?e:n?r(e,i):function(){return e.apply(i,arguments)}},RD}var VD={},HD,UD;function WD(){return UD?HD:(UD=1,HD=GT()&&I()(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),HD)}var GD,KD;function qD(){if(KD)return GD;KD=1;var e=hE(),t=String,n=TypeError;return GD=function(r){if(e(r))return r;throw new n(t(r)+` is not an object`)},GD}var JD;function YD(){if(JD)return VD;JD=1;var e=GT(),t=MD(),n=WD(),r=qD(),i=ED(),a=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=`enumerable`,l=`configurable`,u=`writable`;return VD.f=e?n?function(e,t,n){if(r(e),t=i(t),r(n),typeof e==`function`&&t===`prototype`&&`value`in n&&u in n&&!n[u]){var a=s(e,t);a&&a[u]&&(e[t]=n.value,n={configurable:l in n?n[l]:a[l],enumerable:c in n?n[c]:a[c],writable:!1})}return o(e,t,n)}:o:function(e,n,s){if(r(e),n=i(n),r(s),t)try{return o(e,n,s)}catch{}if(`get`in s||`set`in s)throw new a(`Accessors not supported`);return`value`in s&&(e[n]=s.value),e},VD}var XD,ZD;function QD(){if(ZD)return XD;ZD=1;var e=GT(),t=YD(),n=eE();return XD=e?function(e,r,i){return t.f(e,r,n(1,i))}:function(e,t,n){return e[t]=n,e},XD}var $D,eO;function z(){if(eO)return $D;eO=1;var e=ST(),t=AT(),n=RT(),r=VT(),i=PD().f,a=LD(),o=R(),s=BD(),c=QD(),l=mD(),u=function(e){var n=function(r,i,a){if(this instanceof n){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,i)}return new e(r,i,a)}return t(e,this,arguments)};return n.prototype=e.prototype,n};return $D=function(t,d){var f=t.target,p=t.global,m=t.stat,h=t.proto,g=p?e:m?e[f]:e[f]&&e[f].prototype,_=p?o:o[f]||c(o,f,{})[f],v=_.prototype,y,b,x,S,C,w,T,E,D;for(S in d)y=a(p?S:f+(m?`.`:`#`)+S,t.forced),b=!y&&g&&l(g,S),w=_[S],b&&(t.dontCallGetSet?(D=i(g,S),T=D&&D.value):T=g[S]),C=b&&T?T:d[S],!(!y&&!h&&typeof w==typeof C)&&(E=t.bind&&b?s(C,e):t.wrap&&b?u(C):h&&r(C)?n(C):C,(t.sham||C&&C.sham||w&&w.sham)&&c(E,`sham`,!0),c(_,S,E),h&&(x=f+`Prototype`,l(o,x)||c(o,x,{}),c(o[x],S,C),t.real&&v&&(y||!v[S])&&c(v,S,C)))},$D}var tO,nO;function rO(){if(nO)return tO;nO=1;var e=Math.ceil,t=Math.floor;return tO=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},tO}var iO,aO;function oO(){if(aO)return iO;aO=1;var e=rO();return iO=function(t){var n=+t;return n!==n||n===0?0:e(n)},iO}var sO,cO;function lO(){if(cO)return sO;cO=1;var e=oO(),t=Math.max,n=Math.min;return sO=function(r,i){var a=e(r);return a<0?t(a+i,0):n(a,i)},sO}var uO,dO;function fO(){if(dO)return uO;dO=1;var e=oO(),t=Math.min;return uO=function(n){var r=e(n);return r>0?t(r,9007199254740991):0},uO}var pO,mO;function hO(){if(mO)return pO;mO=1;var e=fO();return pO=function(t){return e(t.length)},pO}var gO,_O;function vO(){if(_O)return gO;_O=1;var e=fE(),t=lO(),n=hO(),r=function(r){return function(i,a,o){var s=e(i),c=n(s);if(c===0)return!r&&-1;var l=t(o,c),u;if(r&&a!==a){for(;c>l;)if(u=s[l++],u!==u)return!0}else for(;c>l;l++)if((r||l in s)&&s[l]===a)return r||l||0;return!r&&-1}};return gO={includes:r(!0),indexOf:r(!1)},gO}var yO,bO;function xO(){return bO?yO:(bO=1,yO={},yO)}var SO,CO;function wO(){if(CO)return SO;CO=1;var e=L(),t=mD(),n=fE(),r=vO().indexOf,i=xO(),a=e([].push);return SO=function(e,o){var s=n(e),c=0,l=[],u;for(u in s)!t(i,u)&&t(s,u)&&a(l,u);for(;o.length>c;)t(s,u=o[c++])&&(~r(l,u)||a(l,u));return l},SO}var TO,EO;function DO(){return EO?TO:(EO=1,TO=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],TO)}var OO,kO;function AO(){if(kO)return OO;kO=1;var e=wO(),t=DO();return OO=Object.keys||function(n){return e(n,t)},OO}var jO={},MO;function NO(){return MO?jO:(MO=1,jO.f=Object.getOwnPropertySymbols,jO)}var PO,FO;function IO(){if(FO)return PO;FO=1;var e=GT(),t=L(),n=JT(),r=I(),i=AO(),a=NO(),o=ZT(),s=dD(),c=rE(),l=Object.assign,u=Object.defineProperty,d=t([].concat);return PO=!l||r(function(){if(e&&l({b:1},l(u({},`a`,{enumerable:!0,get:function(){u(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},n={},r=Symbol(`assign detection`),a=`abcdefghijklmnopqrst`;return t[r]=7,a.split(``).forEach(function(e){n[e]=e}),l({},t)[r]!==7||i(l({},n)).join(``)!==a})?function(t,r){for(var l=s(t),u=arguments.length,f=1,p=a.f,m=o.f;u>f;)for(var h=c(arguments[f++]),g=p?d(i(h),p(h)):i(h),_=g.length,v=0,y;_>v;)y=g[v++],(!e||n(m,h,y))&&(l[y]=h[y]);return l}:l,PO}var LO;function RO(){if(LO)return yT;LO=1;var e=z(),t=IO();return e({target:`Object`,stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),yT}var zO,BO;function VO(){return BO?zO:(BO=1,RO(),zO=R().Object.assign,zO)}var HO,UO;function WO(){return UO?HO:(UO=1,HO=VO(),HO)}var GO,KO;function qO(){return KO?GO:(KO=1,GO=WO(),GO)}var JO=F(qO()),YO={},XO,ZO;function QO(){return ZO?XO:(ZO=1,XO=L()([].slice),XO)}var $O,ek;function tk(){if(ek)return $O;ek=1;var e=L(),t=WE(),n=hE(),r=mD(),i=QO(),a=DT(),o=Function,s=e([].concat),c=e([].join),l={},u=function(e,t,n){if(!r(l,t)){for(var i=[],a=0;a<t;a++)i[a]=`a[`+a+`]`;l[t]=o(`C,a`,`return new C(`+c(i,`,`)+`)`)}return l[t](e,n)};return $O=a?o.bind:function(e){var r=t(this),a=r.prototype,o=i(arguments,1),c=function(){var t=s(o,i(arguments));return this instanceof c?u(r,t.length,t):r.apply(e,t)};return n(a)&&(c.prototype=a),c},$O}var nk;function rk(){if(nk)return YO;nk=1;var e=z(),t=tk();return e({target:`Function`,proto:!0,forced:Function.bind!==t},{bind:t}),YO}var ik,ak;function ok(){if(ak)return ik;ak=1;var e=ST(),t=R();return ik=function(n,r){var i=t[n+`Prototype`],a=i&&i[r];if(a)return a;var o=e[n],s=o&&o.prototype;return s&&s[r]},ik}var sk,ck;function lk(){return ck?sk:(ck=1,rk(),sk=ok()(`Function`,`bind`),sk)}var uk,dk;function fk(){if(dk)return uk;dk=1;var e=CE(),t=lk(),n=Function.prototype;return uk=function(r){var i=r.bind;return r===n||e(n,r)&&i===n.bind?t:i},uk}var pk,mk;function hk(){return mk?pk:(mk=1,pk=fk(),pk)}var gk,_k;function vk(){return _k?gk:(_k=1,gk=hk(),gk)}var B=F(vk());function yk(e,t,n,r){e.beginPath(),e.arc(t,n,r,0,2*Math.PI,!1),e.closePath()}function bk(e,t,n,r){e.beginPath(),e.rect(t-r,n-r,r*2,r*2),e.closePath()}function xk(e,t,n,r){e.beginPath(),r*=1.15,n+=.275*r;let i=r*2,a=i/2,o=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-a*a);e.moveTo(t,n-(s-o)),e.lineTo(t+a,n+o),e.lineTo(t-a,n+o),e.lineTo(t,n-(s-o)),e.closePath()}function Sk(e,t,n,r){e.beginPath(),r*=1.15,n-=.275*r;let i=r*2,a=i/2,o=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-a*a);e.moveTo(t,n+(s-o)),e.lineTo(t+a,n-o),e.lineTo(t-a,n-o),e.lineTo(t,n+(s-o)),e.closePath()}function Ck(e,t,n,r){e.beginPath(),r*=.82,n+=.1*r;for(let i=0;i<10;i++){let a=i%2==0?r*1.3:r*.5;e.lineTo(t+a*Math.sin(i*2*Math.PI/10),n-a*Math.cos(i*2*Math.PI/10))}e.closePath()}function wk(e,t,n,r){e.beginPath(),e.lineTo(t,n+r),e.lineTo(t+r,n),e.lineTo(t,n-r),e.lineTo(t-r,n),e.closePath()}function Tk(e,t,n,r,i,a){let o=Math.PI/180;r-2*a<0&&(a=r/2),i-2*a<0&&(a=i/2),e.beginPath(),e.moveTo(t+a,n),e.lineTo(t+r-a,n),e.arc(t+r-a,n+a,a,o*270,o*360,!1),e.lineTo(t+r,n+i-a),e.arc(t+r-a,n+i-a,a,0,o*90,!1),e.lineTo(t+a,n+i),e.arc(t+a,n+i-a,a,o*90,o*180,!1),e.lineTo(t,n+a),e.arc(t+a,n+a,a,o*180,o*270,!1),e.closePath()}function Ek(e,t,n,r,i){let a=.5522848,o=r/2*a,s=i/2*a,c=t+r,l=n+i,u=t+r/2,d=n+i/2;e.beginPath(),e.moveTo(t,d),e.bezierCurveTo(t,d-s,u-o,n,u,n),e.bezierCurveTo(u+o,n,c,d-s,c,d),e.bezierCurveTo(c,d+s,u+o,l,u,l),e.bezierCurveTo(u-o,l,t,d+s,t,d),e.closePath()}function Dk(e,t,n,r,i){let a=r,o=i*.3333333333333333,s=.5522848,c=a/2*s,l=o/2*s,u=t+a,d=n+o,f=t+a/2,p=n+o/2,m=n+(i-o/2),h=n+i;e.beginPath(),e.moveTo(u,p),e.bezierCurveTo(u,p+l,f+c,d,f,d),e.bezierCurveTo(f-c,d,t,p+l,t,p),e.bezierCurveTo(t,p-l,f-c,n,f,n),e.bezierCurveTo(f+c,n,u,p-l,u,p),e.lineTo(u,m),e.bezierCurveTo(u,m+l,f+c,h,f,h),e.bezierCurveTo(f-c,h,t,m+l,t,m),e.lineTo(t,p)}function Ok(e,t,n,r,i,a){e.beginPath(),e.moveTo(t,n);let o=a.length,s=r-t,c=i-n,l=c/s,u=Math.sqrt(s*s+c*c),d=0,f=!0,p=0,m=+a[0];for(;u>=.1;)m=+a[d++%o],m>u&&(m=u),p=Math.sqrt(m*m/(1+l*l)),p=s<0?-p:p,t+=p,n+=l*p,f===!0?e.lineTo(t,n):e.moveTo(t,n),u-=m,f=!f}function kk(e,t,n,r){e.beginPath();let i=Math.PI*2/6;e.moveTo(t+r,n);for(let a=1;a<6;a++)e.lineTo(t+r*Math.cos(i*a),n+r*Math.sin(i*a));e.closePath()}var Ak={circle:yk,dashedLine:Ok,database:Dk,diamond:wk,ellipse:Ek,ellipse_vis:Ek,hexagon:kk,roundRect:Tk,square:bk,star:Ck,triangle:xk,triangleDown:Sk};function jk(e){return Object.prototype.hasOwnProperty.call(Ak,e)?Ak[e]:function(t){var n=[...arguments].slice(1);CanvasRenderingContext2D.prototype[e].call(t,n)}}var Mk={exports:{}},Nk;function Pk(){return Nk?Mk.exports:(Nk=1,(function(e){e.exports=t;function t(e){if(e)return n(e)}function n(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}})(Mk),Mk.exports)}var Fk=F(Pk()),Ik={},Lk,Rk;function zk(){if(Rk)return Lk;Rk=1;var e=FT();return Lk=Array.isArray||function(t){return e(t)===`Array`},Lk}var Bk;function Vk(){return Bk?Ik:(Bk=1,z()({target:`Array`,stat:!0},{isArray:zk()}),Ik)}var Hk,Uk;function Wk(){return Uk?Hk:(Uk=1,Vk(),Hk=R().Array.isArray,Hk)}var Gk,Kk;function qk(){return Kk?Gk:(Kk=1,Gk=Wk(),Gk)}var Jk,Yk;function Xk(){return Yk?Jk:(Yk=1,Jk=qk(),Jk)}var Zk,Qk;function $k(){return Qk?Zk:(Qk=1,Zk=Xk(),Zk)}var eA,tA;function nA(){return tA?eA:(tA=1,eA=$k(),eA)}var rA=F(nA());function iA(e){if(rA(e))return e}var aA={},oA,sA;function cA(){if(sA)return oA;sA=1;var e=TypeError,t=9007199254740991;return oA=function(n){if(n>t)throw new e(`Maximum allowed index exceeded`);return n},oA}var lA,uA;function dA(){if(uA)return lA;uA=1;var e=GT(),t=YD(),n=eE();return lA=function(r,i,a){e?t.f(r,i,n(0,a)):r[i]=a},lA}var fA,pA;function mA(){if(pA)return fA;pA=1;var e=GT(),t=zk(),n=TypeError,r=Object.getOwnPropertyDescriptor;return fA=e&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,i){if(t(e)&&!r(e,`length`).writable)throw new n(`Cannot set read only .length`);return e.length=i}:function(e,t){return e.length=t},fA}var hA,gA;function _A(){if(gA)return hA;gA=1;var e=bD()(`toStringTag`),t={};return t[e]=`z`,hA=String(t)===`[object z]`,hA}var vA,yA;function bA(){if(yA)return vA;yA=1;var e=_A(),t=VT(),n=FT(),r=bD()(`toStringTag`),i=Object,a=n(function(){return arguments}())===`Arguments`,o=function(e,t){try{return e[t]}catch{}};return vA=e?n:function(e){var s,c,l;return e===void 0?`Undefined`:e===null?`Null`:typeof(c=o(s=i(e),r))==`string`?c:a?n(s):(l=n(s))===`Object`&&t(s.callee)?`Arguments`:l},vA}var xA,SA;function CA(){if(SA)return xA;SA=1;var e=L(),t=VT(),n=aD(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),xA=n.inspectSource,xA}var wA,TA;function EA(){if(TA)return wA;TA=1;var e=L(),t=I(),n=VT(),r=bA(),i=bE(),a=CA(),o=function(){},s=i(`Reflect`,`construct`),c=/^\s*(?:class|function)\b/,l=e(c.exec),u=!c.test(o),d=function(e){if(!n(e))return!1;try{return s(o,[],e),!0}catch{return!1}},f=function(e){if(!n(e))return!1;switch(r(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return u||!!l(c,a(e))}catch{return!0}};return f.sham=!0,wA=!s||t(function(){var e;return d(d.call)||!d(Object)||!d(function(){e=!0})||e})?f:d,wA}var DA,OA;function kA(){if(OA)return DA;OA=1;var e=zk(),t=EA(),n=hE(),r=bD()(`species`),i=Array;return DA=function(a){var o;return e(a)&&(o=a.constructor,t(o)&&(o===i||e(o.prototype))?o=void 0:n(o)&&(o=o[r],o===null&&(o=void 0))),o===void 0?i:o},DA}var AA,jA;function MA(){if(jA)return AA;jA=1;var e=kA();return AA=function(t,n){return new(e(t))(n===0?0:n)},AA}var NA,PA;function FA(){if(PA)return NA;PA=1;var e=I(),t=bD(),n=kE(),r=t(`species`);return NA=function(t){return n>=51||!e(function(){var e=[],n=e.constructor={};return n[r]=function(){return{foo:1}},e[t](Boolean).foo!==1})},NA}var IA;function LA(){if(IA)return aA;IA=1;var e=z(),t=I(),n=zk(),r=hE(),i=dD(),a=hO(),o=cA(),s=dA(),c=mA(),l=MA(),u=FA(),d=bD(),f=kE(),p=d(`isConcatSpreadable`),m=f>=51||!t(function(){var e=[];return e[p]=!1,e.concat()[0]!==e}),h=function(e){if(!r(e))return!1;var t=e[p];return t===void 0?n(e):!!t};return e({target:`Array`,proto:!0,arity:1,forced:!m||!u(`concat`)},{concat:function(e){var t=i(this),n=l(t,0),r=0,u,d,f,p,m;for(u=-1,f=arguments.length;u<f;u++)if(m=u===-1?t:arguments[u],h(m))for(p=a(m),o(r+p),d=0;d<p;d++,r++)d in m&&s(n,r,m[d]);else o(r+1),s(n,r++,m);return c(n,r),n}}),aA}var RA={},zA={},BA,VA;function HA(){if(VA)return BA;VA=1;var e=bA(),t=String;return BA=function(n){if(e(n)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return t(n)},BA}var UA={},WA;function GA(){if(WA)return UA;WA=1;var e=GT(),t=WD(),n=YD(),r=qD(),i=fE(),a=AO();return UA.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var o=i(t),s=a(t),c=s.length,l=0,u;c>l;)n.f(e,u=s[l++],o[u]);return e},UA}var KA,qA;function JA(){return qA?KA:(qA=1,KA=bE()(`document`,`documentElement`),KA)}var YA,XA;function ZA(){if(XA)return YA;XA=1;var e=cD(),t=_D(),n=e(`keys`);return YA=function(e){return n[e]||(n[e]=t(e))},YA}var QA,$A;function ej(){if($A)return QA;$A=1;var e=qD(),t=GA(),n=DO(),r=xO(),i=JA(),a=kD(),o=ZA(),s=`>`,c=`<`,l=`prototype`,u=`script`,d=o(`IE_PROTO`),f=function(){},p=function(e){return c+u+s+e+c+`/`+u+s},m=function(e){e.write(p(``)),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){var e=a(`iframe`),t=`java`+u+`:`,n;return e.style.display=`none`,i.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(p(`document.F=Object`)),n.close(),n.F},g,_=function(){try{g=new ActiveXObject(`htmlfile`)}catch{}_=typeof document<`u`?document.domain&&g?m(g):h():m(g);for(var e=n.length;e--;)delete _[l][n[e]];return _()};return r[d]=!0,QA=Object.create||function(n,r){var i;return n===null?i=_():(f[l]=e(n),i=new f,f[l]=null,i[d]=n),r===void 0?i:t.f(i,r)},QA}var tj={},nj;function rj(){if(nj)return tj;nj=1;var e=wO(),t=DO().concat(`length`,`prototype`);return tj.f=Object.getOwnPropertyNames||function(n){return e(n,t)},tj}var ij={},aj;function oj(){if(aj)return ij;aj=1;var e=FT(),t=fE(),n=rj().f,r=QO(),i=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return n(e)}catch{return r(i)}};return ij.f=function(r){return i&&e(r)===`Window`?a(r):n(t(r))},ij}var sj,cj;function lj(){if(cj)return sj;cj=1;var e=QD();return sj=function(t,n,r,i){return i&&i.enumerable?t[n]=r:e(t,n,r),t},sj}var uj,dj;function fj(){if(dj)return uj;dj=1;var e=YD();return uj=function(t,n,r){return e.f(t,n,r)},uj}var pj={},mj;function hj(){return mj?pj:(mj=1,pj.f=bD(),pj)}var gj,_j;function vj(){if(_j)return gj;_j=1;var e=R(),t=mD(),n=hj(),r=YD().f;return gj=function(i){var a=e.Symbol||={};t(a,i)||r(a,i,{value:n.f(i)})},gj}var yj,bj;function xj(){if(bj)return yj;bj=1;var e=JT(),t=bE(),n=bD(),r=lj();return yj=function(){var i=t(`Symbol`),a=i&&i.prototype,o=a&&a.valueOf,s=n(`toPrimitive`);a&&!a[s]&&r(a,s,function(t){return e(o,this)},{arity:1})},yj}var Sj,Cj;function wj(){if(Cj)return Sj;Cj=1;var e=_A(),t=bA();return Sj=e?{}.toString:function(){return`[object `+t(this)+`]`},Sj}var Tj,Ej;function Dj(){if(Ej)return Tj;Ej=1;var e=_A(),t=YD().f,n=QD(),r=mD(),i=wj(),a=bD()(`toStringTag`);return Tj=function(o,s,c,l){var u=c?o:o&&o.prototype;u&&(r(u,a)||t(u,a,{configurable:!0,value:s}),l&&!e&&n(u,`toString`,i))},Tj}var Oj,kj;function Aj(){if(kj)return Oj;kj=1;var e=ST(),t=VT(),n=e.WeakMap;return Oj=t(n)&&/native code/.test(String(n)),Oj}var jj,Mj;function Nj(){if(Mj)return jj;Mj=1;var e=Aj(),t=ST(),n=hE(),r=QD(),i=mD(),a=aD(),o=ZA(),s=xO(),c=`Object already initialized`,l=t.TypeError,u=t.WeakMap,d,f,p,m=function(e){return p(e)?f(e):d(e,{})},h=function(e){return function(t){var r;if(!n(t)||(r=f(t)).type!==e)throw new l(`Incompatible receiver, `+e+` required`);return r}};if(e||a.state){var g=a.state||=new u;g.get=g.get,g.has=g.has,g.set=g.set,d=function(e,t){if(g.has(e))throw new l(c);return t.facade=e,g.set(e,t),t},f=function(e){return g.get(e)||{}},p=function(e){return g.has(e)}}else{var _=o(`state`);s[_]=!0,d=function(e,t){if(i(e,_))throw new l(c);return t.facade=e,r(e,_,t),t},f=function(e){return i(e,_)?e[_]:{}},p=function(e){return i(e,_)}}return jj={set:d,get:f,has:p,enforce:m,getterFor:h},jj}var Pj,Fj;function Ij(){if(Fj)return Pj;Fj=1;var e=BD(),t=rE(),n=dD(),r=hO(),i=MA(),a=dA(),o=function(o){var s=o===1,c=o===2,l=o===3,u=o===4,d=o===6,f=o===7,p=o===5||d;return function(m,h,g){for(var _=n(m),v=t(_),y=r(v),b=e(h,g),x=0,S=0,C=s?i(m,y):c||f?i(m,0):void 0,w,T;y>x;x++)if((p||x in v)&&(w=v[x],T=b(w,x,_),o)){if(s)a(C,x,T);else if(T)switch(o){case 3:return!0;case 5:return w;case 6:return x;case 2:a(C,S++,w)}else switch(o){case 4:return!1;case 7:a(C,S++,w)}}return d?-1:l||u?u:C}};return Pj={forEach:o(0),map:o(1),filter:o(2),some:o(3),every:o(4),find:o(5),findIndex:o(6),filterReject:o(7)},Pj}var Lj;function Rj(){if(Lj)return zA;Lj=1;var e=z(),t=ST(),n=JT(),r=L(),i=eD(),a=GT(),o=ME(),s=I(),c=mD(),l=CE(),u=qD(),d=fE(),f=ED(),p=HA(),m=eE(),h=ej(),g=AO(),_=rj(),v=oj(),y=NO(),b=PD(),x=YD(),S=GA(),C=ZT(),w=lj(),T=fj(),E=cD(),D=ZA(),ee=xO(),te=_D(),O=bD(),k=hj(),ne=vj(),re=xj(),A=Dj(),ie=Nj(),ae=Ij().forEach,oe=D(`hidden`),se=`Symbol`,ce=`prototype`,le=ie.set,ue=ie.getterFor(se),de=Object[ce],fe=t.Symbol,pe=fe&&fe[ce],me=t.RangeError,he=t.TypeError,ge=t.QObject,_e=b.f,j=x.f,ve=v.f,ye=C.f,be=r([].push),xe=E(`symbols`),Se=E(`op-symbols`),Ce=E(`wks`),we=!ge||!ge[ce]||!ge[ce].findChild,Te=function(e,t,n){var r=_e(de,t);return r&&delete de[t],j(e,t,n),r&&e!==de&&j(de,t,r),e},M=a&&s(function(){return h(j({},`a`,{get:function(){return j(this,`a`,{value:7}).a}})).a!==7})?Te:j,Ee=function(e,t){var n=xe[e]=h(pe);return le(n,{type:se,tag:e,description:t}),a||(n.description=t),n},De=function(e,t,n){e===de&&De(Se,t,n),u(e);var r=f(t);return u(n),c(xe,r)?((`enumerable`in n?!n.enumerable:!c(e,r)||c(e,oe)&&e[oe][r])?(c(e,oe)||j(e,oe,m(1,h(null))),e[oe][r]=!0):(c(e,oe)&&e[oe][r]&&(e[oe][r]=!1),n=h(n,{enumerable:m(0,!1)})),M(e,r,n)):j(e,r,n)},N=function(e,t){u(e);var r=d(t);return ae(g(r).concat(Me(r)),function(t){(!a||n(ke,r,t))&&De(e,t,r[t])}),e},Oe=function(e,t){return t===void 0?h(e):N(h(e),t)},ke=function(e){var t=f(e),r=n(ye,this,t);return this===de&&c(xe,t)&&!c(Se,t)?!1:r||!c(this,t)||!c(xe,t)||c(this,oe)&&this[oe][t]?r:!0},Ae=function(e,t){var n=d(e),r=f(t);if(!(n===de&&c(xe,r)&&!c(Se,r))){var i=_e(n,r);return i&&c(xe,r)&&!(c(n,oe)&&n[oe][r])&&(i.enumerable=!0),i}},je=function(e){var t=ve(d(e)),n=[];return ae(t,function(e){!c(xe,e)&&!c(ee,e)&&be(n,e)}),n},Me=function(e){var t=e===de,n=ve(t?Se:d(e)),r=[];return ae(n,function(e){c(xe,e)&&(!t||c(de,e))&&be(r,xe[e])}),r};return o||(fe=function(){if(l(pe,this))throw new he(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:p(arguments[0]),r=te(e),i=function(e){var a=this===void 0?t:this;a===de&&n(i,Se,e),c(a,oe)&&c(a[oe],r)&&(a[oe][r]=!1);var o=m(1,e);try{M(a,r,o)}catch(e){if(!(e instanceof me))throw e;Te(a,r,o)}};return a&&we&&M(de,r,{configurable:!0,set:i}),Ee(r,e)},pe=fe[ce],w(pe,`toString`,function(){return ue(this).tag}),w(fe,`withoutSetter`,function(e){return Ee(te(e),e)}),C.f=ke,x.f=De,S.f=N,b.f=Ae,_.f=v.f=je,y.f=Me,k.f=function(e){return Ee(O(e),e)},a&&(T(pe,`description`,{configurable:!0,get:function(){return ue(this).description}}),i||w(de,`propertyIsEnumerable`,ke,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:fe}),ae(g(Ce),function(e){ne(e)}),e({target:se,stat:!0,forced:!o},{useSetter:function(){we=!0},useSimple:function(){we=!1}}),e({target:`Object`,stat:!0,forced:!o,sham:!a},{create:Oe,defineProperty:De,defineProperties:N,getOwnPropertyDescriptor:Ae}),e({target:`Object`,stat:!0,forced:!o},{getOwnPropertyNames:je}),re(),A(fe,se),ee[oe]=!0,zA}var zj={},Bj,Vj;function Hj(){return Vj?Bj:(Vj=1,Bj=ME()&&!!Symbol.for&&!!Symbol.keyFor,Bj)}var Uj;function Wj(){if(Uj)return zj;Uj=1;var e=z(),t=bE(),n=mD(),r=HA(),i=cD(),a=Hj(),o=i(`string-to-symbol-registry`),s=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{for:function(e){var i=r(e);if(n(o,i))return o[i];var a=t(`Symbol`)(i);return o[i]=a,s[a]=i,a}}),zj}var Gj={},Kj;function qj(){if(Kj)return Gj;Kj=1;var e=z(),t=mD(),n=RE(),r=VE(),i=cD(),a=Hj(),o=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{keyFor:function(e){if(!n(e))throw TypeError(r(e)+` is not a symbol`);if(t(o,e))return o[e]}}),Gj}var Jj={},Yj,Xj;function Zj(){if(Xj)return Yj;Xj=1;var e=hE(),t=Nj().get;return Yj=function(n){if(!e(n))return!1;var r=t(n);return!!r&&r.type===`RawJSON`},Yj}var Qj,$j;function eM(){if($j)return Qj;$j=1;var e=L(),t=mD(),n=SyntaxError,r=parseInt,i=String.fromCharCode,a=e(``.charAt),o=e(``.slice),s=e(/./.exec),c={'\\"':`"`,"\\\\":`\\`,"\\/":`/`,"\\b":`\b`,"\\f":`\f`,"\\n":`
6
+ `,"\\r":`\r`,"\\t":` `},l=/^[\da-f]{4}$/i,u=/^[\u0000-\u001F]$/;return Qj=function(e,d){for(var f=!0,p=``;d<e.length;){var m=a(e,d);if(m===`\\`){var h=o(e,d,d+2);if(t(c,h))p+=c[h],d+=2;else if(h===`\\u`){d+=2;var g=o(e,d,d+4);if(!s(l,g))throw new n(`Bad Unicode escape at: `+d);p+=i(r(g,16)),d+=4}else throw new n(`Unknown escape sequence: "`+h+`"`)}else if(m===`"`){f=!1,d++;break}else{if(s(u,m))throw new n(`Bad control character in string literal at: `+d);p+=m,d++}}if(f)throw new n(`Unterminated string at: `+d);return{value:p,end:d}},Qj}var tM,nM;function rM(){return nM?tM:(nM=1,tM=!I()(function(){var e=`9007199254740993`,t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e}),tM)}var iM;function aM(){if(iM)return Jj;iM=1;var e=z(),t=bE(),n=AT(),r=JT(),i=L(),a=I(),o=zk(),s=VT(),c=Zj(),l=RE(),u=FT(),d=HA(),f=QO(),p=eM(),m=_D(),h=ME(),g=rM(),_=String,v=t(`JSON`,`stringify`),y=i(/./.exec),b=i(``.charAt),x=i(``.charCodeAt),S=i(``.replace),C=i(``.slice),w=i([].push),T=i(1.1.toString),E=/[\uD800-\uDFFF]/g,D=/^[\uD800-\uDBFF]$/,ee=/^[\uDC00-\uDFFF]$/,te=m(),O=te.length,k=!h||a(function(){var e=t(`Symbol`)(`stringify detection`);return v([e])!==`[null]`||v({a:e})!==`{}`||v(Object(e))!==`{}`}),ne=a(function(){return v(`\udf06\ud834`)!==`"\\udf06\\ud834"`||v(`\udead`)!==`"\\udead"`}),re=k?function(e,t){var i=f(arguments),a=ie(t);if(!(!s(a)&&(e===void 0||l(e))))return i[1]=function(e,t){if(s(a)&&(t=r(a,this,_(e),t)),!l(t))return t},n(v,null,i)}:v,A=function(e,t,n){var r=b(n,t-1),i=b(n,t+1);return y(D,e)&&!y(ee,i)||y(ee,e)&&!y(D,r)?`\\u`+T(x(e,0),16):e},ie=function(e){if(s(e))return e;if(o(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i==`string`?w(n,i):(typeof i==`number`||u(i)===`Number`||u(i)===`String`)&&w(n,d(i))}var a=n.length,c=!0;return function(e,t){if(c)return c=!1,t;if(o(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}};return v&&e({target:`JSON`,stat:!0,arity:3,forced:k||ne||!g},{stringify:function(e,t,n){var i=ie(t),a=[],o=re(e,function(e,t){var n=s(i)?r(i,this,_(e),t):t;return!g&&c(n)?te+(w(a,n.rawJSON)-1):n},n);if(typeof o!=`string`||(ne&&(o=S(o,E,A)),g))return o;for(var l=``,u=o.length,d=0;d<u;d++){var f=b(o,d);if(f===`"`){var m=p(o,++d).end-1,h=C(o,d,m);l+=C(h,0,O)===te?a[C(h,O)]:`"`+h+`"`,d=m}else l+=f}return l}}),Jj}var oM={},sM;function cM(){if(sM)return oM;sM=1;var e=z(),t=ME(),n=I(),r=NO(),i=dD();return e({target:`Object`,stat:!0,forced:!t||n(function(){r.f(1)})},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(i(e)):[]}}),oM}var lM;function uM(){return lM?RA:(lM=1,Rj(),Wj(),qj(),aM(),cM(),RA)}var dM={},fM;function pM(){return fM?dM:(fM=1,vj()(`asyncDispose`),dM)}var mM={},hM;function gM(){return hM?mM:(hM=1,vj()(`asyncIterator`),mM)}var _M={},vM;function yM(){return vM?_M:(vM=1,vj()(`dispose`),_M)}var bM={},xM;function SM(){return xM?bM:(xM=1,vj()(`hasInstance`),bM)}var CM={},wM;function TM(){return wM?CM:(wM=1,vj()(`isConcatSpreadable`),CM)}var EM={},DM;function OM(){return DM?EM:(DM=1,vj()(`iterator`),EM)}var kM={},AM;function jM(){return AM?kM:(AM=1,vj()(`match`),kM)}var MM={},NM;function PM(){return NM?MM:(NM=1,vj()(`matchAll`),MM)}var FM={},IM;function LM(){return IM?FM:(IM=1,vj()(`replace`),FM)}var RM={},zM;function BM(){return zM?RM:(zM=1,vj()(`search`),RM)}var VM={},HM;function UM(){return HM?VM:(HM=1,vj()(`species`),VM)}var WM={},GM;function KM(){return GM?WM:(GM=1,vj()(`split`),WM)}var qM={},JM;function YM(){if(JM)return qM;JM=1;var e=vj(),t=xj();return e(`toPrimitive`),t(),qM}var XM={},ZM;function QM(){if(ZM)return XM;ZM=1;var e=bE(),t=vj(),n=Dj();return t(`toStringTag`),n(e(`Symbol`),`Symbol`),XM}var $M={},eN;function tN(){return eN?$M:(eN=1,vj()(`unscopables`),$M)}var nN={},rN;function iN(){return rN?nN:(rN=1,Dj()(ST().JSON,`JSON`,!0),nN)}var aN,oN;function sN(){return oN?aN:(oN=1,LA(),uM(),pM(),gM(),yM(),SM(),TM(),OM(),jM(),PM(),LM(),BM(),UM(),KM(),YM(),QM(),tN(),iN(),aN=R().Symbol,aN)}var cN={},lN,uN;function dN(){return uN?lN:(uN=1,lN=function(){},lN)}var fN,pN;function mN(){return pN?fN:(pN=1,fN={},fN)}var hN,gN;function _N(){if(gN)return hN;gN=1;var e=GT(),t=mD(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,i=t(n,`name`);return hN={EXISTS:i,PROPER:i&&function(){}.name===`something`,CONFIGURABLE:i&&(!e||e&&r(n,`name`).configurable)},hN}var vN,yN;function bN(){return yN?vN:(yN=1,vN=!I()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),vN)}var xN,SN;function CN(){if(SN)return xN;SN=1;var e=mD(),t=VT(),n=dD(),r=ZA(),i=bN(),a=r(`IE_PROTO`),o=Object,s=o.prototype;return xN=i?o.getPrototypeOf:function(r){var i=n(r);if(e(i,a))return i[a];var c=i.constructor;return t(c)&&i instanceof c?c.prototype:i instanceof o?s:null},xN}var wN,TN;function EN(){if(TN)return wN;TN=1;var e=I(),t=VT(),n=hE(),r=ej(),i=CN(),a=lj(),o=bD(),s=eD(),c=o(`iterator`),l=!1,u,d,f;return[].keys&&(f=[].keys(),`next`in f?(d=i(i(f)),d!==Object.prototype&&(u=d)):l=!0),!n(u)||e(function(){var e={};return u[c].call(e)!==e})?u={}:s&&(u=r(u)),t(u[c])||a(u,c,function(){return this}),wN={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:l},wN}var DN,ON;function kN(){if(ON)return DN;ON=1;var e=EN().IteratorPrototype,t=ej(),n=eE(),r=Dj(),i=mN(),a=function(){return this};return DN=function(o,s,c,l){var u=s+` Iterator`;return o.prototype=t(e,{next:n(+!l,c)}),r(o,u,!1,!0),i[u]=a,o},DN}var AN,jN;function MN(){if(jN)return AN;jN=1;var e=L(),t=WE();return AN=function(n,r,i){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[i]))}catch{}},AN}var NN,PN;function FN(){if(PN)return NN;PN=1;var e=hE();return NN=function(t){return e(t)||t===null},NN}var IN,LN;function RN(){if(LN)return IN;LN=1;var e=FN(),t=String,n=TypeError;return IN=function(r){if(e(r))return r;throw new n(`Can't set `+t(r)+` as a prototype`)},IN}var zN,BN;function VN(){if(BN)return zN;BN=1;var e=MN(),t=hE(),n=lE(),r=RN();return zN=Object.setPrototypeOf||(`__proto__`in{}?function(){var i=!1,a={},o;try{o=e(Object.prototype,`__proto__`,`set`),o(a,[]),i=a instanceof Array}catch{}return function(e,a){return n(e),r(a),t(e)&&(i?o(e,a):e.__proto__=a),e}}():void 0),zN}var HN,UN;function WN(){if(UN)return HN;UN=1;var e=z(),t=JT(),n=eD(),r=_N(),i=VT(),a=kN(),o=CN(),s=VN(),c=Dj(),l=QD(),u=lj(),d=bD(),f=mN(),p=EN(),m=r.PROPER,h=r.CONFIGURABLE,g=p.IteratorPrototype,_=p.BUGGY_SAFARI_ITERATORS,v=d(`iterator`),y=`keys`,b=`values`,x=`entries`,S=function(){return this};return HN=function(r,d,p,C,w,T,E){a(p,d,C);var D=function(e){if(e===w&&ne)return ne;if(!_&&e&&e in O)return O[e];switch(e){case y:return function(){return new p(this,e)};case b:return function(){return new p(this,e)};case x:return function(){return new p(this,e)}}return function(){return new p(this)}},ee=d+` Iterator`,te=!1,O=r.prototype,k=O[v]||O[`@@iterator`]||w&&O[w],ne=!_&&k||D(w),re=d===`Array`&&O.entries||k,A,ie,ae;if(re&&(A=o(re.call(new r)),A!==Object.prototype&&A.next&&(!n&&o(A)!==g&&(s?s(A,g):i(A[v])||u(A,v,S)),c(A,ee,!0,!0),n&&(f[ee]=S))),m&&w===b&&k&&k.name!==b&&(!n&&h?l(O,`name`,b):(te=!0,ne=function(){return t(k,this)})),w){if(ie={values:D(b),keys:T?ne:D(y),entries:D(x)},E)for(ae in ie)(_||te||!(ae in O))&&u(O,ae,ie[ae]);else e({target:d,proto:!0,forced:_||te},ie)}return(!n||E)&&O[v]!==ne&&u(O,v,ne,{name:w}),f[d]=ne,ie},HN}var GN,KN;function qN(){return KN?GN:(KN=1,GN=function(e,t){return{value:e,done:t}},GN)}var JN,YN;function XN(){if(YN)return JN;YN=1;var e=fE(),t=dN(),n=mN(),r=Nj(),i=YD().f,a=WN(),o=qN(),s=eD(),c=GT(),l=`Array Iterator`,u=r.set,d=r.getterFor(l);JN=a(Array,`Array`,function(t,n){u(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,o(void 0,!0);switch(e.kind){case`keys`:return o(n,!1);case`values`:return o(t[n],!1)}return o([n,t[n]],!1)},`values`);var f=n.Arguments=n.Array;if(t(`keys`),t(`values`),t(`entries`),!s&&c&&f.name!==`values`)try{i(f,`name`,{value:`values`})}catch{}return JN}var ZN,QN;function $N(){return QN?ZN:(QN=1,ZN={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},ZN)}var eP;function tP(){if(eP)return cN;eP=1,XN();var e=$N(),t=ST(),n=Dj(),r=mN();for(var i in e)n(t[i],i),r[i]=r.Array;return cN}var nP,rP;function iP(){if(rP)return nP;rP=1;var e=sN();return tP(),nP=e,nP}var aP={},oP;function sP(){if(oP)return aP;oP=1;var e=bD(),t=YD().f,n=e(`metadata`),r=Function.prototype;return r[n]===void 0&&t(r,n,{value:null}),aP}var cP={},lP;function uP(){return lP?cP:(lP=1,pM(),cP)}var dP={},fP;function pP(){return fP?dP:(fP=1,yM(),dP)}var mP={},hP;function gP(){return hP?mP:(hP=1,vj()(`metadata`),mP)}var _P,vP;function yP(){if(vP)return _P;vP=1;var e=iP();return sP(),uP(),pP(),gP(),_P=e,_P}var bP={},xP,SP;function CP(){if(SP)return xP;SP=1;var e=bE(),t=L(),n=e(`Symbol`),r=n.keyFor,i=t(n.prototype.valueOf);return xP=n.isRegisteredSymbol||function(e){try{return r(i(e))!==void 0}catch{return!1}},xP}var wP;function TP(){return wP?bP:(wP=1,z()({target:`Symbol`,stat:!0},{isRegisteredSymbol:CP()}),bP)}var EP={},DP,OP;function kP(){if(OP)return DP;OP=1;for(var e=cD(),t=bE(),n=L(),r=RE(),i=bD(),a=t(`Symbol`),o=a.isWellKnownSymbol,s=t(`Object`,`getOwnPropertyNames`),c=n(a.prototype.valueOf),l=e(`wks`),u=0,d=s(a),f=d.length;u<f;u++)try{var p=d[u];r(a[p])&&i(p)}catch{}return DP=function(e){if(o&&o(e))return!0;try{for(var t=c(e),n=0,r=s(l),i=r.length;n<i;n++)if(l[r[n]]==t)return!0}catch{}return!1},DP}var AP;function jP(){return AP?EP:(AP=1,z()({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:kP()}),EP)}var MP={},NP;function PP(){return NP?MP:(NP=1,vj()(`customMatcher`),MP)}var FP={},IP;function LP(){return IP?FP:(IP=1,vj()(`observable`),FP)}var RP={},zP;function BP(){return zP?RP:(zP=1,z()({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:CP()}),RP)}var VP={},HP;function UP(){return HP?VP:(HP=1,z()({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:kP()}),VP)}var WP={},GP;function KP(){return GP?WP:(GP=1,vj()(`matcher`),WP)}var qP={},JP;function YP(){return JP?qP:(JP=1,vj()(`metadataKey`),qP)}var XP={},ZP;function QP(){return ZP?XP:(ZP=1,vj()(`patternMatch`),XP)}var $P={},eF;function tF(){return eF?$P:(eF=1,vj()(`replaceAll`),$P)}var nF,rF;function iF(){if(rF)return nF;rF=1;var e=yP();return TP(),jP(),PP(),LP(),BP(),UP(),KP(),YP(),QP(),tF(),nF=e,nF}var aF,oF;function sF(){return oF?aF:(oF=1,aF=iF(),aF)}var cF=F(sF()),lF={},uF,dF;function fF(){if(dF)return uF;dF=1;var e=L(),t=oO(),n=HA(),r=lE(),i=e(``.charAt),a=e(``.charCodeAt),o=e(``.slice),s=function(e){return function(s,c){var l=n(r(s)),u=t(c),d=l.length,f,p;return u<0||u>=d?e?``:void 0:(f=a(l,u),f<55296||f>56319||u+1===d||(p=a(l,u+1))<56320||p>57343?e?i(l,u):f:e?o(l,u,u+2):(f-55296<<10)+(p-56320)+65536)}};return uF={codeAt:s(!1),charAt:s(!0)},uF}var pF;function mF(){if(pF)return lF;pF=1;var e=fF().charAt,t=HA(),n=Nj(),r=WN(),i=qN(),a=`String Iterator`,o=n.set,s=n.getterFor(a);return r(String,`String`,function(e){o(this,{type:a,string:t(e),index:0})},function(){var t=s(this),n=t.string,r=t.index,a;return r>=n.length?i(void 0,!0):(a=e(n,r),t.index+=a.length,i(a,!1))}),lF}var hF,gF;function _F(){if(gF)return hF;gF=1;var e=bA(),t=qE(),n=oE(),r=mN(),i=bD()(`iterator`);return hF=function(a){if(!n(a))return t(a,i)||t(a,`@@iterator`)||r[e(a)]},hF}var vF,yF;function bF(){return yF?vF:(yF=1,XN(),mF(),vF=_F(),vF)}var xF,SF;function CF(){if(SF)return xF;SF=1;var e=bF();return tP(),xF=e,xF}var wF,TF;function EF(){return TF?wF:(TF=1,wF=CF(),wF)}var DF,OF;function kF(){return OF?DF:(OF=1,DF=EF(),DF)}var AF,jF;function MF(){return jF?AF:(jF=1,AF=kF(),AF)}var NF=F(MF()),PF={},FF;function IF(){if(FF)return PF;FF=1;var e=z(),t=dD(),n=hO(),r=mA(),i=cA();return e({target:`Array`,proto:!0,arity:1,forced:I()(function(){return[].push.call({length:4294967296},1)!==4294967297})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var a=t(this),o=n(a),s=arguments.length;i(o+s);for(var c=0;c<s;c++)a[o]=arguments[c],o++;return r(a,o),o}}),PF}var LF,RF;function zF(){return RF?LF:(RF=1,IF(),LF=ok()(`Array`,`push`),LF)}var BF,VF;function HF(){if(VF)return BF;VF=1;var e=CE(),t=zF(),n=Array.prototype;return BF=function(r){var i=r.push;return r===n||e(n,r)&&i===n.push?t:i},BF}var UF,WF;function GF(){return WF?UF:(WF=1,UF=HF(),UF)}var KF,qF;function JF(){return qF?KF:(qF=1,KF=GF(),KF)}var YF,XF;function ZF(){return XF?YF:(XF=1,YF=JF(),YF)}var QF,$F;function eI(){return $F?QF:($F=1,QF=ZF(),QF)}var tI=F(eI());function nI(e,t){var n=e==null?null:cF!==void 0&&NF(e)||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(tI(s).call(s,r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var rI={},iI;function aI(){if(iI)return rI;iI=1;var e=z(),t=zk(),n=EA(),r=hE(),i=lO(),a=hO(),o=fE(),s=dA(),c=mA(),l=bD(),u=FA(),d=QO(),f=u(`slice`),p=l(`species`),m=Array,h=Math.max;return e({target:`Array`,proto:!0,forced:!f},{slice:function(e,l){var u=o(this),f=a(u),g=i(e,f),_=i(l===void 0?f:l,f),v,y,b;if(t(u)&&(v=u.constructor,n(v)&&(v===m||t(v.prototype))?v=void 0:r(v)&&(v=v[p],v===null&&(v=void 0)),v===m||v===void 0))return d(u,g,_);for(y=new(v===void 0?m:v)(h(_-g,0)),b=0;g<_;g++,b++)g in u&&s(y,b,u[g]);return c(y,b),y}}),rI}var oI,sI;function cI(){return sI?oI:(sI=1,aI(),oI=ok()(`Array`,`slice`),oI)}var lI,uI;function dI(){if(uI)return lI;uI=1;var e=CE(),t=cI(),n=Array.prototype;return lI=function(r){var i=r.slice;return r===n||e(n,r)&&i===n.slice?t:i},lI}var fI,pI;function mI(){return pI?fI:(pI=1,fI=dI(),fI)}var hI,gI;function _I(){return gI?hI:(gI=1,hI=mI(),hI)}var vI,yI;function bI(){return yI?vI:(yI=1,vI=_I(),vI)}var xI,SI;function CI(){return SI?xI:(SI=1,xI=bI(),xI)}var wI=F(CI()),TI={},EI,DI;function OI(){if(DI)return EI;DI=1;var e=JT(),t=qD(),n=qE();return EI=function(r,i,a){var o,s;t(r);try{if(o=n(r,`return`),!o){if(i===`throw`)throw a;return a}o=e(o,r)}catch(e){s=!0,o=e}if(i===`throw`)throw a;if(s)throw o;return t(o),a},EI}var kI,AI;function jI(){if(AI)return kI;AI=1;var e=qD(),t=OI();return kI=function(n,r,i,a){try{return a?r(e(i)[0],i[1]):r(i)}catch(e){t(n,`throw`,e)}},kI}var MI,NI;function PI(){if(NI)return MI;NI=1;var e=bD(),t=mN(),n=e(`iterator`),r=Array.prototype;return MI=function(e){return e!==void 0&&(t.Array===e||r[n]===e)},MI}var FI,II;function LI(){if(II)return FI;II=1;var e=JT(),t=WE(),n=qD(),r=VE(),i=_F(),a=TypeError;return FI=function(o,s){var c=arguments.length<2?i(o):s;if(t(c))return n(e(c,o));throw new a(r(o)+` is not iterable`)},FI}var RI,zI;function BI(){if(zI)return RI;zI=1;var e=BD(),t=JT(),n=dD(),r=jI(),i=PI(),a=EA(),o=hO(),s=dA(),c=mA(),l=LI(),u=_F(),d=OI(),f=Array;return RI=function(p){var m=a(this),h=arguments.length,g=h>1?arguments[1]:void 0,_=g!==void 0;_&&(g=e(g,h>2?arguments[2]:void 0));var v=n(p),y=u(v),b=0,x,S,C,w,T,E;if(y&&!(this===f&&i(y)))for(S=m?new this:[],w=l(v,y),T=w.next;!(C=t(T,w)).done;b++){E=_?r(w,g,[C.value,b],!0):C.value;try{s(S,b,E)}catch(e){d(w,`throw`,e)}}else for(x=o(v),S=m?new this(x):f(x);x>b;b++)E=_?g(v[b],b):v[b],s(S,b,E);return c(S,b),S},RI}var VI,HI;function UI(){if(HI)return VI;HI=1;var e=bD()(`iterator`),t=!1;try{var n=0,r={next:function(){return{done:!!n++}},return:function(){t=!0}};r[e]=function(){return this},Array.from(r,function(){throw 2})}catch{}return VI=function(n,r){try{if(!r&&!t)return!1}catch{return!1}var i=!1;try{var a={};a[e]=function(){return{next:function(){return{done:i=!0}}}},n(a)}catch{}return i},VI}var WI;function GI(){if(WI)return TI;WI=1;var e=z(),t=BI();return e({target:`Array`,stat:!0,forced:!UI()(function(e){Array.from(e)})},{from:t}),TI}var KI,qI;function JI(){return qI?KI:(qI=1,mF(),GI(),KI=R().Array.from,KI)}var YI,XI;function ZI(){return XI?YI:(XI=1,YI=JI(),YI)}var QI,$I;function eL(){return $I?QI:($I=1,QI=ZI(),QI)}var tL,nL;function rL(){return nL?tL:(nL=1,tL=eL(),tL)}var iL,aL;function oL(){return aL?iL:(aL=1,iL=rL(),iL)}var sL=F(oL());function cL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function lL(e,t){if(e){var n;if(typeof e==`string`)return cL(e,t);var r=wI(n={}.toString.call(e)).call(n,8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?sL(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cL(e,t):void 0}}function uL(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
7
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dL(e,t){return iA(e)||nI(e,t)||lL(e,t)||uL()}var fL,pL;function mL(){return pL?fL:(pL=1,fL=iP(),fL)}var hL=F(mL()),gL,_L;function vL(){return _L?gL:(_L=1,gL=mI(),gL)}var yL=F(vL()),bL,xL;function SL(){if(xL)return bL;xL=1;var e=bE(),t=L(),n=rj(),r=NO(),i=qD(),a=t([].concat);return bL=e(`Reflect`,`ownKeys`)||function(e){var t=n.f(i(e)),o=r.f;return o?a(t,o(e)):t},bL}var CL,wL;function TL(){return wL?CL:(wL=1,CL=qk(),CL)}var EL=F(TL()),DL={},OL;function kL(){if(OL)return DL;OL=1;var e=z(),t=Ij().map;return e({target:`Array`,proto:!0,forced:!FA()(`map`)},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),DL}var AL,jL;function ML(){return jL?AL:(jL=1,kL(),AL=ok()(`Array`,`map`),AL)}var NL,PL;function FL(){if(PL)return NL;PL=1;var e=CE(),t=ML(),n=Array.prototype;return NL=function(r){var i=r.map;return r===n||e(n,r)&&i===n.map?t:i},NL}var IL,LL;function RL(){return LL?IL:(LL=1,IL=FL(),IL)}var zL,BL;function VL(){return BL?zL:(BL=1,zL=RL(),zL)}var HL=F(VL()),UL={},WL;function GL(){if(WL)return UL;WL=1;var e=z(),t=dD(),n=AO();return e({target:`Object`,stat:!0,forced:I()(function(){n(1)})},{keys:function(e){return n(t(e))}}),UL}var KL,qL;function JL(){return qL?KL:(qL=1,GL(),KL=R().Object.keys,KL)}var YL,XL;function ZL(){return XL?YL:(XL=1,YL=JL(),YL)}var QL,$L;function eR(){return $L?QL:($L=1,QL=ZL(),QL)}var tR=F(eR()),nR={},rR;function iR(){if(rR)return nR;rR=1;var e=z(),t=L(),n=Date,r=t(n.prototype.getTime);return e({target:`Date`,stat:!0},{now:function(){return r(new n)}}),nR}var aR,oR;function sR(){return oR?aR:(oR=1,iR(),aR=R().Date.now,aR)}var cR,lR;function uR(){return lR?cR:(lR=1,cR=sR(),cR)}var dR,fR;function pR(){return fR?dR:(fR=1,dR=uR(),dR)}var mR=F(pR()),hR={},gR,_R;function vR(){if(_R)return gR;_R=1;var e=I();return gR=function(t,n){var r=[][t];return!!r&&e(function(){r.call(null,n||function(){return 1},1)})},gR}var yR,bR;function xR(){if(bR)return yR;bR=1;var e=Ij().forEach;return yR=vR()(`forEach`)?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},yR}var SR;function CR(){if(SR)return hR;SR=1;var e=z(),t=xR();return e({target:`Array`,proto:!0,forced:[].forEach!==t},{forEach:t}),hR}var wR,TR;function ER(){return TR?wR:(TR=1,CR(),wR=ok()(`Array`,`forEach`),wR)}var DR,OR;function kR(){return OR?DR:(OR=1,DR=ER(),DR)}var AR,jR;function MR(){if(jR)return AR;jR=1;var e=bA(),t=mD(),n=CE(),r=kR(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return AR=function(o){var s=o.forEach;return o===i||n(i,o)&&s===i.forEach||t(a,e(o))?r:s},AR}var NR,PR;function FR(){return PR?NR:(PR=1,NR=MR(),NR)}var V=F(FR()),IR={},LR;function RR(){if(LR)return IR;LR=1;var e=z(),t=L(),n=zk(),r=t([].reverse),i=[1,2];return e({target:`Array`,proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return n(this)&&(this.length=this.length),r(this)}}),IR}var zR,BR;function VR(){return BR?zR:(BR=1,RR(),zR=ok()(`Array`,`reverse`),zR)}var HR,UR;function WR(){if(UR)return HR;UR=1;var e=CE(),t=VR(),n=Array.prototype;return HR=function(r){var i=r.reverse;return r===n||e(n,r)&&i===n.reverse?t:i},HR}var GR,KR;function qR(){return KR?GR:(KR=1,GR=WR(),GR)}var JR,YR;function XR(){return YR?JR:(YR=1,JR=qR(),JR)}var ZR=F(XR()),QR={},$R,ez;function tz(){if(ez)return $R;ez=1;var e=VE(),t=TypeError;return $R=function(n,r){if(!delete n[r])throw new t(`Cannot delete property `+e(r)+` of `+e(n))},$R}var nz;function rz(){if(nz)return QR;nz=1;var e=z(),t=dD(),n=lO(),r=oO(),i=hO(),a=mA(),o=cA(),s=MA(),c=dA(),l=tz(),u=FA()(`splice`),d=Math.max,f=Math.min;return e({target:`Array`,proto:!0,forced:!u},{splice:function(e,u){var p=t(this),m=i(p),h=n(e,m),g=arguments.length,_,v,y,b,x,S;for(g===0?_=v=0:g===1?(_=0,v=m-h):(_=g-2,v=f(d(r(u),0),m-h)),o(m+_-v),y=s(p,v),b=0;b<v;b++)x=h+b,x in p&&c(y,b,p[x]);if(a(y,v),_<v){for(b=h;b<m-v;b++)x=b+v,S=b+_,x in p?p[S]=p[x]:l(p,S);for(b=m;b>m-v+_;b--)l(p,b-1)}else if(_>v)for(b=m-v;b>h;b--)x=b+v-1,S=b+_-1,x in p?p[S]=p[x]:l(p,S);for(b=0;b<_;b++)p[b+h]=arguments[b+2];return a(p,m-v+_),y}}),QR}var iz,az;function oz(){return az?iz:(az=1,rz(),iz=ok()(`Array`,`splice`),iz)}var sz,cz;function lz(){if(cz)return sz;cz=1;var e=CE(),t=oz(),n=Array.prototype;return sz=function(r){var i=r.splice;return r===n||e(n,r)&&i===n.splice?t:i},sz}var uz,dz;function fz(){return dz?uz:(dz=1,uz=lz(),uz)}var pz,mz;function hz(){return mz?pz:(mz=1,pz=fz(),pz)}var gz=F(hz()),_z={},vz;function yz(){if(vz)return _z;vz=1;var e=z(),t=vO().includes,n=I(),r=dN(),i=n(function(){return![,].includes()}),a=n(function(){return[,1].includes(void 0,1)});return e({target:`Array`,proto:!0,forced:i||a},{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r(`includes`),_z}var bz,xz;function Sz(){return xz?bz:(xz=1,yz(),bz=ok()(`Array`,`includes`),bz)}var Cz={},wz,Tz;function Ez(){if(Tz)return wz;Tz=1;var e=hE(),t=FT(),n=bD()(`match`);return wz=function(r){var i;return e(r)&&((i=r[n])===void 0?t(r)===`RegExp`:!!i)},wz}var Dz,Oz;function kz(){if(Oz)return Dz;Oz=1;var e=Ez(),t=TypeError;return Dz=function(n){if(e(n))throw new t(`The method doesn't accept regular expressions`);return n},Dz}var Az,jz;function Mz(){if(jz)return Az;jz=1;var e=bD()(`match`);return Az=function(t){var n=/./;try{`/./`[t](n)}catch{try{return n[e]=!1,`/./`[t](n)}catch{}}return!1},Az}var Nz;function Pz(){if(Nz)return Cz;Nz=1;var e=z(),t=L(),n=kz(),r=lE(),i=HA(),a=Mz(),o=t(``.indexOf);return e({target:`String`,proto:!0,forced:!a(`includes`)},{includes:function(e){return!!~o(i(r(this)),i(n(e)),arguments.length>1?arguments[1]:void 0)}}),Cz}var Fz,Iz;function Lz(){return Iz?Fz:(Iz=1,Pz(),Fz=ok()(`String`,`includes`),Fz)}var Rz,zz;function Bz(){if(zz)return Rz;zz=1;var e=CE(),t=Sz(),n=Lz(),r=Array.prototype,i=String.prototype;return Rz=function(a){var o=a.includes;return a===r||e(r,a)&&o===r.includes?t:typeof a==`string`||a===i||e(i,a)&&o===i.includes?n:o},Rz}var Vz,Hz;function Uz(){return Hz?Vz:(Hz=1,Vz=Bz(),Vz)}var Wz,Gz;function Kz(){return Gz?Wz:(Gz=1,Wz=Uz(),Wz)}var qz=F(Kz()),Jz={},Yz;function Xz(){if(Yz)return Jz;Yz=1;var e=z(),t=I(),n=dD(),r=CN(),i=bN();return e({target:`Object`,stat:!0,forced:t(function(){r(1)}),sham:!i},{getPrototypeOf:function(e){return r(n(e))}}),Jz}var Zz,Qz;function $z(){return Qz?Zz:(Qz=1,Xz(),Zz=R().Object.getPrototypeOf,Zz)}var eB,tB;function nB(){return tB?eB:(tB=1,eB=$z(),eB)}var rB,iB;function aB(){return iB?rB:(iB=1,rB=nB(),rB)}var oB=F(aB()),sB,cB;function lB(){return cB?sB:(cB=1,LA(),sB=ok()(`Array`,`concat`),sB)}var uB,dB;function fB(){if(dB)return uB;dB=1;var e=CE(),t=lB(),n=Array.prototype;return uB=function(r){var i=r.concat;return r===n||e(n,r)&&i===n.concat?t:i},uB}var pB,mB;function hB(){return mB?pB:(mB=1,pB=fB(),pB)}var gB,_B;function vB(){return _B?gB:(_B=1,gB=hB(),gB)}var yB=F(vB()),bB={},xB;function SB(){if(xB)return bB;xB=1;var e=z(),t=Ij().filter;return e({target:`Array`,proto:!0,forced:!FA()(`filter`)},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),bB}var CB,wB;function TB(){return wB?CB:(wB=1,SB(),CB=ok()(`Array`,`filter`),CB)}var EB,DB;function OB(){if(DB)return EB;DB=1;var e=CE(),t=TB(),n=Array.prototype;return EB=function(r){var i=r.filter;return r===n||e(n,r)&&i===n.filter?t:i},EB}var kB,AB;function jB(){return AB?kB:(AB=1,kB=OB(),kB)}var MB,NB;function PB(){return NB?MB:(NB=1,MB=jB(),MB)}var FB=F(PB()),IB={},LB,RB;function zB(){if(RB)return LB;RB=1;var e=GT(),t=I(),n=L(),r=CN(),i=AO(),a=fE(),o=ZT().f,s=n(o),c=n([].push),l=e&&t(function(){var e=Object.create(null);return e[2]=2,!s(e,2)}),u=function(t){return function(n){for(var o=a(n),u=i(o),d=l&&r(o)===null,f=u.length,p=0,m=[],h;f>p;)h=u[p++],(!e||(d?h in o:s(o,h)))&&c(m,t?[h,o[h]]:o[h]);return m}};return LB={entries:u(!0),values:u(!1)},LB}var BB;function VB(){if(BB)return IB;BB=1;var e=z(),t=zB().values;return e({target:`Object`,stat:!0},{values:function(e){return t(e)}}),IB}var HB,UB;function WB(){return UB?HB:(UB=1,VB(),HB=R().Object.values,HB)}var GB,KB;function qB(){return KB?GB:(KB=1,GB=WB(),GB)}var JB,YB;function XB(){return YB?JB:(YB=1,JB=qB(),JB)}var ZB=F(XB()),QB={},$B,eV;function tV(){return eV?$B:(eV=1,$B=`
8
+ \v\f\r \xA0               \u2028\u2029`,$B)}var nV,rV;function iV(){if(rV)return nV;rV=1;var e=L(),t=lE(),n=HA(),r=tV(),i=e(``.replace),a=RegExp(`^[`+r+`]+`),o=RegExp(`(^|[^`+r+`])[`+r+`]+$`),s=function(e){return function(r){var s=n(t(r));return e&1&&(s=i(s,a,``)),e&2&&(s=i(s,o,`$1`)),s}};return nV={start:s(1),end:s(2),trim:s(3)},nV}var aV,oV;function sV(){if(oV)return aV;oV=1;var e=ST(),t=I(),n=L(),r=HA(),i=iV().trim,a=tV(),o=e.parseInt,s=e.Symbol,c=s&&s.iterator,l=/^[+-]?0x/i,u=n(l.exec);return aV=o(a+`08`)!==8||o(a+`0x16`)!==22||c&&!t(function(){o(Object(c))})?function(e,t){var n=i(r(e));return o(n,t>>>0||(u(l,n)?16:10))}:o,aV}var cV;function lV(){if(cV)return QB;cV=1;var e=z(),t=sV();return e({global:!0,forced:parseInt!==t},{parseInt:t}),QB}var uV,dV;function fV(){return dV?uV:(dV=1,lV(),uV=R().parseInt,uV)}var pV,mV;function hV(){return mV?pV:(mV=1,pV=fV(),pV)}var gV,_V;function vV(){return _V?gV:(_V=1,gV=hV(),gV)}var yV=F(vV()),bV={},xV;function SV(){if(xV)return bV;xV=1;var e=z(),t=RT(),n=vO().indexOf,r=vR(),i=t([].indexOf),a=!!i&&1/i([1],1,-0)<0;return e({target:`Array`,proto:!0,forced:a||!r(`indexOf`)},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return a?i(this,e,t)||0:n(this,e,t)}}),bV}var CV,wV;function TV(){return wV?CV:(wV=1,SV(),CV=ok()(`Array`,`indexOf`),CV)}var EV,DV;function OV(){if(DV)return EV;DV=1;var e=CE(),t=TV(),n=Array.prototype;return EV=function(r){var i=r.indexOf;return r===n||e(n,r)&&i===n.indexOf?t:i},EV}var kV,AV;function jV(){return AV?kV:(AV=1,kV=OV(),kV)}var MV,NV;function PV(){return NV?MV:(NV=1,MV=jV(),MV)}var H=F(PV()),FV={},IV;function LV(){return IV?FV:(IV=1,z()({target:`Object`,stat:!0,sham:!GT()},{create:ej()}),FV)}var RV,zV;function BV(){if(zV)return RV;zV=1,LV();var e=R().Object;return RV=function(t,n){return e.create(t,n)},RV}var VV,HV;function UV(){return HV?VV:(HV=1,VV=BV(),VV)}var WV,GV;function KV(){return GV?WV:(GV=1,WV=UV(),WV)}var qV=F(KV()),JV={},YV,XV;function ZV(){if(XV)return YV;XV=1;var e=oO(),t=HA(),n=lE(),r=RangeError,i=Math.floor;return YV=function(a){var o=t(n(this)),s=``,c=e(a);if(c<0||c===1/0)throw new r(`Wrong number of repetitions`);for(;c>0;(c=i(c/2))&&(o+=o))c%2&&(s+=o);return s},YV}var QV,$V;function eH(){if($V)return QV;$V=1;var e=L(),t=fO(),n=HA(),r=ZV(),i=lE(),a=e(r),o=e(``.slice),s=Math.ceil,c=function(e){return function(r,c,l){var u=n(i(r)),d=t(c),f=u.length;if(d<=f)return u;var p=l===void 0?` `:n(l),m,h;return p===``?u:(m=d-f,h=a(p,s(m/p.length)),h.length>m&&(h=o(h,0,m)),e?u+h:h+u)}};return QV={start:c(!1),end:c(!0)},QV}var tH,nH;function rH(){if(nH)return tH;nH=1;var e=L(),t=I(),n=eH().start,r=RangeError,i=isFinite,a=Math.abs,o=Date.prototype,s=o.toISOString,c=e(o.getTime),l=e(o.getUTCDate),u=e(o.getUTCFullYear),d=e(o.getUTCHours),f=e(o.getUTCMilliseconds),p=e(o.getUTCMinutes),m=e(o.getUTCMonth),h=e(o.getUTCSeconds);return tH=t(function(){return s.call(new Date(-5e13-1))!==`0385-07-25T07:06:39.999Z`})||!t(function(){s.call(new Date(NaN))})?function(){if(!i(c(this)))throw new r(`Invalid time value`);var e=this,t=u(e),o=f(e),s=t<0?`-`:t>9999?`+`:``;return s+n(a(t),s?6:4,0)+`-`+n(m(e)+1,2,0)+`-`+n(l(e),2,0)+`T`+n(d(e),2,0)+`:`+n(p(e),2,0)+`:`+n(h(e),2,0)+`.`+n(o,3,0)+`Z`}:s,tH}var iH;function aH(){if(iH)return JV;iH=1;var e=z(),t=JT(),n=dD(),r=CD(),i=rH(),a=FT();return e({target:`Date`,proto:!0,forced:I()(function(){return new Date(NaN).toJSON()!==null||t(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1})},{toJSON:function(e){var o=n(this),s=r(o,`number`);return typeof s==`number`&&!isFinite(s)?null:!(`toISOString`in o)&&a(o)===`Date`?t(i,o):o.toISOString()}}),JV}var oH,sH;function cH(){if(sH)return oH;sH=1,aH(),aM();var e=R(),t=AT();return e.JSON||={stringify:JSON.stringify},oH=function(n,r,i){return t(e.JSON.stringify,null,arguments)},oH}var lH,uH;function dH(){return uH?lH:(uH=1,lH=cH(),lH)}var fH,pH;function mH(){return pH?fH:(pH=1,fH=dH(),fH)}var hH=F(mH()),gH={},_H={},vH,yH;function bH(){if(yH)return vH;yH=1;var e=ST(),t=EE(),n=FT(),r=function(e){return t.slice(0,e.length)===e};return vH=(function(){return r(`Bun/`)?`BUN`:r(`Cloudflare-Workers`)?`CLOUDFLARE`:r(`Deno/`)?`DENO`:r(`Node.js/`)?`NODE`:e.Bun&&typeof Bun.version==`string`?`BUN`:e.Deno&&typeof Deno.version==`object`?`DENO`:n(e.process)===`process`?`NODE`:e.window&&e.document?`BROWSER`:`REST`})(),vH}var xH,SH;function CH(){if(SH)return xH;SH=1;var e=TypeError;return xH=function(t,n){if(t<n)throw new e(`Not enough arguments`);return t},xH}var wH,TH;function EH(){if(TH)return wH;TH=1;var e=ST(),t=AT(),n=VT(),r=bH(),i=EE(),a=QO(),o=CH(),s=e.Function,c=/MSIE .\./.test(i)||r===`BUN`&&(function(){var t=e.Bun.version.split(`.`);return t.length<3||t[0]===`0`&&(t[1]<3||t[1]===`3`&&t[2]===`0`)})();return wH=function(e,r){var i=r?2:1;return c?function(c,l){var u=o(arguments.length,1)>i,d=n(c)?c:s(c),f=u?a(arguments,i):[],p=u?function(){t(d,this,f)}:d;return r?e(p,l):e(p)}:e},wH}var DH;function OH(){if(DH)return _H;DH=1;var e=z(),t=ST(),n=EH()(t.setInterval,!0);return e({global:!0,bind:!0,forced:t.setInterval!==n},{setInterval:n}),_H}var kH={},AH;function jH(){if(AH)return kH;AH=1;var e=z(),t=ST(),n=EH()(t.setTimeout,!0);return e({global:!0,bind:!0,forced:t.setTimeout!==n},{setTimeout:n}),kH}var MH;function NH(){return MH?gH:(MH=1,OH(),jH(),gH)}var PH,FH;function IH(){return FH?PH:(FH=1,NH(),PH=R().setTimeout,PH)}var LH,RH;function zH(){return RH?LH:(RH=1,LH=IH(),LH)}var BH=F(zH()),VH={},HH,UH;function WH(){if(UH)return HH;UH=1;var e=dD(),t=lO(),n=hO();return HH=function(r){for(var i=e(this),a=n(i),o=arguments.length,s=t(o>1?arguments[1]:void 0,a),c=o>2?arguments[2]:void 0,l=c===void 0?a:t(c,a);l>s;)i[s++]=r;return i},HH}var GH;function KH(){if(GH)return VH;GH=1;var e=z(),t=WH(),n=dN();return e({target:`Array`,proto:!0},{fill:t}),n(`fill`),VH}var qH,JH;function YH(){return JH?qH:(JH=1,KH(),qH=ok()(`Array`,`fill`),qH)}var XH,ZH;function QH(){if(ZH)return XH;ZH=1;var e=CE(),t=YH(),n=Array.prototype;return XH=function(r){var i=r.fill;return r===n||e(n,r)&&i===n.fill?t:i},XH}var $H,eU;function tU(){return eU?$H:(eU=1,$H=QH(),$H)}var nU,rU;function iU(){return rU?nU:(rU=1,nU=tU(),nU)}var aU=F(iU());function oU(){return oU=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oU.apply(this,arguments)}function sU(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function cU(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var lU=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t},uU=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],dU=typeof document>`u`?{style:{}}:document.createElement(`div`),fU=`function`,pU=Math.round,mU=Math.abs,hU=Date.now;function gU(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<uU.length;){if(n=uU[a],r=n?n+i:t,r in e)return r;a++}}var _U=typeof window>`u`?{}:window,vU=gU(dU.style,`touchAction`),yU=vU!==void 0;function bU(){if(!yU)return!1;var e={},t=_U.CSS&&_U.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach(function(n){return e[n]=!t||_U.CSS.supports(`touch-action`,n)}),e}var xU=`compute`,SU=`auto`,CU=`manipulation`,wU=`none`,TU=`pan-x`,EU=`pan-y`,DU=bU(),OU=/mobile|tablet|ip(ad|hone|od)|android/i,kU=`ontouchstart`in _U,AU=gU(_U,`PointerEvent`)!==void 0,jU=kU&&OU.test(navigator.userAgent),MU=`touch`,NU=`pen`,PU=`mouse`,FU=`kinect`,IU=25,LU=1,RU=2,zU=4,BU=8,VU=1,HU=2,UU=4,WU=8,GU=16,KU=HU|UU,qU=WU|GU,JU=KU|qU,YU=[`x`,`y`],XU=[`clientX`,`clientY`];function ZU(e,t,n){var r;if(e){if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}}function QU(e,t){return typeof e===fU?e.apply(t&&t[0]||void 0,t):e}function $U(e,t){return e.indexOf(t)>-1}function eW(e){if($U(e,wU))return wU;var t=$U(e,TU),n=$U(e,EU);return t&&n?wU:t||n?t?TU:EU:$U(e,CU)?CU:SU}var tW=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===xU&&(e=this.compute()),yU&&this.manager.element.style&&DU[e]&&(this.manager.element.style[vU]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return ZU(this.manager.recognizers,function(t){QU(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),eW(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented){t.preventDefault();return}var r=this.actions,i=$U(r,wU)&&!DU[wU],a=$U(r,EU)&&!DU[EU],o=$U(r,TU)&&!DU[TU];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!(o&&a)&&(i||a&&n&KU||o&&n&qU))return this.preventSrc(t)},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function nW(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function rW(e){var t=e.length;if(t===1)return{x:pU(e[0].clientX),y:pU(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:pU(n/t),y:pU(r/t)}}function iW(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:pU(e.pointers[n].clientX),clientY:pU(e.pointers[n].clientY)},n++;return{timeStamp:hU(),pointers:t,center:rW(t),deltaX:e.deltaX,deltaY:e.deltaY}}function aW(e,t,n){n||=YU;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function oW(e,t,n){n||=YU;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.atan2(i,r)*180/Math.PI}function sW(e,t){return e===t?VU:mU(e)>=mU(t)?e<0?HU:UU:t<0?WU:GU}function cW(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===LU||a.eventType===zU)&&(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}function lW(e,t,n){return{x:t/e||0,y:n/e||0}}function uW(e,t){return aW(t[0],t[1],XU)/aW(e[0],e[1],XU)}function dW(e,t){return oW(t[1],t[0],XU)+oW(e[1],e[0],XU)}function fW(e,t){var n=e.lastInterval||t,r=t.timeStamp-n.timeStamp,i,a,o,s;if(t.eventType!==BU&&(r>IU||n.velocity===void 0)){var c=t.deltaX-n.deltaX,l=t.deltaY-n.deltaY,u=lW(r,c,l);a=u.x,o=u.y,i=mU(u.x)>mU(u.y)?u.x:u.y,s=sW(c,l),e.lastInterval=t}else i=n.velocity,a=n.velocityX,o=n.velocityY,s=n.direction;t.velocity=i,t.velocityX=a,t.velocityY=o,t.direction=s}function pW(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=iW(t),i>1&&!n.firstMultiple?n.firstMultiple=iW(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=rW(r);t.timeStamp=hU(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=oW(s,c),t.distance=aW(s,c),cW(n,t),t.offsetDirection=sW(t.deltaX,t.deltaY);var l=lW(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=mU(l.x)>mU(l.y)?l.x:l.y,t.scale=o?uW(o.pointers,r):1,t.rotation=o?dW(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,fW(n,t);var u=e.element,d=t.srcEvent,f=d.composedPath?d.composedPath()[0]:d.path?d.path[0]:d.target;nW(f,u)&&(u=f),t.target=u}function mW(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&LU&&r-i===0,o=t&(zU|BU)&&r-i===0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,pW(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function hW(e){return e.trim().split(/\s+/g)}function gW(e,t,n){ZU(hW(t),function(t){e.addEventListener(t,n,!1)})}function _W(e,t,n){ZU(hW(t),function(t){e.removeEventListener(t,n,!1)})}function vW(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var yW=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){QU(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&gW(this.element,this.evEl,this.domHandler),this.evTarget&&gW(this.target,this.evTarget,this.domHandler),this.evWin&&gW(vW(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&_W(this.element,this.evEl,this.domHandler),this.evTarget&&_W(this.target,this.evTarget,this.domHandler),this.evWin&&_W(vW(this.element),this.evWin,this.domHandler)},e}();function bW(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var xW={pointerdown:LU,pointermove:RU,pointerup:zU,pointercancel:BU,pointerout:BU},SW={2:MU,3:NU,4:PU,5:FU},CW=`pointerdown`,wW=`pointermove pointerup pointercancel`;_U.MSPointerEvent&&!_U.PointerEvent&&(CW=`MSPointerDown`,wW=`MSPointerMove MSPointerUp MSPointerCancel`);var TW=function(e){sU(t,e);function t(){var n,r=t.prototype;return r.evEl=CW,r.evWin=wW,n=e.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var n=t.prototype;return n.handler=function(e){var t=this.store,n=!1,r=xW[e.type.toLowerCase().replace(`ms`,``)],i=SW[e.pointerType]||e.pointerType,a=i===MU,o=bW(t,e.pointerId,`pointerId`);r&LU&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(zU|BU)&&(n=!0),!(o<0)&&(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))},t}(yW);function EW(e){return Array.prototype.slice.call(e,0)}function DW(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];bW(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort(function(e,n){return e[t]>n[t]}):r.sort()),r}var OW={touchstart:LU,touchmove:RU,touchend:zU,touchcancel:BU},kW=`touchstart touchmove touchend touchcancel`,AW=function(e){sU(t,e);function t(){var n;return t.prototype.evTarget=kW,n=e.apply(this,arguments)||this,n.targetIds={},n}var n=t.prototype;return n.handler=function(e){var t=OW[e.type],n=jW.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:MU,srcEvent:e})},t}(yW);function jW(e,t){var n=EW(e.touches),r=this.targetIds;if(t&(LU|RU)&&n.length===1)return r[n[0].identifier]=!0,[n,n];var i,a,o=EW(e.changedTouches),s=[],c=this.target;if(a=n.filter(function(e){return nW(e.target,c)}),t===LU)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),t&(zU|BU)&&delete r[o[i].identifier],i++;if(s.length)return[DW(a.concat(s),`identifier`,!0),s]}var MW={mousedown:LU,mousemove:RU,mouseup:zU},NW=`mousedown`,PW=`mousemove mouseup`,FW=function(e){sU(t,e);function t(){var n,r=t.prototype;return r.evEl=NW,r.evWin=PW,n=e.apply(this,arguments)||this,n.pressed=!1,n}var n=t.prototype;return n.handler=function(e){var t=MW[e.type];t&LU&&e.button===0&&(this.pressed=!0),t&RU&&e.which!==1&&(t=zU),this.pressed&&(t&zU&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:PU,srcEvent:e}))},t}(yW),IW=2500,LW=25;function RW(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},IW)}}function zW(e,t){e&LU?(this.primaryTouch=t.changedPointers[0].identifier,RW.call(this,t)):e&(zU|BU)&&RW.call(this,t)}function BW(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=LW&&o<=LW)return!0}return!1}var VW=function(){return function(e){sU(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.handler=function(e,t,n){var i=n.pointerType===MU,a=n.pointerType===PU;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)zW.call(cU(cU(r)),t,n);else if(a&&BW.call(cU(cU(r)),n))return;r.callback(e,t,n)}},r.touch=new AW(r.manager,r.handler),r.mouse=new FW(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}var n=t.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(yW)}();function HW(e){var t;return t=e.options.inputClass||(AU?TW:jU?AW:kU?VW:FW),new t(e,mW)}function UW(e,t,n){return Array.isArray(e)?(ZU(e,n[t],n),!0):!1}var WW=1,GW=2,KW=4,qW=8,JW=qW,YW=16,XW=32,ZW=1;function QW(){return ZW++}function $W(e,t){var n=t.manager;return n?n.get(e):e}function eG(e){return e&YW?`cancel`:e&qW?`end`:e&KW?`move`:e&GW?`start`:``}var tG=function(){function e(e){e===void 0&&(e={}),this.options=oU({enable:!0},e),this.id=QW(),this.manager=null,this.state=WW,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return lU(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(UW(e,`recognizeWith`,this))return this;var t=this.simultaneous;return e=$W(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return UW(e,`dropRecognizeWith`,this)?this:(e=$W(e,this),delete this.simultaneous[e.id],this)},t.requireFailure=function(e){if(UW(e,`requireFailure`,this))return this;var t=this.requireFail;return e=$W(e,this),bW(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(UW(e,`dropRequireFailure`,this))return this;e=$W(e,this);var t=bW(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<qW&&r(t.options.event+eG(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=qW&&r(t.options.event+eG(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=XW},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(XW|WW)))return!1;e++}return!0},t.recognize=function(e){var t=lU({},e);if(!QU(this.options.enable,[this,t])){this.reset(),this.state=XW;return}this.state&(JW|YW|XW)&&(this.state=WW),this.state=this.process(t),this.state&(GW|KW|qW|YW)&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),nG=function(e){sU(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,oU({event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var n=t.prototype;return n.getTouchAction=function(){return[CU]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime<n.time;if(this.reset(),e.eventType&LU&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==zU)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<n.interval,s=!this.pCenter||aW(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,!s||!o?this.count=1:this.count+=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){t.state=JW,t.tryEmit()},n.interval),GW):JW}return XW},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=XW},this.options.interval),XW},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===JW&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(tG),rG=function(e){sU(t,e);function t(t){return t===void 0&&(t={}),e.call(this,oU({pointers:1},t))||this}var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=t&(GW|KW),i=this.attrTest(e);return r&&(n&BU||!i)?t|YW:r||i?n&zU?t|qW:t&GW?t|KW:GW:XW},t}(tG);function iG(e){return e===GU?`down`:e===WU?`up`:e===HU?`left`:e===UU?`right`:``}var aG=function(e){sU(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,oU({event:`pan`,threshold:10,pointers:1,direction:JU},t))||this,n.pX=null,n.pY=null,n}var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&KU&&t.push(EU),e&qU&&t.push(TU),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&KU?(i=a===0?VU:a<0?HU:UU,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?VU:o<0?WU:GU,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return rG.prototype.attrTest.call(this,e)&&(this.state&GW||!(this.state&GW)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=iG(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(rG),oG=function(e){sU(t,e);function t(t){return t===void 0&&(t={}),e.call(this,oU({event:`swipe`,threshold:10,velocity:.3,direction:KU|qU,pointers:1},t))||this}var n=t.prototype;return n.getTouchAction=function(){return aG.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n=this.options.direction,r;return n&(KU|qU)?r=t.overallVelocity:n&KU?r=t.overallVelocityX:n&qU&&(r=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&mU(r)>this.options.velocity&&t.eventType&zU},n.emit=function(e){var t=iG(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(rG),sG=function(e){sU(t,e);function t(t){return t===void 0&&(t={}),e.call(this,oU({event:`pinch`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[wU]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&GW)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(rG),cG=function(e){sU(t,e);function t(t){return t===void 0&&(t={}),e.call(this,oU({event:`rotate`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[wU]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&GW)},t}(rG),lG=function(e){sU(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,oU({event:`press`,pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var n=t.prototype;return n.getTouchAction=function(){return[SU]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(zU|BU)&&!a)this.reset();else if(e.eventType&LU)this.reset(),this._timer=setTimeout(function(){t.state=JW,t.tryEmit()},n.time);else if(e.eventType&zU)return JW;return XW},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===JW&&(e&&e.eventType&zU?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=hU(),this.manager.emit(this.options.event,this._input)))},t}(tG),uG={domEvents:!1,touchAction:xU,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},dG=[[cG,{enable:!1}],[sG,{enable:!1},[`rotate`]],[oG,{direction:KU}],[aG,{direction:KU},[`swipe`]],[nG],[nG,{event:`doubletap`,taps:2},[`tap`]],[lG]],fG=1,pG=2;function mG(e,t){var n=e.element;if(n.style){var r;ZU(e.options.cssProps,function(i,a){r=gU(n.style,a),t?(e.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=e.oldCssProps[r]||``}),t||(e.oldCssProps={})}}function hG(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var gG=function(){function e(e,t){var n=this;this.options=lU({},uG,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=HW(this),this.touchAction=new tW(this,this.options.touchAction),mG(this,!0),ZU(this.options.recognizers,function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}var t=e.prototype;return t.set=function(e){return lU(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?pG:fG},t.recognize=function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,r=this.recognizers,i=t.curRecognizer;(!i||i&&i.state&JW)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped!==pG&&(!i||n===i||n.canRecognizeWith(i))?n.recognize(e):n.reset(),!i&&n.state&(GW|KW|qW)&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof tG)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(UW(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(UW(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=bW(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return ZU(hW(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return ZU(hW(e),function(e){t?n[e]&&n[e].splice(bW(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&hG(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(!(!n||!n.length)){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&mG(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),_G={touchstart:LU,touchmove:RU,touchend:zU,touchcancel:BU},vG=`touchstart`,yG=`touchstart touchmove touchend touchcancel`,bG=function(e){sU(t,e);function t(){var n,r=t.prototype;return r.evTarget=vG,r.evWin=yG,n=e.apply(this,arguments)||this,n.started=!1,n}var n=t.prototype;return n.handler=function(e){var t=_G[e.type];if(t===LU&&(this.started=!0),this.started){var n=xG.call(this,e,t);t&(zU|BU)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:MU,srcEvent:e})}},t}(yW);function xG(e,t){var n=EW(e.touches),r=EW(e.changedTouches);return t&(zU|BU)&&(n=DW(n.concat(r),`identifier`,!0)),[n,r]}function SG(e,t,n){var r=`DEPRECATED METHOD: `+t+`
9
+ `+n+` AT
10
+ `;return function(){var t=Error(`get-stack-trace`),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,``).replace(/^\s+at\s+/gm,``).replace(/^Object.<anonymous>\s*\(/gm,`{anonymous}()@`):`Unknown Stack Trace`,i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),e.apply(this,arguments)}}var CG=SG(function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&e[r[i]]===void 0)&&(e[r[i]]=t[r[i]]),i++;return e},`extend`,"Use `assign`."),wG=SG(function(e,t){return CG(e,t,!0)},`merge`,"Use `assign`.");function TG(e,t,n){var r=t.prototype,i=e.prototype=Object.create(r);i.constructor=e,i._super=r,n&&lU(i,n)}function EG(e,t){return function(){return e.apply(t,arguments)}}var DG=function(){var e=function(e,t){return t===void 0&&(t={}),new gG(e,oU({recognizers:dG.concat()},t))};return e.VERSION=`2.0.17-rc`,e.DIRECTION_ALL=JU,e.DIRECTION_DOWN=GU,e.DIRECTION_LEFT=HU,e.DIRECTION_RIGHT=UU,e.DIRECTION_UP=WU,e.DIRECTION_HORIZONTAL=KU,e.DIRECTION_VERTICAL=qU,e.DIRECTION_NONE=VU,e.DIRECTION_DOWN=GU,e.INPUT_START=LU,e.INPUT_MOVE=RU,e.INPUT_END=zU,e.INPUT_CANCEL=BU,e.STATE_POSSIBLE=WW,e.STATE_BEGAN=GW,e.STATE_CHANGED=KW,e.STATE_ENDED=qW,e.STATE_RECOGNIZED=JW,e.STATE_CANCELLED=YW,e.STATE_FAILED=XW,e.Manager=gG,e.Input=yW,e.TouchAction=tW,e.TouchInput=AW,e.MouseInput=FW,e.PointerEventInput=TW,e.TouchMouseInput=VW,e.SingleTouchInput=bG,e.Recognizer=tG,e.AttrRecognizer=rG,e.Tap=nG,e.Pan=aG,e.Swipe=oG,e.Pinch=sG,e.Rotate=cG,e.Press=lG,e.on=gW,e.off=_W,e.each=ZU,e.merge=wG,e.extend=CG,e.bindFn=EG,e.assign=lU,e.inherit=TG,e.bindFn=EG,e.prefixed=gU,e.toArray=EW,e.inArray=bW,e.uniqueArray=DW,e.splitStr=hW,e.boolOrFn=QU,e.hasParent=nW,e.addEventListeners=gW,e.removeEventListeners=_W,e.defaults=lU({},uG,{preset:dG}),e}();DG.defaults,hL(`DELETE`);function OG(){var e=[...arguments];return kG(e.length?e:[mR()])}function kG(e){let t=dL(AG(e),3),n=t[0],r=t[1],i=t[2],a=1,o=()=>{let e=2091639*n+a*23283064365386963e-26;return n=r,r=i,i=e-(a=e|0)};return o.uint32=()=>o()*4294967296,o.fract53=()=>o()+(o()*2097152|0)*11102230246251565e-32,o.algorithm=`Alea`,o.seed=e,o.version=`0.9`,o}function AG(){let e=jG(),t=e(` `),n=e(` `),r=e(` `);for(let i=0;i<arguments.length;i++)t-=e(i<0||arguments.length<=i?void 0:arguments[i]),t<0&&(t+=1),n-=e(i<0||arguments.length<=i?void 0:arguments[i]),n<0&&(n+=1),r-=e(i<0||arguments.length<=i?void 0:arguments[i]),r<0&&(r+=1);return[t,n,r]}function jG(){let e=4022871197;return function(t){let n=t.toString();for(let t=0;t<n.length;t++){e+=n.charCodeAt(t);let r=.02519603282416938*e;e=r>>>0,r-=e,r*=e,e=r>>>0,r-=e,e+=r*4294967296}return(e>>>0)*23283064365386963e-26}}function MG(){let e=()=>{};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var NG=typeof window<`u`?window.Hammer||DG:function(){return MG()};function PG(e){var t;this._cleanupQueue=[],this.active=!1,this._dom={container:e,overlay:document.createElement(`div`)},this._dom.overlay.classList.add(`vis-overlay`),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});let n=NG(this._dom.overlay);n.on(`tap`,B(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push(()=>{n.destroy()});let r=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];V(r).call(r,e=>{n.on(e,e=>{e.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=t=>{FG(t.target,e)||this.deactivate()},document.body.addEventListener(`click`,this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener(`click`,this._onClick)})),this._escListener=e=>{(`key`in e?e.key===`Escape`:e.keyCode===27)&&this.deactivate()}}Fk(PG.prototype),PG.current=null,PG.prototype.destroy=function(){this.deactivate();for(let n of ZR(e=gz(t=this._cleanupQueue).call(t,0)).call(e)){var e,t;n()}},PG.prototype.activate=function(){PG.current&&PG.current.deactivate(),PG.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)},PG.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`)},PG.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};function FG(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var IG=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,LG=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,RG=/^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,zG=/^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 BG(e){if(e)for(;e.hasChildNodes()===!0;){let t=e.firstChild;t&&(BG(t),e.removeChild(t))}}function VG(e){return e instanceof String||typeof e==`string`}function HG(e){return typeof e==`object`&&!!e}function UG(e,t,n,r){let i=!1;r===!0&&(i=t[n]===null&&e[n]!==void 0),i?delete e[n]:e[n]=t[n]}function WG(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];for(let r in e)if(t[r]!==void 0){if(t[r]===null||typeof t[r]!=`object`)UG(e,t,r,n);else{let i=e[r],a=t[r];HG(i)&&HG(a)&&WG(i,a,n)}}}function GG(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(EL(n))throw TypeError(`Arrays are not supported by deepExtend`);for(let i=0;i<e.length;i++){let a=e[i];if(Object.prototype.hasOwnProperty.call(n,a)){if(n[a]&&n[a].constructor===Object)t[a]===void 0&&(t[a]={}),t[a].constructor===Object?U(t[a],n[a],!1,r):UG(t,n,a,r);else if(EL(n[a]))throw TypeError(`Arrays are not supported by deepExtend`);else UG(t,n,a,r)}}return t}function KG(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(EL(n))throw TypeError(`Arrays are not supported by deepExtend`);for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&!qz(e).call(e,i)){if(n[i]&&n[i].constructor===Object)t[i]===void 0&&(t[i]={}),t[i].constructor===Object?U(t[i],n[i]):UG(t,n,i,r);else if(EL(n[i])){t[i]=[];for(let e=0;e<n[i].length;e++)t[i].push(n[i][e])}else UG(t,n,i,r)}return t}function U(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];for(let a in t)if(Object.prototype.hasOwnProperty.call(t,a)||n===!0){if(typeof t[a]==`object`&&t[a]!==null&&oB(t[a])===Object.prototype)e[a]===void 0?e[a]=U({},t[a],n):typeof e[a]==`object`&&e[a]!==null&&oB(e[a])===Object.prototype?U(e[a],t[a],n):UG(e,t,a,r);else if(EL(t[a])){var i;e[a]=yL(i=t[a]).call(i)}else UG(e,t,a,r)}return e}function qG(e,t){return[...e,t]}function JG(e){return yL(e).call(e)}function YG(e){return e.getBoundingClientRect().left}function XG(e){return e.getBoundingClientRect().top}function W(e,t){if(EL(e)){let n=e.length;for(let r=0;r<n;r++)t(e[r],r,e)}else for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(e[n],n,e)}function ZG(e){let t;switch(e.length){case 3:case 4:return t=LG.exec(e),t?{r:yV(t[1]+t[1],16),g:yV(t[2]+t[2],16),b:yV(t[3]+t[3],16)}:null;case 6:case 7:return t=IG.exec(e),t?{r:yV(t[1],16),g:yV(t[2],16),b:yV(t[3],16)}:null;default:return null}}function QG(e,t){if(qz(e).call(e,`rgba`))return e;if(qz(e).call(e,`rgb`)){let n=e.substr(H(e).call(e,`(`)+1).replace(`)`,``).split(`,`);return`rgba(`+n[0]+`,`+n[1]+`,`+n[2]+`,`+t+`)`}{let n=ZG(e);return n==null?e:`rgba(`+n.r+`,`+n.g+`,`+n.b+`,`+t+`)`}}function $G(e,t,n){var r;return`#`+yL(r=((1<<24)+(e<<16)+(t<<8)+n).toString(16)).call(r,1)}function eK(e,t){if(VG(e)){let t=e;if(oK(t)){var n;let e=HL(n=t.substr(4).substr(0,t.length-5).split(`,`)).call(n,function(e){return yV(e)});t=$G(e[0],e[1],e[2])}if(aK(t)===!0){let e=iK(t),n={h:e.h,s:e.s*.8,v:Math.min(1,e.v*1.02)},r={h:e.h,s:Math.min(1,e.s*1.25),v:e.v*.8},i=rK(r.h,r.s,r.v),a=rK(n.h,n.s,n.v);return{background:t,border:i,highlight:{background:a,border:i},hover:{background:a,border:i}}}return{background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}return{background:e.background||void 0,border:e.border||void 0,highlight:VG(e.highlight)?{border:e.highlight,background:e.highlight}:{background:e.highlight&&e.highlight.background||void 0,border:e.highlight&&e.highlight.border||void 0},hover:VG(e.hover)?{border:e.hover,background:e.hover}:{border:e.hover&&e.hover.border||void 0,background:e.hover&&e.hover.background||void 0}}}function tK(e,t,n){e/=255,t/=255,n/=255;let r=Math.min(e,Math.min(t,n)),i=Math.max(e,Math.max(t,n));if(r===i)return{h:0,s:0,v:r};let a=e===r?t-n:n===r?e-t:n-e;return{h:60*((e===r?3:n===r?1:5)-a/(i-r))/360,s:(i-r)/i,v:i}}function nK(e,t,n){let r,i,a,o=Math.floor(e*6),s=e*6-o,c=n*(1-t),l=n*(1-s*t),u=n*(1-(1-s)*t);switch(o%6){case 0:r=n,i=u,a=c;break;case 1:r=l,i=n,a=c;break;case 2:r=c,i=n,a=u;break;case 3:r=c,i=l,a=n;break;case 4:r=u,i=c,a=n;break;case 5:r=n,i=c,a=l}return{r:Math.floor(r*255),g:Math.floor(i*255),b:Math.floor(a*255)}}function rK(e,t,n){let r=nK(e,t,n);return $G(r.r,r.g,r.b)}function iK(e){let t=ZG(e);if(!t)throw TypeError(`'${e}' is not a valid color.`);return tK(t.r,t.g,t.b)}function aK(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)}function oK(e){return RG.test(e)}function sK(e){return zG.test(e)}function cK(e){if(typeof e!=`object`||!e)return null;if(e instanceof Element)return e;let t=qV(e);for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&typeof e[n]==`object`&&(t[n]=cK(e[n]));return t}function lK(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=function(e){return e!=null},a=function(e){return typeof e==`object`&&!!e},o=function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0};if(!a(e))throw Error(`Parameter mergeTarget must be an object`);if(!a(t))throw Error(`Parameter options must be an object`);if(!i(n))throw Error(`Parameter option must have a value`);if(!a(r))throw Error(`Parameter globalOptions must be an object`);let s=function(e,t,n){a(e[n])||(e[n]={});let r=t[n],i=e[n];for(let e in r)Object.prototype.hasOwnProperty.call(r,e)&&(i[e]=r[e])},c=t[n],l=a(r)&&!o(r)?r[n]:void 0,u=l?l.enabled:void 0;if(c===void 0)return;if(typeof c==`boolean`){a(e[n])||(e[n]={}),e[n].enabled=c;return}if(c===null&&!a(e[n])){if(i(l))e[n]=qV(l);else return}if(!a(c))return;let d=!0;c.enabled===void 0?u!==void 0&&(d=l.enabled):d=c.enabled,s(e,t,n),e[n].enabled=d}var uK={linear(e){return e},easeInQuad(e){return e*e},easeOutQuad(e){return e*(2-e)},easeInOutQuad(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic(e){return e*e*e},easeOutCubic(e){return--e*e*e+1},easeInOutCubic(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart(e){return e*e*e*e},easeOutQuart(e){return 1- --e*e*e*e},easeInOutQuart(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint(e){return e*e*e*e*e},easeOutQuint(e){return 1+--e*e*e*e*e},easeInOutQuint(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};function dK(e,t){let n;EL(t)||(t=[t]);for(let r of e)if(r){n=r[t[0]];for(let e=1;e<t.length;e++)n&&=n[t[e]];if(n!==void 0)break}return n}var fK={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`},pK=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.pixelRatio=e,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=()=>{},this.closeCallback=()=>{},this._create()}insertTo(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(e){if(typeof e==`function`)this.updateCallback=e;else throw Error(`Function attempted to set as colorPicker update callback is not a function.`)}setCloseCallback(e){if(typeof e==`function`)this.closeCallback=e;else throw Error(`Function attempted to set as colorPicker closing callback is not a function.`)}_isColorString(e){if(typeof e==`string`)return fK[e]}setColor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e===`none`)return;let n,r=this._isColorString(e);if(r!==void 0&&(e=r),VG(e)===!0){if(oK(e)===!0){let t=e.substr(4).substr(0,e.length-5).split(`,`);n={r:t[0],g:t[1],b:t[2],a:1}}else if(sK(e)===!0){let t=e.substr(5).substr(0,e.length-6).split(`,`);n={r:t[0],g:t[1],b:t[2],a:t[3]}}else if(aK(e)===!0){let t=ZG(e);n={r:t.r,g:t.g,b:t.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){let t=e.a===void 0?`1.0`:e.a;n={r:e.r,g:e.g,b:e.b,a:t}}if(n===void 0)throw Error(`Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: `+hH(e));this._setColor(n,t)}show(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display=`block`,this._generateHueCircle()}_hide(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)===!0&&(this.previousColor=JO({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display=`none`,BH(()=>{this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){this.previousColor===void 0?alert(`There is no last color to load...`):this.setColor(this.previousColor,!1)}_setColor(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)===!0&&(this.initialColor=JO({},e)),this.color=e;let t=tK(e.r,e.g,e.b),n=2*Math.PI,r=this.r*t.s,i=this.centerCoordinates.x+r*Math.sin(n*t.h),a=this.centerCoordinates.y+r*Math.cos(n*t.h);this.colorPickerSelector.style.left=i-.5*this.colorPickerSelector.clientWidth+`px`,this.colorPickerSelector.style.top=a-.5*this.colorPickerSelector.clientHeight+`px`,this._updatePicker(e)}_setOpacity(e){this.color.a=e/100,this._updatePicker(this.color)}_setBrightness(e){let t=tK(this.color.r,this.color.g,this.color.b);t.v=e/100;let n=nK(t.h,t.s,t.v);n.a=this.color.a,this.color=n,this._updatePicker()}_updatePicker(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=tK(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);let r=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,r,i),n.putImageData(this.hueCircle,0,0),n.fillStyle=`rgba(0,0,0,`+(1-t.v)+`)`,n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),aU(n).call(n),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}_setSize(){this.colorPickerCanvas.style.width=`100%`,this.colorPickerCanvas.style.height=`100%`,this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var e,t,n,r;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){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),this.colorPickerCanvas.getContext(`2d`).setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{let 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.colorPickerCanvas.appendChild(e)}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);let i=this;this.opacityRange.onchange=function(){i._setOpacity(this.value)},this.opacityRange.oninput=function(){i._setOpacity(this.value)},this.brightnessRange.onchange=function(){i._setBrightness(this.value)},this.brightnessRange.oninput=function(){i._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=B(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=B(t=this._apply).call(t,this),this.saveButton=document.createElement(`div`),this.saveButton.className=`vis-button vis-save`,this.saveButton.innerText=`save`,this.saveButton.onclick=B(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=B(r=this._loadLast).call(r,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)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new NG(this.colorPickerCanvas),this.hammer.get(`pinch`).set({enable:!0}),this.hammer.on(`hammer.input`,e=>{e.isFirst&&this._moveSelector(e)}),this.hammer.on(`tap`,e=>{this._moveSelector(e)}),this.hammer.on(`panstart`,e=>{this._moveSelector(e)}),this.hammer.on(`panmove`,e=>{this._moveSelector(e)}),this.hammer.on(`panend`,e=>{this._moveSelector(e)})}_generateHueCircle(){if(this.generated===!1){let 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);let t=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,n);let r,i,a,o;this.centerCoordinates={x:t*.5,y:n*.5},this.r=.49*t;let s=2*Math.PI/360,c=1/this.r,l;for(a=0;a<360;a++)for(o=0;o<this.r;o++)r=this.centerCoordinates.x+o*Math.sin(s*a),i=this.centerCoordinates.y+o*Math.cos(s*a),l=nK(a*.002777777777777778,o*c,1),e.fillStyle=`rgb(`+l.r+`,`+l.g+`,`+l.b+`)`,e.fillRect(r-.5,i-.5,2,2);e.strokeStyle=`rgba(0,0,0,1)`,e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,t,n)}this.generated=!0}_moveSelector(e){let t=this.colorPickerDiv.getBoundingClientRect(),n=e.center.x-t.left,r=e.center.y-t.top,i=.5*this.colorPickerDiv.clientHeight,a=.5*this.colorPickerDiv.clientWidth,o=n-a,s=r-i,c=Math.atan2(o,s),l=.98*Math.min(Math.sqrt(o*o+s*s),a),u=Math.cos(c)*l+i,d=Math.sin(c)*l+a;this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+`px`,this.colorPickerSelector.style.left=d-.5*this.colorPickerSelector.clientWidth+`px`;let f=c/(2*Math.PI);f=f<0?f+1:f;let p=l/this.r,m=tK(this.color.r,this.color.g,this.color.b);m.h=f,m.s=p;let h=nK(m.h,m.s,m.v);h.a=this.color.a,this.color=h,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+`)`}};function mK(){var e=[...arguments];if(e.length<1)throw TypeError(`Invalid arguments.`);if(e.length===1)return document.createTextNode(e[0]);{let t=document.createElement(e[0]);return t.appendChild(mK(...yL(e).call(e,1))),t}}var hK=class{constructor(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:()=>!1;this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.hideOption=i,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},JO(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new pK(r),this.wrapper=void 0}setOptions(e){if(e!==void 0){this.popupHistory={},this._removePopup();let t=!0;if(typeof e==`string`)this.options.filter=e;else if(EL(e))this.options.filter=e.join();else if(typeof e==`object`){if(e==null)throw TypeError(`options cannot be null`);e.container!==void 0&&(this.options.container=e.container),FB(e)!==void 0&&(this.options.filter=FB(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e==`boolean`?(this.options.filter=!0,t=e):typeof e==`function`&&(this.options.filter=e,t=!0);FB(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}setModuleOptions(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];let e=FB(this.options),t=0,n=!1;for(let r in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,r)&&(this.allowCreation=!1,n=!1,typeof e==`function`?(n=e(r,[]),n||=this._handleObject(this.configureOptions[r],[r],!0)):(e===!0||H(e).call(e,r)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(r),this._handleObject(this.configureOptions[r],[r])),t++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement(`div`),this.wrapper.className=`vis-configuration-wrapper`,this.container.appendChild(this.wrapper);for(let e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}_clean(){for(let 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()}_getValue(e){let t=this.moduleOptions;for(let n=0;n<e.length;n++)if(t[e[n]]!==void 0)t=t[e[n]];else{t=void 0;break}return t}_makeItem(e){if(this.allowCreation===!0){let n=document.createElement(`div`);n.className=`vis-configuration vis-config-item vis-config-s`+e.length;var t=[...arguments].slice(1);return V(t).call(t,e=>{n.appendChild(e)}),this.domElements.push(n),this.domElements.length}return 0}_makeHeader(e){let t=document.createElement(`div`);t.className=`vis-configuration vis-config-header`,t.innerText=e,this._makeItem([],t)}_makeLabel(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=document.createElement(`div`);if(r.className=`vis-configuration vis-config-label vis-config-s`+t.length,n===!0){for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(mK(`i`,`b`,e))}else r.innerText=e+`:`;return r}_makeDropdown(e,t,n){let r=document.createElement(`select`);r.className=`vis-configuration vis-config-select`;let i=0;t!==void 0&&H(e).call(e,t)!==-1&&(i=H(e).call(e,t));for(let t=0;t<e.length;t++){let n=document.createElement(`option`);n.value=e[t],t===i&&(n.selected=`selected`),n.innerText=e[t],r.appendChild(n)}let a=this;r.onchange=function(){a._update(this.value,n)};let o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,r)}_makeRange(e,t,n){let r=e[0],i=e[1],a=e[2],o=e[3],s=document.createElement(`input`);s.className=`vis-configuration vis-config-range`;try{s.type=`range`,s.min=i,s.max=a}catch{}s.step=o;let c=``,l=0;if(t!==void 0){let e=1.2;t<0&&t*e<i?(s.min=Math.ceil(t*e),l=s.min,c=`range increased`):t/e<i&&(s.min=Math.ceil(t/e),l=s.min,c=`range increased`),t*e>a&&a!==1&&(s.max=Math.ceil(t*e),l=s.max,c=`range increased`),s.value=t}else s.value=r;let u=document.createElement(`input`);u.className=`vis-configuration vis-config-rangeinput`,u.value=s.value;let d=this;s.onchange=function(){u.value=this.value,d._update(Number(this.value),n)},s.oninput=function(){u.value=this.value};let f=this._makeLabel(n[n.length-1],n),p=this._makeItem(n,f,s,u);c!==``&&this.popupHistory[p]!==l&&(this.popupHistory[p]=l,this._setupPopup(c,p))}_makeButton(){if(this.options.showButton===!0){let e=document.createElement(`div`);e.className=`vis-configuration vis-config-button`,e.innerText=`generate options`,e.onclick=()=>{this._printOptions()},e.onmouseover=()=>{e.className=`vis-configuration vis-config-button hover`},e.onmouseout=()=>{e.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(e)}}_setupPopup(e,t){if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){let n=document.createElement(`div`);n.id=`vis-configuration-popup`,n.className=`vis-configuration-popup`,n.innerText=e,n.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:n,index:t}}}_removePopup(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(this.popupDiv.html!==void 0){let e=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=e.left+`px`,this.popupDiv.html.style.top=e.top-30+`px`,document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=BH(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=BH(()=>{this._removePopup()},1800)}}_makeCheckbox(e,t,n){let r=document.createElement(`input`);r.type=`checkbox`,r.className=`vis-configuration vis-config-checkbox`,r.checked=e,t!==void 0&&(r.checked=t,t!==e&&(typeof e==`object`?t!==e.enabled&&this.changedOptions.push({path:n,value:t}):this.changedOptions.push({path:n,value:t})));let i=this;r.onchange=function(){i._update(this.checked,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,r)}_makeTextInput(e,t,n){let r=document.createElement(`input`);r.type=`text`,r.className=`vis-configuration vis-config-text`,r.value=t,t!==e&&this.changedOptions.push({path:n,value:t});let i=this;r.onchange=function(){i._update(this.value,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,r)}_makeColorField(e,t,n){let r=e[1],i=document.createElement(`div`);t=t===void 0?r:t,t===`none`?i.className=`vis-configuration vis-config-colorBlock none`:(i.className=`vis-configuration vis-config-colorBlock`,i.style.backgroundColor=t),t=t===void 0?r:t,i.onclick=()=>{this._showColorPicker(t,i,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,i)}_showColorPicker(e,t,n){t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(e=>{let r=`rgba(`+e.r+`,`+e.g+`,`+e.b+`,`+e.a+`)`;t.style.backgroundColor=r,this._update(r,n)}),this.colorPicker.setCloseCallback(()=>{t.onclick=()=>{this._showColorPicker(e,t,n)}})}_handleObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=!1,i=FB(this.options),a=!1;for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){r=!0;let s=e[o],c=qG(t,o);if(typeof i==`function`&&(r=i(o,t),r===!1&&!EL(s)&&typeof s!=`string`&&typeof s!=`boolean`&&s instanceof Object&&(this.allowCreation=!1,r=this._handleObject(s,c,!0),this.allowCreation=n===!1)),r!==!1){a=!0;let e=this._getValue(c);if(EL(s))this._handleArray(s,e,c);else if(typeof s==`string`)this._makeTextInput(s,e,c);else if(typeof s==`boolean`)this._makeCheckbox(s,e,c);else if(s instanceof Object){if(!this.hideOption(t,o,this.moduleOptions)){if(s.enabled!==void 0){let e=qG(c,`enabled`),t=this._getValue(e);if(t===!0){let e=this._makeLabel(o,c,!0);this._makeItem(c,e),a=this._handleObject(s,c)||a}else this._makeCheckbox(s,t,c)}else{let e=this._makeLabel(o,c,!0);this._makeItem(c,e),a=this._handleObject(s,c)||a}}}else console.error(`dont know how to handle`,s,o,c)}}return a}_handleArray(e,t,n){typeof e[0]==`string`&&e[0]===`color`?(this._makeColorField(e,t,n),e[1]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`string`?(this._makeDropdown(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`number`&&(this._makeRange(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:Number(t)}))}_update(e,t){let n=this._constructOptions(e,t);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)}_constructOptions(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n;e=e===`true`||e,e=e!==`false`&&e;for(let n=0;n<t.length;n++)t[n]!==`global`&&(r[t[n]]===void 0&&(r[t[n]]={}),n===t.length-1?r[t[n]]=e:r=r[t[n]]);return n}_printOptions(){let e=this.getOptions();for(;this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(mK(`pre`,`const options = `+hH(e,null,2)))}getOptions(){let e={};for(let t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}},gK=class{constructor(e,t){this.container=e,this.overflowMethod=t||`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)}setPosition(e,t){this.x=yV(e),this.y=yV(t)}setText(e){if(e instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(e)}else this.frame.innerText=e}show(e){if(e===void 0&&(e=!0),e===!0){let e=this.frame.clientHeight,t=this.frame.clientWidth,n=this.frame.parentNode.clientHeight,r=this.frame.parentNode.clientWidth,i=0,a=0;if(this.overflowMethod==`flip`){let n=!1,o=!0;this.y-e<this.padding&&(o=!1),this.x+t>r-this.padding&&(n=!0),i=n?this.x-t:this.x,a=o?this.y-e:this.y}else a=this.y-e,a+e+this.padding>n&&(a=n-e-this.padding),a<this.padding&&(a=this.padding),i=this.x,i+t+this.padding>r&&(i=r-t-this.padding),i<this.padding&&(i=this.padding);this.frame.style.left=i+`px`,this.frame.style.top=a+`px`,this.frame.style.visibility=`visible`,this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left=`0`,this.frame.style.top=`0`,this.frame.style.visibility=`hidden`}destroy(){this.frame.parentNode.removeChild(this.frame)}},_K=!1,vK,yK=`background: #FFeeee; color: #dd0000`,bK=class e{static validate(t,n,r){_K=!1,vK=n;let i=n;return r!==void 0&&(i=n[r]),e.parse(t,i,[]),_K}static parse(t,n,r){for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.check(i,t,n,r)}static check(t,n,r,i){if(r[t]===void 0&&r.__any__===void 0){e.getSuggestion(t,r,i);return}let a=t,o=!0;r[t]===void 0&&r.__any__!==void 0&&(a=`__any__`,o=e.getType(n[t])===`object`);let s=r[a];o&&s.__type__!==void 0&&(s=s.__type__),e.checkFields(t,n,r,a,s,i)}static checkFields(t,n,r,i,a,o){let s=function(n){console.error(`%c`+n+e.printLocation(o,t),yK)},c=e.getType(n[t]),l=a[c];l===void 0?a.any===void 0&&(s(`Invalid type received for "`+t+`". Expected: `+e.print(tR(a))+`. Received [`+c+`] "`+n[t]+`"`),_K=!0):e.getType(l)===`array`&&H(l).call(l,n[t])===-1?(s(`Invalid option detected in "`+t+`". Allowed values are:`+e.print(l)+` not "`+n[t]+`". `),_K=!0):c===`object`&&i!==`__any__`&&(o=qG(o,t),e.parse(n[t],r[i],o))}static getType(e){let t=typeof e;return t===`object`?e===null?`null`:e instanceof Boolean?`boolean`:e instanceof Number?`number`:e instanceof String?`string`:EL(e)?`array`:e instanceof Date?`date`:e.nodeType===void 0?e._isAMomentObject===!0?`moment`:`object`:`dom`:t===`number`?`number`:t===`boolean`?`boolean`:t===`string`?`string`:t===void 0?`undefined`:t}static getSuggestion(t,n,r){let i=e.findInOptions(t,n,r,!1),a=e.findInOptions(t,vK,[],!0),o;o=i.indexMatch===void 0?a.distance<=4&&i.distance>a.distance?` in `+e.printLocation(i.path,t,``)+`Perhaps it was misplaced? Matching option found at: `+e.printLocation(a.path,a.closestMatch,``):i.distance<=8?`. Did you mean "`+i.closestMatch+`"?`+e.printLocation(i.path,t):`. Did you mean one of these: `+e.print(tR(n))+e.printLocation(r,t):` in `+e.printLocation(i.path,t,``)+`Perhaps it was incomplete? Did you mean: "`+i.indexMatch+`"?
11
+
12
+ `,console.error(`%cUnknown option detected: "`+t+`"`+o,yK),_K=!0}static findInOptions(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0&&arguments[3],a=1e9,o=``,s=[],c=t.toLowerCase(),l;for(let d in n){let f;if(n[d].__type__!==void 0&&i===!0){let i=e.findInOptions(t,n[d],qG(r,d));a>i.distance&&(o=i.closestMatch,s=i.path,a=i.distance,l=i.indexMatch)}else{var u;H(u=d.toLowerCase()).call(u,c)!==-1&&(l=d),f=e.levenshteinDistance(t,d),a>f&&(o=d,s=JG(r),a=f)}}return{closestMatch:o,path:s,distance:a,indexMatch:l}}static printLocation(e,t){let n=`
13
+
14
+ `+(arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:
15
+ `)+`options = {
16
+ `;for(let t=0;t<e.length;t++){for(let e=0;e<t+1;e++)n+=` `;n+=e[t]+`: {
17
+ `}for(let t=0;t<e.length+1;t++)n+=` `;n+=t+`
18
+ `;for(let t=0;t<e.length+1;t++){for(let r=0;r<e.length-t;r++)n+=` `;n+=`}
19
+ `}return n+`
20
+
21
+ `}static print(e){return hH(e).replace(/(")|(\[)|(\])|(,"__type__")/g,``).replace(/(,)/g,`, `)}static levenshteinDistance(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let n=[],r;for(r=0;r<=t.length;r++)n[r]=[r];let i;for(i=0;i<=e.length;i++)n[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)==e.charAt(i-1)?n[r][i]=n[r-1][i-1]:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[t.length][e.length]}},xK=PG,SK=hK,CK=NG,wK=gK,TK=yK,EK=bK,DK={fontsize:`font.size`,fontcolor:`font.color`,labelfontcolor:`font.color`,fontname:`font.face`,color:[`color.border`,`color.background`],fillcolor:`color.background`,tooltip:`title`,labeltooltip:`title`},OK=qV(DK);OK.color=`color.color`,OK.style=`dashes`;var kK={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},AK={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},jK=``,MK=0,G=``,K=``,NK=kK.NULL;function PK(){MK=0,G=jK.charAt(0)}function FK(){MK++,G=jK.charAt(MK)}function IK(){return jK.charAt(MK+1)}function LK(e){let t=e.charCodeAt(0);return t<47?t===35||t===46:t<59?t>47:t<91?t>64:t<96?t===95:t<123&&t>96}function RK(e,t){if(e||={},t)for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function zK(e,t,n){let r=t.split(`.`),i=e;for(;r.length;){let e=r.shift();r.length?(i[e]||(i[e]={}),i=i[e]):i[e]=n}}function BK(e,t){let n,r,i=null,a=[e],o=e;for(;o.parent;)a.push(o.parent),o=o.parent;if(o.nodes){for(n=0,r=o.nodes.length;n<r;n++)if(t.id===o.nodes[n].id){i=o.nodes[n];break}}for(i||(i={id:t.id},e.node&&(i.attr=RK(i.attr,e.node))),n=a.length-1;n>=0;n--){var s;let e=a[n];e.nodes||=[],H(s=e.nodes).call(s,i)===-1&&e.nodes.push(i)}t.attr&&(i.attr=RK(i.attr,t.attr))}function VK(e,t){e.edges||=[],e.edges.push(t),e.edge&&(t.attr=RK(RK({},e.edge),t.attr))}function HK(e,t,n,r,i){let a={from:t,to:n,type:r};return e.edge&&(a.attr=RK({},e.edge)),a.attr=RK(a.attr||{},i),i!=null&&i.hasOwnProperty(`arrows`)&&i.arrows!=null&&(a.arrows={to:{enabled:!0,type:i.arrows.type}},i.arrows=null),a}function q(){for(NK=kK.NULL,K=``;G===` `||G===` `||G===`
22
+ `||G===`\r`;)FK();let e;do{if(e=!1,G===`#`){let t=MK-1;for(;jK.charAt(t)===` `||jK.charAt(t)===` `;)t--;if(jK.charAt(t)===`
23
+ `||jK.charAt(t)===``){for(;G!=``&&G!=`
24
+ `;)FK();e=!0}}if(G===`/`&&IK()===`/`){for(;G!=``&&G!=`
25
+ `;)FK();e=!0}if(G===`/`&&IK()===`*`){for(;G!=``;)if(G===`*`&&IK()===`/`){FK(),FK();break}else FK();e=!0}for(;G===` `||G===` `||G===`
26
+ `||G===`\r`;)FK()}while(e);if(G===``){NK=kK.DELIMITER;return}let t=G+IK();if(AK[t]){NK=kK.DELIMITER,K=t,FK(),FK();return}if(AK[G]){NK=kK.DELIMITER,K=G,FK();return}if(LK(G)||G===`-`){for(K+=G,FK();LK(G);)K+=G,FK();K===`false`?K=!1:K===`true`?K=!0:isNaN(Number(K))||(K=Number(K)),NK=kK.IDENTIFIER;return}if(G===`"`){for(FK();G!=``&&(G!=`"`||G===`"`&&IK()===`"`);)G===`"`?(K+=G,FK()):G===`\\`&&IK()===`n`?(K+=`
27
+ `,FK()):K+=G,FK();if(G!=`"`)throw ZK(`End of string " expected`);FK(),NK=kK.IDENTIFIER;return}for(NK=kK.UNKNOWN;G!=``;)K+=G,FK();throw SyntaxError(`Syntax error in part "`+QK(K,30)+`"`)}function UK(){let e={};if(PK(),q(),K===`strict`&&(e.strict=!0,q()),(K===`graph`||K===`digraph`)&&(e.type=K,q()),NK===kK.IDENTIFIER&&(e.id=K,q()),K!=`{`)throw ZK(`Angle bracket { expected`);if(q(),WK(e),K!=`}`)throw ZK(`Angle bracket } expected`);if(q(),K!==``)throw ZK(`End of file expected`);return q(),delete e.node,delete e.edge,delete e.graph,e}function WK(e){for(;K!==``&&K!=`}`;)GK(e),K===`;`&&q()}function GK(e){let t=KK(e);if(t){YK(e,t);return}if(qK(e))return;if(NK!=kK.IDENTIFIER)throw ZK(`Identifier expected`);let n=K;if(q(),K===`=`){if(q(),NK!=kK.IDENTIFIER)throw ZK(`Identifier expected`);e[n]=K,q()}else JK(e,n)}function KK(e){let t=null;if(K===`subgraph`&&(t={},t.type=`subgraph`,q(),NK===kK.IDENTIFIER&&(t.id=K,q())),K===`{`){if(q(),t||={},t.parent=e,t.node=e.node,t.edge=e.edge,t.graph=e.graph,WK(t),K!=`}`)throw ZK(`Angle bracket } expected`);q(),delete t.node,delete t.edge,delete t.graph,delete t.parent,e.subgraphs||=[],e.subgraphs.push(t)}return t}function qK(e){return K===`node`?(q(),e.node=XK(),`node`):K===`edge`?(q(),e.edge=XK(),`edge`):K===`graph`?(q(),e.graph=XK(),`graph`):null}function JK(e,t){let n={id:t},r=XK();r&&(n.attr=r),BK(e,n),YK(e,t)}function YK(e,t){for(;K===`->`||K===`--`;){let n,r=K;q();let i=KK(e);if(i)n=i;else{if(NK!=kK.IDENTIFIER)throw ZK(`Identifier or subgraph expected`);n=K,BK(e,{id:n}),q()}let a=XK();VK(e,HK(e,t,n,r,a)),t=n}}function XK(){let e,t=null,n={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`},i=[],a=[];for(;K===`[`;){for(q(),t={};K!==``&&K!=`]`;){if(NK!=kK.IDENTIFIER)throw ZK(`Attribute name expected`);let e=K;if(q(),K!=`=`)throw ZK(`Equal sign = expected`);if(q(),NK!=kK.IDENTIFIER)throw ZK(`Attribute value expected`);let o=K;e===`style`&&(o=n[o]);let s;e===`arrowhead`&&(s=r[o],e=`arrows`,o={to:{enabled:!0,type:s}}),e===`arrowtail`&&(s=r[o],e=`arrows`,o={from:{enabled:!0,type:s}}),i.push({attr:t,name:e,value:o}),a.push(e),q(),K==`,`&&q()}if(K!=`]`)throw ZK(`Bracket ] expected`);q()}if(qz(a).call(a,`dir`)){let e={};e.arrows={};for(let t=0;t<i.length;t++)if(i[t].name===`arrows`){if(i[t].value.to!=null)e.arrows.to=t;else if(i[t].value.from!=null)e.arrows.from=t;else throw ZK(`Invalid value of arrows`)}else i[t].name===`dir`&&(e.dir=t);let t=i[e.dir].value;if(!qz(a).call(a,`arrows`)){if(t===`both`)i.push({attr:i[e.dir].attr,name:`arrows`,value:{to:{enabled:!0}}}),e.arrows.to=i.length-1,i.push({attr:i[e.dir].attr,name:`arrows`,value:{from:{enabled:!0}}}),e.arrows.from=i.length-1;else if(t===`forward`)i.push({attr:i[e.dir].attr,name:`arrows`,value:{to:{enabled:!0}}}),e.arrows.to=i.length-1;else if(t===`back`)i.push({attr:i[e.dir].attr,name:`arrows`,value:{from:{enabled:!0}}}),e.arrows.from=i.length-1;else if(t===`none`)i.push({attr:i[e.dir].attr,name:`arrows`,value:``}),e.arrows.to=i.length-1;else throw ZK(`Invalid dir type "`+t+`"`)}let n,r;if(t===`both`)e.arrows.to&&e.arrows.from?(r=i[e.arrows.to].value.to.type,n=i[e.arrows.from].value.from.type,i[e.arrows.to]={attr:i[e.arrows.to].attr,name:i[e.arrows.to].name,value:{to:{enabled:!0,type:r},from:{enabled:!0,type:n}}},gz(i).call(i,e.arrows.from,1)):e.arrows.to?(r=i[e.arrows.to].value.to.type,n=`arrow`,i[e.arrows.to]={attr:i[e.arrows.to].attr,name:i[e.arrows.to].name,value:{to:{enabled:!0,type:r},from:{enabled:!0,type:n}}}):e.arrows.from&&(r=`arrow`,n=i[e.arrows.from].value.from.type,i[e.arrows.from]={attr:i[e.arrows.from].attr,name:i[e.arrows.from].name,value:{to:{enabled:!0,type:r},from:{enabled:!0,type:n}}});else if(t===`back`)e.arrows.to&&e.arrows.from?(r=``,n=i[e.arrows.from].value.from.type,i[e.arrows.from]={attr:i[e.arrows.from].attr,name:i[e.arrows.from].name,value:{to:{enabled:!0,type:r},from:{enabled:!0,type:n}}}):e.arrows.to?(r=``,n=`arrow`,e.arrows.from=e.arrows.to,i[e.arrows.from]={attr:i[e.arrows.from].attr,name:i[e.arrows.from].name,value:{to:{enabled:!0,type:r},from:{enabled:!0,type:n}}}):e.arrows.from&&(r=``,n=i[e.arrows.from].value.from.type,i[e.arrows.to]={attr:i[e.arrows.from].attr,name:i[e.arrows.from].name,value:{to:{enabled:!0,type:r},from:{enabled:!0,type:n}}}),i[e.arrows.from]={attr:i[e.arrows.from].attr,name:i[e.arrows.from].name,value:{from:{enabled:!0,type:i[e.arrows.from].value.from.type}}};else if(t===`none`){let t;t=e.arrows.to?e.arrows.to:e.arrows.from,i[t]={attr:i[t].attr,name:i[t].name,value:``}}else if(t===`forward`)e.arrows.to&&e.arrows.from||e.arrows.to?(r=i[e.arrows.to].value.to.type,n=``,i[e.arrows.to]={attr:i[e.arrows.to].attr,name:i[e.arrows.to].name,value:{to:{enabled:!0,type:r},from:{enabled:!0,type:n}}}):e.arrows.from&&(r=`arrow`,n=``,e.arrows.to=e.arrows.from,i[e.arrows.to]={attr:i[e.arrows.to].attr,name:i[e.arrows.to].name,value:{to:{enabled:!0,type:r},from:{enabled:!0,type:n}}}),i[e.arrows.to]={attr:i[e.arrows.to].attr,name:i[e.arrows.to].name,value:{to:{enabled:!0,type:i[e.arrows.to].value.to.type}}};else throw ZK(`Invalid dir type "`+t+`"`);gz(i).call(i,e.dir,1)}let o;if(qz(a).call(a,`penwidth`)){let t=[];for(o=i.length,e=0;e<o;e++)i[e].name!==`width`&&(i[e].name===`penwidth`&&(i[e].name=`width`),t.push(i[e]));i=t}for(o=i.length,e=0;e<o;e++)zK(i[e].attr,i[e].name,i[e].value);return t}function ZK(e){return SyntaxError(e+`, got "`+QK(K,30)+`" (char `+MK+`)`)}function QK(e,t){return e.length<=t?e:e.substr(0,27)+`...`}function $K(e,t,n){EL(e)?V(e).call(e,function(e){EL(t)?V(t).call(t,function(t){n(e,t)}):n(e,t)}):EL(t)?V(t).call(t,function(t){n(e,t)}):n(e,t)}function eq(e,t,n){let r=t.split(`.`),i=r.pop(),a=e;for(let e=0;e<r.length;e++){let t=r[e];t in a||(a[t]={}),a=a[t]}return a[i]=n,e}function tq(e,t){let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=t[r];EL(i)?V(i).call(i,function(t){eq(n,t,e[r])}):typeof i==`string`?eq(n,i,e[r]):eq(n,r,e[r])}return n}function nq(e){let t=rq(e),n={nodes:[],edges:[],options:{}};if(t.nodes){var r;V(r=t.nodes).call(r,function(e){let t={id:e.id,label:String(e.label||e.id)};RK(t,tq(e.attr,DK)),t.image&&(t.shape=`image`),n.nodes.push(t)})}if(t.edges){var i;let e=function(e){let t={from:e.from,to:e.to};return RK(t,tq(e.attr,OK)),t.arrows==null&&e.type===`->`&&(t.arrows=`to`),t};V(i=t.edges).call(i,function(t){let r,i;if(r=t.from instanceof Object?t.from.nodes:{id:t.from},i=t.to instanceof Object?t.to.nodes:{id:t.to},t.from instanceof Object&&t.from.edges){var a;V(a=t.from.edges).call(a,function(t){let r=e(t);n.edges.push(r)})}if($K(r,i,function(r,i){let a=HK(n,r.id,i.id,t.type,t.attr),o=e(a);n.edges.push(o)}),t.to instanceof Object&&t.to.edges){var o;V(o=t.to.edges).call(o,function(t){let r=e(t);n.edges.push(r)})}})}return t.attr&&(n.options=t.attr),n}function rq(e){return jK=e,UK()}function iq(e){var t;let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.fixed,i=r!==void 0&&r,a=n.inheritColor,o=a!==void 0&&a,s=n.parseColor,c=s!==void 0&&s,l=e.edges,u=HL(l).call(l,e=>{let t={from:e.source,id:e.id,to:e.target};return e.attributes!=null&&(t.attributes=e.attributes),e.label!=null&&(t.label=e.label),e.attributes!=null&&e.attributes.title!=null&&(t.title=e.attributes.title),e.type===`Directed`&&(t.arrows=`to`),e.color&&o===!1&&(t.color=e.color),t});return{nodes:HL(t=e.nodes).call(t,e=>{let t={id:e.id,fixed:i&&e.x!=null&&e.y!=null};return e.attributes!=null&&(t.attributes=e.attributes),e.label!=null&&(t.label=e.label),e.size!=null&&(t.size=e.size),e.attributes!=null&&e.attributes.title!=null&&(t.title=e.attributes.title),e.title!=null&&(t.title=e.title),e.x!=null&&(t.x=e.x),e.y!=null&&(t.y=e.y),e.color!=null&&(t.color=c===!0?e.color:{background:e.color,border:e.color,highlight:{background:e.color,border:e.color},hover:{background:e.color,border:e.color}}),t}),edges:u}}var aq=class{constructor(){this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement(`canvas`)}init(){if(this.initialized())return;this.src=this.image.src;let e=this.image.width,t=this.image.height;this.width=e,this.height=t;let n=Math.floor(t/2),r=Math.floor(t/4),i=Math.floor(t/8),a=Math.floor(t/16),o=Math.floor(e/2),s=Math.floor(e/4),c=Math.floor(e/8),l=Math.floor(e/16);this.canvas.width=3*s,this.canvas.height=n,this.coordinates=[[0,0,o,n],[o,0,s,r],[o,r,c,i],[5*c,r,l,a]],this._fillMipMap()}initialized(){return this.coordinates!==void 0}_fillMipMap(){let e=this.canvas.getContext(`2d`),t=this.coordinates[0];e.drawImage(this.image,t[0],t[1],t[2],t[3]);for(let t=1;t<this.NUM_ITERATIONS;t++){let n=this.coordinates[t-1],r=this.coordinates[t];e.drawImage(this.canvas,n[0],n[1],n[2],n[3],r[0],r[1],r[2],r[3])}}drawImageAtPosition(e,t,n,r,i,a){if(this.initialized()){if(t>2){t*=.5;let o=0;for(;t>2&&o<this.NUM_ITERATIONS;)t*=.5,o+=1;o>=this.NUM_ITERATIONS&&(o=this.NUM_ITERATIONS-1);let s=this.coordinates[o];e.drawImage(this.canvas,s[0],s[1],s[2],s[3],n,r,i,a)}else e.drawImage(this.image,n,r,i,a)}}},oq=class{constructor(e){this.images={},this.imageBroken={},this.callback=e}_tryloadBrokenUrl(e,t,n){if(e!==void 0&&n!==void 0){if(t===void 0){console.warn(`No broken url image defined`);return}n.image.addEventListener(`error`,()=>{console.error(`Could not load brokenImage:`,t)}),n.image.src=t}}_redrawWithImage(e){this.callback&&this.callback(e)}load(e,t){let n=this.images[e];if(n)return n;let r=new aq;return this.images[e]=r,r.image.addEventListener(`load`,()=>{this._fixImageCoordinates(r.image),r.init(),this._redrawWithImage(r)}),r.image.addEventListener(`error`,()=>{console.error(`Could not load image:`,e),this._tryloadBrokenUrl(e,t,r)}),r.image.src=e,r}_fixImageCoordinates(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}};function sq(e,t){try{let r=dL(t.split(/[-_ /]/,2),2),i=r[0],a=r[1],o=i==null?null:i.toLowerCase(),s=a==null?null:a.toUpperCase();if(o&&s){let t=o+`-`+s;if(Object.prototype.hasOwnProperty.call(e,t))return t;var n;console.warn(yB(n=`Unknown variant ${s} of language `).call(n,o,`.`))}if(o){let t=o;if(Object.prototype.hasOwnProperty.call(e,t))return t;console.warn(`Unknown language ${o}`)}return console.warn(`Unknown locale ${t}, falling back to English.`),`en`}catch(e){return console.error(e),console.warn(`Unexpected error while normalizing locale ${t}, falling back to English.`),`en`}}var cq=Object.freeze({__proto__:null,cn:{addDescription:`单击空白处放置新节点。`,addEdge:`添加连接线`,addNode:`添加节点`,back:`返回`,close:`關閉`,createEdgeError:`无法将连接线连接到群集。`,del:`删除选定`,deleteClusterError:`无法删除群集。`,edgeDescription:`单击某个节点并将该连接线拖动到另一个节点以连接它们。`,edit:`编辑`,editClusterError:`无法编辑群集。`,editEdge:`编辑连接线`,editEdgeDescription:`单击控制节点并将它们拖到节点上连接。`,editNode:`编辑节点`},cs:{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`},de:{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`},en:{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`},es:{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`},fr:{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`},it:{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`},nl:{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`},pt:{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ó`},ru:{addDescription:`Кликните в свободное место, чтобы добавить новый узел.`,addEdge:`Добавить ребро`,addNode:`Добавить узел`,back:`Назад`,close:`Закрывать`,createEdgeError:`Невозможно соединить ребра в кластер.`,del:`Удалить выбранное`,deleteClusterError:`Кластеры не могут быть удалены`,edgeDescription:`Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.`,edit:`Редактировать`,editClusterError:`Кластеры недоступны для редактирования.`,editEdge:`Редактировать ребро`,editEdgeDescription:`Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.`,editNode:`Редактировать узел`},uk:{addDescription:`Kлікніть на вільне місце, щоб додати новий вузол.`,addEdge:`Додати край`,addNode:`Додати вузол`,back:`Назад`,close:`Закрити`,createEdgeError:`Не можливо об'єднати краї в групу.`,del:`Видалити обране`,deleteClusterError:`Групи не можуть бути видалені.`,edgeDescription:`Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.`,edit:`Редагувати`,editClusterError:`Групи недоступні для редагування.`,editEdge:`Редагувати край`,editEdgeDescription:`Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.`,editNode:`Редагувати вузол`}}),lq,uq;function dq(){return uq?lq:(uq=1,NH(),lq=R().setInterval,lq)}var fq,pq;function mq(){return pq?fq:(pq=1,fq=dq(),fq)}var hq=F(mq());function gq(e,t){t.inputHandler=function(e){e.isFirst&&t(e)},e.on(`hammer.input`,t.inputHandler)}function _q(e,t){return t.inputHandler=function(e){e.isFinal&&t(e)},e.on(`hammer.input`,t.inputHandler)}var vq=class{constructor(e){this.body=e,this.pixelRatio=1,this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this._cleanupCallbacks=[],this.options={},this.defaultOptions={autoResize:!0,height:`100%`,width:`100%`},JO(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.once(`resize`,e=>{e.width!==0&&(this.body.view.translation.x=e.width*.5),e.height!==0&&(this.body.view.translation.y=e.height*.5)}),this.body.emitter.on(`setSize`,B(e=this.setSize).call(e,this)),this.body.emitter.on(`destroy`,()=>{this.hammerFrame.destroy(),this.hammer.destroy(),this._cleanUp()})}setOptions(e){if(e!==void 0&&GG([`width`,`height`,`autoResize`],this.options,e),this._cleanUp(),this.options.autoResize===!0){var t;if(window.ResizeObserver){let e=new ResizeObserver(()=>{this.setSize()===!0&&this.body.emitter.emit(`_requestRedraw`)}),t=this.frame;e.observe(t),this._cleanupCallbacks.push(()=>{e.unobserve(t)})}else{let e=hq(()=>{this.setSize()===!0&&this.body.emitter.emit(`_requestRedraw`)},1e3);this._cleanupCallbacks.push(()=>{clearInterval(e)})}let e=B(t=this._onResize).call(t,this);window.addEventListener(`resize`,e),this._cleanupCallbacks.push(()=>{window.removeEventListener(`resize`,e)})}}_cleanUp(){var e,t;V(e=gz(t=this._cleanupCallbacks).call(t,0).toReversed()).call(e,e=>{try{e()}catch(e){console.error(e)}})}_onResize(){this.setSize(),this.body.emitter.emit(`_redraw`)}_getCameraState(){let 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}))}_setCameraState(){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){let e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,n=this.cameraState.scale;e!=1&&t!=1?n=this.cameraState.scale*.5*(e+t):e==1?t!=1&&(n=this.cameraState.scale*t):n=this.cameraState.scale*e,this.body.view.scale=n;let r=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),i={x:r.x-this.cameraState.position.x,y:r.y-this.cameraState.position.y};this.body.view.translation.x+=i.x*this.body.view.scale,this.body.view.translation.y+=i.y*this.body.view.scale}}_prepareValue(e){if(typeof e==`number`)return e+`px`;if(typeof e==`string`){if(H(e).call(e,`%`)!==-1||H(e).call(e,`px`)!==-1)return e;if(H(e).call(e,`%`)===-1)return e+`px`}throw Error(`Could not use the value supplied for width or height:`+e)}_create(){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{let 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()}_bindHammer(){this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new CK(this.frame.canvas),this.hammer.get(`pinch`).set({enable:!0}),this.hammer.get(`pan`).set({threshold:5,direction:CK.DIRECTION_ALL}),gq(this.hammer,e=>{this.body.eventListeners.onTouch(e)}),this.hammer.on(`tap`,e=>{this.body.eventListeners.onTap(e)}),this.hammer.on(`doubletap`,e=>{this.body.eventListeners.onDoubleTap(e)}),this.hammer.on(`press`,e=>{this.body.eventListeners.onHold(e)}),this.hammer.on(`panstart`,e=>{this.body.eventListeners.onDragStart(e)}),this.hammer.on(`panmove`,e=>{this.body.eventListeners.onDrag(e)}),this.hammer.on(`panend`,e=>{this.body.eventListeners.onDragEnd(e)}),this.hammer.on(`pinch`,e=>{this.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener(`wheel`,e=>{this.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener(`mousemove`,e=>{this.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener(`contextmenu`,e=>{this.body.eventListeners.onContext(e)}),this.hammerFrame=new CK(this.frame),_q(this.hammerFrame,e=>{this.body.eventListeners.onRelease(e)})}setSize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),t=this._prepareValue(t);let n=!1,r=this.frame.canvas.width,i=this.frame.canvas.height,a=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t)this._getCameraState(a),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width=`100%`,this.frame.canvas.style.height=`100%`,this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},n=!0;else{let e=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),t=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==e||this.frame.canvas.height!==t)&&this._getCameraState(a),this.frame.canvas.width!==e&&(this.frame.canvas.width=e,n=!0),this.frame.canvas.height!==t&&(this.frame.canvas.height=t,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(r/this.pixelRatio),oldHeight:Math.round(i/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,n}getContext(){return this.frame.canvas.getContext(`2d`)}_determinePixelRatio(){let e=this.getContext();if(e===void 0)throw Error(`Could not get canvax context`);let t=1;typeof window<`u`&&(t=window.devicePixelRatio||1);let n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/n}_setPixelRatio(){this.pixelRatio=this._determinePixelRatio()}setTransform(){let e=this.getContext();if(e===void 0)throw Error(`Could not get canvax context`);e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}_XconvertDOMtoCanvas(e){return(e-this.body.view.translation.x)/this.body.view.scale}_XconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.x}_YconvertDOMtoCanvas(e){return(e-this.body.view.translation.y)/this.body.view.scale}_YconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.y}canvasToDOM(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}DOMtoCanvas(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}},yq=class{constructor(e,t){this.body=e,this.canvas=t,this.redrawRequested=!1,this.requestAnimationFrameRequestId=void 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},JO(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.on(`dragStart`,()=>{this.dragging=!0}),this.body.emitter.on(`dragEnd`,()=>{this.dragging=!1}),this.body.emitter.on(`zoom`,()=>{this.zooming=!0,window.clearTimeout(this.zoomTimeoutId),this.zoomTimeoutId=BH(()=>{var e;this.zooming=!1,B(e=this._requestRedraw).call(e,this)()},250)}),this.body.emitter.on(`_resizeNodes`,()=>{this._resizeNodes()}),this.body.emitter.on(`_redraw`,()=>{this.renderingActive===!1&&this._redraw()}),this.body.emitter.on(`_blockRedraw`,()=>{this.allowRedraw=!1}),this.body.emitter.on(`_allowRedraw`,()=>{this.allowRedraw=!0,this.redrawRequested=!1}),this.body.emitter.on(`_requestRedraw`,B(e=this._requestRedraw).call(e,this)),this.body.emitter.on(`_startRendering`,()=>{this.renderRequests+=1,this.renderingActive=!0,this._startRendering()}),this.body.emitter.on(`_stopRendering`,()=>{--this.renderRequests,this.renderingActive=this.renderRequests>0,this.requestAnimationFrameRequestId=void 0}),this.body.emitter.on(`destroy`,()=>{this.renderRequests=0,this.allowRedraw=!1,this.renderingActive=!1,window.cancelAnimationFrame(this.requestAnimationFrameRequestId),this.body.emitter.off()})}setOptions(e){e!==void 0&&GG([`hideEdgesOnDrag`,`hideEdgesOnZoom`,`hideNodesOnDrag`],this.options,e)}_startRendering(){if(this.renderingActive===!0&&this.requestAnimationFrameRequestId===void 0){var e;this.requestAnimationFrameRequestId=window.requestAnimationFrame(B(e=this._renderStep).call(e,this),this.simulationInterval)}}_renderStep(){this.renderingActive===!0&&(this.requestAnimationFrameRequestId=void 0,this._startRendering(),this._redraw())}redraw(){this.body.emitter.emit(`setSize`),this._redraw()}_requestRedraw(){this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,window.requestAnimationFrame(()=>{this._redraw(!1)}))}_redraw(){let e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(this.allowRedraw===!0){this.body.emitter.emit(`initRedraw`),this.redrawRequested=!1;let t={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();let n=this.canvas.getContext(),r=this.canvas.frame.canvas.clientWidth,i=this.canvas.frame.canvas.clientHeight;if(n.clearRect(0,0,r,i),this.canvas.frame.clientWidth===0)return;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)&&(t.drawExternalLabels=this._drawNodes(n,e).drawExternalLabels),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),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(n),n.beginPath(),this.body.emitter.emit(`afterDrawing`,n),n.closePath(),n.restore(),e===!0&&n.clearRect(0,0,r,i)}}_resizeNodes(){this.canvas.setTransform();let 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);let t=this.body.nodes,n;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n=t[r],n.resize(e),n.updateBoundingBox(e,n.selected));e.restore()}_drawNodes(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.body.nodes,r=this.body.nodeIndices,i,a=[],o=[],s=this.canvas.DOMtoCanvas({x:-20,y:-20}),c=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+20,y:this.canvas.frame.canvas.clientHeight+20}),l={top:s.y,left:s.x,bottom:c.y,right:c.x},u=[];for(let s=0;s<r.length;s++)if(i=n[r[s]],i.hover)o.push(r[s]);else if(i.isSelected())a.push(r[s]);else if(t===!0){let t=i.draw(e);t.drawExternalLabel!=null&&u.push(t.drawExternalLabel)}else if(i.isBoundingBoxOverlappingWith(l)===!0){let t=i.draw(e);t.drawExternalLabel!=null&&u.push(t.drawExternalLabel)}else i.updateBoundingBox(e,i.selected);let d,f=a.length,p=o.length;for(d=0;d<f;d++){i=n[a[d]];let t=i.draw(e);t.drawExternalLabel!=null&&u.push(t.drawExternalLabel)}for(d=0;d<p;d++){i=n[o[d]];let t=i.draw(e);t.drawExternalLabel!=null&&u.push(t.drawExternalLabel)}return{drawExternalLabels:()=>{for(let e of u)e()}}}_drawEdges(e){let t=this.body.edges,n=this.body.edgeIndices;for(let r=0;r<n.length;r++){let i=t[n[r]];i.connected===!0&&i.draw(e)}}_drawArrows(e){let t=this.body.edges,n=this.body.edgeIndices;for(let r=0;r<n.length;r++){let i=t[n[r]];i.connected===!0&&i.drawArrows(e)}}_drawSelectionBox(e){if(this.body.selectionBox.show){e.beginPath();let t=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,t,n),e.fillStyle=`rgba(151, 194, 252, 0.2)`,e.fillRect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,n),e.strokeStyle=`rgba(151, 194, 252, 1)`,e.stroke()}else e.closePath()}},bq=[];for(let e=0;e<256;++e)bq.push((e+256).toString(16).slice(1));function xq(e,t=0){return(bq[e[t+0]]+bq[e[t+1]]+bq[e[t+2]]+bq[e[t+3]]+`-`+bq[e[t+4]]+bq[e[t+5]]+`-`+bq[e[t+6]]+bq[e[t+7]]+`-`+bq[e[t+8]]+bq[e[t+9]]+`-`+bq[e[t+10]]+bq[e[t+11]]+bq[e[t+12]]+bq[e[t+13]]+bq[e[t+14]]+bq[e[t+15]]).toLowerCase()}var Sq=new Uint8Array(16);function Cq(){return crypto.getRandomValues(Sq)}function wq(e,t,n){return crypto.randomUUID?crypto.randomUUID():Tq(e)}function Tq(e,t,n){e||={};let r=e.random??e.rng?.()??Cq();if(r.length<16)throw Error(`Random bytes length must be >= 16`);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,xq(r)}var Eq=class{static getRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,r=-1e9,i=1e9,a=-1e9,o;if(t.length>0)for(let s=0;s<t.length;s++)o=e[t[s]],i>o.shape.boundingBox.left&&(i=o.shape.boundingBox.left),a<o.shape.boundingBox.right&&(a=o.shape.boundingBox.right),n>o.shape.boundingBox.top&&(n=o.shape.boundingBox.top),r<o.shape.boundingBox.bottom&&(r=o.shape.boundingBox.bottom);return i===1e9&&a===-1e9&&n===1e9&&r===-1e9&&(n=0,r=0,i=0,a=0),{minX:i,maxX:a,minY:n,maxY:r}}static getRangeCore(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,r=-1e9,i=1e9,a=-1e9,o;if(t.length>0)for(let s=0;s<t.length;s++)o=e[t[s]],i>o.x&&(i=o.x),a<o.x&&(a=o.x),n>o.y&&(n=o.y),r<o.y&&(r=o.y);return i===1e9&&a===-1e9&&n===1e9&&r===-1e9&&(n=0,r=0,i=0,a=0),{minX:i,maxX:a,minY:n,maxY:r}}static findCenter(e){return{x:.5*(e.maxX+e.minX),y:.5*(e.maxY+e.minY)}}static cloneOptions(e,t){let n={};return t===void 0||t===`node`?(U(n,e.options,!0),n.x=e.x,n.y=e.y,n.amountOfConnections=e.edges.length):U(n,e.options,!0),n}},Dq={},Oq,kq;function Aq(){if(kq)return Oq;kq=1;var e=ST(),t=I(),n=L(),r=HA(),i=iV().trim,a=tV(),o=n(``.charAt),s=e.parseFloat,c=e.Symbol,l=c&&c.iterator;return Oq=1/s(a+`-0`)!=-1/0||l&&!t(function(){s(Object(l))})?function(e){var t=i(r(e)),n=s(t);return n===0&&o(t,0)===`-`?-0:n}:s,Oq}var jq;function Mq(){if(jq)return Dq;jq=1;var e=z(),t=Aq();return e({global:!0,forced:parseFloat!==t},{parseFloat:t}),Dq}var Nq,Pq;function Fq(){return Pq?Nq:(Pq=1,Mq(),Nq=R().parseFloat,Nq)}var Iq,Lq;function Rq(){return Lq?Iq:(Lq=1,Iq=Fq(),Iq)}var zq,Bq;function Vq(){return Bq?zq:(Bq=1,zq=Rq(),zq)}var Hq=F(Vq()),Uq={},Wq,Gq;function Kq(){if(Gq)return Wq;Gq=1;var e=ST().isFinite;return Wq=Number.isFinite||function(t){return typeof t==`number`&&e(t)},Wq}var qq;function Jq(){return qq?Uq:(qq=1,z()({target:`Number`,stat:!0},{isFinite:Kq()}),Uq)}var Yq,Xq;function Zq(){return Xq?Yq:(Xq=1,Jq(),Yq=R().Number.isFinite,Yq)}var Qq,$q;function eJ(){return $q?Qq:($q=1,Qq=Zq(),Qq)}var tJ,nJ;function rJ(){return nJ?tJ:(nJ=1,tJ=eJ(),tJ)}var iJ=F(rJ()),aJ={exports:{}},oJ={},sJ;function cJ(){if(sJ)return oJ;sJ=1;var e=z(),t=GT(),n=YD().f;return e({target:`Object`,stat:!0,forced:Object.defineProperty!==n,sham:!t},{defineProperty:n}),oJ}var lJ;function uJ(){if(lJ)return aJ.exports;lJ=1,cJ();var e=R().Object,t=aJ.exports=function(t,n,r){return e.defineProperty(t,n,r)};return e.defineProperty.sham&&(t.sham=!0),aJ.exports}var dJ,fJ;function pJ(){return fJ?dJ:(fJ=1,dJ=uJ(),dJ)}var mJ,hJ;function gJ(){return hJ?mJ:(hJ=1,mJ=pJ(),mJ)}var _J,vJ;function yJ(){return vJ?_J:(vJ=1,_J=gJ(),_J)}var bJ,xJ;function SJ(){return xJ?bJ:(xJ=1,bJ=yJ(),bJ)}var CJ=F(SJ()),wJ,TJ;function EJ(){return TJ?wJ:(TJ=1,XN(),mF(),OM(),wJ=hj().f(`iterator`),wJ)}var DJ,OJ;function kJ(){if(OJ)return DJ;OJ=1;var e=EJ();return tP(),DJ=e,DJ}var AJ,jJ;function MJ(){return jJ?AJ:(jJ=1,AJ=kJ(),AJ)}var NJ,PJ;function FJ(){return PJ?NJ:(PJ=1,NJ=MJ(),NJ)}var IJ,LJ;function RJ(){return LJ?IJ:(LJ=1,IJ=FJ(),IJ)}var zJ=F(RJ());function BJ(e){"@babel/helpers - typeof";return BJ=typeof cF==`function`&&typeof zJ==`symbol`?function(e){return typeof e}:function(e){return e&&typeof cF==`function`&&e.constructor===cF&&e!==cF.prototype?`symbol`:typeof e},BJ(e)}var VJ,HJ;function UJ(){return HJ?VJ:(HJ=1,YM(),VJ=hj().f(`toPrimitive`),VJ)}var WJ,GJ;function KJ(){return GJ?WJ:(GJ=1,WJ=UJ(),WJ)}var qJ,JJ;function YJ(){return JJ?qJ:(JJ=1,qJ=KJ(),qJ)}var XJ,ZJ;function QJ(){return ZJ?XJ:(ZJ=1,XJ=YJ(),XJ)}var $J,eY;function tY(){return eY?$J:(eY=1,$J=QJ(),$J)}var nY=F(tY());function rY(e,t){if(BJ(e)!=`object`||!e)return e;var n=e[nY];if(n!==void 0){var r=n.call(e,t);if(BJ(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function iY(e){var t=rY(e,`string`);return BJ(t)==`symbol`?t:t+``}function aY(e,t,n){return(t=iY(t))in e?CJ(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oY,sY;function cY(){return sY?oY:(sY=1,uM(),oY=R().Object.getOwnPropertySymbols,oY)}var lY,uY;function dY(){return uY?lY:(uY=1,lY=cY(),lY)}var fY,pY;function mY(){return pY?fY:(pY=1,fY=dY(),fY)}var hY=F(mY()),gY={exports:{}},_Y={},vY;function yY(){if(vY)return _Y;vY=1;var e=z(),t=I(),n=fE(),r=PD().f,i=GT();return e({target:`Object`,stat:!0,forced:!i||t(function(){r(1)}),sham:!i},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}}),_Y}var bY;function xY(){if(bY)return gY.exports;bY=1,yY();var e=R().Object,t=gY.exports=function(t,n){return e.getOwnPropertyDescriptor(t,n)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),gY.exports}var SY,CY;function wY(){return CY?SY:(CY=1,SY=xY(),SY)}var TY,EY;function DY(){return EY?TY:(EY=1,TY=wY(),TY)}var OY=F(DY()),kY={},AY;function jY(){if(AY)return kY;AY=1;var e=z(),t=GT(),n=SL(),r=fE(),i=PD(),a=dA();return e({target:`Object`,stat:!0,sham:!t},{getOwnPropertyDescriptors:function(e){for(var t=r(e),o=i.f,s=n(t),c={},l=0,u,d;s.length>l;)d=o(t,u=s[l++]),d!==void 0&&a(c,u,d);return c}}),kY}var MY,NY;function PY(){return NY?MY:(NY=1,jY(),MY=R().Object.getOwnPropertyDescriptors,MY)}var FY,IY;function LY(){return IY?FY:(IY=1,FY=PY(),FY)}var RY,zY;function BY(){return zY?RY:(zY=1,RY=LY(),RY)}var VY=F(BY()),HY={exports:{}},UY={},WY;function GY(){if(WY)return UY;WY=1;var e=z(),t=GT(),n=GA().f;return e({target:`Object`,stat:!0,forced:Object.defineProperties!==n,sham:!t},{defineProperties:n}),UY}var KY;function qY(){if(KY)return HY.exports;KY=1,GY();var e=R().Object,t=HY.exports=function(t,n){return e.defineProperties(t,n)};return e.defineProperties.sham&&(t.sham=!0),HY.exports}var JY,YY;function XY(){return YY?JY:(YY=1,JY=qY(),JY)}var ZY,QY;function $Y(){return QY?ZY:(QY=1,ZY=XY(),ZY)}var eX=F($Y()),tX,nX;function rX(){return nX?tX:(nX=1,tX=pJ(),tX)}var iX=F(rX()),aX={},oX;function sX(){if(oX)return aX;oX=1;var e=z(),t=Math.hypot,n=Math.abs,r=Math.sqrt;return e({target:`Math`,stat:!0,arity:2,forced:!!t&&t(1/0,NaN)!==1/0},{hypot:function(e,t){for(var i=0,a=0,o=arguments.length,s=0,c,l;a<o;)c=n(arguments[a++]),s<c?(l=s/c,i=i*l*l+1,s=c):c>0?(l=c/s,i+=l*l):i+=c;return s===1/0?1/0:s*r(i)}}),aX}var cX,lX;function uX(){return lX?cX:(lX=1,sX(),cX=R().Math.hypot,cX)}var dX,fX;function pX(){return fX?dX:(fX=1,dX=uX(),dX)}var mX,hX;function gX(){return hX?mX:(hX=1,mX=pX(),mX)}var _X=F(gX());function vX(e,t){let n=[`node`,`edge`,`label`],r=!0,i=dK(t,`chosen`);if(typeof i==`boolean`)r=i;else if(typeof i==`object`){if(H(n).call(n,e)===-1)throw Error(`choosify: subOption '`+e+`' should be one of '`+n.join(`', '`)+`'`);let i=dK(t,[`chosen`,e]);(typeof i==`boolean`||typeof i==`function`)&&(r=i)}return r}function yX(e,t,n){if(e.width<=0||e.height<=0)return!1;if(n!==void 0){let e={x:t.x-n.x,y:t.y-n.y};if(n.angle!==0){let r=-n.angle;t={x:Math.cos(r)*e.x-Math.sin(r)*e.y,y:Math.sin(r)*e.x+Math.cos(r)*e.y}}else t=e}let r=e.x+e.width,i=e.y+e.width;return e.left<t.x&&r>t.x&&e.top<t.y&&i>t.y}function bX(e){return typeof e==`string`&&e!==``}function xX(e,t,n,r){let i=r.x,a=r.y;if(typeof r.distanceToBorder==`function`){let n=r.distanceToBorder(e,t),o=Math.sin(t)*n,s=Math.cos(t)*n;s===n?(i+=n,a=r.y):o===n?(i=r.x,a-=n):(i+=s,a-=o)}else r.shape.width>r.shape.height?(i=r.x+r.shape.width*.5,a=r.y-n):(i=r.x+n,a=r.y-r.shape.height*.5);return{x:i,y:a}}var SX=class{static transform(e,t){EL(e)||(e=[e]);let n=t.point.x,r=t.point.y,i=t.angle,a=t.length;for(let t=0;t<e.length;++t){let o=e[t],s=o.x*Math.cos(i)-o.y*Math.sin(i),c=o.x*Math.sin(i)+o.y*Math.cos(i);o.x=n+a*s,o.y=r+a*c}}static drawPath(e,t){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(let n=1;n<t.length;++n)e.lineTo(t[n].x,t[n].y);e.closePath()}},CX=class extends SX{static draw(e,t){if(t.image){e.save(),e.translate(t.point.x,t.point.y),e.rotate(Math.PI/2+t.angle);let n=t.imageWidth==null?t.image.width:t.imageWidth,r=t.imageHeight==null?t.image.height:t.imageHeight;t.image.drawImageAtPosition(e,1,-n/2,0,n,r),e.restore()}return!1}},wX=class extends SX{static draw(e,t){let n=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return SX.transform(n,t),SX.drawPath(e,n),!0}},TX=class{static draw(e,t){let n=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return SX.transform(n,t),SX.drawPath(e,n),!0}},EX=class{static draw(e,t){let n={x:-.4,y:0};SX.transform(n,t),e.strokeStyle=e.fillStyle,e.fillStyle=`rgba(0, 0, 0, 0)`;let r=Math.PI,i=t.angle-r/2,a=t.angle+r/2;return e.beginPath(),e.arc(n.x,n.y,t.length*.4,i,a,!1),e.stroke(),!0}},DX=class{static draw(e,t){let n={x:-.3,y:0};SX.transform(n,t),e.strokeStyle=e.fillStyle,e.fillStyle=`rgba(0, 0, 0, 0)`;let r=Math.PI,i=t.angle+r/2,a=t.angle+3*r/2;return e.beginPath(),e.arc(n.x,n.y,t.length*.4,i,a,!1),e.stroke(),!0}},OX=class{static draw(e,t){let n=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return SX.transform(n,t),SX.drawPath(e,n),!0}},kX=class{static draw(e,t){let n=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return SX.transform(n,t),SX.drawPath(e,n),!0}},AX=class{static draw(e,t){let n={x:-.4,y:0};return SX.transform(n,t),yk(e,n.x,n.y,t.length*.4),!0}},jX=class{static draw(e,t){let n=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return SX.transform(n,t),SX.drawPath(e,n),!0}},MX=class{static draw(e,t){let n=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return SX.transform(n,t),SX.drawPath(e,n),!0}},NX=class{static draw(e,t){let n=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return SX.transform(n,t),SX.drawPath(e,n),!0}},PX=class{static draw(e,t){let n=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return SX.transform(n,t),SX.drawPath(e,n),!0}},FX=class{static draw(e,t){let n;switch(t.type&&(n=t.type.toLowerCase()),n){case`image`:return CX.draw(e,t);case`circle`:return AX.draw(e,t);case`box`:return MX.draw(e,t);case`crow`:return TX.draw(e,t);case`curve`:return EX.draw(e,t);case`diamond`:return NX.draw(e,t);case`inv_curve`:return DX.draw(e,t);case`triangle`:return OX.draw(e,t);case`inv_triangle`:return kX.draw(e,t);case`bar`:return jX.draw(e,t);case`vee`:return PX.draw(e,t);default:return wX.draw(e,t)}}};function IX(e,t){var n=tR(e);if(hY){var r=hY(e);t&&(r=FB(r).call(r,function(t){return OY(e,t).enumerable})),n.push.apply(n,r)}return n}function LX(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?V(n=IX(Object(i),!0)).call(n,function(t){aY(e,t,i[t])}):VY?eX(e,VY(i)):V(r=IX(Object(i))).call(r,function(t){iX(e,t,OY(i,t))})}return e}var RX=class{constructor(e,t,n){aY(this,`color`,{}),aY(this,`colorDirty`,!0),aY(this,`hoverWidth`,1.5),aY(this,`selectionWidth`,2),this._body=t,this._labelModule=n,this.setOptions(e),this.fromPoint=this.from,this.toPoint=this.to}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to]}cleanup(){return!1}setOptions(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}drawLine(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,t.dashes===!1?this._drawLine(e,t,i):this._drawDashedLine(e,t,i)}_drawLine(e,t,n,r,i){if(this.from!=this.to)this._line(e,t,n,r,i);else{let n=dL(this._getCircleData(e),3),r=n[0],i=n[1],a=n[2];this._circle(e,t,r,i,a)}}_drawDashedLine(e,t,n,r,i){e.lineCap=`round`;let a=EL(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(a),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,n);else{let n=dL(this._getCircleData(e),3),r=n[0],i=n[1],a=n[2];this._circle(e,t,r,i,a)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)Ok(e,this.from.x,this.from.y,this.to.x,this.to.y,a);else{let n=dL(this._getCircleData(e),3),r=n[0],i=n[1],a=n[2];this._circle(e,t,r,i,a)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}findBorderPosition(e,t,n){return this.from==this.to?this._findBorderPositionCircle(e,t,n):this._findBorderPosition(e,t,n)}findBorderPositions(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};{var t;let n=dL(yL(t=this._getCircleData(e)).call(t,0,2),2),r=n[0],i=n[1];return{from:this._findBorderPositionCircle(this.from,e,{x:r,y:i,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:r,y:i,low:.6,high:.8,direction:1})}}}_getCircleData(e){let t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);let n=xX(e,this.options.selfReference.angle,t,this.from);return[n.x,n.y,t]}_pointOnCircle(e,t,n,r){let i=r*2*Math.PI;return{x:e+n*Math.cos(i),y:t-n*Math.sin(i)}}_findBorderPositionCircle(e,t,n){let r=n.x,i=n.y,a=n.low,o=n.high,s=n.direction,c=this.options.selfReference.size,l,u=(a+o)*.5,d=0;this.options.arrowStrikethrough===!0&&(s===-1?d=this.options.endPointOffset.from:s===1&&(d=this.options.endPointOffset.to));let f=0;do{u=(a+o)*.5,l=this._pointOnCircle(r,i,c,u);let n=Math.atan2(e.y-l.y,e.x-l.x),p=e.distanceToBorder(t,n)+d-Math.sqrt((l.x-e.x)**2+(l.y-e.y)**2);if(Math.abs(p)<.05)break;p>0?s>0?a=u:o=u:s>0?o=u:a=u,++f}while(a<=o&&f<10);return LX(LX({},l),{},{t:u})}getLineWidth(e,t){return Math.max(e===!0?this.selectionWidth:t===!0?this.hoverWidth:this.options.width,.3/this._body.view.scale)}getColor(e,t){if(t.inheritsColor!==!1){if(t.inheritsColor===`both`&&this.from.id!==this.to.id){let n=e.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),r=this.from.options.color.highlight.border,i=this.to.options.color.highlight.border;return this.from.selected===!1&&this.to.selected===!1?(r=QG(this.from.options.color.border,t.opacity),i=QG(this.to.options.color.border,t.opacity)):this.from.selected===!0&&this.to.selected===!1?i=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(r=this.from.options.color.border),n.addColorStop(0,r),n.addColorStop(1,i),n}return t.inheritsColor===`to`?QG(this.to.options.color.border,t.opacity):QG(this.from.options.color.border,t.opacity)}return QG(t.color,t.opacity)}_circle(e,t,n,r,i){this.enableShadow(e,t);let a=0,o=Math.PI*2;if(!this.options.selfReference.renderBehindTheNode){let t=this.options.selfReference.angle,i=this.options.selfReference.angle+Math.PI,s=this._findBorderPositionCircle(this.from,e,{x:n,y:r,low:t,high:i,direction:-1}),c=this._findBorderPositionCircle(this.from,e,{x:n,y:r,low:t,high:i,direction:1});a=Math.atan2(s.y-r,s.x-n),o=Math.atan2(c.y-r,c.x-n)}e.beginPath(),e.arc(n,r,i,a,o,!1),e.stroke(),this.disableShadow(e,t)}getDistanceToEdge(e,t,n,r,i,a){if(this.from!=this.to)return this._getDistanceToEdge(e,t,n,r,i,a);{let e=dL(this._getCircleData(void 0),3),t=e[0],n=e[1],r=e[2],o=t-i,s=n-a;return Math.abs(Math.sqrt(o*o+s*s)-r)}}_getDistanceToLine(e,t,n,r,i,a){let o=n-e,s=r-t,c=o*o+s*s,l=((i-e)*o+(a-t)*s)/c;l>1?l=1:l<0&&(l=0);let u=e+l*o,d=t+l*s,f=u-i,p=d-a;return Math.sqrt(f*f+p*p)}getArrowData(e,t,n,r,i,a){let o,s,c,l,u,d,f,p=a.width;t===`from`?(c=this.from,l=this.to,u=a.fromArrowScale<0,d=Math.abs(a.fromArrowScale),f=a.fromArrowType):t===`to`?(c=this.to,l=this.from,u=a.toArrowScale<0,d=Math.abs(a.toArrowScale),f=a.toArrowType):(c=this.to,l=this.from,u=a.middleArrowScale<0,d=Math.abs(a.middleArrowScale),f=a.middleArrowType);let m=15*d+3*p;if(c!=l){let r=m/_X(c.x-l.x,c.y-l.y);if(t!==`middle`){if(this.options.smooth.enabled===!0){let i=this._findBorderPosition(c,e,{via:n}),a=this.getPoint(i.t+r*(t===`from`?1:-1),n);o=Math.atan2(i.y-a.y,i.x-a.x),s=i}else o=Math.atan2(c.y-l.y,c.x-l.x),s=this._findBorderPosition(c,e)}else{let e=(u?-r:r)/2,t=this.getPoint(.5+e,n),i=this.getPoint(.5-e,n);o=Math.atan2(t.y-i.y,t.x-i.x),s=this.getPoint(.5,n)}}else{let n=dL(this._getCircleData(e),3),r=n[0],i=n[1],a=n[2];if(t===`from`){let t=this.options.selfReference.angle,n=this.options.selfReference.angle+Math.PI,a=this._findBorderPositionCircle(this.from,e,{x:r,y:i,low:t,high:n,direction:-1});o=a.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,s=a}else if(t===`to`){let t=this.options.selfReference.angle,n=this.options.selfReference.angle+Math.PI,a=this._findBorderPositionCircle(this.from,e,{x:r,y:i,low:t,high:n,direction:1});o=a.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,s=a}else{let e=this.options.selfReference.angle/(2*Math.PI);s=this._pointOnCircle(r,i,a,e),o=e*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}let h={x:s.x-m*.9*Math.cos(o),y:s.y-m*.9*Math.sin(o)};return{point:s,core:h,angle:o,length:m,type:f}}drawArrowHead(e,t,n,r,i){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width,FX.draw(e,i)&&(this.enableShadow(e,t),aU(e).call(e),this.disableShadow(e,t))}enableShadow(e,t){t.shadow===!0&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}disableShadow(e,t){t.shadow===!0&&(e.shadowColor=`rgba(0,0,0,0)`,e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}drawBackground(e,t){if(t.background!==!1){let n={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=n.strokeStyle,e.lineWidth=n.lineWidth,e.dashes=n.dashes,this.setStrokeDashed(e,t.dashes)}}setStrokeDashed(e,t){if(t!==!1){if(e.setLineDash!==void 0){let n=EL(t)?t:[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?console.warn(`setLineDash is not supported in this browser. The dashed stroke cannot be used.`):e.setLineDash([])}};function zX(e,t){var n=tR(e);if(hY){var r=hY(e);t&&(r=FB(r).call(r,function(t){return OY(e,t).enumerable})),n.push.apply(n,r)}return n}function BX(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?V(n=zX(Object(i),!0)).call(n,function(t){aY(e,t,i[t])}):VY?eX(e,VY(i)):V(r=zX(Object(i))).call(r,function(t){iX(e,t,OY(i,t))})}return e}var VX=class extends RX{_findBorderPositionBezier(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates(),r=!1,i=1,a=0,o=this.to,s,c,l=this.options.endPointOffset?this.options.endPointOffset.to:0;e.id===this.from.id&&(o=this.from,r=!0,l=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(l=0);let u=0;do{c=(a+i)*.5,s=this.getPoint(c,n);let e=Math.atan2(o.y-s.y,o.x-s.x),d=o.distanceToBorder(t,e)+l-Math.sqrt((s.x-o.x)**2+(s.y-o.y)**2);if(Math.abs(d)<.2)break;d<0?r===!1?a=c:i=c:r===!1?i=c:a=c,++u}while(a<=i&&u<10);return BX(BX({},s),{},{t:c})}_getDistanceToBezierEdge(e,t,n,r,i,a,o){let s=1e9,c,l,u,d,f,p=e,m=t;for(l=1;l<10;l++)u=.1*l,d=(1-u)**2*e+2*u*(1-u)*o.x+u**2*n,f=(1-u)**2*t+2*u*(1-u)*o.y+u**2*r,l>0&&(c=this._getDistanceToLine(p,m,d,f,i,a),s=c<s?c:s),p=d,m=f;return s}_bezierCurve(e,t,n,r){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),n!=null&&n.x!=null?r!=null&&r.x!=null?e.bezierCurveTo(n.x,n.y,r.x,r.y,this.toPoint.x,this.toPoint.y):e.quadraticCurveTo(n.x,n.y,this.toPoint.x,this.toPoint.y):e.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(e,t),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}getViaNode(){return this._getViaCoordinates()}},HX=class extends VX{constructor(e,t,n){super(e,t,n),aY(this,`via`,this.via),this._boundFunction=()=>{this.positionBezierNode()},this._body.emitter.on(`_repositionBezierNodes`,this._boundFunction)}setOptions(e){super.setOptions(e);let t=!1;this.options.physics!==e.physics&&(t=!0),this.options=e,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(),t===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}connect(){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.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}cleanup(){return this._body.emitter.off(`_repositionBezierNodes`,this._boundFunction),this.via!==void 0&&(delete this._body.nodes[this.via.id],this.via=void 0,!0)}setupSupportNode(){if(this.via===void 0){let e=`edgeId:`+this.id,t=this._body.functions.createNode({id:e,shape:`circle`,physics:!0,hidden:!0});this._body.nodes[e]=t,this.via=t,this.via.parentEdgeId=this.id,this.positionBezierNode()}}positionBezierNode(){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)}_line(e,t,n){this._bezierCurve(e,t,n)}_getViaCoordinates(){return this.via}getViaNode(){return this.via}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){let t=dL(this._getCircleData(),3),n=t[0],r=t[1],i=t[2],a=2*Math.PI*(1-e);return{x:n+i*Math.sin(a),y:r+i-i*(1-Math.cos(a))}}return{x:(1-e)**2*this.fromPoint.x+2*e*(1-e)*t.x+e**2*this.toPoint.x,y:(1-e)**2*this.fromPoint.y+2*e*(1-e)*t.y+e**2*this.toPoint.y}}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t,this.via)}_getDistanceToEdge(e,t,n,r,i,a){return this._getDistanceToBezierEdge(e,t,n,r,i,a,this.via)}},UX=class extends VX{_line(e,t,n){this._bezierCurve(e,t,n)}getViaNode(){return this._getViaCoordinates()}_getViaCoordinates(){let e=this.options.smooth.roundness,t=this.options.smooth.type,n=Math.abs(this.from.x-this.to.x),r=Math.abs(this.from.y-this.to.y);if(t===`discrete`||t===`diagonalCross`){let i,a;i=a=n<=r?e*r:e*n,this.from.x>this.to.x&&(i=-i),this.from.y>=this.to.y&&(a=-a);let o=this.from.x+i,s=this.from.y+a;return t===`discrete`&&(n<=r?o=n<e*r?this.from.x:o:s=r<e*n?this.from.y:s),{x:o,y:s}}if(t===`straightCross`){let t=(1-e)*n,i=(1-e)*r;return n<=r?(t=0,this.from.y<this.to.y&&(i=-i)):(this.from.x<this.to.x&&(t=-t),i=0),{x:this.to.x+t,y:this.to.y+i}}if(t===`horizontal`){let t=(1-e)*n;return this.from.x<this.to.x&&(t=-t),{x:this.to.x+t,y:this.from.y}}if(t===`vertical`){let t=(1-e)*r;return this.from.y<this.to.y&&(t=-t),{x:this.from.x,y:this.to.y+t}}if(t===`curvedCW`){n=this.to.x-this.from.x,r=this.from.y-this.to.y;let t=Math.sqrt(n*n+r*r),i=Math.PI,a=(Math.atan2(r,n)+(e*.5+.5)*i)%(2*i);return{x:this.from.x+(e*.5+.5)*t*Math.sin(a),y:this.from.y+(e*.5+.5)*t*Math.cos(a)}}if(t===`curvedCCW`){n=this.to.x-this.from.x,r=this.from.y-this.to.y;let t=Math.sqrt(n*n+r*r),i=Math.PI,a=(Math.atan2(r,n)+(-e*.5+.5)*i)%(2*i);return{x:this.from.x+(e*.5+.5)*t*Math.sin(a),y:this.from.y+(e*.5+.5)*t*Math.cos(a)}}{let t,i;t=i=n<=r?e*r:e*n,this.from.x>this.to.x&&(t=-t),this.from.y>=this.to.y&&(i=-i);let a=this.from.x+t,o=this.from.y+i;return n<=r?a=this.from.x<=this.to.x?this.to.x<a?this.to.x:a:this.to.x>a?this.to.x:a:o=this.from.y>=this.to.y?this.to.y>o?this.to.y:o:this.to.y<o?this.to.y:o,{x:a,y:o}}}_findBorderPosition(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(e,t,n.via)}_getDistanceToEdge(e,t,n,r,i,a){let o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(e,t,n,r,i,a,o)}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),n=e;return{x:(1-n)**2*this.fromPoint.x+2*n*(1-n)*t.x+n**2*this.toPoint.x,y:(1-n)**2*this.fromPoint.y+2*n*(1-n)*t.y+n**2*this.toPoint.y}}},WX=class extends VX{_getDistanceToBezierEdge2(e,t,n,r,i,a,o,s){let c=1e9,l=e,u=t,d=[0,0,0,0];for(let f=1;f<10;f++){let p=.1*f;d[0]=(1-p)**3,d[1]=3*p*(1-p)**2,d[2]=3*p**2*(1-p),d[3]=p**3;let m=d[0]*e+d[1]*o.x+d[2]*s.x+d[3]*n,h=d[0]*t+d[1]*o.y+d[2]*s.y+d[3]*r;if(f>0){let e=this._getDistanceToLine(l,u,m,h,i,a);c=e<c?e:c}l=m,u=h}return c}},GX=class extends WX{_line(e,t,n){let r=n[0],i=n[1];this._bezierCurve(e,t,r,i)}_getViaCoordinates(){let e=this.from.x-this.to.x,t=this.from.y-this.to.y,n,r,i,a,o=this.options.smooth.roundness;return(Math.abs(e)>Math.abs(t)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection===`horizontal`)&&this.options.smooth.forceDirection!==`vertical`?(r=this.from.y,a=this.to.y,n=this.from.x-o*e,i=this.to.x+o*e):(r=this.from.y-o*t,a=this.to.y+o*t,n=this.from.x,i=this.to.x),[{x:n,y:r},{x:i,y:a}]}getViaNode(){return this._getViaCoordinates()}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t)}_getDistanceToEdge(e,t,n,r,i,a){let o=dL(arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates(),2),s=o[0],c=o[1];return this._getDistanceToBezierEdge2(e,t,n,r,i,a,s,c)}getPoint(e){let t=dL(arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates(),2),n=t[0],r=t[1],i=e,a=[(1-i)**3,3*i*(1-i)**2,3*i**2*(1-i),i**3];return{x:a[0]*this.fromPoint.x+a[1]*n.x+a[2]*r.x+a[3]*this.toPoint.x,y:a[0]*this.fromPoint.y+a[1]*n.y+a[2]*r.y+a[3]*this.toPoint.y}}},KX=class extends RX{_line(e,t){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),e.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}getViaNode(){}getPoint(e){return{x:(1-e)*this.fromPoint.x+e*this.toPoint.x,y:(1-e)*this.fromPoint.y+e*this.toPoint.y}}_findBorderPosition(e,t){let n=this.to,r=this.from;e.id===this.from.id&&(n=this.from,r=this.to);let i=Math.atan2(n.y-r.y,n.x-r.x),a=n.x-r.x,o=n.y-r.y,s=Math.sqrt(a*a+o*o),c=(s-e.distanceToBorder(t,i))/s;return{x:(1-c)*r.x+c*n.x,y:(1-c)*r.y+c*n.y,t:0}}_getDistanceToEdge(e,t,n,r,i,a){return this._getDistanceToLine(e,t,n,r,i,a)}},qX,JX;function YX(){return JX?qX:(JX=1,XN(),qX=ok()(`Array`,`values`),qX)}var XX,ZX;function QX(){return ZX?XX:(ZX=1,XX=YX(),XX)}var $X,eZ;function tZ(){if(eZ)return $X;eZ=1,tP();var e=bA(),t=mD(),n=CE(),r=QX(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return $X=function(o){var s=o.values;return o===i||n(i,o)&&s===i.values||t(a,e(o))?r:s},$X}var nZ,rZ;function iZ(){return rZ?nZ:(rZ=1,nZ=tZ(),nZ)}var aZ=F(iZ()),oZ=class{constructor(e){this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}_add(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`normal`;this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});let r=t;(t===void 0||t===``)&&(r=` `);let i=this.measureText(r,n),a=JO({},aZ(i));a.text=t,a.width=i.width,a.mod=n,(t===void 0||t===``)&&(a.width=0),this.lines[e].blocks.push(a),this.lines[e].width+=a.width}curWidth(){let e=this.lines[this.current];return e===void 0?0:e.width}append(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`normal`;this._add(this.current,e,t)}newLine(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`normal`;this._add(this.current,e,t),this.current++}determineLineHeights(){for(let e=0;e<this.lines.length;e++){let t=this.lines[e],n=0;if(t.blocks!==void 0)for(let e=0;e<t.blocks.length;e++){let r=t.blocks[e];n<r.height&&(n=r.height)}t.height=n}}determineLabelSize(){let e=0,t=0;for(let n=0;n<this.lines.length;n++){let r=this.lines[n];r.width>e&&(e=r.width),t+=r.height}this.width=e,this.height=t}removeEmptyBlocks(){let e=[];for(let t=0;t<this.lines.length;t++){let n=this.lines[t];if(n.blocks.length===0||t===this.lines.length-1&&n.width===0)continue;let r={};JO(r,n),r.blocks=[];let i,a=[];for(let e=0;e<n.blocks.length;e++){let t=n.blocks[e];t.width===0?i===void 0&&(i=t):a.push(t)}a.length===0&&i!==void 0&&a.push(i),r.blocks=a,e.push(r)}return e}finalize(){this.determineLineHeights(),this.determineLabelSize();let e=this.removeEmptyBlocks();return{width:this.width,height:this.height,lines:e}}},sZ={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},cZ=class{constructor(e){this.text=e,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer=``,this.modStack=[],this.blocks=[]}mod(){return this.modStack.length===0?`normal`:this.modStack[0]}modName(){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`}emitBlock(){this.spacing&&=(this.add(` `),!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer=``)}add(e){e===` `&&(this.spacing=!0),this.spacing&&=(this.buffer+=` `,!1),e!=` `&&(this.buffer+=e)}parseWS(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}setTag(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}unsetTag(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}parseStartTag(e,t){return!this.mono&&!this[e]&&this.match(t)?(this.setTag(e),!0):!1}match(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=dL(this.prepareRegExp(e),2),r=n[0],i=n[1],a=r.test(this.text.substr(this.position,i));return a&&t&&(this.position+=i-1),a}parseEndTag(e,t,n){let r=this.mod()===e;return r&&=e===`mono`?this.mono:!this.mono,r&&this.match(t)?((n===void 0||this.position===this.text.length-1||this.match(n,!1))&&this.unsetTag(e),!0):!1}replace(e,t){return this.match(e)?(this.add(t),this.position+=length-1,!0):!1}prepareRegExp(e){let t,n;if(e instanceof RegExp)n=e,t=1;else{let r=sZ[e];n=r===void 0?new RegExp(e):r,t=e.length}return[n,t]}},lZ=class{constructor(e,t,n,r){this.ctx=e,this.parent=t,this.selected=n,this.hover=r;let i=(t,i)=>{if(t===void 0)return 0;let a=this.parent.getFormattingValues(e,n,r,i),o=0;return t!==``&&(o=this.ctx.measureText(t).width),{width:o,values:a}};this.lines=new oZ(i)}process(e){if(!bX(e))return this.lines.finalize();let t=this.parent.fontOptions;e=e.replace(/\r\n/g,`
28
+ `),e=e.replace(/\r/g,`
29
+ `);let n=String(e).split(`
30
+ `),r=n.length;if(t.multi)for(let e=0;e<r;e++){let r=this.splitBlocks(n[e],t.multi);if(r!==void 0){if(r.length===0){this.lines.newLine(``);continue}if(t.maxWdt>0)for(let e=0;e<r.length;e++){let t=r[e].mod,n=r[e].text;this.splitStringIntoLines(n,t,!0)}else for(let e=0;e<r.length;e++){let t=r[e].mod,n=r[e].text;this.lines.append(n,t)}this.lines.newLine()}}else if(t.maxWdt>0)for(let e=0;e<r;e++)this.splitStringIntoLines(n[e]);else for(let e=0;e<r;e++)this.lines.newLine(n[e]);return this.lines.finalize()}decodeMarkupSystem(e){let t=`none`;return e===`markdown`||e===`md`?t=`markdown`:(e===!0||e===`html`)&&(t=`html`),t}splitHtmlBlocks(e){let t=new cZ(e),n=e=>/&/.test(e)?(t.replace(t.text,`&lt;`,`<`)||t.replace(t.text,`&amp;`,`&`)||t.add(`&`),!0):!1;for(;t.position<t.text.length;){let e=t.text.charAt(t.position);t.parseWS(e)||/</.test(e)&&(t.parseStartTag(`bold`,`<b>`)||t.parseStartTag(`ital`,`<i>`)||t.parseStartTag(`mono`,`<code>`)||t.parseEndTag(`bold`,`</b>`)||t.parseEndTag(`ital`,`</i>`)||t.parseEndTag(`mono`,`</code>`))||n(e)||t.add(e),t.position++}return t.emitBlock(),t.blocks}splitMarkdownBlocks(e){let t=new cZ(e),n=!0,r=e=>/\\/.test(e)?(t.position<this.text.length+1&&(t.position++,e=this.text.charAt(t.position),/ \t/.test(e)?t.spacing=!0:(t.add(e),n=!1)),!0):!1;for(;t.position<t.text.length;){let e=t.text.charAt(t.position);t.parseWS(e)||r(e)||(n||t.spacing)&&(t.parseStartTag(`bold`,`*`)||t.parseStartTag(`ital`,`_`)||t.parseStartTag(`mono`,"`"))||t.parseEndTag(`bold`,`*`,`afterBold`)||t.parseEndTag(`ital`,`_`,`afterItal`)||t.parseEndTag(`mono`,"`",`afterMono`)||(t.add(e),n=!1),t.position++}return t.emitBlock(),t.blocks}splitBlocks(e,t){let n=this.decodeMarkupSystem(t);if(n===`none`)return[{text:e,mod:`normal`}];if(n===`markdown`)return this.splitMarkdownBlocks(e);if(n===`html`)return this.splitHtmlBlocks(e)}overMaxWidth(e){let t=this.ctx.measureText(e).width;return this.lines.curWidth()+t>this.parent.fontOptions.maxWdt}getLongestFit(e){let t=``,n=0;for(;n<e.length;){let r=t+(t===``?``:` `)+e[n];if(this.overMaxWidth(r))break;t=r,n++}return n}getLongestFitWord(e){let t=0;for(;t<e.length&&!this.overMaxWidth(yL(e).call(e,0,t));)t++;return t}splitStringIntoLines(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`normal`,n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),e=e.replace(/^( +)/g,`$1\r`),e=e.replace(/([^\r][^ ]*)( +)/g,`$1\r$2\r`);let r=e.split(`\r`);for(;r.length>0;){let e=this.getLongestFit(r);if(e===0){let e=r[0],n=this.getLongestFitWord(e);this.lines.newLine(yL(e).call(e,0,n),t),r[0]=yL(e).call(e,n)}else{let i=e;r[e-1]===` `?e--:r[i]===` `&&i++;let a=yL(r).call(r,0,e).join(``);e==r.length&&n?this.lines.append(a,t):this.lines.newLine(a,t),r=yL(r).call(r,i)}}}},uZ=[`bold`,`ital`,`boldital`,`mono`],dZ=class e{constructor(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(t),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=n}setOptions(e){if(this.elementOptions=e,this.initFontOptions(e.font),bX(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(typeof e.font==`object`){let t=e.font.size;t!==void 0&&(this.baseSize=t)}}}initFontOptions(t){if(W(uZ,e=>{this.fontOptions[e]={}}),e.parseFontString(this.fontOptions,t)){this.fontOptions.vadjust=0;return}W(t,(e,t)=>{e!=null&&typeof e!=`object`&&(this.fontOptions[t]=e)})}static parseFontString(e,t){if(!t||typeof t!=`string`)return!1;let n=t.split(` `);return e.size=+n[0].replace(`px`,``),e.face=n[1],e.color=n[2],!0}constrain(e){let t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:`middle`},n=dK(e,`widthConstraint`);if(typeof n==`number`)t.maxWdt=Number(n),t.minWdt=Number(n);else if(typeof n==`object`){let n=dK(e,[`widthConstraint`,`maximum`]);typeof n==`number`&&(t.maxWdt=Number(n));let r=dK(e,[`widthConstraint`,`minimum`]);typeof r==`number`&&(t.minWdt=Number(r))}let r=dK(e,`heightConstraint`);if(typeof r==`number`)t.minHgt=Number(r);else if(typeof r==`object`){let n=dK(e,[`heightConstraint`,`minimum`]);typeof n==`number`&&(t.minHgt=Number(n));let r=dK(e,[`heightConstraint`,`valign`]);typeof r==`string`&&(r===`top`||r===`bottom`)&&(t.valign=r)}return t}update(e,t){this.setOptions(e,!0),this.propagateFonts(t),U(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=vX(`label`,t)}adjustSizes(e){let t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);let n=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=n)}addFontOptionsToPile(e,t){for(let n=0;n<t.length;++n)this.addFontToPile(e,t[n])}addFontToPile(e,t){if(t===void 0||t.font===void 0||t.font===null)return;let n=t.font;e.push(n)}getBasicOptions(t){let n={};for(let r=0;r<t.length;++r){let i=t[r],a={};e.parseFontString(a,i)&&(i=a),W(i,(e,t)=>{e!==void 0&&(Object.prototype.hasOwnProperty.call(n,t)||(H(uZ).call(uZ,t)===-1?n[t]=e:n[t]={}))})}return n}getFontOption(t,n,r){let i;for(let a=0;a<t.length;++a){let o=t[a];if(Object.prototype.hasOwnProperty.call(o,n)){if(i=o[n],i==null)continue;let t={};if(e.parseFontString(t,i)&&(i=t),Object.prototype.hasOwnProperty.call(i,r))return i[r]}}if(Object.prototype.hasOwnProperty.call(this.fontOptions,r))return this.fontOptions[r];throw Error(`Did not find value for multi-font for property: '`+r+`'`)}getFontOptions(e,t){let n={},r=[`color`,`size`,`face`,`mod`,`vadjust`];for(let i=0;i<r.length;++i){let a=r[i];n[a]=this.getFontOption(e,t,a)}return n}propagateFonts(e){let t=[];this.addFontOptionsToPile(t,e),this.fontOptions=this.getBasicOptions(t);for(let e=0;e<uZ.length;++e){let n=uZ[e],r=this.fontOptions[n];W(this.getFontOptions(t,n),(e,t)=>{r[t]=e}),r.size=Number(r.size),r.vadjust=Number(r.vadjust)}}draw(e,t,n,r,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:`middle`;if(this.elementOptions.label===void 0)return;let o=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&o<this.elementOptions.scaling.label.drawThreshold-1||(o>=this.elementOptions.scaling.label.maxVisible&&(o=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,r,i,t,n,a),this._drawBackground(e),this._drawText(e,t,this.size.yLine,a,o))}_drawBackground(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!==`none`){e.fillStyle=this.fontOptions.background;let t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}_drawText(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`middle`,i=arguments.length>4?arguments[4]:void 0;var a=dL(this._setAlignment(e,t,n,r),2);t=a[0],n=a[1],e.textAlign=`left`,t-=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(let r=0;r<this.lineCount;r++){let a=this.lines[r];if(a&&a.blocks){let r=0;this.isEdgeLabel||this.fontOptions.align===`center`?r+=(this.size.width-a.width)/2:this.fontOptions.align===`right`&&(r+=this.size.width-a.width);for(let o=0;o<a.blocks.length;o++){let s=a.blocks[o];e.font=s.font;let c=dL(this._getColor(s.color,i,s.strokeColor),2),l=c[0],u=c[1];s.strokeWidth>0&&(e.lineWidth=s.strokeWidth,e.strokeStyle=u,e.lineJoin=`round`),e.fillStyle=l,s.strokeWidth>0&&e.strokeText(s.text,t+r,n+s.vadjust),e.fillText(s.text,t+r,n+s.vadjust),r+=s.width}n+=a.height}}}_setAlignment(e,t,n,r){return this.isEdgeLabel&&this.fontOptions.align!==`horizontal`&&this.pointToSelf===!1?(t=0,n=0,this.fontOptions.align===`top`?(e.textBaseline=`alphabetic`,n-=4):this.fontOptions.align===`bottom`?(e.textBaseline=`hanging`,n+=4):e.textBaseline=`middle`):e.textBaseline=r,[t,n]}_getColor(e,t,n){let r=e||`#000000`,i=n||`#ffffff`;if(t<=this.elementOptions.scaling.label.drawThreshold){let e=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));r=QG(r,e),i=QG(i,e)}return[r,i]}getTextSize(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return this._processLabel(e,t,n),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}getSize(){let e=this.size.left,t=this.size.top-1;if(this.isEdgeLabel){let n=-this.size.width*.5;switch(this.fontOptions.align){case`middle`:e=n,t=-this.size.height*.5;break;case`top`:e=n,t=-(this.size.height+2);break;case`bottom`:e=n,t=2}}return{left:e,top:t,width:this.size.width,height:this.size.height}}calculateLabelSize(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:`middle`;this._processLabel(e,t,n),this.size.left=r-this.size.width*.5,this.size.top=i-this.size.height*.5,this.size.yLine=i+(1-this.lineCount)*.5*this.fontOptions.size,a===`hanging`&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}getFormattingValues(e,t,n,r){let i=function(e,t,n){return t===`normal`?n===`mod`?``:e[n]:e[t][n]===void 0?e[n]:e[t][n]},a={color:i(this.fontOptions,r,`color`),size:i(this.fontOptions,r,`size`),face:i(this.fontOptions,r,`face`),mod:i(this.fontOptions,r,`mod`),vadjust:i(this.fontOptions,r,`vadjust`),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||n)&&(r===`normal`&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?a.mod=`bold`:typeof this.fontOptions.chooser==`function`&&this.fontOptions.chooser(a,this.elementOptions.id,t,n));let o=``;return a.mod!==void 0&&a.mod!==``&&(o+=a.mod+` `),o+=a.size+`px `+a.face,e.font=o.replace(/"/g,``),a.font=e.font,a.height=a.size,a}differentState(e,t){return e!==this.selectedState||t!==this.hoverState}_processLabelText(e,t,n,r){return new lZ(e,this,t,n).process(r)}_processLabel(e,t,n){if(this.labelDirty===!1&&!this.differentState(t,n))return;let r=this._processLabelText(e,t,n,this.elementOptions.label);this.fontOptions.minWdt>0&&r.width<this.fontOptions.minWdt&&(r.width=this.fontOptions.minWdt),this.size.labelHeight=r.height,this.fontOptions.minHgt>0&&r.height<this.fontOptions.minHgt&&(r.height=this.fontOptions.minHgt),this.lines=r.lines,this.lineCount=r.lines.length,this.size.width=r.width,this.size.height=r.height,this.selectedState=t,this.hoverState=n,this.labelDirty=!1}visible(){return!(this.size.width===0||this.size.height===0||this.elementOptions.label===void 0||this.fontOptions.size*this.body.view.scale<this.elementOptions.scaling.label.drawThreshold-1)}},fZ=class e{constructor(e,t,n,r,i){if(t===void 0)throw Error(`No body provided`);this.options=cK(r),this.globalOptions=r,this.defaultOptions=i,this.body=t,this.imagelist=n,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 dZ(this.body,this.options,!0),this.setOptions(e)}setOptions(t){if(!t)return;let n=t.physics!==void 0&&this.options.physics!==t.physics||t.hidden!==void 0&&(this.options.hidden||!1)!==(t.hidden||!1)||t.from!==void 0&&this.options.from!==t.from||t.to!==void 0&&this.options.to!==t.to;e.parseOptions(this.options,t,!0,this.globalOptions),t.id!==void 0&&(this.id=t.id),t.from!==void 0&&(this.fromId=t.from),t.to!==void 0&&(this.toId=t.to),t.title!==void 0&&(this.title=t.title),t.value!==void 0&&(t.value=Hq(t.value));let r=[t,this.options,this.defaultOptions];return this.chooser=vX(`edge`,r),this.updateLabelModule(t),n=this.updateEdgeType()||n,this._setInteractionWidths(),this.connect(),n}static parseOptions(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0&&arguments[4];if(GG([`endPointOffset`,`arrowStrikethrough`,`id`,`from`,`hidden`,`hoverWidth`,`labelHighlightBold`,`length`,`line`,`opacity`,`physics`,`scaling`,`selectionWidth`,`selfReferenceSize`,`selfReference`,`to`,`title`,`value`,`width`,`font`,`chosen`,`widthConstraint`],e,t,n),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(iJ(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=r.endPointOffset.from===void 0?0:r.endPointOffset.from,console.error(`endPointOffset.from is not a valid number`))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(iJ(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=r.endPointOffset.to===void 0?0:r.endPointOffset.to,console.error(`endPointOffset.to is not a valid number`))),bX(t.label)?e.label=t.label:bX(e.label)||(e.label=void 0),lK(e,t,`smooth`,r),lK(e,t,`shadow`,r),lK(e,t,`background`,r),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:n===!0&&t.dashes===null&&(e.dashes=qV(r.dashes)),t.scaling!==void 0&&t.scaling!==null?(t.scaling.min!==void 0&&(e.scaling.min=t.scaling.min),t.scaling.max!==void 0&&(e.scaling.max=t.scaling.max),lK(e.scaling,t.scaling,`label`,r.scaling)):n===!0&&t.scaling===null&&(e.scaling=qV(r.scaling)),t.arrows!==void 0&&t.arrows!==null){if(typeof t.arrows==`string`){let n=t.arrows.toLowerCase();e.arrows.to.enabled=H(n).call(n,`to`)!=-1,e.arrows.middle.enabled=H(n).call(n,`middle`)!=-1,e.arrows.from.enabled=H(n).call(n,`from`)!=-1}else if(typeof t.arrows==`object`)lK(e.arrows,t.arrows,`to`,r.arrows),lK(e.arrows,t.arrows,`middle`,r.arrows),lK(e.arrows,t.arrows,`from`,r.arrows);else throw Error(`The arrow newOptions can only be an object or a string. Refer to the documentation. You used:`+hH(t.arrows))}else n===!0&&t.arrows===null&&(e.arrows=qV(r.arrows));if(t.color!==void 0&&t.color!==null){let a=VG(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,o=e.color;if(i)U(o,r.color,!1,n);else for(let e in o)Object.prototype.hasOwnProperty.call(o,e)&&delete o[e];if(VG(o))o.color=o,o.highlight=o,o.hover=o,o.inherit=!1,a.opacity===void 0&&(o.opacity=1);else{let e=!1;a.color!==void 0&&(o.color=a.color,e=!0),a.highlight!==void 0&&(o.highlight=a.highlight,e=!0),a.hover!==void 0&&(o.hover=a.hover,e=!0),a.inherit!==void 0&&(o.inherit=a.inherit),a.opacity!==void 0&&(o.opacity=Math.min(1,Math.max(0,a.opacity))),e===!0?o.inherit=!1:o.inherit===void 0&&(o.inherit=`from`)}}else n===!0&&t.color===null&&(e.color=cK(r.color));n===!0&&t.font===null&&(e.font=cK(r.font)),Object.prototype.hasOwnProperty.call(t,`selfReferenceSize`)&&(console.warn(`The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}`),e.selfReference.size=t.selfReferenceSize)}getFormattingValues(){let e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,t=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,n=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,r=this.options.color.inherit,i={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:t,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:r?void 0:this.options.color.color,inheritsColor:r,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){let e=this.options.selectionWidth;typeof e==`function`?i.width=e(i.width):typeof e==`number`&&(i.width+=e),i.width=Math.max(i.width,.3/this.body.view.scale),i.color=this.options.color.highlight,i.shadow=this.options.shadow.enabled}else if(this.hover){let e=this.options.hoverWidth;typeof e==`function`?i.width=e(i.width):typeof e==`number`&&(i.width+=e),i.width=Math.max(i.width,.3/this.body.view.scale),i.color=this.options.color.hover,i.shadow=this.options.shadow.enabled}}else typeof this.chooser==`function`&&(this.chooser(i,this.options.id,this.selected,this.hover),i.color!==void 0&&(i.inheritsColor=!1),i.shadow===!1&&(i.shadowColor!==this.options.shadow.color||i.shadowSize!==this.options.shadow.size||i.shadowX!==this.options.shadow.x||i.shadowY!==this.options.shadow.y)&&(i.shadow=!0))}else i.shadow=this.options.shadow.enabled,i.width=Math.max(i.width,.3/this.body.view.scale);return i}updateLabelModule(e){let t=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,t),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateEdgeType(){let e=this.options.smooth,t=!1,n=!0;return this.edgeType!==void 0&&((this.edgeType instanceof HX&&e.enabled===!0&&e.type===`dynamic`||this.edgeType instanceof GX&&e.enabled===!0&&e.type===`cubicBezier`||this.edgeType instanceof UX&&e.enabled===!0&&e.type!==`dynamic`&&e.type!==`cubicBezier`||this.edgeType instanceof KX&&e.type.enabled===!1)&&(n=!1),n===!0&&(t=this.cleanup())),n===!0?e.enabled===!0?e.type===`dynamic`?(t=!0,this.edgeType=new HX(this.options,this.body,this.labelModule)):this.edgeType=e.type===`cubicBezier`?new GX(this.options,this.body,this.labelModule):new UX(this.options,this.body,this.labelModule):this.edgeType=new KX(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}connect(){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()}disconnect(){this.from&&=(this.from.detachEdge(this),void 0),this.to&&=(this.to.detachEdge(this),void 0),this.connected=!1}getTitle(){return this.title}isSelected(){return this.selected}getValue(){return this.options.value}setValueRange(e,t,n){if(this.options.value!==void 0){let r=this.options.scaling.customScalingFunction(e,t,n,this.options.value),i=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){let e=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+r*e}this.options.width=this.options.scaling.min+r*i}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}_setInteractionWidths(){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}draw(e){let t=this.getFormattingValues();if(t.hidden)return;let n=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,n),this.drawLabel(e,n)}drawArrows(e){let t=this.getFormattingValues();if(t.hidden)return;let n=this.edgeType.getViaNode(),r={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(r.from=this.edgeType.getArrowData(e,`from`,n,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.fromPoint=r.from.core),t.fromArrowSrc&&(r.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(r.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(r.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(r.to=this.edgeType.getArrowData(e,`to`,n,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.toPoint=r.to.core),t.toArrowSrc&&(r.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(r.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(r.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(r.middle=this.edgeType.getArrowData(e,`middle`,n,this.selected,this.hover,t),t.middleArrowSrc&&(r.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(r.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(r.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,r.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,r.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,r.to)}drawLabel(e,t){if(this.options.label!==void 0){let n=this.from,r=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);let i;if(n.id!=r.id){this.labelModule.pointToSelf=!1,i=this.edgeType.getPoint(.5,t),e.save();let n=this._getRotation(e);n.angle!=0&&(e.translate(n.x,n.y),e.rotate(n.angle)),this.labelModule.draw(e,i.x,i.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;let t=xX(e,this.options.selfReference.angle,this.options.selfReference.size,n);i=this._pointOnCircle(t.x,t.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,i.x,i.y,this.selected,this.hover)}}}getItemsOnPoint(e){let t=[];if(this.labelModule.visible()){let n=this._getRotation();yX(this.labelModule.getSize(),e,n)&&t.push({edgeId:this.id,labelId:0})}let n={left:e.x,top:e.y};return this.isOverlappingWith(n)&&t.push({edgeId:this.id}),t}isOverlappingWith(e){if(this.connected){let t=this.from.x,n=this.from.y,r=this.to.x,i=this.to.y,a=e.left,o=e.top;return this.edgeType.getDistanceToEdge(t,n,r,i,a,o)<10}return!1}_getRotation(e){let t=this.edgeType.getViaNode(),n=this.edgeType.getPoint(.5,t);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,n.x,n.y);let r={x:n.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align===`horizontal`)return r;let i=this.from.y-this.to.y,a=this.from.x-this.to.x,o=Math.atan2(i,a);return(o<-1&&a<0||o>0&&a<0)&&(o+=Math.PI),r.angle=o,r}_pointOnCircle(e,t,n,r){return{x:e+n*Math.cos(r),y:t-n*Math.sin(r)}}select(){this.selected=!0}unselect(){this.selected=!1}cleanup(){return this.edgeType.cleanup()}remove(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}endPointsValid(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}},pZ={},mZ;function hZ(){if(mZ)return pZ;mZ=1;var e=z(),t=I(),n=oj().f;return e({target:`Object`,stat:!0,forced:t(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:n}),pZ}var gZ,_Z;function vZ(){if(_Z)return gZ;_Z=1,hZ();var e=R().Object;return gZ=function(t){return e.getOwnPropertyNames(t)},gZ}var yZ,bZ;function xZ(){return bZ?yZ:(bZ=1,yZ=vZ(),yZ)}var SZ,CZ;function wZ(){return CZ?SZ:(CZ=1,SZ=xZ(),SZ)}var TZ=F(wZ()),EZ=class{constructor(e,t,n){this.body=t,this.labelModule=n,this.setOptions(e),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}}setOptions(e){this.options=e}_setMargins(e){this.margin={},this.options.margin&&(typeof 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)}_distanceToBorder(e,t){let n=this.options.borderWidth;return e&&this.resize(e),Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+n}enableShadow(e,t){t.shadow&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}disableShadow(e,t){t.shadow&&(e.shadowColor=`rgba(0,0,0,0)`,e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}enableBorderDashes(e,t){if(t.borderDashes!==!1){if(e.setLineDash!==void 0){let n=t.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,t.borderDashes=!1}}disableBorderDashes(e,t){t.borderDashes!==!1&&(e.setLineDash===void 0?(console.warn(`setLineDash is not supported in this browser. The dashed borders cannot be used.`),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1):e.setLineDash([0]))}needsRefresh(e,t){return this.refreshNeeded===!0?(this.refreshNeeded=!1,!0):this.width===void 0||this.labelModule.differentState(e,t)}initContextForDraw(e,t){let n=t.borderWidth/this.body.view.scale;e.lineWidth=Math.min(this.width,n),e.strokeStyle=t.borderColor,e.fillStyle=t.color}performStroke(e,t){let n=t.borderWidth/this.body.view.scale;e.save(),n>0&&(this.enableBorderDashes(e,t),e.stroke(),this.disableBorderDashes(e,t)),e.restore()}performFill(e,t){e.save(),e.fillStyle=t.color,this.enableShadow(e,t),aU(e).call(e),this.disableShadow(e,t),e.restore(),this.performStroke(e,t)}_addBoundingBoxMargin(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}_updateBoundingBox(e,t,n,r,i){n!==void 0&&this.resize(n,r,i),this.left=e-this.width/2,this.top=t-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}updateBoundingBox(e,t,n,r,i){this._updateBoundingBox(e,t,n,r,i)}getDimensionsFromLabel(e,t,n){this.textSize=this.labelModule.getTextSize(e,t,n);let r=this.textSize.width,i=this.textSize.height;return r===0&&(r=14,i=14),{width:r,height:i}}},DZ=class extends EZ{constructor(e,t,n){super(e,t,n),this._setMargins(n)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,n)){let r=this.getDimensionsFromLabel(e,t,n);this.width=r.width+this.margin.right+this.margin.left,this.height=r.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}draw(e,t,n,r,i,a){this.resize(e,r,i),this.left=t-this.width/2,this.top=n-this.height/2,this.initContextForDraw(e,a),Tk(e,this.left,this.top,this.width,this.height,a.borderRadius),this.performFill(e,a),this.updateBoundingBox(t,n,e,r,i),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,r,i)}updateBoundingBox(e,t,n,r,i){this._updateBoundingBox(e,t,n,r,i);let a=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(a)}distanceToBorder(e,t){e&&this.resize(e);let n=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+n}},OZ=class extends EZ{constructor(e,t,n){super(e,t,n),this.labelOffset=0,this.selected=!1}setOptions(e,t,n){this.options=e,(t!==void 0||n!==void 0)&&this.setImages(t,n)}setImages(e,t){t&&this.selected?(this.imageObj=t,this.imageObjAlt=e):(this.imageObj=e,this.imageObjAlt=t)}switchImages(e){let t=e&&!this.selected||!e&&this.selected;if(this.selected=e,this.imageObjAlt!==void 0&&t){let e=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=e}}_getImagePadding(){let e={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){let t=this.options.imagePadding;typeof t==`object`?(e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left):(e.top=t,e.right=t,e.bottom=t,e.left=t)}return e}_resizeImage(){let e,t;if(this.options.shapeProperties.useImageSize===!1){let n=1,r=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?n=this.imageObj.width/this.imageObj.height:r=this.imageObj.height/this.imageObj.width),e=this.options.size*2*n,t=this.options.size*2*r}else{let n=this._getImagePadding();e=this.imageObj.width+n.left+n.right,t=this.imageObj.height+n.top+n.bottom}this.width=e,this.height=t,this.radius=.5*this.width}_drawRawCircle(e,t,n,r){this.initContextForDraw(e,r),yk(e,t,n,r.size),this.performFill(e,r)}_drawImageAtPosition(e,t){if(this.imageObj.width!=0){e.globalAlpha=t.opacity===void 0?1:t.opacity,this.enableShadow(e,t);let n=1;this.options.shapeProperties.interpolation===!0&&(n=this.imageObj.width/this.width/this.body.view.scale);let r=this._getImagePadding(),i=this.left+r.left,a=this.top+r.top,o=this.width-r.left-r.right,s=this.height-r.top-r.bottom;this.imageObj.drawImageAtPosition(e,n,i,a,o,s),this.disableShadow(e,t)}}_drawImageLabel(e,t,n,r,i){let a=0;if(this.height!==void 0){a=this.height*.5;let t=this.labelModule.getTextSize(e,r,i);t.lineCount>=1&&(a+=t.height/2)}let o=n+a;this.options.label&&(this.labelOffset=a),this.labelModule.draw(e,t,o,r,i,`hanging`)}},kZ=class extends OZ{constructor(e,t,n){super(e,t,n),this._setMargins(n)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,n)){let r=this.getDimensionsFromLabel(e,t,n),i=Math.max(r.width+this.margin.right+this.margin.left,r.height+this.margin.top+this.margin.bottom);this.options.size=i/2,this.width=i,this.height=i,this.radius=this.width/2}}draw(e,t,n,r,i,a){this.resize(e,r,i),this.left=t-this.width/2,this.top=n-this.height/2,this._drawRawCircle(e,t,n,a),this.updateBoundingBox(t,n),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,n,r,i)}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size}distanceToBorder(e){return e&&this.resize(e),this.width*.5}},AZ=class extends OZ{constructor(e,t,n,r,i){super(e,t,n),this.setImages(r,i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){let e=this.options.size*2;this.width=e,this.height=e,this.radius=.5*this.width;return}this.needsRefresh(t,n)&&this._resizeImage()}draw(e,t,n,r,i,a){this.switchImages(r),this.resize();let o=t,s=n;this.options.shapeProperties.coordinateOrigin===`top-left`?(this.left=t,this.top=n,o+=this.width/2,s+=this.height/2):(this.left=t-this.width/2,this.top=n-this.height/2),this._drawRawCircle(e,o,s,a),e.save(),e.clip(),this._drawImageAtPosition(e,a),e.restore(),this._drawImageLabel(e,o,s,r,i),this.updateBoundingBox(t,n)}updateBoundingBox(e,t){this.options.shapeProperties.coordinateOrigin===`top-left`?(this.boundingBox.top=t,this.boundingBox.left=e,this.boundingBox.right=e+this.options.size*2,this.boundingBox.bottom=t+this.options.size*2):(this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+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)}distanceToBorder(e){return e&&this.resize(e),this.width*.5}},jZ=class extends EZ{resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(t,n)){this.labelModule.getTextSize(e,t,n);let i=2*r.size;this.width=this.customSizeWidth??i,this.height=this.customSizeHeight??i,this.radius=.5*this.width}}_drawShape(e,t,n,r,i,a,o,s){return this.resize(e,a,o,s),this.left=r-this.width/2,this.top=i-this.height/2,this.initContextForDraw(e,s),jk(t)(e,r,i,s.size),this.performFill(e,s),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(e.font=(a?`bold `:``)+this.height/2+`px `+(this.options.icon.face||`FontAwesome`),e.fillStyle=this.options.icon.color||`black`,e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(this.options.icon.code,r,i)),{drawExternalLabel:()=>{if(this.options.label!==void 0){this.labelModule.calculateLabelSize(e,a,o,r,i,`hanging`);let t=i+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(e,r,t,a,o,`hanging`)}this.updateBoundingBox(r,i)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+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))}};function MZ(e,t){var n=tR(e);if(hY){var r=hY(e);t&&(r=FB(r).call(r,function(t){return OY(e,t).enumerable})),n.push.apply(n,r)}return n}function NZ(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?V(n=MZ(Object(i),!0)).call(n,function(t){aY(e,t,i[t])}):VY?eX(e,VY(i)):V(r=MZ(Object(i))).call(r,function(t){iX(e,t,OY(i,t))})}return e}var PZ=class extends jZ{constructor(e,t,n,r){super(e,t,n,r),this.ctxRenderer=r}draw(e,t,n,r,i,a){this.resize(e,r,i,a),this.left=t-this.width/2,this.top=n-this.height/2,e.save();let o=this.ctxRenderer({ctx:e,id:this.options.id,x:t,y:n,state:{selected:r,hover:i},style:NZ({},a),label:this.options.label});if(o.drawNode!=null&&o.drawNode(),e.restore(),o.drawExternalLabel){let t=o.drawExternalLabel;o.drawExternalLabel=()=>{e.save(),t(),e.restore()}}return o.nodeDimensions&&(this.customSizeWidth=o.nodeDimensions.width,this.customSizeHeight=o.nodeDimensions.height),o}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},FZ=class extends EZ{constructor(e,t,n){super(e,t,n),this._setMargins(n)}resize(e,t,n){if(this.needsRefresh(t,n)){let r=this.getDimensionsFromLabel(e,t,n).width+this.margin.right+this.margin.left;this.width=r,this.height=r,this.radius=this.width/2}}draw(e,t,n,r,i,a){this.resize(e,r,i),this.left=t-this.width/2,this.top=n-this.height/2,this.initContextForDraw(e,a),Dk(e,t-this.width/2,n-this.height/2,this.width,this.height),this.performFill(e,a),this.updateBoundingBox(t,n,e,r,i),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,r,i)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},IZ=class extends jZ{draw(e,t,n,r,i,a){return this._drawShape(e,`diamond`,4,t,n,r,i,a)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},LZ=class extends jZ{draw(e,t,n,r,i,a){return this._drawShape(e,`circle`,2,t,n,r,i,a)}distanceToBorder(e){return e&&this.resize(e),this.options.size}},RZ=class extends EZ{resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,n)){let r=this.getDimensionsFromLabel(e,t,n);this.height=r.height*2,this.width=r.width+r.height,this.radius=.5*this.width}}draw(e,t,n,r,i,a){this.resize(e,r,i),this.left=t-this.width*.5,this.top=n-this.height*.5,this.initContextForDraw(e,a),Ek(e,this.left,this.top,this.width,this.height),this.performFill(e,a),this.updateBoundingBox(t,n,e,r,i),this.labelModule.draw(e,t,n,r,i)}distanceToBorder(e,t){e&&this.resize(e);let n=this.width*.5,r=this.height*.5,i=Math.sin(t)*n,a=Math.cos(t)*r;return n*r/Math.sqrt(i*i+a*a)}},zZ=class extends jZ{draw(e,t,n,r,i,a){return this._drawShape(e,`hexagon`,4,t,n,r,i,a)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},BZ=class extends EZ{constructor(e,t,n){super(e,t,n),this._setMargins(n)}resize(e,t,n){this.needsRefresh(t,n)&&(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)}draw(e,t,n,r,i,a){return this.resize(e,r,i),this.options.icon.size=this.options.icon.size||50,this.left=t-this.width/2,this.top=n-this.height/2,this._icon(e,t,n,r,i,a),{drawExternalLabel:()=>{this.options.label!==void 0&&this.labelModule.draw(e,this.left+this.iconSize.width/2+this.margin.left,n+this.height/2+5,r),this.updateBoundingBox(t,n)}}}updateBoundingBox(e,t){this.boundingBox.top=t-this.options.icon.size*.5,this.boundingBox.left=e-this.options.icon.size*.5,this.boundingBox.right=e+this.options.icon.size*.5,this.boundingBox.bottom=t+this.options.icon.size*.5,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+5))}_icon(e,t,n,r,i,a){let o=Number(this.options.icon.size);this.options.icon.code===void 0?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.`):(e.font=[this.options.icon.weight==null?r?`bold`:``:this.options.icon.weight,(this.options.icon.weight!=null&&r?5:0)+o+`px`,this.options.icon.face].join(` `),e.fillStyle=this.options.icon.color||`black`,e.textAlign=`center`,e.textBaseline=`middle`,this.enableShadow(e,a),e.fillText(this.options.icon.code,t,n),this.disableShadow(e,a))}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},VZ=class extends OZ{constructor(e,t,n,r,i){super(e,t,n),this.setImages(r,i)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){let e=this.options.size*2;this.width=e,this.height=e;return}this.needsRefresh(t,n)&&this._resizeImage()}draw(e,t,n,r,i,a){e.save(),this.switchImages(r),this.resize();let o=t,s=n;if(this.options.shapeProperties.coordinateOrigin===`top-left`?(this.left=t,this.top=n,o+=this.width/2,s+=this.height/2):(this.left=t-this.width/2,this.top=n-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){let t=this.options.borderWidth,n=this.options.borderWidthSelected||2*this.options.borderWidth,o=(r?n:t)/this.body.view.scale;e.lineWidth=Math.min(this.width,o),e.beginPath();let s=r?this.options.color.highlight.border:i?this.options.color.hover.border:this.options.color.border,c=r?this.options.color.highlight.background:i?this.options.color.hover.background:this.options.color.background;a.opacity!==void 0&&(s=QG(s,a.opacity),c=QG(c,a.opacity)),e.strokeStyle=s,e.fillStyle=c,e.rect(this.left-.5*e.lineWidth,this.top-.5*e.lineWidth,this.width+e.lineWidth,this.height+e.lineWidth),aU(e).call(e),this.performStroke(e,a),e.closePath()}this._drawImageAtPosition(e,a),this._drawImageLabel(e,o,s,r,i),this.updateBoundingBox(t,n),e.restore()}updateBoundingBox(e,t){this.resize(),this.options.shapeProperties.coordinateOrigin===`top-left`?(this.left=e,this.top=t):(this.left=e-this.width/2,this.top=t-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,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))}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},HZ=class extends jZ{draw(e,t,n,r,i,a){return this._drawShape(e,`square`,2,t,n,r,i,a)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},UZ=class extends jZ{draw(e,t,n,r,i,a){return this._drawShape(e,`star`,4,t,n,r,i,a)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},WZ=class extends EZ{constructor(e,t,n){super(e,t,n),this._setMargins(n)}resize(e,t,n){this.needsRefresh(t,n)&&(this.textSize=this.labelModule.getTextSize(e,t,n),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)}draw(e,t,n,r,i,a){this.resize(e,r,i),this.left=t-this.width/2,this.top=n-this.height/2,this.enableShadow(e,a),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,r,i),this.disableShadow(e,a),this.updateBoundingBox(t,n,e,r,i)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},GZ=class extends jZ{draw(e,t,n,r,i,a){return this._drawShape(e,`triangle`,3,t,n,r,i,a)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}},KZ=class extends jZ{draw(e,t,n,r,i,a){return this._drawShape(e,`triangleDown`,3,t,n,r,i,a)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};function qZ(e,t){var n=tR(e);if(hY){var r=hY(e);t&&(r=FB(r).call(r,function(t){return OY(e,t).enumerable})),n.push.apply(n,r)}return n}function JZ(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?V(n=qZ(Object(i),!0)).call(n,function(t){aY(e,t,i[t])}):VY?eX(e,VY(i)):V(r=qZ(Object(i))).call(r,function(t){iX(e,t,OY(i,t))})}return e}var YZ=class e{constructor(e,t,n,r,i,a){this.options=cK(i),this.globalOptions=i,this.defaultOptions=a,this.body=t,this.edges=[],this.id=void 0,this.imagelist=n,this.grouplist=r,this.x=void 0,this.y=void 0,this.baseSize=this.options.size,this.baseFontSize=this.options.font.size,this.predefinedPosition=!1,this.selected=!1,this.hover=!1,this.labelModule=new dZ(this.body,this.options,!1),this.setOptions(e)}attachEdge(e){var t;H(t=this.edges).call(t,e)===-1&&this.edges.push(e)}detachEdge(e){var t;let n=H(t=this.edges).call(t,e);if(n!=-1){var r;gz(r=this.edges).call(r,n,1)}}setOptions(t){let n=this.options.shape;if(!t)return;if(t.color!==void 0&&(this._localColor=t.color),t.id!==void 0&&(this.id=t.id),this.id===void 0)throw Error(`Node must have an id`);e.checkMass(t,this.id),t.x!==void 0&&(t.x===null?(this.x=void 0,this.predefinedPosition=!1):(this.x=yV(t.x),this.predefinedPosition=!0)),t.y!==void 0&&(t.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=yV(t.y),this.predefinedPosition=!0)),t.size!==void 0&&(this.baseSize=t.size),t.value!==void 0&&(t.value=Hq(t.value)),e.parseOptions(this.options,t,!0,this.globalOptions,this.grouplist);let r=[t,this.options,this.defaultOptions];return this.chooser=vX(`node`,r),this._load_images(),this.updateLabelModule(t),t.opacity!==void 0&&e.checkOpacity(t.opacity)&&(this.options.opacity=t.opacity),this.updateShape(n),t.hidden!==void 0||t.physics!==void 0}_load_images(){if((this.options.shape===`circularImage`||this.options.shape===`image`)&&this.options.image===void 0)throw Error(`Option image must be defined for node type '`+this.options.shape+`'`);if(this.options.image!==void 0){if(this.imagelist===void 0)throw 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 Error(`No unselected image provided`);this.imageObj=this.imagelist.load(this.options.image.unselected,this.options.brokenImage,this.id),this.imageObjAlt=this.options.image.selected===void 0?void 0:this.imagelist.load(this.options.image.selected,this.options.brokenImage,this.id)}}}static checkOpacity(e){return 0<=e&&e<=1}static checkCoordinateOrigin(e){return e===void 0||e===`center`||e===`top-left`}static updateGroupOptions(t,n,r){var i;if(r===void 0)return;let a=t.group;if(n!==void 0&&n.group!==void 0&&a!==n.group)throw Error(`updateGroupOptions: group values in options don't match.`);if(!(typeof a==`number`||typeof a==`string`&&a!=``))return;let o=r.get(a);o.opacity!==void 0&&n.opacity===void 0&&(e.checkOpacity(o.opacity)||(console.error(`Invalid option for node opacity. Value must be between 0 and 1, found: `+o.opacity),o.opacity=void 0));let s=FB(i=TZ(n)).call(i,e=>n[e]!=null);s.push(`font`),KG(s,t,o),t.color=eK(t.color)}static parseOptions(t,n){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=arguments.length>4?arguments[4]:void 0;if(KG([`color`,`fixed`,`shadow`],t,n,r),e.checkMass(n),t.opacity!==void 0&&(e.checkOpacity(t.opacity)||(console.error(`Invalid option for node opacity. Value must be between 0 and 1, found: `+t.opacity),t.opacity=void 0)),n.opacity!==void 0&&(e.checkOpacity(n.opacity)||(console.error(`Invalid option for node opacity. Value must be between 0 and 1, found: `+n.opacity),n.opacity=void 0)),n.shapeProperties&&!e.checkCoordinateOrigin(n.shapeProperties.coordinateOrigin)&&console.error(`Invalid option for node coordinateOrigin, found: `+n.shapeProperties.coordinateOrigin),lK(t,n,`shadow`,i),n.color!==void 0&&n.color!==null){let e=eK(n.color);WG(t.color,e)}else r===!0&&n.color===null&&(t.color=cK(i.color));n.fixed!==void 0&&n.fixed!==null&&(typeof n.fixed==`boolean`?(t.fixed.x=n.fixed,t.fixed.y=n.fixed):(n.fixed.x!==void 0&&typeof n.fixed.x==`boolean`&&(t.fixed.x=n.fixed.x),n.fixed.y!==void 0&&typeof n.fixed.y==`boolean`&&(t.fixed.y=n.fixed.y))),r===!0&&n.font===null&&(t.font=cK(i.font)),e.updateGroupOptions(t,n,a),n.scaling!==void 0&&lK(t.scaling,n.scaling,`label`,i.scaling)}getFormattingValues(){let 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*=2:e.borderWidth=this.options.borderWidthSelected,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){let t=this.options.opacity;e.borderColor=QG(e.borderColor,t),e.color=QG(e.color,t),e.shadowColor=QG(e.shadowColor,t)}return e}updateLabelModule(t){(this.options.label===void 0||this.options.label===null)&&(this.options.label=``),e.updateGroupOptions(this.options,JZ(JZ({},t),{},{color:t&&t.color||this._localColor||void 0}),this.grouplist);let n=this.grouplist.get(this.options.group,!1),r=[t,this.options,n,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,r),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateShape(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 DZ(this.options,this.body,this.labelModule);break;case`circle`:this.shape=new kZ(this.options,this.body,this.labelModule);break;case`circularImage`:this.shape=new AZ(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case`custom`:this.shape=new PZ(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case`database`:this.shape=new FZ(this.options,this.body,this.labelModule);break;case`diamond`:this.shape=new IZ(this.options,this.body,this.labelModule);break;case`dot`:this.shape=new LZ(this.options,this.body,this.labelModule);break;case`ellipse`:this.shape=new RZ(this.options,this.body,this.labelModule);break;case`icon`:this.shape=new BZ(this.options,this.body,this.labelModule);break;case`image`:this.shape=new VZ(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case`square`:this.shape=new HZ(this.options,this.body,this.labelModule);break;case`hexagon`:this.shape=new zZ(this.options,this.body,this.labelModule);break;case`star`:this.shape=new UZ(this.options,this.body,this.labelModule);break;case`text`:this.shape=new WZ(this.options,this.body,this.labelModule);break;case`triangle`:this.shape=new GZ(this.options,this.body,this.labelModule);break;case`triangleDown`:this.shape=new KZ(this.options,this.body,this.labelModule);break;default:this.shape=new RZ(this.options,this.body,this.labelModule)}this.needsRefresh()}select(){this.selected=!0,this.needsRefresh()}unselect(){this.selected=!1,this.needsRefresh()}needsRefresh(){this.shape.refreshNeeded=!0}getTitle(){return this.options.title}distanceToBorder(e,t){return this.shape.distanceToBorder(e,t)}isFixed(){return this.options.fixed.x&&this.options.fixed.y}isSelected(){return this.selected}getValue(){return this.options.value}getLabelSize(){return this.labelModule.size()}setValueRange(e,t,n){if(this.options.value!==void 0){let r=this.options.scaling.customScalingFunction(e,t,n,this.options.value),i=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){let e=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+r*e}this.options.size=this.options.scaling.min+r*i}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}draw(e){let t=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,t)||{}}updateBoundingBox(e){this.shape.updateBoundingBox(this.x,this.y,e)}resize(e){let t=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,t)}getItemsOnPoint(e){let t=[];return this.labelModule.visible()&&yX(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),yX(this.shape.boundingBox,e)&&t.push({nodeId:this.id}),t}isOverlappingWith(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}isBoundingBoxOverlappingWith(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}static checkMass(e,t){if(e.mass!==void 0&&e.mass<=0){let n=``;t!==void 0&&(n=` in node id: `+t),console.error(`%cNegative or zero mass disallowed`+n+`, setting mass to 1.`,TK),e.mass=1}}},XZ=class extends YZ{constructor(e,t,n,r,i,a){super(e,t,n,r,i,a),this.isCluster=!0,this.containedNodes={},this.containedEdges={}}_openChildCluster(e){let t=this.body.nodes[e];if(this.containedNodes[e]===void 0)throw Error(`node with id: `+e+` not in current cluster`);if(!t.isCluster)throw Error(`node with id: `+e+` is not a cluster`);delete this.containedNodes[e],W(t.edges,e=>{delete this.containedEdges[e.id]}),W(t.containedNodes,(e,t)=>{this.containedNodes[t]=e}),t.containedNodes={},W(t.containedEdges,(e,t)=>{this.containedEdges[t]=e}),t.containedEdges={},W(t.edges,e=>{W(this.edges,t=>{var n,r;let i=H(n=t.clusteringEdgeReplacingIds).call(n,e.id);i!==-1&&(W(e.clusteringEdgeReplacingIds,e=>{t.clusteringEdgeReplacingIds.push(e),this.body.edges[e].edgeReplacedById=t.id}),gz(r=t.clusteringEdgeReplacingIds).call(r,i,1))})}),t.edges=[]}},ZZ=class{constructor(e){this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},JO(this.options,this.defaultOptions),this.body.emitter.on(`_resetData`,()=>{this.clusteredNodes={},this.clusteredEdges={}})}clusterByHubsize(e,t){e===void 0?e=this._getHubSize():typeof e==`object`&&(t=this._checkOptions(e),e=this._getHubSize());let n=[];for(let t=0;t<this.body.nodeIndices.length;t++){let r=this.body.nodes[this.body.nodeIndices[t]];r.edges.length>=e&&n.push(r.id)}for(let e=0;e<n.length;e++)this.clusterByConnection(n[e],t,!0);this.body.emitter.emit(`_dataChanged`)}cluster(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.joinCondition===void 0)throw Error(`Cannot call clusterByNodeData without a joinCondition function in the options.`);e=this._checkOptions(e);let n={},r={};W(this.body.nodes,(t,i)=>{t.options&&e.joinCondition(t.options)===!0&&(n[i]=t,W(t.edges,e=>{this.clusteredEdges[e.id]===void 0&&(r[e.id]=e)}))}),this._cluster(n,r,e,t)}clusterByEdgeCount(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);let r=[],i={},a,o,s;for(let n=0;n<this.body.nodeIndices.length;n++){let c={},l={},u=this.body.nodeIndices[n],d=this.body.nodes[u];if(i[u]===void 0){s=0,o=[];for(let e=0;e<d.edges.length;e++)a=d.edges[e],this.clusteredEdges[a.id]===void 0&&(a.toId!==a.fromId&&s++,o.push(a));if(s===e){let e=function(e){if(t.joinCondition===void 0||t.joinCondition===null)return!0;let n=Eq.cloneOptions(e);return t.joinCondition(n)},n=!0;for(let t=0;t<o.length;t++){a=o[t];let r=this._getConnectedId(a,u);if(e(d))l[a.id]=a,c[u]=d,c[r]=this.body.nodes[r],i[u]=!0;else{n=!1;break}}if(tR(c).length>0&&tR(l).length>0&&n===!0){let e=function(){for(let e=0;e<r.length;++e)for(let t in c)if(r[e].nodes[t]!==void 0)return r[e]}();if(e!==void 0){for(let t in c)e.nodes[t]===void 0&&(e.nodes[t]=c[t]);for(let t in l)e.edges[t]===void 0&&(e.edges[t]=l[t])}else r.push({nodes:c,edges:l})}}}}for(let e=0;e<r.length;e++)this._cluster(r[e].nodes,r[e].edges,t,!1);n===!0&&this.body.emitter.emit(`_dataChanged`)}clusterOutliers(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,t)}clusterBridges(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,t)}clusterByConnection(e,t){var n;let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw Error(`No nodeId supplied to clusterByConnection!`);if(this.body.nodes[e]===void 0)throw Error(`The nodeId given to clusterByConnection does not exist!`);let i=this.body.nodes[e];t=this._checkOptions(t,i),t.clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=i.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=i.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=i.options.fixed.x,t.clusterNodeProperties.fixed.y=i.options.fixed.y);let a={},o={},s=i.id,c=Eq.cloneOptions(i);a[s]=i;for(let e=0;e<i.edges.length;e++){let n=i.edges[e];if(this.clusteredEdges[n.id]===void 0){let e=this._getConnectedId(n,s);if(this.clusteredNodes[e]===void 0){if(e!==s){if(t.joinCondition===void 0)o[n.id]=n,a[e]=this.body.nodes[e];else{let r=Eq.cloneOptions(this.body.nodes[e]);t.joinCondition(c,r)===!0&&(o[n.id]=n,a[e]=this.body.nodes[e])}}else o[n.id]=n}}}let l=HL(n=tR(a)).call(n,function(e){return a[e].id});for(let e in a){if(!Object.prototype.hasOwnProperty.call(a,e))continue;let t=a[e];for(let e=0;e<t.edges.length;e++){let n=t.edges[e];H(l).call(l,this._getConnectedId(n,t.id))>-1&&(o[n.id]=n)}}this._cluster(a,o,t,r)}_createClusterEdges(e,t,n,r){let i,a,o,s,c,l,u=tR(e),d=[];for(let r=0;r<u.length;r++){a=u[r],o=e[a];for(let r=0;r<o.edges.length;r++)i=o.edges[r],this.clusteredEdges[i.id]===void 0&&(i.toId==i.fromId?t[i.id]=i:i.toId==a?(s=n.id,c=i.fromId,l=c):(s=i.toId,c=n.id,l=s),e[l]===void 0&&d.push({edge:i,fromId:c,toId:s}))}let f=[],p=function(e){for(let t=0;t<f.length;t++){let n=f[t],r=e.fromId===n.fromId&&e.toId===n.toId,i=e.fromId===n.toId&&e.toId===n.fromId;if(r||i)return n}return null};for(let e=0;e<d.length;e++){let t=d[e],n=t.edge,i=p(t);i===null?(i=this._createClusteredEdge(t.fromId,t.toId,n,r),f.push(i)):i.clusteringEdgeReplacingIds.push(n.id),this.body.edges[n.id].edgeReplacedById=i.id,this._backupEdgeOptions(n),n.setOptions({physics:!1})}}_checkOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}_cluster(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=[];for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.clusteredNodes[t]!==void 0&&i.push(t);for(let t=0;t<i.length;++t)delete e[i[t]];if(tR(e).length==0||tR(e).length==1&&n.clusterNodeProperties.allowSingleNodeCluster!=1)return;let a=U({},n.clusterNodeProperties);if(n.processProperties!==void 0){let r=[];for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=Eq.cloneOptions(e[t]);r.push(n)}let i=[];for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&e.substr(0,12)!==`clusterEdge:`){let n=Eq.cloneOptions(t[e],`edge`);i.push(n)}if(a=n.processProperties(a,r,i),!a)throw Error(`The processProperties function does not return properties!`)}a.id===void 0&&(a.id=`cluster:`+wq());let o=a.id;a.label===void 0&&(a.label=`cluster`);let s;a.x===void 0&&(s=this._getClusterPosition(e),a.x=s.x),a.y===void 0&&(s===void 0&&(s=this._getClusterPosition(e)),a.y=s.y),a.id=o;let c=this.body.functions.createNode(a,XZ);c.containedNodes=e,c.containedEdges=t,c.clusterEdgeProperties=n.clusterEdgeProperties,this.body.nodes[a.id]=c,this._clusterEdges(e,t,a,n.clusterEdgeProperties),a.id=void 0,r===!0&&this.body.emitter.emit(`_dataChanged`)}_backupEdgeOptions(e){this.clusteredEdges[e.id]===void 0&&(this.clusteredEdges[e.id]={physics:e.options.physics})}_restoreEdge(e){let t=this.clusteredEdges[e.id];t!==void 0&&(e.setOptions({physics:t.physics}),delete this.clusteredEdges[e.id])}isCluster(e){return this.body.nodes[e]===void 0?(console.error(`Node does not exist.`),!1):this.body.nodes[e].isCluster===!0}_getClusterPosition(e){let t=tR(e),n=e[t[0]].x,r=e[t[0]].x,i=e[t[0]].y,a=e[t[0]].y,o;for(let s=1;s<t.length;s++)o=e[t[s]],n=o.x<n?o.x:n,r=o.x>r?o.x:r,i=o.y<i?o.y:i,a=o.y>a?o.y:a;return{x:.5*(n+r),y:.5*(i+a)}}openCluster(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw Error(`No clusterNodeId supplied to openCluster.`);let r=this.body.nodes[e];if(r===void 0)throw Error(`The clusterNodeId supplied to openCluster does not exist.`);if(r.isCluster!==!0||r.containedNodes===void 0||r.containedEdges===void 0)throw Error(`The node:`+e+` is not a valid cluster.`);let i=this.findNode(e),a=H(i).call(i,e)-1;if(a>=0){let t=i[a];this.body.nodes[t]._openChildCluster(e),delete this.body.nodes[e],n===!0&&this.body.emitter.emit(`_dataChanged`);return}let o=r.containedNodes,s=r.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction==`function`){let e={},n={x:r.x,y:r.y};for(let t in o)if(Object.prototype.hasOwnProperty.call(o,t)){let n=this.body.nodes[t];e[t]={x:n.x,y:n.y}}let i=t.releaseFunction(n,e);for(let e in o)if(Object.prototype.hasOwnProperty.call(o,e)){let t=this.body.nodes[e];i[e]!==void 0&&(t.x=i[e].x===void 0?r.x:i[e].x,t.y=i[e].y===void 0?r.y:i[e].y)}}else W(o,function(e){e.options.fixed.x===!1&&(e.x=r.x),e.options.fixed.y===!1&&(e.y=r.y)});for(let e in o)if(Object.prototype.hasOwnProperty.call(o,e)){let t=this.body.nodes[e];t.vx=r.vx,t.vy=r.vy,t.setOptions({physics:!0}),delete this.clusteredNodes[e]}let c=[];for(let e=0;e<r.edges.length;e++)c.push(r.edges[e]);for(let t=0;t<c.length;t++){let n=c[t],r=this._getConnectedId(n,e),i=this.clusteredNodes[r];for(let e=0;e<n.clusteringEdgeReplacingIds.length;e++){let t=n.clusteringEdgeReplacingIds[e],a=this.body.edges[t];if(a!==void 0){if(i!==void 0){let e=this.body.nodes[i.clusterId];e.containedEdges[a.id]=a,delete s[a.id];let t=a.fromId,n=a.toId;a.toId==r?n=i.clusterId:t=i.clusterId,this._createClusteredEdge(t,n,a,e.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(a)}}n.remove()}for(let e in s)Object.prototype.hasOwnProperty.call(s,e)&&this._restoreEdge(s[e]);delete this.body.nodes[e],n===!0&&this.body.emitter.emit(`_dataChanged`)}getNodesInCluster(e){let t=[];if(this.isCluster(e)===!0){let n=this.body.nodes[e].containedNodes;for(let e in n)Object.prototype.hasOwnProperty.call(n,e)&&t.push(this.body.nodes[e].id)}return t}findNode(e){let t=[],n=0,r;for(;this.clusteredNodes[e]!==void 0&&n<100;){if(r=this.body.nodes[e],r===void 0)return[];t.push(r.id),e=this.clusteredNodes[e].clusterId,n++}return r=this.body.nodes[e],r===void 0?[]:(t.push(r.id),ZR(t).call(t),t)}updateClusteredNode(e,t){if(e===void 0)throw Error(`No clusteredNodeId supplied to updateClusteredNode.`);if(t===void 0)throw Error(`No newOptions supplied to updateClusteredNode.`);if(this.body.nodes[e]===void 0)throw Error(`The clusteredNodeId supplied to updateClusteredNode does not exist.`);this.body.nodes[e].setOptions(t),this.body.emitter.emit(`_dataChanged`)}updateEdge(e,t){if(e===void 0)throw Error(`No startEdgeId supplied to updateEdge.`);if(t===void 0)throw Error(`No newOptions supplied to updateEdge.`);if(this.body.edges[e]===void 0)throw Error(`The startEdgeId supplied to updateEdge does not exist.`);let n=this.getClusteredEdges(e);for(let e=0;e<n.length;e++)this.body.edges[n[e]].setOptions(t);this.body.emitter.emit(`_dataChanged`)}getClusteredEdges(e){let t=[],n=0;for(;e!==void 0&&this.body.edges[e]!==void 0&&n<100;)t.push(this.body.edges[e].id),e=this.body.edges[e].edgeReplacedById,n++;return ZR(t).call(t),t}getBaseEdge(e){return this.getBaseEdges(e)[0]}getBaseEdges(e){let t=[e],n=[],r=[],i=0;for(;t.length>0&&i<100;){let e=t.pop();if(e===void 0)continue;let a=this.body.edges[e];if(a===void 0)continue;i++;let o=a.clusteringEdgeReplacingIds;if(o===void 0)r.push(e);else for(let e=0;e<o.length;++e){let r=o[e];H(t).call(t,o)===-1&&H(n).call(n,o)===-1&&t.push(r)}n.push(e)}return r}_getConnectedId(e,t){return e.toId==t?(e.fromId,e.fromId):e.toId}_getHubSize(){let e=0,t=0,n=0,r=0;for(let i=0;i<this.body.nodeIndices.length;i++){let a=this.body.nodes[this.body.nodeIndices[i]];a.edges.length>r&&(r=a.edges.length),e+=a.edges.length,t+=a.edges.length**2,n+=1}e/=n,t/=n;let i=t-e**2,a=Math.floor(e+2*Math.sqrt(i));return a>r&&(a=r),a}_createClusteredEdge(e,t,n,r,i){let a=Eq.cloneOptions(n,`edge`);U(a,r),a.from=e,a.to=t,a.id=`clusterEdge:`+wq(),i!==void 0&&U(a,i);let o=this.body.functions.createEdge(a);return o.clusteringEdgeReplacingIds=[n.id],o.connect(),this.body.edges[o.id]=o,o}_clusterEdges(e,t,n,r){if(t instanceof fZ){let e=t,n={};n[e.id]=e,t=n}if(e instanceof YZ){let t=e,n={};n[t.id]=t,e=n}if(n==null)throw Error(`_clusterEdges: parameter clusterNode required`);r===void 0&&(r=n.clusterEdgeProperties),this._createClusterEdges(e,t,n,r);for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&this.body.edges[e]!==void 0){let t=this.body.edges[e];this._backupEdgeOptions(t),t.setOptions({physics:!1})}for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.clusteredNodes[t]={clusterId:n.id,node:this.body.nodes[t]},this.body.nodes[t].setOptions({physics:!1}))}_getClusterNodeForNode(e){if(e===void 0)return;let t=this.clusteredNodes[e];if(t===void 0)return;let n=t.clusterId;if(n!==void 0)return this.body.nodes[n]}_filter(e,t){let n=[];return W(e,e=>{t(e)&&n.push(e)}),n}_updateState(){let e,t=[],n={},r=e=>{W(this.body.nodes,t=>{t.isCluster===!0&&e(t)})};for(e in this.clusteredNodes)Object.prototype.hasOwnProperty.call(this.clusteredNodes,e)&&this.body.nodes[e]===void 0&&t.push(e);r(function(e){for(let n=0;n<t.length;n++)delete e.containedNodes[t[n]]});for(let e=0;e<t.length;e++)delete this.clusteredNodes[t[e]];W(this.clusteredEdges,e=>{let t=this.body.edges[e];(t===void 0||!t.endPointsValid())&&(n[e]=e)}),r(function(e){W(e.containedEdges,(e,t)=>{!e.endPointsValid()&&!n[t]&&(n[t]=t)})}),W(this.body.edges,(e,t)=>{let r=!0,i=e.clusteringEdgeReplacingIds;if(i!==void 0){let e=0;W(i,t=>{let n=this.body.edges[t];n!==void 0&&n.endPointsValid()&&(e+=1)}),r=e>0}(!e.endPointsValid()||!r)&&(n[t]=t)}),r(e=>{W(n,t=>{delete e.containedEdges[t],W(e.edges,(r,i)=>{if(r.id===t){e.edges[i]=null;return}r.clusteringEdgeReplacingIds=this._filter(r.clusteringEdgeReplacingIds,function(e){return!n[e]})}),e.edges=this._filter(e.edges,function(e){return e!==null})})}),W(n,e=>{delete this.clusteredEdges[e]}),W(n,e=>{delete this.body.edges[e]}),W(tR(this.body.edges),e=>{let t=this.body.edges[e],n=this._isClusteredNode(t.fromId)||this._isClusteredNode(t.toId);if(n!==this._isClusteredEdge(t.id)){if(n){let e=this._getClusterNodeForNode(t.fromId);e!==void 0&&this._clusterEdges(this.body.nodes[t.fromId],t,e);let n=this._getClusterNodeForNode(t.toId);n!==void 0&&this._clusterEdges(this.body.nodes[t.toId],t,n)}else delete this._clusterEdges[e],this._restoreEdge(t)}});let i=!1,a=!0;for(;a;){let e=[];r(function(t){let n=tR(t.containedNodes).length,r=t.options.allowSingleNodeCluster===!0;(r&&n<1||!r&&n<2)&&e.push(t.id)});for(let t=0;t<e.length;++t)this.openCluster(e[t],{},!1);a=e.length>0,i||=a}i&&this._updateState()}_isClusteredNode(e){return this.clusteredNodes[e]!==void 0}_isClusteredEdge(e){return this.clusteredEdges[e]!==void 0}},QZ=class{constructor(e,t,n){var r;this.body=e,this.images=t,this.groups=n,this.body.functions.createEdge=B(r=this.create).call(r,this),this.edgesListeners={add:(e,t)=>{this.add(t.items)},update:(e,t)=>{this.update(t.items)},remove:(e,t)=>{this.remove(t.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(e,t,n,r){if(t===e)return .5;{let n=1/(t-e);return Math.max(0,(r-e)*n)}}},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},U(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e=this,t,n;this.body.emitter.on(`_forceDisableDynamicCurves`,function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;t===`dynamic`&&(t=`continuous`);let r=!1;for(let n in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,n)){let i=e.body.edges[n],a=e.body.data.edges.get(n);if(a!=null){let e=a.smooth;e!==void 0&&e.enabled===!0&&e.type===`dynamic`&&(t===void 0?i.setOptions({smooth:!1}):i.setOptions({smooth:{type:t}}),r=!0)}}n===!0&&r===!0&&e.body.emitter.emit(`_dataChanged`)}),this.body.emitter.on(`_dataUpdated`,()=>{this.reconnectEdges()}),this.body.emitter.on(`refreshEdges`,B(t=this.refresh).call(t,this)),this.body.emitter.on(`refresh`,B(n=this.refresh).call(n,this)),this.body.emitter.on(`destroy`,()=>{W(this.edgesListeners,(e,t)=>{this.body.data.edges&&this.body.data.edges.off(t,e)}),delete this.body.functions.createEdge,delete this.edgesListeners.add,delete this.edgesListeners.update,delete this.edgesListeners.remove,delete this.edgesListeners})}setOptions(e){if(e!==void 0){fZ.parseOptions(this.options,e,!0,this.defaultOptions,!0);let t=!1;if(e.smooth!==void 0)for(let e in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,e)&&(t=this.body.edges[e].updateEdgeType()||t);if(e.font!==void 0)for(let e in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,e)&&this.body.edges[e].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||t===!0)&&this.body.emitter.emit(`_dataChanged`)}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.body.data.edges;if(_T(`id`,e))this.body.data.edges=e;else if(EL(e))this.body.data.edges=new hT,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new hT;else throw TypeError(`Array or DataSet expected`);if(n&&W(this.edgesListeners,(e,t)=>{n.off(t,e)}),this.body.edges={},this.body.data.edges){W(this.edgesListeners,(e,t)=>{this.body.data.edges.on(t,e)});let e=this.body.data.edges.getIds();this.add(e,!0)}this.body.emitter.emit(`_adjustEdgesForHierarchicalLayout`),t===!1&&this.body.emitter.emit(`_dataChanged`)}add(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.body.edges,r=this.body.data.edges;for(let t=0;t<e.length;t++){let i=e[t],a=n[i];a&&a.disconnect();let o=r.get(i,{showInternalIds:!0});n[i]=this.create(o)}this.body.emitter.emit(`_adjustEdgesForHierarchicalLayout`),t===!1&&this.body.emitter.emit(`_dataChanged`)}update(e){let t=this.body.edges,n=this.body.data.edges,r=!1;for(let i=0;i<e.length;i++){let a=e[i],o=n.get(a),s=t[a];s===void 0?(this.body.edges[a]=this.create(o),r=!0):(s.disconnect(),r=s.setOptions(o)||r,s.connect())}r===!0?(this.body.emitter.emit(`_adjustEdgesForHierarchicalLayout`),this.body.emitter.emit(`_dataChanged`)):this.body.emitter.emit(`_dataUpdated`)}remove(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length===0)return;let n=this.body.edges;W(e,e=>{let t=n[e];t!==void 0&&t.remove()}),t&&this.body.emitter.emit(`_dataChanged`)}refresh(){W(this.body.edges,(e,t)=>{let n=this.body.data.edges.get(t);n!==void 0&&e.setOptions(n)})}create(e){return new fZ(e,this.body,this.images,this.options,this.defaultOptions)}reconnectEdges(){let e,t=this.body.nodes,n=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in n)if(Object.prototype.hasOwnProperty.call(n,e)){let t=n[e];t.from=null,t.to=null,t.connect()}}getConnectedNodes(e){let t=[];if(this.body.edges[e]!==void 0){let n=this.body.edges[e];n.fromId!==void 0&&t.push(n.fromId),n.toId!==void 0&&t.push(n.toId)}return t}_updateState(){this._addMissingEdges(),this._removeInvalidEdges()}_removeInvalidEdges(){let e=[];W(this.body.edges,(t,n)=>{let r=this.body.nodes[t.toId],i=this.body.nodes[t.fromId];r!==void 0&&r.isCluster===!0||i!==void 0&&i.isCluster===!0||(r===void 0||i===void 0)&&e.push(n)}),this.remove(e,!1)}_addMissingEdges(){let e=this.body.data.edges;if(e==null)return;let t=this.body.edges,n=[];V(e).call(e,(e,r)=>{t[r]===void 0&&n.push(r)}),this.add(n,!0)}},$Z={},eQ={},tQ={exports:{}},nQ,rQ;function iQ(){return rQ?nQ:(rQ=1,nQ=I()(function(){if(typeof ArrayBuffer==`function`){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),nQ)}var aQ,oQ;function sQ(){if(oQ)return aQ;oQ=1;var e=I(),t=hE(),n=FT(),r=iQ(),i=Object.isExtensible;return aQ=e(function(){})||r?function(e){return!t(e)||r&&n(e)===`ArrayBuffer`?!1:!i||i(e)}:i,aQ}var cQ,lQ;function uQ(){return lQ?cQ:(lQ=1,cQ=!I()(function(){return Object.isExtensible(Object.preventExtensions({}))}),cQ)}var dQ;function fQ(){if(dQ)return tQ.exports;dQ=1;var e=z(),t=L(),n=xO(),r=hE(),i=mD(),a=YD().f,o=rj(),s=oj(),c=sQ(),l=_D(),u=uQ(),d=!1,f=l(`meta`),p=0,m=function(e){a(e,f,{value:{objectID:`O`+p++,weakData:{}}})},h=tQ.exports={enable:function(){h.enable=function(){},d=!0;var n=o.f,r=t([].splice),i={};i[f]=1,n(i).length&&(o.f=function(e){for(var t=n(e),i=0,a=t.length;i<a;i++)if(t[i]===f){r(t,i,1);break}return t},e({target:`Object`,stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(e,t){if(!r(e))return typeof e==`symbol`?e:(typeof e==`string`?`S`:`P`)+e;if(!i(e,f)){if(!c(e))return`F`;if(!t)return`E`;m(e)}return e[f].objectID},getWeakData:function(e,t){if(!i(e,f)){if(!c(e))return!0;if(!t)return!1;m(e)}return e[f].weakData},onFreeze:function(e){return u&&d&&c(e)&&!i(e,f)&&m(e),e}};return n[f]=!0,tQ.exports}var pQ,mQ;function hQ(){if(mQ)return pQ;mQ=1;var e=BD(),t=JT(),n=qD(),r=VE(),i=PI(),a=hO(),o=CE(),s=LI(),c=_F(),l=OI(),u=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return pQ=function(p,m,h){var g=h&&h.that,_=!!(h&&h.AS_ENTRIES),v=!!(h&&h.IS_RECORD),y=!!(h&&h.IS_ITERATOR),b=!!(h&&h.INTERRUPTED),x=e(m,g),S,C,w,T,E,D,ee,te=function(e){var t=S;return S=void 0,t&&l(t,`normal`),new d(!0,e)},O=function(e){return _?(n(e),b?x(e[0],e[1],te):x(e[0],e[1])):b?x(e,te):x(e)};if(v)S=p.iterator;else if(y)S=p;else{if(C=c(p),!C)throw new u(r(p)+` is not iterable`);if(i(C)){for(w=0,T=a(p);T>w;w++)if(E=O(p[w]),E&&o(f,E))return E;return new d(!1)}S=s(p,C)}for(D=v?p.next:S.next;!(ee=t(D,S)).done;){var k=ee.value;try{E=O(k)}catch(e){if(S)l(S,`throw`,e);else throw e}if(typeof E==`object`&&E&&o(f,E))return E}return new d(!1)},pQ}var gQ,_Q;function vQ(){if(_Q)return gQ;_Q=1;var e=CE(),t=TypeError;return gQ=function(n,r){if(e(r,n))return n;throw new t(`Incorrect invocation`)},gQ}var yQ,bQ;function xQ(){if(bQ)return yQ;bQ=1;var e=z(),t=ST(),n=fQ(),r=JT(),i=I(),a=QD(),o=hQ(),s=vQ(),c=VT(),l=hE(),u=oE(),d=Dj(),f=YD().f,p=Ij().forEach,m=GT(),h=Nj(),g=h.set,_=h.getterFor;return yQ=function(h,v,y){var b=h.indexOf(`Map`)!==-1,x=h.indexOf(`Weak`)!==-1,S=b?`set`:`add`,C=t[h],w=C&&C.prototype,T={},E;if(!m||!c(C)||!(x||w.forEach&&!i(function(){new C().entries().next()})))E=y.getConstructor(v,h,b,S),n.enable();else{E=v(function(e,t){g(s(e,D),{type:h,collection:new C}),u(t)||o(t,e[S],{that:e,AS_ENTRIES:b})});var D=E.prototype,ee=_(h);p([`add`,`clear`,`delete`,`forEach`,`get`,`has`,`set`,`keys`,`values`,`entries`],function(e){var t=e===`add`||e===`set`;e in w&&!(x&&e===`clear`)&&a(D,e,function(n,i){var a=this,o=ee(a).collection;if(!t&&x&&!l(n))return e===`get`&&void 0;var s=o[e](e===`forEach`?function(e,t){r(n,i,e,t,a)}:n===0?0:n,i);return t?a:s})}),x||f(D,`size`,{configurable:!0,get:function(){return ee(this).collection.size}})}return d(E,h,!1,!0),T[h]=E,e({global:!0,forced:!0},T),x||y.setStrong(E,h,b),E},yQ}var SQ,CQ;function wQ(){if(CQ)return SQ;CQ=1;var e=lj();return SQ=function(t,n,r){for(var i in n)r&&r.unsafe&&t[i]?t[i]=n[i]:e(t,i,n[i],r);return t},SQ}var TQ,EQ;function DQ(){if(EQ)return TQ;EQ=1;var e=bE(),t=fj(),n=bD(),r=GT(),i=n(`species`);return TQ=function(n){var a=e(n);r&&a&&!a[i]&&t(a,i,{configurable:!0,get:function(){return this}})},TQ}var OQ,kQ;function AQ(){if(kQ)return OQ;kQ=1;var e=ej(),t=fj(),n=wQ(),r=BD(),i=vQ(),a=oE(),o=hQ(),s=WN(),c=qN(),l=DQ(),u=GT(),d=fQ().fastKey,f=Nj(),p=f.set,m=f.getterFor;return OQ={getConstructor:function(s,c,l,f){var h=s(function(t,n){i(t,g),p(t,{type:c,index:e(null),first:null,last:null,size:0}),u||(t.size=0),a(n)||o(n,t[f],{that:t,AS_ENTRIES:l})}),g=h.prototype,_=m(c),v=function(e,t,n){var r=_(e),i=y(e,t),a,o;return i?i.value=n:(r.last=i={index:o=d(t,!0),key:t,value:n,previous:a=r.last,next:null,removed:!1},r.first||=i,a&&(a.next=i),u?r.size++:e.size++,o!==`F`&&(r.index[o]=i)),e},y=function(e,t){var n=_(e),r=d(t),i;if(r!==`F`)return n.index[r];for(i=n.first;i;i=i.next)if(i.key===t)return i};return n(g,{clear:function(){for(var t=this,n=_(t),r=n.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=null),r=r.next;n.first=n.last=null,n.index=e(null),u?n.size=0:t.size=0},delete:function(e){var t=this,n=_(t),r=y(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first===r&&(n.first=i),n.last===r&&(n.last=a),u?n.size--:t.size--}return!!r},forEach:function(e){for(var t=_(this),n=r(e,arguments.length>1?arguments[1]:void 0),i;i=i?i.next:t.first;)for(n(i.value,i.key,this);i&&i.removed;)i=i.previous},has:function(e){return!!y(this,e)}}),n(g,l?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return v(this,e===0?0:e,t)}}:{add:function(e){return v(this,e=e===0?0:e,e)}}),u&&t(g,`size`,{configurable:!0,get:function(){return _(this).size}}),h},setStrong:function(e,t,n){var r=t+` Iterator`,i=m(t),a=m(r);s(e,t,function(e,t){p(this,{type:r,target:e,state:i(e),kind:t,last:null})},function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return!e.target||!(e.last=n=n?n.next:e.state.first)?(e.target=null,c(void 0,!0)):c(t===`keys`?n.key:t===`values`?n.value:[n.key,n.value],!1)},n?`entries`:`values`,!n,!0),l(t)}},OQ}var jQ;function MQ(){return jQ?eQ:(jQ=1,xQ()(`Map`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},AQ()),eQ)}var NQ;function PQ(){return NQ?$Z:(NQ=1,MQ(),$Z)}var FQ={},IQ,LQ;function RQ(){return LQ?IQ:(LQ=1,IQ=function(e,t){return t===1?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},IQ)}var zQ,BQ;function VQ(){if(BQ)return zQ;BQ=1;var e=bE(),t=RQ(),n=e(`Map`);return zQ={Map:n,set:t(`set`,2),get:t(`get`,1),has:t(`has`,1),remove:t(`delete`,1),proto:n.prototype},zQ}var HQ;function UQ(){if(HQ)return FQ;HQ=1;var e=z(),t=L(),n=WE(),r=lE(),i=hQ(),a=VQ(),o=eD(),s=I(),c=a.Map,l=a.has,u=a.get,d=a.set,f=t([].push),p=o||s(function(){return c.groupBy(`ab`,function(e){return e}).get(`a`).length!==1});return e({target:`Map`,stat:!0,forced:o||p},{groupBy:function(e,t){r(e),n(t);var a=new c,o=0;return i(e,function(e){var n=t(e,o++);l(a,n)?f(u(a,n),e):d(a,n,[e])}),a}}),FQ}var WQ={},GQ;function KQ(){if(GQ)return WQ;GQ=1;var e=z(),t=VQ(),n=eD(),r=t.get,i=t.has,a=t.set;return e({target:`Map`,proto:!0,real:!0,forced:n},{getOrInsert:function(e,t){return i(this,e)?r(this,e):(a(this,e,t),t)}}),WQ}var qQ={},JQ;function YQ(){if(JQ)return qQ;JQ=1;var e=z(),t=WE(),n=VQ(),r=eD(),i=n.get,a=n.has,o=n.set;return e({target:`Map`,proto:!0,real:!0,forced:r},{getOrInsertComputed:function(e,n){var r=a(this,e);if(t(n),r)return i(this,e);e===0&&1/e==-1/0&&(e=0);var s=n(e);return o(this,e,s),s}}),qQ}var XQ,ZQ;function QQ(){return ZQ?XQ:(ZQ=1,XN(),PQ(),UQ(),KQ(),YQ(),mF(),XQ=R().Map,XQ)}var $Q,e$;function t$(){if(e$)return $Q;e$=1;var e=QQ();return tP(),$Q=e,$Q}var n$,r$;function i$(){return r$?n$:(r$=1,n$=t$(),n$)}var a$=F(i$()),o$=class{constructor(){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},JO(this.options,this.defaultOptions)}setOptions(e){let t=[`useDefaultGroups`];if(e!==void 0){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&H(t).call(t,n)===-1){let t=e[n];this.add(n,t)}}}clear(){this._groups=new a$,this._groupNames=[]}get(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this._groups.get(e);if(n===void 0&&t){if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){let t=this._groupIndex%this._groupNames.length;++this._groupIndex,n={},n.color=this._groups.get(this._groupNames[t]),this._groups.set(e,n)}else{let t=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,n={},n.color=this._defaultGroups[t],this._groups.set(e,n)}}return n}add(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}};function s$(e){var t=e&&e.preventDefault||!1,n=e&&e.container||window,r={},i={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(e){l(e,`keydown`)},c=function(e){l(e,`keyup`)},l=function(e,n){if(i[n][e.keyCode]!==void 0){for(var r=i[n][e.keyCode],a=0;a<r.length;a++)(r[a].shift===void 0||r[a].shift==1&&e.shiftKey==1||r[a].shift==0&&e.shiftKey==0)&&r[a].fn(e);t==1&&e.preventDefault()}};return r.bind=function(e,t,n){if(n===void 0&&(n=`keydown`),a[e]===void 0)throw Error(`unsupported key: `+e);i[n][a[e].code]===void 0&&(i[n][a[e].code]=[]),i[n][a[e].code].push({fn:t,shift:a[e].shift})},r.bindAll=function(e,t){for(var n in t===void 0&&(t=`keydown`),a)a.hasOwnProperty(n)&&r.bind(n,e,t)},r.getKey=function(e){for(var t in a)if(a.hasOwnProperty(t)&&(e.shiftKey==1&&a[t].shift==1&&e.keyCode==a[t].code||e.shiftKey==0&&a[t].shift==0&&e.keyCode==a[t].code||e.keyCode==a[t].code&&t==`shift`))return t;return`unknown key, currently not supported`},r.unbind=function(e,t,n){if(n===void 0&&(n=`keydown`),a[e]===void 0)throw Error(`unsupported key: `+e);if(t!==void 0){var r=[],o=i[n][a[e].code];if(o!==void 0)for(var s=0;s<o.length;s++)(o[s].fn!=t||o[s].shift!=a[e].shift)&&r.push(i[n][a[e].code][s]);i[n][a[e].code]=r}else i[n][a[e].code]=[]},r.reset=function(){i={keydown:{},keyup:{}}},r.destroy=function(){i={keydown:{},keyup:{}},n.removeEventListener(`keydown`,s,!0),n.removeEventListener(`keyup`,c,!0)},n.addEventListener(`keydown`,s,!0),n.addEventListener(`keyup`,c,!0),r}var c$=class{constructor(e,t){this.body=e,this.canvas=t,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on(`activate`,()=>{this.activated=!0,this.configureKeyboardBindings()}),this.body.emitter.on(`deactivate`,()=>{this.activated=!1,this.configureKeyboardBindings()}),this.body.emitter.on(`destroy`,()=>{this.keycharm!==void 0&&this.keycharm.destroy()}),this.options={}}setOptions(e){e!==void 0&&(this.options=e,this.create())}create(){this.options.navigationButtons===!0?this.iconsCreated===!1&&this.loadNavigationElements():this.iconsCreated===!0&&this.cleanNavigation(),this.configureKeyboardBindings()}cleanNavigation(){if(this.navigationHammers.length!=0){for(let 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}loadNavigationElements(){this.cleanNavigation(),this.navigationDOM={};let e=[`up`,`down`,`left`,`right`,`zoomIn`,`zoomOut`,`zoomExtends`],t=[`_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(let i=0;i<e.length;i++){this.navigationDOM[e[i]]=document.createElement(`div`),this.navigationDOM[e[i]].className=`vis-button vis-`+e[i],this.navigationDOM.wrapper.appendChild(this.navigationDOM[e[i]]);let a=new CK(this.navigationDOM[e[i]]);if(t[i]===`_fit`){var n;gq(a,B(n=this._fit).call(n,this))}else{var r;gq(a,B(r=this.bindToRedraw).call(r,this,t[i]))}this.navigationHammers.push(a)}let i=new CK(this.canvas.frame);_q(i,()=>{this._stopMovement()}),this.navigationHammers.push(i),this.iconsCreated=!0}bindToRedraw(e){if(this.boundFunctions[e]===void 0){var t;this.boundFunctions[e]=B(t=this[e]).call(t,this),this.body.emitter.on(`initRedraw`,this.boundFunctions[e]),this.body.emitter.emit(`_startRendering`)}}unbindFromRedraw(e){this.boundFunctions[e]!==void 0&&(this.body.emitter.off(`initRedraw`,this.boundFunctions[e]),this.body.emitter.emit(`_stopRendering`),delete this.boundFunctions[e])}_fit(){new Date().valueOf()-this.touchTime>700&&(this.body.emitter.emit(`fit`,{duration:700}),this.touchTime=new Date().valueOf())}_stopMovement(){for(let 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={}}_moveUp(){this.body.view.translation.y+=this.options.keyboard.speed.y}_moveDown(){this.body.view.translation.y-=this.options.keyboard.speed.y}_moveLeft(){this.body.view.translation.x+=this.options.keyboard.speed.x}_moveRight(){this.body.view.translation.x-=this.options.keyboard.speed.x}_zoomIn(){let e=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,r=t/e,i=(1-r)*this.canvas.canvasViewCenter.x+n.x*r,a=(1-r)*this.canvas.canvasViewCenter.y+n.y*r;this.body.view.scale=t,this.body.view.translation={x:i,y:a},this.body.emitter.emit(`zoom`,{direction:`+`,scale:this.body.view.scale,pointer:null})}_zoomOut(){let e=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,r=t/e,i=(1-r)*this.canvas.canvasViewCenter.x+n.x*r,a=(1-r)*this.canvas.canvasViewCenter.y+n.y*r;this.body.view.scale=t,this.body.view.translation={x:i,y:a},this.body.emitter.emit(`zoom`,{direction:`-`,scale:this.body.view.scale,pointer:null})}configureKeyboardBindings(){if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.keycharm=this.options.keyboard.bindToWindow===!0?s$({container:window,preventDefault:!0}):s$({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C;B(e=this.keycharm).call(e,`up`,()=>{this.bindToRedraw(`_moveUp`)},`keydown`),B(t=this.keycharm).call(t,`down`,()=>{this.bindToRedraw(`_moveDown`)},`keydown`),B(n=this.keycharm).call(n,`left`,()=>{this.bindToRedraw(`_moveLeft`)},`keydown`),B(r=this.keycharm).call(r,`right`,()=>{this.bindToRedraw(`_moveRight`)},`keydown`),B(i=this.keycharm).call(i,`=`,()=>{this.bindToRedraw(`_zoomIn`)},`keydown`),B(a=this.keycharm).call(a,`num+`,()=>{this.bindToRedraw(`_zoomIn`)},`keydown`),B(o=this.keycharm).call(o,`num-`,()=>{this.bindToRedraw(`_zoomOut`)},`keydown`),B(s=this.keycharm).call(s,`-`,()=>{this.bindToRedraw(`_zoomOut`)},`keydown`),B(c=this.keycharm).call(c,`[`,()=>{this.bindToRedraw(`_zoomOut`)},`keydown`),B(l=this.keycharm).call(l,`]`,()=>{this.bindToRedraw(`_zoomIn`)},`keydown`),B(u=this.keycharm).call(u,`pageup`,()=>{this.bindToRedraw(`_zoomIn`)},`keydown`),B(d=this.keycharm).call(d,`pagedown`,()=>{this.bindToRedraw(`_zoomOut`)},`keydown`),B(f=this.keycharm).call(f,`up`,()=>{this.unbindFromRedraw(`_moveUp`)},`keyup`),B(p=this.keycharm).call(p,`down`,()=>{this.unbindFromRedraw(`_moveDown`)},`keyup`),B(m=this.keycharm).call(m,`left`,()=>{this.unbindFromRedraw(`_moveLeft`)},`keyup`),B(h=this.keycharm).call(h,`right`,()=>{this.unbindFromRedraw(`_moveRight`)},`keyup`),B(g=this.keycharm).call(g,`=`,()=>{this.unbindFromRedraw(`_zoomIn`)},`keyup`),B(_=this.keycharm).call(_,`num+`,()=>{this.unbindFromRedraw(`_zoomIn`)},`keyup`),B(v=this.keycharm).call(v,`num-`,()=>{this.unbindFromRedraw(`_zoomOut`)},`keyup`),B(y=this.keycharm).call(y,`-`,()=>{this.unbindFromRedraw(`_zoomOut`)},`keyup`),B(b=this.keycharm).call(b,`[`,()=>{this.unbindFromRedraw(`_zoomOut`)},`keyup`),B(x=this.keycharm).call(x,`]`,()=>{this.unbindFromRedraw(`_zoomIn`)},`keyup`),B(S=this.keycharm).call(S,`pageup`,()=>{this.unbindFromRedraw(`_zoomIn`)},`keyup`),B(C=this.keycharm).call(C,`pagedown`,()=>{this.unbindFromRedraw(`_zoomOut`)},`keyup`)}}},l$=class{constructor(e,t,n){var r,i,a,o,s,c,l,u,d,f,p,m,h;this.body=e,this.canvas=t,this.selectionHandler=n,this.navigationHandler=new c$(e,t),this.body.eventListeners.onTap=B(r=this.onTap).call(r,this),this.body.eventListeners.onTouch=B(i=this.onTouch).call(i,this),this.body.eventListeners.onDoubleTap=B(a=this.onDoubleTap).call(a,this),this.body.eventListeners.onHold=B(o=this.onHold).call(o,this),this.body.eventListeners.onDragStart=B(s=this.onDragStart).call(s,this),this.body.eventListeners.onDrag=B(c=this.onDrag).call(c,this),this.body.eventListeners.onDragEnd=B(l=this.onDragEnd).call(l,this),this.body.eventListeners.onMouseWheel=B(u=this.onMouseWheel).call(u,this),this.body.eventListeners.onPinch=B(d=this.onPinch).call(d,this),this.body.eventListeners.onMouseMove=B(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=B(p=this.onRelease).call(p,this),this.body.eventListeners.onContext=B(m=this.onContext).call(m,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=B(h=this.getPointer).call(h,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},JO(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on(`destroy`,()=>{clearTimeout(this.popupTimer),delete this.body.functions.getPointer})}setOptions(e){e!==void 0&&(KG([`hideEdgesOnDrag`,`hideEdgesOnZoom`,`hideNodesOnDrag`,`keyboard`,`multiselect`,`selectable`,`selectConnectedEdges`],this.options,e),lK(this.options,e,`keyboard`),e.tooltip&&(JO(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=eK(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}getPointer(e){return{x:e.x-YG(this.canvas.frame.canvas),y:e.y-XG(this.canvas.frame.canvas)}}onTouch(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())}onTap(e){let t=this.getPointer(e.center),n=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,n),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent(`click`,e,t)}onDoubleTap(e){let t=this.getPointer(e.center);this.selectionHandler.generateClickEvent(`doubleClick`,e,t)}onHold(e){let t=this.getPointer(e.center),n=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,n),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent(`click`,e,t),this.selectionHandler.generateClickEvent(`hold`,e,t)}onRelease(e){if(new Date().valueOf()-this.touchTime>10){let t=this.getPointer(e.center);this.selectionHandler.generateClickEvent(`release`,e,t),this.touchTime=new Date().valueOf()}}onContext(e){let t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent(`oncontext`,e,t)}checkSelectionChanges(e){(arguments.length>1&&arguments[1]!==void 0&&arguments[1])===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}_determineDifference(e,t){let n=function(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r];H(t).call(t,i)===-1&&n.push(i)}return n};return{nodes:n(e.nodes,t.nodes),edges:n(e.edges,t.edges)}}onDragStart(e){if(this.drag.dragging)return;this.drag.pointer===void 0&&this.onTouch(e);let t=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=JO({},this.body.view.translation),this.drag.nodeId=void 0,e.srcEvent.shiftKey){this.body.selectionBox.show=!0;let t=this.getPointer(e.center);this.body.selectionBox.position.start={x:this.canvas._XconvertDOMtoCanvas(t.x),y:this.canvas._YconvertDOMtoCanvas(t.y)},this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(t.x),y:this.canvas._YconvertDOMtoCanvas(t.y)}}else if(t!==void 0&&this.options.dragNodes===!0){this.drag.nodeId=t.id,t.isSelected()===!1&&this.selectionHandler.setSelection({nodes:[t.id]}),this.selectionHandler.generateClickEvent(`dragStart`,e,this.drag.pointer);for(let e of this.selectionHandler.getSelectedNodes()){let t={id:e.id,node:e,x:e.x,y:e.y,xFixed:e.options.fixed.x,yFixed:e.options.fixed.y};e.options.fixed.x=!0,e.options.fixed.y=!0,this.drag.selection.push(t)}}else this.selectionHandler.generateClickEvent(`dragStart`,e,this.drag.pointer,void 0,!0)}onDrag(e){if(this.drag.pinched===!0)return;this.body.emitter.emit(`unlockNode`);let t=this.getPointer(e.center),n=this.drag.selection;if(n&&n.length&&this.options.dragNodes===!0){this.selectionHandler.generateClickEvent(`dragging`,e,t);let r=t.x-this.drag.pointer.x,i=t.y-this.drag.pointer.y;V(n).call(n,e=>{let t=e.node;e.xFixed===!1&&(t.x=this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(e.x)+r)),e.yFixed===!1&&(t.y=this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(e.y)+i))}),this.body.emitter.emit(`startSimulation`)}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent(`dragging`,e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(t.x),y:this.canvas._YconvertDOMtoCanvas(t.y)},this.body.emitter.emit(`_requestRedraw`)}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent(`dragging`,e,t,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}let n=t.x-this.drag.pointer.x,r=t.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+n,y:this.drag.translation.y+r},this.body.emitter.emit(`_requestRedraw`)}}}onDragEnd(e){if(this.drag.dragging=!1,this.body.selectionBox.show){var t;this.body.selectionBox.show=!1;let n=this.body.selectionBox.position,r={minX:Math.min(n.start.x,n.end.x),minY:Math.min(n.start.y,n.end.y),maxX:Math.max(n.start.x,n.end.x),maxY:Math.max(n.start.y,n.end.y)},i=FB(t=this.body.nodeIndices).call(t,e=>{let t=this.body.nodes[e];return t.x>=r.minX&&t.x<=r.maxX&&t.y>=r.minY&&t.y<=r.maxY});V(i).call(i,e=>this.selectionHandler.selectObject(this.body.nodes[e]));let a=this.getPointer(e.center);this.selectionHandler.commitAndEmit(a,e),this.selectionHandler.generateClickEvent(`dragEnd`,e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit(`_requestRedraw`)}else{let t=this.drag.selection;t&&t.length?(V(t).call(t,function(e){e.node.options.fixed.x=e.xFixed,e.node.options.fixed.y=e.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`))}}onPinch(e){let t=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);let n=this.pinch.scale*e.scale;this.zoom(n,t)}zoom(e,t){if(this.options.zoomView===!0){let n=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);let r;this.drag!==void 0&&this.drag.dragging===!0&&(r=this.canvas.DOMtoCanvas(this.drag.pointer));let i=this.body.view.translation,a=e/n,o=(1-a)*t.x+i.x*a,s=(1-a)*t.y+i.y*a;if(this.body.view.scale=e,this.body.view.translation={x:o,y:s},r!=null){let e=this.canvas.canvasToDOM(r);this.drag.pointer.x=e.x,this.drag.pointer.y=e.y}this.body.emitter.emit(`_requestRedraw`),n<e?this.body.emitter.emit(`zoom`,{direction:`+`,scale:this.body.view.scale,pointer:t}):this.body.emitter.emit(`zoom`,{direction:`-`,scale:this.body.view.scale,pointer:t})}}onMouseWheel(e){if(this.options.zoomView===!0){if(e.deltaY!==0){let t=this.body.view.scale;t*=1+(e.deltaY<0?1:-1)*(this.options.zoomSpeed*.1);let n=this.getPointer({x:e.clientX,y:e.clientY});this.zoom(t,n)}e.preventDefault()}}onMouseMove(e){let t=this.getPointer({x:e.clientX,y:e.clientY}),n=!1;this.popup!==void 0&&(this.popup.hidden===!1&&this._checkHidePopup(t),this.popup.hidden===!1&&(n=!0,this.popup.setPosition(t.x+3,t.y-5),this.popup.show())),this.options.keyboard.autoFocus&&this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),n===!1&&(this.popupTimer!==void 0&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=BH(()=>this._checkShowPopup(t),this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,t)}_checkShowPopup(e){let t=this.canvas._XconvertDOMtoCanvas(e.x),n=this.canvas._YconvertDOMtoCanvas(e.y),r={left:t,top:n,right:t,bottom:n},i=this.popupObj===void 0?void 0:this.popupObj.id,a=!1,o=`node`;if(this.popupObj===void 0){let e=this.body.nodeIndices,t=this.body.nodes,n,i=[];for(let o=0;o<e.length;o++)n=t[e[o]],n.isOverlappingWith(r)===!0&&(a=!0,n.getTitle()!==void 0&&i.push(e[o]));i.length>0&&(this.popupObj=t[i[i.length-1]],a=!0)}if(this.popupObj===void 0&&a===!1){let e=this.body.edgeIndices,t=this.body.edges,n,i=[];for(let a=0;a<e.length;a++)n=t[e[a]],n.isOverlappingWith(r)===!0&&n.connected===!0&&n.getTitle()!==void 0&&i.push(e[a]);i.length>0&&(this.popupObj=t[i[i.length-1]],o=`edge`)}this.popupObj===void 0?this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit(`hidePopup`)):this.popupObj.id!==i&&(this.popup===void 0&&(this.popup=new wK(this.canvas.frame)),this.popup.popupTargetType=o,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))}_checkHidePopup(e){let t=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(t),n===!0)){let t=this.selectionHandler.getNodeAt(e);n=t!==void 0&&t.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(t));n===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit(`hidePopup`))}},u$=class{getDistances(e,t,n){let r={},i=e.edges;for(let e=0;e<t.length;e++){let n=t[e],i={};r[n]=i;for(let n=0;n<t.length;n++)i[t[n]]=e==n?0:1e9}for(let e=0;e<n.length;e++){let t=i[n[e]];t.connected===!0&&r[t.fromId]!==void 0&&r[t.toId]!==void 0&&(r[t.fromId][t.toId]=1,r[t.toId][t.fromId]=1)}let a=t.length;for(let e=0;e<a;e++){let n=t[e],i=r[n];for(let e=0;e<a-1;e++){let o=t[e],s=r[o];for(let c=e+1;c<a;c++){let e=t[c],a=r[e],l=Math.min(s[e],s[n]+i[e]);s[e]=l,a[o]=l}}}return r}},d$=class{constructor(e,t,n){this.body=e,this.springLength=t,this.springConstant=n,this.distanceSolver=new u$}setOptions(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}solve(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(r),this._createK_matrix(r),this._createE_matrix();let i=0,a=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),o=1e9,s=0,c=0,l=0,u=0,d=0;for(;o>.01&&i<a;){i+=1;var f=dL(this._getHighestEnergyNode(n),4);for(s=f[0],o=f[1],c=f[2],l=f[3],u=o,d=0;u>1&&d<5;){d+=1,this._moveNode(s,c,l);var p=dL(this._getEnergy(s),3);u=p[0],c=p[1],l=p[2]}}}_getHighestEnergyNode(e){let t=this.body.nodeIndices,n=this.body.nodes,r=0,i=t[0],a=0,o=0;for(let s=0;s<t.length;s++){let c=t[s];if(n[c].predefinedPosition!==!0||n[c].isCluster===!0&&e===!0||n[c].options.fixed.x!==!0||n[c].options.fixed.y!==!0){let e=dL(this._getEnergy(c),3),t=e[0],n=e[1],s=e[2];r<t&&(r=t,i=c,a=n,o=s)}}return[i,r,a,o]}_getEnergy(e){let t=dL(this.E_sums[e],2),n=t[0],r=t[1];return[Math.sqrt(n**2+r**2),n,r]}_moveNode(e,t,n){let r=this.body.nodeIndices,i=this.body.nodes,a=0,o=0,s=0,c=i[e].x,l=i[e].y,u=this.K_matrix[e],d=this.L_matrix[e];for(let t=0;t<r.length;t++){let n=r[t];if(n!==e){let e=i[n].x,t=i[n].y,r=u[n],f=d[n],p=1/((c-e)**2+(l-t)**2)**1.5;a+=r*(1-f*(l-t)**2*p),o+=r*(f*(c-e)*(l-t)*p),s+=r*(1-f*(c-e)**2*p)}}let f=a,p=o,m=t,h=s,g=n,_=(m/f+g/p)/(p/f-h/p),v=-(p*_+m)/f;i[e].x+=v,i[e].y+=_,this._updateE_matrix(e)}_createL_matrix(e){let t=this.body.nodeIndices,n=this.springLength;this.L_matrix=[];for(let r=0;r<t.length;r++){this.L_matrix[t[r]]={};for(let i=0;i<t.length;i++)this.L_matrix[t[r]][t[i]]=n*e[t[r]][t[i]]}}_createK_matrix(e){let t=this.body.nodeIndices,n=this.springConstant;this.K_matrix=[];for(let r=0;r<t.length;r++){this.K_matrix[t[r]]={};for(let i=0;i<t.length;i++)this.K_matrix[t[r]][t[i]]=n*e[t[r]][t[i]]**-2}}_createE_matrix(){let e=this.body.nodeIndices,t=this.body.nodes;this.E_matrix={},this.E_sums={};for(let t=0;t<e.length;t++)this.E_matrix[e[t]]=[];for(let n=0;n<e.length;n++){let r=e[n],i=t[r].x,a=t[r].y,o=0,s=0;for(let c=n;c<e.length;c++){let l=e[c];if(l!==r){let e=t[l].x,u=t[l].y,d=1/Math.sqrt((i-e)**2+(a-u)**2);this.E_matrix[r][c]=[this.K_matrix[r][l]*(i-e-this.L_matrix[r][l]*(i-e)*d),this.K_matrix[r][l]*(a-u-this.L_matrix[r][l]*(a-u)*d)],this.E_matrix[l][n]=this.E_matrix[r][c],o+=this.E_matrix[r][c][0],s+=this.E_matrix[r][c][1]}}this.E_sums[r]=[o,s]}}_updateE_matrix(e){let t=this.body.nodeIndices,n=this.body.nodes,r=this.E_matrix[e],i=this.K_matrix[e],a=this.L_matrix[e],o=n[e].x,s=n[e].y,c=0,l=0;for(let u=0;u<t.length;u++){let d=t[u];if(d!==e){let e=r[u],t=e[0],f=e[1],p=n[d].x,m=n[d].y,h=1/Math.sqrt((o-p)**2+(s-m)**2),g=i[d]*(o-p-a[d]*(o-p)*h),_=i[d]*(s-m-a[d]*(s-m)*h);r[u]=[g,_],c+=g,l+=_;let v=this.E_sums[d];v[0]+=g-t,v[1]+=_-f}}this.E_sums[e]=[c,l]}},f$={},p$={},m$;function h$(){return m$?p$:(m$=1,xQ()(`Set`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},AQ()),p$)}var g$;function _$(){return g$?f$:(g$=1,h$(),f$)}var v$={},y$,b$;function x$(){if(b$)return y$;b$=1;var e=VE(),t=TypeError;return y$=function(n){if(typeof n==`object`&&`size`in n&&`has`in n&&`add`in n&&`delete`in n&&`keys`in n)return n;throw new t(e(n)+` is not a set`)},y$}var S$,C$;function w$(){if(C$)return S$;C$=1;var e=bE(),t=RQ(),n=e(`Set`),r=n.prototype;return S$={Set:n,add:t(`add`,1),has:t(`has`,1),remove:t(`delete`,1),proto:r},S$}var T$,E$;function D$(){if(E$)return T$;E$=1;var e=JT();return T$=function(t,n,r){for(var i=r?t:t.iterator,a=t.next,o,s;!(o=e(a,i)).done;)if(s=n(o.value),s!==void 0)return s},T$}var O$,k$;function A$(){if(k$)return O$;k$=1;var e=D$();return O$=function(t,n,r){return r?e(t.keys(),n,!0):t.forEach(n)},O$}var j$,M$;function N$(){if(M$)return j$;M$=1;var e=w$(),t=A$(),n=e.Set,r=e.add;return j$=function(e){var i=new n;return t(e,function(e){r(i,e)}),i},j$}var P$,F$;function I$(){return F$?P$:(F$=1,P$=function(e){return e.size},P$)}var L$,R$;function z$(){return R$?L$:(R$=1,L$=function(e){return{iterator:e,next:e.next,done:!1}},L$)}var B$,V$;function H$(){if(V$)return B$;V$=1;var e=WE(),t=qD(),n=JT(),r=oO(),i=z$(),a=`Invalid size`,o=RangeError,s=TypeError,c=Math.max,l=function(t,n){this.set=t,this.size=c(n,0),this.has=e(t.has),this.keys=e(t.keys)};return l.prototype={getIterator:function(){return i(t(n(this.keys,this.set)))},includes:function(e){return n(this.has,this.set,e)}},B$=function(e){t(e);var n=+e.size;if(n!==n)throw new s(a);var i=r(n);if(i<0)throw new o(a);return new l(e,i)},B$}var U$,W$;function G$(){if(W$)return U$;W$=1;var e=x$(),t=w$(),n=N$(),r=I$(),i=H$(),a=A$(),o=D$(),s=t.has,c=t.remove;return U$=function(t){var l=e(this),u=i(t),d=n(l);return r(d)<=u.size?a(d,function(e){u.includes(e)&&c(d,e)}):o(u.getIterator(),function(e){s(d,e)&&c(d,e)}),d},U$}var K$,q$;function J$(){return q$?K$:(q$=1,K$=function(){return!1},K$)}var Y$;function X$(){if(Y$)return v$;Y$=1;var e=z(),t=G$(),n=I();return e({target:`Set`,proto:!0,real:!0,forced:!J$()(`difference`,function(e){return e.size===0})||n(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var n=e++>1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return t.difference(e).size!==3})},{difference:t}),v$}var Z$={},Q$,$$;function e1(){if($$)return Q$;$$=1;var e=x$(),t=w$(),n=I$(),r=H$(),i=A$(),a=D$(),o=t.Set,s=t.add,c=t.has;return Q$=function(t){var l=e(this),u=r(t),d=new o;return n(l)>u.size?a(u.getIterator(),function(e){c(l,e)&&s(d,e)}):i(l,function(e){u.includes(e)&&s(d,e)}),d},Q$}var t1;function n1(){if(t1)return Z$;t1=1;var e=z(),t=I(),n=e1();return e({target:`Set`,proto:!0,real:!0,forced:!J$()(`intersection`,function(e){return e.size===2&&e.has(1)&&e.has(2)})||t(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!==`3,2`})},{intersection:n}),Z$}var r1={},i1,a1;function o1(){if(a1)return i1;a1=1;var e=x$(),t=w$().has,n=I$(),r=H$(),i=A$(),a=D$(),o=OI();return i1=function(s){var c=e(this),l=r(s);if(n(c)<=l.size)return i(c,function(e){if(l.includes(e))return!1},!0)!==!1;var u=l.getIterator();return a(u,function(e){if(t(c,e))return o(u.iterator,`normal`,!1)})!==!1},i1}var s1;function c1(){if(s1)return r1;s1=1;var e=z(),t=o1();return e({target:`Set`,proto:!0,real:!0,forced:!J$()(`isDisjointFrom`,function(e){return!e})},{isDisjointFrom:t}),r1}var l1={},u1,d1;function f1(){if(d1)return u1;d1=1;var e=x$(),t=I$(),n=A$(),r=H$();return u1=function(i){var a=e(this),o=r(i);return t(a)>o.size?!1:n(a,function(e){if(!o.includes(e))return!1},!0)!==!1},u1}var p1;function m1(){if(p1)return l1;p1=1;var e=z(),t=f1();return e({target:`Set`,proto:!0,real:!0,forced:!J$()(`isSubsetOf`,function(e){return e})},{isSubsetOf:t}),l1}var h1={},g1,_1;function v1(){if(_1)return g1;_1=1;var e=x$(),t=w$().has,n=I$(),r=H$(),i=D$(),a=OI();return g1=function(o){var s=e(this),c=r(o);if(n(s)<c.size)return!1;var l=c.getIterator();return i(l,function(e){if(!t(s,e))return a(l.iterator,`normal`,!1)})!==!1},g1}var y1;function b1(){if(y1)return h1;y1=1;var e=z(),t=v1();return e({target:`Set`,proto:!0,real:!0,forced:!J$()(`isSupersetOf`,function(e){return!e})},{isSupersetOf:t}),h1}var x1={},S1,C1;function w1(){if(C1)return S1;C1=1;var e=x$(),t=w$(),n=N$(),r=H$(),i=D$(),a=t.add,o=t.has,s=t.remove;return S1=function(t){var c=e(this),l=r(t).getIterator(),u=n(c);return i(l,function(e){o(c,e)?s(u,e):a(u,e)}),u},S1}var T1,E1;function D1(){return E1?T1:(E1=1,T1=function(e){try{var t=new Set,n=t[e]({size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}});return n.size===1&&n.values().next().value===4}catch{return!1}},T1)}var O1;function k1(){if(O1)return x1;O1=1;var e=z(),t=w1(),n=D1();return e({target:`Set`,proto:!0,real:!0,forced:!J$()(`symmetricDifference`)||!n(`symmetricDifference`)},{symmetricDifference:t}),x1}var A1={},j1,M1;function N1(){if(M1)return j1;M1=1;var e=x$(),t=w$().add,n=N$(),r=H$(),i=D$();return j1=function(a){var o=e(this),s=r(a).getIterator(),c=n(o);return i(s,function(e){t(c,e)}),c},j1}var P1;function F1(){if(P1)return A1;P1=1;var e=z(),t=N1(),n=D1();return e({target:`Set`,proto:!0,real:!0,forced:!J$()(`union`)||!n(`union`)},{union:t}),A1}var I1,L1;function R1(){return L1?I1:(L1=1,XN(),_$(),X$(),n1(),c1(),m1(),b1(),k1(),F1(),mF(),I1=R().Set,I1)}var z1,B1;function V1(){if(B1)return z1;B1=1;var e=R1();return tP(),z1=e,z1}var H1,U1;function W1(){return U1?H1:(U1=1,H1=V1(),H1)}var G1=F(W1()),K1={},q1,J1;function Y1(){if(J1)return q1;J1=1;var e=QO(),t=Math.floor,n=function(r,i){var a=r.length;if(a<8)for(var o=1,s,c;o<a;){for(c=o,s=r[o];c&&i(r[c-1],s)>0;)r[c]=r[--c];c!==o++&&(r[c]=s)}else for(var l=t(a/2),u=n(e(r,0,l),i),d=n(e(r,l),i),f=u.length,p=d.length,m=0,h=0;m<f||h<p;)r[m+h]=m<f&&h<p?i(u[m],d[h])<=0?u[m++]:d[h++]:m<f?u[m++]:d[h++];return r};return q1=n,q1}var X1,Z1;function Q1(){if(Z1)return X1;Z1=1;var e=EE().match(/firefox\/(\d+)/i);return X1=!!e&&+e[1],X1}var $1,e0;function t0(){if(e0)return $1;e0=1;var e=EE();return $1=/MSIE|Trident/.test(e),$1}var n0,r0;function i0(){if(r0)return n0;r0=1;var e=EE().match(/AppleWebKit\/(\d+)\./);return n0=!!e&&+e[1],n0}var a0;function o0(){if(a0)return K1;a0=1;var e=z(),t=L(),n=WE(),r=dD(),i=hO(),a=tz(),o=HA(),s=I(),c=Y1(),l=vR(),u=Q1(),d=t0(),f=kE(),p=i0(),m=[],h=t(m.sort),g=t(m.push),_=s(function(){m.sort(void 0)}),v=s(function(){m.sort(null)}),y=l(`sort`),b=!s(function(){if(f)return f<70;if(!(u&&u>3)){if(d)return!0;if(p)return p<603;var e=``,t,n,r,i;for(t=65;t<76;t++){switch(n=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(i=0;i<47;i++)m.push({k:n+i,v:r})}for(m.sort(function(e,t){return t.v-e.v}),i=0;i<m.length;i++)n=m[i].k.charAt(0),e.charAt(e.length-1)!==n&&(e+=n);return e!==`DGBEFHACIJK`}}),x=_||!v||!y||!b,S=function(e){return function(t,n){if(n===void 0)return-1;if(t===void 0)return 1;if(e!==void 0)return+e(t,n)||0;var r=o(t),i=o(n);return r===i?0:r>i?1:-1}};return e({target:`Array`,proto:!0,forced:x},{sort:function(e){e!==void 0&&n(e);var t=r(this);if(b)return e===void 0?h(t):h(t,e);var o=[],s=i(t),l,u;for(u=0;u<s;u++)u in t&&g(o,t[u]);for(c(o,S(e)),l=i(o),u=0;u<l;)t[u]=o[u++];for(;u<s;)a(t,u++);return t}}),K1}var s0,c0;function l0(){return c0?s0:(c0=1,o0(),s0=ok()(`Array`,`sort`),s0)}var u0,d0;function f0(){if(d0)return u0;d0=1;var e=CE(),t=l0(),n=Array.prototype;return u0=function(r){var i=r.sort;return r===n||e(n,r)&&i===n.sort?t:i},u0}var p0,m0;function h0(){return m0?p0:(m0=1,p0=f0(),p0)}var g0,_0;function v0(){return _0?g0:(_0=1,g0=h0(),g0)}var y0=F(v0()),b0={},x0,S0;function C0(){if(S0)return x0;S0=1;var e=WE(),t=dD(),n=rE(),r=hO(),i=TypeError,a=`Reduce of empty array with no initial value`,o=function(o){return function(s,c,l,u){var d=t(s),f=n(d),p=r(d);if(e(c),p===0&&l<2)throw new i(a);var m=o?p-1:0,h=o?-1:1;if(l<2)for(;;){if(m in f){u=f[m],m+=h;break}if(m+=h,o?m<0:p<=m)throw new i(a)}for(;o?m>=0:p>m;m+=h)m in f&&(u=c(u,f[m],m,d));return u}};return x0={left:o(!1),right:o(!0)},x0}var w0,T0;function E0(){return T0?w0:(T0=1,w0=bH()===`NODE`,w0)}var D0;function O0(){if(D0)return b0;D0=1;var e=z(),t=C0().left,n=vR(),r=kE();return e({target:`Array`,proto:!0,forced:!E0()&&r>79&&r<83||!n(`reduce`)},{reduce:function(e){var n=arguments.length;return t(this,e,n,n>1?arguments[1]:void 0)}}),b0}var k0,A0;function j0(){return A0?k0:(A0=1,O0(),k0=ok()(`Array`,`reduce`),k0)}var M0,N0;function P0(){if(N0)return M0;N0=1;var e=CE(),t=j0(),n=Array.prototype;return M0=function(r){var i=r.reduce;return r===n||e(n,r)&&i===n.reduce?t:i},M0}var F0,I0;function L0(){return I0?F0:(I0=1,F0=P0(),F0)}var R0,z0;function B0(){return z0?R0:(z0=1,R0=L0(),R0)}var V0=F(B0()),H0=class{abstract(){throw Error(`Can't instantiate abstract class!`)}fake_use(){}curveType(){return this.abstract()}getPosition(e){return this.fake_use(e),this.abstract()}setPosition(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,n),this.abstract()}getTreeSize(e){return this.fake_use(e),this.abstract()}sort(e){this.fake_use(e),this.abstract()}fix(e,t){this.fake_use(e,t),this.abstract()}shift(e,t){this.fake_use(e,t),this.abstract()}},U0=class extends H0{constructor(e){super(),this.layout=e}curveType(){return`horizontal`}getPosition(e){return e.x}setPosition(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;n!==void 0&&this.layout.hierarchical.addToOrdering(e,n),e.x=t}getTreeSize(e){let t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_x,max:t.max_x}}sort(e){y0(e).call(e,function(e,t){return e.x-t.x})}fix(e,t){e.y=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.y=!0}shift(e,t){this.layout.body.nodes[e].x+=t}},W0=class extends H0{constructor(e){super(),this.layout=e}curveType(){return`vertical`}getPosition(e){return e.y}setPosition(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;n!==void 0&&this.layout.hierarchical.addToOrdering(e,n),e.y=t}getTreeSize(e){let t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_y,max:t.max_y}}sort(e){y0(e).call(e,function(e,t){return e.y-t.y})}fix(e,t){e.x=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.x=!0}shift(e,t){this.layout.body.nodes[e].y+=t}},G0={},K0;function q0(){if(K0)return G0;K0=1;var e=z(),t=Ij().every;return e({target:`Array`,proto:!0,forced:!vR()(`every`)},{every:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),G0}var J0,Y0;function X0(){return Y0?J0:(Y0=1,q0(),J0=ok()(`Array`,`every`),J0)}var Z0,Q0;function $0(){if(Q0)return Z0;Q0=1;var e=CE(),t=X0(),n=Array.prototype;return Z0=function(r){var i=r.every;return r===n||e(n,r)&&i===n.every?t:i},Z0}var e2,t2;function n2(){return t2?e2:(t2=1,e2=$0(),e2)}var r2,i2;function a2(){return i2?r2:(i2=1,r2=n2(),r2)}var o2=F(a2());function s2(e,t){let n=new G1;return V(e).call(e,e=>{var t;V(t=e.edges).call(t,e=>{e.connected&&n.add(e)})}),V(n).call(n,e=>{let n=e.from.id,r=e.to.id;t[n]??(t[n]=0),(t[r]==null||t[n]>=t[r])&&(t[r]=t[n]+1)}),t}function c2(e){return u2(t=>{var n,r;return o2(n=FB(r=t.edges).call(r,t=>e.has(t.toId))).call(n,e=>e.to===t)},(e,t)=>t>e,`from`,e)}function l2(e){return u2(t=>{var n,r;return o2(n=FB(r=t.edges).call(r,t=>e.has(t.toId))).call(n,e=>e.from===t)},(e,t)=>t<e,`to`,e)}function u2(e,t,n,r){var i;let a=qV(null),o=V0(i=[...aZ(r).call(r)]).call(i,(e,t)=>e+1+t.edges.length,0),s=n+`Id`,c=n===`to`?1:-1;for(let i of r){var l=dL(i,2);let f=l[0],p=l[1];if(!r.has(f)||!e(p))continue;a[f]=0;let m=[p],h=0,g;for(;g=m.pop();){var u,d;if(!r.has(f))continue;let e=a[g.id]+c;if(V(u=FB(d=g.edges).call(d,e=>e.connected&&e.to!==e.from&&e[n]!==g&&r.has(e.toId)&&r.has(e.fromId))).call(u,r=>{let i=r[s],o=a[i];(o==null||t(e,o))&&(a[i]=e,m.push(r[n]))}),h>o)return s2(r,a);++h}}return a}var d2=class{constructor(){this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}addRelation(e,t){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(t),this.parentReference[t]===void 0&&(this.parentReference[t]=[]),this.parentReference[t].push(e)}checkIfTree(){for(let e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}numTrees(){return this.treeIndex+1}setTreeIndex(e,t){t!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}ensureLevel(e){this.levels[e]===void 0&&(this.levels[e]=0)}getMaxLevel(e){let t={},n=e=>{if(t[e]!==void 0)return t[e];let r=this.levels[e];if(this.childrenReference[e]){let t=this.childrenReference[e];if(t.length>0)for(let e=0;e<t.length;e++)r=Math.max(r,n(t[e]))}return t[e]=r,r};return n(e)}levelDownstream(e,t){this.levels[t.id]===void 0&&(this.levels[e.id]===void 0&&(this.levels[e.id]=0),this.levels[t.id]=this.levels[e.id]+1)}setMinLevelToZero(){let e=new a$,t=0,n=[...new G1(ZB(this.levels))].toSorted((e,t)=>e-t);for(let r of n)e.set(r,t++);for(let t in this.levels)Object.prototype.hasOwnProperty.call(this.levels,t)&&(this.levels[t]=e.get(this.levels[t]))}getTreeSize(e,t){let n=1e9,r=-1e9,i=1e9,a=-1e9;for(let o in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,o)&&this.trees[o]===t){let t=e[o];n=Math.min(t.x,n),r=Math.max(t.x,r),i=Math.min(t.y,i),a=Math.max(t.y,a)}return{min_x:n,max_x:r,min_y:i,max_y:a}}hasSameParent(e,t){let n=this.parentReference[e.id],r=this.parentReference[t.id];if(n===void 0||r===void 0)return!1;for(let e=0;e<n.length;e++)for(let t=0;t<r.length;t++)if(n[e]==r[t])return!0;return!1}inSameSubNetwork(e,t){return this.trees[e.id]===this.trees[t.id]}getLevels(){return tR(this.distributionOrdering)}addToOrdering(e,t){this.distributionOrdering[t]===void 0&&(this.distributionOrdering[t]=[]);let n=!1,r=this.distributionOrdering[t];for(let t in r)if(r[t]===e){n=!0;break}n||(this.distributionOrdering[t].push(e),this.distributionIndex[e.id]=this.distributionOrdering[t].length-1)}},f2=class{constructor(e){this.body=e,this._resetRNG(Math.random()+`:`+mR()),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`}},JO(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on(`_dataChanged`,()=>{this.setupHierarchicalLayout()}),this.body.emitter.on(`_dataLoaded`,()=>{this.layoutNetwork()}),this.body.emitter.on(`_resetHierarchicalLayout`,()=>{this.setupHierarchicalLayout()}),this.body.emitter.on(`_adjustEdgesForHierarchicalLayout`,()=>{if(this.options.hierarchical.enabled!==!0)return;let e=this.direction.curveType();this.body.emitter.emit(`_forceDisableDynamicCurves`,e,!1)})}setOptions(e,t){if(e!==void 0){let n=this.options.hierarchical,r=n.enabled;if(GG([`randomSeed`,`improvedLayout`,`clusterThreshold`],this.options,e),lK(this.options,e,`hierarchical`),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),n.enabled===!0)return r===!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(t);if(r===!0)return this.body.emitter.emit(`refresh`),U(t,this.optionsBackup)}return t}_resetRNG(e){this.initialRandomSeed=e,this._rng=OG(this.initialRandomSeed)}adaptAllOptionsForHierarchicalLayout(e){if(this.options.hierarchical.enabled===!0){let t=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:t.enabled===void 0||t.enabled,solver:`hierarchicalRepulsion`},t.enabled=t.enabled===void 0||t.enabled,t.solver=t.solver||`barnesHut`):typeof e.physics==`object`?(t.enabled=e.physics.enabled===void 0||e.physics.enabled,t.solver=e.physics.solver||`barnesHut`,e.physics.solver=`hierarchicalRepulsion`):e.physics!==!1&&(t.solver=`barnesHut`,e.physics={solver:`hierarchicalRepulsion`});let 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{let t=e.edges.smooth;t.type!==void 0&&t.type!==`dynamic`&&(n=t.type),this.optionsBackup.edges={smooth:{enabled:t.enabled===void 0||t.enabled,type:t.type===void 0?`dynamic`:t.type,roundness:t.roundness===void 0?.5:t.roundness,forceDirection:t.forceDirection!==void 0&&t.forceDirection}},e.edges.smooth={enabled:t.enabled===void 0||t.enabled,type:n,roundness:t.roundness===void 0?.5:t.roundness,forceDirection:t.forceDirection!==void 0&&t.forceDirection}}this.body.emitter.emit(`_forceDisableDynamicCurves`,n)}return e}positionInitially(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);let t=e.length+50;for(let n=0;n<e.length;n++){let r=e[n],i=2*Math.PI*this._rng();r.x===void 0&&(r.x=t*Math.cos(i)),r.y===void 0&&(r.y=t*Math.sin(i))}}}layoutNetwork(){if(this.options.hierarchical.enabled!==!0&&this.options.improvedLayout===!0){let e=this.body.nodeIndices,t=0;for(let n=0;n<e.length;n++)this.body.nodes[e[n]].predefinedPosition===!0&&(t+=1);if(t<.5*e.length){let t=0,n=this.options.clusterThreshold,r={clusterNodeProperties:{shape:`ellipse`,label:``,group:``,font:{multi:!1}},clusterEdgeProperties:{label:``,font:{multi:!1},smooth:{enabled:!1}}};if(e.length>n){let i=e.length;for(;e.length>n&&t<=10;){t+=1;let n=e.length;if(t%3==0?this.body.modules.clustering.clusterBridges(r):this.body.modules.clustering.clusterOutliers(r),n==e.length&&t%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*i)})}t>10&&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(let t=0;t<e.length;t++){let n=this.body.nodes[e[t]];n.predefinedPosition===!1&&(n.x+=(.5-this._rng())*70,n.y+=(.5-this._rng())*70)}this._declusterAll(),this.body.emitter.emit(`_repositionBezierNodes`)}}}_shiftToCenter(){let e=Eq.getRangeCore(this.body.nodes,this.body.nodeIndices),t=Eq.findCenter(e);for(let e=0;e<this.body.nodeIndices.length;e++){let n=this.body.nodes[this.body.nodeIndices[e]];n.x-=t.x,n.y-=t.y}}_declusterAll(){let e=!0;for(;e===!0;){e=!1;for(let t=0;t<this.body.nodeIndices.length;t++)this.body.nodes[this.body.nodeIndices[t]].isCluster===!0&&(e=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[t],{},!1));e===!0&&this.body.emitter.emit(`_dataChanged`)}}getSeed(){return this.initialRandomSeed}setupHierarchicalLayout(){if(this.options.hierarchical.enabled===!0&&this.body.nodeIndices.length>0){let e,t,n=!1,r=!1;for(t in this.lastNodeOnLevel={},this.hierarchical=new d2,this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level===void 0?r=!0:(n=!0,this.hierarchical.levels[t]=e.options.level));if(r===!0&&n===!0)throw Error(`To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.`);{if(r===!0){let e=this.options.hierarchical.sortMethod;e===`hubsize`?this._determineLevelsByHubsize():e===`directed`?this._determineLevelsDirected():e===`custom`&&this._determineLevelsCustomCallback()}for(let e in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&this.hierarchical.ensureLevel(e);let e=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(e),this._condenseHierarchy(),this._shiftToCenter()}}}_condenseHierarchy(){var e=this;let t=!1,n={},r=()=>{let e=a(),t=0;for(let n=0;n<e.length-1;n++){let r=e[n].max-e[n+1].min;t+=r+this.options.hierarchical.treeSpacing,i(n+1,t)}},i=(e,t)=>{let n=this.hierarchical.trees;for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&n[r]===e&&this.direction.shift(r,t)},a=()=>{let e=[];for(let t=0;t<this.hierarchical.numTrees();t++)e.push(this.direction.getTreeSize(t));return e},o=(e,t)=>{if(!t[e.id]&&(t[e.id]=!0,this.hierarchical.childrenReference[e.id])){let n=this.hierarchical.childrenReference[e.id];if(n.length>0)for(let e=0;e<n.length;e++)o(this.body.nodes[n[e]],t)}},s=function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,r=1e9,i=1e9,a=1e9,o=-1e9;for(let s in t)if(Object.prototype.hasOwnProperty.call(t,s)){let c=e.body.nodes[s],l=e.hierarchical.levels[c.id],u=e.direction.getPosition(c),d=dL(e._getSpaceAroundNode(c,t),2),f=d[0],p=d[1];r=Math.min(f,r),i=Math.min(p,i),l<=n&&(a=Math.min(u,a),o=Math.max(u,o))}return[a,o,r,i]},c=(e,t)=>{let n=this.hierarchical.getMaxLevel(e.id),r=this.hierarchical.getMaxLevel(t.id);return Math.min(n,r)},l=(e,t,n)=>{let r=this.hierarchical;for(let i=0;i<t.length;i++){let a=t[i],o=r.distributionOrdering[a];if(o.length>1)for(let t=0;t<o.length-1;t++){let i=o[t],a=o[t+1];r.hasSameParent(i,a)&&r.inSameSubNetwork(i,a)&&e(i,a,n)}}},u=function(n,r){let i=arguments.length>2&&arguments[2]!==void 0&&arguments[2],a=e.direction.getPosition(n),l=e.direction.getPosition(r),u=Math.abs(l-a),d=e.options.hierarchical.nodeSpacing;if(u>d){let a={},l={};o(n,a),o(r,l);let u=c(n,r),f=s(a,u),p=s(l,u),m=f[1],h=p[0],g=p[2];if(Math.abs(m-h)>d){let n=m-h+d;n<-g+d&&(n=-g+d),n<0&&(e._shiftBlock(r.id,n),t=!0,i===!0&&e._centerParent(r))}}},d=(e,r)=>{let i=r.id,a=r.edges,c=this.hierarchical.levels[r.id],l=this.options.hierarchical.levelSeparation*this.options.hierarchical.levelSeparation,u={},d=[];for(let e=0;e<a.length;e++){let t=a[e];if(t.toId!=t.fromId){let n=t.toId==i?t.from:t.to;u[a[e].id]=n,this.hierarchical.levels[n.id]<c&&d.push(t)}}let f=(e,t)=>{let n=0;for(let r=0;r<t.length;r++)if(u[t[r].id]!==void 0){let i=this.direction.getPosition(u[t[r].id])-e;n+=i/Math.sqrt(i*i+l)}return n},p=(e,t)=>{let n=0;for(let r=0;r<t.length;r++)if(u[t[r].id]!==void 0){let i=this.direction.getPosition(u[t[r].id])-e;n-=l*(i*i+l)**-1.5}return n},m=(e,t)=>{let n=this.direction.getPosition(r),i={};for(let r=0;r<e;r++){let e=f(n,t),a=p(n,t),o=Math.max(-40,Math.min(40,Math.round(e/a)));if(n-=o,i[n]!==void 0)break;i[n]=r}return n},h=e=>{let i=this.direction.getPosition(r);if(n[r.id]===void 0){let e={};o(r,e),n[r.id]=e}let a=s(n[r.id]),c=a[2],l=a[3],u=e-i,d=0;u>0?d=Math.min(u,l-this.options.hierarchical.nodeSpacing):u<0&&(d=-Math.min(-u,c-this.options.hierarchical.nodeSpacing)),d!=0&&(this._shiftBlock(r.id,d),t=!0)},g=e=>{let n=this.direction.getPosition(r),i=dL(this._getSpaceAroundNode(r),2),a=i[0],o=i[1],s=e-n,c=n;s>0?c=Math.min(n+(o-this.options.hierarchical.nodeSpacing),e):s<0&&(c=Math.max(n-(a-this.options.hierarchical.nodeSpacing),e)),c!==n&&(this.direction.setPosition(r,c),t=!0)},_=m(e,d);h(_),_=m(e,a),g(_)};this.options.hierarchical.blockShifting===!0&&((e=>{let n=this.hierarchical.getLevels();n=n.toReversed();for(let r=0;r<e&&(t=!1,l(u,n,!0),t===!0);r++);})(5),(()=>{for(let e in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&this._centerParent(this.body.nodes[e])})()),this.options.hierarchical.edgeMinimization===!0&&(e=>{let n=this.hierarchical.getLevels();n=n.toReversed();for(let r=0;r<e;r++){t=!1;for(let e=0;e<n.length;e++){let t=n[e],r=this.hierarchical.distributionOrdering[t];for(let e=0;e<r.length;e++)d(1e3,r[e])}if(t!==!0)break}})(20),this.options.hierarchical.parentCentralization===!0&&(()=>{let e=this.hierarchical.getLevels();e=e.toReversed();for(let t=0;t<e.length;t++){let n=e[t],r=this.hierarchical.distributionOrdering[n];for(let e=0;e<r.length;e++)this._centerParent(r[e])}})(),r()}_getSpaceAroundNode(e,t){let n=!0;t===void 0&&(n=!1);let r=this.hierarchical.levels[e.id];if(r!==void 0){let i=this.hierarchical.distributionIndex[e.id],a=this.direction.getPosition(e),o=this.hierarchical.distributionOrdering[r],s=1e9,c=1e9;if(i!==0){let e=o[i-1];(n===!0&&t[e.id]===void 0||n===!1)&&(s=a-this.direction.getPosition(e))}if(i!=o.length-1){let e=o[i+1];if(n===!0&&t[e.id]===void 0||n===!1){let t=this.direction.getPosition(e);c=Math.min(c,t-a)}}return[s,c]}return[0,0]}_centerParent(e){if(this.hierarchical.parentReference[e.id]){let t=this.hierarchical.parentReference[e.id];for(let e=0;e<t.length;e++){let n=t[e],r=this.body.nodes[n],i=this.hierarchical.childrenReference[n];if(i!==void 0){let e=this._getCenterPosition(i),t=this.direction.getPosition(r),n=dL(this._getSpaceAroundNode(r),2),a=n[0],o=n[1],s=t-e;(s<0&&Math.abs(s)<o-this.options.hierarchical.nodeSpacing||s>0&&Math.abs(s)<a-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(r,e)}}}}_placeNodesByHierarchy(e){this.positionedNodes={};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var t;let r=tR(e[n]);r=this._indexArrayToNodes(r),y0(t=this.direction).call(t,r);let i=0;for(let e=0;e<r.length;e++){let t=r[e];if(this.positionedNodes[t.id]===void 0){let a=this.options.hierarchical.nodeSpacing,o=a*i;i>0&&(o=this.direction.getPosition(r[e-1])+a),this.direction.setPosition(t,o,n),this._validatePositionAndContinue(t,n,o),i++}}}}_placeBranchNodes(e,t){var n;let r=this.hierarchical.childrenReference[e];if(r===void 0)return;let i=[];for(let e=0;e<r.length;e++)i.push(this.body.nodes[r[e]]);y0(n=this.direction).call(n,i);for(let n=0;n<i.length;n++){let r=i[n],a=this.hierarchical.levels[r.id];if(a>t&&this.positionedNodes[r.id]===void 0){let t=this.options.hierarchical.nodeSpacing,o;o=n===0?this.direction.getPosition(this.body.nodes[e]):this.direction.getPosition(i[n-1])+t,this.direction.setPosition(r,o,a),this._validatePositionAndContinue(r,a,o)}else return}let a=this._getCenterPosition(i);this.direction.setPosition(this.body.nodes[e],a,t)}_validatePositionAndContinue(e,t,n){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){let r=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(n-r<this.options.hierarchical.nodeSpacing){let i=r+this.options.hierarchical.nodeSpacing-n,a=this._findCommonParent(this.lastNodeOnLevel[t],e.id);this._shiftBlock(a.withChild,i)}}this.lastNodeOnLevel[t]=e.id,this.positionedNodes[e.id]=!0,this._placeBranchNodes(e.id,t)}}_indexArrayToNodes(e){let t=[];for(let n=0;n<e.length;n++)t.push(this.body.nodes[e[n]]);return t}_getDistribution(){let e={},t,n;for(t in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,t)){n=this.body.nodes[t];let r=this.hierarchical.levels[t]===void 0?0:this.hierarchical.levels[t];this.direction.fix(n,r),e[r]===void 0&&(e[r]={}),e[r][t]=n}return e}_getActiveEdges(e){let t=[];return W(e.edges,e=>{var n;H(n=this.body.edgeIndices).call(n,e.id)!==-1&&t.push(e)}),t}_getHubSizes(){let e={},t=this.body.nodeIndices;W(t,t=>{let n=this.body.nodes[t],r=this._getActiveEdges(n).length;e[r]=!0});let n=[];return W(e,e=>{n.push(Number(e))}),y0(n).call(n,function(e,t){return t-e}),n}_determineLevelsByHubsize(){let e=(e,t)=>{this.hierarchical.levelDownstream(e,t)},t=this._getHubSizes();for(let n=0;n<t.length;++n){let r=t[n];if(r===0)break;W(this.body.nodeIndices,t=>{let n=this.body.nodes[t];r===this._getActiveEdges(n).length&&this._crawlNetwork(e,t)})}}_determineLevelsCustomCallback(){this._crawlNetwork((e,t,n)=>{let r=this.hierarchical.levels[e.id];r===void 0&&(r=this.hierarchical.levels[e.id]=1e5),Eq.cloneOptions(e,`node`),Eq.cloneOptions(t,`node`),Eq.cloneOptions(n,`edge`),this.hierarchical.levels[t.id]=r+void 0}),this.hierarchical.setMinLevelToZero()}_determineLevelsDirected(){var e;let t=V0(e=this.body.nodeIndices).call(e,(e,t)=>(e.set(t,this.body.nodes[t]),e),new a$);this.options.hierarchical.shakeTowards===`roots`?this.hierarchical.levels=l2(t):this.hierarchical.levels=c2(t),this.hierarchical.setMinLevelToZero()}_generateMap(){this._crawlNetwork((e,t)=>{this.hierarchical.levels[t.id]>this.hierarchical.levels[e.id]&&this.hierarchical.addRelation(e.id,t.id)}),this.hierarchical.checkIfTree()}_crawlNetwork(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},t=arguments.length>1?arguments[1]:void 0,n={},r=(t,i)=>{if(n[t.id]===void 0){this.hierarchical.setTreeIndex(t,i),n[t.id]=!0;let a,o=this._getActiveEdges(t);for(let n=0;n<o.length;n++){let s=o[n];s.connected===!0&&(a=s.toId==t.id?s.from:s.to,t.id!=a.id&&(e(t,a,s),r(a,i)))}}};if(t===void 0){let e=0;for(let t=0;t<this.body.nodeIndices.length;t++){let i=this.body.nodeIndices[t];if(n[i]===void 0){let t=this.body.nodes[i];r(t,e),e+=1}}}else{let e=this.body.nodes[t];if(e===void 0){console.error(`Node not found:`,t);return}r(e)}}_shiftBlock(e,t){let n={},r=e=>{if(n[e])return;n[e]=!0,this.direction.shift(e,t);let i=this.hierarchical.childrenReference[e];if(i!==void 0)for(let e=0;e<i.length;e++)r(i[e])};r(e)}_findCommonParent(e,t){let n={},r=(e,t)=>{let n=this.hierarchical.parentReference[t];if(n!==void 0)for(let t=0;t<n.length;t++){let i=n[t];e[i]=!0,r(e,i)}},i=(e,t)=>{let n=this.hierarchical.parentReference[t];if(n!==void 0)for(let r=0;r<n.length;r++){let a=n[r];if(e[a]!==void 0)return{foundParent:a,withChild:t};let o=i(e,a);if(o.foundParent!==null)return o}return{foundParent:null,withChild:t}};return r(n,e),i(n,t)}setDirectionStrategy(){this.direction=this.options.hierarchical.direction===`UD`||this.options.hierarchical.direction===`DU`?new U0(this):new W0(this)}_getCenterPosition(e){let t=1e9,n=-1e9;for(let r=0;r<e.length;r++){let i;if(e[r].id!==void 0)i=e[r];else{let t=e[r];i=this.body.nodes[t]}let a=this.direction.getPosition(i);t=Math.min(t,a),n=Math.max(n,a)}return .5*(t+n)}},p2=class{constructor(e,t,n,r){var i,a;this.body=e,this.canvas=t,this.selectionHandler=n,this.interactionHandler=r,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this._domEventListenerCleanupQueue=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:`dot`,size:6,color:{background:`#ff0000`,border:`#3c3c3c`,highlight:{background:`#07f968`,border:`#3c3c3c`}},borderWidth:2,borderWidthSelected:2}},JO(this.options,this.defaultOptions),this.body.emitter.on(`destroy`,()=>{this._clean()}),this.body.emitter.on(`_dataChanged`,B(i=this._restore).call(i,this)),this.body.emitter.on(`_resetData`,B(a=this._restore).call(a,this))}_restore(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}setOptions(e,t,n){t!==void 0&&(t.locale===void 0?this.options.locale=n.locale:this.options.locale=t.locale,t.locales===void 0?this.options.locales=n.locales:this.options.locales=t.locales),e!==void 0&&(typeof e==`boolean`?this.options.enabled=e:(this.options.enabled=!0,U(this.options,e)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}toggleEditMode(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}enableEditMode(){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())}disableEditMode(){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())}showManipulatorToolbar(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){var e,t;this.editMode=!0,this.manipulationDiv.style.display=`block`,this.closeDiv.style.display=`block`;let n=this.selectionHandler.getSelectedNodeCount(),r=this.selectionHandler.getSelectedEdgeCount(),i=n+r,a=this.options.locales[this.options.locale],o=!1;this.options.addNode!==!1&&(this._createAddNodeButton(a),o=!0),this.options.addEdge!==!1&&(o===!0?this._createSeperator(1):o=!0,this._createAddEdgeButton(a)),n===1&&typeof this.options.editNode==`function`?(o===!0?this._createSeperator(2):o=!0,this._createEditNodeButton(a)):r===1&&n===0&&this.options.editEdge!==!1&&(o===!0?this._createSeperator(3):o=!0,this._createEditEdgeButton(a)),i!==0&&(n>0&&this.options.deleteNode!==!1||n===0&&this.options.deleteEdge!==!1)&&(o===!0&&this._createSeperator(4),this._createDeleteButton(a)),this._bindElementEvents(this.closeDiv,B(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent(`select`,B(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit(`_redraw`)}addNodeMode(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode=`addNode`,this.guiEnabled===!0){var t;let e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,B(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent(`click`,B(e=this._performAddNode).call(e,this))}editNode(){this.editMode!==!0&&this.enableEditMode(),this._clean();let e=this.selectionHandler.getSelectedNodes()[0];if(e!==void 0){if(this.inMode=`editNode`,typeof this.options.editNode==`function`){if(e.isCluster!==!0){let t=U({},e.options,!1);if(t.x=e.x,t.y=e.y,this.options.editNode.length===2)this.options.editNode(t,e=>{e!=null&&this.inMode===`editNode`&&this.body.data.nodes.getDataSet().update(e),this.showManipulatorToolbar()});else throw 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 Error(`No function has been configured to handle the editing of nodes.`)}else this.showManipulatorToolbar()}addEdgeMode(){var e,t,n,r,i;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode=`addEdge`,this.guiEnabled===!0){var a;let e=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,B(a=this.toggleEditMode).call(a,this))}this._temporaryBindUI(`onTouch`,B(e=this._handleConnect).call(e,this)),this._temporaryBindUI(`onDragEnd`,B(t=this._finishConnect).call(t,this)),this._temporaryBindUI(`onDrag`,B(n=this._dragControlNode).call(n,this)),this._temporaryBindUI(`onRelease`,B(r=this._finishConnect).call(r,this)),this._temporaryBindUI(`onDragStart`,B(i=this._dragStartEdge).call(i,this)),this._temporaryBindUI(`onHold`,()=>{})}editEdgeMode(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode=`editEdge`,typeof this.options.editEdge==`object`&&typeof this.options.editEdge.editWithoutDrag==`function`&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){let e=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(e.from.id,e.to.id);return}if(this.guiEnabled===!0){var e;let t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,B(e=this.toggleEditMode).call(e,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var t,n,r,i;let e=this.body.edges[this.edgeBeingEditedId],a=this._getNewTargetNode(e.from.x,e.from.y),o=this._getNewTargetNode(e.to.x,e.to.y);this.temporaryIds.nodes.push(a.id),this.temporaryIds.nodes.push(o.id),this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id),this.body.nodes[o.id]=o,this.body.nodeIndices.push(o.id),this._temporaryBindUI(`onTouch`,B(t=this._controlNodeTouch).call(t,this)),this._temporaryBindUI(`onTap`,()=>{}),this._temporaryBindUI(`onHold`,()=>{}),this._temporaryBindUI(`onDragStart`,B(n=this._controlNodeDragStart).call(n,this)),this._temporaryBindUI(`onDrag`,B(r=this._controlNodeDrag).call(r,this)),this._temporaryBindUI(`onDragEnd`,B(i=this._controlNodeDragEnd).call(i,this)),this._temporaryBindUI(`onMouseMove`,()=>{}),this._temporaryBindEvent(`beforeDrawing`,t=>{let n=e.edgeType.findBorderPositions(t);a.selected===!1&&(a.x=n.from.x,a.y=n.from.y),o.selected===!1&&(o.x=n.to.x,o.y=n.to.y)}),this.body.emitter.emit(`_redraw`)}else this.showManipulatorToolbar()}deleteSelected(){this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode=`delete`;let e=this.selectionHandler.getSelectedNodeIds(),t=this.selectionHandler.getSelectedEdgeIds(),n;if(e.length>0){for(let t=0;t<e.length;t++)if(this.body.nodes[e[t]].isCluster===!0){alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);return}typeof this.options.deleteNode==`function`&&(n=this.options.deleteNode)}else t.length>0&&typeof this.options.deleteEdge==`function`&&(n=this.options.deleteEdge);if(typeof n==`function`){let r={nodes:e,edges:t};if(n.length===2)n(r,e=>{e!=null&&this.inMode===`delete`?(this.body.data.edges.getDataSet().remove(e.edges),this.body.data.nodes.getDataSet().remove(e.nodes),this.body.emitter.emit(`startSimulation`),this.showManipulatorToolbar()):(this.body.emitter.emit(`startSimulation`),this.showManipulatorToolbar())});else throw Error(`The function for delete does not support two arguments (data, callback)`)}else this.body.data.edges.getDataSet().remove(t),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit(`startSimulation`),this.showManipulatorToolbar()}_setup(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}_createWrappers(){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&&(this.closeDiv=document.createElement(`button`),this.closeDiv.className=`vis-close`,this.closeDiv.setAttribute(`aria-label`,this.options.locales[this.options.locale]?.close??this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}_getNewTargetNode(e,t){let n=U({},this.options.controlNodeStyle);n.id=`targetNode`+wq(),n.hidden=!1,n.physics=!1,n.x=e,n.y=t;let r=this.body.functions.createNode(n);return r.shape.boundingBox={left:e,right:e,top:t,bottom:t},r}_createEditButton(){var e;this._clean(),this.manipulationDOM={},BG(this.editModeDiv);let t=this.options.locales[this.options.locale],n=this._createButton(`editMode`,`vis-edit vis-edit-mode`,t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(n),this._bindElementEvents(n,B(e=this.toggleEditMode).call(e,this))}_clean(){this.inMode=!1,this.guiEnabled===!0&&(BG(this.editModeDiv),BG(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit(`restorePhysics`)}_cleanupDOMEventListeners(){for(let t of gz(e=this._domEventListenerCleanupQueue).call(e,0)){var e;t()}}_removeManipulationDOM(){this._clean(),BG(this.manipulationDiv),BG(this.editModeDiv),BG(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}_createSeperator(){let 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])}_createAddNodeButton(e){var t;let n=this._createButton(`addNode`,`vis-add`,e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.addNodeMode).call(t,this))}_createAddEdgeButton(e){var t;let n=this._createButton(`addEdge`,`vis-connect`,e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.addEdgeMode).call(t,this))}_createEditNodeButton(e){var t;let n=this._createButton(`editNode`,`vis-edit`,e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.editNode).call(t,this))}_createEditEdgeButton(e){var t;let n=this._createButton(`editEdge`,`vis-edit`,e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.editEdgeMode).call(t,this))}_createDeleteButton(e){var t;let n;n=this.options.rtl?`vis-delete-rtl`:`vis-delete`;let r=this._createButton(`delete`,n,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,B(t=this.deleteSelected).call(t,this))}_createBackButton(e){var t;let n=this._createButton(`back`,`vis-back`,e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.showManipulatorToolbar).call(t,this))}_createButton(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`vis-label`;return this.manipulationDOM[e+`Div`]=document.createElement(`button`),this.manipulationDOM[e+`Div`].className=`vis-button `+t,this.manipulationDOM[e+`Label`]=document.createElement(`div`),this.manipulationDOM[e+`Label`].className=r,this.manipulationDOM[e+`Label`].innerText=n,this.manipulationDOM[e+`Div`].appendChild(this.manipulationDOM[e+`Label`]),this.manipulationDOM[e+`Div`]}_createDescription(e){this.manipulationDOM.descriptionLabel=document.createElement(`div`),this.manipulationDOM.descriptionLabel.className=`vis-none`,this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}_temporaryBindEvent(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}_temporaryBindUI(e,t){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t;else throw Error(`This UI function does not exist. Typo? You tried: `+e+` possible are: `+hH(tR(this.body.eventListeners)))}_unbindTemporaryUIs(){for(let e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}_unbindTemporaryEvents(){for(let e=0;e<this.temporaryEventFunctions.length;e++){let t=this.temporaryEventFunctions[e].event,n=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(t,n)}this.temporaryEventFunctions=[]}_bindElementEvents(e,t){let n=new CK(e,{});gq(n,t),this._domEventListenerCleanupQueue.push(()=>{n.destroy()});let r=e=>{let n=e.keyCode,r=e.key;(r===`Enter`||r===` `||n===13||n===32)&&t()};e.addEventListener(`keyup`,r,!1),this._domEventListenerCleanupQueue.push(()=>{e.removeEventListener(`keyup`,r,!1)})}_cleanupTemporaryNodesAndEdges(){for(let n=0;n<this.temporaryIds.edges.length;n++){var e;this.body.edges[this.temporaryIds.edges[n]].disconnect(),delete this.body.edges[this.temporaryIds.edges[n]];let r=H(e=this.body.edgeIndices).call(e,this.temporaryIds.edges[n]);if(r!==-1){var t;gz(t=this.body.edgeIndices).call(t,r,1)}}for(let e=0;e<this.temporaryIds.nodes.length;e++){var n;delete this.body.nodes[this.temporaryIds.nodes[e]];let t=H(n=this.body.nodeIndices).call(n,this.temporaryIds.nodes[e]);if(t!==-1){var r;gz(r=this.body.nodeIndices).call(r,t,1)}}this.temporaryIds={nodes:[],edges:[]}}_controlNodeTouch(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=JO({},this.body.view.translation)}_controlNodeDragStart(){let e=this.lastTouch,t=this.selectionHandler._pointerToPositionObject(e),n=this.body.nodes[this.temporaryIds.nodes[0]],r=this.body.nodes[this.temporaryIds.nodes[1]],i=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;let a=n.isOverlappingWith(t),o=r.isOverlappingWith(t);a===!0?(this.selectedControlNode=n,i.edgeType.from=n):o===!0&&(this.selectedControlNode=r,i.edgeType.to=r),this.selectedControlNode!==void 0&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit(`_redraw`)}_controlNodeDrag(e){this.body.emitter.emit(`disablePhysics`);let t=this.body.functions.getPointer(e.center),n=this.canvas.DOMtoCanvas(t);this.selectedControlNode===void 0?this.interactionHandler.onDrag(e):(this.selectedControlNode.x=n.x,this.selectedControlNode.y=n.y),this.body.emitter.emit(`_redraw`)}_controlNodeDragEnd(e){let t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),r=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode===void 0)return;this.selectionHandler.unselectAll();let i=this.selectionHandler._getAllNodesOverlappingWith(n),a;for(let e=i.length-1;e>=0;e--)if(i[e]!==this.selectedControlNode.id){a=this.body.nodes[i[e]];break}if(a!==void 0&&this.selectedControlNode!==void 0){if(a.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{let e=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===e.id?this._performEditEdge(a.id,r.to.id):this._performEditEdge(r.from.id,a.id)}}else r.updateEdgeType(),this.body.emitter.emit(`restorePhysics`);this.body.emitter.emit(`_redraw`)}_handleConnect(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=JO({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;let t=this.lastTouch,n=this.selectionHandler.getNodeAt(t);if(n!==void 0){if(n.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{let e=this._getNewTargetNode(n.x,n.y);this.body.nodes[e.id]=e,this.body.nodeIndices.push(e.id);let t=this.body.functions.createEdge({id:`connectionEdge`+wq(),from:n.id,to:e.id,physics:!1,smooth:{enabled:!0,type:`continuous`,roundness:.5}});this.body.edges[t.id]=t,this.body.edgeIndices.push(t.id),this.temporaryIds.nodes.push(e.id),this.temporaryIds.edges.push(t.id)}}this.touchTime=new Date().valueOf()}}_dragControlNode(e){let t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),r;this.temporaryIds.edges[0]!==void 0&&(r=this.body.edges[this.temporaryIds.edges[0]].fromId);let i=this.selectionHandler._getAllNodesOverlappingWith(n),a;for(let e=i.length-1;e>=0;e--){var o;if(H(o=this.temporaryIds.nodes).call(o,i[e])===-1){a=this.body.nodes[i[e]];break}}if(e.controlEdge={from:r,to:a?a.id:void 0},this.selectionHandler.generateClickEvent(`controlNodeDragging`,e,t),this.temporaryIds.nodes[0]!==void 0){let e=this.body.nodes[this.temporaryIds.nodes[0]];e.x=this.canvas._XconvertDOMtoCanvas(t.x),e.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit(`_redraw`)}else this.interactionHandler.onDrag(e)}_finishConnect(e){let t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),r;this.temporaryIds.edges[0]!==void 0&&(r=this.body.edges[this.temporaryIds.edges[0]].fromId);let i=this.selectionHandler._getAllNodesOverlappingWith(n),a;for(let e=i.length-1;e>=0;e--){var o;if(H(o=this.temporaryIds.nodes).call(o,i[e])===-1){a=this.body.nodes[i[e]];break}}this._cleanupTemporaryNodesAndEdges(),a!==void 0&&(a.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[r]!==void 0&&this.body.nodes[a.id]!==void 0&&this._performAddEdge(r,a.id)),e.controlEdge={from:r,to:a?a.id:void 0},this.selectionHandler.generateClickEvent(`controlNodeDragEnd`,e,t),this.body.emitter.emit(`_redraw`)}_dragStartEdge(e){let t=this.lastTouch;this.selectionHandler.generateClickEvent(`dragStart`,e,t,void 0,!0)}_performAddNode(e){let t={id:wq(),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(t,e=>{e!=null&&this.inMode===`addNode`&&this.body.data.nodes.getDataSet().add(e),this.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),Error(`The function for add does not support two arguments (data,callback)`)}else this.body.data.nodes.getDataSet().add(t),this.showManipulatorToolbar()}_performAddEdge(e,t){let n={from:e,to:t};if(typeof this.options.addEdge==`function`){if(this.options.addEdge.length===2)this.options.addEdge(n,e=>{e!=null&&this.inMode===`addEdge`&&(this.body.data.edges.getDataSet().add(e),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw Error(`The function for connect does not support two arguments (data,callback)`)}else this.body.data.edges.getDataSet().add(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}_performEditEdge(e,t){let n={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label},r=this.options.editEdge;if(typeof r==`object`&&(r=r.editWithoutDrag),typeof r==`function`){if(r.length===2)r(n,e=>{e==null||this.inMode!==`editEdge`?(this.body.edges[n.id].updateEdgeType(),this.body.emitter.emit(`_redraw`),this.showManipulatorToolbar()):(this.body.data.edges.getDataSet().update(e),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw Error(`The function for edit does not support two arguments (data, callback)`)}else this.body.data.edges.getDataSet().update(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},m2={},h2;function g2(){return h2?m2:(h2=1,z()({target:`Number`,stat:!0},{isNaN:function(e){return e!==e}}),m2)}var _2,v2;function y2(){return v2?_2:(v2=1,g2(),_2=R().Number.isNaN,_2)}var b2,x2;function S2(){return x2?b2:(x2=1,b2=y2(),b2)}var C2,w2;function T2(){return w2?C2:(w2=1,C2=S2(),C2)}var E2=F(T2()),D2={},O2;function k2(){if(O2)return D2;O2=1;var e=z(),t=Ij().some;return e({target:`Array`,proto:!0,forced:!vR()(`some`)},{some:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),D2}var A2,j2;function M2(){return j2?A2:(j2=1,k2(),A2=ok()(`Array`,`some`),A2)}var N2,P2;function F2(){if(P2)return N2;P2=1;var e=CE(),t=M2(),n=Array.prototype;return N2=function(r){var i=r.some;return r===n||e(n,r)&&i===n.some?t:i},N2}var I2,L2;function R2(){return L2?I2:(L2=1,I2=F2(),I2)}var z2,B2;function V2(){return B2?z2:(B2=1,z2=R2(),z2)}var H2=F(V2()),U2=class{constructor(e,t,n,r){var i;if(this.body=e,this.images=t,this.groups=n,this.layoutEngine=r,this.body.functions.createNode=B(i=this.create).call(i,this),this.nodesListeners={add:(e,t)=>{this.add(t.items)},update:(e,t)=>{this.update(t.items,t.data,t.oldData)},remove:(e,t)=>{this.remove(t.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(e,t,n,r){if(t===e)return .5;{let n=1/(t-e);return Math.max(0,(r-e)*n)}}},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=cK(this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e,t;this.body.emitter.on(`refreshNodes`,B(e=this.refresh).call(e,this)),this.body.emitter.on(`refresh`,B(t=this.refresh).call(t,this)),this.body.emitter.on(`destroy`,()=>{W(this.nodesListeners,(e,t)=>{this.body.data.nodes&&this.body.data.nodes.off(t,e)}),delete this.body.functions.createNode,delete this.nodesListeners.add,delete this.nodesListeners.update,delete this.nodesListeners.remove,delete this.nodesListeners})}setOptions(e){if(e!==void 0){if(YZ.parseOptions(this.options,e),e.opacity!==void 0&&(E2(e.opacity)||!iJ(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(let e in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&this.body.nodes[e].updateShape();if(e.font!==void 0||e.widthConstraint!==void 0||e.heightConstraint!==void 0)for(let e of tR(this.body.nodes))this.body.nodes[e].updateLabelModule(),this.body.nodes[e].needsRefresh();if(e.size!==void 0)for(let e in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&this.body.nodes[e].needsRefresh();(e.hidden!==void 0||e.physics!==void 0)&&this.body.emitter.emit(`_dataChanged`)}}setData(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.body.data.nodes;if(_T(`id`,e))this.body.data.nodes=e;else if(EL(e))this.body.data.nodes=new hT,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new hT;else throw TypeError(`Array or DataSet expected`);if(n&&W(this.nodesListeners,function(e,t){n.off(t,e)}),this.body.nodes={},this.body.data.nodes){let e=this;W(this.nodesListeners,function(t,n){e.body.data.nodes.on(n,t)});let t=this.body.data.nodes.getIds();this.add(t,!0)}t===!1&&this.body.emitter.emit(`_dataChanged`)}add(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n,r=[];for(let t=0;t<e.length;t++){n=e[t];let i=this.body.data.nodes.get(n),a=this.create(i);r.push(a),this.body.nodes[n]=a}this.layoutEngine.positionInitially(r),t===!1&&this.body.emitter.emit(`_dataChanged`)}update(e,t,n){let r=this.body.nodes,i=!1;for(let n=0;n<e.length;n++){let a=e[n],o=r[a],s=t[n];o===void 0?(i=!0,o=this.create(s),r[a]=o):o.setOptions(s)&&(i=!0)}!i&&n!==void 0&&(i=H2(t).call(t,function(e,t){let r=n[t];return r&&r.level!==e.level})),i===!0?this.body.emitter.emit(`_dataChanged`):this.body.emitter.emit(`_dataUpdated`)}remove(e){let t=this.body.nodes;for(let n=0;n<e.length;n++){let r=e[n];delete t[r]}this.body.emitter.emit(`_dataChanged`)}create(e){return new(arguments.length>1&&arguments[1]!==void 0?arguments[1]:YZ)(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}refresh(){let e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];W(this.body.nodes,(t,n)=>{let r=this.body.data.nodes.get(n);r!==void 0&&(e===!0&&t.setOptions({x:null,y:null}),t.setOptions({fixed:!1}),t.setOptions(r))})}getPositions(e){let t={};if(e!==void 0){if(EL(e)===!0){for(let n=0;n<e.length;n++)if(this.body.nodes[e[n]]!==void 0){let r=this.body.nodes[e[n]];t[e[n]]={x:Math.round(r.x),y:Math.round(r.y)}}}else if(this.body.nodes[e]!==void 0){let n=this.body.nodes[e];t[e]={x:Math.round(n.x),y:Math.round(n.y)}}}else for(let e=0;e<this.body.nodeIndices.length;e++){let n=this.body.nodes[this.body.nodeIndices[e]];t[this.body.nodeIndices[e]]={x:Math.round(n.x),y:Math.round(n.y)}}return t}getPosition(e){if(e==null)throw TypeError(`No id was specified for getPosition method.`);if(this.body.nodes[e]==null)throw ReferenceError(`NodeId provided for getPosition does not exist. Provided: ${e}`);return{x:Math.round(this.body.nodes[e].x),y:Math.round(this.body.nodes[e].y)}}storePositions(){let e=[],t=this.body.data.nodes.getDataSet();for(let n of t.get()){let t=n.id,r=this.body.nodes[t],i=Math.round(r.x),a=Math.round(r.y);(n.x!==i||n.y!==a)&&e.push({id:t,x:i,y:a})}t.update(e)}getBoundingBox(e){if(this.body.nodes[e]!==void 0)return this.body.nodes[e].shape.boundingBox}getConnectedNodes(e,t){let n=[];if(this.body.nodes[e]!==void 0){let r=this.body.nodes[e],i={};for(let e=0;e<r.edges.length;e++){let a=r.edges[e];t!==`to`&&a.toId==r.id?i[a.fromId]===void 0&&(n.push(a.fromId),i[a.fromId]=!0):t!==`from`&&a.fromId==r.id&&i[a.toId]===void 0&&(n.push(a.toId),i[a.toId]=!0)}}return n}getConnectedEdges(e){let t=[];if(this.body.nodes[e]!==void 0){let n=this.body.nodes[e];for(let e=0;e<n.edges.length;e++)t.push(n.edges[e].id)}else console.error(`NodeId provided for getConnectedEdges does not exist. Provided: `,e);return t}moveNode(e,t,n){this.body.nodes[e]===void 0?console.error(`Node id supplied to moveNode does not exist. Provided: `,e):(this.body.nodes[e].x=Number(t),this.body.nodes[e].y=Number(n),BH(()=>{this.body.emitter.emit(`startSimulation`)},0))}},W2=class{constructor(e,t,n){this.body=e,this.physicsBody=t,this.setOptions(n),this._rng=OG(`BARNES HUT SOLVER`)}setOptions(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}solve(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){let e,t=this.body.nodes,n=this.physicsBody.physicsNodeIndices,r=n.length,i=this._formBarnesHutTree(t,n);this.barnesHutTree=i;for(let a=0;a<r;a++)e=t[n[a]],e.options.mass>0&&this._getForceContributions(i.root,e)}}_getForceContributions(e,t){this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)}_getForceContribution(e,t){if(e.childrenCount>0){let n=e.centerOfMass.x-t.x,r=e.centerOfMass.y-t.y,i=Math.sqrt(n*n+r*r);i*e.calcSize>this.thetaInversed?this._calculateForces(i,n,r,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(i,n,r,t,e)}}_calculateForces(e,t,n,r,i){e===0&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&r.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*r.shape.radius,e-r.shape.radius));let a=this.options.gravitationalConstant*i.mass*r.options.mass/e**3,o=t*a,s=n*a;this.physicsBody.forces[r.id].x+=o,this.physicsBody.forces[r.id].y+=s}_formBarnesHutTree(e,t){let n,r=t.length,i=e[t[0]].x,a=e[t[0]].y,o=e[t[0]].x,s=e[t[0]].y;for(let n=1;n<r;n++){let r=e[t[n]],c=r.x,l=r.y;r.options.mass>0&&(c<i&&(i=c),c>o&&(o=c),l<a&&(a=l),l>s&&(s=l))}let c=Math.abs(o-i)-Math.abs(s-a);c>0?(a-=.5*c,s+=.5*c):(i+=.5*c,o-=.5*c);let l=Math.max(1e-5,Math.abs(o-i)),u=.5*l,d=.5*(i+o),f=.5*(a+s),p={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:d-u,maxX:d+u,minY:f-u,maxY:f+u},size:l,calcSize:1/l,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(p.root);for(let i=0;i<r;i++)n=e[t[i]],n.options.mass>0&&this._placeInTree(p.root,n);return p}_updateBranchMass(e,t){let n=e.centerOfMass,r=e.mass+t.options.mass,i=1/r;n.x=n.x*e.mass+t.x*t.options.mass,n.x*=i,n.y=n.y*e.mass+t.y*t.options.mass,n.y*=i,e.mass=r;let a=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidth<a?a:e.maxWidth}_placeInTree(e,t,n){(n!=1||n===void 0)&&this._updateBranchMass(e,t);let r=e.children.NW.range,i;i=r.maxX>t.x?r.maxY>t.y?`NW`:`SW`:r.maxY>t.y?`NE`:`SE`,this._placeInRegion(e,t,i)}_placeInRegion(e,t,n){let r=e.children[n];switch(r.childrenCount){case 0:r.children.data=t,r.childrenCount=1,this._updateBranchMass(r,t);break;case 1:r.children.data.x===t.x&&r.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(r),this._placeInTree(r,t));break;case 4:this._placeInTree(r,t)}}_splitBranch(e){let t=null;e.childrenCount===1&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,`NW`),this._insertRegion(e,`NE`),this._insertRegion(e,`SW`),this._insertRegion(e,`SE`),t!=null&&this._placeInTree(e,t)}_insertRegion(e,t){let n,r,i,a,o=.5*e.size;switch(t){case`NW`:n=e.range.minX,r=e.range.minX+o,i=e.range.minY,a=e.range.minY+o;break;case`NE`:n=e.range.minX+o,r=e.range.maxX,i=e.range.minY,a=e.range.minY+o;break;case`SW`:n=e.range.minX,r=e.range.minX+o,i=e.range.minY+o,a=e.range.maxY;break;case`SE`:n=e.range.minX+o,r=e.range.maxX,i=e.range.minY+o,a=e.range.maxY}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:n,maxX:r,minY:i,maxY:a},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}_debug(e,t){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}_drawBranch(e,t,n){n===void 0&&(n=`#FF0000`),e.childrenCount===4&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=n,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}},G2=class{constructor(e,t,n){this.body=e,this.physicsBody=t,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,t,n,r,i=this.body.nodes,a=this.physicsBody.physicsNodeIndices,o=this.physicsBody.forces;for(let s=0;s<a.length;s++)r=i[a[s]],e=-r.x,t=-r.y,n=Math.sqrt(e*e+t*t),this._calculateForces(n,e,t,o,r)}_calculateForces(e,t,n,r,i){let a=e===0?0:this.options.centralGravity/e;r[i.id].x=t*a,r[i.id].y=n*a}},K2=class extends G2{_calculateForces(e,t,n,r,i){if(e>0){let e=i.edges.length+1,a=this.options.centralGravity*e*i.options.mass;r[i.id].x=t*a,r[i.id].y=n*a}}},q2=class extends W2{constructor(e,t,n){super(e,t,n),this._rng=OG(`FORCE ATLAS 2 BASED REPULSION SOLVER`)}_calculateForces(e,t,n,r,i){e===0&&(e=.1*this._rng(),t=e),this.overlapAvoidanceFactor<1&&r.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*r.shape.radius,e-r.shape.radius));let a=r.edges.length+1,o=this.options.gravitationalConstant*i.mass*r.options.mass*a/e**2,s=t*o,c=n*o;this.physicsBody.forces[r.id].x+=s,this.physicsBody.forces[r.id].y+=c}},J2=class{constructor(e,t,n){this.body=e,this.physicsBody=t,this.setOptions(n)}setOptions(e){this.options=e,this.overlapAvoidanceFactor=Math.max(0,Math.min(1,this.options.avoidOverlap||0))}solve(){let e=this.body.nodes,t=this.physicsBody.physicsNodeIndices,n=this.physicsBody.forces,r=this.options.nodeDistance;for(let i=0;i<t.length-1;i++){let a=e[t[i]];for(let o=i+1;o<t.length;o++){let i=e[t[o]];if(a.level===i.level){let e=r+this.overlapAvoidanceFactor*((a.shape.radius||0)/2+(i.shape.radius||0)/2),t=i.x-a.x,o=i.y-a.y,s=Math.sqrt(t*t+o*o),c=.05,l;l=s<e?-((c*s)**2)+(c*e)**2:0,s!==0&&(l/=s);let u=t*l,d=o*l;n[a.id].x-=u,n[a.id].y-=d,n[i.id].x+=u,n[i.id].y+=d}}}}},Y2=class{constructor(e,t,n){this.body=e,this.physicsBody=t,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,t,n,r,i,a,o,s,c=this.body.edges,l=.5,u=this.physicsBody.physicsEdgeIndices,d=this.physicsBody.physicsNodeIndices,f=this.physicsBody.forces;for(let e=0;e<d.length;e++){let t=d[e];f[t].springFx=0,f[t].springFy=0}for(let d=0;d<u.length;d++)t=c[u[d]],t.connected===!0&&(e=t.options.length===void 0?this.options.springLength:t.options.length,n=t.from.x-t.to.x,r=t.from.y-t.to.y,s=Math.sqrt(n*n+r*r),s=s===0?.01:s,o=this.options.springConstant*(e-s)/s,i=n*o,a=r*o,t.to.level==t.from.level?(f[t.toId]!==void 0&&(f[t.toId].x-=l*i,f[t.toId].y-=l*a),f[t.fromId]!==void 0&&(f[t.fromId].x+=l*i,f[t.fromId].y+=l*a)):(f[t.toId]!==void 0&&(f[t.toId].springFx-=i,f[t.toId].springFy-=a),f[t.fromId]!==void 0&&(f[t.fromId].springFx+=i,f[t.fromId].springFy+=a)));o=1;let p,m;for(let e=0;e<d.length;e++){let t=d[e];p=Math.min(o,Math.max(-o,f[t].springFx)),m=Math.min(o,Math.max(-o,f[t].springFy)),f[t].x+=p,f[t].y+=m}let h=0,g=0;for(let e=0;e<d.length;e++){let t=d[e];h+=f[t].x,g+=f[t].y}let _=h/d.length,v=g/d.length;for(let e=0;e<d.length;e++){let t=d[e];f[t].x-=_,f[t].y-=v}}},X2=class{constructor(e,t,n){this._rng=OG(`REPULSION SOLVER`),this.body=e,this.physicsBody=t,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,t,n,r,i,a,o,s,c=this.body.nodes,l=this.physicsBody.physicsNodeIndices,u=this.physicsBody.forces,d=this.options.nodeDistance,f=-2/3/d;for(let p=0;p<l.length-1;p++){o=c[l[p]];for(let m=p+1;m<l.length;m++)s=c[l[m]],e=s.x-o.x,t=s.y-o.y,n=Math.sqrt(e*e+t*t),n===0&&(n=.1*this._rng(),e=n),n<2*d&&(a=n<.5*d?1:f*n+1.3333333333333333,a/=n,r=e*a,i=t*a,u[o.id].x-=r,u[o.id].y-=i,u[s.id].x+=r,u[s.id].y+=i)}}},Z2=class{constructor(e,t,n){this.body=e,this.physicsBody=t,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,t,n=this.physicsBody.physicsEdgeIndices,r=this.body.edges,i,a,o;for(let s=0;s<n.length;s++)t=r[n[s]],t.connected===!0&&t.toId!==t.fromId&&this.body.nodes[t.toId]!==void 0&&this.body.nodes[t.fromId]!==void 0&&(t.edgeType.via===void 0?(e=t.options.length===void 0?this.options.springLength*1.5:t.options.length,this._calculateSpringForce(t.from,t.to,e)):(e=t.options.length===void 0?this.options.springLength:t.options.length,i=t.to,a=t.edgeType.via,o=t.from,this._calculateSpringForce(i,a,.5*e),this._calculateSpringForce(a,o,.5*e)))}_calculateSpringForce(e,t,n){let r=e.x-t.x,i=e.y-t.y,a=Math.max(Math.sqrt(r*r+i*i),.01),o=this.options.springConstant*(n-a)/a,s=r*o,c=i*o;this.physicsBody.forces[e.id]!==void 0&&(this.physicsBody.forces[e.id].x+=s,this.physicsBody.forces[e.id].y+=c),this.physicsBody.forces[t.id]!==void 0&&(this.physicsBody.forces[t.id].x-=s,this.physicsBody.forces[t.id].y-=c)}},Q2=class{constructor(e){this.body=e,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}},JO(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}bindEventListeners(){this.body.emitter.on(`initPhysics`,()=>{this.initPhysics()}),this.body.emitter.on(`_layoutFailed`,()=>{this.layoutFailed=!0}),this.body.emitter.on(`resetPhysics`,()=>{this.stopSimulation(),this.ready=!1}),this.body.emitter.on(`disablePhysics`,()=>{this.physicsEnabled=!1,this.stopSimulation()}),this.body.emitter.on(`restorePhysics`,()=>{this.setOptions(this.options),this.ready===!0&&this.startSimulation()}),this.body.emitter.on(`startSimulation`,()=>{this.ready===!0&&this.startSimulation()}),this.body.emitter.on(`stopSimulation`,()=>{this.stopSimulation()}),this.body.emitter.on(`destroy`,()=>{this.stopSimulation(!1),this.body.emitter.off()}),this.body.emitter.on(`_dataChanged`,()=>{this.updatePhysicsData()})}setOptions(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,KG([`stabilization`],this.options,e),lK(this.options,e,`stabilization`),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());let t=this.options.wind;t&&typeof t!=`function`&&((typeof t.x!=`number`||E2(t.x))&&(t.x=0),(typeof t.y!=`number`||E2(t.y))&&(t.y=0)),this.timestep=this.options.timestep}}this.init()}init(){let e;this.options.solver===`forceAtlas2Based`?(e=this.options.forceAtlas2Based,this.nodesSolver=new q2(this.body,this.physicsBody,e),this.edgesSolver=new Z2(this.body,this.physicsBody,e),this.gravitySolver=new K2(this.body,this.physicsBody,e)):this.options.solver===`repulsion`?(e=this.options.repulsion,this.nodesSolver=new X2(this.body,this.physicsBody,e),this.edgesSolver=new Z2(this.body,this.physicsBody,e),this.gravitySolver=new G2(this.body,this.physicsBody,e)):this.options.solver===`hierarchicalRepulsion`?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new J2(this.body,this.physicsBody,e),this.edgesSolver=new Y2(this.body,this.physicsBody,e),this.gravitySolver=new G2(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new W2(this.body,this.physicsBody,e),this.edgesSolver=new Z2(this.body,this.physicsBody,e),this.gravitySolver=new G2(this.body,this.physicsBody,e)),this.modelOptions=e}initPhysics(){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`))}startSimulation(){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=B(e=this.simulationStep).call(e,this),this.body.emitter.on(`initRedraw`,this.viewFunction),this.body.emitter.emit(`_startRendering`)}}else this.body.emitter.emit(`_redraw`)}stopSimulation(){let 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`))}simulationStep(){let e=mR();this.physicsTick(),(mR()-e<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}_emitStabilized(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&BH(()=>{this.body.emitter.emit(`stabilized`,{iterations:e}),this.startedStabilization=!1,this.stabilizationIterations=0},0)}physicsStep(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}adjustTimeStep(){let 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))}physicsTick(){this._startStabilizing(),this.stabilized!==!0&&(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0?(this.adaptiveCounter%this.adaptiveInterval===0?(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):(this.timestep=this.options.timestep,this.physicsStep()),this.stabilized===!0&&this.revert(),this.stabilizationIterations++)}updatePhysicsData(){this.physicsBody.forces={},this.physicsBody.physicsNodeIndices=[],this.physicsBody.physicsEdgeIndices=[];let e=this.body.nodes,t=this.body.edges;for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&e[t].options.physics===!0&&this.physicsBody.physicsNodeIndices.push(e[t].id);for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&t[e].options.physics===!0&&this.physicsBody.physicsEdgeIndices.push(t[e].id);for(let e=0;e<this.physicsBody.physicsNodeIndices.length;e++){let t=this.physicsBody.physicsNodeIndices[e];this.physicsBody.forces[t]={x:0,y:0},this.physicsBody.velocities[t]===void 0&&(this.physicsBody.velocities[t]={x:0,y:0})}for(let t in this.physicsBody.velocities)e[t]===void 0&&delete this.physicsBody.velocities[t]}revert(){let e=tR(this.previousStates),t=this.body.nodes,n=this.physicsBody.velocities;this.referenceState={};for(let r=0;r<e.length;r++){let i=e[r];t[i]===void 0?delete this.previousStates[i]:t[i].options.physics===!0&&(this.referenceState[i]={positions:{x:t[i].x,y:t[i].y}},n[i].x=this.previousStates[i].vx,n[i].y=this.previousStates[i].vy,t[i].x=this.previousStates[i].x,t[i].y=this.previousStates[i].y)}}_evaluateStepQuality(){let e,t,n,r=this.body.nodes,i=this.referenceState;for(let a in this.referenceState)if(Object.prototype.hasOwnProperty.call(this.referenceState,a)&&r[a]!==void 0&&(e=r[a].x-i[a].positions.x,t=r[a].y-i[a].positions.y,n=Math.sqrt(e**2+t**2),n>.3))return!1;return!0}moveNodes(){let e=this.physicsBody.physicsNodeIndices,t=0,n=0;for(let r=0;r<e.length;r++){let i=e[r],a=this._performStep(i);t=Math.max(t,a),n+=a}this.adaptiveTimestepEnabled=n/e.length<5,this.stabilized=t<this.options.minVelocity}calculateComponentVelocity(e,t,n){let r=(t-this.modelOptions.damping*e)/n;e+=r*this.timestep;let i=this.options.maxVelocity||1e9;return Math.abs(e)>i&&(e=e>0?i:-i),e}_performStep(e){let t=this.body.nodes[e],n=this.physicsBody.forces[e];if(this.options.wind){if(typeof this.options.wind==`function`){let t=this.options.wind(e);t&&typeof t==`object`&&(typeof t.x==`number`&&!E2(t.x)&&(n.x+=t.x),typeof t.y==`number`&&!E2(t.y)&&(n.y+=t.y))}else n.x+=this.options.wind.x,n.y+=this.options.wind.y}let r=this.physicsBody.velocities[e];return this.previousStates[e]={x:t.x,y:t.y,vx:r.x,vy:r.y},t.options.fixed.x===!1?(r.x=this.calculateComponentVelocity(r.x,n.x,t.options.mass),t.x+=r.x*this.timestep):(n.x=0,r.x=0),t.options.fixed.y===!1?(r.y=this.calculateComponentVelocity(r.y,n.y,t.options.mass),t.y+=r.y*this.timestep):(n.y=0,r.y=0),Math.sqrt(r.x**2+r.y**2)}_freezeNodes(){let e=this.body.nodes;for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){let n=e[t].options.fixed;this.freezeCache[t]={x:n.x,y:n.y},n.x=!0,n.y=!0}}_restoreFrozenNodes(){let e=this.body.nodes;for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.freezeCache[t]!==void 0&&(e[t].options.fixed.x=this.freezeCache[t].x,e[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}stabilize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof e!=`number`&&(e=this.options.stabilization.iterations,console.error(`The stabilize method needs a numeric amount of iterations. Switching to default: `,e)),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=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,BH(()=>this._stabilizationBatch(),0)}_startStabilizing(){return this.startedStabilization!==!0&&(this.body.emitter.emit(`startStabilizing`),this.startedStabilization=!0,!0)}_stabilizationBatch(){let e=()=>this.stabilized===!1&&this.stabilizationIterations<this.targetIterations,t=()=>{this.body.emitter.emit(`stabilizationProgress`,{iterations:this.stabilizationIterations,total:this.targetIterations})};this._startStabilizing()&&t();let n=0;for(;e()&&n<this.options.stabilization.updateInterval;)this.physicsTick(),n++;if(t(),e()){var r;BH(B(r=this._stabilizationBatch).call(r,this),0)}else this._finalizeStabilization()}_finalizeStabilization(){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}_drawForces(e){for(let t=0;t<this.physicsBody.physicsNodeIndices.length;t++){let n=this.physicsBody.physicsNodeIndices[t],r=this.body.nodes[n],i=this.physicsBody.forces[n],a=Math.sqrt(i.x**2+i.x**2),o=Math.min(Math.max(5,a),15),s=3*o,c=rK((180-Math.min(1,Math.max(0,.03*a))*180)/360,1,1),l={x:r.x+20*i.x,y:r.y+20*i.y};e.lineWidth=o,e.strokeStyle=c,e.beginPath(),e.moveTo(r.x,r.y),e.lineTo(l.x,l.y),e.stroke();let u=Math.atan2(i.y,i.x);e.fillStyle=c,FX.draw(e,{type:`arrow`,point:l,angle:u,length:s}),aU(e).call(e)}}},$2={},e4={},t4,n4;function r4(){if(n4)return t4;n4=1;var e=L(),t=wQ(),n=fQ().getWeakData,r=vQ(),i=qD(),a=oE(),o=hE(),s=hQ(),c=Ij(),l=mD(),u=Nj(),d=u.set,f=u.getterFor,p=c.find,m=c.findIndex,h=e([].splice),g=0,_=function(e){return e.frozen||=new v},v=function(){this.entries=[]},y=function(e,t){return p(e.entries,function(e){return e[0]===t})};return v.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var n=y(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=m(this.entries,function(t){return t[0]===e});return~t&&h(this.entries,t,1),!!~t}},t4={getConstructor:function(e,c,u,p){var m=e(function(e,t){r(e,h),d(e,{type:c,id:g++,frozen:null}),a(t)||s(t,e[p],{that:e,AS_ENTRIES:u})}),h=m.prototype,v=f(c),y=function(e,t,r){var a=v(e),o=n(i(t),!0);return o===!0?_(a).set(t,r):o[a.id]=r,e};return t(h,{delete:function(e){var t=v(this);if(!o(e))return!1;var r=n(e);return r===!0?_(t).delete(e):r&&l(r,t.id)&&delete r[t.id]},has:function(e){var t=v(this);if(!o(e))return!1;var r=n(e);return r===!0?_(t).has(e):r&&l(r,t.id)}}),t(h,u?{get:function(e){var t=v(this);if(o(e)){var r=n(e);if(r===!0)return _(t).get(e);if(r)return r[t.id]}},set:function(e,t){return y(this,e,t)}}:{add:function(e){return y(this,e,!0)}}),m}},t4}var i4;function a4(){if(i4)return e4;i4=1;var e=uQ(),t=ST(),n=L(),r=wQ(),i=fQ(),a=xQ(),o=r4(),s=hE(),c=Nj().enforce,l=I(),u=Aj(),d=Object,f=Array.isArray,p=d.isExtensible,m=d.isFrozen,h=d.isSealed,g=d.freeze,_=d.seal,v=!t.ActiveXObject&&`ActiveXObject`in t,y,b=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},x=a(`WeakMap`,b,o),S=x.prototype,C=n(S.set),w=function(){return e&&l(function(){var e=g([]);return C(new x,e,1),!m(e)})};if(u){if(v){y=o.getConstructor(b,`WeakMap`,!0),i.enable();var T=n(S.delete),E=n(S.has),D=n(S.get);r(S,{delete:function(e){if(s(e)&&!p(e)){var t=c(this);return t.frozen||=new y,T(this,e)||t.frozen.delete(e)}return T(this,e)},has:function(e){if(s(e)&&!p(e)){var t=c(this);return t.frozen||=new y,E(this,e)||t.frozen.has(e)}return E(this,e)},get:function(e){if(s(e)&&!p(e)){var t=c(this);return t.frozen||=new y,E(this,e)?D(this,e):t.frozen.get(e)}return D(this,e)},set:function(e,t){if(s(e)&&!p(e)){var n=c(this);n.frozen||=new y,E(this,e)?C(this,e,t):n.frozen.set(e,t)}else C(this,e,t);return this}})}else w()&&r(S,{set:function(e,t){var n;return f(e)&&(m(e)?n=g:h(e)&&(n=_)),C(this,e,t),n&&n(e),this}})}return e4}var o4;function s4(){return o4?$2:(o4=1,a4(),$2)}var c4={},l4,u4;function d4(){if(u4)return l4;u4=1;var e=bE(),t=RQ();return l4={WeakMap:e(`WeakMap`),set:t(`set`,2),get:t(`get`,1),has:t(`has`,1),remove:t(`delete`,1)},l4}var f4;function p4(){if(f4)return c4;f4=1;var e=z(),t=d4(),n=eD(),r=t.get,i=t.has,a=t.set;return e({target:`WeakMap`,proto:!0,real:!0,forced:n},{getOrInsert:function(e,t){return i(this,e)?r(this,e):(a(this,e,t),t)}}),c4}var m4={},h4,g4;function _4(){if(g4)return h4;g4=1;var e=VE(),t=TypeError;return h4=function(n){if(typeof n==`object`&&`has`in n&&`get`in n&&`set`in n&&`delete`in n)return n;throw new t(e(n)+` is not a weakmap`)},h4}var v4,y4;function b4(){if(y4)return v4;y4=1;var e=d4(),t=new e.WeakMap,n=e.set,r=e.remove;return v4=function(e){return n(t,e,1),r(t,e),e},v4}var x4;function S4(){if(x4)return m4;x4=1;var e=z(),t=WE(),n=_4(),r=b4(),i=d4(),a=eD(),o=i.get,s=i.has,c=i.set;return e({target:`WeakMap`,proto:!0,real:!0,forced:a||!function(){try{WeakMap.prototype.getOrInsertComputed&&new WeakMap().getOrInsertComputed(1,function(){throw 1})}catch(e){return e instanceof TypeError}}()},{getOrInsertComputed:function(e,i){if(a||n(this),r(e),t(i),s(this,e))return o(this,e);var l=i(e);return c(this,e,l),l}}),m4}var C4,w4;function T4(){return w4?C4:(w4=1,XN(),s4(),p4(),S4(),C4=R().WeakMap,C4)}var E4,D4;function O4(){if(D4)return E4;D4=1;var e=T4();return tP(),E4=e,E4}var k4,A4;function j4(){return A4?k4:(A4=1,k4=O4(),k4)}var M4=F(j4());function N4(e,t,n){P4(e,t),t.set(e,n)}function P4(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function F4(e,t,n){return e.set(I4(e,t),n),n}function J(e,t){return e.get(I4(e,t))}function I4(e,t,n){if(typeof e==`function`?e===t:e.has(t))return arguments.length<3?t:n;throw TypeError(`Private element is not present on this object`)}function L4(e,t){let n=new G1;for(let r of t)e.has(r)||n.add(r);return n}var R4=new M4,z4=new M4,B4=class{constructor(){N4(this,R4,new G1),N4(this,z4,new G1)}get size(){return J(z4,this).size}add(){var e=[...arguments];for(let t of e)J(z4,this).add(t)}delete(){var e=[...arguments];for(let t of e)J(z4,this).delete(t)}clear(){J(z4,this).clear()}getSelection(){return[...J(z4,this)]}getChanges(){return{added:[...L4(J(R4,this),J(z4,this))],deleted:[...L4(J(z4,this),J(R4,this))],previous:[...new G1(J(R4,this))],current:[...new G1(J(z4,this))]}}commit(){let e=this.getChanges();F4(R4,this,J(z4,this)),F4(z4,this,new G1(J(R4,this)));for(let t of e.added)t.select();for(let t of e.deleted)t.unselect();return e}},V4=new M4,H4=new M4,U4=new M4,W4=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:()=>{};N4(this,V4,new B4),N4(this,H4,new B4),N4(this,U4,void 0),F4(U4,this,e)}get sizeNodes(){return J(V4,this).size}get sizeEdges(){return J(H4,this).size}getNodes(){return J(V4,this).getSelection()}getEdges(){return J(H4,this).getSelection()}addNodes(){J(V4,this).add(...arguments)}addEdges(){J(H4,this).add(...arguments)}deleteNodes(e){J(V4,this).delete(e)}deleteEdges(e){J(H4,this).delete(e)}clear(){J(V4,this).clear(),J(H4,this).clear()}commit(){let e={nodes:J(V4,this).commit(),edges:J(H4,this).commit()};var t=[...arguments];return J(U4,this).call(this,e,...t),e}},G4=class{constructor(e,t){this.body=e,this.canvas=t,this._selectionAccumulator=new W4,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},JO(this.options,this.defaultOptions),this.body.emitter.on(`_dataChanged`,()=>{this.updateSelection()})}setOptions(e){e!==void 0&&GG([`multiselect`,`hoverConnectedEdges`,`selectable`,`selectConnectedEdges`],this.options,e)}selectOnPoint(e){let t=!1;if(this.options.selectable===!0){let n=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),n!==void 0&&(t=this.selectObject(n)),this.body.emitter.emit(`_requestRedraw`)}return t}selectAdditionalOnPoint(e){let t=!1;if(this.options.selectable===!0){let n=this.getNodeAt(e)||this.getEdgeAt(e);n!==void 0&&(t=!0,n.isSelected()===!0?this.deselectObject(n):this.selectObject(n),this.body.emitter.emit(`_requestRedraw`))}return t}_initBaseEvent(e,t){let n={};return n.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},n.event=e,n}generateClickEvent(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0&&arguments[4],a=this._initBaseEvent(t,n);if(i===!0)a.nodes=[],a.edges=[];else{let e=this.getSelection();a.nodes=e.nodes,a.edges=e.edges}r!==void 0&&(a.previousSelection=r),e==`click`&&(a.items=this.getClickedItems(n)),t.controlEdge!==void 0&&(a.controlEdge=t.controlEdge),this.body.emitter.emit(e,a)}selectObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;return e!==void 0&&(e instanceof YZ?(t===!0&&this._selectionAccumulator.addEdges(...e.edges),this._selectionAccumulator.addNodes(e)):this._selectionAccumulator.addEdges(e),!0)}deselectObject(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}_getAllNodesOverlappingWith(e){let t=[],n=this.body.nodes;for(let r=0;r<this.body.nodeIndices.length;r++){let i=this.body.nodeIndices[r];n[i].isOverlappingWith(e)&&t.push(i)}return t}_pointerToPositionObject(e){let t=this.canvas.DOMtoCanvas(e);return{left:t.x-1,top:t.y+1,right:t.x+1,bottom:t.y-1}}getNodeAt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this._pointerToPositionObject(e),r=this._getAllNodesOverlappingWith(n);if(r.length>0)return t===!0?this.body.nodes[r[r.length-1]]:r[r.length-1]}_getEdgesOverlappingWith(e,t){let n=this.body.edges;for(let r=0;r<this.body.edgeIndices.length;r++){let i=this.body.edgeIndices[r];n[i].isOverlappingWith(e)&&t.push(i)}}_getAllEdgesOverlappingWith(e){let t=[];return this._getEdgesOverlappingWith(e,t),t}getEdgeAt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this.canvas.DOMtoCanvas(e),r=10,i=null,a=this.body.edges;for(let e=0;e<this.body.edgeIndices.length;e++){let t=this.body.edgeIndices[e],o=a[t];if(o.connected){let e=o.from.x,a=o.from.y,s=o.to.x,c=o.to.y,l=o.edgeType.getDistanceToEdge(e,a,s,c,n.x,n.y);l<r&&(i=t,r=l)}}if(i!==null)return t===!0?this.body.edges[i]:i}_addToHover(e){e instanceof YZ?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}_removeFromSelection(e){e instanceof YZ?(this._selectionAccumulator.deleteNodes(e),this._selectionAccumulator.deleteEdges(...e.edges)):this._selectionAccumulator.deleteEdges(e)}unselectAll(){this._selectionAccumulator.clear()}getSelectedNodeCount(){return this._selectionAccumulator.sizeNodes}getSelectedEdgeCount(){return this._selectionAccumulator.sizeEdges}_hoverConnectedEdges(e){for(let t=0;t<e.edges.length;t++){let n=e.edges[t];n.hover=!0,this._addToHover(n)}}emitBlurEvent(e,t,n){let r=this._initBaseEvent(e,t);n.hover===!0&&(n.hover=!1,n instanceof YZ?(r.node=n.id,this.body.emitter.emit(`blurNode`,r)):(r.edge=n.id,this.body.emitter.emit(`blurEdge`,r)))}emitHoverEvent(e,t,n){let r=this._initBaseEvent(e,t),i=!1;return n.hover===!1&&(n.hover=!0,this._addToHover(n),i=!0,n instanceof YZ?(r.node=n.id,this.body.emitter.emit(`hoverNode`,r)):(r.edge=n.id,this.body.emitter.emit(`hoverEdge`,r))),i}hoverObject(e,t){let n=this.getNodeAt(t);n===void 0&&(n=this.getEdgeAt(t));let r=!1;for(let i in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,i)&&(n===void 0||n instanceof YZ&&n.id!=i||n instanceof fZ)&&(this.emitBlurEvent(e,t,this.hoverObj.nodes[i]),delete this.hoverObj.nodes[i],r=!0);for(let i in this.hoverObj.edges)Object.prototype.hasOwnProperty.call(this.hoverObj.edges,i)&&(r===!0?(this.hoverObj.edges[i].hover=!1,delete this.hoverObj.edges[i]):(n===void 0||n instanceof fZ&&n.id!=i||n instanceof YZ&&!n.hover)&&(this.emitBlurEvent(e,t,this.hoverObj.edges[i]),delete this.hoverObj.edges[i],r=!0));if(n!==void 0){let i=tR(this.hoverObj.edges).length,a=tR(this.hoverObj.nodes).length,o=n instanceof fZ&&i===0&&a===0,s=n instanceof YZ&&i===0&&a===0;(r||o||s)&&(r=this.emitHoverEvent(e,t,n)),n instanceof YZ&&this.options.hoverConnectedEdges===!0&&this._hoverConnectedEdges(n)}r===!0&&this.body.emitter.emit(`_requestRedraw`)}commitWithoutEmitting(){this._selectionAccumulator.commit()}commitAndEmit(e,t){let n=!1,r=this._selectionAccumulator.commit(),i={nodes:r.nodes.previous,edges:r.edges.previous};r.edges.deleted.length>0&&(this.generateClickEvent(`deselectEdge`,t,e,i),n=!0),r.nodes.deleted.length>0&&(this.generateClickEvent(`deselectNode`,t,e,i),n=!0),r.nodes.added.length>0&&(this.generateClickEvent(`selectNode`,t,e),n=!0),r.edges.added.length>0&&(this.generateClickEvent(`selectEdge`,t,e),n=!0),n===!0&&this.generateClickEvent(`select`,t,e)}getSelection(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}getSelectedNodes(){return this._selectionAccumulator.getNodes()}getSelectedEdges(){return this._selectionAccumulator.getEdges()}getSelectedNodeIds(){var e;return HL(e=this._selectionAccumulator.getNodes()).call(e,e=>e.id)}getSelectedEdgeIds(){var e;return HL(e=this._selectionAccumulator.getEdges()).call(e,e=>e.id)}setSelection(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw TypeError(`Selection must be an object with nodes and/or edges properties`);if((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes)for(let n of e.nodes){let e=this.body.nodes[n];if(!e)throw RangeError(`Node with id "`+n+`" not found`);this.selectObject(e,t.highlightEdges)}if(e.edges)for(let t of e.edges){let e=this.body.edges[t];if(!e)throw RangeError(`Edge with id "`+t+`" not found`);this.selectObject(e)}this.body.emitter.emit(`_requestRedraw`),this._selectionAccumulator.commit()}selectNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw`Selection must be an array with ids`;this.setSelection({nodes:e},{highlightEdges:t})}selectEdges(e){if(!e||e.length===void 0)throw`Selection must be an array with ids`;this.setSelection({edges:e})}updateSelection(){for(let e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(let e in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,e.id)||this._selectionAccumulator.deleteEdges(e)}getClickedItems(e){let t=this.canvas.DOMtoCanvas(e),n=[],r=this.body.nodeIndices,i=this.body.nodes;for(let e=r.length-1;e>=0;e--){let a=i[r[e]].getItemsOnPoint(t);n.push.apply(n,a)}let a=this.body.edgeIndices,o=this.body.edges;for(let e=a.length-1;e>=0;e--){let r=o[a[e]].getItemsOnPoint(t);n.push.apply(n,r)}return n}};function K4(e,t){let n=JO({nodes:t,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},e??{});if(!EL(n.nodes))throw TypeError(`Nodes has to be an array of ids.`);if(n.nodes.length===0&&(n.nodes=t),!(typeof n.minZoomLevel==`number`&&n.minZoomLevel>0))throw TypeError(`Min zoom level has to be a number higher than zero.`);if(!(typeof n.maxZoomLevel==`number`&&n.minZoomLevel<=n.maxZoomLevel))throw TypeError(`Max zoom level has to be a number higher than min zoom level.`);return n}var q4=class{constructor(e,t){var n,r;this.body=e,this.canvas=t,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`,B(n=this.fit).call(n,this)),this.body.emitter.on(`animationFinished`,()=>{this.body.emitter.emit(`_stopRendering`)}),this.body.emitter.on(`unlockNode`,B(r=this.releaseNode).call(r,this))}setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}fit(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];e=K4(e,this.body.nodeIndices);let n=this.canvas.frame.canvas.clientWidth,r=this.canvas.frame.canvas.clientHeight,i,a;if(n===0||r===0)a=1,i=Eq.getRange(this.body.nodes,e.nodes);else if(t===!0){let t=0;for(let e in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&this.body.nodes[e].predefinedPosition===!0&&(t+=1);if(t>.5*this.body.nodeIndices.length){this.fit(e,!1);return}i=Eq.getRange(this.body.nodes,e.nodes),a=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;let o=Math.min(n/600,r/600);a*=o}else{this.body.emitter.emit(`_resizeNodes`),i=Eq.getRange(this.body.nodes,e.nodes);let t=Math.abs(i.maxX-i.minX)*1.1,o=Math.abs(i.maxY-i.minY)*1.1,s=n/t,c=r/o;a=s<=c?s:c}a>e.maxZoomLevel?a=e.maxZoomLevel:a<e.minZoomLevel&&(a=e.minZoomLevel);let o={position:Eq.findCenter(i),scale:a,animation:e.animation};this.moveTo(o)}focus(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.body.nodes[e]===void 0?console.error(`Node: `+e+` cannot be found.`):(t.position={x:this.body.nodes[e].x,y:this.body.nodes[e].y},t.lockedOnNode=e,this.moveTo(t))}moveTo(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!iJ(e.offset.x))throw 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,!iJ(e.offset.y))throw 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,!iJ(e.position.x))throw 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,!iJ(e.position.y))throw 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 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)}animateView(e){if(e===void 0)return;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;let t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:t.x-e.position.x,y:t.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 r;this.viewFunction=B(r=this._lockedRedraw).call(r,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 i;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=B(i=this._transitionRedraw).call(i,this),this.body.emitter.on(`initRedraw`,this.viewFunction),this.body.emitter.emit(`_startRendering`)}}_lockedRedraw(){let e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:t.x-e.x,y:t.y-e.y},r=this.body.view.translation,i={x:r.x+n.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:r.y+n.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=i}releaseNode(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off(`initRedraw`,this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}_transitionRedraw(){let e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;let t=uK[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*t,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*t,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*t},this.easingTime>=1){if(this.body.emitter.off(`initRedraw`,this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var n;this.viewFunction=B(n=this._lockedRedraw).call(n,this),this.body.emitter.on(`initRedraw`,this.viewFunction)}this.body.emitter.emit(`animationFinished`)}}getScale(){return this.body.view.scale}getViewPosition(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}},Y=`string`,X=`boolean`,Z=`number`,J4=`array`,Q=`object`,Y4=`dom`,X4=`any`,Z4=[`arrow`,`bar`,`box`,`circle`,`crow`,`curve`,`diamond`,`image`,`inv_curve`,`inv_triangle`,`triangle`,`vee`],Q4={borderWidth:{number:Z},borderWidthSelected:{number:Z,undefined:`undefined`},brokenImage:{string:Y,undefined:`undefined`},chosen:{label:{boolean:X,function:`function`},node:{boolean:X,function:`function`},__type__:{object:Q,boolean:X}},color:{border:{string:Y},background:{string:Y},highlight:{border:{string:Y},background:{string:Y},__type__:{object:Q,string:Y}},hover:{border:{string:Y},background:{string:Y},__type__:{object:Q,string:Y}},__type__:{object:Q,string:Y}},opacity:{number:Z,undefined:`undefined`},fixed:{x:{boolean:X},y:{boolean:X},__type__:{object:Q,boolean:X}},font:{align:{string:Y},color:{string:Y},size:{number:Z},face:{string:Y},background:{string:Y},strokeWidth:{number:Z},strokeColor:{string:Y},vadjust:{number:Z},multi:{boolean:X,string:Y},bold:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},boldital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},ital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},mono:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},__type__:{object:Q,string:Y}},group:{string:Y,number:Z,undefined:`undefined`},heightConstraint:{minimum:{number:Z},valign:{string:Y},__type__:{object:Q,boolean:X,number:Z}},hidden:{boolean:X},icon:{face:{string:Y},code:{string:Y},size:{number:Z},color:{string:Y},weight:{string:Y,number:Z},__type__:{object:Q}},id:{string:Y,number:Z},image:{selected:{string:Y,undefined:`undefined`},unselected:{string:Y,undefined:`undefined`},__type__:{object:Q,string:Y}},imagePadding:{top:{number:Z},right:{number:Z},bottom:{number:Z},left:{number:Z},__type__:{object:Q,number:Z}},label:{string:Y,undefined:`undefined`},labelHighlightBold:{boolean:X},level:{number:Z,undefined:`undefined`},margin:{top:{number:Z},right:{number:Z},bottom:{number:Z},left:{number:Z},__type__:{object:Q,number:Z}},mass:{number:Z},physics:{boolean:X},scaling:{min:{number:Z},max:{number:Z},label:{enabled:{boolean:X},min:{number:Z},max:{number:Z},maxVisible:{number:Z},drawThreshold:{number:Z},__type__:{object:Q,boolean:X}},customScalingFunction:{function:`function`},__type__:{object:Q}},shadow:{enabled:{boolean:X},color:{string:Y},size:{number:Z},x:{number:Z},y:{number:Z},__type__:{object:Q,boolean:X}},shape:{string:[`custom`,`ellipse`,`circle`,`database`,`box`,`text`,`image`,`circularImage`,`diamond`,`dot`,`star`,`triangle`,`triangleDown`,`square`,`icon`,`hexagon`]},ctxRenderer:{function:`function`},shapeProperties:{borderDashes:{boolean:X,array:J4},borderRadius:{number:Z},interpolation:{boolean:X},useImageSize:{boolean:X},useBorderWithImage:{boolean:X},coordinateOrigin:{string:[`center`,`top-left`]},__type__:{object:Q}},size:{number:Z},title:{string:Y,dom:Y4,undefined:`undefined`},value:{number:Z,undefined:`undefined`},widthConstraint:{minimum:{number:Z},maximum:{number:Z},__type__:{object:Q,boolean:X,number:Z}},x:{number:Z},y:{number:Z},__type__:{object:Q}},$4={configure:{enabled:{boolean:X},filter:{boolean:X,string:Y,array:J4,function:`function`},container:{dom:Y4},showButton:{boolean:X},__type__:{object:Q,boolean:X,string:Y,array:J4,function:`function`}},edges:{arrows:{to:{enabled:{boolean:X},scaleFactor:{number:Z},type:{string:Z4},imageHeight:{number:Z},imageWidth:{number:Z},src:{string:Y},__type__:{object:Q,boolean:X}},middle:{enabled:{boolean:X},scaleFactor:{number:Z},type:{string:Z4},imageWidth:{number:Z},imageHeight:{number:Z},src:{string:Y},__type__:{object:Q,boolean:X}},from:{enabled:{boolean:X},scaleFactor:{number:Z},type:{string:Z4},imageWidth:{number:Z},imageHeight:{number:Z},src:{string:Y},__type__:{object:Q,boolean:X}},__type__:{string:[`from`,`to`,`middle`],object:Q}},endPointOffset:{from:{number:Z},to:{number:Z},__type__:{object:Q,number:Z}},arrowStrikethrough:{boolean:X},background:{enabled:{boolean:X},color:{string:Y},size:{number:Z},dashes:{boolean:X,array:J4},__type__:{object:Q,boolean:X}},chosen:{label:{boolean:X,function:`function`},edge:{boolean:X,function:`function`},__type__:{object:Q,boolean:X}},color:{color:{string:Y},highlight:{string:Y},hover:{string:Y},inherit:{string:[`from`,`to`,`both`],boolean:X},opacity:{number:Z},__type__:{object:Q,string:Y}},dashes:{boolean:X,array:J4},font:{color:{string:Y},size:{number:Z},face:{string:Y},background:{string:Y},strokeWidth:{number:Z},strokeColor:{string:Y},align:{string:[`horizontal`,`top`,`middle`,`bottom`]},vadjust:{number:Z},multi:{boolean:X,string:Y},bold:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},boldital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},ital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},mono:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},__type__:{object:Q,string:Y}},hidden:{boolean:X},hoverWidth:{function:`function`,number:Z},label:{string:Y,undefined:`undefined`},labelHighlightBold:{boolean:X},length:{number:Z,undefined:`undefined`},physics:{boolean:X},scaling:{min:{number:Z},max:{number:Z},label:{enabled:{boolean:X},min:{number:Z},max:{number:Z},maxVisible:{number:Z},drawThreshold:{number:Z},__type__:{object:Q,boolean:X}},customScalingFunction:{function:`function`},__type__:{object:Q}},selectionWidth:{function:`function`,number:Z},selfReferenceSize:{number:Z},selfReference:{size:{number:Z},angle:{number:Z},renderBehindTheNode:{boolean:X},__type__:{object:Q}},shadow:{enabled:{boolean:X},color:{string:Y},size:{number:Z},x:{number:Z},y:{number:Z},__type__:{object:Q,boolean:X}},smooth:{enabled:{boolean:X},type:{string:[`dynamic`,`continuous`,`discrete`,`diagonalCross`,`straightCross`,`horizontal`,`vertical`,`curvedCW`,`curvedCCW`,`cubicBezier`]},roundness:{number:Z},forceDirection:{string:[`horizontal`,`vertical`,`none`],boolean:X},__type__:{object:Q,boolean:X}},title:{string:Y,undefined:`undefined`},width:{number:Z},widthConstraint:{maximum:{number:Z},__type__:{object:Q,boolean:X,number:Z}},value:{number:Z,undefined:`undefined`},__type__:{object:Q}},groups:{useDefaultGroups:{boolean:X},__any__:Q4,__type__:{object:Q}},interaction:{dragNodes:{boolean:X},dragView:{boolean:X},hideEdgesOnDrag:{boolean:X},hideEdgesOnZoom:{boolean:X},hideNodesOnDrag:{boolean:X},hover:{boolean:X},keyboard:{enabled:{boolean:X},speed:{x:{number:Z},y:{number:Z},zoom:{number:Z},__type__:{object:Q}},bindToWindow:{boolean:X},autoFocus:{boolean:X},__type__:{object:Q,boolean:X}},multiselect:{boolean:X},navigationButtons:{boolean:X},selectable:{boolean:X},selectConnectedEdges:{boolean:X},hoverConnectedEdges:{boolean:X},tooltipDelay:{number:Z},zoomView:{boolean:X},zoomSpeed:{number:Z},__type__:{object:Q}},layout:{randomSeed:{undefined:`undefined`,number:Z,string:Y},improvedLayout:{boolean:X},clusterThreshold:{number:Z},hierarchical:{enabled:{boolean:X},levelSeparation:{number:Z},nodeSpacing:{number:Z},treeSpacing:{number:Z},blockShifting:{boolean:X},edgeMinimization:{boolean:X},parentCentralization:{boolean:X},direction:{string:[`UD`,`DU`,`LR`,`RL`]},sortMethod:{string:[`hubsize`,`directed`]},shakeTowards:{string:[`leaves`,`roots`]},__type__:{object:Q,boolean:X}},__type__:{object:Q}},manipulation:{enabled:{boolean:X},initiallyActive:{boolean:X},addNode:{boolean:X,function:`function`},addEdge:{boolean:X,function:`function`},editNode:{function:`function`},editEdge:{editWithoutDrag:{function:`function`},__type__:{object:Q,boolean:X,function:`function`}},deleteNode:{boolean:X,function:`function`},deleteEdge:{boolean:X,function:`function`},controlNodeStyle:Q4,__type__:{object:Q,boolean:X}},nodes:Q4,physics:{enabled:{boolean:X},barnesHut:{theta:{number:Z},gravitationalConstant:{number:Z},centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},damping:{number:Z},avoidOverlap:{number:Z},__type__:{object:Q}},forceAtlas2Based:{theta:{number:Z},gravitationalConstant:{number:Z},centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},damping:{number:Z},avoidOverlap:{number:Z},__type__:{object:Q}},repulsion:{centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},nodeDistance:{number:Z},damping:{number:Z},__type__:{object:Q}},hierarchicalRepulsion:{centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},nodeDistance:{number:Z},damping:{number:Z},avoidOverlap:{number:Z},__type__:{object:Q}},maxVelocity:{number:Z},minVelocity:{number:Z},solver:{string:[`barnesHut`,`repulsion`,`hierarchicalRepulsion`,`forceAtlas2Based`]},stabilization:{enabled:{boolean:X},iterations:{number:Z},updateInterval:{number:Z},onlyDynamicEdges:{boolean:X},fit:{boolean:X},__type__:{object:Q,boolean:X}},timestep:{number:Z},adaptiveTimestep:{boolean:X},wind:{x:{number:Z},y:{number:Z},__type__:{object:Q,function:`function`}},__type__:{object:Q,boolean:X}},autoResize:{boolean:X},clickToUse:{boolean:X},locale:{string:Y},locales:{__any__:{any:X4},__type__:{object:Q}},height:{string:Y},width:{string:Y},__type__:{object:Q}},e3={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]}}},t3=(e,t,n)=>{var r,i;return!!(qz(e).call(e,`physics`)&&qz(r=e3.physics.solver).call(r,t)&&n.physics.solver!==t&&t!==`wind`||qz(e).call(e,`physics`)&&qz(e).call(e,`wind`)&&(t===`x`||t===`y`)&&typeof(n==null||(i=n.physics)==null?void 0:i.wind)==`function`)};function $(e,t,n){var r,i,a,o;if(!(this instanceof $))throw SyntaxError(`Constructor must be called with the new operator`);this.options={},this.defaultOptions={locale:`en`,locales:cq,clickToUse:!1},JO(this.options,this.defaultOptions),this.body={container:e,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:B(r=this.on).call(r,this),off:B(i=this.off).call(i,this),emit:B(a=this.emit).call(a,this),once:B(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 oq(()=>this.body.emitter.emit(`_requestRedraw`)),this.groups=new o$,this.canvas=new vq(this.body),this.selectionHandler=new G4(this.body,this.canvas),this.interactionHandler=new l$(this.body,this.canvas,this.selectionHandler),this.view=new q4(this.body,this.canvas),this.renderer=new yq(this.body,this.canvas),this.physics=new Q2(this.body),this.layoutEngine=new f2(this.body),this.clustering=new ZZ(this.body),this.manipulation=new p2(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new U2(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new QZ(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new d$(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(n),this.setData(t)}Fk($.prototype),$.prototype.setOptions=function(e){if(e===null&&(e=void 0),e!==void 0){if(EK.validate(e,$4)===!0&&console.error(`%cErrors have been found in the supplied options object.`,TK),GG([`locale`,`locales`,`clickToUse`],this.options,e),e.locale!==void 0&&(e.locale=sq(e.locales||this.options.locales,e.locale)),e=this.layoutEngine.setOptions(e.layout,e),this.canvas.setOptions(e),this.groups.setOptions(e.groups),this.nodesHandler.setOptions(e.nodes),this.edgesHandler.setOptions(e.edges),this.physics.setOptions(e.physics),this.manipulation.setOptions(e.manipulation,e,this.options),this.interactionHandler.setOptions(e.interaction),this.renderer.setOptions(e.interaction),this.selectionHandler.setOptions(e.interaction),e.groups!==void 0&&this.body.emitter.emit(`refreshNodes`),`configure`in e&&(this.configurator||=new SK(this,this.body.container,e3,this.canvas.pixelRatio,t3),this.configurator.setOptions(e.configure)),this.configurator&&this.configurator.options.enabled===!0){let e={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};U(e.nodes,this.nodesHandler.options),U(e.edges,this.edgesHandler.options),U(e.layout,this.layoutEngine.options),U(e.interaction,this.selectionHandler.options),U(e.interaction,this.renderer.options),U(e.interaction,this.interactionHandler.options),U(e.manipulation,this.manipulation.options),U(e.physics,this.physics.options),U(e.global,this.canvas.options),U(e.global,this.options),this.configurator.setModuleOptions(e)}e.clickToUse===void 0?this.body.emitter.emit(`activate`):e.clickToUse===!0?this.activator===void 0&&(this.activator=new xK(this.canvas.frame),this.activator.on(`change`,()=>{this.body.emitter.emit(`activate`)})):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit(`activate`)),this.canvas.setSize(),this.body.emitter.emit(`startSimulation`)}},$.prototype._updateVisibleIndices=function(){let e=this.body.nodes,t=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&!this.clustering._isClusteredNode(t)&&e[t].options.hidden===!1&&this.body.nodeIndices.push(e[t].id);for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)){let r=t[n],i=e[r.fromId],a=e[r.toId],o=i!==void 0&&a!==void 0;!this.clustering._isClusteredEdge(n)&&r.options.hidden===!1&&o&&i.options.hidden===!1&&a.options.hidden===!1&&this.body.edgeIndices.push(r.id)}},$.prototype.bindEventListeners=function(){this.body.emitter.on(`_dataChanged`,()=>{this.edgesHandler._updateState(),this.body.emitter.emit(`_dataUpdated`)}),this.body.emitter.on(`_dataUpdated`,()=>{this.clustering._updateState(),this._updateVisibleIndices(),this._updateValueRange(this.body.nodes),this._updateValueRange(this.body.edges),this.body.emitter.emit(`startSimulation`),this.body.emitter.emit(`_requestRedraw`)})},$.prototype.setData=function(e){if(this.body.emitter.emit(`resetPhysics`),this.body.emitter.emit(`_resetData`),this.selectionHandler.unselectAll(),e&&e.dot&&(e.nodes||e.edges))throw SyntaxError(`Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.`);if(this.setOptions(e&&e.options),e&&e.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);`);let t=nq(e.dot);this.setData(t);return}if(e&&e.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);`);let t=iq(e.gephi);this.setData(t);return}this.nodesHandler.setData(e&&e.nodes,!0),this.edgesHandler.setData(e&&e.edges,!0),this.body.emitter.emit(`_dataChanged`),this.body.emitter.emit(`_dataLoaded`),this.body.emitter.emit(`initPhysics`)},$.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(let e in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&delete this.body.nodes[e];for(let e in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,e)&&delete this.body.edges[e];BG(this.body.container)},$.prototype._updateValueRange=function(e){let t,n,r,i=0;for(t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let a=e[t].getValue();a!==void 0&&(n=n===void 0?a:Math.min(a,n),r=r===void 0?a:Math.max(a,r),i+=a)}if(n!==void 0&&r!==void 0)for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&e[t].setValueRange(n,r,i)},$.prototype.isActive=function(){return!this.activator||this.activator.active},$.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)},$.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)},$.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)},$.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)},$.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)},$.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)},$.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)},$.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)},$.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)},$.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)},$.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)},$.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)},$.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)},$.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)},$.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)},$.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)},$.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)},$.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)},$.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)},$.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)},$.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)},$.prototype.editNodeMode=function(){return console.warn(`Deprecated: Please use editNode instead of editNodeMode.`),this.manipulation.editNode.apply(this.manipulation,arguments)},$.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)},$.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)},$.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)},$.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)},$.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)},$.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)},$.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)},$.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)},$.prototype.getConnectedNodes=function(e){return this.body.nodes[e]===void 0?this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments):this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments)},$.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)},$.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)},$.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)},$.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)},$.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)},$.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)},$.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)},$.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)},$.prototype.getNodeAt=function(){let e=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return e!==void 0&&e.id!==void 0?e.id:e},$.prototype.getEdgeAt=function(){let e=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return e!==void 0&&e.id!==void 0?e.id:e},$.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)},$.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)},$.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()},$.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)},$.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)},$.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)},$.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)},$.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)},$.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)},$.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)},$.prototype.getOptionsFromConfigurator=function(){let e={};return this.configurator&&(e=this.configurator.getOptions.apply(this.configurator)),e};export{hT as n,$ as t};