@nuxt/devtools-assets-nightly 0.0.0 → 4.0.0-29884683.7500671

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 (99) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +167 -0
  3. package/dist/200.html +1 -0
  4. package/dist/404.html +1 -0
  5. package/dist/_nuxt/__blank-ddcrmv5c.js +1 -0
  6. package/dist/_nuxt/_plugin-vue_export-helper-d9irwgla.js +1 -0
  7. package/dist/_nuxt/analyze-build-edjuvmen.js +1 -0
  8. package/dist/_nuxt/browser-agent-rpc-bxho-sh1z-n8pic0el.js +1 -0
  9. package/dist/_nuxt/builds/latest.json +1 -0
  10. package/dist/_nuxt/builds/meta/da713f8f-797b-476f-aed0-624f1b06308a.json +1 -0
  11. package/dist/_nuxt/client-o12wrvuh.js +1 -0
  12. package/dist/_nuxt/code-diff-cllxmlzn.js +8 -0
  13. package/dist/_nuxt/color-abaog8vc.js +1 -0
  14. package/dist/_nuxt/components-f7ufmv52.js +1 -0
  15. package/dist/_nuxt/composable-item-cvm5bou5.js +1 -0
  16. package/dist/_nuxt/constants-g2z8m4rs.js +1 -0
  17. package/dist/_nuxt/custom-_name_-jnj2332q.js +1 -0
  18. package/dist/_nuxt/data-schema-button-jfup3jkm.js +1 -0
  19. package/dist/_nuxt/data-schema-drawer-n72nmdnb.js +2 -0
  20. package/dist/_nuxt/debug-fvh49mb4.js +1 -0
  21. package/dist/_nuxt/default-mrcqn5mn.js +1 -0
  22. package/dist/_nuxt/dist-das2ggjj.js +1 -0
  23. package/dist/_nuxt/duration-display-cbezy2qj.js +1 -0
  24. package/dist/_nuxt/entry.css-dsrtaear.css +1 -0
  25. package/dist/_nuxt/error-404-b0qmyum0.js +1 -0
  26. package/dist/_nuxt/error-404.css-i3smqrpa.css +1 -0
  27. package/dist/_nuxt/error-500-oyzlyaxz.js +1 -0
  28. package/dist/_nuxt/error-500.css-gwm3hrat.css +1 -0
  29. package/dist/_nuxt/error-pa9d2x0l.js +9 -0
  30. package/dist/_nuxt/filepath-item-le1tf1cv.js +1 -0
  31. package/dist/_nuxt/full-lbk4rf9i.js +1 -0
  32. package/dist/_nuxt/help-fab-oevh6fu6.js +1 -0
  33. package/dist/_nuxt/help-fab.css-ms50khsu.css +1 -0
  34. package/dist/_nuxt/hooks-oh6bepvu.js +1 -0
  35. package/dist/_nuxt/imports-fv5wpxqj.js +1 -0
  36. package/dist/_nuxt/j8rt5j1z.js +4 -0
  37. package/dist/_nuxt/launch-page-edghmj3u.js +1 -0
  38. package/dist/_nuxt/modules-g5v4acwy.js +1 -0
  39. package/dist/_nuxt/nanoid-kujw2c73.js +1 -0
  40. package/dist/_nuxt/nbadge-qxiqdejh.js +1 -0
  41. package/dist/_nuxt/ncard-f5hsx5qg.js +1 -0
  42. package/dist/_nuxt/ncheckbox-b1g9gqr9.js +1 -0
  43. package/dist/_nuxt/ncode-block-emvsl3dj.js +2 -0
  44. package/dist/_nuxt/ncode-block.css-ivoxtfjk.css +1 -0
  45. package/dist/_nuxt/ndrawer-nv0fovj4.js +1 -0
  46. package/dist/_nuxt/ndropdown-ewq47ntq.js +1 -0
  47. package/dist/_nuxt/nicon-fggc28m9.js +6 -0
  48. package/dist/_nuxt/nicon-title-b4ony5s9.js +1 -0
  49. package/dist/_nuxt/nlink-oopuo8yw.js +1 -0
  50. package/dist/_nuxt/nmarkdown-l6kyrv69.js +1 -0
  51. package/dist/_nuxt/nnavbar-g4ablrbq.js +1 -0
  52. package/dist/_nuxt/none-ouu1dkb1.js +1 -0
  53. package/dist/_nuxt/npanel-grids-dgypja2z.js +1 -0
  54. package/dist/_nuxt/nsection-block-ih9c04mv.js +1 -0
  55. package/dist/_nuxt/nsection-block.css-h1lgpwgm.css +1 -0
  56. package/dist/_nuxt/nselect-nt99qamb.js +1 -0
  57. package/dist/_nuxt/nselect-tabs-l7v6qhzj.js +1 -0
  58. package/dist/_nuxt/nsplit-pane-lw36ud7g.js +1 -0
  59. package/dist/_nuxt/nsplit-pane.css-ejck9ujc.css +1 -0
  60. package/dist/_nuxt/ntip-ipazo7j4.js +1 -0
  61. package/dist/_nuxt/nuxt-fe4hkk1m.js +1 -0
  62. package/dist/_nuxt/nuxt-link-f8q70nfj.js +1 -0
  63. package/dist/_nuxt/overview-dxaulee7.js +1 -0
  64. package/dist/_nuxt/pages-go7p532k.js +1 -0
  65. package/dist/_nuxt/pages-klmhfhaa.js +1 -0
  66. package/dist/_nuxt/pages-oclxpiil.js +1 -0
  67. package/dist/_nuxt/payload-jber3hxj.js +1 -0
  68. package/dist/_nuxt/plugins-ou9d1371.js +1 -0
  69. package/dist/_nuxt/ready-h577ja1k.js +2 -0
  70. package/dist/_nuxt/rolldown-runtime-d720z368.js +1 -0
  71. package/dist/_nuxt/runtime-configs-npir0ikd.js +1 -0
  72. package/dist/_nuxt/server-route-inputs-gzwem3vc.js +1 -0
  73. package/dist/_nuxt/server-routes-buhxzhd5.js +7 -0
  74. package/dist/_nuxt/server-tasks-k907dhjs.js +1 -0
  75. package/dist/_nuxt/settings-bu1qwwml.js +1 -0
  76. package/dist/_nuxt/stacktrace-list-gpqt5gfq.js +1 -0
  77. package/dist/_nuxt/state-components-b7c7h92g.js +1 -0
  78. package/dist/_nuxt/state-editor-hkt21uqu.js +1 -0
  79. package/dist/_nuxt/state-modules-ba62gs9q.js +1 -0
  80. package/dist/_nuxt/state-tabs-fm7jexwd.js +1 -0
  81. package/dist/_nuxt/storage-f0w2ii3w.js +1 -0
  82. package/dist/_nuxt/timeline-ob2yog6u.js +31 -0
  83. package/dist/_nuxt/timeline.css-m03aec2q.css +1 -0
  84. package/dist/_nuxt/utils-hyqnohx4.js +1 -0
  85. package/dist/_nuxt/vendor/json-editor-vue-e51gef8e.js +3862 -0
  86. package/dist/_nuxt/vendor/json-editor-vue.css-lb1ewor6.css +1 -0
  87. package/dist/_nuxt/vendor/markdown-exit-kxhrfg06.js +12 -0
  88. package/dist/_nuxt/vendor/quicktype-core-ldbgqon5.js +927 -0
  89. package/dist/_nuxt/vendor/shiki-eep5l02u.js +152 -0
  90. package/dist/_nuxt/vendor/unocss-hu24292r.js +1 -0
  91. package/dist/_nuxt/vendor/unocss.css-ekbl8926.css +1 -0
  92. package/dist/_nuxt/vendor/vis-bybujgcl.js +29 -0
  93. package/dist/_nuxt/virtual-files-hd731ygc.js +1 -0
  94. package/dist/_nuxt/virtual-files.css-l97kh4kx.css +1 -0
  95. package/dist/_nuxt/virtual_nuxt_node_modules_.cache_nuxt_.nuxt_fetch.client-higuz0yc.js +1 -0
  96. package/dist/index.html +1 -0
  97. package/dist/manifest.json +999 -0
  98. package/dist/nuxt.svg +3 -0
  99. package/package.json +20 -2
@@ -0,0 +1,29 @@
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,r;function i(){return r||(r=1,n=function(e){try{return!!e()}catch{return!0}}),n}var a,o;function s(){return o||(o=1,a=!i()(function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})),a}var c,l;function u(){if(l)return c;l=1;var e=s(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return c=e?r:function(e){return function(){return n.apply(e,arguments)}},c}var d,f;function p(){return f||(f=1,d=u()({}.isPrototypeOf)),d}var m={},h,g;function _(){if(g)return h;g=1;var t=function(e){return e&&e.Math===Math&&e};return h=t(typeof globalThis==`object`&&globalThis)||t(typeof window==`object`&&window)||t(typeof self==`object`&&self)||t(typeof e==`object`&&e)||t(typeof h==`object`&&h)||(function(){return this})()||Function(`return this`)(),h}var v,y;function b(){if(y)return v;y=1;var e=s(),t=Function.prototype,n=t.apply,r=t.call;return v=typeof Reflect==`object`&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),v}var x,S;function C(){if(S)return x;S=1;var e=u(),t=e({}.toString),n=e(``.slice);return x=function(e){return n(t(e),8,-1)},x}var w,T;function E(){if(T)return w;T=1;var e=C(),t=u();return w=function(n){if(e(n)===`Function`)return t(n)},w}var D,ee;function O(){if(ee)return D;ee=1;var e=typeof document==`object`&&document.all;return D=e===void 0&&e!==void 0?function(t){return typeof t==`function`||t===e}:function(e){return typeof e==`function`},D}var k={},A,j;function te(){return j||(j=1,A=!i()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})),A}var ne,re;function M(){if(re)return ne;re=1;var e=s(),t=Function.prototype.call;return ne=e?t.bind(t):function(){return t.apply(t,arguments)},ne}var N={},ie;function ae(){if(ie)return N;ie=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor;return N.f=t&&!e.call({1:2},1)?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,N}var oe,se;function ce(){return se||(se=1,oe=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),oe}var le,ue;function de(){if(ue)return le;ue=1;var e=u(),t=i(),n=C(),r=Object,a=e(``.split);return le=t(function(){return!r(`z`).propertyIsEnumerable(0)})?function(e){return n(e)===`String`?a(e,``):r(e)}:r,le}var fe,pe;function me(){return pe||(pe=1,fe=function(e){return e==null}),fe}var he,ge;function _e(){if(ge)return he;ge=1;var e=me(),t=TypeError;return he=function(n){if(e(n))throw new t(`Can't call method on `+n);return n},he}var ve,ye;function be(){if(ye)return ve;ye=1;var e=de(),t=_e();return ve=function(n){return e(t(n))},ve}var xe,Se;function Ce(){if(Se)return xe;Se=1;var e=O();return xe=function(t){return typeof t==`object`?t!==null:e(t)},xe}var we,Te;function Ee(){return Te||(Te=1,we={}),we}var De,Oe;function ke(){if(Oe)return De;Oe=1;var e=Ee(),t=_(),n=O(),r=function(e){return n(e)?e:void 0};return De=function(n,i){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][i]||t[n]&&t[n][i]},De}var Ae,je;function Me(){if(je)return Ae;je=1;var e=_().navigator,t=e&&e.userAgent;return Ae=t?String(t):``,Ae}var Ne,Pe;function Fe(){if(Pe)return Ne;Pe=1;var e=_(),t=Me(),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]))),Ne=s,Ne}var Ie,Le;function Re(){if(Le)return Ie;Le=1;var e=Fe(),t=i(),n=_().String;return Ie=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol(`symbol detection`);return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Ie}var ze,Be;function Ve(){return Be||(Be=1,ze=Re()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`),ze}var He,Ue;function We(){if(Ue)return He;Ue=1;var e=ke(),t=O(),n=p(),r=Ve(),i=Object;return He=r?function(e){return typeof e==`symbol`}:function(r){var a=e(`Symbol`);return t(a)&&n(a.prototype,i(r))},He}var Ge,Ke;function qe(){if(Ke)return Ge;Ke=1;var e=String;return Ge=function(t){try{return e(t)}catch{return`Object`}},Ge}var Je,Ye;function Xe(){if(Ye)return Je;Ye=1;var e=O(),t=qe(),n=TypeError;return Je=function(r){if(e(r))return r;throw new n(t(r)+` is not a function`)},Je}var Ze,Qe;function $e(){if(Qe)return Ze;Qe=1;var e=Xe(),t=me();return Ze=function(n,r){var i=n[r];return t(i)?void 0:e(i)},Ze}var et,tt;function nt(){if(tt)return et;tt=1;var e=M(),t=O(),n=Ce(),r=TypeError;return et=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`)},et}var rt={exports:{}},it,at;function ot(){return at||(at=1,it=!0),it}var st,ct;function lt(){if(ct)return st;ct=1;var e=_(),t=Object.defineProperty;return st=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch{e[n]=r}return r},st}var ut;function dt(){if(ut)return rt.exports;ut=1;var e=ot(),t=_(),n=lt(),r=`__core-js_shared__`,i=rt.exports=t[r]||n(r,{});return(i.versions||=[]).push({version:`3.50.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.50.0/LICENSE`,source:`https://github.com/zloirock/core-js`}),rt.exports}var ft,pt;function mt(){if(pt)return ft;pt=1;var e=dt(),t=Object.create||Object;return ft=function(n,r){return e[n]||(e[n]=r||t(null))},ft}var ht,gt;function _t(){if(gt)return ht;gt=1;var e=_e(),t=Object;return ht=function(n){return t(e(n))},ht}var vt,yt;function bt(){if(yt)return vt;yt=1;var e=u(),t=_t(),n=e({}.hasOwnProperty);return vt=Object.hasOwn||function(e,r){return n(t(e),r)},vt}var xt,St;function Ct(){if(St)return xt;St=1;var e=u(),t=0,n=Math.random(),r=e(1.1.toString);return xt=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+r(++t+n,36)},xt}var wt,Tt;function Et(){if(Tt)return wt;Tt=1;var e=_(),t=mt(),n=bt(),r=Ct(),i=Re(),a=Ve(),o=e.Symbol,s=t(`wks`),c=a?o.for||o:o&&o.withoutSetter||r;return wt=function(e){return n(s,e)||(s[e]=i&&n(o,e)?o[e]:c(`Symbol.`+e)),s[e]},wt}var Dt,Ot;function kt(){if(Ot)return Dt;Ot=1;var e=M(),t=Ce(),n=We(),r=$e(),i=nt(),a=Et(),o=TypeError,s=a(`toPrimitive`);return Dt=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)},Dt}var At,jt;function Mt(){if(jt)return At;jt=1;var e=kt(),t=We();return At=function(n){var r=e(n,`string`);return t(r)?r:r+``},At}var Nt,Pt;function Ft(){if(Pt)return Nt;Pt=1;var e=_(),t=Ce(),n=e.document,r=t(n)&&t(n.createElement);return Nt=function(e){return r?n.createElement(e):{}},Nt}var It,Lt;function Rt(){if(Lt)return It;Lt=1;var e=te(),t=i(),n=Ft();return It=!e&&!t(function(){return Object.defineProperty(n(`div`),"a",{get:function(){return 7}}).a!==7}),It}var zt;function Bt(){if(zt)return k;zt=1;var e=te(),t=M(),n=ae(),r=ce(),i=be(),a=Mt(),o=bt(),s=Rt(),c=Object.getOwnPropertyDescriptor;return k.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])},k}var Vt,Ht;function Ut(){if(Ht)return Vt;Ht=1;var e=i(),t=O(),n=/#|\.prototype\./,r=function(n,r){var i=o[a(n)];return i===c?!0:i===s?!1:t(r)?e(r):!!r},a=r.normalize=function(e){return String(e).replace(n,`.`).toLowerCase()},o=r.data={},s=r.NATIVE=`N`,c=r.POLYFILL=`P`;return Vt=r,Vt}var Wt,Gt;function Kt(){if(Gt)return Wt;Gt=1;var e=E(),t=Xe(),n=s(),r=e(e.bind);return Wt=function(e,i){return t(e),i===void 0?e:n?r(e,i):function(){return e.apply(i,arguments)}},Wt}var qt={},Jt,Yt;function Xt(){return Yt||(Yt=1,Jt=te()&&i()(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})),Jt}var Zt,Qt;function $t(){if(Qt)return Zt;Qt=1;var e=Ce(),t=String,n=TypeError;return Zt=function(r){if(e(r))return r;throw new n(t(r)+` is not an object`)},Zt}var en;function tn(){if(en)return qt;en=1;var e=te(),t=Rt(),n=Xt(),r=$t(),i=Mt(),a=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=`enumerable`,l=`configurable`,u=`writable`;return qt.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},qt}var nn,rn;function an(){if(rn)return nn;rn=1;var e=te(),t=tn(),n=ce();return nn=e?function(e,r,i){return t.f(e,r,n(1,i))}:function(e,t,n){return e[t]=n,e},nn}var on,sn;function P(){if(sn)return on;sn=1;var e=_(),t=b(),n=E(),r=O(),i=Bt().f,a=Ut(),o=Ee(),s=Kt(),c=an(),l=bt(),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 on=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)))},on}var cn,ln;function un(){return ln||(ln=1,cn=u()([].slice)),cn}var dn,fn;function pn(){if(fn)return dn;fn=1;var e=u(),t=Xe(),n=Ce(),r=bt(),i=un(),a=s(),o=Function,c=e([].concat),l=e([].join),d={},f=function(e,t,n){if(!r(d,t)){for(var i=[],a=0;a<t;a++)i[a]=`a[`+a+`]`;d[t]=o(`C,a`,`return new C(`+l(i,`,`)+`)`)}return d[t](e,n)};return dn=a?o.bind:function(e){var r=t(this),a=r.prototype,o=i(arguments,1),s=function(){var t=c(o,i(arguments));return this instanceof s?f(r,t.length,t):r.apply(e,t)};return n(a)&&(s.prototype=a),s},dn}var mn;function hn(){if(mn)return m;mn=1;var e=P(),t=pn();return e({target:`Function`,proto:!0,forced:Function.bind!==t},{bind:t}),m}var gn,_n;function vn(){if(_n)return gn;_n=1;var e=_(),t=Ee();return gn=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]},gn}var yn,bn;function xn(){return bn||(bn=1,hn(),yn=vn()(`Function`,`bind`)),yn}var Sn,Cn;function wn(){if(Cn)return Sn;Cn=1;var e=p(),t=xn(),n=Function.prototype;return Sn=function(r){var i=r.bind;return r===n||e(n,r)&&i===n.bind?t:i},Sn}var Tn,En;function Dn(){return En||(En=1,Tn=wn()),Tn}var On,kn;function An(){return kn||(kn=1,On=Dn()),On}var jn=t(An()),Mn={},Nn,Pn;function Fn(){if(Pn)return Nn;Pn=1;var e=Math.ceil,t=Math.floor;return Nn=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Nn}var In,Ln;function Rn(){if(Ln)return In;Ln=1;var e=Fn();return In=function(t){var n=+t;return n!==n||n===0?0:e(n)},In}var zn,Bn;function Vn(){if(Bn)return zn;Bn=1;var e=Rn(),t=Math.min;return zn=function(n){var r=e(n);return r>0?t(r,9007199254740991):0},zn}var Hn,Un;function Wn(){if(Un)return Hn;Un=1;var e=Vn();return Hn=function(t){return e(t.length)},Hn}var Gn,Kn;function qn(){if(Kn)return Gn;Kn=1;var e=Xe(),t=_t(),n=de(),r=Wn(),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 Gn={left:o(!1),right:o(!0)},Gn}var Jn,Yn;function Xn(){if(Yn)return Jn;Yn=1;var e=i();return Jn=function(t,n){var r=[][t];return!!r&&e(function(){r.call(null,n||function(){return 1},1)})},Jn}var Zn,Qn;function $n(){if(Qn)return Zn;Qn=1;var e=_(),t=Me(),n=C(),r=function(e){return t.slice(0,e.length)===e};return Zn=(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`})(),Zn}var er,tr;function nr(){return tr||(tr=1,er=$n()===`NODE`),er}var rr;function ir(){if(rr)return Mn;rr=1;var e=P(),t=qn().left,n=Xn(),r=Fe();return e({target:`Array`,proto:!0,forced:!nr()&&r>79&&r<83||!n(`reduce`)},{reduce:function(e){var n=arguments.length;return t(this,e,n,n>1?arguments[1]:void 0)}}),Mn}var ar,or;function sr(){return or||(or=1,ir(),ar=vn()(`Array`,`reduce`)),ar}var cr,lr;function ur(){if(lr)return cr;lr=1;var e=p(),t=sr(),n=Array.prototype;return cr=function(r){var i=r.reduce;return r===n||e(n,r)&&i===n.reduce?t:i},cr}var dr,fr;function pr(){return fr||(fr=1,dr=ur()),dr}var mr,hr;function gr(){return hr||(hr=1,mr=pr()),mr}var _r=t(gr()),vr={},yr,br;function xr(){if(br)return yr;br=1;var e=C();return yr=Array.isArray||function(t){return e(t)===`Array`},yr}var Sr,Cr;function wr(){if(Cr)return Sr;Cr=1;var e=Et()(`toStringTag`),t={};return t[e]=`z`,Sr=String(t)===`[object z]`,Sr}var Tr,Er;function Dr(){if(Er)return Tr;Er=1;var e=wr(),t=O(),n=C(),r=Et()(`toStringTag`),i=Object,a=n(function(){return arguments}())===`Arguments`,o=function(e,t){try{return e[t]}catch{}};return Tr=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},Tr}var Or,kr;function Ar(){if(kr)return Or;kr=1;var e=u(),t=O(),n=dt(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),Or=n.inspectSource,Or}var jr,Mr;function Nr(){if(Mr)return jr;Mr=1;var e=u(),t=i(),n=O(),r=Dr(),a=ke(),o=Ar(),s=function(){},c=a(`Reflect`,`construct`),l=/^\s*(?:class|function)\b/,d=e(l.exec),f=!l.test(s),p=function(e){if(!n(e))return!1;try{return c(s,[],e),!0}catch{return!1}},m=function(e){if(!n(e))return!1;switch(r(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return f||!!d(l,o(e))}catch{return!0}};return m.sham=!0,jr=!c||t(function(){var e;return p(p.call)||!p(Object)||!p(function(){e=!0})||e})?m:p,jr}var Pr,Fr;function Ir(){if(Fr)return Pr;Fr=1;var e=xr(),t=Nr(),n=Ce(),r=Et()(`species`),i=Array;return Pr=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},Pr}var Lr,Rr;function zr(){if(Rr)return Lr;Rr=1;var e=Ir();return Lr=function(t,n){return new(e(t))(n===0?0:n)},Lr}var Br,Vr;function Hr(){if(Vr)return Br;Vr=1;var e=te(),t=tn(),n=ce();return Br=function(r,i,a){e?t.f(r,i,n(0,a)):r[i]=a},Br}var Ur,Wr;function Gr(){if(Wr)return Ur;Wr=1;var e=Kt(),t=de(),n=_t(),r=Wn(),i=zr(),a=Hr(),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 Ur={forEach:o(0),map:o(1),filter:o(2),some:o(3),every:o(4),find:o(5),findIndex:o(6),filterReject:o(7)},Ur}var Kr,qr;function Jr(){if(qr)return Kr;qr=1;var e=i(),t=Et(),n=Fe(),r=t(`species`);return Kr=function(t){return n>=51||!e(function(){var e=[],n=e.constructor={};return n[r]=function(){return{foo:1}},e[t](Boolean).foo!==1})},Kr}var Yr;function Xr(){if(Yr)return vr;Yr=1;var e=P(),t=Gr().filter;return e({target:`Array`,proto:!0,forced:!Jr()(`filter`)},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),vr}var Zr,Qr;function $r(){return Qr||(Qr=1,Xr(),Zr=vn()(`Array`,`filter`)),Zr}var ei,ti;function ni(){if(ti)return ei;ti=1;var e=p(),t=$r(),n=Array.prototype;return ei=function(r){var i=r.filter;return r===n||e(n,r)&&i===n.filter?t:i},ei}var ri,ii;function ai(){return ii||(ii=1,ri=ni()),ri}var oi,si;function ci(){return si||(si=1,oi=ai()),oi}var li=t(ci()),ui={},di;function fi(){if(di)return ui;di=1;var e=P(),t=Gr().map;return e({target:`Array`,proto:!0,forced:!Jr()(`map`)},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),ui}var pi,mi;function hi(){return mi||(mi=1,fi(),pi=vn()(`Array`,`map`)),pi}var gi,_i;function vi(){if(_i)return gi;_i=1;var e=p(),t=hi(),n=Array.prototype;return gi=function(r){var i=r.map;return r===n||e(n,r)&&i===n.map?t:i},gi}var yi,bi;function xi(){return bi||(bi=1,yi=vi()),yi}var Si,Ci;function wi(){return Ci||(Ci=1,Si=xi()),Si}var Ti=t(wi()),Ei={},Di,Oi;function ki(){if(Oi)return Di;Oi=1;var e=TypeError,t=9007199254740991;return Di=function(n){if(n>t)throw new e(`Maximum allowed index exceeded`);return n},Di}var Ai,ji;function Mi(){if(ji)return Ai;ji=1;var e=xr(),t=Wn(),n=ki(),r=Kt(),i=Hr(),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 Ai=a,Ai}var Ni;function Pi(){if(Ni)return Ei;Ni=1;var e=P(),t=Mi(),n=Xe(),r=_t(),i=Wn(),a=zr();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}}),Ei}var Fi={},Ii,Li;function Ri(){return Li||(Li=1,Ii=function(){}),Ii}var zi;function Bi(){return zi||(zi=1,Ri()(`flatMap`)),Fi}var Vi,Hi;function Ui(){return Hi||(Hi=1,Pi(),Bi(),Vi=vn()(`Array`,`flatMap`)),Vi}var Wi,Gi;function Ki(){if(Gi)return Wi;Gi=1;var e=p(),t=Ui(),n=Array.prototype;return Wi=function(r){var i=r.flatMap;return r===n||e(n,r)&&i===n.flatMap?t:i},Wi}var qi,Ji;function Yi(){return Ji||(Ji=1,qi=Ki()),qi}var Xi,Zi;function Qi(){return Zi||(Zi=1,Xi=Yi()),Xi}Qi();var $i={},ea,ta;function na(){if(ta)return ea;ta=1;var e=te(),t=xr(),n=TypeError,r=Object.getOwnPropertyDescriptor;return ea=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},ea}var ra;function ia(){if(ra)return $i;ra=1;var e=P(),t=i(),n=xr(),r=Ce(),a=_t(),o=Wn(),s=ki(),c=Hr(),l=na(),u=zr(),d=Jr(),f=Et(),p=Fe(),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){for(var t=a(this),n=u(t,0),r=0,i=-1,d,f=arguments.length,p,m;i<f;i++)if(m=i===-1?t:arguments[i],g(m))for(p=o(m),s(r+p),d=0;d<p;d++,r++)d in m&&c(n,r,m[d]);else s(r+1),c(n,r++,m);return l(n,r),n}}),$i}var aa={},oa={},sa,ca;function la(){if(ca)return sa;ca=1;var e=Dr(),t=String;return sa=function(n){if(e(n)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return t(n)},sa}var ua={},da,fa;function pa(){if(fa)return da;fa=1;var e=Rn(),t=Math.max,n=Math.min;return da=function(r,i){var a=e(r);return a<0?t(a+i,0):n(a,i)},da}var ma,ha;function ga(){if(ha)return ma;ha=1;var e=be(),t=pa(),n=Wn(),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 ma={includes:r(!0),indexOf:r(!1)},ma}var _a,va;function ya(){return va||(va=1,_a={}),_a}var ba,xa;function Sa(){if(xa)return ba;xa=1;var e=u(),t=bt(),n=be(),r=ga().indexOf,i=ya(),a=e([].push);return ba=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},ba}var Ca,wa;function Ta(){return wa||(wa=1,Ca=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`]),Ca}var Ea,Da;function Oa(){if(Da)return Ea;Da=1;var e=Sa(),t=Ta();return Ea=Object.keys||function(n){return e(n,t)},Ea}var ka;function Aa(){if(ka)return ua;ka=1;var e=te(),t=Xt(),n=tn(),r=$t(),i=be(),a=Oa();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 ja,Ma;function Na(){return Ma||(Ma=1,ja=ke()(`document`,`documentElement`)),ja}var Pa,Fa;function Ia(){if(Fa)return Pa;Fa=1;var e=mt(),t=Ct(),n=e(`keys`);return Pa=function(e){return n[e]||(n[e]=t(e))},Pa}var La,Ra;function za(){if(Ra)return La;Ra=1;var e=$t(),t=Aa(),n=Ta(),r=ya(),i=Na(),a=Ft(),o=Ia(),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,La=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)},La}var Ba={},Va;function Ha(){if(Va)return Ba;Va=1;var e=Sa(),t=Ta().concat(`length`,`prototype`);return Ba.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Ba}var Ua={},Wa;function Ga(){if(Wa)return Ua;Wa=1;var e=C(),t=be(),n=Ha().f,r=un(),i=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return n(e)}catch{return r(i)}};return Ua.f=function(r){return i&&e(r)===`Window`?a(r):n(t(r))},Ua}var Ka={},qa;function Ja(){return qa||(qa=1,Ka.f=Object.getOwnPropertySymbols),Ka}var Ya,Xa;function Za(){if(Xa)return Ya;Xa=1;var e=an();return Ya=function(t,n,r,i){return i&&i.enumerable?t[n]=r:e(t,n,r),t},Ya}var Qa,$a;function eo(){if($a)return Qa;$a=1;var e=tn();return Qa=function(t,n,r){return e.f(t,n,r)},Qa}var to={},no;function ro(){return no||(no=1,to.f=Et()),to}var io,ao;function oo(){if(ao)return io;ao=1;var e=Ee(),t=bt(),n=ro(),r=tn().f;return io=function(i){var a=e.Symbol||={};t(a,i)||r(a,i,{value:n.f(i)})},io}var so,co;function lo(){if(co)return so;co=1;var e=M(),t=ke(),n=Et(),r=Za();return so=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})},so}var uo,fo;function po(){if(fo)return uo;fo=1;var e=wr(),t=Dr();return uo=e?{}.toString:function(){return`[object `+t(this)+`]`},uo}var mo,ho;function go(){if(ho)return mo;ho=1;var e=wr(),t=tn().f,n=an(),r=bt(),i=po(),a=Et()(`toStringTag`);return mo=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))},mo}var _o,vo;function yo(){if(vo)return _o;vo=1;var e=_(),t=O(),n=e.WeakMap;return _o=t(n)&&/native code/.test(String(n)),_o}var bo,xo;function So(){if(xo)return bo;xo=1;var e=yo(),t=_(),n=Ce(),r=an(),i=bt(),a=dt(),o=Ia(),s=ya(),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 v=o(`state`);s[v]=!0,d=function(e,t){if(i(e,v))throw new l(c);return t.facade=e,r(e,v,t),t},f=function(e){return i(e,v)?e[v]:{}},p=function(e){return i(e,v)}}return bo={set:d,get:f,has:p,enforce:m,getterFor:h},bo}var Co;function wo(){if(Co)return oa;Co=1;var e=P(),t=_(),n=M(),r=u(),a=ot(),o=te(),s=Re(),c=i(),l=bt(),d=p(),f=$t(),m=be(),h=Mt(),g=la(),v=ce(),y=za(),b=Oa(),x=Ha(),S=Ga(),C=Ja(),w=Bt(),T=tn(),E=Aa(),D=ae(),ee=Za(),O=eo(),k=mt(),A=Ia(),j=ya(),ne=Ct(),re=Et(),N=ro(),ie=oo(),oe=lo(),se=go(),le=So(),ue=Gr().forEach,de=A(`hidden`),fe=`Symbol`,pe=`prototype`,me=le.set,he=le.getterFor(fe),ge=Object[pe],_e=t.Symbol,ve=_e&&_e[pe],ye=t.RangeError,xe=t.TypeError,Se=t.QObject,Ce=w.f,we=T.f,Te=S.f,Ee=D.f,De=r([].push),Oe=k(`symbols`),ke=k(`op-symbols`),Ae=k(`wks`),je=!Se||!Se[pe]||!Se[pe].findChild,Me=function(e,t,n){var r=Ce(ge,t);return r&&delete ge[t],we(e,t,n),r&&e!==ge&&we(ge,t,r),e},Ne=o&&c(function(){return y(we({},`a`,{get:function(){return we(this,`a`,{value:7}).a}})).a!==7})?Me:we,Pe=function(e,t){var n=Oe[e]=y(ve);return me(n,{type:fe,tag:e,description:t}),o||(n.description=t),n},Fe=function(e,t,n){e===ge&&Fe(ke,t,n),f(e);var r=h(t);return f(n),l(Oe,r)?((`enumerable`in n?!n.enumerable:!l(e,r)||l(e,de)&&e[de][r])?(l(e,de)||we(e,de,v(1,y(null))),e[de][r]=!0):(l(e,de)&&e[de][r]&&(e[de][r]=!1),n=y(n,{enumerable:v(0,!1)})),Ne(e,r,n)):we(e,r,n)},Ie=function(e,t){f(e);var r=m(t);return ue(b(r).concat(He(r)),function(t){(!o||n(ze,r,t))&&Fe(e,t,r[t])}),e},Le=function(e,t){return t===void 0?y(e):Ie(y(e),t)},ze=function(e){var t=h(e),r=n(Ee,this,t);return this===ge&&l(Oe,t)&&!l(ke,t)?!1:r||!l(this,t)||!l(Oe,t)||l(this,de)&&this[de][t]?r:!0},Be=function(e,t){var n=m(e),r=h(t);if(n!==ge||!l(Oe,r)||l(ke,r)){var i=Ce(n,r);return i&&l(Oe,r)&&!(l(n,de)&&n[de][r])&&(i.enumerable=!0),i}},Ve=function(e){var t=Te(m(e)),n=[];return ue(t,function(e){!l(Oe,e)&&!l(j,e)&&De(n,e)}),n},He=function(e){var t=e===ge,n=Te(t?ke:m(e)),r=[];return ue(n,function(e){l(Oe,e)&&(!t||l(ge,e))&&De(r,Oe[e])}),r};return s||(_e=function(){if(d(ve,this))throw new xe(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:g(arguments[0]),r=ne(e),i=function(e){var a=this===void 0?t:this;a===ge&&n(i,ke,e),l(a,de)&&l(a[de],r)&&(a[de][r]=!1);var o=v(1,e);try{Ne(a,r,o)}catch(e){if(!(e instanceof ye))throw e;Me(a,r,o)}};return o&&je&&Ne(ge,r,{configurable:!0,set:i}),Pe(r,e)},ve=_e[pe],ee(ve,`toString`,function(){return he(this).tag}),ee(_e,`withoutSetter`,function(e){return Pe(ne(e),e)}),D.f=ze,T.f=Fe,E.f=Ie,w.f=Be,x.f=S.f=Ve,C.f=He,N.f=function(e){return Pe(re(e),e)},o&&(O(ve,`description`,{configurable:!0,get:function(){return he(this).description}}),a||ee(ge,`propertyIsEnumerable`,ze,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!s,sham:!s},{Symbol:_e}),ue(b(Ae),function(e){ie(e)}),e({target:fe,stat:!0,forced:!s},{useSetter:function(){je=!0},useSimple:function(){je=!1}}),e({target:`Object`,stat:!0,forced:!s,sham:!o},{create:Le,defineProperty:Fe,defineProperties:Ie,getOwnPropertyDescriptor:Be}),e({target:`Object`,stat:!0,forced:!s},{getOwnPropertyNames:Ve}),oe(),se(_e,fe),j[de]=!0,oa}var To={},Eo,Do;function Oo(){return Do||(Do=1,Eo=Re()&&!!Symbol.for&&!!Symbol.keyFor),Eo}var ko;function Ao(){if(ko)return To;ko=1;var e=P(),t=ke(),n=bt(),r=la(),i=mt(),a=Oo(),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}}),To}var jo={},Mo;function No(){if(Mo)return jo;Mo=1;var e=P(),t=bt(),n=We(),r=qe(),i=mt(),a=Oo(),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]}}),jo}var Po={},Fo,Io;function Lo(){if(Io)return Fo;Io=1;var e=Ce(),t=So().get;return Fo=function(n){if(!e(n))return!1;var r=t(n);return!!r&&r.type===`RawJSON`},Fo}var Ro,zo;function Bo(){return zo||(zo=1,Ro=u()(1.1.valueOf)),Ro}var Vo,Ho;function Uo(){if(Ho)return Vo;Ho=1;var e=u(),t=bt(),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,d=/^[\u0000-\u001F]$/;return Vo=function(e,u){for(var f=!0,p=``;u<e.length;){var m=a(e,u);if(m===`\\`){var h=o(e,u,u+2);if(t(c,h))p+=c[h],u+=2;else if(h===`\\u`){u+=2;var g=o(e,u,u+4);if(!s(l,g))throw new n(`Bad Unicode escape at: `+u);p+=i(r(g,16)),u+=4}else throw new n(`Unknown escape sequence: "`+h+`"`)}else if(m===`"`){f=!1,u++;break}else{if(s(d,m))throw new n(`Bad control character in string literal at: `+u);p+=m,u++}}if(f)throw new n(`Unterminated string at: `+u);return{value:p,end:u}},Vo}var Wo,Go;function Ko(){return Go||(Go=1,Wo=!i()(function(){var e=`9007199254740993`,t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e})),Wo}var qo;function Jo(){if(qo)return Po;qo=1;var e=P(),t=ke(),n=M(),r=u(),a=i(),o=xr(),s=O(),c=Ce(),l=za(),d=Lo(),f=We(),p=C(),m=Bo(),h=ga().includes,g=bt(),_=la(),v=Uo(),y=Ct(),b=Re(),x=Ko(),S=String,w=TypeError,T=t(`JSON`,`stringify`),E=t(`BigInt`),D=r(``.valueOf),ee=r((!0).valueOf),k=E&&r(E.prototype.valueOf),A=r(/./.exec),j=r(``.charAt),te=r(``.charCodeAt),ne=r(``.replace),re=r(``.slice),N=r([].push),ie=r([].pop),ae=r(1.1.toString),oe=/[\uD800-\uDFFF]/g,se=/^[\uD800-\uDBFF]$/,ce=/^[\uDC00-\uDFFF]$/,le=/^\d+$/,ue=y(),de=y(),fe=y(),pe=ue.length,me=de.length,he=!b||a(function(){var e=t(`Symbol`)(`stringify detection`);return T([e])!==`[null]`||T({a:e})!==`{}`||T(Object(e))!==`{}`}),ge=a(function(){return T(`\udf06\ud834`)!==`"\\udf06\\ud834"`||T(`\udead`)!==`"\\udead"`}),_e=x?t(`JSON`,`isRawJSON`):d,ve=he?function(e,t,r){return T(e,function(e,r){var i=n(t,this,e,r);if(!f(i))return i},r)}:T,ye=function(e,t,n){var r=j(n,t-1),i=j(n,t+1);return A(se,e)&&!A(ce,i)||A(ce,e)&&!A(se,r)?`\\u`+ae(te(e,0),16):e},be=function(e){if(o(e)){for(var t=e.length,n=[],r=l(null),i=0;i<t;i++){var a=e[i],s;if(typeof a==`string`)s=a;else if(typeof a==`number`||p(a)===`Number`||p(a)===`String`)s=_(a);else continue;g(r,s)||(r[s]=!0,N(n,s))}return n}},xe=function(e,t){try{return e(t),!0}catch{return!1}},Se=function(e){var t=p(e);return t===`Number`&&xe(m,e)||t===`String`&&xe(D,e)||t===`Boolean`&&xe(ee,e)||!!k&&t===`BigInt`&&xe(k,e)},we=function(e){if(!c(e)||s(e)||o(e))return!1;try{return!Se(e)}catch{return!0}},Te=function(e,t){return{toJSON:function(){var r=e[t];if(c(r)||typeof r==`bigint`){var i=r.toJSON;s(i)&&(r=n(i,r,t))}return r}}},Ee=function(e){for(var t=0,n=e.length;t<n;t++)if(A(le,e[t]))return de;return``},De=function(e,t,n){for(var r=l(null),i=0,a=t.length;i<a;i++){var o=t[i];r[n+o]=Te(e,o)}return r[fe]=null,r};return T&&e({target:`JSON`,stat:!0,arity:3,forced:he||ge||!x},{stringify:function(e,t,r){var i=s(t)?t:void 0,a=i?void 0:be(t),c=a&&Ee(a),l=[],u=[],d=[],f,p=!1,m=!0,g=ve(e,function(e,t){if(e=S(e),a){if(e===fe){ie(u),f=ie(d);return}if(m)m=!1;else if(this!==f&&!o(this)&&!h(a,e))return}else i&&(t=n(i,this,e,t));if(_e(t))return x?t:(p=!0,ue+(N(l,t.rawJSON)-1));if(a&&we(t)){if(h(u,t))throw new w(`Converting circular structure to JSON`);var r=De(t,a,c);return N(u,t),N(d,f),f=r,c&&(p=!0),r}return t},r);if(typeof g!=`string`||(ge&&(g=ne(g,oe,ye)),!p))return g;for(var _=``,y=g.length,b=0;b<y;b++){var C=j(g,b);if(C===`"`){var T=v(g,++b).end-1,E=re(g,b,T);re(E,0,pe)===ue?_+=l[re(E,pe)]:re(E,0,me)===de?_+=`"`+re(E,me)+`"`:_+=`"`+E+`"`,b=T}else _+=C}return _}}),Po}var Yo={},Xo;function Zo(){if(Xo)return Yo;Xo=1;var e=P(),t=Re(),n=i(),r=Ja(),a=_t();return e({target:`Object`,stat:!0,forced:!t||n(function(){r.f(1)})},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(a(e)):[]}}),Yo}var Qo;function $o(){return Qo||(Qo=1,wo(),Ao(),No(),Jo(),Zo()),aa}var es={},ts;function ns(){return ts||(ts=1,oo()(`asyncDispose`)),es}var rs={},is;function as(){return is||(is=1,oo()(`asyncIterator`)),rs}var os={},ss;function cs(){return ss||(ss=1,oo()(`dispose`)),os}var ls={},us;function ds(){return us||(us=1,oo()(`hasInstance`)),ls}var fs={},ps;function ms(){return ps||(ps=1,oo()(`isConcatSpreadable`)),fs}var hs={},gs;function _s(){return gs||(gs=1,oo()(`iterator`)),hs}var vs={},ys;function bs(){return ys||(ys=1,oo()(`match`)),vs}var xs={},Ss;function Cs(){return Ss||(Ss=1,oo()(`matchAll`)),xs}var ws={},Ts;function Es(){return Ts||(Ts=1,oo()(`replace`)),ws}var Ds={},Os;function ks(){return Os||(Os=1,oo()(`search`)),Ds}var As={},js;function Ms(){return js||(js=1,oo()(`species`)),As}var Ns={},Ps;function Fs(){return Ps||(Ps=1,oo()(`split`)),Ns}var Is={},Ls;function Rs(){if(Ls)return Is;Ls=1;var e=oo(),t=lo();return e(`toPrimitive`),t(),Is}var zs={},Bs;function Vs(){if(Bs)return zs;Bs=1;var e=ke(),t=oo(),n=go();return t(`toStringTag`),n(e(`Symbol`),`Symbol`),zs}var Hs={},Us;function Ws(){return Us||(Us=1,oo()(`unscopables`)),Hs}var Gs={},Ks;function qs(){return Ks||(Ks=1,go()(_().JSON,`JSON`,!0)),Gs}var Js,Ys;function Xs(){return Ys||(Ys=1,ia(),$o(),ns(),as(),cs(),ds(),ms(),_s(),bs(),Cs(),Es(),ks(),Ms(),Fs(),Rs(),Vs(),Ws(),qs(),Js=Ee().Symbol),Js}var Zs={},Qs,$s;function ec(){return $s||($s=1,Qs=Object.create?Object.create(null):{}),Qs}var tc,nc;function rc(){if(nc)return tc;nc=1;var e=te(),t=bt(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,i=t(n,`name`);return tc={EXISTS:i,PROPER:i&&function(){}.name===`something`,CONFIGURABLE:i&&(!e||e&&r(n,`name`).configurable)},tc}var ic,ac;function oc(){return ac||(ac=1,ic=!i()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ic}var sc,cc;function lc(){if(cc)return sc;cc=1;var e=bt(),t=O(),n=_t(),r=Ia(),i=oc(),a=r(`IE_PROTO`),o=Object,s=o.prototype;return sc=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},sc}var uc,dc;function fc(){if(dc)return uc;dc=1;var e=i(),t=O(),n=Ce(),r=za(),a=lc(),o=Za(),s=Et(),c=ot(),l=s(`iterator`),u=!1,d,f,p;return[].keys&&(p=[].keys(),`next`in p?(f=a(a(p)),f!==Object.prototype&&(d=f)):u=!0),!n(d)||e(function(){var e={};return d[l].call(e)!==e})?d={}:c&&(d=r(d)),t(d[l])||o(d,l,function(){return this}),uc={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:u},uc}var pc,mc;function hc(){if(mc)return pc;mc=1;var e=fc().IteratorPrototype,t=za(),n=ce(),r=go(),i=ec(),a=function(){return this};return pc=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},pc}var gc,_c;function vc(){if(_c)return gc;_c=1;var e=u(),t=Xe();return gc=function(n,r,i){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[i]))}catch{}},gc}var yc,bc;function xc(){if(bc)return yc;bc=1;var e=Ce();return yc=function(t){return e(t)||t===null},yc}var Sc,Cc;function wc(){if(Cc)return Sc;Cc=1;var e=xc(),t=String,n=TypeError;return Sc=function(r){if(e(r))return r;throw new n(`Can't set `+t(r)+` as a prototype`)},Sc}var Tc,Ec;function Dc(){if(Ec)return Tc;Ec=1;var e=vc(),t=Ce(),n=_e(),r=wc();return Tc=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),Tc}var Oc,kc;function Ac(){if(kc)return Oc;kc=1;var e=P(),t=M(),n=ot(),r=rc(),i=O(),a=hc(),o=lc(),s=Dc(),c=go(),l=an(),u=Za(),d=Et(),f=ec(),p=fc(),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 Oc=function(r,d,p,C,w,T,E){a(p,d,C);var D=function(e){if(e===w&&j)return j;if(!_&&e&&e in k)return k[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`,O=!1,k=r.prototype,A=k[v]||k[`@@iterator`]||w&&k[w],j=!_&&A||D(w),te=d===`Array`&&k.entries||A,ne,re,M;if(te&&(ne=o(te.call(new r)),ne!==Object.prototype&&ne.next&&(!n&&o(ne)!==g&&(s?s(ne,g):i(ne[v])||u(ne,v,S)),c(ne,ee,!0,!0),n&&(f[ee]=S))),m&&w===b&&A&&A.name!==b&&(!n&&h?l(k,`name`,b):(O=!0,j=function(){return t(A,this)})),w){if(re={values:D(b),keys:T?j:D(y),entries:D(x)},E)for(M in re)(_||O||!(M in k))&&u(k,M,re[M]);else e({target:d,proto:!0,forced:_||O},re)}return(!n||E)&&k[v]!==j&&u(k,v,j,{name:w}),f[d]=j,re},Oc}var jc,Mc;function Nc(){return Mc||(Mc=1,jc=function(e,t){return{value:e,done:t}}),jc}var Pc,Fc;function Ic(){if(Fc)return Pc;Fc=1;var e=be(),t=Ri(),n=ec(),r=So(),i=tn().f,a=Ac(),o=Nc(),s=ot(),c=te(),l=`Array Iterator`,u=r.set,d=r.getterFor(l);Pc=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 Pc}var Lc,Rc;function zc(){return Rc||(Rc=1,Lc={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}),Lc}var Bc;function Vc(){if(Bc)return Zs;Bc=1,Ic();var e=zc(),t=_(),n=go(),r=ec();for(var i in e)n(t[i],i),r[i]=r.Array;return Zs}var Hc,Uc;function Wc(){if(Uc)return Hc;Uc=1;var e=Xs();return Vc(),Hc=e,Hc}var Gc,Kc;function qc(){return Kc||(Kc=1,Gc=Wc()),Gc}var Jc=t(qc()),Yc={},Xc;function Zc(){if(Xc)return Yc;Xc=1;var e=P(),t=xr(),n=Nr(),r=Ce(),i=pa(),a=Wn(),o=be(),s=Hr(),c=na(),l=Et(),u=Jr(),d=un(),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}}),Yc}var Qc,$c;function el(){return $c||($c=1,Zc(),Qc=vn()(`Array`,`slice`)),Qc}var tl,nl;function rl(){if(nl)return tl;nl=1;var e=p(),t=el(),n=Array.prototype;return tl=function(r){var i=r.slice;return r===n||e(n,r)&&i===n.slice?t:i},tl}var il,al;function ol(){return al||(al=1,il=rl()),il}var sl,cl;function ll(){return cl||(cl=1,sl=ol()),sl}var ul=t(ll()),dl={},fl,pl;function ml(){if(pl)return fl;pl=1;var e=ke(),t=u(),n=Ha(),r=Ja(),i=$t(),a=t([].concat);return fl=e(`Reflect`,`ownKeys`)||function(e){var t=n.f(i(e)),o=r.f;return o?a(t,o(e)):t},fl}var hl;function gl(){return hl||(hl=1,P()({target:`Reflect`,stat:!0},{ownKeys:ml()})),dl}var _l,vl;function yl(){return vl||(vl=1,gl(),_l=Ee().Reflect.ownKeys),_l}var bl,xl;function Sl(){return xl||(xl=1,bl=yl()),bl}var Cl,wl;function Tl(){return wl||(wl=1,Cl=Sl()),Cl}var El=t(Tl()),Dl={},Ol;function kl(){return Ol||(Ol=1,P()({target:`Array`,stat:!0},{isArray:xr()})),Dl}var Al,jl;function Ml(){return jl||(jl=1,kl(),Al=Ee().Array.isArray),Al}var Nl,Pl;function Fl(){return Pl||(Pl=1,Nl=Ml()),Nl}var Il,Ll;function Rl(){return Ll||(Ll=1,Il=Fl()),Il}var zl=t(Rl()),Bl={},Vl;function Hl(){if(Vl)return Bl;Vl=1;var e=P(),t=_t(),n=Oa();return e({target:`Object`,stat:!0,forced:i()(function(){n(1)})},{keys:function(e){return n(t(e))}}),Bl}var Ul,Wl;function Gl(){return Wl||(Wl=1,Hl(),Ul=Ee().Object.keys),Ul}var Kl,ql;function Jl(){return ql||(ql=1,Kl=Gl()),Kl}var Yl,Xl;function Zl(){return Xl||(Xl=1,Yl=Jl()),Yl}var Ql=t(Zl()),$l={},eu,tu;function nu(){if(tu)return eu;tu=1;var e=Gr().forEach;return eu=Xn()(`forEach`)?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},eu}var ru;function iu(){if(ru)return $l;ru=1;var e=P(),t=nu();return e({target:`Array`,proto:!0,forced:[].forEach!==t},{forEach:t}),$l}var au,ou;function su(){return ou||(ou=1,iu(),au=vn()(`Array`,`forEach`)),au}var cu,lu;function uu(){return lu||(lu=1,cu=su()),cu}var du,fu;function pu(){if(fu)return du;fu=1;var e=Dr(),t=bt(),n=p(),r=uu(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return du=function(o){var s=o.forEach;return o===i||n(i,o)&&s===i.forEach||t(a,e(o))?r:s},du}var mu,hu;function gu(){return hu||(hu=1,mu=pu()),mu}var _u=t(gu()),vu={},yu,bu;function xu(){if(bu)return yu;bu=1;var e=qe(),t=TypeError;return yu=function(n,r){if(!delete n[r])throw new t(`Cannot delete property `+e(r)+` of `+e(n))},yu}var Su;function Cu(){if(Su)return vu;Su=1;var e=P(),t=_t(),n=pa(),r=Rn(),i=Wn(),a=na(),o=ki(),s=zr(),c=Hr(),l=xu(),u=Jr()(`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}}),vu}var wu,Tu;function Eu(){return Tu||(Tu=1,Cu(),wu=vn()(`Array`,`splice`)),wu}var Du,Ou;function ku(){if(Ou)return Du;Ou=1;var e=p(),t=Eu(),n=Array.prototype;return Du=function(r){var i=r.splice;return r===n||e(n,r)&&i===n.splice?t:i},Du}var Au,ju;function Mu(){return ju||(ju=1,Au=ku()),Au}var Nu,Pu;function Fu(){return Pu||(Pu=1,Nu=Mu()),Nu}var Iu=t(Fu()),Lu={},Ru,zu;function Bu(){if(zu)return Ru;zu=1;var e=te(),t=u(),n=M(),r=i(),a=Oa(),o=Ja(),s=ae(),c=_t(),l=de(),d=Object.assign,f=Object.defineProperty,p=t([].concat);return Ru=!d||r(function(){if(e&&d({b:1},d(f({},`a`,{enumerable:!0,get:function(){f(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},n={},r=Symbol(`assign detection`),i=`abcdefghijklmnopqrst`;return t[r]=7,i.split(``).forEach(function(e){n[e]=e}),d({},t)[r]!==7||a(d({},n)).join(``)!==i})?function(t,r){for(var i=c(t),u=arguments.length,d=1,f=o.f,m=s.f;u>d;)for(var h=l(arguments[d++]),g=f?p(a(h),f(h)):a(h),_=g.length,v=0,y;_>v;)y=g[v++],(!e||n(m,h,y))&&(i[y]=h[y]);return i}:d,Ru}var Vu;function Hu(){if(Vu)return Lu;Vu=1;var e=P(),t=Bu();return e({target:`Object`,stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),Lu}var Uu,Wu;function Gu(){return Wu||(Wu=1,Hu(),Uu=Ee().Object.assign),Uu}var Ku,qu;function Ju(){return qu||(qu=1,Ku=Gu()),Ku}var Yu,Xu;function Zu(){return Xu||(Xu=1,Yu=Ju()),Yu}var Qu=t(Zu()),$u,ed;function td(){return ed||(ed=1,ia(),$u=vn()(`Array`,`concat`)),$u}var nd,rd;function id(){if(rd)return nd;rd=1;var e=p(),t=td(),n=Array.prototype;return nd=function(r){var i=r.concat;return r===n||e(n,r)&&i===n.concat?t:i},nd}var ad,od;function sd(){return od||(od=1,ad=id()),ad}var cd,ld;function ud(){return ld||(ld=1,cd=sd()),cd}var dd=t(ud()),fd={},pd;function md(){return pd||(pd=1,P()({target:`Object`,stat:!0,sham:!te()},{create:za()})),fd}var hd,gd;function _d(){if(gd)return hd;gd=1,md();var e=Ee().Object;return hd=function(t,n){return e.create(t,n)},hd}var vd,yd;function bd(){return yd||(yd=1,vd=_d()),vd}var xd,Sd;function Cd(){return Sd||(Sd=1,xd=bd()),xd}var wd=t(Cd()),Td={},Ed,Dd;function Od(){if(Dd)return Ed;Dd=1;var e=Rn(),t=la(),n=_e(),r=RangeError,i=Math.floor;return Ed=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},Ed}var kd,Ad;function jd(){if(Ad)return kd;Ad=1;var e=u(),t=Vn(),n=la(),r=Od(),i=_e(),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 kd={start:c(!1),end:c(!0)},kd}var Md,Nd;function Pd(){if(Nd)return Md;Nd=1;var e=u(),t=i(),n=jd().start,r=RangeError,a=isFinite,o=Math.abs,s=Date.prototype,c=s.toISOString,l=e(s.getTime),d=e(s.getUTCDate),f=e(s.getUTCFullYear),p=e(s.getUTCHours),m=e(s.getUTCMilliseconds),h=e(s.getUTCMinutes),g=e(s.getUTCMonth),_=e(s.getUTCSeconds);return Md=t(function(){return c.call(new Date(-5e13-1))!==`0385-07-25T07:06:39.999Z`})||!t(function(){c.call(new Date(NaN))})?function(){if(!a(l(this)))throw new r(`Invalid time value`);var e=this,t=f(e),i=m(e),s=t<0?`-`:t>9999?`+`:``;return s+n(o(t),s?6:4,0)+`-`+n(g(e)+1,2,0)+`-`+n(d(e),2,0)+`T`+n(p(e),2,0)+`:`+n(h(e),2,0)+`:`+n(_(e),2,0)+`.`+n(i,3,0)+`Z`}:c,Md}var Fd;function Id(){if(Fd)return Td;Fd=1;var e=P(),t=M(),n=_t(),r=kt(),a=Pd(),o=C();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 i=n(this),s=r(i,`number`);return typeof s==`number`&&!isFinite(s)?null:!(`toISOString`in i)&&o(i)===`Date`?t(a,i):i.toISOString()}}),Td}var Ld,Rd;function zd(){if(Rd)return Ld;Rd=1,Id(),Jo();var e=Ee(),t=b();return e.JSON||={stringify:JSON.stringify},Ld=function(n,r,i){return t(e.JSON.stringify,null,arguments)},Ld}var Bd,Vd;function Hd(){return Vd||(Vd=1,Bd=zd()),Bd}var Ud,Wd;function Gd(){return Wd||(Wd=1,Ud=Hd()),Ud}var Kd=t(Gd()),qd={},Jd={},Yd,Xd;function Zd(){if(Xd)return Yd;Xd=1;var e=TypeError;return Yd=function(t,n){if(t<n)throw new e(`Not enough arguments`);return t},Yd}var Qd,$d;function ef(){if($d)return Qd;$d=1;var e=_(),t=b(),n=O(),r=$n(),i=Me(),a=un(),o=Zd(),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 Qd=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},Qd}var tf;function nf(){if(tf)return Jd;tf=1;var e=P(),t=_(),n=ef()(t.setInterval,!0);return e({global:!0,bind:!0,forced:t.setInterval!==n},{setInterval:n}),Jd}var rf={},af;function of(){if(af)return rf;af=1;var e=P(),t=_(),n=ef()(t.setTimeout,!0);return e({global:!0,bind:!0,forced:t.setTimeout!==n},{setTimeout:n}),rf}var sf;function cf(){return sf||(sf=1,nf(),of()),qd}var lf,uf;function df(){return uf||(uf=1,cf(),lf=Ee().setTimeout),lf}var ff,pf;function mf(){return pf||(pf=1,ff=df()),ff}var hf=t(mf()),gf={exports:{}},_f;function vf(){return _f||(_f=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})(gf)),gf.exports}var yf=t(vf());function bf(){return bf=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},bf.apply(this,arguments)}function xf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Sf(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var Cf=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},wf=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],Tf=typeof document>`u`?{style:{}}:document.createElement(`div`),Ef=`function`,Df=Math.round,Of=Math.abs,kf=Date.now;function Af(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<wf.length;){if(n=wf[a],r=n?n+i:t,r in e)return r;a++}}var jf=typeof window>`u`?{}:window,Mf=Af(Tf.style,`touchAction`),Nf=Mf!==void 0;function Pf(){if(!Nf)return!1;var e={},t=jf.CSS&&jf.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach(function(n){return e[n]=!t||jf.CSS.supports(`touch-action`,n)}),e}var Ff=`compute`,If=`auto`,Lf=`manipulation`,Rf=`none`,zf=`pan-x`,Bf=`pan-y`,Vf=Pf(),Hf=/mobile|tablet|ip(ad|hone|od)|android/i,Uf=`ontouchstart`in jf,Wf=Af(jf,`PointerEvent`)!==void 0,Gf=Uf&&Hf.test(navigator.userAgent),Kf=`touch`,qf=`pen`,Jf=`mouse`,Yf=`kinect`,Xf=25,Zf=1,Qf=2,$f=4,ep=8,tp=1,np=2,rp=4,ip=8,ap=16,op=np|rp,sp=ip|ap,cp=op|sp,lp=[`x`,`y`],up=[`clientX`,`clientY`];function dp(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 fp(e,t){return typeof e===Ef?e.apply(t&&t[0]||void 0,t):e}function pp(e,t){return e.indexOf(t)>-1}function mp(e){if(pp(e,Rf))return Rf;var t=pp(e,zf),n=pp(e,Bf);return t&&n?Rf:t||n?t?zf:Bf:pp(e,Lf)?Lf:If}var hp=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===Ff&&(e=this.compute()),Nf&&this.manager.element.style&&Vf[e]&&(this.manager.element.style[Mf]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return dp(this.manager.recognizers,function(t){fp(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),mp(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=pp(r,Rf)&&!Vf[Rf],a=pp(r,Bf)&&!Vf[Bf],o=pp(r,zf)&&!Vf[zf];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&op||o&&n&sp))return this.preventSrc(t)}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function gp(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function _p(e){var t=e.length;if(t===1)return{x:Df(e[0].clientX),y:Df(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:Df(n/t),y:Df(r/t)}}function vp(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:Df(e.pointers[n].clientX),clientY:Df(e.pointers[n].clientY)},n++;return{timeStamp:kf(),pointers:t,center:_p(t),deltaX:e.deltaX,deltaY:e.deltaY}}function yp(e,t,n){n||=lp;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function bp(e,t,n){n||=lp;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.atan2(i,r)*180/Math.PI}function xp(e,t){return e===t?tp:Of(e)>=Of(t)?e<0?np:rp:t<0?ip:ap}function Sp(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===Zf||a.eventType===$f)&&(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 Cp(e,t,n){return{x:t/e||0,y:n/e||0}}function wp(e,t){return yp(t[0],t[1],up)/yp(e[0],e[1],up)}function Tp(e,t){return bp(t[1],t[0],up)+bp(e[1],e[0],up)}function Ep(e,t){var n=e.lastInterval||t,r=t.timeStamp-n.timeStamp,i,a,o,s;if(t.eventType!==ep&&(r>Xf||n.velocity===void 0)){var c=t.deltaX-n.deltaX,l=t.deltaY-n.deltaY,u=Cp(r,c,l);a=u.x,o=u.y,i=Of(u.x)>Of(u.y)?u.x:u.y,s=xp(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 Dp(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=vp(t),i>1&&!n.firstMultiple?n.firstMultiple=vp(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=_p(r);t.timeStamp=kf(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=bp(s,c),t.distance=yp(s,c),Sp(n,t),t.offsetDirection=xp(t.deltaX,t.deltaY);var l=Cp(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=Of(l.x)>Of(l.y)?l.x:l.y,t.scale=o?wp(o.pointers,r):1,t.rotation=o?Tp(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,Ep(n,t);var u=e.element,d=t.srcEvent,f=d.composedPath?d.composedPath()[0]:d.path?d.path[0]:d.target;gp(f,u)&&(u=f),t.target=u}function Op(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&Zf&&r-i===0,o=t&($f|ep)&&r-i===0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,Dp(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function kp(e){return e.trim().split(/\s+/g)}function Ap(e,t,n){dp(kp(t),function(t){e.addEventListener(t,n,!1)})}function jp(e,t,n){dp(kp(t),function(t){e.removeEventListener(t,n,!1)})}function Mp(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var Np=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){fp(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&Ap(this.element,this.evEl,this.domHandler),this.evTarget&&Ap(this.target,this.evTarget,this.domHandler),this.evWin&&Ap(Mp(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&jp(this.element,this.evEl,this.domHandler),this.evTarget&&jp(this.target,this.evTarget,this.domHandler),this.evWin&&jp(Mp(this.element),this.evWin,this.domHandler)},e}();function Pp(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 Fp={pointerdown:Zf,pointermove:Qf,pointerup:$f,pointercancel:ep,pointerout:ep},Ip={2:Kf,3:qf,4:Jf,5:Yf},Lp=`pointerdown`,Rp=`pointermove pointerup pointercancel`;jf.MSPointerEvent&&!jf.PointerEvent&&(Lp=`MSPointerDown`,Rp=`MSPointerMove MSPointerUp MSPointerCancel`);var zp=function(e){xf(t,e);function t(){var n,r=t.prototype;return r.evEl=Lp,r.evWin=Rp,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=Fp[e.type.toLowerCase().replace(`ms`,``)],i=Ip[e.pointerType]||e.pointerType,a=i===Kf,o=Pp(t,e.pointerId,`pointerId`);r&Zf&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&($f|ep)&&(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}(Np);function Bp(e){return Array.prototype.slice.call(e,0)}function Vp(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];Pp(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 Hp={touchstart:Zf,touchmove:Qf,touchend:$f,touchcancel:ep},Up=`touchstart touchmove touchend touchcancel`,Wp=function(e){xf(t,e);function t(){var n;return t.prototype.evTarget=Up,n=e.apply(this,arguments)||this,n.targetIds={},n}var n=t.prototype;return n.handler=function(e){var t=Hp[e.type],n=Gp.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Kf,srcEvent:e})},t}(Np);function Gp(e,t){var n=Bp(e.touches),r=this.targetIds;if(t&(Zf|Qf)&&n.length===1)return r[n[0].identifier]=!0,[n,n];var i,a,o=Bp(e.changedTouches),s=[],c=this.target;if(a=n.filter(function(e){return gp(e.target,c)}),t===Zf)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&($f|ep)&&delete r[o[i].identifier],i++;if(s.length)return[Vp(a.concat(s),`identifier`,!0),s]}var Kp={mousedown:Zf,mousemove:Qf,mouseup:$f},qp=`mousedown`,Jp=`mousemove mouseup`,Yp=function(e){xf(t,e);function t(){var n,r=t.prototype;return r.evEl=qp,r.evWin=Jp,n=e.apply(this,arguments)||this,n.pressed=!1,n}var n=t.prototype;return n.handler=function(e){var t=Kp[e.type];t&Zf&&e.button===0&&(this.pressed=!0),t&Qf&&e.which!==1&&(t=$f),this.pressed&&(t&$f&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Jf,srcEvent:e}))},t}(Np),Xp=2500,Zp=25;function Qp(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)},Xp)}}function $p(e,t){e&Zf?(this.primaryTouch=t.changedPointers[0].identifier,Qp.call(this,t)):e&($f|ep)&&Qp.call(this,t)}function em(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<=Zp&&o<=Zp)return!0}return!1}var tm=function(){return function(e){xf(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===Kf,a=n.pointerType===Jf;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)$p.call(Sf(Sf(r)),t,n);else if(a&&em.call(Sf(Sf(r)),n))return;r.callback(e,t,n)}},r.touch=new Wp(r.manager,r.handler),r.mouse=new Yp(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}(Np)}();function nm(e){return new(e.options.inputClass||(Wf?zp:Gf?Wp:Uf?tm:Yp))(e,Op)}function rm(e,t,n){return Array.isArray(e)?(dp(e,n[t],n),!0):!1}var im=1,am=2,om=4,sm=8,cm=sm,lm=16,um=32,dm=1;function fm(){return dm++}function pm(e,t){var n=t.manager;return n?n.get(e):e}function mm(e){return e&lm?`cancel`:e&sm?`end`:e&om?`move`:e&am?`start`:``}var hm=function(){function e(e){e===void 0&&(e={}),this.options=bf({enable:!0},e),this.id=fm(),this.manager=null,this.state=im,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return Cf(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(rm(e,`recognizeWith`,this))return this;var t=this.simultaneous;return e=pm(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return rm(e,`dropRecognizeWith`,this)||(e=pm(e,this),delete this.simultaneous[e.id]),this},t.requireFailure=function(e){if(rm(e,`requireFailure`,this))return this;var t=this.requireFail;return e=pm(e,this),Pp(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(rm(e,`dropRequireFailure`,this))return this;e=pm(e,this);var t=Pp(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<sm&&r(t.options.event+mm(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=sm&&r(t.options.event+mm(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=um},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(um|im)))return!1;e++}return!0},t.recognize=function(e){var t=Cf({},e);fp(this.options.enable,[this,t])?(this.state&(cm|lm|um)&&(this.state=im),this.state=this.process(t),this.state&(am|om|sm|lm)&&this.tryEmit(t)):(this.reset(),this.state=um)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),gm=function(e){xf(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,bf({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[Lf]},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&Zf&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==$f)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<n.interval,s=!this.pCenter||yp(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=cm,t.tryEmit()},n.interval),am):cm}return um},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=um},this.options.interval),um},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===cm&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(hm),_m=function(e){xf(t,e);function t(t){return t===void 0&&(t={}),e.call(this,bf({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&(am|om),i=this.attrTest(e);return r&&(n&ep||!i)?t|lm:r||i?n&$f?t|sm:t&am?t|om:am:um},t}(hm);function vm(e){return e===ap?`down`:e===ip?`up`:e===np?`left`:e===rp?`right`:``}var ym=function(e){xf(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,bf({event:`pan`,threshold:10,pointers:1,direction:cp},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&op&&t.push(Bf),e&sp&&t.push(zf),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&op?(i=a===0?tp:a<0?np:rp,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?tp:o<0?ip:ap,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return _m.prototype.attrTest.call(this,e)&&(this.state&am||!(this.state&am)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=vm(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(_m),bm=function(e){xf(t,e);function t(t){return t===void 0&&(t={}),e.call(this,bf({event:`swipe`,threshold:10,velocity:.3,direction:op|sp,pointers:1},t))||this}var n=t.prototype;return n.getTouchAction=function(){return ym.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n=this.options.direction,r;return n&(op|sp)?r=t.overallVelocity:n&op?r=t.overallVelocityX:n&sp&&(r=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Of(r)>this.options.velocity&&t.eventType&$f},n.emit=function(e){var t=vm(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(_m),xm=function(e){xf(t,e);function t(t){return t===void 0&&(t={}),e.call(this,bf({event:`pinch`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[Rf]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&am)},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}(_m),Sm=function(e){xf(t,e);function t(t){return t===void 0&&(t={}),e.call(this,bf({event:`rotate`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[Rf]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&am)},t}(_m),Cm=function(e){xf(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,bf({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[If]},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&($f|ep)&&!a)this.reset();else if(e.eventType&Zf)this.reset(),this._timer=setTimeout(function(){t.state=cm,t.tryEmit()},n.time);else if(e.eventType&$f)return cm;return um},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===cm&&(e&&e.eventType&$f?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=kf(),this.manager.emit(this.options.event,this._input)))},t}(hm),wm={domEvents:!1,touchAction:Ff,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},Tm=[[Sm,{enable:!1}],[xm,{enable:!1},[`rotate`]],[bm,{direction:op}],[ym,{direction:op},[`swipe`]],[gm],[gm,{event:`doubletap`,taps:2},[`tap`]],[Cm]],Em=1,Dm=2;function Om(e,t){var n=e.element;if(n.style){var r;dp(e.options.cssProps,function(i,a){r=Af(n.style,a),t?(e.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=e.oldCssProps[r]||``}),t||(e.oldCssProps={})}}function km(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var Am=function(){function e(e,t){var n=this;this.options=Cf({},wm,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=nm(this),this.touchAction=new hp(this,this.options.touchAction),Om(this,!0),dp(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 Cf(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?Dm:Em},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&cm)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped!==Dm&&(!i||n===i||n.canRecognizeWith(i))?n.recognize(e):n.reset(),!i&&n.state&(am|om|sm)&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof hm)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(rm(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(rm(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=Pp(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 dp(kp(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 dp(kp(e),function(e){t?n[e]&&n[e].splice(Pp(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&km(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&&Om(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),jm={touchstart:Zf,touchmove:Qf,touchend:$f,touchcancel:ep},Mm=`touchstart`,Nm=`touchstart touchmove touchend touchcancel`,Pm=function(e){xf(t,e);function t(){var n,r=t.prototype;return r.evTarget=Mm,r.evWin=Nm,n=e.apply(this,arguments)||this,n.started=!1,n}var n=t.prototype;return n.handler=function(e){var t=jm[e.type];if(t===Zf&&(this.started=!0),this.started){var n=Fm.call(this,e,t);t&($f|ep)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Kf,srcEvent:e})}},t}(Np);function Fm(e,t){var n=Bp(e.touches),r=Bp(e.changedTouches);return t&($f|ep)&&(n=Vp(n.concat(r),`identifier`,!0)),[n,r]}function Im(e,t,n){var r=`DEPRECATED METHOD: `+t+`
3
+ `+n+` AT
4
+ `;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 Lm=Im(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`."),Rm=Im(function(e,t){return Lm(e,t,!0)},`merge`,"Use `assign`.");function zm(e,t,n){var r=t.prototype,i=e.prototype=Object.create(r);i.constructor=e,i._super=r,n&&Cf(i,n)}function Bm(e,t){return function(){return e.apply(t,arguments)}}var Vm=function(){var e=function(e,t){return t===void 0&&(t={}),new Am(e,bf({recognizers:Tm.concat()},t))};return e.VERSION=`2.0.17-rc`,e.DIRECTION_ALL=cp,e.DIRECTION_DOWN=ap,e.DIRECTION_LEFT=np,e.DIRECTION_RIGHT=rp,e.DIRECTION_UP=ip,e.DIRECTION_HORIZONTAL=op,e.DIRECTION_VERTICAL=sp,e.DIRECTION_NONE=tp,e.DIRECTION_DOWN=ap,e.INPUT_START=Zf,e.INPUT_MOVE=Qf,e.INPUT_END=$f,e.INPUT_CANCEL=ep,e.STATE_POSSIBLE=im,e.STATE_BEGAN=am,e.STATE_CHANGED=om,e.STATE_ENDED=sm,e.STATE_RECOGNIZED=cm,e.STATE_CANCELLED=lm,e.STATE_FAILED=um,e.Manager=Am,e.Input=Np,e.TouchAction=hp,e.TouchInput=Wp,e.MouseInput=Yp,e.PointerEventInput=zp,e.TouchMouseInput=tm,e.SingleTouchInput=Pm,e.Recognizer=hm,e.AttrRecognizer=_m,e.Tap=gm,e.Pan=ym,e.Swipe=bm,e.Pinch=xm,e.Rotate=Sm,e.Press=Cm,e.on=Ap,e.off=jp,e.each=dp,e.merge=Rm,e.extend=Lm,e.bindFn=Bm,e.assign=Cf,e.inherit=zm,e.bindFn=Bm,e.prefixed=Af,e.toArray=Bp,e.inArray=Pp,e.uniqueArray=Vp,e.splitStr=kp,e.boolOrFn=fp,e.hasParent=gp,e.addEventListeners=Ap,e.removeEventListeners=jp,e.defaults=Cf({},wm,{preset:Tm}),e}(),Hm=Jc(`DELETE`);function Um(e){return Wm({},e,...[...arguments].slice(1))}function Wm(){let e=Gm(...arguments);return qm(e),e}function Gm(){var e=[...arguments];if(e.length<2)return e[0];if(e.length>2)return Gm(Wm(e[0],e[1]),...ul(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 El(n))Object.prototype.propertyIsEnumerable.call(n,e)&&(n[e]===Hm?delete t[e]:t[e]=t[e]!==null&&n[e]!==null&&typeof t[e]==`object`&&typeof n[e]==`object`&&!zl(t[e])&&!zl(n[e])?Gm(t[e],n[e]):Km(n[e]));return t}function Km(e){return zl(e)?Ti(e).call(e,e=>Km(e)):typeof e==`object`&&e?e instanceof Date?new Date(e.getTime()):Gm({},e):e}function qm(e){for(let t of Ql(e))e[t]===Hm?delete e[t]:typeof e[t]==`object`&&e[t]!==null&&qm(e[t])}function Jm(){let e=()=>{};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var Ym=typeof window<`u`?window.Hammer||Vm:function(){return Jm()};function Xm(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=Ym(this._dom.overlay);n.on(`tap`,jn(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push(()=>{n.destroy()});let r=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];_u(r).call(r,e=>{n.on(e,e=>{e.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=t=>{Zm(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()}}yf(Xm.prototype),Xm.current=null,Xm.prototype.destroy=function(){this.deactivate();for(let t of Iu(e=this._cleanupQueue).call(e,0).toReversed()){var e;t()}},Xm.prototype.activate=function(){Xm.current&&Xm.current.deactivate(),Xm.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)},Xm.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`)},Xm.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};function Zm(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var Qm={},$m={},eh={exports:{}},th,nh;function rh(){return nh||(nh=1,th=i()(function(){if(typeof ArrayBuffer==`function`){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),th}var ih,ah;function oh(){if(ah)return ih;ah=1;var e=i(),t=Ce(),n=C(),r=rh(),a=Object.isExtensible;return ih=e(function(){})||r?function(e){return!t(e)||r&&n(e)===`ArrayBuffer`?!1:!a||a(e)}:a,ih}var sh,ch;function lh(){return ch||(ch=1,sh=!i()(function(){return Object.isExtensible(Object.preventExtensions({}))})),sh}var uh;function dh(){if(uh)return eh.exports;uh=1;var e=P(),t=u(),n=ya(),r=Ce(),i=bt(),a=tn().f,o=Ha(),s=Ga(),c=oh(),l=Ct(),d=lh(),f=!1,p=l(`meta`),m=0,h=function(e){a(e,p,{value:{objectID:`O`+m++,weakData:{}}})},g=eh.exports={enable:function(){g.enable=function(){},f=!0;var n=o.f,r=t([].splice),i={};i[p]=1,n(i).length&&(o.f=function(e){for(var t=n(e),i=0,a=t.length;i<a;i++)if(t[i]===p){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,p)){if(!c(e))return`F`;if(!t)return`E`;h(e)}return e[p].objectID},getWeakData:function(e,t){if(!i(e,p)){if(!c(e))return!0;if(!t)return!1;h(e)}return e[p].weakData},onFreeze:function(e){return d&&f&&c(e)&&!i(e,p)&&h(e),e}};return n[p]=!0,eh.exports}var fh,ph;function mh(){if(ph)return fh;ph=1;var e=Et(),t=ec(),n=e(`iterator`),r=Array.prototype;return fh=function(e){return e!==void 0&&(t.Array===e||r[n]===e)},fh}var hh,gh;function _h(){if(gh)return hh;gh=1;var e=Dr(),t=bt(),n=ec();return hh=function(r){var i=e(r);return i===`Arguments`&&(i=`Array`),t(n,i)?n[i]:void 0},hh}var vh,yh;function bh(){if(yh)return vh;yh=1;var e=$e(),t=me(),n=_h(),r=Et()(`iterator`);return vh=function(i){if(!t(i))return e(i,r)||e(i,`@@iterator`)||n(i)},vh}var xh,Sh;function Ch(){if(Sh)return xh;Sh=1;var e=M(),t=O(),n=$t(),r=qe(),i=bh(),a=TypeError;return xh=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`)},xh}var wh,Th;function Eh(){if(Th)return wh;Th=1;var e=M(),t=$t(),n=$e();return wh=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},wh}var Dh,Oh;function kh(){if(Oh)return Dh;Oh=1;var e=Kt(),t=M(),n=$t(),r=qe(),i=mh(),a=Wn(),o=p(),s=Ch(),c=bh(),l=Eh(),u=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return Dh=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,O=function(e){var t=S;return S=void 0,t&&l(t,`normal`),new d(!0,e)},k=function(e){return _?(n(e),b?x(e[0],e[1],O):x(e[0],e[1])):b?x(e,O):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=k(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 A=ee.value;try{E=k(A)}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)},Dh}var Ah,jh;function Mh(){if(jh)return Ah;jh=1;var e=p(),t=TypeError;return Ah=function(n,r){if(e(r,n))return n;throw new t(`Incorrect invocation`)},Ah}var Nh,Ph;function Fh(){if(Ph)return Nh;Ph=1;var e=P(),t=_(),n=dh(),r=M(),a=i(),o=an(),s=kh(),c=Mh(),l=O(),u=Ce(),d=me(),f=go(),p=tn().f,m=Gr().forEach,h=te(),g=So(),v=g.set,y=g.getterFor;return Nh=function(i,g,_){var b=i.indexOf(`Map`)!==-1,x=i.indexOf(`Weak`)!==-1,S=b?`set`:`add`,C=t[i],w=C&&C.prototype,T={},E;if(!h||!l(C)||!(x||w.forEach&&!a(function(){new C().entries().next()})))E=_.getConstructor(g,i,b,S),n.enable();else{E=g(function(e,t){v(c(e,D),{type:i,collection:new C}),d(t)||s(t,e[S],{that:e,AS_ENTRIES:b})});var D=E.prototype,ee=y(i);m([`add`,`clear`,`delete`,`forEach`,`get`,`has`,`set`,`keys`,`values`,`entries`],function(e){var t=e===`add`||e===`set`;e in w&&!(x&&e===`clear`)&&o(D,e,function(n,i){var a=this,o=ee(a).collection;if(!t&&x&&!u(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||p(D,`size`,{configurable:!0,get:function(){return ee(this).collection.size}})}return f(E,i,!1,!0),T[i]=E,e({global:!0,forced:!0},T),x||_.setStrong(E,i,b),E},Nh}var Ih,Lh;function Rh(){if(Lh)return Ih;Lh=1;var e=Za();return Ih=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},Ih}var zh,Bh;function Vh(){if(Bh)return zh;Bh=1;var e=ke(),t=eo(),n=Et(),r=te(),i=n(`species`);return zh=function(n){var a=e(n);r&&a&&!a[i]&&t(a,i,{configurable:!0,get:function(){return this}})},zh}var Hh,Uh;function Wh(){if(Uh)return Hh;Uh=1;var e=za(),t=eo(),n=Rh(),r=Kt(),i=Mh(),a=me(),o=kh(),s=Ac(),c=Nc(),l=Vh(),u=te(),d=dh().fastKey,f=So(),p=f.set,m=f.getterFor;return Hh={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)}},Hh}var Gh;function Kh(){return Gh||(Gh=1,Fh()(`Map`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},Wh())),$m}var qh;function Jh(){return qh||(qh=1,Kh()),Qm}var Yh={},Xh,Zh;function Qh(){return Zh||(Zh=1,Xh=function(e,t){return t===1?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}}),Xh}var $h,eg;function tg(){if(eg)return $h;eg=1;var e=ke(),t=Qh(),n=e(`Map`);return $h={Map:n,set:t(`set`,2),get:t(`get`,1),has:t(`has`,1),remove:t(`delete`,1),proto:n.prototype},$h}var ng;function rg(){if(ng)return Yh;ng=1;var e=P(),t=u(),n=Xe(),r=_e(),a=kh(),o=ki(),s=tg(),c=ot(),l=i(),d=s.Map,f=s.has,p=s.get,m=s.set,h=t([].push),g=c||l(function(){return d.groupBy(`ab`,function(e){return e}).get(`a`).length!==1});return e({target:`Map`,stat:!0,forced:c||g},{groupBy:function(e,t){r(e),n(t);var i=new d,s=0;return a(e,function(e){o(s);var n=t(e,s++);f(i,n)?h(p(i,n),e):m(i,n,[e])}),i}}),Yh}var ig={},ag;function og(){if(ag)return ig;ag=1;var e=P(),t=tg(),n=ot(),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)}}),ig}var sg={},cg;function lg(){if(cg)return sg;cg=1;var e=P(),t=Xe(),n=tg(),r=ot(),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}}),sg}var ug={},dg,fg;function pg(){if(fg)return dg;fg=1;var e=u(),t=Rn(),n=la(),r=_e(),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 dg={codeAt:s(!1),charAt:s(!0)},dg}var mg;function hg(){if(mg)return ug;mg=1;var e=pg().charAt,t=la(),n=So(),r=Ac(),i=Nc(),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))}),ug}var gg,_g;function vg(){return _g||(_g=1,Ic(),Jh(),rg(),og(),lg(),hg(),gg=Ee().Map),gg}var yg,bg;function xg(){if(bg)return yg;bg=1;var e=vg();return Vc(),yg=e,yg}var Sg,Cg;function wg(){return Cg||(Cg=1,Sg=xg()),Sg}var Tg=t(wg()),Eg={},Dg;function Og(){if(Dg)return Eg;Dg=1;var e=P(),t=Gr().some;return e({target:`Array`,proto:!0,forced:!Xn()(`some`)},{some:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),Eg}var kg,Ag;function jg(){return Ag||(Ag=1,Og(),kg=vn()(`Array`,`some`)),kg}var Mg,Ng;function Pg(){if(Ng)return Mg;Ng=1;var e=p(),t=jg(),n=Array.prototype;return Mg=function(r){var i=r.some;return r===n||e(n,r)&&i===n.some?t:i},Mg}var Fg,Ig;function Lg(){return Ig||(Ig=1,Fg=Pg()),Fg}var Rg,zg;function Bg(){return zg||(zg=1,Rg=Lg()),Rg}var Vg=t(Bg()),Hg,Ug;function Wg(){return Ug||(Ug=1,Ic(),Hg=vn()(`Array`,`keys`)),Hg}var Gg,Kg;function qg(){return Kg||(Kg=1,Gg=Wg()),Gg}var Jg,Yg;function Xg(){if(Yg)return Jg;Yg=1,Vc();var e=Dr(),t=bt(),n=p(),r=qg(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return Jg=function(o){var s=o.keys;return o===i||n(i,o)&&s===i.keys||t(a,e(o))?r:s},Jg}var Zg,Qg;function $g(){return Qg||(Qg=1,Zg=Xg()),Zg}var e_=t($g()),t_={},n_,r_;function i_(){if(r_)return n_;r_=1;var e=un(),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 n_=n,n_}var a_,o_;function s_(){if(o_)return a_;o_=1;var e=Me().match(/firefox\/(\d+)/i);return a_=!!e&&+e[1],a_}var c_,l_;function u_(){if(l_)return c_;l_=1;var e=Me();return c_=/MSIE|Trident/.test(e),c_}var d_,f_;function p_(){if(f_)return d_;f_=1;var e=Me().match(/AppleWebKit\/(\d+)\./);return d_=!!e&&+e[1],d_}var m_;function h_(){if(m_)return t_;m_=1;var e=P(),t=u(),n=Xe(),r=_t(),a=Wn(),o=xu(),s=la(),c=i(),l=i_(),d=Xn(),f=s_(),p=u_(),m=Fe(),h=p_(),g=[],_=t(g.sort),v=t(g.push),y=c(function(){g.sort(void 0)}),b=c(function(){g.sort(null)}),x=d(`sort`),S=!c(function(){if(m)return m<70;if(!(f&&f>3)){if(p)return!0;if(h)return h<603;for(var e=``,t=65,n,r,i;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++)g.push({k:n+i,v:r})}for(g.sort(function(e,t){return t.v-e.v}),i=0;i<g.length;i++)n=g[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=s(t),i=s(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?_(t):_(t,e);for(var i=[],s=a(t),c,u=0;u<s;u++)u in t&&v(i,t[u]);for(l(i,w(e)),c=a(i),u=0;u<c;)t[u]=i[u++];for(;u<s;)o(t,u++);return t}}),t_}var g_,__;function v_(){return __||(__=1,h_(),g_=vn()(`Array`,`sort`)),g_}var y_,b_;function x_(){if(b_)return y_;b_=1;var e=p(),t=v_(),n=Array.prototype;return y_=function(r){var i=r.sort;return r===n||e(n,r)&&i===n.sort?t:i},y_}var S_,C_;function w_(){return C_||(C_=1,S_=x_()),S_}var T_,E_;function D_(){return E_||(E_=1,T_=w_()),T_}var O_=t(D_()),k_,A_;function j_(){return A_||(A_=1,Ic(),k_=vn()(`Array`,`values`)),k_}var M_,N_;function P_(){return N_||(N_=1,M_=j_()),M_}var F_,I_;function L_(){if(I_)return F_;I_=1,Vc();var e=Dr(),t=bt(),n=p(),r=P_(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return F_=function(o){var s=o.values;return o===i||n(i,o)&&s===i.values||t(a,e(o))?r:s},F_}var R_,z_;function B_(){return z_||(z_=1,R_=L_()),R_}var V_=t(B_()),H_,U_;function W_(){return U_||(U_=1,Ic(),hg(),_s(),H_=ro().f(`iterator`)),H_}var G_,K_;function q_(){if(K_)return G_;K_=1;var e=W_();return Vc(),G_=e,G_}var J_,Y_;function X_(){return Y_||(Y_=1,J_=q_()),J_}var Z_=t(X_()),Q_,$_;function ev(){return $_||($_=1,Ic(),Q_=vn()(`Array`,`entries`)),Q_}var tv,nv;function rv(){return nv||(nv=1,tv=ev()),tv}var iv,av;function ov(){if(av)return iv;av=1,Vc();var e=Dr(),t=bt(),n=p(),r=rv(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return iv=function(o){var s=o.entries;return o===i||n(i,o)&&s===i.entries||t(a,e(o))?r:s},iv}var sv,cv;function lv(){return cv||(cv=1,sv=ov()),sv}var uv=t(lv()),dv=[];for(let e=0;e<256;++e)dv.push((e+256).toString(16).slice(1));function fv(e,t=0){return(dv[e[t+0]]+dv[e[t+1]]+dv[e[t+2]]+dv[e[t+3]]+`-`+dv[e[t+4]]+dv[e[t+5]]+`-`+dv[e[t+6]]+dv[e[t+7]]+`-`+dv[e[t+8]]+dv[e[t+9]]+`-`+dv[e[t+10]]+dv[e[t+11]]+dv[e[t+12]]+dv[e[t+13]]+dv[e[t+14]]+dv[e[t+15]]).toLowerCase()}var pv=new Uint8Array(16);function mv(){return crypto.getRandomValues(pv)}function hv(e,t,n){return crypto.randomUUID?crypto.randomUUID():gv(e)}function gv(e,t,n){e||={};let r=e.random??e.rng?.()??mv();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,fv(r)}function _v(e){return typeof e==`string`||typeof e==`number`}var vv=class e{_subscribers={"*":[],add:[],remove:[],update:[]};_trigger(e,t,n){var r;if(e===`*`)throw Error(`Cannot trigger event *`);_u(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]=li(n=this._subscribers[e]).call(n,e=>e!==t)}subscribe=e.prototype.on;unsubscribe=e.prototype.off},yv={},bv={},xv;function Sv(){return xv||(xv=1,Fh()(`Set`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},Wh())),bv}var Cv;function wv(){return Cv||(Cv=1,Sv()),yv}var Tv={},Ev,Dv;function Ov(){if(Dv)return Ev;Dv=1;var e=qe(),t=TypeError;return Ev=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`)},Ev}var kv,Av;function jv(){if(Av)return kv;Av=1;var e=ke(),t=Qh(),n=e(`Set`),r=n.prototype;return kv={Set:n,add:t(`add`,1),has:t(`has`,1),remove:t(`delete`,1),proto:r},kv}var Mv,Nv;function Pv(){if(Nv)return Mv;Nv=1;var e=M();return Mv=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},Mv}var Fv,Iv;function Lv(){if(Iv)return Fv;Iv=1;var e=Pv();return Fv=function(t,n,r){return r?e(t.keys(),n,!0):t.forEach(n)},Fv}var Rv,zv;function Bv(){if(zv)return Rv;zv=1;var e=jv(),t=Lv(),n=e.Set,r=e.add;return Rv=function(e){var i=new n;return t(e,function(e){r(i,e)}),i},Rv}var Vv,Hv;function Uv(){return Hv||(Hv=1,Vv=function(e){return e.size}),Vv}var Wv,Gv;function Kv(){return Gv||(Gv=1,Wv=function(e){return{iterator:e,next:e.next,done:!1}}),Wv}var qv,Jv;function Yv(){if(Jv)return qv;Jv=1;var e=Xe(),t=$t(),n=M(),r=Rn(),i=Kv(),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)}},qv=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)},qv}var Xv,Zv;function Qv(){if(Zv)return Xv;Zv=1;var e=Ov(),t=jv(),n=Bv(),r=Uv(),i=Yv(),a=Lv(),o=Pv(),s=t.has,c=t.remove;return Xv=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},Xv}var $v,ey;function ty(){return ey||(ey=1,$v=function(){return!1}),$v}var ny;function ry(){if(ny)return Tv;ny=1;var e=P(),t=Qv(),n=i();return e({target:`Set`,proto:!0,real:!0,forced:!ty()(`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}),Tv}var iy={},ay,oy;function sy(){if(oy)return ay;oy=1;var e=Ov(),t=jv(),n=Uv(),r=Yv(),i=Lv(),a=Pv(),o=t.Set,s=t.add,c=t.has;return ay=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},ay}var cy;function ly(){if(cy)return iy;cy=1;var e=P(),t=i(),n=sy();return e({target:`Set`,proto:!0,real:!0,forced:!ty()(`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}),iy}var uy={},dy,fy;function py(){if(fy)return dy;fy=1;var e=Ov(),t=jv().has,n=Uv(),r=Yv(),i=Lv(),a=Pv(),o=Eh();return dy=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},dy}var my;function hy(){if(my)return uy;my=1;var e=P(),t=py();return e({target:`Set`,proto:!0,real:!0,forced:!ty()(`isDisjointFrom`,function(e){return!e})},{isDisjointFrom:t}),uy}var gy={},_y,vy;function yy(){if(vy)return _y;vy=1;var e=Ov(),t=Uv(),n=Lv(),r=Yv();return _y=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},_y}var by;function xy(){if(by)return gy;by=1;var e=P(),t=yy();return e({target:`Set`,proto:!0,real:!0,forced:!ty()(`isSubsetOf`,function(e){return e})},{isSubsetOf:t}),gy}var Sy={},Cy,wy;function Ty(){if(wy)return Cy;wy=1;var e=Ov(),t=jv().has,n=Uv(),r=Yv(),i=Pv(),a=Eh();return Cy=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},Cy}var Ey;function Dy(){if(Ey)return Sy;Ey=1;var e=P(),t=Ty();return e({target:`Set`,proto:!0,real:!0,forced:!ty()(`isSupersetOf`,function(e){return!e})},{isSupersetOf:t}),Sy}var Oy={},ky,Ay;function jy(){if(Ay)return ky;Ay=1;var e=Ov(),t=jv(),n=Bv(),r=Yv(),i=Pv(),a=t.add,o=t.has,s=t.remove;return ky=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},ky}var My,Ny;function Py(){return Ny||(Ny=1,My=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}}),My}var Fy;function Iy(){if(Fy)return Oy;Fy=1;var e=P(),t=jy(),n=Py();return e({target:`Set`,proto:!0,real:!0,forced:!ty()(`symmetricDifference`)||!n(`symmetricDifference`)},{symmetricDifference:t}),Oy}var Ly={},Ry,zy;function By(){if(zy)return Ry;zy=1;var e=Ov(),t=jv().add,n=Bv(),r=Yv(),i=Pv();return Ry=function(a){var o=e(this),s=r(a).getIterator(),c=n(o);return i(s,function(e){t(c,e)}),c},Ry}var Vy;function Hy(){if(Vy)return Ly;Vy=1;var e=P(),t=By(),n=Py();return e({target:`Set`,proto:!0,real:!0,forced:!ty()(`union`)||!n(`union`)},{union:t}),Ly}var Uy,Wy;function Gy(){return Wy||(Wy=1,Ic(),wv(),ry(),ly(),hy(),xy(),Dy(),Iy(),Hy(),hg(),Uy=Ee().Set),Uy}var Ky,qy;function Jy(){if(qy)return Ky;qy=1;var e=Gy();return Vc(),Ky=e,Ky}var Yy,Xy;function Zy(){return Xy||(Xy=1,Yy=Jy()),Yy}var Qy=t(Zy()),$y,eb;function tb(){if(eb)return $y;eb=1;var e=_h(),t=Et()(`iterator`);return $y=function(n){return n[t]||n[`@@iterator`]||e(n)},$y}var nb,rb;function ib(){if(rb)return nb;rb=1;var e=M(),t=O(),n=qe(),r=tb(),i=TypeError;return nb=function(a){var o=r(a);if(t(o))return e(o,a);throw new i(n(a)+` is not iterable`)},nb}var ab,ob;function sb(){return ob||(ob=1,Ic(),hg(),ab=ib()),ab}var cb,lb;function ub(){if(lb)return cb;lb=1;var e=sb();return Vc(),cb=e,cb}var db,fb;function pb(){return fb||(fb=1,db=ub()),db}var mb,hb;function gb(){return hb||(hb=1,mb=pb()),mb}var _b,vb;function yb(){return vb||(vb=1,_b=gb()),_b}var bb,xb;function Sb(){return xb||(xb=1,bb=yb()),bb}var Cb=t(Sb()),wb=class e{constructor(e){this._pairs=e}*[Z_](){for(let[e,t]of this._pairs)yield[e,t]}*entries(){for(let[e,t]of this._pairs)yield[e,t]}*keys(){for(let[e]of this._pairs)yield e}*values(){for(let[,e]of this._pairs)yield e}toIdArray(){var e;return Ti(e=[...this._pairs]).call(e,e=>e[0])}toItemArray(){var e;return Ti(e=[...this._pairs]).call(e,e=>e[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){let e=wd(null);for(let[t,n]of this._pairs)e[t]=n;return e}toMap(){return new Tg(this._pairs)}toIdSet(){return new Qy(this.toIdArray())}toItemSet(){return new Qy(this.toItemArray())}cache(){return new e([...this._pairs])}distinct(e){let t=new Qy;for(let[n,r]of this._pairs)t.add(e(r,n));return t}filter(t){let n=this._pairs;return new e({*[Z_](){for(let[e,r]of n)t(r,e)&&(yield[e,r])}})}forEach(e){for(let[t,n]of this._pairs)e(n,t)}map(t){let n=this._pairs;return new e({*[Z_](){for(let[e,r]of n)yield[e,t(r,e)]}})}max(e){let t=Cb(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,a]=n.value,o=e(a,t);o>i&&(i=o,r=a)}return r}min(e){let t=Cb(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,a]=n.value,o=e(a,t);o<i&&(i=o,r=a)}return r}reduce(e,t){for(let[n,r]of this._pairs)t=e(t,r,n);return t}sort(t){return new e({[Z_]:()=>Cb([...this._pairs].toSorted((e,n)=>{let[r,i]=e,[a,o]=n;return t(i,o,r,a)}))})}},Tb=class e{_queue=[];_timeout=null;_extended=null;constructor(e){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=hf(()=>{this.flush()},this.delay))}flush(){var e,t;_u(e=Iu(t=this._queue).call(t,0)).call(e,e=>{e.fn.apply(e.context||e.fn,e.args||[])})}};function Eb(e,t){return e[t]??(e[t]=hv()),e}var Db=class extends vv{get idProp(){return this._idProp}_queue=null;constructor(e,t){super(),e&&!zl(e)&&(t=e,e=[]),this._options=t||{},this._data=new Tg,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||=Tb.extend(this,{replace:[`add`,`update`,`remove`]}),e.queue&&typeof e.queue==`object`&&this._queue.setOptions(e.queue)))}add(e,t){let n=[],r;if(zl(e)){let t=Ti(e).call(e,e=>e[this._idProp]);if(Vg(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=Qu({},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(zl(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 dd(n).call(n,r)}updateOnly(e,t){var n;zl(e)||(e=[e]);let r=Ti(n=Ti(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{oldData:t,update:n}=e,r=t[this._idProp],i=Um(t,n);return this._data.set(r,i),{id:r,oldData:t,updatedData:i}});if(r.length){let e={items:Ti(r).call(r,e=>e.id),oldData:Ti(r).call(r,e=>e.oldData),data:Ti(r).call(r,e=>e.updatedData)};return this._trigger(`update`,e,t),e.items}return[]}get(e,t){let n,r,i;_v(e)?(n=e,i=t):zl(e)?(r=e,i=t):i=e;let a=i&&i.returnType===`Object`?`Object`:`Array`,o=i&&li(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=[...e_(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&&li(e),r=e&&e.order,i=[...e_(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&&li(t),r=this._data,i=[...e_(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&&li(t),r=[],i=this._data,a=[...e_(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&&_r(n=zl(t)?t:Ql(t)).call(n,(t,n)=>(t[n]=e[n],t),{})}_sort(e,t){if(typeof t==`string`){let n=t;O_(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`)O_(e).call(e,t);else throw TypeError(`Order must be a function or a string`)}remove(e,t){let n=[],r=[],i=zl(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(_v(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=[...e_(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 V_(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 V_(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=[...e_(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=Eb(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: `+Kd(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,{...n,...e}),t}stream(e){if(e){let t=this._data;return new wb({*[Z_](){for(let n of e){let e=t.get(n);e!=null&&(yield[n,e])}}})}var t;return new wb({[Z_]:jn(t=uv(this._data)).call(t,this._data)})}},Ob={exports:{}},kb={},Ab;function jb(){if(Ab)return kb;Ab=1;var e=P(),t=te(),n=tn().f;return e({target:`Object`,stat:!0,forced:Object.defineProperty!==n,sham:!t},{defineProperty:n}),kb}var Mb;function Nb(){if(Mb)return Ob.exports;Mb=1,jb();var e=Ee().Object,t=Ob.exports=function(t,n,r){return e.defineProperty(t,n,r)};return e.defineProperty.sham&&(t.sham=!0),Ob.exports}var Pb,Fb;function Ib(){return Fb||(Fb=1,Pb=Nb()),Pb}var Lb,Rb;function zb(){return Rb||(Rb=1,Lb=Ib()),Lb}zb();function Bb(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof t.add==`function`&&typeof t.clear==`function`&&typeof t.distinct==`function`&&typeof _u(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Ti(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 Vb(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof _u(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Ti(t)==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.stream==`function`&&Bb(e,t.getDataSet())}var Hb=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 Ub={},Wb,Gb;function Kb(){if(Gb)return Wb;Gb=1;var e=function(e){return e&&e.Math===Math&&e};return Wb=e(typeof globalThis==`object`&&globalThis)||e(typeof window==`object`&&window)||e(typeof self==`object`&&self)||e(typeof Hb==`object`&&Hb)||e(typeof Wb==`object`&&Wb)||(function(){return this})()||Function(`return this`)(),Wb}var qb,Jb;function I(){return Jb||(Jb=1,qb=function(e){try{return!!e()}catch{return!0}}),qb}var Yb,Xb;function Zb(){return Xb||(Xb=1,Yb=!I()(function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})),Yb}var Qb,$b;function ex(){if($b)return Qb;$b=1;var e=Zb(),t=Function.prototype,n=t.apply,r=t.call;return Qb=typeof Reflect==`object`&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),Qb}var tx,nx;function L(){if(nx)return tx;nx=1;var e=Zb(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return tx=e?r:function(e){return function(){return n.apply(e,arguments)}},tx}var rx,ix;function ax(){if(ix)return rx;ix=1;var e=L(),t=e({}.toString),n=e(``.slice);return rx=function(e){return n(t(e),8,-1)},rx}var ox,sx;function cx(){if(sx)return ox;sx=1;var e=ax(),t=L();return ox=function(n){if(e(n)===`Function`)return t(n)},ox}var lx,ux;function dx(){if(ux)return lx;ux=1;var e=typeof document==`object`&&document.all;return lx=e===void 0&&e!==void 0?function(t){return typeof t==`function`||t===e}:function(e){return typeof e==`function`},lx}var fx={},px,mx;function hx(){return mx||(mx=1,px=!I()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})),px}var gx,_x;function vx(){if(_x)return gx;_x=1;var e=Zb(),t=Function.prototype.call;return gx=e?t.bind(t):function(){return t.apply(t,arguments)},gx}var yx={},bx;function xx(){if(bx)return yx;bx=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor;return yx.f=t&&!e.call({1:2},1)?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,yx}var Sx,Cx;function wx(){return Cx||(Cx=1,Sx=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),Sx}var Tx,Ex;function Dx(){if(Ex)return Tx;Ex=1;var e=L(),t=I(),n=ax(),r=Object,i=e(``.split);return Tx=t(function(){return!r(`z`).propertyIsEnumerable(0)})?function(e){return n(e)===`String`?i(e,``):r(e)}:r,Tx}var Ox,kx;function Ax(){return kx||(kx=1,Ox=function(e){return e==null}),Ox}var jx,Mx;function Nx(){if(Mx)return jx;Mx=1;var e=Ax(),t=TypeError;return jx=function(n){if(e(n))throw new t(`Can't call method on `+n);return n},jx}var Px,Fx;function Ix(){if(Fx)return Px;Fx=1;var e=Dx(),t=Nx();return Px=function(n){return e(t(n))},Px}var Lx,Rx;function zx(){if(Rx)return Lx;Rx=1;var e=dx();return Lx=function(t){return typeof t==`object`?t!==null:e(t)},Lx}var Bx,Vx;function R(){return Vx||(Vx=1,Bx={}),Bx}var Hx,Ux;function Wx(){if(Ux)return Hx;Ux=1;var e=R(),t=Kb(),n=dx(),r=function(e){return n(e)?e:void 0};return Hx=function(n,i){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][i]||t[n]&&t[n][i]},Hx}var Gx,Kx;function qx(){return Kx||(Kx=1,Gx=L()({}.isPrototypeOf)),Gx}var Jx,Yx;function Xx(){if(Yx)return Jx;Yx=1;var e=Kb().navigator,t=e&&e.userAgent;return Jx=t?String(t):``,Jx}var Zx,Qx;function $x(){if(Qx)return Zx;Qx=1;var e=Kb(),t=Xx(),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]))),Zx=s,Zx}var eS,tS;function nS(){if(tS)return eS;tS=1;var e=$x(),t=I(),n=Kb().String;return eS=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol(`symbol detection`);return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),eS}var rS,iS;function aS(){return iS||(iS=1,rS=nS()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`),rS}var oS,sS;function cS(){if(sS)return oS;sS=1;var e=Wx(),t=dx(),n=qx(),r=aS(),i=Object;return oS=r?function(e){return typeof e==`symbol`}:function(r){var a=e(`Symbol`);return t(a)&&n(a.prototype,i(r))},oS}var lS,uS;function dS(){if(uS)return lS;uS=1;var e=String;return lS=function(t){try{return e(t)}catch{return`Object`}},lS}var fS,pS;function mS(){if(pS)return fS;pS=1;var e=dx(),t=dS(),n=TypeError;return fS=function(r){if(e(r))return r;throw new n(t(r)+` is not a function`)},fS}var hS,gS;function _S(){if(gS)return hS;gS=1;var e=mS(),t=Ax();return hS=function(n,r){var i=n[r];return t(i)?void 0:e(i)},hS}var vS,yS;function bS(){if(yS)return vS;yS=1;var e=vx(),t=dx(),n=zx(),r=TypeError;return vS=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`)},vS}var xS={exports:{}},SS,CS;function wS(){return CS||(CS=1,SS=!0),SS}var TS,ES;function DS(){if(ES)return TS;ES=1;var e=Kb(),t=Object.defineProperty;return TS=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch{e[n]=r}return r},TS}var OS;function kS(){if(OS)return xS.exports;OS=1;var e=wS(),t=Kb(),n=DS(),r=`__core-js_shared__`,i=xS.exports=t[r]||n(r,{});return(i.versions||=[]).push({version:`3.50.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.50.0/LICENSE`,source:`https://github.com/zloirock/core-js`}),xS.exports}var AS,jS;function MS(){if(jS)return AS;jS=1;var e=kS(),t=Object.create||Object;return AS=function(n,r){return e[n]||(e[n]=r||t(null))},AS}var NS,PS;function FS(){if(PS)return NS;PS=1;var e=Nx(),t=Object;return NS=function(n){return t(e(n))},NS}var IS,LS;function RS(){if(LS)return IS;LS=1;var e=L(),t=FS(),n=e({}.hasOwnProperty);return IS=Object.hasOwn||function(e,r){return n(t(e),r)},IS}var zS,BS;function VS(){if(BS)return zS;BS=1;var e=L(),t=0,n=Math.random(),r=e(1.1.toString);return zS=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+r(++t+n,36)},zS}var HS,US;function WS(){if(US)return HS;US=1;var e=Kb(),t=MS(),n=RS(),r=VS(),i=nS(),a=aS(),o=e.Symbol,s=t(`wks`),c=a?o.for||o:o&&o.withoutSetter||r;return HS=function(e){return n(s,e)||(s[e]=i&&n(o,e)?o[e]:c(`Symbol.`+e)),s[e]},HS}var GS,KS;function qS(){if(KS)return GS;KS=1;var e=vx(),t=zx(),n=cS(),r=_S(),i=bS(),a=WS(),o=TypeError,s=a(`toPrimitive`);return GS=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)},GS}var JS,YS;function XS(){if(YS)return JS;YS=1;var e=qS(),t=cS();return JS=function(n){var r=e(n,`string`);return t(r)?r:r+``},JS}var ZS,QS;function $S(){if(QS)return ZS;QS=1;var e=Kb(),t=zx(),n=e.document,r=t(n)&&t(n.createElement);return ZS=function(e){return r?n.createElement(e):{}},ZS}var eC,tC;function nC(){if(tC)return eC;tC=1;var e=hx(),t=I(),n=$S();return eC=!e&&!t(function(){return Object.defineProperty(n(`div`),"a",{get:function(){return 7}}).a!==7}),eC}var rC;function iC(){if(rC)return fx;rC=1;var e=hx(),t=vx(),n=xx(),r=wx(),i=Ix(),a=XS(),o=RS(),s=nC(),c=Object.getOwnPropertyDescriptor;return fx.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])},fx}var aC,oC;function sC(){if(oC)return aC;oC=1;var e=I(),t=dx(),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 aC=r,aC}var cC,lC;function uC(){if(lC)return cC;lC=1;var e=cx(),t=mS(),n=Zb(),r=e(e.bind);return cC=function(e,i){return t(e),i===void 0?e:n?r(e,i):function(){return e.apply(i,arguments)}},cC}var dC={},fC,pC;function mC(){return pC||(pC=1,fC=hx()&&I()(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})),fC}var hC,gC;function _C(){if(gC)return hC;gC=1;var e=zx(),t=String,n=TypeError;return hC=function(r){if(e(r))return r;throw new n(t(r)+` is not an object`)},hC}var vC;function yC(){if(vC)return dC;vC=1;var e=hx(),t=nC(),n=mC(),r=_C(),i=XS(),a=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=`enumerable`,l=`configurable`,u=`writable`;return dC.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},dC}var bC,xC;function SC(){if(xC)return bC;xC=1;var e=hx(),t=yC(),n=wx();return bC=e?function(e,r,i){return t.f(e,r,n(1,i))}:function(e,t,n){return e[t]=n,e},bC}var CC,wC;function z(){if(wC)return CC;wC=1;var e=Kb(),t=ex(),n=cx(),r=dx(),i=iC().f,a=sC(),o=R(),s=uC(),c=SC(),l=RS(),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 CC=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)))},CC}var TC,EC;function DC(){if(EC)return TC;EC=1;var e=Math.ceil,t=Math.floor;return TC=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},TC}var OC,kC;function AC(){if(kC)return OC;kC=1;var e=DC();return OC=function(t){var n=+t;return n!==n||n===0?0:e(n)},OC}var jC,MC;function NC(){if(MC)return jC;MC=1;var e=AC(),t=Math.max,n=Math.min;return jC=function(r,i){var a=e(r);return a<0?t(a+i,0):n(a,i)},jC}var PC,FC;function IC(){if(FC)return PC;FC=1;var e=AC(),t=Math.min;return PC=function(n){var r=e(n);return r>0?t(r,9007199254740991):0},PC}var LC,RC;function zC(){if(RC)return LC;RC=1;var e=IC();return LC=function(t){return e(t.length)},LC}var BC,VC;function HC(){if(VC)return BC;VC=1;var e=Ix(),t=NC(),n=zC(),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 BC={includes:r(!0),indexOf:r(!1)},BC}var UC,WC;function GC(){return WC||(WC=1,UC={}),UC}var KC,qC;function JC(){if(qC)return KC;qC=1;var e=L(),t=RS(),n=Ix(),r=HC().indexOf,i=GC(),a=e([].push);return KC=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},KC}var YC,XC;function ZC(){return XC||(XC=1,YC=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`]),YC}var QC,$C;function ew(){if($C)return QC;$C=1;var e=JC(),t=ZC();return QC=Object.keys||function(n){return e(n,t)},QC}var tw={},nw;function rw(){return nw||(nw=1,tw.f=Object.getOwnPropertySymbols),tw}var iw,aw;function ow(){if(aw)return iw;aw=1;var e=hx(),t=L(),n=vx(),r=I(),i=ew(),a=rw(),o=xx(),s=FS(),c=Dx(),l=Object.assign,u=Object.defineProperty,d=t([].concat);return iw=!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,iw}var sw;function cw(){if(sw)return Ub;sw=1;var e=z(),t=ow();return e({target:`Object`,stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),Ub}var lw,uw;function dw(){return uw||(uw=1,cw(),lw=R().Object.assign),lw}var fw,pw;function mw(){return pw||(pw=1,fw=dw()),fw}var hw,gw;function _w(){return gw||(gw=1,hw=mw()),hw}var vw=F(_w()),yw={},bw,xw;function Sw(){return xw||(xw=1,bw=L()([].slice)),bw}var Cw,ww;function Tw(){if(ww)return Cw;ww=1;var e=L(),t=mS(),n=zx(),r=RS(),i=Sw(),a=Zb(),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 Cw=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},Cw}var Ew;function Dw(){if(Ew)return yw;Ew=1;var e=z(),t=Tw();return e({target:`Function`,proto:!0,forced:Function.bind!==t},{bind:t}),yw}var Ow,kw;function Aw(){if(kw)return Ow;kw=1;var e=Kb(),t=R();return Ow=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]},Ow}var jw,Mw;function Nw(){return Mw||(Mw=1,Dw(),jw=Aw()(`Function`,`bind`)),jw}var Pw,Fw;function Iw(){if(Fw)return Pw;Fw=1;var e=qx(),t=Nw(),n=Function.prototype;return Pw=function(r){var i=r.bind;return r===n||e(n,r)&&i===n.bind?t:i},Pw}var Lw,Rw;function zw(){return Rw||(Rw=1,Lw=Iw()),Lw}var Bw,Vw;function Hw(){return Vw||(Vw=1,Bw=zw()),Bw}var B=F(Hw());function Uw(e,t,n,r){e.beginPath(),e.arc(t,n,r,0,2*Math.PI,!1),e.closePath()}function Ww(e,t,n,r){e.beginPath(),e.rect(t-r,n-r,r*2,r*2),e.closePath()}function Gw(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 Kw(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 qw(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 Jw(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 Yw(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 Xw(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 Zw(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 Qw(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 $w(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 eT={circle:Uw,dashedLine:Qw,database:Zw,diamond:Jw,ellipse:Xw,ellipse_vis:Xw,hexagon:$w,roundRect:Yw,square:Ww,star:qw,triangle:Gw,triangleDown:Kw};function tT(e){return Object.prototype.hasOwnProperty.call(eT,e)?eT[e]:function(t){var n=[...arguments].slice(1);CanvasRenderingContext2D.prototype[e].call(t,n)}}var nT={exports:{}},rT;function iT(){return rT||(rT=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}})(nT)),nT.exports}var aT=F(iT()),oT={},sT,cT;function lT(){if(cT)return sT;cT=1;var e=ax();return sT=Array.isArray||function(t){return e(t)===`Array`},sT}var uT;function dT(){return uT||(uT=1,z()({target:`Array`,stat:!0},{isArray:lT()})),oT}var fT,pT;function mT(){return pT||(pT=1,dT(),fT=R().Array.isArray),fT}var hT,gT;function _T(){return gT||(gT=1,hT=mT()),hT}var vT,yT;function bT(){return yT||(yT=1,vT=_T()),vT}var xT,ST;function CT(){return ST||(ST=1,xT=bT()),xT}var wT,TT;function ET(){return TT||(TT=1,wT=CT()),wT}var DT=F(ET());function OT(e){if(DT(e))return e}var kT={},AT,jT;function MT(){if(jT)return AT;jT=1;var e=TypeError,t=9007199254740991;return AT=function(n){if(n>t)throw new e(`Maximum allowed index exceeded`);return n},AT}var NT,PT;function FT(){if(PT)return NT;PT=1;var e=hx(),t=yC(),n=wx();return NT=function(r,i,a){e?t.f(r,i,n(0,a)):r[i]=a},NT}var IT,LT;function RT(){if(LT)return IT;LT=1;var e=hx(),t=lT(),n=TypeError,r=Object.getOwnPropertyDescriptor;return IT=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},IT}var zT,BT;function VT(){if(BT)return zT;BT=1;var e=WS()(`toStringTag`),t={};return t[e]=`z`,zT=String(t)===`[object z]`,zT}var HT,UT;function WT(){if(UT)return HT;UT=1;var e=VT(),t=dx(),n=ax(),r=WS()(`toStringTag`),i=Object,a=n(function(){return arguments}())===`Arguments`,o=function(e,t){try{return e[t]}catch{}};return HT=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},HT}var GT,KT;function qT(){if(KT)return GT;KT=1;var e=L(),t=dx(),n=kS(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),GT=n.inspectSource,GT}var JT,YT;function XT(){if(YT)return JT;YT=1;var e=L(),t=I(),n=dx(),r=WT(),i=Wx(),a=qT(),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,JT=!s||t(function(){var e;return d(d.call)||!d(Object)||!d(function(){e=!0})||e})?f:d,JT}var ZT,QT;function $T(){if(QT)return ZT;QT=1;var e=lT(),t=XT(),n=zx(),r=WS()(`species`),i=Array;return ZT=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},ZT}var eE,tE;function nE(){if(tE)return eE;tE=1;var e=$T();return eE=function(t,n){return new(e(t))(n===0?0:n)},eE}var rE,iE;function aE(){if(iE)return rE;iE=1;var e=I(),t=WS(),n=$x(),r=t(`species`);return rE=function(t){return n>=51||!e(function(){var e=[],n=e.constructor={};return n[r]=function(){return{foo:1}},e[t](Boolean).foo!==1})},rE}var oE;function sE(){if(oE)return kT;oE=1;var e=z(),t=I(),n=lT(),r=zx(),i=FS(),a=zC(),o=MT(),s=FT(),c=RT(),l=nE(),u=aE(),d=WS(),f=$x(),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){for(var t=i(this),n=l(t,0),r=0,u=-1,d,f=arguments.length,p,m;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}}),kT}var cE={},lE={},uE,dE;function fE(){if(dE)return uE;dE=1;var e=WT(),t=String;return uE=function(n){if(e(n)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return t(n)},uE}var pE={},mE;function hE(){if(mE)return pE;mE=1;var e=hx(),t=mC(),n=yC(),r=_C(),i=Ix(),a=ew();return pE.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},pE}var gE,_E;function vE(){return _E||(_E=1,gE=Wx()(`document`,`documentElement`)),gE}var yE,bE;function xE(){if(bE)return yE;bE=1;var e=MS(),t=VS(),n=e(`keys`);return yE=function(e){return n[e]||(n[e]=t(e))},yE}var SE,CE;function wE(){if(CE)return SE;CE=1;var e=_C(),t=hE(),n=ZC(),r=GC(),i=vE(),a=$S(),o=xE(),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,SE=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)},SE}var TE={},EE;function DE(){if(EE)return TE;EE=1;var e=JC(),t=ZC().concat(`length`,`prototype`);return TE.f=Object.getOwnPropertyNames||function(n){return e(n,t)},TE}var OE={},kE;function AE(){if(kE)return OE;kE=1;var e=ax(),t=Ix(),n=DE().f,r=Sw(),i=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return n(e)}catch{return r(i)}};return OE.f=function(r){return i&&e(r)===`Window`?a(r):n(t(r))},OE}var jE,ME;function NE(){if(ME)return jE;ME=1;var e=SC();return jE=function(t,n,r,i){return i&&i.enumerable?t[n]=r:e(t,n,r),t},jE}var PE,FE;function IE(){if(FE)return PE;FE=1;var e=yC();return PE=function(t,n,r){return e.f(t,n,r)},PE}var LE={},RE;function zE(){return RE||(RE=1,LE.f=WS()),LE}var BE,VE;function HE(){if(VE)return BE;VE=1;var e=R(),t=RS(),n=zE(),r=yC().f;return BE=function(i){var a=e.Symbol||={};t(a,i)||r(a,i,{value:n.f(i)})},BE}var UE,WE;function GE(){if(WE)return UE;WE=1;var e=vx(),t=Wx(),n=WS(),r=NE();return UE=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})},UE}var KE,qE;function JE(){if(qE)return KE;qE=1;var e=VT(),t=WT();return KE=e?{}.toString:function(){return`[object `+t(this)+`]`},KE}var YE,XE;function ZE(){if(XE)return YE;XE=1;var e=VT(),t=yC().f,n=SC(),r=RS(),i=JE(),a=WS()(`toStringTag`);return YE=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))},YE}var QE,$E;function eD(){if($E)return QE;$E=1;var e=Kb(),t=dx(),n=e.WeakMap;return QE=t(n)&&/native code/.test(String(n)),QE}var tD,nD;function rD(){if(nD)return tD;nD=1;var e=eD(),t=Kb(),n=zx(),r=SC(),i=RS(),a=kS(),o=xE(),s=GC(),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 tD={set:d,get:f,has:p,enforce:m,getterFor:h},tD}var iD,aD;function oD(){if(aD)return iD;aD=1;var e=uC(),t=Dx(),n=FS(),r=zC(),i=nE(),a=FT(),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 iD={forEach:o(0),map:o(1),filter:o(2),some:o(3),every:o(4),find:o(5),findIndex:o(6),filterReject:o(7)},iD}var sD;function cD(){if(sD)return lE;sD=1;var e=z(),t=Kb(),n=vx(),r=L(),i=wS(),a=hx(),o=nS(),s=I(),c=RS(),l=qx(),u=_C(),d=Ix(),f=XS(),p=fE(),m=wx(),h=wE(),g=ew(),_=DE(),v=AE(),y=rw(),b=iC(),x=yC(),S=hE(),C=xx(),w=NE(),T=IE(),E=MS(),D=xE(),ee=GC(),O=VS(),k=WS(),A=zE(),j=HE(),te=GE(),ne=ZE(),re=rD(),M=oD().forEach,N=D(`hidden`),ie=`Symbol`,ae=`prototype`,oe=re.set,se=re.getterFor(ie),ce=Object[ae],le=t.Symbol,ue=le&&le[ae],de=t.RangeError,fe=t.TypeError,pe=t.QObject,me=b.f,he=x.f,ge=v.f,_e=C.f,ve=r([].push),ye=E(`symbols`),be=E(`op-symbols`),xe=E(`wks`),Se=!pe||!pe[ae]||!pe[ae].findChild,Ce=function(e,t,n){var r=me(ce,t);return r&&delete ce[t],he(e,t,n),r&&e!==ce&&he(ce,t,r),e},we=a&&s(function(){return h(he({},`a`,{get:function(){return he(this,`a`,{value:7}).a}})).a!==7})?Ce:he,Te=function(e,t){var n=ye[e]=h(ue);return oe(n,{type:ie,tag:e,description:t}),a||(n.description=t),n},Ee=function(e,t,n){e===ce&&Ee(be,t,n),u(e);var r=f(t);return u(n),c(ye,r)?((`enumerable`in n?!n.enumerable:!c(e,r)||c(e,N)&&e[N][r])?(c(e,N)||he(e,N,m(1,h(null))),e[N][r]=!0):(c(e,N)&&e[N][r]&&(e[N][r]=!1),n=h(n,{enumerable:m(0,!1)})),we(e,r,n)):he(e,r,n)},De=function(e,t){u(e);var r=d(t);return M(g(r).concat(Me(r)),function(t){(!a||n(ke,r,t))&&Ee(e,t,r[t])}),e},Oe=function(e,t){return t===void 0?h(e):De(h(e),t)},ke=function(e){var t=f(e),r=n(_e,this,t);return this===ce&&c(ye,t)&&!c(be,t)?!1:r||!c(this,t)||!c(ye,t)||c(this,N)&&this[N][t]?r:!0},Ae=function(e,t){var n=d(e),r=f(t);if(n!==ce||!c(ye,r)||c(be,r)){var i=me(n,r);return i&&c(ye,r)&&!(c(n,N)&&n[N][r])&&(i.enumerable=!0),i}},je=function(e){var t=ge(d(e)),n=[];return M(t,function(e){!c(ye,e)&&!c(ee,e)&&ve(n,e)}),n},Me=function(e){var t=e===ce,n=ge(t?be:d(e)),r=[];return M(n,function(e){c(ye,e)&&(!t||c(ce,e))&&ve(r,ye[e])}),r};return o||(le=function(){if(l(ue,this))throw new fe(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:p(arguments[0]),r=O(e),i=function(e){var a=this===void 0?t:this;a===ce&&n(i,be,e),c(a,N)&&c(a[N],r)&&(a[N][r]=!1);var o=m(1,e);try{we(a,r,o)}catch(e){if(!(e instanceof de))throw e;Ce(a,r,o)}};return a&&Se&&we(ce,r,{configurable:!0,set:i}),Te(r,e)},ue=le[ae],w(ue,`toString`,function(){return se(this).tag}),w(le,`withoutSetter`,function(e){return Te(O(e),e)}),C.f=ke,x.f=Ee,S.f=De,b.f=Ae,_.f=v.f=je,y.f=Me,A.f=function(e){return Te(k(e),e)},a&&(T(ue,`description`,{configurable:!0,get:function(){return se(this).description}}),i||w(ce,`propertyIsEnumerable`,ke,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:le}),M(g(xe),function(e){j(e)}),e({target:ie,stat:!0,forced:!o},{useSetter:function(){Se=!0},useSimple:function(){Se=!1}}),e({target:`Object`,stat:!0,forced:!o,sham:!a},{create:Oe,defineProperty:Ee,defineProperties:De,getOwnPropertyDescriptor:Ae}),e({target:`Object`,stat:!0,forced:!o},{getOwnPropertyNames:je}),te(),ne(le,ie),ee[N]=!0,lE}var lD={},uD,dD;function fD(){return dD||(dD=1,uD=nS()&&!!Symbol.for&&!!Symbol.keyFor),uD}var pD;function mD(){if(pD)return lD;pD=1;var e=z(),t=Wx(),n=RS(),r=fE(),i=MS(),a=fD(),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}}),lD}var hD={},gD;function _D(){if(gD)return hD;gD=1;var e=z(),t=RS(),n=cS(),r=dS(),i=MS(),a=fD(),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]}}),hD}var vD={},yD,bD;function xD(){if(bD)return yD;bD=1;var e=zx(),t=rD().get;return yD=function(n){if(!e(n))return!1;var r=t(n);return!!r&&r.type===`RawJSON`},yD}var SD,CD;function wD(){return CD||(CD=1,SD=L()(1.1.valueOf)),SD}var TD,ED;function DD(){if(ED)return TD;ED=1;var e=L(),t=RS(),n=SyntaxError,r=parseInt,i=String.fromCharCode,a=e(``.charAt),o=e(``.slice),s=e(/./.exec),c={'\\"':`"`,"\\\\":`\\`,"\\/":`/`,"\\b":`\b`,"\\f":`\f`,"\\n":`
5
+ `,"\\r":`\r`,"\\t":` `},l=/^[\da-f]{4}$/i,u=/^[\u0000-\u001F]$/;return TD=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}},TD}var OD,kD;function AD(){return kD||(kD=1,OD=!I()(function(){var e=`9007199254740993`,t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e})),OD}var jD;function MD(){if(jD)return vD;jD=1;var e=z(),t=Wx(),n=vx(),r=L(),i=I(),a=lT(),o=dx(),s=zx(),c=wE(),l=xD(),u=cS(),d=ax(),f=wD(),p=HC().includes,m=RS(),h=fE(),g=DD(),_=VS(),v=nS(),y=AD(),b=String,x=TypeError,S=t(`JSON`,`stringify`),C=t(`BigInt`),w=r(``.valueOf),T=r((!0).valueOf),E=C&&r(C.prototype.valueOf),D=r(/./.exec),ee=r(``.charAt),O=r(``.charCodeAt),k=r(``.replace),A=r(``.slice),j=r([].push),te=r([].pop),ne=r(1.1.toString),re=/[\uD800-\uDFFF]/g,M=/^[\uD800-\uDBFF]$/,N=/^[\uDC00-\uDFFF]$/,ie=/^\d+$/,ae=_(),oe=_(),se=_(),ce=ae.length,le=oe.length,ue=!v||i(function(){var e=t(`Symbol`)(`stringify detection`);return S([e])!==`[null]`||S({a:e})!==`{}`||S(Object(e))!==`{}`}),de=i(function(){return S(`\udf06\ud834`)!==`"\\udf06\\ud834"`||S(`\udead`)!==`"\\udead"`}),fe=y?t(`JSON`,`isRawJSON`):l,pe=ue?function(e,t,r){return S(e,function(e,r){var i=n(t,this,e,r);if(!u(i))return i},r)}:S,me=function(e,t,n){var r=ee(n,t-1),i=ee(n,t+1);return D(M,e)&&!D(N,i)||D(N,e)&&!D(M,r)?`\\u`+ne(O(e,0),16):e},he=function(e){if(a(e)){for(var t=e.length,n=[],r=c(null),i=0;i<t;i++){var o=e[i],s;if(typeof o==`string`)s=o;else if(typeof o==`number`||d(o)===`Number`||d(o)===`String`)s=h(o);else continue;m(r,s)||(r[s]=!0,j(n,s))}return n}},ge=function(e,t){try{return e(t),!0}catch{return!1}},_e=function(e){var t=d(e);return t===`Number`&&ge(f,e)||t===`String`&&ge(w,e)||t===`Boolean`&&ge(T,e)||!!E&&t===`BigInt`&&ge(E,e)},ve=function(e){if(!s(e)||o(e)||a(e))return!1;try{return!_e(e)}catch{return!0}},ye=function(e,t){return{toJSON:function(){var r=e[t];if(s(r)||typeof r==`bigint`){var i=r.toJSON;o(i)&&(r=n(i,r,t))}return r}}},be=function(e){for(var t=0,n=e.length;t<n;t++)if(D(ie,e[t]))return oe;return``},xe=function(e,t,n){for(var r=c(null),i=0,a=t.length;i<a;i++){var o=t[i];r[n+o]=ye(e,o)}return r[se]=null,r};return S&&e({target:`JSON`,stat:!0,arity:3,forced:ue||de||!y},{stringify:function(e,t,r){var i=o(t)?t:void 0,s=i?void 0:he(t),c=s&&be(s),l=[],u=[],d=[],f,m=!1,h=!0,_=pe(e,function(e,t){if(e=b(e),s){if(e===se){te(u),f=te(d);return}if(h)h=!1;else if(this!==f&&!a(this)&&!p(s,e))return}else i&&(t=n(i,this,e,t));if(fe(t))return y?t:(m=!0,ae+(j(l,t.rawJSON)-1));if(s&&ve(t)){if(p(u,t))throw new x(`Converting circular structure to JSON`);var r=xe(t,s,c);return j(u,t),j(d,f),f=r,c&&(m=!0),r}return t},r);if(typeof _!=`string`||(de&&(_=k(_,re,me)),!m))return _;for(var v=``,S=_.length,C=0;C<S;C++){var w=ee(_,C);if(w===`"`){var T=g(_,++C).end-1,E=A(_,C,T);A(E,0,ce)===ae?v+=l[A(E,ce)]:A(E,0,le)===oe?v+=`"`+A(E,le)+`"`:v+=`"`+E+`"`,C=T}else v+=w}return v}}),vD}var ND={},PD;function FD(){if(PD)return ND;PD=1;var e=z(),t=nS(),n=I(),r=rw(),i=FS();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)):[]}}),ND}var ID;function LD(){return ID||(ID=1,cD(),mD(),_D(),MD(),FD()),cE}var RD={},zD;function BD(){return zD||(zD=1,HE()(`asyncDispose`)),RD}var VD={},HD;function UD(){return HD||(HD=1,HE()(`asyncIterator`)),VD}var WD={},GD;function KD(){return GD||(GD=1,HE()(`dispose`)),WD}var qD={},JD;function YD(){return JD||(JD=1,HE()(`hasInstance`)),qD}var XD={},ZD;function QD(){return ZD||(ZD=1,HE()(`isConcatSpreadable`)),XD}var $D={},eO;function tO(){return eO||(eO=1,HE()(`iterator`)),$D}var nO={},rO;function iO(){return rO||(rO=1,HE()(`match`)),nO}var aO={},oO;function sO(){return oO||(oO=1,HE()(`matchAll`)),aO}var cO={},lO;function uO(){return lO||(lO=1,HE()(`replace`)),cO}var dO={},fO;function pO(){return fO||(fO=1,HE()(`search`)),dO}var mO={},hO;function gO(){return hO||(hO=1,HE()(`species`)),mO}var _O={},vO;function yO(){return vO||(vO=1,HE()(`split`)),_O}var bO={},xO;function SO(){if(xO)return bO;xO=1;var e=HE(),t=GE();return e(`toPrimitive`),t(),bO}var CO={},wO;function TO(){if(wO)return CO;wO=1;var e=Wx(),t=HE(),n=ZE();return t(`toStringTag`),n(e(`Symbol`),`Symbol`),CO}var EO={},DO;function OO(){return DO||(DO=1,HE()(`unscopables`)),EO}var kO={},AO;function jO(){return AO||(AO=1,ZE()(Kb().JSON,`JSON`,!0)),kO}var MO,NO;function PO(){return NO||(NO=1,sE(),LD(),BD(),UD(),KD(),YD(),QD(),tO(),iO(),sO(),uO(),pO(),gO(),yO(),SO(),TO(),OO(),jO(),MO=R().Symbol),MO}var FO={},IO,LO;function RO(){return LO||(LO=1,IO=function(){}),IO}var zO,BO;function VO(){return BO||(BO=1,zO=Object.create?Object.create(null):{}),zO}var HO,UO;function WO(){if(UO)return HO;UO=1;var e=hx(),t=RS(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,i=t(n,`name`);return HO={EXISTS:i,PROPER:i&&function(){}.name===`something`,CONFIGURABLE:i&&(!e||e&&r(n,`name`).configurable)},HO}var GO,KO;function qO(){return KO||(KO=1,GO=!I()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),GO}var JO,YO;function XO(){if(YO)return JO;YO=1;var e=RS(),t=dx(),n=FS(),r=xE(),i=qO(),a=r(`IE_PROTO`),o=Object,s=o.prototype;return JO=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},JO}var ZO,QO;function $O(){if(QO)return ZO;QO=1;var e=I(),t=dx(),n=zx(),r=wE(),i=XO(),a=NE(),o=WS(),s=wS(),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}),ZO={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:l},ZO}var ek,tk;function nk(){if(tk)return ek;tk=1;var e=$O().IteratorPrototype,t=wE(),n=wx(),r=ZE(),i=VO(),a=function(){return this};return ek=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},ek}var rk,ik;function ak(){if(ik)return rk;ik=1;var e=L(),t=mS();return rk=function(n,r,i){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[i]))}catch{}},rk}var ok,sk;function ck(){if(sk)return ok;sk=1;var e=zx();return ok=function(t){return e(t)||t===null},ok}var lk,uk;function dk(){if(uk)return lk;uk=1;var e=ck(),t=String,n=TypeError;return lk=function(r){if(e(r))return r;throw new n(`Can't set `+t(r)+` as a prototype`)},lk}var fk,pk;function mk(){if(pk)return fk;pk=1;var e=ak(),t=zx(),n=Nx(),r=dk();return fk=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),fk}var hk,gk;function _k(){if(gk)return hk;gk=1;var e=z(),t=vx(),n=wS(),r=WO(),i=dx(),a=nk(),o=XO(),s=mk(),c=ZE(),l=SC(),u=NE(),d=WS(),f=VO(),p=$O(),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 hk=function(r,d,p,C,w,T,E){a(p,d,C);var D=function(e){if(e===w&&j)return j;if(!_&&e&&e in k)return k[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`,O=!1,k=r.prototype,A=k[v]||k[`@@iterator`]||w&&k[w],j=!_&&A||D(w),te=d===`Array`&&k.entries||A,ne,re,M;if(te&&(ne=o(te.call(new r)),ne!==Object.prototype&&ne.next&&(!n&&o(ne)!==g&&(s?s(ne,g):i(ne[v])||u(ne,v,S)),c(ne,ee,!0,!0),n&&(f[ee]=S))),m&&w===b&&A&&A.name!==b&&(!n&&h?l(k,`name`,b):(O=!0,j=function(){return t(A,this)})),w){if(re={values:D(b),keys:T?j:D(y),entries:D(x)},E)for(M in re)(_||O||!(M in k))&&u(k,M,re[M]);else e({target:d,proto:!0,forced:_||O},re)}return(!n||E)&&k[v]!==j&&u(k,v,j,{name:w}),f[d]=j,re},hk}var vk,yk;function bk(){return yk||(yk=1,vk=function(e,t){return{value:e,done:t}}),vk}var xk,Sk;function Ck(){if(Sk)return xk;Sk=1;var e=Ix(),t=RO(),n=VO(),r=rD(),i=yC().f,a=_k(),o=bk(),s=wS(),c=hx(),l=`Array Iterator`,u=r.set,d=r.getterFor(l);xk=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 xk}var wk,Tk;function Ek(){return Tk||(Tk=1,wk={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}),wk}var Dk;function Ok(){if(Dk)return FO;Dk=1,Ck();var e=Ek(),t=Kb(),n=ZE(),r=VO();for(var i in e)n(t[i],i),r[i]=r.Array;return FO}var kk,Ak;function jk(){if(Ak)return kk;Ak=1;var e=PO();return Ok(),kk=e,kk}var Mk={},Nk;function Pk(){if(Nk)return Mk;Nk=1;var e=WS(),t=yC().f,n=e(`metadata`),r=Function.prototype;return r[n]===void 0&&t(r,n,{value:null}),Mk}var Fk={},Ik;function Lk(){return Ik||(Ik=1,BD()),Fk}var Rk={},zk;function Bk(){return zk||(zk=1,KD()),Rk}var Vk={},Hk;function Uk(){return Hk||(Hk=1,HE()(`metadata`)),Vk}var Wk,Gk;function Kk(){if(Gk)return Wk;Gk=1;var e=jk();return Pk(),Lk(),Bk(),Uk(),Wk=e,Wk}var qk={},Jk,Yk;function Xk(){if(Yk)return Jk;Yk=1;var e=Wx(),t=L(),n=e(`Symbol`),r=n.keyFor,i=t(n.prototype.valueOf);return Jk=n.isRegisteredSymbol||function(e){try{return r(i(e))!==void 0}catch{return!1}},Jk}var Zk;function Qk(){return Zk||(Zk=1,z()({target:`Symbol`,stat:!0},{isRegisteredSymbol:Xk()})),qk}var $k={},eA,tA;function nA(){if(tA)return eA;tA=1;for(var e=MS(),t=Wx(),n=L(),r=cS(),i=WS(),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 eA=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},eA}var rA;function iA(){return rA||(rA=1,z()({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:nA()})),$k}var aA={},oA;function sA(){return oA||(oA=1,HE()(`customMatcher`)),aA}var cA={},lA;function uA(){return lA||(lA=1,HE()(`observable`)),cA}var dA={},fA;function pA(){return fA||(fA=1,z()({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:Xk()})),dA}var mA={},hA;function gA(){return hA||(hA=1,z()({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:nA()})),mA}var _A={},vA;function yA(){return vA||(vA=1,HE()(`matcher`)),_A}var bA={},xA;function SA(){return xA||(xA=1,HE()(`metadataKey`)),bA}var CA={},wA;function TA(){return wA||(wA=1,HE()(`patternMatch`)),CA}var EA={},DA;function OA(){return DA||(DA=1,HE()(`replaceAll`)),EA}var kA,AA;function jA(){if(AA)return kA;AA=1;var e=Kk();return Qk(),iA(),sA(),uA(),pA(),gA(),yA(),SA(),TA(),OA(),kA=e,kA}var MA,NA;function PA(){return NA||(NA=1,MA=jA()),MA}var FA=F(PA()),IA={},LA,RA;function zA(){if(RA)return LA;RA=1;var e=L(),t=AC(),n=fE(),r=Nx(),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 LA={codeAt:s(!1),charAt:s(!0)},LA}var BA;function VA(){if(BA)return IA;BA=1;var e=zA().charAt,t=fE(),n=rD(),r=_k(),i=bk(),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))}),IA}var HA,UA;function WA(){if(UA)return HA;UA=1;var e=WT(),t=RS(),n=VO();return HA=function(r){var i=e(r);return i===`Arguments`&&(i=`Array`),t(n,i)?n[i]:void 0},HA}var GA,KA;function qA(){if(KA)return GA;KA=1;var e=WA(),t=WS()(`iterator`);return GA=function(n){return n[t]||n[`@@iterator`]||e(n)},GA}var JA,YA;function XA(){return YA||(YA=1,Ck(),VA(),JA=qA()),JA}var ZA,QA;function $A(){if(QA)return ZA;QA=1;var e=XA();return Ok(),ZA=e,ZA}var ej,tj;function nj(){return tj||(tj=1,ej=$A()),ej}var rj,ij;function aj(){return ij||(ij=1,rj=nj()),rj}var oj,sj;function cj(){return sj||(sj=1,oj=aj()),oj}var lj=F(cj()),uj={},dj;function fj(){if(dj)return uj;dj=1;var e=z(),t=FS(),n=zC(),r=RT(),i=MT();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}}),uj}var pj,mj;function hj(){return mj||(mj=1,fj(),pj=Aw()(`Array`,`push`)),pj}var gj,_j;function vj(){if(_j)return gj;_j=1;var e=qx(),t=hj(),n=Array.prototype;return gj=function(r){var i=r.push;return r===n||e(n,r)&&i===n.push?t:i},gj}var yj,bj;function xj(){return bj||(bj=1,yj=vj()),yj}var Sj,Cj;function wj(){return Cj||(Cj=1,Sj=xj()),Sj}var Tj,Ej;function Dj(){return Ej||(Ej=1,Tj=wj()),Tj}var Oj,kj;function Aj(){return kj||(kj=1,Oj=Dj()),Oj}var jj=F(Aj());function Mj(e,t){var n=e==null?null:FA!==void 0&&lj(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)&&(jj(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 Nj={},Pj;function Fj(){if(Pj)return Nj;Pj=1;var e=z(),t=lT(),n=XT(),r=zx(),i=NC(),a=zC(),o=Ix(),s=FT(),c=RT(),l=WS(),u=aE(),d=Sw(),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}}),Nj}var Ij,Lj;function Rj(){return Lj||(Lj=1,Fj(),Ij=Aw()(`Array`,`slice`)),Ij}var zj,Bj;function Vj(){if(Bj)return zj;Bj=1;var e=qx(),t=Rj(),n=Array.prototype;return zj=function(r){var i=r.slice;return r===n||e(n,r)&&i===n.slice?t:i},zj}var Hj,Uj;function Wj(){return Uj||(Uj=1,Hj=Vj()),Hj}var Gj,Kj;function qj(){return Kj||(Kj=1,Gj=Wj()),Gj}var Jj,Yj;function Xj(){return Yj||(Yj=1,Jj=qj()),Jj}var Zj,Qj;function $j(){return Qj||(Qj=1,Zj=Xj()),Zj}var eM=F($j()),tM={},nM,rM;function iM(){if(rM)return nM;rM=1;var e=vx(),t=_C(),n=_S();return nM=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},nM}var aM,oM;function sM(){if(oM)return aM;oM=1;var e=_C(),t=iM();return aM=function(n,r,i,a){try{return a?r(e(i)[0],i[1]):r(i)}catch(e){t(n,`throw`,e)}},aM}var cM,lM;function uM(){if(lM)return cM;lM=1;var e=WS(),t=VO(),n=e(`iterator`),r=Array.prototype;return cM=function(e){return e!==void 0&&(t.Array===e||r[n]===e)},cM}var dM,fM;function pM(){if(fM)return dM;fM=1;var e=_S(),t=Ax(),n=WA(),r=WS()(`iterator`);return dM=function(i){if(!t(i))return e(i,r)||e(i,`@@iterator`)||n(i)},dM}var mM,hM;function gM(){if(hM)return mM;hM=1;var e=vx(),t=dx(),n=_C(),r=dS(),i=pM(),a=TypeError;return mM=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`)},mM}var _M,vM;function yM(){if(vM)return _M;vM=1;var e=uC(),t=vx(),n=FS(),r=sM(),i=uM(),a=XT(),o=zC(),s=FT(),c=RT(),l=gM(),u=pM(),d=iM(),f=MT(),p=Array;return _M=function(m){var h=a(this),g=arguments.length,_=g>1?arguments[1]:void 0,v=_!==void 0;v&&(_=e(_,g>2?arguments[2]:void 0));var y=n(m),b=u(y),x=0,S,C,w,T,E,D;if(b&&!(this===p&&i(b)))for(C=h?new this:[],T=l(y,b),E=T.next;!(w=t(E,T)).done;x++){try{f(x)}catch(e){d(T,`throw`,e)}D=v?r(T,_,[w.value,x],!0):w.value;try{s(C,x,D)}catch(e){d(T,`throw`,e)}}else for(S=o(y),C=h?new this(S):p(S);S>x;x++)D=v?_(y[x],x):y[x],s(C,x,D);return c(C,x),C},_M}var bM,xM;function SM(){if(xM)return bM;xM=1;var e=WS()(`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 bM=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},bM}var CM;function wM(){if(CM)return tM;CM=1;var e=z(),t=yM();return e({target:`Array`,stat:!0,forced:!SM()(function(e){Array.from(e)})},{from:t}),tM}var TM,EM;function DM(){return EM||(EM=1,VA(),wM(),TM=R().Array.from),TM}var OM,kM;function AM(){return kM||(kM=1,OM=DM()),OM}var jM,MM;function NM(){return MM||(MM=1,jM=AM()),jM}var PM,FM;function IM(){return FM||(FM=1,PM=NM()),PM}var LM,RM;function zM(){return RM||(RM=1,LM=IM()),LM}var BM=F(zM());function VM(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 HM(e,t){if(e){var n;if(typeof e==`string`)return VM(e,t);var r=eM(n={}.toString.call(e)).call(n,8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?BM(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?VM(e,t):void 0}}function UM(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
6
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WM(e,t){return OT(e)||Mj(e,t)||HM(e,t)||UM()}var GM,KM;function qM(){return KM||(KM=1,GM=jk()),GM}var JM=F(qM()),YM,XM;function ZM(){return XM||(XM=1,YM=Wj()),YM}var QM=F(ZM()),$M,eN;function tN(){if(eN)return $M;eN=1;var e=Wx(),t=L(),n=DE(),r=rw(),i=_C(),a=t([].concat);return $M=e(`Reflect`,`ownKeys`)||function(e){var t=n.f(i(e)),o=r.f;return o?a(t,o(e)):t},$M}var nN,rN;function iN(){return rN||(rN=1,nN=_T()),nN}var aN=F(iN()),oN={},sN;function cN(){if(sN)return oN;sN=1;var e=z(),t=oD().map;return e({target:`Array`,proto:!0,forced:!aE()(`map`)},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),oN}var lN,uN;function dN(){return uN||(uN=1,cN(),lN=Aw()(`Array`,`map`)),lN}var fN,pN;function mN(){if(pN)return fN;pN=1;var e=qx(),t=dN(),n=Array.prototype;return fN=function(r){var i=r.map;return r===n||e(n,r)&&i===n.map?t:i},fN}var hN,gN;function _N(){return gN||(gN=1,hN=mN()),hN}var vN,yN;function bN(){return yN||(yN=1,vN=_N()),vN}var xN=F(bN()),SN={},CN;function wN(){if(CN)return SN;CN=1;var e=z(),t=FS(),n=ew();return e({target:`Object`,stat:!0,forced:I()(function(){n(1)})},{keys:function(e){return n(t(e))}}),SN}var TN,EN;function DN(){return EN||(EN=1,wN(),TN=R().Object.keys),TN}var ON,kN;function AN(){return kN||(kN=1,ON=DN()),ON}var jN,MN;function NN(){return MN||(MN=1,jN=AN()),jN}var PN=F(NN()),FN={},IN;function LN(){if(IN)return FN;IN=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)}}),FN}var RN,zN;function BN(){return zN||(zN=1,LN(),RN=R().Date.now),RN}var VN,HN;function UN(){return HN||(HN=1,VN=BN()),VN}var WN,GN;function KN(){return GN||(GN=1,WN=UN()),WN}var qN=F(KN()),JN={},YN,XN;function ZN(){if(XN)return YN;XN=1;var e=I();return YN=function(t,n){var r=[][t];return!!r&&e(function(){r.call(null,n||function(){return 1},1)})},YN}var QN,$N;function eP(){if($N)return QN;$N=1;var e=oD().forEach;return QN=ZN()(`forEach`)?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},QN}var tP;function nP(){if(tP)return JN;tP=1;var e=z(),t=eP();return e({target:`Array`,proto:!0,forced:[].forEach!==t},{forEach:t}),JN}var rP,iP;function aP(){return iP||(iP=1,nP(),rP=Aw()(`Array`,`forEach`)),rP}var oP,sP;function cP(){return sP||(sP=1,oP=aP()),oP}var lP,uP;function dP(){if(uP)return lP;uP=1;var e=WT(),t=RS(),n=qx(),r=cP(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return lP=function(o){var s=o.forEach;return o===i||n(i,o)&&s===i.forEach||t(a,e(o))?r:s},lP}var fP,pP;function mP(){return pP||(pP=1,fP=dP()),fP}var V=F(mP()),hP={},gP,_P;function vP(){if(_P)return gP;_P=1;var e=dS(),t=TypeError;return gP=function(n,r){if(!delete n[r])throw new t(`Cannot delete property `+e(r)+` of `+e(n))},gP}var yP;function bP(){if(yP)return hP;yP=1;var e=z(),t=FS(),n=NC(),r=AC(),i=zC(),a=RT(),o=MT(),s=nE(),c=FT(),l=vP(),u=aE()(`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}}),hP}var xP,SP;function CP(){return SP||(SP=1,bP(),xP=Aw()(`Array`,`splice`)),xP}var wP,TP;function EP(){if(TP)return wP;TP=1;var e=qx(),t=CP(),n=Array.prototype;return wP=function(r){var i=r.splice;return r===n||e(n,r)&&i===n.splice?t:i},wP}var DP,OP;function kP(){return OP||(OP=1,DP=EP()),DP}var AP,jP;function MP(){return jP||(jP=1,AP=kP()),AP}var NP=F(MP()),PP={},FP;function IP(){if(FP)return PP;FP=1;var e=z(),t=HC().includes,n=I(),r=RO(),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`),PP}var LP,RP;function zP(){return RP||(RP=1,IP(),LP=Aw()(`Array`,`includes`)),LP}var BP={},VP,HP;function UP(){if(HP)return VP;HP=1;var e=zx(),t=ax(),n=WS()(`match`);return VP=function(r){var i;return e(r)&&((i=r[n])===void 0?t(r)===`RegExp`:!!i)},VP}var WP,GP;function KP(){if(GP)return WP;GP=1;var e=UP(),t=TypeError;return WP=function(n){if(e(n))throw new t(`The method doesn't accept regular expressions`);return n},WP}var qP,JP;function YP(){if(JP)return qP;JP=1;var e=WS()(`match`);return qP=function(t){var n=/./;try{`/./`[t](n)}catch{try{return n[e]=!1,`/./`[t](n)}catch{}}return!1},qP}var XP;function ZP(){if(XP)return BP;XP=1;var e=z(),t=L(),n=KP(),r=Nx(),i=fE(),a=YP(),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)}}),BP}var QP,$P;function eF(){return $P||($P=1,ZP(),QP=Aw()(`String`,`includes`)),QP}var tF,nF;function rF(){if(nF)return tF;nF=1;var e=qx(),t=zP(),n=eF(),r=Array.prototype,i=String.prototype;return tF=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},tF}var iF,aF;function oF(){return aF||(aF=1,iF=rF()),iF}var sF,cF;function lF(){return cF||(cF=1,sF=oF()),sF}var uF=F(lF()),dF={},fF;function pF(){if(fF)return dF;fF=1;var e=z(),t=I(),n=FS(),r=XO(),i=qO();return e({target:`Object`,stat:!0,forced:t(function(){r(1)}),sham:!i},{getPrototypeOf:function(e){return r(n(e))}}),dF}var mF,hF;function gF(){return hF||(hF=1,pF(),mF=R().Object.getPrototypeOf),mF}var _F,vF;function yF(){return vF||(vF=1,_F=gF()),_F}var bF,xF;function SF(){return xF||(xF=1,bF=yF()),bF}var CF=F(SF()),wF,TF;function EF(){return TF||(TF=1,sE(),wF=Aw()(`Array`,`concat`)),wF}var DF,OF;function kF(){if(OF)return DF;OF=1;var e=qx(),t=EF(),n=Array.prototype;return DF=function(r){var i=r.concat;return r===n||e(n,r)&&i===n.concat?t:i},DF}var AF,jF;function MF(){return jF||(jF=1,AF=kF()),AF}var NF,PF;function FF(){return PF||(PF=1,NF=MF()),NF}var IF=F(FF()),LF={},RF;function zF(){if(RF)return LF;RF=1;var e=z(),t=oD().filter;return e({target:`Array`,proto:!0,forced:!aE()(`filter`)},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),LF}var BF,VF;function HF(){return VF||(VF=1,zF(),BF=Aw()(`Array`,`filter`)),BF}var UF,WF;function GF(){if(WF)return UF;WF=1;var e=qx(),t=HF(),n=Array.prototype;return UF=function(r){var i=r.filter;return r===n||e(n,r)&&i===n.filter?t:i},UF}var KF,qF;function JF(){return qF||(qF=1,KF=GF()),KF}var YF,XF;function ZF(){return XF||(XF=1,YF=JF()),YF}var QF=F(ZF()),$F={},eI,tI;function nI(){if(tI)return eI;tI=1;var e=hx(),t=I(),n=L(),r=XO(),i=ew(),a=Ix(),o=xx().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 eI={entries:u(!0),values:u(!1)},eI}var rI;function iI(){if(rI)return $F;rI=1;var e=z(),t=nI().values;return e({target:`Object`,stat:!0},{values:function(e){return t(e)}}),$F}var aI,oI;function sI(){return oI||(oI=1,iI(),aI=R().Object.values),aI}var cI,lI;function uI(){return lI||(lI=1,cI=sI()),cI}var dI,fI;function pI(){return fI||(fI=1,dI=uI()),dI}var mI=F(pI()),hI={},gI,_I;function vI(){return _I||(_I=1,gI=`
7
+ \v\f\r \xA0               \u2028\u2029`),gI}var yI,bI;function xI(){if(bI)return yI;bI=1;var e=L(),t=Nx(),n=fE(),r=vI(),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 yI={start:s(1),end:s(2),trim:s(3)},yI}var SI,CI;function wI(){if(CI)return SI;CI=1;var e=Kb(),t=I(),n=L(),r=fE(),i=xI().trim,a=vI(),o=e.parseInt,s=e.Symbol,c=s&&s.iterator,l=/^[+-]?0x/i,u=n(l.exec);return SI=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,SI}var TI;function EI(){if(TI)return hI;TI=1;var e=z(),t=wI();return e({global:!0,forced:parseInt!==t},{parseInt:t}),hI}var DI,OI;function kI(){return OI||(OI=1,EI(),DI=R().parseInt),DI}var AI,jI;function MI(){return jI||(jI=1,AI=kI()),AI}var NI,PI;function FI(){return PI||(PI=1,NI=MI()),NI}var II=F(FI()),LI={},RI;function zI(){if(RI)return LI;RI=1;var e=z(),t=cx(),n=HC().indexOf,r=ZN(),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)}}),LI}var BI,VI;function HI(){return VI||(VI=1,zI(),BI=Aw()(`Array`,`indexOf`)),BI}var UI,WI;function GI(){if(WI)return UI;WI=1;var e=qx(),t=HI(),n=Array.prototype;return UI=function(r){var i=r.indexOf;return r===n||e(n,r)&&i===n.indexOf?t:i},UI}var KI,qI;function JI(){return qI||(qI=1,KI=GI()),KI}var YI,XI;function ZI(){return XI||(XI=1,YI=JI()),YI}var H=F(ZI()),QI={},$I;function eL(){return $I||($I=1,z()({target:`Object`,stat:!0,sham:!hx()},{create:wE()})),QI}var tL,nL;function rL(){if(nL)return tL;nL=1,eL();var e=R().Object;return tL=function(t,n){return e.create(t,n)},tL}var iL,aL;function oL(){return aL||(aL=1,iL=rL()),iL}var sL,cL;function lL(){return cL||(cL=1,sL=oL()),sL}var uL=F(lL()),dL={},fL,pL;function mL(){if(pL)return fL;pL=1;var e=AC(),t=fE(),n=Nx(),r=RangeError,i=Math.floor;return fL=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},fL}var hL,gL;function _L(){if(gL)return hL;gL=1;var e=L(),t=IC(),n=fE(),r=mL(),i=Nx(),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 hL={start:c(!1),end:c(!0)},hL}var vL,yL;function bL(){if(yL)return vL;yL=1;var e=L(),t=I(),n=_L().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 vL=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,vL}var xL;function SL(){if(xL)return dL;xL=1;var e=z(),t=vx(),n=FS(),r=qS(),i=bL(),a=ax();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()}}),dL}var CL,wL;function TL(){if(wL)return CL;wL=1,SL(),MD();var e=R(),t=ex();return e.JSON||={stringify:JSON.stringify},CL=function(n,r,i){return t(e.JSON.stringify,null,arguments)},CL}var EL,DL;function OL(){return DL||(DL=1,EL=TL()),EL}var kL,AL;function jL(){return AL||(AL=1,kL=OL()),kL}var ML=F(jL()),NL={},PL={},FL,IL;function LL(){if(IL)return FL;IL=1;var e=Kb(),t=Xx(),n=ax(),r=function(e){return t.slice(0,e.length)===e};return FL=(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`})(),FL}var RL,zL;function BL(){if(zL)return RL;zL=1;var e=TypeError;return RL=function(t,n){if(t<n)throw new e(`Not enough arguments`);return t},RL}var VL,HL;function UL(){if(HL)return VL;HL=1;var e=Kb(),t=ex(),n=dx(),r=LL(),i=Xx(),a=Sw(),o=BL(),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 VL=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},VL}var WL;function GL(){if(WL)return PL;WL=1;var e=z(),t=Kb(),n=UL()(t.setInterval,!0);return e({global:!0,bind:!0,forced:t.setInterval!==n},{setInterval:n}),PL}var KL={},qL;function JL(){if(qL)return KL;qL=1;var e=z(),t=Kb(),n=UL()(t.setTimeout,!0);return e({global:!0,bind:!0,forced:t.setTimeout!==n},{setTimeout:n}),KL}var YL;function XL(){return YL||(YL=1,GL(),JL()),NL}var ZL,QL;function $L(){return QL||(QL=1,XL(),ZL=R().setTimeout),ZL}var eR,tR;function nR(){return tR||(tR=1,eR=$L()),eR}var rR=F(nR()),iR={},aR,oR;function sR(){if(oR)return aR;oR=1;var e=FS(),t=NC(),n=zC();return aR=[].fill||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},aR}var cR;function lR(){if(cR)return iR;cR=1;var e=z(),t=sR(),n=RO();return e({target:`Array`,proto:!0},{fill:t}),n(`fill`),iR}var uR,dR;function fR(){return dR||(dR=1,lR(),uR=Aw()(`Array`,`fill`)),uR}var pR,mR;function hR(){if(mR)return pR;mR=1;var e=qx(),t=fR(),n=Array.prototype;return pR=function(r){var i=r.fill;return r===n||e(n,r)&&i===n.fill?t:i},pR}var gR,_R;function vR(){return _R||(_R=1,gR=hR()),gR}var yR,bR;function xR(){return bR||(bR=1,yR=vR()),yR}var SR=F(xR());function CR(){return CR=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},CR.apply(this,arguments)}function wR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function TR(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var ER=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},DR=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],OR=typeof document>`u`?{style:{}}:document.createElement(`div`),kR=`function`,AR=Math.round,jR=Math.abs,MR=Date.now;function NR(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<DR.length;){if(n=DR[a],r=n?n+i:t,r in e)return r;a++}}var PR=typeof window>`u`?{}:window,FR=NR(OR.style,`touchAction`),IR=FR!==void 0;function LR(){if(!IR)return!1;var e={},t=PR.CSS&&PR.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach(function(n){return e[n]=!t||PR.CSS.supports(`touch-action`,n)}),e}var RR=`compute`,zR=`auto`,BR=`manipulation`,VR=`none`,HR=`pan-x`,UR=`pan-y`,WR=LR(),GR=/mobile|tablet|ip(ad|hone|od)|android/i,KR=`ontouchstart`in PR,qR=NR(PR,`PointerEvent`)!==void 0,JR=KR&&GR.test(navigator.userAgent),YR=`touch`,XR=`pen`,ZR=`mouse`,QR=`kinect`,$R=25,ez=1,tz=2,nz=4,rz=8,iz=1,az=2,oz=4,sz=8,cz=16,lz=az|oz,uz=sz|cz,dz=lz|uz,fz=[`x`,`y`],pz=[`clientX`,`clientY`];function mz(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 hz(e,t){return typeof e===kR?e.apply(t&&t[0]||void 0,t):e}function gz(e,t){return e.indexOf(t)>-1}function _z(e){if(gz(e,VR))return VR;var t=gz(e,HR),n=gz(e,UR);return t&&n?VR:t||n?t?HR:UR:gz(e,BR)?BR:zR}var vz=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===RR&&(e=this.compute()),IR&&this.manager.element.style&&WR[e]&&(this.manager.element.style[FR]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return mz(this.manager.recognizers,function(t){hz(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),_z(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=gz(r,VR)&&!WR[VR],a=gz(r,UR)&&!WR[UR],o=gz(r,HR)&&!WR[HR];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&lz||o&&n&uz))return this.preventSrc(t)}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function yz(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function bz(e){var t=e.length;if(t===1)return{x:AR(e[0].clientX),y:AR(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:AR(n/t),y:AR(r/t)}}function xz(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:AR(e.pointers[n].clientX),clientY:AR(e.pointers[n].clientY)},n++;return{timeStamp:MR(),pointers:t,center:bz(t),deltaX:e.deltaX,deltaY:e.deltaY}}function Sz(e,t,n){n||=fz;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function Cz(e,t,n){n||=fz;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.atan2(i,r)*180/Math.PI}function wz(e,t){return e===t?iz:jR(e)>=jR(t)?e<0?az:oz:t<0?sz:cz}function Tz(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===ez||a.eventType===nz)&&(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 Ez(e,t,n){return{x:t/e||0,y:n/e||0}}function Dz(e,t){return Sz(t[0],t[1],pz)/Sz(e[0],e[1],pz)}function Oz(e,t){return Cz(t[1],t[0],pz)+Cz(e[1],e[0],pz)}function kz(e,t){var n=e.lastInterval||t,r=t.timeStamp-n.timeStamp,i,a,o,s;if(t.eventType!==rz&&(r>$R||n.velocity===void 0)){var c=t.deltaX-n.deltaX,l=t.deltaY-n.deltaY,u=Ez(r,c,l);a=u.x,o=u.y,i=jR(u.x)>jR(u.y)?u.x:u.y,s=wz(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 Az(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=xz(t),i>1&&!n.firstMultiple?n.firstMultiple=xz(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=bz(r);t.timeStamp=MR(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=Cz(s,c),t.distance=Sz(s,c),Tz(n,t),t.offsetDirection=wz(t.deltaX,t.deltaY);var l=Ez(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=jR(l.x)>jR(l.y)?l.x:l.y,t.scale=o?Dz(o.pointers,r):1,t.rotation=o?Oz(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,kz(n,t);var u=e.element,d=t.srcEvent,f=d.composedPath?d.composedPath()[0]:d.path?d.path[0]:d.target;yz(f,u)&&(u=f),t.target=u}function jz(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&ez&&r-i===0,o=t&(nz|rz)&&r-i===0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,Az(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function Mz(e){return e.trim().split(/\s+/g)}function Nz(e,t,n){mz(Mz(t),function(t){e.addEventListener(t,n,!1)})}function Pz(e,t,n){mz(Mz(t),function(t){e.removeEventListener(t,n,!1)})}function Fz(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var Iz=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){hz(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&Nz(this.element,this.evEl,this.domHandler),this.evTarget&&Nz(this.target,this.evTarget,this.domHandler),this.evWin&&Nz(Fz(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&Pz(this.element,this.evEl,this.domHandler),this.evTarget&&Pz(this.target,this.evTarget,this.domHandler),this.evWin&&Pz(Fz(this.element),this.evWin,this.domHandler)},e}();function Lz(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 Rz={pointerdown:ez,pointermove:tz,pointerup:nz,pointercancel:rz,pointerout:rz},zz={2:YR,3:XR,4:ZR,5:QR},Bz=`pointerdown`,Vz=`pointermove pointerup pointercancel`;PR.MSPointerEvent&&!PR.PointerEvent&&(Bz=`MSPointerDown`,Vz=`MSPointerMove MSPointerUp MSPointerCancel`);var Hz=function(e){wR(t,e);function t(){var n,r=t.prototype;return r.evEl=Bz,r.evWin=Vz,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=Rz[e.type.toLowerCase().replace(`ms`,``)],i=zz[e.pointerType]||e.pointerType,a=i===YR,o=Lz(t,e.pointerId,`pointerId`);r&ez&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(nz|rz)&&(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}(Iz);function Uz(e){return Array.prototype.slice.call(e,0)}function Wz(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];Lz(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 Gz={touchstart:ez,touchmove:tz,touchend:nz,touchcancel:rz},Kz=`touchstart touchmove touchend touchcancel`,qz=function(e){wR(t,e);function t(){var n;return t.prototype.evTarget=Kz,n=e.apply(this,arguments)||this,n.targetIds={},n}var n=t.prototype;return n.handler=function(e){var t=Gz[e.type],n=Jz.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:YR,srcEvent:e})},t}(Iz);function Jz(e,t){var n=Uz(e.touches),r=this.targetIds;if(t&(ez|tz)&&n.length===1)return r[n[0].identifier]=!0,[n,n];var i,a,o=Uz(e.changedTouches),s=[],c=this.target;if(a=n.filter(function(e){return yz(e.target,c)}),t===ez)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&(nz|rz)&&delete r[o[i].identifier],i++;if(s.length)return[Wz(a.concat(s),`identifier`,!0),s]}var Yz={mousedown:ez,mousemove:tz,mouseup:nz},Xz=`mousedown`,Zz=`mousemove mouseup`,Qz=function(e){wR(t,e);function t(){var n,r=t.prototype;return r.evEl=Xz,r.evWin=Zz,n=e.apply(this,arguments)||this,n.pressed=!1,n}var n=t.prototype;return n.handler=function(e){var t=Yz[e.type];t&ez&&e.button===0&&(this.pressed=!0),t&tz&&e.which!==1&&(t=nz),this.pressed&&(t&nz&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:ZR,srcEvent:e}))},t}(Iz),$z=2500,eB=25;function tB(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)},$z)}}function nB(e,t){e&ez?(this.primaryTouch=t.changedPointers[0].identifier,tB.call(this,t)):e&(nz|rz)&&tB.call(this,t)}function rB(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<=eB&&o<=eB)return!0}return!1}var iB=function(){return function(e){wR(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===YR,a=n.pointerType===ZR;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)nB.call(TR(TR(r)),t,n);else if(a&&rB.call(TR(TR(r)),n))return;r.callback(e,t,n)}},r.touch=new qz(r.manager,r.handler),r.mouse=new Qz(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}(Iz)}();function aB(e){return new(e.options.inputClass||(qR?Hz:JR?qz:KR?iB:Qz))(e,jz)}function oB(e,t,n){return Array.isArray(e)?(mz(e,n[t],n),!0):!1}var sB=1,cB=2,lB=4,uB=8,dB=uB,fB=16,pB=32,mB=1;function hB(){return mB++}function gB(e,t){var n=t.manager;return n?n.get(e):e}function _B(e){return e&fB?`cancel`:e&uB?`end`:e&lB?`move`:e&cB?`start`:``}var vB=function(){function e(e){e===void 0&&(e={}),this.options=CR({enable:!0},e),this.id=hB(),this.manager=null,this.state=sB,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return ER(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(oB(e,`recognizeWith`,this))return this;var t=this.simultaneous;return e=gB(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return oB(e,`dropRecognizeWith`,this)||(e=gB(e,this),delete this.simultaneous[e.id]),this},t.requireFailure=function(e){if(oB(e,`requireFailure`,this))return this;var t=this.requireFail;return e=gB(e,this),Lz(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(oB(e,`dropRequireFailure`,this))return this;e=gB(e,this);var t=Lz(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<uB&&r(t.options.event+_B(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=uB&&r(t.options.event+_B(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=pB},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(pB|sB)))return!1;e++}return!0},t.recognize=function(e){var t=ER({},e);hz(this.options.enable,[this,t])?(this.state&(dB|fB|pB)&&(this.state=sB),this.state=this.process(t),this.state&(cB|lB|uB|fB)&&this.tryEmit(t)):(this.reset(),this.state=pB)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),yB=function(e){wR(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,CR({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[BR]},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&ez&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==nz)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<n.interval,s=!this.pCenter||Sz(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=dB,t.tryEmit()},n.interval),cB):dB}return pB},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=pB},this.options.interval),pB},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===dB&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(vB),bB=function(e){wR(t,e);function t(t){return t===void 0&&(t={}),e.call(this,CR({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&(cB|lB),i=this.attrTest(e);return r&&(n&rz||!i)?t|fB:r||i?n&nz?t|uB:t&cB?t|lB:cB:pB},t}(vB);function xB(e){return e===cz?`down`:e===sz?`up`:e===az?`left`:e===oz?`right`:``}var SB=function(e){wR(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,CR({event:`pan`,threshold:10,pointers:1,direction:dz},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&lz&&t.push(UR),e&uz&&t.push(HR),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&lz?(i=a===0?iz:a<0?az:oz,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?iz:o<0?sz:cz,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return bB.prototype.attrTest.call(this,e)&&(this.state&cB||!(this.state&cB)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=xB(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(bB),CB=function(e){wR(t,e);function t(t){return t===void 0&&(t={}),e.call(this,CR({event:`swipe`,threshold:10,velocity:.3,direction:lz|uz,pointers:1},t))||this}var n=t.prototype;return n.getTouchAction=function(){return SB.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n=this.options.direction,r;return n&(lz|uz)?r=t.overallVelocity:n&lz?r=t.overallVelocityX:n&uz&&(r=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&jR(r)>this.options.velocity&&t.eventType&nz},n.emit=function(e){var t=xB(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(bB),wB=function(e){wR(t,e);function t(t){return t===void 0&&(t={}),e.call(this,CR({event:`pinch`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[VR]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&cB)},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}(bB),TB=function(e){wR(t,e);function t(t){return t===void 0&&(t={}),e.call(this,CR({event:`rotate`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[VR]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&cB)},t}(bB),EB=function(e){wR(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,CR({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[zR]},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&(nz|rz)&&!a)this.reset();else if(e.eventType&ez)this.reset(),this._timer=setTimeout(function(){t.state=dB,t.tryEmit()},n.time);else if(e.eventType&nz)return dB;return pB},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===dB&&(e&&e.eventType&nz?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=MR(),this.manager.emit(this.options.event,this._input)))},t}(vB),DB={domEvents:!1,touchAction:RR,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},OB=[[TB,{enable:!1}],[wB,{enable:!1},[`rotate`]],[CB,{direction:lz}],[SB,{direction:lz},[`swipe`]],[yB],[yB,{event:`doubletap`,taps:2},[`tap`]],[EB]],kB=1,AB=2;function jB(e,t){var n=e.element;if(n.style){var r;mz(e.options.cssProps,function(i,a){r=NR(n.style,a),t?(e.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=e.oldCssProps[r]||``}),t||(e.oldCssProps={})}}function MB(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var NB=function(){function e(e,t){var n=this;this.options=ER({},DB,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=aB(this),this.touchAction=new vz(this,this.options.touchAction),jB(this,!0),mz(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 ER(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?AB:kB},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&dB)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped!==AB&&(!i||n===i||n.canRecognizeWith(i))?n.recognize(e):n.reset(),!i&&n.state&(cB|lB|uB)&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof vB)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(oB(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(oB(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=Lz(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 mz(Mz(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 mz(Mz(e),function(e){t?n[e]&&n[e].splice(Lz(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&MB(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&&jB(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),PB={touchstart:ez,touchmove:tz,touchend:nz,touchcancel:rz},FB=`touchstart`,IB=`touchstart touchmove touchend touchcancel`,LB=function(e){wR(t,e);function t(){var n,r=t.prototype;return r.evTarget=FB,r.evWin=IB,n=e.apply(this,arguments)||this,n.started=!1,n}var n=t.prototype;return n.handler=function(e){var t=PB[e.type];if(t===ez&&(this.started=!0),this.started){var n=RB.call(this,e,t);t&(nz|rz)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:YR,srcEvent:e})}},t}(Iz);function RB(e,t){var n=Uz(e.touches),r=Uz(e.changedTouches);return t&(nz|rz)&&(n=Wz(n.concat(r),`identifier`,!0)),[n,r]}function zB(e,t,n){var r=`DEPRECATED METHOD: `+t+`
8
+ `+n+` AT
9
+ `;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 BB=zB(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`."),VB=zB(function(e,t){return BB(e,t,!0)},`merge`,"Use `assign`.");function HB(e,t,n){var r=t.prototype,i=e.prototype=Object.create(r);i.constructor=e,i._super=r,n&&ER(i,n)}function UB(e,t){return function(){return e.apply(t,arguments)}}var WB=function(){var e=function(e,t){return t===void 0&&(t={}),new NB(e,CR({recognizers:OB.concat()},t))};return e.VERSION=`2.0.17-rc`,e.DIRECTION_ALL=dz,e.DIRECTION_DOWN=cz,e.DIRECTION_LEFT=az,e.DIRECTION_RIGHT=oz,e.DIRECTION_UP=sz,e.DIRECTION_HORIZONTAL=lz,e.DIRECTION_VERTICAL=uz,e.DIRECTION_NONE=iz,e.DIRECTION_DOWN=cz,e.INPUT_START=ez,e.INPUT_MOVE=tz,e.INPUT_END=nz,e.INPUT_CANCEL=rz,e.STATE_POSSIBLE=sB,e.STATE_BEGAN=cB,e.STATE_CHANGED=lB,e.STATE_ENDED=uB,e.STATE_RECOGNIZED=dB,e.STATE_CANCELLED=fB,e.STATE_FAILED=pB,e.Manager=NB,e.Input=Iz,e.TouchAction=vz,e.TouchInput=qz,e.MouseInput=Qz,e.PointerEventInput=Hz,e.TouchMouseInput=iB,e.SingleTouchInput=LB,e.Recognizer=vB,e.AttrRecognizer=bB,e.Tap=yB,e.Pan=SB,e.Swipe=CB,e.Pinch=wB,e.Rotate=TB,e.Press=EB,e.on=Nz,e.off=Pz,e.each=mz,e.merge=VB,e.extend=BB,e.bindFn=UB,e.assign=ER,e.inherit=HB,e.bindFn=UB,e.prefixed=NR,e.toArray=Uz,e.inArray=Lz,e.uniqueArray=Wz,e.splitStr=Mz,e.boolOrFn=hz,e.hasParent=yz,e.addEventListeners=Nz,e.removeEventListeners=Pz,e.defaults=ER({},DB,{preset:OB}),e}();WB.defaults,JM(`DELETE`);function GB(){var e=[...arguments];return KB(e.length?e:[qN()])}function KB(e){let t=WM(qB(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 qB(){let e=JB(),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 JB(){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 YB(){let e=()=>{};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var XB=typeof window<`u`?window.Hammer||WB:function(){return YB()};function ZB(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=XB(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=>{QB(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()}}aT(ZB.prototype),ZB.current=null,ZB.prototype.destroy=function(){this.deactivate();for(let t of NP(e=this._cleanupQueue).call(e,0).toReversed()){var e;t()}},ZB.prototype.activate=function(){ZB.current&&ZB.current.deactivate(),ZB.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)},ZB.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`)},ZB.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};function QB(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var $B=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,eV=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,tV=/^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,nV=/^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 rV(e){if(e)for(;e.hasChildNodes()===!0;){let t=e.firstChild;t&&(rV(t),e.removeChild(t))}}function iV(e){return e instanceof String||typeof e==`string`}function aV(e){return typeof e==`object`&&!!e}function oV(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 sV(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`)oV(e,t,r,n);else{let i=e[r],a=t[r];aV(i)&&aV(a)&&sV(i,a,n)}}}function cV(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(aN(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):oV(t,n,a,r);else if(aN(n[a]))throw TypeError(`Arrays are not supported by deepExtend`);else oV(t,n,a,r)}}return t}function lV(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(aN(n))throw TypeError(`Arrays are not supported by deepExtend`);for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&!uF(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]):oV(t,n,i,r);else if(aN(n[i])){t[i]=[];for(let e=0;e<n[i].length;e++)t[i].push(n[i][e])}else oV(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&&CF(t[a])===Object.prototype)e[a]===void 0?e[a]=U({},t[a],n):typeof e[a]==`object`&&e[a]!==null&&CF(e[a])===Object.prototype?U(e[a],t[a],n):oV(e,t,a,r);else if(aN(t[a])){var i;e[a]=QM(i=t[a]).call(i)}else oV(e,t,a,r)}return e}function uV(e,t){return[...e,t]}function dV(e){return QM(e).call(e)}function fV(e){return e.getBoundingClientRect().left}function pV(e){return e.getBoundingClientRect().top}function W(e,t){if(aN(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 mV(e){let t;switch(e.length){case 3:case 4:return t=eV.exec(e),t?{r:II(t[1]+t[1],16),g:II(t[2]+t[2],16),b:II(t[3]+t[3],16)}:null;case 6:case 7:return t=$B.exec(e),t?{r:II(t[1],16),g:II(t[2],16),b:II(t[3],16)}:null;default:return null}}function hV(e,t){if(uF(e).call(e,`rgba`))return e;if(uF(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=mV(e);return n==null?e:`rgba(`+n.r+`,`+n.g+`,`+n.b+`,`+t+`)`}}function gV(e,t,n){var r;return`#`+QM(r=((1<<24)+(e<<16)+(t<<8)+n).toString(16)).call(r,1)}function _V(e,t){if(iV(e)){let t=e;if(CV(t)){var n;let e=xN(n=t.substr(4).substr(0,t.length-5).split(`,`)).call(n,function(e){return II(e)});t=gV(e[0],e[1],e[2])}if(SV(t)===!0){let e=xV(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=bV(r.h,r.s,r.v),a=bV(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:iV(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:iV(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 vV(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 yV(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 bV(e,t,n){let r=yV(e,t,n);return gV(r.r,r.g,r.b)}function xV(e){let t=mV(e);if(!t)throw TypeError(`'${e}' is not a valid color.`);return vV(t.r,t.g,t.b)}function SV(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)}function CV(e){return tV.test(e)}function wV(e){return nV.test(e)}function TV(e){if(typeof e!=`object`||!e)return null;if(e instanceof Element)return e;let t=uL(e);for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&typeof e[n]==`object`&&(t[n]=TV(e[n]));return t}function EV(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]=uL(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 DV={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 OV(e,t){let n;aN(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 kV={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`},AV=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 kV[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),iV(e)===!0){if(CV(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(wV(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(SV(e)===!0){let t=mV(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: `+ML(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=vw({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display=`none`,rR(()=>{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=vw({},e)),this.color=e;let t=vV(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=vV(this.color.r,this.color.g,this.color.b);t.v=e/100;let n=yV(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=vV(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),SR(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 XB(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=yV(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=vV(this.color.r,this.color.g,this.color.b);m.h=f,m.s=p;let h=yV(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 jV(){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(jV(...QM(e).call(e,1))),t}}var MV=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},vw(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new AV(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(aN(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),QF(e)!==void 0&&(this.options.filter=QF(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);QF(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=QF(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(jV(`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=rR(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=rR(()=>{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=QF(this.options),a=!1;for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){r=!0;let s=e[o],c=uV(t,o);if(typeof i==`function`&&(r=i(o,t),r===!1&&!aN(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(aN(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=uV(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(jV(`pre`,`const options = `+ML(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}},NV=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=II(e),this.y=II(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)}},PV=!1,FV,IV=`background: #FFeeee; color: #dd0000`,LV=class e{static validate(t,n,r){PV=!1,FV=n;let i=n;return r!==void 0&&(i=n[r]),e.parse(t,i,[]),PV}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),IV)},c=e.getType(n[t]),l=a[c];l===void 0?a.any===void 0&&(s(`Invalid type received for "`+t+`". Expected: `+e.print(PN(a))+`. Received [`+c+`] "`+n[t]+`"`),PV=!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]+`". `),PV=!0):c===`object`&&i!==`__any__`&&(o=uV(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`:aN(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,FV,[],!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(PN(n))+e.printLocation(r,t):` in `+e.printLocation(i.path,t,``)+`Perhaps it was incomplete? Did you mean: "`+i.indexMatch+`"?
10
+
11
+ `,console.error(`%cUnknown option detected: "`+t+`"`+o,IV),PV=!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],uV(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=dV(r),a=f)}}return{closestMatch:o,path:s,distance:a,indexMatch:l}}static printLocation(e,t){let n=`
12
+
13
+ `+(arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:
14
+ `)+`options = {
15
+ `;for(let t=0;t<e.length;t++){for(let e=0;e<t+1;e++)n+=` `;n+=e[t]+`: {
16
+ `}for(let t=0;t<e.length+1;t++)n+=` `;n+=t+`
17
+ `;for(let t=0;t<e.length+1;t++){for(let r=0;r<e.length-t;r++)n+=` `;n+=`}
18
+ `}return n+`
19
+
20
+ `}static print(e){return ML(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=0;for(;r<=t.length;r++)n[r]=[r];let i=0;for(;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]}},RV=ZB,zV=MV,BV=XB,VV=NV,HV=IV,UV=LV,WV={fontsize:`font.size`,fontcolor:`font.color`,labelfontcolor:`font.color`,fontname:`font.face`,color:[`color.border`,`color.background`],fillcolor:`color.background`,tooltip:`title`,labeltooltip:`title`},GV=uL(WV);GV.color=`color.color`,GV.style=`dashes`;var KV={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},qV={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},JV=``,YV=0,G=``,K=``,XV=KV.NULL;function ZV(){YV=0,G=JV.charAt(0)}function QV(){YV++,G=JV.charAt(YV)}function $V(){return JV.charAt(YV+1)}function eH(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 tH(e,t){if(e||={},t)for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function nH(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 rH(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=tH(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=tH(i.attr,t.attr))}function iH(e,t){e.edges||=[],e.edges.push(t),e.edge&&(t.attr=tH(tH({},e.edge),t.attr))}function aH(e,t,n,r,i){let a={from:t,to:n,type:r};return e.edge&&(a.attr=tH({},e.edge)),a.attr=tH(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(XV=KV.NULL,K=``;G===` `||G===` `||G===`
21
+ `||G===`\r`;)QV();let e;do{if(e=!1,G===`#`){let t=YV-1;for(;JV.charAt(t)===` `||JV.charAt(t)===` `;)t--;if(JV.charAt(t)===`
22
+ `||JV.charAt(t)===``){for(;G!=``&&G!=`
23
+ `;)QV();e=!0}}if(G===`/`&&$V()===`/`){for(;G!=``&&G!=`
24
+ `;)QV();e=!0}if(G===`/`&&$V()===`*`){for(;G!=``;)if(G===`*`&&$V()===`/`){QV(),QV();break}else QV();e=!0}for(;G===` `||G===` `||G===`
25
+ `||G===`\r`;)QV()}while(e);if(G===``){XV=KV.DELIMITER;return}let t=G+$V();if(qV[t])XV=KV.DELIMITER,K=t,QV(),QV();else if(qV[G])XV=KV.DELIMITER,K=G,QV();else if(eH(G)||G===`-`){for(K+=G,QV();eH(G);)K+=G,QV();K===`false`?K=!1:K===`true`?K=!0:isNaN(Number(K))||(K=Number(K)),XV=KV.IDENTIFIER}else if(G===`"`){for(QV();G!=``&&(G!=`"`||G===`"`&&$V()===`"`);)G===`"`?(K+=G,QV()):G===`\\`&&$V()===`n`?(K+=`
26
+ `,QV()):K+=G,QV();if(G!=`"`)throw mH(`End of string " expected`);QV(),XV=KV.IDENTIFIER}else{for(XV=KV.UNKNOWN;G!=``;)K+=G,QV();throw SyntaxError(`Syntax error in part "`+hH(K,30)+`"`)}}function oH(){let e={};if(ZV(),q(),K===`strict`&&(e.strict=!0,q()),(K===`graph`||K===`digraph`)&&(e.type=K,q()),XV===KV.IDENTIFIER&&(e.id=K,q()),K!=`{`)throw mH(`Angle bracket { expected`);if(q(),sH(e),K!=`}`)throw mH(`Angle bracket } expected`);if(q(),K!==``)throw mH(`End of file expected`);return q(),delete e.node,delete e.edge,delete e.graph,e}function sH(e){for(;K!==``&&K!=`}`;)cH(e),K===`;`&&q()}function cH(e){let t=lH(e);if(t){fH(e,t);return}if(uH(e))return;if(XV!=KV.IDENTIFIER)throw mH(`Identifier expected`);let n=K;if(q(),K===`=`){if(q(),XV!=KV.IDENTIFIER)throw mH(`Identifier expected`);e[n]=K,q()}else dH(e,n)}function lH(e){let t=null;if(K===`subgraph`&&(t={},t.type=`subgraph`,q(),XV===KV.IDENTIFIER&&(t.id=K,q())),K===`{`){if(q(),t||={},t.parent=e,t.node=e.node,t.edge=e.edge,t.graph=e.graph,sH(t),K!=`}`)throw mH(`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 uH(e){return K===`node`?(q(),e.node=pH(),`node`):K===`edge`?(q(),e.edge=pH(),`edge`):K===`graph`?(q(),e.graph=pH(),`graph`):null}function dH(e,t){let n={id:t},r=pH();r&&(n.attr=r),rH(e,n),fH(e,t)}function fH(e,t){for(;K===`->`||K===`--`;){let n,r=K;q();let i=lH(e);if(i)n=i;else{if(XV!=KV.IDENTIFIER)throw mH(`Identifier or subgraph expected`);n=K,rH(e,{id:n}),q()}let a=pH();iH(e,aH(e,t,n,r,a)),t=n}}function pH(){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(XV!=KV.IDENTIFIER)throw mH(`Attribute name expected`);let e=K;if(q(),K!=`=`)throw mH(`Equal sign = expected`);if(q(),XV!=KV.IDENTIFIER)throw mH(`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 mH(`Bracket ] expected`);q()}if(uF(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 mH(`Invalid value of arrows`)}else i[t].name===`dir`&&(e.dir=t);let t=i[e.dir].value;if(!uF(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 mH(`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}}},NP(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 mH(`Invalid dir type "`+t+`"`);NP(i).call(i,e.dir,1)}let o;if(uF(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++)nH(i[e].attr,i[e].name,i[e].value);return t}function mH(e){return SyntaxError(e+`, got "`+hH(K,30)+`" (char `+YV+`)`)}function hH(e,t){return e.length<=t?e:e.substr(0,27)+`...`}function gH(e,t,n){aN(e)?V(e).call(e,function(e){aN(t)?V(t).call(t,function(t){n(e,t)}):n(e,t)}):aN(t)?V(t).call(t,function(t){n(e,t)}):n(e,t)}function _H(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 vH(e,t){let n={};for(let r in e)if(e.hasOwnProperty(r)){let i=t[r];aN(i)?V(i).call(i,function(t){_H(n,t,e[r])}):typeof i==`string`?_H(n,i,e[r]):_H(n,r,e[r])}return n}function yH(e){let t=bH(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)};tH(t,vH(e.attr,WV)),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 tH(t,vH(e.attr,GV)),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(gH(r,i,function(r,i){let a=aH(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 bH(e){return JV=e,oH()}function xH(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=xN(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:xN(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 SH=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)}}},CH=class{constructor(e){this.images={},this.imageBroken={},this.callback=e}_tryloadBrokenUrl(e,t,n){e!==void 0&&n!==void 0&&(t===void 0?console.warn(`No broken url image defined`):(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 SH;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 wH(e,t){try{let r=WM(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(IF(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 TH=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:`Редагувати вузол`}}),EH,DH;function OH(){return DH||(DH=1,XL(),EH=R().setInterval),EH}var kH,AH;function jH(){return AH||(AH=1,kH=OH()),kH}var MH=F(jH());function NH(e,t){t.inputHandler=function(e){e.isFirst&&t(e)},e.on(`hammer.input`,t.inputHandler)}function PH(e,t){return t.inputHandler=function(e){e.isFinal&&t(e)},e.on(`hammer.input`,t.inputHandler)}var FH=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%`},vw(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&&cV([`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=MH(()=>{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=NP(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 BV(this.frame.canvas),this.hammer.get(`pinch`).set({enable:!0}),this.hammer.get(`pan`).set({threshold:5,direction:BV.DIRECTION_ALL}),NH(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 BV(this.frame),PH(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)}}},IH=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},vw(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=rR(()=>{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&&cV([`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()}},LH={},RH;function zH(){if(RH)return LH;RH=1;var e=z(),t=L(),n=lT(),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)}}),LH}var BH,VH;function HH(){return VH||(VH=1,zH(),BH=Aw()(`Array`,`reverse`)),BH}var UH,WH;function GH(){if(WH)return UH;WH=1;var e=qx(),t=HH(),n=Array.prototype;return UH=function(r){var i=r.reverse;return r===n||e(n,r)&&i===n.reverse?t:i},UH}var KH,qH;function JH(){return qH||(qH=1,KH=GH()),KH}var YH,XH;function ZH(){return XH||(XH=1,YH=JH()),YH}var QH=F(ZH()),$H=[];for(let e=0;e<256;++e)$H.push((e+256).toString(16).slice(1));function eU(e,t=0){return($H[e[t+0]]+$H[e[t+1]]+$H[e[t+2]]+$H[e[t+3]]+`-`+$H[e[t+4]]+$H[e[t+5]]+`-`+$H[e[t+6]]+$H[e[t+7]]+`-`+$H[e[t+8]]+$H[e[t+9]]+`-`+$H[e[t+10]]+$H[e[t+11]]+$H[e[t+12]]+$H[e[t+13]]+$H[e[t+14]]+$H[e[t+15]]).toLowerCase()}var tU=new Uint8Array(16);function nU(){return crypto.getRandomValues(tU)}function rU(e,t,n){return crypto.randomUUID?crypto.randomUUID():iU(e)}function iU(e,t,n){e||={};let r=e.random??e.rng?.()??nU();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,eU(r)}var aU=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}},oU={},sU,cU;function lU(){if(cU)return sU;cU=1;var e=Kb(),t=I(),n=L(),r=fE(),i=xI().trim,a=vI(),o=n(``.charAt),s=e.parseFloat,c=e.Symbol,l=c&&c.iterator;return sU=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,sU}var uU;function dU(){if(uU)return oU;uU=1;var e=z(),t=lU();return e({global:!0,forced:parseFloat!==t},{parseFloat:t}),oU}var fU,pU;function mU(){return pU||(pU=1,dU(),fU=R().parseFloat),fU}var hU,gU;function _U(){return gU||(gU=1,hU=mU()),hU}var vU,yU;function bU(){return yU||(yU=1,vU=_U()),vU}var xU=F(bU()),SU={},CU,wU;function TU(){if(wU)return CU;wU=1;var e=Kb().isFinite;return CU=Number.isFinite||function(t){return typeof t==`number`&&e(t)},CU}var EU;function DU(){return EU||(EU=1,z()({target:`Number`,stat:!0},{isFinite:TU()})),SU}var OU,kU;function AU(){return kU||(kU=1,DU(),OU=R().Number.isFinite),OU}var jU,MU;function NU(){return MU||(MU=1,jU=AU()),jU}var PU,FU;function IU(){return FU||(FU=1,PU=NU()),PU}var LU=F(IU()),RU={exports:{}},zU={},BU;function VU(){if(BU)return zU;BU=1;var e=z(),t=hx(),n=yC().f;return e({target:`Object`,stat:!0,forced:Object.defineProperty!==n,sham:!t},{defineProperty:n}),zU}var HU;function UU(){if(HU)return RU.exports;HU=1,VU();var e=R().Object,t=RU.exports=function(t,n,r){return e.defineProperty(t,n,r)};return e.defineProperty.sham&&(t.sham=!0),RU.exports}var WU,GU;function KU(){return GU||(GU=1,WU=UU()),WU}var qU,JU;function YU(){return JU||(JU=1,qU=KU()),qU}var XU,ZU;function QU(){return ZU||(ZU=1,XU=YU()),XU}var $U,eW;function tW(){return eW||(eW=1,$U=QU()),$U}var nW=F(tW()),rW,iW;function aW(){return iW||(iW=1,Ck(),VA(),tO(),rW=zE().f(`iterator`)),rW}var oW,sW;function cW(){if(sW)return oW;sW=1;var e=aW();return Ok(),oW=e,oW}var lW,uW;function dW(){return uW||(uW=1,lW=cW()),lW}var fW,pW;function mW(){return pW||(pW=1,fW=dW()),fW}var hW,gW;function _W(){return gW||(gW=1,hW=mW()),hW}var vW=F(_W());function yW(e){"@babel/helpers - typeof";return yW=typeof FA==`function`&&typeof vW==`symbol`?function(e){return typeof e}:function(e){return e&&typeof FA==`function`&&e.constructor===FA&&e!==FA.prototype?`symbol`:typeof e},yW(e)}var bW,xW;function SW(){return xW||(xW=1,SO(),bW=zE().f(`toPrimitive`)),bW}var CW,wW;function TW(){return wW||(wW=1,CW=SW()),CW}var EW,DW;function OW(){return DW||(DW=1,EW=TW()),EW}var kW,AW;function jW(){return AW||(AW=1,kW=OW()),kW}var MW,NW;function PW(){return NW||(NW=1,MW=jW()),MW}var FW=F(PW());function IW(e,t){if(yW(e)!=`object`||!e)return e;var n=e[FW];if(n!==void 0){var r=n.call(e,t);if(yW(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function LW(e){var t=IW(e,`string`);return yW(t)==`symbol`?t:t+``}function RW(e,t,n){return(t=LW(t))in e?nW(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zW,BW;function VW(){return BW||(BW=1,LD(),zW=R().Object.getOwnPropertySymbols),zW}var HW,UW;function WW(){return UW||(UW=1,HW=VW()),HW}var GW,KW;function qW(){return KW||(KW=1,GW=WW()),GW}var JW=F(qW()),YW={exports:{}},XW={},ZW;function QW(){if(ZW)return XW;ZW=1;var e=z(),t=I(),n=Ix(),r=iC().f,i=hx();return e({target:`Object`,stat:!0,forced:!i||t(function(){r(1)}),sham:!i},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}}),XW}var $W;function eG(){if($W)return YW.exports;$W=1,QW();var e=R().Object,t=YW.exports=function(t,n){return e.getOwnPropertyDescriptor(t,n)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),YW.exports}var tG,nG;function rG(){return nG||(nG=1,tG=eG()),tG}var iG,aG;function oG(){return aG||(aG=1,iG=rG()),iG}var sG=F(oG()),cG={},lG;function uG(){if(lG)return cG;lG=1;var e=z(),t=hx(),n=tN(),r=Ix(),i=iC(),a=FT();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}}),cG}var dG,fG;function pG(){return fG||(fG=1,uG(),dG=R().Object.getOwnPropertyDescriptors),dG}var mG,hG;function gG(){return hG||(hG=1,mG=pG()),mG}var _G,vG;function yG(){return vG||(vG=1,_G=gG()),_G}var bG=F(yG()),xG={exports:{}},SG={},CG;function wG(){if(CG)return SG;CG=1;var e=z(),t=hx(),n=hE().f;return e({target:`Object`,stat:!0,forced:Object.defineProperties!==n,sham:!t},{defineProperties:n}),SG}var TG;function EG(){if(TG)return xG.exports;TG=1,wG();var e=R().Object,t=xG.exports=function(t,n){return e.defineProperties(t,n)};return e.defineProperties.sham&&(t.sham=!0),xG.exports}var DG,OG;function kG(){return OG||(OG=1,DG=EG()),DG}var AG,jG;function MG(){return jG||(jG=1,AG=kG()),AG}var NG=F(MG()),PG,FG;function IG(){return FG||(FG=1,PG=KU()),PG}var LG=F(IG()),RG={},zG;function BG(){if(zG)return RG;zG=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)}}),RG}var VG,HG;function UG(){return HG||(HG=1,BG(),VG=R().Math.hypot),VG}var WG,GG;function KG(){return GG||(GG=1,WG=UG()),WG}var qG,JG;function YG(){return JG||(JG=1,qG=KG()),qG}var XG=F(YG());function ZG(e,t){let n=[`node`,`edge`,`label`],r=!0,i=OV(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=OV(t,[`chosen`,e]);(typeof i==`boolean`||typeof i==`function`)&&(r=i)}return r}function QG(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 $G(e){return typeof e==`string`&&e!==``}function eK(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 tK=class{static transform(e,t){aN(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()}},nK=class extends tK{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}},rK=class extends tK{static draw(e,t){let n=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return tK.transform(n,t),tK.drawPath(e,n),!0}},iK=class{static draw(e,t){let n=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return tK.transform(n,t),tK.drawPath(e,n),!0}},aK=class{static draw(e,t){let n={x:-.4,y:0};tK.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}},oK=class{static draw(e,t){let n={x:-.3,y:0};tK.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}},sK=class{static draw(e,t){let n=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return tK.transform(n,t),tK.drawPath(e,n),!0}},cK=class{static draw(e,t){let n=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return tK.transform(n,t),tK.drawPath(e,n),!0}},lK=class{static draw(e,t){let n={x:-.4,y:0};return tK.transform(n,t),Uw(e,n.x,n.y,t.length*.4),!0}},uK=class{static draw(e,t){let n=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return tK.transform(n,t),tK.drawPath(e,n),!0}},dK=class{static draw(e,t){let n=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return tK.transform(n,t),tK.drawPath(e,n),!0}},fK=class{static draw(e,t){let n=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return tK.transform(n,t),tK.drawPath(e,n),!0}},pK=class{static draw(e,t){let n=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return tK.transform(n,t),tK.drawPath(e,n),!0}},mK=class{static draw(e,t){let n;switch(t.type&&(n=t.type.toLowerCase()),n){case`image`:return nK.draw(e,t);case`circle`:return lK.draw(e,t);case`box`:return dK.draw(e,t);case`crow`:return iK.draw(e,t);case`curve`:return aK.draw(e,t);case`diamond`:return fK.draw(e,t);case`inv_curve`:return oK.draw(e,t);case`triangle`:return sK.draw(e,t);case`inv_triangle`:return cK.draw(e,t);case`bar`:return uK.draw(e,t);case`vee`:return pK.draw(e,t);default:return rK.draw(e,t)}}};function hK(e,t){var n=PN(e);if(JW){var r=JW(e);t&&(r=QF(r).call(r,function(t){return sG(e,t).enumerable})),n.push.apply(n,r)}return n}function gK(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?V(n=hK(Object(i),!0)).call(n,function(t){RW(e,t,i[t])}):bG?NG(e,bG(i)):V(r=hK(Object(i))).call(r,function(t){LG(e,t,sG(i,t))})}return e}var _K=class{constructor(e,t,n){RW(this,`color`,{}),RW(this,`colorDirty`,!0),RW(this,`hoverWidth`,1.5),RW(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=WM(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=aN(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=WM(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)Qw(e,this.from.x,this.from.y,this.to.x,this.to.y,a);else{let n=WM(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=WM(QM(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=eK(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 gK(gK({},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=hV(this.from.options.color.border,t.opacity),i=hV(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`?hV(this.to.options.color.border,t.opacity):hV(this.from.options.color.border,t.opacity)}return hV(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=WM(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/XG(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=WM(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,mK.draw(e,i)&&(this.enableShadow(e,t),SR(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=aN(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 vK(e,t){var n=PN(e);if(JW){var r=JW(e);t&&(r=QF(r).call(r,function(t){return sG(e,t).enumerable})),n.push.apply(n,r)}return n}function yK(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?V(n=vK(Object(i),!0)).call(n,function(t){RW(e,t,i[t])}):bG?NG(e,bG(i)):V(r=vK(Object(i))).call(r,function(t){LG(e,t,sG(i,t))})}return e}var bK=class extends _K{_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 yK(yK({},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()}},xK=class extends bK{constructor(e,t,n){super(e,t,n),RW(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=WM(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)}},SK=class extends bK{_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}}},CK=class extends bK{_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}},wK=class extends CK{_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=WM(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=WM(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}}},TK=class extends _K{_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)}},EK,DK;function OK(){return DK||(DK=1,Ck(),EK=Aw()(`Array`,`values`)),EK}var kK,AK;function jK(){return AK||(AK=1,kK=OK()),kK}var MK,NK;function PK(){if(NK)return MK;NK=1,Ok();var e=WT(),t=RS(),n=qx(),r=jK(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return MK=function(o){var s=o.values;return o===i||n(i,o)&&s===i.values||t(a,e(o))?r:s},MK}var FK,IK;function LK(){return IK||(IK=1,FK=PK()),FK}var RK=F(LK()),zK=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=vw({},RK(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={};vw(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}}},BK={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},VK=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=WM(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=BK[e];n=r===void 0?new RegExp(e):r,t=e.length}return[n,t]}},HK=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 zK(i)}process(e){if(!$G(e))return this.lines.finalize();let t=this.parent.fontOptions;e=e.replace(/\r\n/g,`
27
+ `),e=e.replace(/\r/g,`
28
+ `);let n=String(e).split(`
29
+ `),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(``);else{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 VK(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 VK(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(QM(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(QM(e).call(e,0,n),t),r[0]=QM(e).call(e,n)}else{let i=e;r[e-1]===` `?e--:r[i]===` `&&i++;let a=QM(r).call(r,0,e).join(``);e==r.length&&n?this.lines.append(a,t):this.lines.newLine(a,t),r=QM(r).call(r,i)}}}},UK=[`bold`,`ital`,`boldital`,`mono`],WK=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),$G(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){W(UK,e=>{this.fontOptions[e]={}}),e.parseFontString(this.fontOptions,t)?this.fontOptions.vadjust=0: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=OV(e,`widthConstraint`);if(typeof n==`number`)t.maxWdt=Number(n),t.minWdt=Number(n);else if(typeof n==`object`){let n=OV(e,[`widthConstraint`,`maximum`]);typeof n==`number`&&(t.maxWdt=Number(n));let r=OV(e,[`widthConstraint`,`minimum`]);typeof r==`number`&&(t.minWdt=Number(r))}let r=OV(e,`heightConstraint`);if(typeof r==`number`)t.minHgt=Number(r);else if(typeof r==`object`){let n=OV(e,[`heightConstraint`,`minimum`]);typeof n==`number`&&(t.minHgt=Number(n));let r=OV(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=ZG(`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(UK).call(UK,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<UK.length;++e){let n=UK[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=WM(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=WM(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=hV(r,e),i=hV(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 HK(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)}},GK=class e{constructor(e,t,n,r,i){if(t===void 0)throw Error(`No body provided`);this.options=TV(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 WK(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=xU(t.value));let r=[t,this.options,this.defaultOptions];return this.chooser=ZG(`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(cV([`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&&(LU(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&&(LU(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`))),$G(t.label)?e.label=t.label:$G(e.label)||(e.label=void 0),EV(e,t,`smooth`,r),EV(e,t,`shadow`,r),EV(e,t,`background`,r),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:n===!0&&t.dashes===null&&(e.dashes=uL(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),EV(e.scaling,t.scaling,`label`,r.scaling)):n===!0&&t.scaling===null&&(e.scaling=uL(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`)EV(e.arrows,t.arrows,`to`,r.arrows),EV(e.arrows,t.arrows,`middle`,r.arrows),EV(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:`+ML(t.arrows))}else n===!0&&t.arrows===null&&(e.arrows=uL(r.arrows));if(t.color!==void 0&&t.color!==null){let a=iV(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(iV(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=TV(r.color));n===!0&&t.font===null&&(e.font=TV(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 xK&&e.enabled===!0&&e.type===`dynamic`||this.edgeType instanceof wK&&e.enabled===!0&&e.type===`cubicBezier`||this.edgeType instanceof SK&&e.enabled===!0&&e.type!==`dynamic`&&e.type!==`cubicBezier`||this.edgeType instanceof TK&&e.type.enabled===!1)&&(n=!1),n===!0&&(t=this.cleanup())),n===!0?e.enabled===!0?e.type===`dynamic`?(t=!0,this.edgeType=new xK(this.options,this.body,this.labelModule)):this.edgeType=e.type===`cubicBezier`?new wK(this.options,this.body,this.labelModule):new SK(this.options,this.body,this.labelModule):this.edgeType=new TK(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=eK(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();QG(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}},KK={},qK;function JK(){if(qK)return KK;qK=1;var e=z(),t=I(),n=AE().f;return e({target:`Object`,stat:!0,forced:t(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:n}),KK}var YK,XK;function ZK(){if(XK)return YK;XK=1,JK();var e=R().Object;return YK=function(t){return e.getOwnPropertyNames(t)},YK}var QK,$K;function eq(){return $K||($K=1,QK=ZK()),QK}var tq,nq;function rq(){return nq||(nq=1,tq=eq()),tq}var iq=F(rq()),aq=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),SR(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}}},oq=class extends aq{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),Yw(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}},sq=class extends aq{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),Uw(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`)}},cq=class extends sq{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}},lq=class extends sq{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}else 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}},uq=class extends aq{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),tT(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 dq(e,t){var n=PN(e);if(JW){var r=JW(e);t&&(r=QF(r).call(r,function(t){return sG(e,t).enumerable})),n.push.apply(n,r)}return n}function fq(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?V(n=dq(Object(i),!0)).call(n,function(t){RW(e,t,i[t])}):bG?NG(e,bG(i)):V(r=dq(Object(i))).call(r,function(t){LG(e,t,sG(i,t))})}return e}var pq=class extends uq{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:fq({},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)}},mq=class extends aq{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),Zw(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)}},hq=class extends uq{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)}},gq=class extends uq{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}},_q=class extends aq{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),Xw(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)}},vq=class extends uq{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)}},yq=class extends aq{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)}},bq=class extends sq{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}else 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=hV(s,a.opacity),c=hV(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),SR(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)}},xq=class extends uq{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)}},Sq=class extends uq{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)}},Cq=class extends aq{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)}},wq=class extends uq{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)}},Tq=class extends uq{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 Eq(e,t){var n=PN(e);if(JW){var r=JW(e);t&&(r=QF(r).call(r,function(t){return sG(e,t).enumerable})),n.push.apply(n,r)}return n}function Dq(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?V(n=Eq(Object(i),!0)).call(n,function(t){RW(e,t,i[t])}):bG?NG(e,bG(i)):V(r=Eq(Object(i))).call(r,function(t){LG(e,t,sG(i,t))})}return e}var Oq=class e{constructor(e,t,n,r,i,a){this.options=TV(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 WK(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;NP(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=II(t.x),this.predefinedPosition=!0)),t.y!==void 0&&(t.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=II(t.y),this.predefinedPosition=!0)),t.size!==void 0&&(this.baseSize=t.size),t.value!==void 0&&(t.value=xU(t.value)),e.parseOptions(this.options,t,!0,this.globalOptions,this.grouplist);let r=[t,this.options,this.defaultOptions];return this.chooser=ZG(`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=QF(i=iq(n)).call(i,e=>n[e]!=null);s.push(`font`),lV(s,t,o),t.color=_V(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(lV([`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),EV(t,n,`shadow`,i),n.color!==void 0&&n.color!==null){let e=_V(n.color);sV(t.color,e)}else r===!0&&n.color===null&&(t.color=TV(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=TV(i.font)),e.updateGroupOptions(t,n,a),n.scaling!==void 0&&EV(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=hV(e.borderColor,t),e.color=hV(e.color,t),e.shadowColor=hV(e.shadowColor,t)}return e}updateLabelModule(t){(this.options.label===void 0||this.options.label===null)&&(this.options.label=``),e.updateGroupOptions(this.options,Dq(Dq({},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 oq(this.options,this.body,this.labelModule);break;case`circle`:this.shape=new cq(this.options,this.body,this.labelModule);break;case`circularImage`:this.shape=new lq(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case`custom`:this.shape=new pq(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case`database`:this.shape=new mq(this.options,this.body,this.labelModule);break;case`diamond`:this.shape=new hq(this.options,this.body,this.labelModule);break;case`dot`:this.shape=new gq(this.options,this.body,this.labelModule);break;case`ellipse`:this.shape=new _q(this.options,this.body,this.labelModule);break;case`icon`:this.shape=new yq(this.options,this.body,this.labelModule);break;case`image`:this.shape=new bq(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case`square`:this.shape=new xq(this.options,this.body,this.labelModule);break;case`hexagon`:this.shape=new vq(this.options,this.body,this.labelModule);break;case`star`:this.shape=new Sq(this.options,this.body,this.labelModule);break;case`text`:this.shape=new Cq(this.options,this.body,this.labelModule);break;case`triangle`:this.shape=new wq(this.options,this.body,this.labelModule);break;case`triangleDown`:this.shape=new Tq(this.options,this.body,this.labelModule);break;default:this.shape=new _q(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()&&QG(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),QG(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.`,HV),e.mass=1}}},kq=class extends Oq{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}),NP(r=t.clusteringEdgeReplacingIds).call(r,i,1))})}),t.edges=[]}},Aq=class{constructor(e){this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},vw(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=aU.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(PN(c).length>0&&PN(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=aU.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=aU.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=xN(n=PN(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=PN(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(PN(e).length==0||PN(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=aU.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=aU.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:`+rU());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,kq);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=PN(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),QH(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 QH(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=aU.cloneOptions(n,`edge`);U(a,r),a.from=e,a.to=t,a.id=`clusterEdge:`+rU(),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 GK){let e=t,n={};n[e.id]=e,t=n}if(e instanceof Oq){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)=>{r.id===t?e.edges[i]=null: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(PN(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=PN(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}},jq=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){GK.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(Vb(`id`,e))this.body.data.edges=e;else if(aN(e))this.body.data.edges=new Db,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new Db;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 GK(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)}},Mq={},Nq={},Pq={exports:{}},Fq,Iq;function Lq(){return Iq||(Iq=1,Fq=I()(function(){if(typeof ArrayBuffer==`function`){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Fq}var Rq,zq;function Bq(){if(zq)return Rq;zq=1;var e=I(),t=zx(),n=ax(),r=Lq(),i=Object.isExtensible;return Rq=e(function(){})||r?function(e){return!t(e)||r&&n(e)===`ArrayBuffer`?!1:!i||i(e)}:i,Rq}var Vq,Hq;function Uq(){return Hq||(Hq=1,Vq=!I()(function(){return Object.isExtensible(Object.preventExtensions({}))})),Vq}var Wq;function Gq(){if(Wq)return Pq.exports;Wq=1;var e=z(),t=L(),n=GC(),r=zx(),i=RS(),a=yC().f,o=DE(),s=AE(),c=Bq(),l=VS(),u=Uq(),d=!1,f=l(`meta`),p=0,m=function(e){a(e,f,{value:{objectID:`O`+p++,weakData:{}}})},h=Pq.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,Pq.exports}var Kq,qq;function Jq(){if(qq)return Kq;qq=1;var e=uC(),t=vx(),n=_C(),r=dS(),i=uM(),a=zC(),o=qx(),s=gM(),c=pM(),l=iM(),u=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return Kq=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,O=function(e){var t=S;return S=void 0,t&&l(t,`normal`),new d(!0,e)},k=function(e){return _?(n(e),b?x(e[0],e[1],O):x(e[0],e[1])):b?x(e,O):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=k(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 A=ee.value;try{E=k(A)}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)},Kq}var Yq,Xq;function Zq(){if(Xq)return Yq;Xq=1;var e=qx(),t=TypeError;return Yq=function(n,r){if(e(r,n))return n;throw new t(`Incorrect invocation`)},Yq}var Qq,$q;function eJ(){if($q)return Qq;$q=1;var e=z(),t=Kb(),n=Gq(),r=vx(),i=I(),a=SC(),o=Jq(),s=Zq(),c=dx(),l=zx(),u=Ax(),d=ZE(),f=yC().f,p=oD().forEach,m=hx(),h=rD(),g=h.set,_=h.getterFor;return Qq=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},Qq}var tJ,nJ;function rJ(){if(nJ)return tJ;nJ=1;var e=NE();return tJ=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},tJ}var iJ,aJ;function oJ(){if(aJ)return iJ;aJ=1;var e=Wx(),t=IE(),n=WS(),r=hx(),i=n(`species`);return iJ=function(n){var a=e(n);r&&a&&!a[i]&&t(a,i,{configurable:!0,get:function(){return this}})},iJ}var sJ,cJ;function lJ(){if(cJ)return sJ;cJ=1;var e=wE(),t=IE(),n=rJ(),r=uC(),i=Zq(),a=Ax(),o=Jq(),s=_k(),c=bk(),l=oJ(),u=hx(),d=Gq().fastKey,f=rD(),p=f.set,m=f.getterFor;return sJ={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)}},sJ}var uJ;function dJ(){return uJ||(uJ=1,eJ()(`Map`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},lJ())),Nq}var fJ;function pJ(){return fJ||(fJ=1,dJ()),Mq}var mJ={},hJ,gJ;function _J(){return gJ||(gJ=1,hJ=function(e,t){return t===1?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}}),hJ}var vJ,yJ;function bJ(){if(yJ)return vJ;yJ=1;var e=Wx(),t=_J(),n=e(`Map`);return vJ={Map:n,set:t(`set`,2),get:t(`get`,1),has:t(`has`,1),remove:t(`delete`,1),proto:n.prototype},vJ}var xJ;function SJ(){if(xJ)return mJ;xJ=1;var e=z(),t=L(),n=mS(),r=Nx(),i=Jq(),a=MT(),o=bJ(),s=wS(),c=I(),l=o.Map,u=o.has,d=o.get,f=o.set,p=t([].push),m=s||c(function(){return l.groupBy(`ab`,function(e){return e}).get(`a`).length!==1});return e({target:`Map`,stat:!0,forced:s||m},{groupBy:function(e,t){r(e),n(t);var o=new l,s=0;return i(e,function(e){a(s);var n=t(e,s++);u(o,n)?p(d(o,n),e):f(o,n,[e])}),o}}),mJ}var CJ={},wJ;function TJ(){if(wJ)return CJ;wJ=1;var e=z(),t=bJ(),n=wS(),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)}}),CJ}var EJ={},DJ;function OJ(){if(DJ)return EJ;DJ=1;var e=z(),t=mS(),n=bJ(),r=wS(),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}}),EJ}var kJ,AJ;function jJ(){return AJ||(AJ=1,Ck(),pJ(),SJ(),TJ(),OJ(),VA(),kJ=R().Map),kJ}var MJ,NJ;function PJ(){if(NJ)return MJ;NJ=1;var e=jJ();return Ok(),MJ=e,MJ}var FJ,IJ;function LJ(){return IJ||(IJ=1,FJ=PJ()),FJ}var RJ=F(LJ()),zJ=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},vw(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 RJ,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 BJ(e){for(var t=e&&e.preventDefault||!1,n=e&&e.container||window,r={},i={keydown:{},keyup:{}},a={},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 VJ=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 BV(this.navigationDOM[e[i]]);if(t[i]===`_fit`){var n;NH(a,B(n=this._fit).call(n,this))}else{var r;NH(a,B(r=this.bindToRedraw).call(r,this,t[i]))}this.navigationHammers.push(a)}let i=new BV(this.canvas.frame);PH(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?BJ({container:window,preventDefault:!0}):BJ({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`)}}},HJ=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 VJ(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},vw(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&&(lV([`hideEdgesOnDrag`,`hideEdgesOnZoom`,`hideNodesOnDrag`,`keyboard`,`multiselect`,`selectable`,`selectConnectedEdges`],this.options,e),EV(this.options,e,`keyboard`),e.tooltip&&(vw(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=_V(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}getPointer(e){return{x:e.x-fV(this.canvas.frame.canvas),y:e.y-pV(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=vw({},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=QF(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=rR(()=>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 VV(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`))}},UJ=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}},WJ=class{constructor(e,t,n){this.body=e,this.springLength=t,this.springConstant=n,this.distanceSolver=new UJ}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=WM(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=WM(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=WM(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=WM(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]}},GJ={},KJ={},qJ;function JJ(){return qJ||(qJ=1,eJ()(`Set`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},lJ())),KJ}var YJ;function XJ(){return YJ||(YJ=1,JJ()),GJ}var ZJ={},QJ,$J;function eY(){if($J)return QJ;$J=1;var e=dS(),t=TypeError;return QJ=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`)},QJ}var tY,nY;function rY(){if(nY)return tY;nY=1;var e=Wx(),t=_J(),n=e(`Set`),r=n.prototype;return tY={Set:n,add:t(`add`,1),has:t(`has`,1),remove:t(`delete`,1),proto:r},tY}var iY,aY;function oY(){if(aY)return iY;aY=1;var e=vx();return iY=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},iY}var sY,cY;function lY(){if(cY)return sY;cY=1;var e=oY();return sY=function(t,n,r){return r?e(t.keys(),n,!0):t.forEach(n)},sY}var uY,dY;function fY(){if(dY)return uY;dY=1;var e=rY(),t=lY(),n=e.Set,r=e.add;return uY=function(e){var i=new n;return t(e,function(e){r(i,e)}),i},uY}var pY,mY;function hY(){return mY||(mY=1,pY=function(e){return e.size}),pY}var gY,_Y;function vY(){return _Y||(_Y=1,gY=function(e){return{iterator:e,next:e.next,done:!1}}),gY}var yY,bY;function xY(){if(bY)return yY;bY=1;var e=mS(),t=_C(),n=vx(),r=AC(),i=vY(),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)}},yY=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)},yY}var SY,CY;function wY(){if(CY)return SY;CY=1;var e=eY(),t=rY(),n=fY(),r=hY(),i=xY(),a=lY(),o=oY(),s=t.has,c=t.remove;return SY=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},SY}var TY,EY;function DY(){return EY||(EY=1,TY=function(){return!1}),TY}var OY;function kY(){if(OY)return ZJ;OY=1;var e=z(),t=wY(),n=I();return e({target:`Set`,proto:!0,real:!0,forced:!DY()(`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}),ZJ}var AY={},jY,MY;function NY(){if(MY)return jY;MY=1;var e=eY(),t=rY(),n=hY(),r=xY(),i=lY(),a=oY(),o=t.Set,s=t.add,c=t.has;return jY=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},jY}var PY;function FY(){if(PY)return AY;PY=1;var e=z(),t=I(),n=NY();return e({target:`Set`,proto:!0,real:!0,forced:!DY()(`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}),AY}var IY={},LY,RY;function zY(){if(RY)return LY;RY=1;var e=eY(),t=rY().has,n=hY(),r=xY(),i=lY(),a=oY(),o=iM();return LY=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},LY}var BY;function VY(){if(BY)return IY;BY=1;var e=z(),t=zY();return e({target:`Set`,proto:!0,real:!0,forced:!DY()(`isDisjointFrom`,function(e){return!e})},{isDisjointFrom:t}),IY}var HY={},UY,WY;function GY(){if(WY)return UY;WY=1;var e=eY(),t=hY(),n=lY(),r=xY();return UY=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},UY}var KY;function qY(){if(KY)return HY;KY=1;var e=z(),t=GY();return e({target:`Set`,proto:!0,real:!0,forced:!DY()(`isSubsetOf`,function(e){return e})},{isSubsetOf:t}),HY}var JY={},YY,XY;function ZY(){if(XY)return YY;XY=1;var e=eY(),t=rY().has,n=hY(),r=xY(),i=oY(),a=iM();return YY=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},YY}var QY;function $Y(){if(QY)return JY;QY=1;var e=z(),t=ZY();return e({target:`Set`,proto:!0,real:!0,forced:!DY()(`isSupersetOf`,function(e){return!e})},{isSupersetOf:t}),JY}var eX={},tX,nX;function rX(){if(nX)return tX;nX=1;var e=eY(),t=rY(),n=fY(),r=xY(),i=oY(),a=t.add,o=t.has,s=t.remove;return tX=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},tX}var iX,aX;function oX(){return aX||(aX=1,iX=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}}),iX}var sX;function cX(){if(sX)return eX;sX=1;var e=z(),t=rX(),n=oX();return e({target:`Set`,proto:!0,real:!0,forced:!DY()(`symmetricDifference`)||!n(`symmetricDifference`)},{symmetricDifference:t}),eX}var lX={},uX,dX;function fX(){if(dX)return uX;dX=1;var e=eY(),t=rY().add,n=fY(),r=xY(),i=oY();return uX=function(a){var o=e(this),s=r(a).getIterator(),c=n(o);return i(s,function(e){t(c,e)}),c},uX}var pX;function mX(){if(pX)return lX;pX=1;var e=z(),t=fX(),n=oX();return e({target:`Set`,proto:!0,real:!0,forced:!DY()(`union`)||!n(`union`)},{union:t}),lX}var hX,gX;function _X(){return gX||(gX=1,Ck(),XJ(),kY(),FY(),VY(),qY(),$Y(),cX(),mX(),VA(),hX=R().Set),hX}var vX,yX;function bX(){if(yX)return vX;yX=1;var e=_X();return Ok(),vX=e,vX}var xX,SX;function CX(){return SX||(SX=1,xX=bX()),xX}var wX=F(CX()),TX={},EX,DX;function OX(){if(DX)return EX;DX=1;var e=Sw(),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 EX=n,EX}var kX,AX;function jX(){if(AX)return kX;AX=1;var e=Xx().match(/firefox\/(\d+)/i);return kX=!!e&&+e[1],kX}var MX,NX;function PX(){if(NX)return MX;NX=1;var e=Xx();return MX=/MSIE|Trident/.test(e),MX}var FX,IX;function LX(){if(IX)return FX;IX=1;var e=Xx().match(/AppleWebKit\/(\d+)\./);return FX=!!e&&+e[1],FX}var RX;function zX(){if(RX)return TX;RX=1;var e=z(),t=L(),n=mS(),r=FS(),i=zC(),a=vP(),o=fE(),s=I(),c=OX(),l=ZN(),u=jX(),d=PX(),f=$x(),p=LX(),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;for(var e=``,t=65,n,r,i;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);for(var o=[],s=i(t),l,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}}),TX}var BX,VX;function HX(){return VX||(VX=1,zX(),BX=Aw()(`Array`,`sort`)),BX}var UX,WX;function GX(){if(WX)return UX;WX=1;var e=qx(),t=HX(),n=Array.prototype;return UX=function(r){var i=r.sort;return r===n||e(n,r)&&i===n.sort?t:i},UX}var KX,qX;function JX(){return qX||(qX=1,KX=GX()),KX}var YX,XX;function ZX(){return XX||(XX=1,YX=JX()),YX}var QX=F(ZX()),$X={},eZ,tZ;function nZ(){if(tZ)return eZ;tZ=1;var e=mS(),t=FS(),n=Dx(),r=zC(),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 eZ={left:o(!1),right:o(!0)},eZ}var rZ,iZ;function aZ(){return iZ||(iZ=1,rZ=LL()===`NODE`),rZ}var oZ;function sZ(){if(oZ)return $X;oZ=1;var e=z(),t=nZ().left,n=ZN(),r=$x();return e({target:`Array`,proto:!0,forced:!aZ()&&r>79&&r<83||!n(`reduce`)},{reduce:function(e){var n=arguments.length;return t(this,e,n,n>1?arguments[1]:void 0)}}),$X}var cZ,lZ;function uZ(){return lZ||(lZ=1,sZ(),cZ=Aw()(`Array`,`reduce`)),cZ}var dZ,fZ;function pZ(){if(fZ)return dZ;fZ=1;var e=qx(),t=uZ(),n=Array.prototype;return dZ=function(r){var i=r.reduce;return r===n||e(n,r)&&i===n.reduce?t:i},dZ}var mZ,hZ;function gZ(){return hZ||(hZ=1,mZ=pZ()),mZ}var _Z,vZ;function yZ(){return vZ||(vZ=1,_Z=gZ()),_Z}var bZ=F(yZ()),xZ=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()}},SZ=class extends xZ{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){QX(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}},CZ=class extends xZ{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){QX(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}},wZ={},TZ;function EZ(){if(TZ)return wZ;TZ=1;var e=z(),t=oD().every;return e({target:`Array`,proto:!0,forced:!ZN()(`every`)},{every:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),wZ}var DZ,OZ;function kZ(){return OZ||(OZ=1,EZ(),DZ=Aw()(`Array`,`every`)),DZ}var AZ,jZ;function MZ(){if(jZ)return AZ;jZ=1;var e=qx(),t=kZ(),n=Array.prototype;return AZ=function(r){var i=r.every;return r===n||e(n,r)&&i===n.every?t:i},AZ}var NZ,PZ;function FZ(){return PZ||(PZ=1,NZ=MZ()),NZ}var IZ,LZ;function RZ(){return LZ||(LZ=1,IZ=FZ()),IZ}var zZ=F(RZ());function BZ(e,t){let n=new wX;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 VZ(e){return UZ(t=>{var n,r;return zZ(n=QF(r=t.edges).call(r,t=>e.has(t.toId))).call(n,e=>e.to===t)},(e,t)=>t>e,`from`,e)}function HZ(e){return UZ(t=>{var n,r;return zZ(n=QF(r=t.edges).call(r,t=>e.has(t.toId))).call(n,e=>e.from===t)},(e,t)=>t<e,`to`,e)}function UZ(e,t,n,r){var i;let a=uL(null),o=bZ(i=[...RK(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=WM(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=QF(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 BZ(r,a);++h}}return a}var WZ=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 RJ,t=0,n=[...new wX(mI(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 PN(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)}},GZ=class{constructor(e){this.body=e,this._resetRNG(Math.random()+`:`+qN()),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`}},vw(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(cV([`randomSeed`,`improvedLayout`,`clusterThreshold`],this.options,e),EV(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=GB(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=aU.getRangeCore(this.body.nodes,this.body.nodeIndices),t=aU.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 WZ,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=WM(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=WM(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=WM(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=PN(e[n]);r=this._indexArrayToNodes(r),QX(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]]);QX(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))}),QX(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),aU.cloneOptions(e,`node`),aU.cloneOptions(t,`node`),aU.cloneOptions(n,`edge`),this.hierarchical.levels[t.id]=r+void 0}),this.hierarchical.setMinLevelToZero()}_determineLevelsDirected(){var e;let t=bZ(e=this.body.nodeIndices).call(e,(e,t)=>(e.set(t,this.body.nodes[t]),e),new RJ);this.options.hierarchical.shakeTowards===`roots`?this.hierarchical.levels=HZ(t):this.hierarchical.levels=VZ(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 SZ(this):new CZ(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)}},KZ=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}},vw(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)}else{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`+rU(),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={},rV(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&&(rV(this.editModeDiv),rV(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit(`restorePhysics`)}_cleanupDOMEventListeners(){for(let t of NP(e=this._domEventListenerCleanupQueue).call(e,0)){var e;t()}}_removeManipulationDOM(){this._clean(),rV(this.manipulationDiv),rV(this.editModeDiv),rV(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: `+ML(PN(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 BV(e,{});NH(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;NP(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;NP(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=vw({},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=vw({},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`+rU(),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:rU(),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()}},qZ={},JZ;function YZ(){return JZ||(JZ=1,z()({target:`Number`,stat:!0},{isNaN:function(e){return e!==e}})),qZ}var XZ,ZZ;function QZ(){return ZZ||(ZZ=1,YZ(),XZ=R().Number.isNaN),XZ}var $Z,eQ;function tQ(){return eQ||(eQ=1,$Z=QZ()),$Z}var nQ,rQ;function iQ(){return rQ||(rQ=1,nQ=tQ()),nQ}var aQ=F(iQ()),oQ={},sQ;function cQ(){if(sQ)return oQ;sQ=1;var e=z(),t=oD().some;return e({target:`Array`,proto:!0,forced:!ZN()(`some`)},{some:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),oQ}var lQ,uQ;function dQ(){return uQ||(uQ=1,cQ(),lQ=Aw()(`Array`,`some`)),lQ}var fQ,pQ;function mQ(){if(pQ)return fQ;pQ=1;var e=qx(),t=dQ(),n=Array.prototype;return fQ=function(r){var i=r.some;return r===n||e(n,r)&&i===n.some?t:i},fQ}var hQ,gQ;function _Q(){return gQ||(gQ=1,hQ=mQ()),hQ}var vQ,yQ;function bQ(){return yQ||(yQ=1,vQ=_Q()),vQ}var xQ=F(bQ()),SQ=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=TV(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(Oq.parseOptions(this.options,e),e.opacity!==void 0&&(aQ(e.opacity)||!LU(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 PN(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(Vb(`id`,e))this.body.data.nodes=e;else if(aN(e))this.body.data.nodes=new Db,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new Db;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=xQ(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]:Oq)(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(aN(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),rR(()=>{this.body.emitter.emit(`startSimulation`)},0))}},CQ=class{constructor(e,t,n){this.body=e,this.physicsBody=t,this.setOptions(n),this._rng=GB(`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()}},wQ=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}},TQ=class extends wQ{_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}}},EQ=class extends CQ{constructor(e,t,n){super(e,t,n),this._rng=GB(`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}},DQ=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}}}}},OQ=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}}},kQ=class{constructor(e,t,n){this._rng=GB(`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)}}},AQ=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)}},jQ=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}},vw(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,lV([`stabilization`],this.options,e),EV(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`||aQ(t.x))&&(t.x=0),(typeof t.y!=`number`||aQ(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 EQ(this.body,this.physicsBody,e),this.edgesSolver=new AQ(this.body,this.physicsBody,e),this.gravitySolver=new TQ(this.body,this.physicsBody,e)):this.options.solver===`repulsion`?(e=this.options.repulsion,this.nodesSolver=new kQ(this.body,this.physicsBody,e),this.edgesSolver=new AQ(this.body,this.physicsBody,e),this.gravitySolver=new wQ(this.body,this.physicsBody,e)):this.options.solver===`hierarchicalRepulsion`?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new DQ(this.body,this.physicsBody,e),this.edgesSolver=new OQ(this.body,this.physicsBody,e),this.gravitySolver=new wQ(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new CQ(this.body,this.physicsBody,e),this.edgesSolver=new AQ(this.body,this.physicsBody,e),this.gravitySolver=new wQ(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=qN();this.physicsTick(),(qN()-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)&&rR(()=>{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=PN(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`&&!aQ(t.x)&&(n.x+=t.x),typeof t.y==`number`&&!aQ(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;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:(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,rR(()=>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;rR(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=bV((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,mK.draw(e,{type:`arrow`,point:l,angle:u,length:s}),SR(e).call(e)}}},MQ={},NQ={},PQ,FQ;function IQ(){if(FQ)return PQ;FQ=1;var e=L(),t=rJ(),n=Gq().getWeakData,r=Zq(),i=_C(),a=Ax(),o=zx(),s=Jq(),c=oD(),l=RS(),u=rD(),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}},PQ={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}},PQ}var LQ;function RQ(){if(LQ)return NQ;LQ=1;var e=Uq(),t=Kb(),n=L(),r=rJ(),i=Gq(),a=eJ(),o=IQ(),s=zx(),c=rD().enforce,l=I(),u=eD(),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 NQ}var zQ;function BQ(){return zQ||(zQ=1,RQ()),MQ}var VQ={},HQ,UQ;function WQ(){if(UQ)return HQ;UQ=1;var e=Wx(),t=_J();return HQ={WeakMap:e(`WeakMap`),set:t(`set`,2),get:t(`get`,1),has:t(`has`,1),remove:t(`delete`,1)},HQ}var GQ;function KQ(){if(GQ)return VQ;GQ=1;var e=z(),t=WQ(),n=wS(),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)}}),VQ}var qQ={},JQ,YQ;function XQ(){if(YQ)return JQ;YQ=1;var e=dS(),t=TypeError;return JQ=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`)},JQ}var ZQ,QQ;function $Q(){if(QQ)return ZQ;QQ=1;var e=WQ(),t=new e.WeakMap,n=e.set,r=e.remove;return ZQ=function(e){return n(t,e,1),r(t,e),e},ZQ}var e$;function t$(){if(e$)return qQ;e$=1;var e=z(),t=mS(),n=XQ(),r=$Q(),i=WQ(),a=wS(),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}}),qQ}var n$,r$;function i$(){return r$||(r$=1,Ck(),BQ(),KQ(),t$(),n$=R().WeakMap),n$}var a$,o$;function s$(){if(o$)return a$;o$=1;var e=i$();return Ok(),a$=e,a$}var c$,l$;function u$(){return l$||(l$=1,c$=s$()),c$}var d$=F(u$());function f$(e,t,n){p$(e,t),t.set(e,n)}function p$(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function m$(e,t,n){return e.set(h$(e,t),n),n}function J(e,t){return e.get(h$(e,t))}function h$(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 g$(e,t){let n=new wX;for(let r of t)e.has(r)||n.add(r);return n}var _$=new d$,v$=new d$,y$=class{constructor(){f$(this,_$,new wX),f$(this,v$,new wX)}get size(){return J(v$,this).size}add(){var e=[...arguments];for(let t of e)J(v$,this).add(t)}delete(){var e=[...arguments];for(let t of e)J(v$,this).delete(t)}clear(){J(v$,this).clear()}getSelection(){return[...J(v$,this)]}getChanges(){return{added:[...g$(J(_$,this),J(v$,this))],deleted:[...g$(J(v$,this),J(_$,this))],previous:[...new wX(J(_$,this))],current:[...new wX(J(v$,this))]}}commit(){let e=this.getChanges();m$(_$,this,J(v$,this)),m$(v$,this,new wX(J(_$,this)));for(let t of e.added)t.select();for(let t of e.deleted)t.unselect();return e}},b$=new d$,x$=new d$,S$=new d$,C$=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:()=>{};f$(this,b$,new y$),f$(this,x$,new y$),f$(this,S$,void 0),m$(S$,this,e)}get sizeNodes(){return J(b$,this).size}get sizeEdges(){return J(x$,this).size}getNodes(){return J(b$,this).getSelection()}getEdges(){return J(x$,this).getSelection()}addNodes(){J(b$,this).add(...arguments)}addEdges(){J(x$,this).add(...arguments)}deleteNodes(e){J(b$,this).delete(e)}deleteEdges(e){J(x$,this).delete(e)}clear(){J(b$,this).clear(),J(x$,this).clear()}commit(){let e={nodes:J(b$,this).commit(),edges:J(x$,this).commit()};var t=[...arguments];return J(S$,this).call(this,e,...t),e}},w$=class{constructor(e,t){this.body=e,this.canvas=t,this._selectionAccumulator=new C$,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},vw(this.options,this.defaultOptions),this.body.emitter.on(`_dataChanged`,()=>{this.updateSelection()})}setOptions(e){e!==void 0&&cV([`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 Oq?(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 Oq?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}_removeFromSelection(e){e instanceof Oq?(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 Oq?(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 Oq?(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 Oq&&n.id!=i||n instanceof GK)&&(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 GK&&n.id!=i||n instanceof Oq&&!n.hover)&&(this.emitBlurEvent(e,t,this.hoverObj.edges[i]),delete this.hoverObj.edges[i],r=!0));if(n!==void 0){let i=PN(this.hoverObj.edges).length,a=PN(this.hoverObj.nodes).length,o=n instanceof GK&&i===0&&a===0,s=n instanceof Oq&&i===0&&a===0;(r||o||s)&&(r=this.emitHoverEvent(e,t,n)),n instanceof Oq&&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 xN(e=this._selectionAccumulator.getNodes()).call(e,e=>e.id)}getSelectedEdgeIds(){var e;return xN(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 T$(e,t){let n=vw({nodes:t,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},e??{});if(!aN(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 E$=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=T$(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=aU.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=aU.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=aU.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:aU.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={};else{if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!LU(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,!LU(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,!LU(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,!LU(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=DV[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`,D$=`array`,Q=`object`,O$=`dom`,k$=`any`,A$=[`arrow`,`bar`,`box`,`circle`,`crow`,`curve`,`diamond`,`image`,`inv_curve`,`inv_triangle`,`triangle`,`vee`],j$={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:D$},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:O$,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}},M$={configure:{enabled:{boolean:X},filter:{boolean:X,string:Y,array:D$,function:`function`},container:{dom:O$},showButton:{boolean:X},__type__:{object:Q,boolean:X,string:Y,array:D$,function:`function`}},edges:{arrows:{to:{enabled:{boolean:X},scaleFactor:{number:Z},type:{string:A$},imageHeight:{number:Z},imageWidth:{number:Z},src:{string:Y},__type__:{object:Q,boolean:X}},middle:{enabled:{boolean:X},scaleFactor:{number:Z},type:{string:A$},imageWidth:{number:Z},imageHeight:{number:Z},src:{string:Y},__type__:{object:Q,boolean:X}},from:{enabled:{boolean:X},scaleFactor:{number:Z},type:{string:A$},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:D$},__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:D$},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__:j$,__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:j$,__type__:{object:Q,boolean:X}},nodes:j$,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:k$},__type__:{object:Q}},height:{string:Y},width:{string:Y},__type__:{object:Q}},N$={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]}}},P$=(e,t,n)=>{var r,i;return!!(uF(e).call(e,`physics`)&&uF(r=N$.physics.solver).call(r,t)&&n.physics.solver!==t&&t!==`wind`||uF(e).call(e,`physics`)&&uF(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:TH,clickToUse:!1},vw(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 CH(()=>this.body.emitter.emit(`_requestRedraw`)),this.groups=new zJ,this.canvas=new FH(this.body),this.selectionHandler=new w$(this.body,this.canvas),this.interactionHandler=new HJ(this.body,this.canvas,this.selectionHandler),this.view=new E$(this.body,this.canvas),this.renderer=new IH(this.body,this.canvas),this.physics=new jQ(this.body),this.layoutEngine=new GZ(this.body),this.clustering=new Aq(this.body),this.manipulation=new KZ(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new SQ(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new jq(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new WJ(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(n),this.setData(t)}aT($.prototype),$.prototype.setOptions=function(e){if(e===null&&(e=void 0),e!==void 0){if(UV.validate(e,M$)===!0&&console.error(`%cErrors have been found in the supplied options object.`,HV),cV([`locale`,`locales`,`clickToUse`],this.options,e),e.locale!==void 0&&(e.locale=wH(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 zV(this,this.body.container,N$,this.canvas.pixelRatio,P$),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 RV(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=yH(e.dot);this.setData(t)}else 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=xH(e.gephi);this.setData(t)}else 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];rV(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{Db as n,$ as t};