@nuxt/devtools-nightly 2.6.4-29305197.39a0677 → 2.6.5-29306553.110ec66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/module-main.mjs +26 -14
- package/dist/client/200.html +23 -22
- package/dist/client/404.html +23 -22
- package/dist/client/_nuxt/__blank-oybwb9u0.js +1 -0
- package/dist/client/_nuxt/analyze-build-oyvy2n6k.js +1 -0
- package/dist/client/_nuxt/{assets-oe58zq0u.js → assets-iiiil9h9.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/4c13e94d-ac56-47f5-bbbd-0467b8121ba0.json +1 -0
- package/dist/client/_nuxt/{client-hkqvtzyx.js → client-kvgyopwa.js} +1 -1
- package/dist/client/_nuxt/code-diff.vue-bq8bth0l.js +8 -0
- package/dist/client/_nuxt/code-snippets.vue-i2momvvn.js +1 -0
- package/dist/client/_nuxt/components-kdxql4pw.js +1 -0
- package/dist/client/_nuxt/composable-item.vue-bd0qe28q.js +1 -0
- package/dist/client/_nuxt/custom-_name_-buxdzxp1.js +1 -0
- package/dist/client/_nuxt/data-schema-button.vue-hwc5uuo4.js +1 -0
- package/dist/client/_nuxt/{data-schema-drawer-ikpfkbri.js → data-schema-drawer-h78i632s.js} +1 -1
- package/dist/client/_nuxt/debug-0o48icu2.js +1 -0
- package/dist/client/_nuxt/default-cf08j011.js +1 -0
- package/dist/client/_nuxt/{duration-display.vue-l0zz5iex.js → duration-display.vue-juecltgn.js} +1 -1
- package/dist/client/_nuxt/entry.css-bgro2w4m.css +1 -0
- package/dist/client/_nuxt/error-404-isciqhf2.js +1 -0
- package/dist/client/_nuxt/error-404.css-nxlugf5l.css +1 -0
- package/dist/client/_nuxt/error-500-c949zj2y.js +1 -0
- package/dist/client/_nuxt/error-500.css-bcokcrit.css +1 -0
- package/dist/client/_nuxt/{error-ego8bzbx.js → error-acajsfcm.js} +1 -1
- package/dist/client/_nuxt/f05hqzgb.js +15 -0
- package/dist/client/_nuxt/filepath-item.vue-e693vfym.js +1 -0
- package/dist/client/_nuxt/full-gwf8k3h8.js +1 -0
- package/dist/client/_nuxt/help-fab.vue-le7iybnb.js +1 -0
- package/dist/client/_nuxt/hooks-i3c9zo45.js +1 -0
- package/dist/client/_nuxt/imports-pdvz452h.js +1 -0
- package/dist/client/_nuxt/index-fexmm3yj.js +1 -0
- package/dist/client/_nuxt/launch-page.vue-mubr1qiq.js +1 -0
- package/dist/client/_nuxt/modules-5z6nfxe1.js +1 -0
- package/dist/client/_nuxt/nbadge-hbh0pw7g.js +1 -0
- package/dist/client/_nuxt/ncheckbox.vue-cowm3nmm.js +1 -0
- package/dist/client/_nuxt/{ncode-block.vue-j1bpwykw.js → ncode-block.vue-nph7f5ph.js} +1 -1
- package/dist/client/_nuxt/ndrawer.vue-bscihm5p.js +1 -0
- package/dist/client/_nuxt/ndropdown.vue-mt2skirs.js +1 -0
- package/dist/client/_nuxt/{nicon-title.vue-mr03t3pg.js → nicon-title.vue-l5va2e26.js} +1 -1
- package/dist/client/_nuxt/nlink.vue-gjku6j2r.js +1 -0
- package/dist/client/_nuxt/{nmarkdown.vue-n5lhcplj.js → nmarkdown.vue-ho3nn7tc.js} +1 -1
- package/dist/client/_nuxt/nnavbar.vue-fe2vbqhk.js +1 -0
- package/dist/client/_nuxt/none-e00yke7p.js +1 -0
- package/dist/client/_nuxt/nsection-block-b1meb1ma.js +1 -0
- package/dist/client/_nuxt/nselect-tabs.vue-hb4dua1x.js +1 -0
- package/dist/client/_nuxt/nselect.vue-j457efs9.js +1 -0
- package/dist/client/_nuxt/{nswitch.vue-ihk2zmam.js → nswitch.vue-m7rzt1v6.js} +1 -1
- package/dist/client/_nuxt/{open-graph-hwba5o86.js → open-graph-hi306joh.js} +1 -1
- package/dist/client/_nuxt/overview-e8qf7rb9.js +1 -0
- package/dist/client/_nuxt/pages-kc19iifh.js +1 -0
- package/dist/client/_nuxt/payload-ha4336zu.js +1 -0
- package/dist/client/_nuxt/pinia-cmu5xh15.js +1 -0
- package/dist/client/_nuxt/plugins-i44pfamd.js +1 -0
- package/dist/client/_nuxt/render-tree-kzon7sx5.js +1 -0
- package/dist/client/_nuxt/runtime-configs-oedus2mc.js +1 -0
- package/dist/client/_nuxt/server-discovery-mfcbprv0.js +1 -0
- package/dist/client/_nuxt/server-route-inputs.vue-m4ax1l4d.js +1 -0
- package/dist/client/_nuxt/server-routes-i9u3il1o.js +9 -0
- package/dist/client/_nuxt/server-tasks-cfvjphup.js +1 -0
- package/dist/client/_nuxt/settings-hq5m70v8.js +1 -0
- package/dist/client/_nuxt/stacktrace-list.vue-nfhbrir6.js +1 -0
- package/dist/client/_nuxt/state-components-i9ev6w42.js +1 -0
- package/dist/client/_nuxt/state-editor.vue-byiz4hoi.js +1 -0
- package/dist/client/_nuxt/state-modules-c2rs6wdq.js +1 -0
- package/dist/client/_nuxt/storage-mlmdplne.js +1 -0
- package/dist/client/_nuxt/terminals-e0nyivcj.js +1 -0
- package/dist/client/_nuxt/timeline-dazlkvc4.js +31 -0
- package/dist/client/_nuxt/{unocss-runtime-eoln527w.js → unocss-runtime-njuf1ctl.js} +1 -1
- package/dist/client/_nuxt/vendor/json-editor-vue-gd4lkf0o.js +3902 -0
- package/dist/client/_nuxt/vendor/{quicktype-core-o057hwfl.js → quicktype-core-jxekulwx.js} +1 -1
- package/dist/client/_nuxt/vendor/unocss-nr5d25zy.js +3 -0
- package/dist/client/_nuxt/vendor/vis-bs03k74b.js +84 -0
- package/dist/client/_nuxt/virtual-files-e0zxw441.js +1 -0
- package/dist/client/_nuxt/vue-devtools-m76pi1vn.js +2 -0
- package/dist/client/_nuxt/{vue-virtual-scroller.esm-kqx3l34g.js → vue-virtual-scroller.esm-oaume2n6.js} +1 -1
- package/dist/client/index.html +23 -22
- package/dist/module.json +1 -1
- package/package.json +30 -30
- package/dist/client/_nuxt/__blank-h7gh4972.js +0 -1
- package/dist/client/_nuxt/analyze-build-h6dkidx5.js +0 -1
- package/dist/client/_nuxt/builds/meta/3619e6f2-9c27-4c4b-aada-2143e7348fa8.json +0 -1
- package/dist/client/_nuxt/code-diff.vue-jy5btphl.js +0 -8
- package/dist/client/_nuxt/code-snippets.vue-2de0d1wh.js +0 -1
- package/dist/client/_nuxt/components-kyf9xy2m.js +0 -1
- package/dist/client/_nuxt/composable-item.vue-lyurctn1.js +0 -1
- package/dist/client/_nuxt/custom-_name_-f0z5z5zf.js +0 -1
- package/dist/client/_nuxt/data-schema-button.vue-gj32e65l.js +0 -1
- package/dist/client/_nuxt/debug-iof3atod.js +0 -1
- package/dist/client/_nuxt/default-ck8sdk8k.js +0 -1
- package/dist/client/_nuxt/dv0e79gh.js +0 -15
- package/dist/client/_nuxt/entry.css-ojy5yvlc.css +0 -1
- package/dist/client/_nuxt/error-404-k23mnnj8.js +0 -1
- package/dist/client/_nuxt/error-404.css-z2gtwy9t.css +0 -1
- package/dist/client/_nuxt/error-500-ow1tk67n.js +0 -1
- package/dist/client/_nuxt/error-500.css-liy0brxy.css +0 -1
- package/dist/client/_nuxt/filepath-item.vue-jvnnqntk.js +0 -1
- package/dist/client/_nuxt/full-iirjyjb5.js +0 -1
- package/dist/client/_nuxt/help-fab.vue-iiy912yv.js +0 -1
- package/dist/client/_nuxt/hooks-da40i97a.js +0 -1
- package/dist/client/_nuxt/imports-g8mxyxsz.js +0 -1
- package/dist/client/_nuxt/index-jpk6gpmk.js +0 -1
- package/dist/client/_nuxt/launch-page.vue-ej8n1nol.js +0 -1
- package/dist/client/_nuxt/modules-d9zqk5n1.js +0 -1
- package/dist/client/_nuxt/nbadge-la51ie4t.js +0 -1
- package/dist/client/_nuxt/ncheckbox.vue-no3437wc.js +0 -1
- package/dist/client/_nuxt/ndrawer.vue-mok9ppy7.js +0 -1
- package/dist/client/_nuxt/ndropdown.vue-o8t9ic70.js +0 -1
- package/dist/client/_nuxt/nlink.vue-ehelr39g.js +0 -1
- package/dist/client/_nuxt/nnavbar.vue-cybpsded.js +0 -1
- package/dist/client/_nuxt/none-f0zl4gad.js +0 -1
- package/dist/client/_nuxt/nsection-block-ddplx9pl.js +0 -1
- package/dist/client/_nuxt/nselect-tabs.vue-hiwwt2n0.js +0 -1
- package/dist/client/_nuxt/nselect.vue-la95si0f.js +0 -1
- package/dist/client/_nuxt/overview-oqtc1aqt.js +0 -1
- package/dist/client/_nuxt/pages-eenpqko4.js +0 -1
- package/dist/client/_nuxt/payload-mzuxzjh9.js +0 -1
- package/dist/client/_nuxt/pinia-ijohlgiz.js +0 -1
- package/dist/client/_nuxt/plugins-hyjhe79v.js +0 -1
- package/dist/client/_nuxt/render-tree-dr6gtec2.js +0 -1
- package/dist/client/_nuxt/runtime-configs-pahcy1o7.js +0 -1
- package/dist/client/_nuxt/server-discovery-b8na9z7g.js +0 -1
- package/dist/client/_nuxt/server-route-inputs.vue-g0p9q870.js +0 -1
- package/dist/client/_nuxt/server-routes-mtcko0mi.js +0 -9
- package/dist/client/_nuxt/server-tasks-bll6cjth.js +0 -1
- package/dist/client/_nuxt/settings-dmjruw7n.js +0 -1
- package/dist/client/_nuxt/stacktrace-list.vue-g3i6ukg0.js +0 -1
- package/dist/client/_nuxt/state-components-hm1fypou.js +0 -1
- package/dist/client/_nuxt/state-editor.vue-k2eynukh.js +0 -1
- package/dist/client/_nuxt/state-modules-frr7rpga.js +0 -1
- package/dist/client/_nuxt/storage-m0qelhs8.js +0 -1
- package/dist/client/_nuxt/terminals-f4z14c3b.js +0 -1
- package/dist/client/_nuxt/timeline-n9pyujb3.js +0 -31
- package/dist/client/_nuxt/vendor/json-editor-vue-nstwj98r.js +0 -3857
- package/dist/client/_nuxt/vendor/unocss-klvjhln7.js +0 -3
- package/dist/client/_nuxt/vendor/vis-je6lvt05.js +0 -132
- package/dist/client/_nuxt/virtual-files-gffuaqhw.js +0 -1
- package/dist/client/_nuxt/vue-devtools-fv9dekm9.js +0 -2
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* vis-data
|
|
3
|
+
* http://visjs.org/
|
|
4
|
+
*
|
|
5
|
+
* Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.
|
|
6
|
+
*
|
|
7
|
+
* @version 8.0.3
|
|
8
|
+
* @date 2025-09-10T16:22:00.613Z
|
|
9
|
+
*
|
|
10
|
+
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
11
|
+
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
|
12
|
+
*
|
|
13
|
+
* @license
|
|
14
|
+
* vis.js is dual licensed under both
|
|
15
|
+
*
|
|
16
|
+
* 1. The Apache 2.0 License
|
|
17
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
+
*
|
|
19
|
+
* and
|
|
20
|
+
*
|
|
21
|
+
* 2. The MIT License
|
|
22
|
+
* http://opensource.org/licenses/MIT
|
|
23
|
+
*
|
|
24
|
+
* vis.js may be distributed under either license.
|
|
25
|
+
*/var Db=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ee(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var ko={exports:{}},Ab={},mn,Mb;function Re(){if(Mb)return mn;Mb=1;var n=function(e){return e&&e.Math===Math&&e};return mn=n(typeof globalThis=="object"&&globalThis)||n(typeof window=="object"&&window)||n(typeof self=="object"&&self)||n(typeof Db=="object"&&Db)||n(typeof mn=="object"&&mn)||(function(){return this})()||Function("return this")(),mn}var Bo,Fb;function se(){return Fb||(Fb=1,Bo=function(n){try{return!!n()}catch{return!0}}),Bo}var jo,Nb;function Wn(){if(Nb)return jo;Nb=1;var n=se();return jo=!n(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),jo}var Lo,kb;function Js(){if(kb)return Lo;kb=1;var n=Wn(),e=Function.prototype,t=e.apply,r=e.call;return Lo=typeof Reflect=="object"&&Reflect.apply||(n?r.bind(t):function(){return r.apply(t,arguments)}),Lo}var zo,Bb;function de(){if(Bb)return zo;Bb=1;var n=Wn(),e=Function.prototype,t=e.call,r=n&&e.bind.bind(t,t);return zo=n?r:function(i){return function(){return t.apply(i,arguments)}},zo}var Wo,jb;function Xt(){if(jb)return Wo;jb=1;var n=de(),e=n({}.toString),t=n("".slice);return Wo=function(r){return t(e(r),8,-1)},Wo}var Ho,Lb;function eF(){if(Lb)return Ho;Lb=1;var n=Xt(),e=de();return Ho=function(t){if(n(t)==="Function")return e(t)},Ho}var Uo,zb;function Fe(){if(zb)return Uo;zb=1;var n=typeof document=="object"&&document.all;return Uo=typeof n>"u"&&n!==void 0?function(e){return typeof e=="function"||e===n}:function(e){return typeof e=="function"},Uo}var Vo={},Go,Wb;function qe(){if(Wb)return Go;Wb=1;var n=se();return Go=!n(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Go}var Ko,Hb;function nt(){if(Hb)return Ko;Hb=1;var n=Wn(),e=Function.prototype.call;return Ko=n?e.bind(e):function(){return e.apply(e,arguments)},Ko}var Yo={},Ub;function Tm(){if(Ub)return Yo;Ub=1;var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!n.call({1:2},1);return Yo.f=t?function(i){var s=e(this,i);return!!s&&s.enumerable}:n,Yo}var Xo,Vb;function Hn(){return Vb||(Vb=1,Xo=function(n,e){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:e}}),Xo}var Jo,Gb;function Zs(){if(Gb)return Jo;Gb=1;var n=de(),e=se(),t=Xt(),r=Object,i=n("".split);return Jo=e(function(){return!r("z").propertyIsEnumerable(0)})?function(s){return t(s)==="String"?i(s,""):r(s)}:r,Jo}var Zo,Kb;function Un(){return Kb||(Kb=1,Zo=function(n){return n==null}),Zo}var Qo,Yb;function Yr(){if(Yb)return Qo;Yb=1;var n=Un(),e=TypeError;return Qo=function(t){if(n(t))throw new e("Can't call method on "+t);return t},Qo}var ea,Xb;function Ft(){if(Xb)return ea;Xb=1;var n=Zs(),e=Yr();return ea=function(t){return n(e(t))},ea}var ta,Jb;function Qe(){if(Jb)return ta;Jb=1;var n=Fe();return ta=function(e){return typeof e=="object"?e!==null:n(e)},ta}var ra,Zb;function Ae(){return Zb||(Zb=1,ra={}),ra}var ia,Qb;function at(){if(Qb)return ia;Qb=1;var n=Ae(),e=Re(),t=Fe(),r=function(i){return t(i)?i:void 0};return ia=function(i,s){return arguments.length<2?r(n[i])||r(e[i]):n[i]&&n[i][s]||e[i]&&e[i][s]},ia}var na,e1;function Ne(){if(e1)return na;e1=1;var n=de();return na=n({}.isPrototypeOf),na}var sa,t1;function Mi(){if(t1)return sa;t1=1;var n=Re(),e=n.navigator,t=e&&e.userAgent;return sa=t?String(t):"",sa}var oa,r1;function Vn(){if(r1)return oa;r1=1;var n=Re(),e=Mi(),t=n.process,r=n.Deno,i=t&&t.versions||r&&r.version,s=i&&i.v8,o,a;return s&&(o=s.split("."),a=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!a&&e&&(o=e.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=e.match(/Chrome\/(\d+)/),o&&(a=+o[1]))),oa=a,oa}var aa,i1;function Fi(){if(i1)return aa;i1=1;var n=Vn(),e=se(),t=Re(),r=t.String;return aa=!!Object.getOwnPropertySymbols&&!e(function(){var i=Symbol("symbol detection");return!r(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&n&&n<41}),aa}var ua,n1;function tF(){if(n1)return ua;n1=1;var n=Fi();return ua=n&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ua}var la,s1;function Gn(){if(s1)return la;s1=1;var n=at(),e=Fe(),t=Ne(),r=tF(),i=Object;return la=r?function(s){return typeof s=="symbol"}:function(s){var o=n("Symbol");return e(o)&&t(o.prototype,i(s))},la}var da,o1;function Ni(){if(o1)return da;o1=1;var n=String;return da=function(e){try{return n(e)}catch{return"Object"}},da}var ca,a1;function Jt(){if(a1)return ca;a1=1;var n=Fe(),e=Ni(),t=TypeError;return ca=function(r){if(n(r))return r;throw new t(e(r)+" is not a function")},ca}var ha,u1;function Pm(){if(u1)return ha;u1=1;var n=Jt(),e=Un();return ha=function(t,r){var i=t[r];return e(i)?void 0:n(i)},ha}var fa,l1;function Zk(){if(l1)return fa;l1=1;var n=nt(),e=Fe(),t=Qe(),r=TypeError;return fa=function(i,s){var o,a;if(s==="string"&&e(o=i.toString)&&!t(a=n(o,i))||e(o=i.valueOf)&&!t(a=n(o,i))||s!=="string"&&e(o=i.toString)&&!t(a=n(o,i)))return a;throw new r("Can't convert object to primitive value")},fa}var va={exports:{}},pa,d1;function ki(){return d1||(d1=1,pa=!0),pa}var ga,c1;function Qk(){if(c1)return ga;c1=1;var n=Re(),e=Object.defineProperty;return ga=function(t,r){try{e(n,t,{value:r,configurable:!0,writable:!0})}catch{n[t]=r}return r},ga}var h1;function Rm(){if(h1)return va.exports;h1=1;var n=ki(),e=Re(),t=Qk(),r="__core-js_shared__",i=va.exports=e[r]||t(r,{});return(i.versions||(i.versions=[])).push({version:"3.44.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),va.exports}var ya,f1;function Bi(){if(f1)return ya;f1=1;var n=Rm();return ya=function(e,t){return n[e]||(n[e]=t||{})},ya}var ma,v1;function Tt(){if(v1)return ma;v1=1;var n=Yr(),e=Object;return ma=function(t){return e(n(t))},ma}var ba,p1;function ke(){if(p1)return ba;p1=1;var n=de(),e=Tt(),t=n({}.hasOwnProperty);return ba=Object.hasOwn||function(i,s){return t(e(i),s)},ba}var _a,g1;function Qs(){if(g1)return _a;g1=1;var n=de(),e=0,t=Math.random(),r=n(1.1.toString);return _a=function(i){return"Symbol("+(i===void 0?"":i)+")_"+r(++e+t,36)},_a}var wa,y1;function Be(){if(y1)return wa;y1=1;var n=Re(),e=Bi(),t=ke(),r=Qs(),i=Fi(),s=tF(),o=n.Symbol,a=e("wks"),u=s?o.for||o:o&&o.withoutSetter||r;return wa=function(l){return t(a,l)||(a[l]=i&&t(o,l)?o[l]:u("Symbol."+l)),a[l]},wa}var Ea,m1;function rF(){if(m1)return Ea;m1=1;var n=nt(),e=Qe(),t=Gn(),r=Pm(),i=Zk(),s=Be(),o=TypeError,a=s("toPrimitive");return Ea=function(u,l){if(!e(u)||t(u))return u;var d=r(u,a),c;if(d){if(l===void 0&&(l="default"),c=n(d,u,l),!e(c)||t(c))return c;throw new o("Can't convert object to primitive value")}return l===void 0&&(l="number"),i(u,l)},Ea}var Sa,b1;function qm(){if(b1)return Sa;b1=1;var n=rF(),e=Gn();return Sa=function(t){var r=n(t,"string");return e(r)?r:r+""},Sa}var Oa,_1;function iF(){if(_1)return Oa;_1=1;var n=Re(),e=Qe(),t=n.document,r=e(t)&&e(t.createElement);return Oa=function(i){return r?t.createElement(i):{}},Oa}var Ia,w1;function nF(){if(w1)return Ia;w1=1;var n=qe(),e=se(),t=iF();return Ia=!n&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),Ia}var E1;function eo(){if(E1)return Vo;E1=1;var n=qe(),e=nt(),t=Tm(),r=Hn(),i=Ft(),s=qm(),o=ke(),a=nF(),u=Object.getOwnPropertyDescriptor;return Vo.f=n?u:function(d,c){if(d=i(d),c=s(c),a)try{return u(d,c)}catch{}if(o(d,c))return r(!e(t.f,d,c),d[c])},Vo}var $a,S1;function e2(){if(S1)return $a;S1=1;var n=se(),e=Fe(),t=/#|\.prototype\./,r=function(u,l){var d=s[i(u)];return d===a?!0:d===o?!1:e(l)?n(l):!!l},i=r.normalize=function(u){return String(u).replace(t,".").toLowerCase()},s=r.data={},o=r.NATIVE="N",a=r.POLYFILL="P";return $a=r,$a}var Ta,O1;function to(){if(O1)return Ta;O1=1;var n=eF(),e=Jt(),t=Wn(),r=n(n.bind);return Ta=function(i,s){return e(i),s===void 0?i:t?r(i,s):function(){return i.apply(s,arguments)}},Ta}var Pa={},Ra,I1;function sF(){if(I1)return Ra;I1=1;var n=qe(),e=se();return Ra=n&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Ra}var qa,$1;function Zt(){if($1)return qa;$1=1;var n=Qe(),e=String,t=TypeError;return qa=function(r){if(n(r))return r;throw new t(e(r)+" is not an object")},qa}var T1;function vt(){if(T1)return Pa;T1=1;var n=qe(),e=nF(),t=sF(),r=Zt(),i=qm(),s=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",d="writable";return Pa.f=n?t?function(h,f,v){if(r(h),f=i(f),r(v),typeof h=="function"&&f==="prototype"&&"value"in v&&d in v&&!v[d]){var p=a(h,f);p&&p[d]&&(h[f]=v.value,v={configurable:l in v?v[l]:p[l],enumerable:u in v?v[u]:p[u],writable:!1})}return o(h,f,v)}:o:function(h,f,v){if(r(h),f=i(f),r(v),e)try{return o(h,f,v)}catch{}if("get"in v||"set"in v)throw new s("Accessors not supported");return"value"in v&&(h[f]=v.value),h},Pa}var Ca,P1;function ji(){if(P1)return Ca;P1=1;var n=qe(),e=vt(),t=Hn();return Ca=n?function(r,i,s){return e.f(r,i,t(1,s))}:function(r,i,s){return r[i]=s,r},Ca}var xa,R1;function Y(){if(R1)return xa;R1=1;var n=Re(),e=Js(),t=eF(),r=Fe(),i=eo().f,s=e2(),o=Ae(),a=to(),u=ji(),l=ke(),d=function(c){var h=function(f,v,p){if(this instanceof h){switch(arguments.length){case 0:return new c;case 1:return new c(f);case 2:return new c(f,v)}return new c(f,v,p)}return e(c,this,arguments)};return h.prototype=c.prototype,h};return xa=function(c,h){var f=c.target,v=c.global,p=c.stat,b=c.proto,y=v?n:p?n[f]:n[f]&&n[f].prototype,g=v?o:o[f]||u(o,f,{})[f],S=g.prototype,m,w,O,I,_,E,$,T,P;for(I in h)m=s(v?I:f+(p?".":"#")+I,c.forced),w=!m&&y&&l(y,I),E=g[I],w&&(c.dontCallGetSet?(P=i(y,I),$=P&&P.value):$=y[I]),_=w&&$?$:h[I],!(!m&&!b&&typeof E==typeof _)&&(c.bind&&w?T=a(_,n):c.wrap&&w?T=d(_):b&&r(_)?T=t(_):T=_,(c.sham||_&&_.sham||E&&E.sham)&&u(T,"sham",!0),u(g,I,T),b&&(O=f+"Prototype",l(o,O)||u(o,O,{}),u(o[O],I,_),c.real&&S&&(m||!S[I])&&u(S,I,_)))},xa}var q1;function t2(){if(q1)return Ab;q1=1;var n=Y(),e=qe(),t=vt().f;return n({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),Ab}var C1;function r2(){if(C1)return ko.exports;C1=1,t2();var n=Ae(),e=n.Object,t=ko.exports=function(i,s,o){return e.defineProperty(i,s,o)};return e.defineProperty.sham&&(t.sham=!0),ko.exports}var Da,x1;function oF(){if(x1)return Da;x1=1;var n=r2();return Da=n,Da}var Aa,D1;function i2(){if(D1)return Aa;D1=1;var n=oF();return Aa=n,Aa}var Ma,A1;function n2(){if(A1)return Ma;A1=1;var n=i2();return Ma=n,Ma}var Fa,M1;function s2(){return M1||(M1=1,Fa=n2()),Fa}var o2=s2(),a2=ee(o2),F1={},Na,N1;function Xr(){if(N1)return Na;N1=1;var n=Xt();return Na=Array.isArray||function(t){return n(t)==="Array"},Na}var ka,k1;function u2(){if(k1)return ka;k1=1;var n=Math.ceil,e=Math.floor;return ka=Math.trunc||function(r){var i=+r;return(i>0?e:n)(i)},ka}var Ba,B1;function Li(){if(B1)return Ba;B1=1;var n=u2();return Ba=function(e){var t=+e;return t!==t||t===0?0:n(t)},Ba}var ja,j1;function aF(){if(j1)return ja;j1=1;var n=Li(),e=Math.min;return ja=function(t){var r=n(t);return r>0?e(r,9007199254740991):0},ja}var La,L1;function pr(){if(L1)return La;L1=1;var n=aF();return La=function(e){return n(e.length)},La}var za,z1;function uF(){if(z1)return za;z1=1;var n=TypeError,e=9007199254740991;return za=function(t){if(t>e)throw n("Maximum allowed index exceeded");return t},za}var Wa,W1;function ro(){if(W1)return Wa;W1=1;var n=qe(),e=vt(),t=Hn();return Wa=function(r,i,s){n?e.f(r,i,t(0,s)):r[i]=s},Wa}var Ha,H1;function Cm(){if(H1)return Ha;H1=1;var n=Be(),e=n("toStringTag"),t={};return t[e]="z",Ha=String(t)==="[object z]",Ha}var Ua,U1;function gr(){if(U1)return Ua;U1=1;var n=Cm(),e=Fe(),t=Xt(),r=Be(),i=r("toStringTag"),s=Object,o=t((function(){return arguments})())==="Arguments",a=function(u,l){try{return u[l]}catch{}};return Ua=n?t:function(u){var l,d,c;return u===void 0?"Undefined":u===null?"Null":typeof(d=a(l=s(u),i))=="string"?d:o?t(l):(c=t(l))==="Object"&&e(l.callee)?"Arguments":c},Ua}var Va,V1;function l2(){if(V1)return Va;V1=1;var n=de(),e=Fe(),t=Rm(),r=n(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(i){return r(i)}),Va=t.inspectSource,Va}var Ga,G1;function lF(){if(G1)return Ga;G1=1;var n=de(),e=se(),t=Fe(),r=gr(),i=at(),s=l2(),o=function(){},a=i("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=n(u.exec),d=!u.test(o),c=function(v){if(!t(v))return!1;try{return a(o,[],v),!0}catch{return!1}},h=function(v){if(!t(v))return!1;switch(r(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!l(u,s(v))}catch{return!0}};return h.sham=!0,Ga=!a||e(function(){var f;return c(c.call)||!c(Object)||!c(function(){f=!0})||f})?h:c,Ga}var Ka,K1;function d2(){if(K1)return Ka;K1=1;var n=Xr(),e=lF(),t=Qe(),r=Be(),i=r("species"),s=Array;return Ka=function(o){var a;return n(o)&&(a=o.constructor,e(a)&&(a===s||n(a.prototype))?a=void 0:t(a)&&(a=a[i],a===null&&(a=void 0))),a===void 0?s:a},Ka}var Ya,Y1;function xm(){if(Y1)return Ya;Y1=1;var n=d2();return Ya=function(e,t){return new(n(e))(t===0?0:t)},Ya}var Xa,X1;function Kn(){if(X1)return Xa;X1=1;var n=se(),e=Be(),t=Vn(),r=e("species");return Xa=function(i){return t>=51||!n(function(){var s=[],o=s.constructor={};return o[r]=function(){return{foo:1}},s[i](Boolean).foo!==1})},Xa}var J1;function dF(){if(J1)return F1;J1=1;var n=Y(),e=se(),t=Xr(),r=Qe(),i=Tt(),s=pr(),o=uF(),a=ro(),u=xm(),l=Kn(),d=Be(),c=Vn(),h=d("isConcatSpreadable"),f=c>=51||!e(function(){var b=[];return b[h]=!1,b.concat()[0]!==b}),v=function(b){if(!r(b))return!1;var y=b[h];return y!==void 0?!!y:t(b)},p=!f||!l("concat");return n({target:"Array",proto:!0,arity:1,forced:p},{concat:function(y){var g=i(this),S=u(g,0),m=0,w,O,I,_,E;for(w=-1,I=arguments.length;w<I;w++)if(E=w===-1?g:arguments[w],v(E))for(_=s(E),o(m+_),O=0;O<_;O++,m++)O in E&&a(S,m,E[O]);else o(m+1),a(S,m++,E);return S.length=m,S}}),F1}var Z1={},Q1={},Ja,e_;function yr(){if(e_)return Ja;e_=1;var n=gr(),e=String;return Ja=function(t){if(n(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(t)},Ja}var Za={},Qa,t_;function Dm(){if(t_)return Qa;t_=1;var n=Li(),e=Math.max,t=Math.min;return Qa=function(r,i){var s=n(r);return s<0?e(s+i,0):t(s,i)},Qa}var eu,r_;function c2(){if(r_)return eu;r_=1;var n=Ft(),e=Dm(),t=pr(),r=function(i){return function(s,o,a){var u=n(s),l=t(u);if(l===0)return!i&&-1;var d=e(a,l),c;if(i&&o!==o){for(;l>d;)if(c=u[d++],c!==c)return!0}else for(;l>d;d++)if((i||d in u)&&u[d]===o)return i||d||0;return!i&&-1}};return eu={includes:r(!0),indexOf:r(!1)},eu}var tu,i_;function Yn(){return i_||(i_=1,tu={}),tu}var ru,n_;function cF(){if(n_)return ru;n_=1;var n=de(),e=ke(),t=Ft(),r=c2().indexOf,i=Yn(),s=n([].push);return ru=function(o,a){var u=t(o),l=0,d=[],c;for(c in u)!e(i,c)&&e(u,c)&&s(d,c);for(;a.length>l;)e(u,c=a[l++])&&(~r(d,c)||s(d,c));return d},ru}var iu,s_;function Am(){return s_||(s_=1,iu=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),iu}var nu,o_;function io(){if(o_)return nu;o_=1;var n=cF(),e=Am();return nu=Object.keys||function(r){return n(r,e)},nu}var a_;function Mm(){if(a_)return Za;a_=1;var n=qe(),e=sF(),t=vt(),r=Zt(),i=Ft(),s=io();return Za.f=n&&!e?Object.defineProperties:function(a,u){r(a);for(var l=i(u),d=s(u),c=d.length,h=0,f;c>h;)t.f(a,f=d[h++],l[f]);return a},Za}var su,u_;function h2(){if(u_)return su;u_=1;var n=at();return su=n("document","documentElement"),su}var ou,l_;function no(){if(l_)return ou;l_=1;var n=Bi(),e=Qs(),t=n("keys");return ou=function(r){return t[r]||(t[r]=e(r))},ou}var au,d_;function Xn(){if(d_)return au;d_=1;var n=Zt(),e=Mm(),t=Am(),r=Yn(),i=h2(),s=iF(),o=no(),a=">",u="<",l="prototype",d="script",c=o("IE_PROTO"),h=function(){},f=function(g){return u+d+a+g+u+"/"+d+a},v=function(g){g.write(f("")),g.close();var S=g.parentWindow.Object;return g=null,S},p=function(){var g=s("iframe"),S="java"+d+":",m;return g.style.display="none",i.appendChild(g),g.src=String(S),m=g.contentWindow.document,m.open(),m.write(f("document.F=Object")),m.close(),m.F},b,y=function(){try{b=new ActiveXObject("htmlfile")}catch{}y=typeof document<"u"?document.domain&&b?v(b):p():v(b);for(var g=t.length;g--;)delete y[l][t[g]];return y()};return r[c]=!0,au=Object.create||function(S,m){var w;return S!==null?(h[l]=n(S),w=new h,h[l]=null,w[c]=S):w=y(),m===void 0?w:e.f(w,m)},au}var uu={},c_;function so(){if(c_)return uu;c_=1;var n=cF(),e=Am(),t=e.concat("length","prototype");return uu.f=Object.getOwnPropertyNames||function(i){return n(i,t)},uu}var lu={},du,h_;function zi(){if(h_)return du;h_=1;var n=de();return du=n([].slice),du}var f_;function hF(){if(f_)return lu;f_=1;var n=Xt(),e=Ft(),t=so().f,r=zi(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(o){try{return t(o)}catch{return r(i)}};return lu.f=function(a){return i&&n(a)==="Window"?s(a):t(e(a))},lu}var cu={},v_;function oo(){return v_||(v_=1,cu.f=Object.getOwnPropertySymbols),cu}var hu,p_;function Jn(){if(p_)return hu;p_=1;var n=ji();return hu=function(e,t,r,i){return i&&i.enumerable?e[t]=r:n(e,t,r),e},hu}var fu,g_;function Fm(){if(g_)return fu;g_=1;var n=vt();return fu=function(e,t,r){return n.f(e,t,r)},fu}var vu={},y_;function ao(){if(y_)return vu;y_=1;var n=Be();return vu.f=n,vu}var pu,m_;function be(){if(m_)return pu;m_=1;var n=Ae(),e=ke(),t=ao(),r=vt().f;return pu=function(i){var s=n.Symbol||(n.Symbol={});e(s,i)||r(s,i,{value:t.f(i)})},pu}var gu,b_;function fF(){if(b_)return gu;b_=1;var n=nt(),e=at(),t=Be(),r=Jn();return gu=function(){var i=e("Symbol"),s=i&&i.prototype,o=s&&s.valueOf,a=t("toPrimitive");s&&!s[a]&&r(s,a,function(u){return n(o,this)},{arity:1})},gu}var yu,__;function f2(){if(__)return yu;__=1;var n=Cm(),e=gr();return yu=n?{}.toString:function(){return"[object "+e(this)+"]"},yu}var mu,w_;function Jr(){if(w_)return mu;w_=1;var n=Cm(),e=vt().f,t=ji(),r=ke(),i=f2(),s=Be(),o=s("toStringTag");return mu=function(a,u,l,d){var c=l?a:a&&a.prototype;c&&(r(c,o)||e(c,o,{configurable:!0,value:u}),d&&!n&&t(c,"toString",i))},mu}var bu,E_;function v2(){if(E_)return bu;E_=1;var n=Re(),e=Fe(),t=n.WeakMap;return bu=e(t)&&/native code/.test(String(t)),bu}var _u,S_;function Zn(){if(S_)return _u;S_=1;var n=v2(),e=Re(),t=Qe(),r=ji(),i=ke(),s=Rm(),o=no(),a=Yn(),u="Object already initialized",l=e.TypeError,d=e.WeakMap,c,h,f,v=function(g){return f(g)?h(g):c(g,{})},p=function(g){return function(S){var m;if(!t(S)||(m=h(S)).type!==g)throw new l("Incompatible receiver, "+g+" required");return m}};if(n||s.state){var b=s.state||(s.state=new d);b.get=b.get,b.has=b.has,b.set=b.set,c=function(g,S){if(b.has(g))throw new l(u);return S.facade=g,b.set(g,S),S},h=function(g){return b.get(g)||{}},f=function(g){return b.has(g)}}else{var y=o("state");a[y]=!0,c=function(g,S){if(i(g,y))throw new l(u);return S.facade=g,r(g,y,S),S},h=function(g){return i(g,y)?g[y]:{}},f=function(g){return i(g,y)}}return _u={set:c,get:h,has:f,enforce:v,getterFor:p},_u}var wu,O_;function Wi(){if(O_)return wu;O_=1;var n=to(),e=de(),t=Zs(),r=Tt(),i=pr(),s=xm(),o=e([].push),a=function(u){var l=u===1,d=u===2,c=u===3,h=u===4,f=u===6,v=u===7,p=u===5||f;return function(b,y,g,S){for(var m=r(b),w=t(m),O=i(w),I=n(y,g),_=0,E=S||s,$=l?E(b,O):d||v?E(b,0):void 0,T,P;O>_;_++)if((p||_ in w)&&(T=w[_],P=I(T,_,m),u))if(l)$[_]=P;else if(P)switch(u){case 3:return!0;case 5:return T;case 6:return _;case 2:o($,T)}else switch(u){case 4:return!1;case 7:o($,T)}return f?-1:c||h?h:$}};return wu={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},wu}var I_;function p2(){if(I_)return Q1;I_=1;var n=Y(),e=Re(),t=nt(),r=de(),i=ki(),s=qe(),o=Fi(),a=se(),u=ke(),l=Ne(),d=Zt(),c=Ft(),h=qm(),f=yr(),v=Hn(),p=Xn(),b=io(),y=so(),g=hF(),S=oo(),m=eo(),w=vt(),O=Mm(),I=Tm(),_=Jn(),E=Fm(),$=Bi(),T=no(),P=Yn(),R=Qs(),C=Be(),M=ao(),K=be(),L=fF(),J=Jr(),Q=Zn(),ae=Wi().forEach,W=T("hidden"),ue="Symbol",ye="prototype",me=Q.set,bt=Q.getterFor(ue),ve=Object[ye],Ve=e.Symbol,_t=Ve&&Ve[ye],Do=e.RangeError,Ao=e.TypeError,Sr=e.QObject,ln=m.f,Ge=w.f,dn=g.f,Mo=I.f,cn=r([].push),De=$("symbols"),wt=$("op-symbols"),Fo=$("wks"),Or=!Sr||!Sr[ye]||!Sr[ye].findChild,hn=function(H,F,N){var k=ln(ve,F);k&&delete ve[F],Ge(H,F,N),k&&H!==ve&&Ge(ve,F,k)},Ir=s&&a(function(){return p(Ge({},"a",{get:function(){return Ge(this,"a",{value:7}).a}})).a!==7})?hn:Ge,$r=function(H,F){var N=De[H]=p(_t);return me(N,{type:ue,tag:H,description:F}),s||(N.description=F),N},Bt=function(F,N,k){F===ve&&Bt(wt,N,k),d(F);var U=h(N);return d(k),u(De,U)?(k.enumerable?(u(F,W)&&F[W][U]&&(F[W][U]=!1),k=p(k,{enumerable:v(0,!1)})):(u(F,W)||Ge(F,W,v(1,p(null))),F[W][U]=!0),Ir(F,U,k)):Ge(F,U,k)},Tr=function(F,N){d(F);var k=c(N),U=b(k).concat(pn(k));return ae(U,function(ie){(!s||t(Pr,k,ie))&&Bt(F,ie,k[ie])}),F},No=function(F,N){return N===void 0?p(F):Tr(p(F),N)},Pr=function(F){var N=h(F),k=t(Mo,this,N);return this===ve&&u(De,N)&&!u(wt,N)?!1:k||!u(this,N)||!u(De,N)||u(this,W)&&this[W][N]?k:!0},fn=function(F,N){var k=c(F),U=h(N);if(!(k===ve&&u(De,U)&&!u(wt,U))){var ie=ln(k,U);return ie&&u(De,U)&&!(u(k,W)&&k[W][U])&&(ie.enumerable=!0),ie}},vn=function(F){var N=dn(c(F)),k=[];return ae(N,function(U){!u(De,U)&&!u(P,U)&&cn(k,U)}),k},pn=function(H){var F=H===ve,N=dn(F?wt:c(H)),k=[];return ae(N,function(U){u(De,U)&&(!F||u(ve,U))&&cn(k,De[U])}),k};return o||(Ve=function(){if(l(_t,this))throw new Ao("Symbol is not a constructor");var F=!arguments.length||arguments[0]===void 0?void 0:f(arguments[0]),N=R(F),k=function(U){var ie=this===void 0?e:this;ie===ve&&t(k,wt,U),u(ie,W)&&u(ie[W],N)&&(ie[W][N]=!1);var gn=v(1,U);try{Ir(ie,N,gn)}catch(yn){if(!(yn instanceof Do))throw yn;hn(ie,N,gn)}};return s&&Or&&Ir(ve,N,{configurable:!0,set:k}),$r(N,F)},_t=Ve[ye],_(_t,"toString",function(){return bt(this).tag}),_(Ve,"withoutSetter",function(H){return $r(R(H),H)}),I.f=Pr,w.f=Bt,O.f=Tr,m.f=fn,y.f=g.f=vn,S.f=pn,M.f=function(H){return $r(C(H),H)},s&&(E(_t,"description",{configurable:!0,get:function(){return bt(this).description}}),i||_(ve,"propertyIsEnumerable",Pr,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:Ve}),ae(b(Fo),function(H){K(H)}),n({target:ue,stat:!0,forced:!o},{useSetter:function(){Or=!0},useSimple:function(){Or=!1}}),n({target:"Object",stat:!0,forced:!o,sham:!s},{create:No,defineProperty:Bt,defineProperties:Tr,getOwnPropertyDescriptor:fn}),n({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:vn}),L(),J(Ve,ue),P[W]=!0,Q1}var $_={},Eu,T_;function vF(){if(T_)return Eu;T_=1;var n=Fi();return Eu=n&&!!Symbol.for&&!!Symbol.keyFor,Eu}var P_;function g2(){if(P_)return $_;P_=1;var n=Y(),e=at(),t=ke(),r=yr(),i=Bi(),s=vF(),o=i("string-to-symbol-registry"),a=i("symbol-to-string-registry");return n({target:"Symbol",stat:!0,forced:!s},{for:function(u){var l=r(u);if(t(o,l))return o[l];var d=e("Symbol")(l);return o[l]=d,a[d]=l,d}}),$_}var R_={},q_;function y2(){if(q_)return R_;q_=1;var n=Y(),e=ke(),t=Gn(),r=Ni(),i=Bi(),s=vF(),o=i("symbol-to-string-registry");return n({target:"Symbol",stat:!0,forced:!s},{keyFor:function(u){if(!t(u))throw new TypeError(r(u)+" is not a symbol");if(e(o,u))return o[u]}}),R_}var C_={},Su,x_;function m2(){if(x_)return Su;x_=1;var n=de(),e=Xr(),t=Fe(),r=Xt(),i=yr(),s=n([].push);return Su=function(o){if(t(o))return o;if(e(o)){for(var a=o.length,u=[],l=0;l<a;l++){var d=o[l];typeof d=="string"?s(u,d):(typeof d=="number"||r(d)==="Number"||r(d)==="String")&&s(u,i(d))}var c=u.length,h=!0;return function(f,v){if(h)return h=!1,v;if(e(this))return v;for(var p=0;p<c;p++)if(u[p]===f)return v}}},Su}var D_;function pF(){if(D_)return C_;D_=1;var n=Y(),e=at(),t=Js(),r=nt(),i=de(),s=se(),o=Fe(),a=Gn(),u=zi(),l=m2(),d=Fi(),c=String,h=e("JSON","stringify"),f=i(/./.exec),v=i("".charAt),p=i("".charCodeAt),b=i("".replace),y=i(1.1.toString),g=/[\uD800-\uDFFF]/g,S=/^[\uD800-\uDBFF]$/,m=/^[\uDC00-\uDFFF]$/,w=!d||s(function(){var E=e("Symbol")("stringify detection");return h([E])!=="[null]"||h({a:E})!=="{}"||h(Object(E))!=="{}"}),O=s(function(){return h("\uDF06\uD834")!=='"\\udf06\\ud834"'||h("\uDEAD")!=='"\\udead"'}),I=function(E,$){var T=u(arguments),P=l($);if(!(!o(P)&&(E===void 0||a(E))))return T[1]=function(R,C){if(o(P)&&(C=r(P,this,c(R),C)),!a(C))return C},t(h,null,T)},_=function(E,$,T){var P=v(T,$-1),R=v(T,$+1);return f(S,E)&&!f(m,R)||f(m,E)&&!f(S,P)?"\\u"+y(p(E,0),16):E};return h&&n({target:"JSON",stat:!0,arity:3,forced:w||O},{stringify:function($,T,P){var R=u(arguments),C=t(w?I:h,null,R);return O&&typeof C=="string"?b(C,g,_):C}}),C_}var A_={},M_;function b2(){if(M_)return A_;M_=1;var n=Y(),e=Fi(),t=se(),r=oo(),i=Tt(),s=!e||t(function(){r.f(1)});return n({target:"Object",stat:!0,forced:s},{getOwnPropertySymbols:function(a){var u=r.f;return u?u(i(a)):[]}}),A_}var F_;function gF(){return F_||(F_=1,p2(),g2(),y2(),pF(),b2()),Z1}var N_={},k_;function yF(){if(k_)return N_;k_=1;var n=be();return n("asyncDispose"),N_}var B_={},j_;function _2(){if(j_)return B_;j_=1;var n=be();return n("asyncIterator"),B_}var L_={},z_;function mF(){if(z_)return L_;z_=1;var n=be();return n("dispose"),L_}var W_={},H_;function w2(){if(H_)return W_;H_=1;var n=be();return n("hasInstance"),W_}var U_={},V_;function E2(){if(V_)return U_;V_=1;var n=be();return n("isConcatSpreadable"),U_}var G_={},K_;function bF(){if(K_)return G_;K_=1;var n=be();return n("iterator"),G_}var Y_={},X_;function S2(){if(X_)return Y_;X_=1;var n=be();return n("match"),Y_}var J_={},Z_;function O2(){if(Z_)return J_;Z_=1;var n=be();return n("matchAll"),J_}var Q_={},ew;function I2(){if(ew)return Q_;ew=1;var n=be();return n("replace"),Q_}var tw={},rw;function $2(){if(rw)return tw;rw=1;var n=be();return n("search"),tw}var iw={},nw;function T2(){if(nw)return iw;nw=1;var n=be();return n("species"),iw}var sw={},ow;function P2(){if(ow)return sw;ow=1;var n=be();return n("split"),sw}var aw={},uw;function _F(){if(uw)return aw;uw=1;var n=be(),e=fF();return n("toPrimitive"),e(),aw}var lw={},dw;function R2(){if(dw)return lw;dw=1;var n=at(),e=be(),t=Jr();return e("toStringTag"),t(n("Symbol"),"Symbol"),lw}var cw={},hw;function q2(){if(hw)return cw;hw=1;var n=be();return n("unscopables"),cw}var fw={},vw;function C2(){if(vw)return fw;vw=1;var n=Re(),e=Jr();return e(n.JSON,"JSON",!0),fw}var Ou,pw;function x2(){if(pw)return Ou;pw=1,dF(),gF(),yF(),_2(),mF(),w2(),E2(),bF(),S2(),O2(),I2(),$2(),T2(),P2(),_F(),R2(),q2(),C2();var n=Ae();return Ou=n.Symbol,Ou}var gw={},Iu,yw;function D2(){return yw||(yw=1,Iu=function(){}),Iu}var $u,mw;function Hi(){return mw||(mw=1,$u={}),$u}var Tu,bw;function A2(){if(bw)return Tu;bw=1;var n=qe(),e=ke(),t=Function.prototype,r=n&&Object.getOwnPropertyDescriptor,i=e(t,"name"),s=i&&(function(){}).name==="something",o=i&&(!n||n&&r(t,"name").configurable);return Tu={EXISTS:i,PROPER:s,CONFIGURABLE:o},Tu}var Pu,_w;function M2(){if(_w)return Pu;_w=1;var n=se();return Pu=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Pu}var Ru,ww;function wF(){if(ww)return Ru;ww=1;var n=ke(),e=Fe(),t=Tt(),r=no(),i=M2(),s=r("IE_PROTO"),o=Object,a=o.prototype;return Ru=i?o.getPrototypeOf:function(u){var l=t(u);if(n(l,s))return l[s];var d=l.constructor;return e(d)&&l instanceof d?d.prototype:l instanceof o?a:null},Ru}var qu,Ew;function EF(){if(Ew)return qu;Ew=1;var n=se(),e=Fe(),t=Qe(),r=Xn(),i=wF(),s=Jn(),o=Be(),a=ki(),u=o("iterator"),l=!1,d,c,h;[].keys&&(h=[].keys(),"next"in h?(c=i(i(h)),c!==Object.prototype&&(d=c)):l=!0);var f=!t(d)||n(function(){var v={};return d[u].call(v)!==v});return f?d={}:a&&(d=r(d)),e(d[u])||s(d,u,function(){return this}),qu={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:l},qu}var Cu,Sw;function F2(){if(Sw)return Cu;Sw=1;var n=EF().IteratorPrototype,e=Xn(),t=Hn(),r=Jr(),i=Hi(),s=function(){return this};return Cu=function(o,a,u,l){var d=a+" Iterator";return o.prototype=e(n,{next:t(+!l,u)}),r(o,d,!1,!0),i[d]=s,o},Cu}var xu,Ow;function N2(){if(Ow)return xu;Ow=1;var n=de(),e=Jt();return xu=function(t,r,i){try{return n(e(Object.getOwnPropertyDescriptor(t,r)[i]))}catch{}},xu}var Du,Iw;function k2(){if(Iw)return Du;Iw=1;var n=Qe();return Du=function(e){return n(e)||e===null},Du}var Au,$w;function B2(){if($w)return Au;$w=1;var n=k2(),e=String,t=TypeError;return Au=function(r){if(n(r))return r;throw new t("Can't set "+e(r)+" as a prototype")},Au}var Mu,Tw;function j2(){if(Tw)return Mu;Tw=1;var n=N2(),e=Qe(),t=Yr(),r=B2();return Mu=Object.setPrototypeOf||("__proto__"in{}?(function(){var i=!1,s={},o;try{o=n(Object.prototype,"__proto__","set"),o(s,[]),i=s instanceof Array}catch{}return function(u,l){return t(u),r(l),e(u)&&(i?o(u,l):u.__proto__=l),u}})():void 0),Mu}var Fu,Pw;function Nm(){if(Pw)return Fu;Pw=1;var n=Y(),e=nt(),t=ki(),r=A2(),i=Fe(),s=F2(),o=wF(),a=j2(),u=Jr(),l=ji(),d=Jn(),c=Be(),h=Hi(),f=EF(),v=r.PROPER,p=r.CONFIGURABLE,b=f.IteratorPrototype,y=f.BUGGY_SAFARI_ITERATORS,g=c("iterator"),S="keys",m="values",w="entries",O=function(){return this};return Fu=function(I,_,E,$,T,P,R){s(E,_,$);var C=function(me){if(me===T&&Q)return Q;if(!y&&me&&me in L)return L[me];switch(me){case S:return function(){return new E(this,me)};case m:return function(){return new E(this,me)};case w:return function(){return new E(this,me)}}return function(){return new E(this)}},M=_+" Iterator",K=!1,L=I.prototype,J=L[g]||L["@@iterator"]||T&&L[T],Q=!y&&J||C(T),ae=_==="Array"&&L.entries||J,W,ue,ye;if(ae&&(W=o(ae.call(new I)),W!==Object.prototype&&W.next&&(!t&&o(W)!==b&&(a?a(W,b):i(W[g])||d(W,g,O)),u(W,M,!0,!0),t&&(h[M]=O))),v&&T===m&&J&&J.name!==m&&(!t&&p?l(L,"name",m):(K=!0,Q=function(){return e(J,this)})),T)if(ue={values:C(m),keys:P?Q:C(S),entries:C(w)},R)for(ye in ue)(y||K||!(ye in L))&&d(L,ye,ue[ye]);else n({target:_,proto:!0,forced:y||K},ue);return(!t||R)&&L[g]!==Q&&d(L,g,Q,{name:T}),h[_]=Q,ue},Fu}var Nu,Rw;function km(){return Rw||(Rw=1,Nu=function(n,e){return{value:n,done:e}}),Nu}var ku,qw;function mr(){if(qw)return ku;qw=1;var n=Ft(),e=D2(),t=Hi(),r=Zn(),i=vt().f,s=Nm(),o=km(),a=ki(),u=qe(),l="Array Iterator",d=r.set,c=r.getterFor(l);ku=s(Array,"Array",function(f,v){d(this,{type:l,target:n(f),index:0,kind:v})},function(){var f=c(this),v=f.target,p=f.index++;if(!v||p>=v.length)return f.target=null,o(void 0,!0);switch(f.kind){case"keys":return o(p,!1);case"values":return o(v[p],!1)}return o([p,v[p]],!1)},"values");var h=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!a&&u&&h.name!=="values")try{i(h,"name",{value:"values"})}catch{}return ku}var Bu,Cw;function L2(){return Cw||(Cw=1,Bu={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}),Bu}var xw;function br(){if(xw)return gw;xw=1,mr();var n=L2(),e=Re(),t=Jr(),r=Hi();for(var i in n)t(e[i],i),r[i]=r.Array;return gw}var ju,Dw;function SF(){if(Dw)return ju;Dw=1;var n=x2();return br(),ju=n,ju}var Aw={},Mw;function z2(){if(Mw)return Aw;Mw=1;var n=Be(),e=vt().f,t=n("metadata"),r=Function.prototype;return r[t]===void 0&&e(r,t,{value:null}),Aw}var Fw={},Nw;function W2(){return Nw||(Nw=1,yF()),Fw}var kw={},Bw;function H2(){return Bw||(Bw=1,mF()),kw}var jw={},Lw;function U2(){if(Lw)return jw;Lw=1;var n=be();return n("metadata"),jw}var Lu,zw;function V2(){if(zw)return Lu;zw=1;var n=SF();return z2(),W2(),H2(),U2(),Lu=n,Lu}var Ww={},zu,Hw;function OF(){if(Hw)return zu;Hw=1;var n=at(),e=de(),t=n("Symbol"),r=t.keyFor,i=e(t.prototype.valueOf);return zu=t.isRegisteredSymbol||function(o){try{return r(i(o))!==void 0}catch{return!1}},zu}var Uw;function G2(){if(Uw)return Ww;Uw=1;var n=Y(),e=OF();return n({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),Ww}var Vw={},Wu,Gw;function IF(){if(Gw)return Wu;Gw=1;for(var n=Bi(),e=at(),t=de(),r=Gn(),i=Be(),s=e("Symbol"),o=s.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),u=t(s.prototype.valueOf),l=n("wks"),d=0,c=a(s),h=c.length;d<h;d++)try{var f=c[d];r(s[f])&&i(f)}catch{}return Wu=function(p){if(o&&o(p))return!0;try{for(var b=u(p),y=0,g=a(l),S=g.length;y<S;y++)if(l[g[y]]==b)return!0}catch{}return!1},Wu}var Kw;function K2(){if(Kw)return Vw;Kw=1;var n=Y(),e=IF();return n({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:e}),Vw}var Yw={},Xw;function Y2(){if(Xw)return Yw;Xw=1;var n=be();return n("customMatcher"),Yw}var Jw={},Zw;function X2(){if(Zw)return Jw;Zw=1;var n=be();return n("observable"),Jw}var Qw={},eE;function J2(){if(eE)return Qw;eE=1;var n=Y(),e=OF();return n({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:e}),Qw}var tE={},rE;function Z2(){if(rE)return tE;rE=1;var n=Y(),e=IF();return n({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:e}),tE}var iE={},nE;function Q2(){if(nE)return iE;nE=1;var n=be();return n("matcher"),iE}var sE={},oE;function eB(){if(oE)return sE;oE=1;var n=be();return n("metadataKey"),sE}var aE={},uE;function tB(){if(uE)return aE;uE=1;var n=be();return n("patternMatch"),aE}var lE={},dE;function rB(){if(dE)return lE;dE=1;var n=be();return n("replaceAll"),lE}var Hu,cE;function iB(){if(cE)return Hu;cE=1;var n=V2();return G2(),K2(),Y2(),X2(),J2(),Z2(),Q2(),eB(),tB(),rB(),Hu=n,Hu}var Uu,hE;function nB(){return hE||(hE=1,Uu=iB()),Uu}var sB=nB(),Is=ee(sB),fE={},Vu,vE;function oB(){if(vE)return Vu;vE=1;var n=de(),e=Li(),t=yr(),r=Yr(),i=n("".charAt),s=n("".charCodeAt),o=n("".slice),a=function(u){return function(l,d){var c=t(r(l)),h=e(d),f=c.length,v,p;return h<0||h>=f?u?"":void 0:(v=s(c,h),v<55296||v>56319||h+1===f||(p=s(c,h+1))<56320||p>57343?u?i(c,h):v:u?o(c,h,h+2):(v-55296<<10)+(p-56320)+65536)}};return Vu={codeAt:a(!1),charAt:a(!0)},Vu}var pE;function uo(){if(pE)return fE;pE=1;var n=oB().charAt,e=yr(),t=Zn(),r=Nm(),i=km(),s="String Iterator",o=t.set,a=t.getterFor(s);return r(String,"String",function(u){o(this,{type:s,string:e(u),index:0})},function(){var l=a(this),d=l.string,c=l.index,h;return c>=d.length?i(void 0,!0):(h=n(d,c),l.index+=h.length,i(h,!1))}),fE}var Gu,gE;function aB(){if(gE)return Gu;gE=1,mr(),uo(),bF();var n=ao();return Gu=n.f("iterator"),Gu}var Ku,yE;function $F(){if(yE)return Ku;yE=1;var n=aB();return br(),Ku=n,Ku}var Yu,mE;function uB(){if(mE)return Yu;mE=1;var n=$F();return Yu=n,Yu}var Xu,bE;function lB(){if(bE)return Xu;bE=1;var n=uB();return Xu=n,Xu}var Ju,_E;function dB(){return _E||(_E=1,Ju=lB()),Ju}var cB=dB(),hB=ee(cB);function Cn(n){"@babel/helpers - typeof";return Cn=typeof Is=="function"&&typeof hB=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Is=="function"&&e.constructor===Is&&e!==Is.prototype?"symbol":typeof e},Cn(n)}var Zu,wE;function fB(){if(wE)return Zu;wE=1,_F();var n=ao();return Zu=n.f("toPrimitive"),Zu}var Qu,EE;function vB(){if(EE)return Qu;EE=1;var n=fB();return Qu=n,Qu}var el,SE;function pB(){if(SE)return el;SE=1;var n=vB();return el=n,el}var tl,OE;function gB(){if(OE)return tl;OE=1;var n=pB();return tl=n,tl}var rl,IE;function yB(){return IE||(IE=1,rl=gB()),rl}var mB=yB(),bB=ee(mB);function _B(n,e){if(Cn(n)!="object"||!n)return n;var t=n[bB];if(t!==void 0){var r=t.call(n,e);if(Cn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function wB(n){var e=_B(n,"string");return Cn(e)=="symbol"?e:e+""}function or(n,e,t){return(e=wB(e))in n?a2(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var $E={},il,TE;function EB(){if(TE)return il;TE=1;var n=de(),e=Jt(),t=Qe(),r=ke(),i=zi(),s=Wn(),o=Function,a=n([].concat),u=n([].join),l={},d=function(c,h,f){if(!r(l,h)){for(var v=[],p=0;p<h;p++)v[p]="a["+p+"]";l[h]=o("C,a","return new C("+u(v,",")+")")}return l[h](c,f)};return il=s?o.bind:function(h){var f=e(this),v=f.prototype,p=i(arguments,1),b=function(){var g=a(p,i(arguments));return this instanceof b?d(f,g.length,g):f.apply(h,g)};return t(v)&&(b.prototype=v),b},il}var PE;function SB(){if(PE)return $E;PE=1;var n=Y(),e=EB();return n({target:"Function",proto:!0,forced:Function.bind!==e},{bind:e}),$E}var nl,RE;function st(){if(RE)return nl;RE=1;var n=Re(),e=Ae();return nl=function(t,r){var i=e[t+"Prototype"],s=i&&i[r];if(s)return s;var o=n[t],a=o&&o.prototype;return a&&a[r]},nl}var sl,qE;function OB(){if(qE)return sl;qE=1,SB();var n=st();return sl=n("Function","bind"),sl}var ol,CE;function IB(){if(CE)return ol;CE=1;var n=Ne(),e=OB(),t=Function.prototype;return ol=function(r){var i=r.bind;return r===t||n(t,r)&&i===t.bind?e:i},ol}var al,xE;function $B(){if(xE)return al;xE=1;var n=IB();return al=n,al}var ul,DE;function TB(){return DE||(DE=1,ul=$B()),ul}var PB=TB(),TF=ee(PB),AE={},ll,ME;function RB(){if(ME)return ll;ME=1;var n=Jt(),e=Tt(),t=Zs(),r=pr(),i=TypeError,s="Reduce of empty array with no initial value",o=function(a){return function(u,l,d,c){var h=e(u),f=t(h),v=r(h);if(n(l),v===0&&d<2)throw new i(s);var p=a?v-1:0,b=a?-1:1;if(d<2)for(;;){if(p in f){c=f[p],p+=b;break}if(p+=b,a?p<0:v<=p)throw new i(s)}for(;a?p>=0:v>p;p+=b)p in f&&(c=l(c,f[p],p,h));return c}};return ll={left:o(!1),right:o(!0)},ll}var dl,FE;function lo(){if(FE)return dl;FE=1;var n=se();return dl=function(e,t){var r=[][e];return!!r&&n(function(){r.call(null,t||function(){return 1},1)})},dl}var cl,NE;function PF(){if(NE)return cl;NE=1;var n=Re(),e=Mi(),t=Xt(),r=function(i){return e.slice(0,i.length)===i};return cl=(function(){return r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":n.Bun&&typeof Bun.version=="string"?"BUN":n.Deno&&typeof Deno.version=="object"?"DENO":t(n.process)==="process"?"NODE":n.window&&n.document?"BROWSER":"REST"})(),cl}var hl,kE;function qB(){if(kE)return hl;kE=1;var n=PF();return hl=n==="NODE",hl}var BE;function CB(){if(BE)return AE;BE=1;var n=Y(),e=RB().left,t=lo(),r=Vn(),i=qB(),s=!i&&r>79&&r<83,o=s||!t("reduce");return n({target:"Array",proto:!0,forced:o},{reduce:function(u){var l=arguments.length;return e(this,u,l,l>1?arguments[1]:void 0)}}),AE}var fl,jE;function xB(){if(jE)return fl;jE=1,CB();var n=st();return fl=n("Array","reduce"),fl}var vl,LE;function DB(){if(LE)return vl;LE=1;var n=Ne(),e=xB(),t=Array.prototype;return vl=function(r){var i=r.reduce;return r===t||n(t,r)&&i===t.reduce?e:i},vl}var pl,zE;function AB(){if(zE)return pl;zE=1;var n=DB();return pl=n,pl}var gl,WE;function MB(){return WE||(WE=1,gl=AB()),gl}var FB=MB(),NB=ee(FB),HE={},UE;function kB(){if(UE)return HE;UE=1;var n=Y(),e=Wi().filter,t=Kn(),r=t("filter");return n({target:"Array",proto:!0,forced:!r},{filter:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),HE}var yl,VE;function BB(){if(VE)return yl;VE=1,kB();var n=st();return yl=n("Array","filter"),yl}var ml,GE;function jB(){if(GE)return ml;GE=1;var n=Ne(),e=BB(),t=Array.prototype;return ml=function(r){var i=r.filter;return r===t||n(t,r)&&i===t.filter?e:i},ml}var bl,KE;function LB(){if(KE)return bl;KE=1;var n=jB();return bl=n,bl}var _l,YE;function zB(){return YE||(YE=1,_l=LB()),_l}var WB=zB(),yi=ee(WB),XE={},JE;function HB(){if(JE)return XE;JE=1;var n=Y(),e=Wi().map,t=Kn(),r=t("map");return n({target:"Array",proto:!0,forced:!r},{map:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),XE}var wl,ZE;function UB(){if(ZE)return wl;ZE=1,HB();var n=st();return wl=n("Array","map"),wl}var El,QE;function VB(){if(QE)return El;QE=1;var n=Ne(),e=UB(),t=Array.prototype;return El=function(r){var i=r.map;return r===t||n(t,r)&&i===t.map?e:i},El}var Sl,eS;function GB(){if(eS)return Sl;eS=1;var n=VB();return Sl=n,Sl}var Ol,tS;function KB(){return tS||(tS=1,Ol=GB()),Ol}var YB=KB(),St=ee(YB),Il,rS;function XB(){return rS||(rS=1,Il=SF()),Il}var JB=XB(),ZB=ee(JB),iS={},nS;function QB(){if(nS)return iS;nS=1;var n=Y(),e=Xr(),t=lF(),r=Qe(),i=Dm(),s=pr(),o=Ft(),a=ro(),u=Be(),l=Kn(),d=zi(),c=l("slice"),h=u("species"),f=Array,v=Math.max;return n({target:"Array",proto:!0,forced:!c},{slice:function(b,y){var g=o(this),S=s(g),m=i(b,S),w=i(y===void 0?S:y,S),O,I,_;if(e(g)&&(O=g.constructor,t(O)&&(O===f||e(O.prototype))?O=void 0:r(O)&&(O=O[h],O===null&&(O=void 0)),O===f||O===void 0))return d(g,m,w);for(I=new(O===void 0?f:O)(v(w-m,0)),_=0;m<w;m++,_++)m in g&&a(I,_,g[m]);return I.length=_,I}}),iS}var $l,sS;function ej(){if(sS)return $l;sS=1,QB();var n=st();return $l=n("Array","slice"),$l}var Tl,oS;function tj(){if(oS)return Tl;oS=1;var n=Ne(),e=ej(),t=Array.prototype;return Tl=function(r){var i=r.slice;return r===t||n(t,r)&&i===t.slice?e:i},Tl}var Pl,aS;function rj(){if(aS)return Pl;aS=1;var n=tj();return Pl=n,Pl}var Rl,uS;function ij(){return uS||(uS=1,Rl=rj()),Rl}var nj=ij(),sj=ee(nj),lS={},ql,dS;function RF(){if(dS)return ql;dS=1;var n=at(),e=de(),t=so(),r=oo(),i=Zt(),s=e([].concat);return ql=n("Reflect","ownKeys")||function(a){var u=t.f(i(a)),l=r.f;return l?s(u,l(a)):u},ql}var cS;function oj(){if(cS)return lS;cS=1;var n=Y(),e=RF();return n({target:"Reflect",stat:!0},{ownKeys:e}),lS}var Cl,hS;function aj(){if(hS)return Cl;hS=1,oj();var n=Ae();return Cl=n.Reflect.ownKeys,Cl}var xl,fS;function uj(){if(fS)return xl;fS=1;var n=aj();return xl=n,xl}var Dl,vS;function lj(){return vS||(vS=1,Dl=uj()),Dl}var dj=lj(),cj=ee(dj),pS={},gS;function hj(){if(gS)return pS;gS=1;var n=Y(),e=Xr();return n({target:"Array",stat:!0},{isArray:e}),pS}var Al,yS;function fj(){if(yS)return Al;yS=1,hj();var n=Ae();return Al=n.Array.isArray,Al}var Ml,mS;function vj(){if(mS)return Ml;mS=1;var n=fj();return Ml=n,Ml}var Fl,bS;function pj(){return bS||(bS=1,Fl=vj()),Fl}var gj=pj(),Rt=ee(gj),_S={},wS;function yj(){if(wS)return _S;wS=1;var n=Y(),e=Tt(),t=io(),r=se(),i=r(function(){t(1)});return n({target:"Object",stat:!0,forced:i},{keys:function(o){return t(e(o))}}),_S}var Nl,ES;function mj(){if(ES)return Nl;ES=1,yj();var n=Ae();return Nl=n.Object.keys,Nl}var kl,SS;function bj(){if(SS)return kl;SS=1;var n=mj();return kl=n,kl}var Bl,OS;function _j(){return OS||(OS=1,Bl=bj()),Bl}var wj=_j(),Bm=ee(wj),IS={},jl,$S;function Ej(){if($S)return jl;$S=1;var n=Wi().forEach,e=lo(),t=e("forEach");return jl=t?[].forEach:function(i){return n(this,i,arguments.length>1?arguments[1]:void 0)},jl}var TS;function Sj(){if(TS)return IS;TS=1;var n=Y(),e=Ej();return n({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),IS}var Ll,PS;function Oj(){if(PS)return Ll;PS=1,Sj();var n=st();return Ll=n("Array","forEach"),Ll}var zl,RS;function Ij(){if(RS)return zl;RS=1;var n=Oj();return zl=n,zl}var Wl,qS;function $j(){if(qS)return Wl;qS=1;var n=gr(),e=ke(),t=Ne(),r=Ij(),i=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Wl=function(o){var a=o.forEach;return o===i||t(i,o)&&a===i.forEach||e(s,n(o))?r:a},Wl}var Hl,CS;function Tj(){return CS||(CS=1,Hl=$j()),Hl}var Pj=Tj(),Lr=ee(Pj),xS={},DS;function Rj(){if(DS)return xS;DS=1;var n=Y(),e=de(),t=Xr(),r=e([].reverse),i=[1,2];return n({target:"Array",proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return t(this)&&(this.length=this.length),r(this)}}),xS}var Ul,AS;function qj(){if(AS)return Ul;AS=1,Rj();var n=st();return Ul=n("Array","reverse"),Ul}var Vl,MS;function Cj(){if(MS)return Vl;MS=1;var n=Ne(),e=qj(),t=Array.prototype;return Vl=function(r){var i=r.reverse;return r===t||n(t,r)&&i===t.reverse?e:i},Vl}var Gl,FS;function xj(){if(FS)return Gl;FS=1;var n=Cj();return Gl=n,Gl}var Kl,NS;function Dj(){return NS||(NS=1,Kl=xj()),Kl}var Aj=Dj(),Mj=ee(Aj),kS={},Yl,BS;function Fj(){if(BS)return Yl;BS=1;var n=qe(),e=Xr(),t=TypeError,r=Object.getOwnPropertyDescriptor,i=n&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(s){return s instanceof TypeError}})();return Yl=i?function(s,o){if(e(s)&&!r(s,"length").writable)throw new t("Cannot set read only .length");return s.length=o}:function(s,o){return s.length=o},Yl}var Xl,jS;function qF(){if(jS)return Xl;jS=1;var n=Ni(),e=TypeError;return Xl=function(t,r){if(!delete t[r])throw new e("Cannot delete property "+n(r)+" of "+n(t))},Xl}var LS;function Nj(){if(LS)return kS;LS=1;var n=Y(),e=Tt(),t=Dm(),r=Li(),i=pr(),s=Fj(),o=uF(),a=xm(),u=ro(),l=qF(),d=Kn(),c=d("splice"),h=Math.max,f=Math.min;return n({target:"Array",proto:!0,forced:!c},{splice:function(p,b){var y=e(this),g=i(y),S=t(p,g),m=arguments.length,w,O,I,_,E,$;for(m===0?w=O=0:m===1?(w=0,O=g-S):(w=m-2,O=f(h(r(b),0),g-S)),o(g+w-O),I=a(y,O),_=0;_<O;_++)E=S+_,E in y&&u(I,_,y[E]);if(I.length=O,w<O){for(_=S;_<g-O;_++)E=_+O,$=_+w,E in y?y[$]=y[E]:l(y,$);for(_=g;_>g-O+w;_--)l(y,_-1)}else if(w>O)for(_=g-O;_>S;_--)E=_+O-1,$=_+w-1,E in y?y[$]=y[E]:l(y,$);for(_=0;_<w;_++)y[_+S]=arguments[_+2];return s(y,g-O+w),I}}),kS}var Jl,zS;function kj(){if(zS)return Jl;zS=1,Nj();var n=st();return Jl=n("Array","splice"),Jl}var Zl,WS;function Bj(){if(WS)return Zl;WS=1;var n=Ne(),e=kj(),t=Array.prototype;return Zl=function(r){var i=r.splice;return r===t||n(t,r)&&i===t.splice?e:i},Zl}var Ql,HS;function jj(){if(HS)return Ql;HS=1;var n=Bj();return Ql=n,Ql}var ed,US;function Lj(){return US||(US=1,ed=jj()),ed}var zj=Lj(),CF=ee(zj),VS={},td,GS;function Wj(){if(GS)return td;GS=1;var n=qe(),e=de(),t=nt(),r=se(),i=io(),s=oo(),o=Tm(),a=Tt(),u=Zs(),l=Object.assign,d=Object.defineProperty,c=e([].concat);return td=!l||r(function(){if(n&&l({b:1},l(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var h={},f={},v=Symbol("assign detection"),p="abcdefghijklmnopqrst";return h[v]=7,p.split("").forEach(function(b){f[b]=b}),l({},h)[v]!==7||i(l({},f)).join("")!==p})?function(f,v){for(var p=a(f),b=arguments.length,y=1,g=s.f,S=o.f;b>y;)for(var m=u(arguments[y++]),w=g?c(i(m),g(m)):i(m),O=w.length,I=0,_;O>I;)_=w[I++],(!n||t(S,m,_))&&(p[_]=m[_]);return p}:l,td}var KS;function Hj(){if(KS)return VS;KS=1;var n=Y(),e=Wj();return n({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),VS}var rd,YS;function Uj(){if(YS)return rd;YS=1,Hj();var n=Ae();return rd=n.Object.assign,rd}var id,XS;function Vj(){if(XS)return id;XS=1;var n=Uj();return id=n,id}var nd,JS;function Gj(){return JS||(JS=1,nd=Vj()),nd}var Kj=Gj(),Yj=ee(Kj),sd,ZS;function Xj(){if(ZS)return sd;ZS=1,dF();var n=st();return sd=n("Array","concat"),sd}var od,QS;function Jj(){if(QS)return od;QS=1;var n=Ne(),e=Xj(),t=Array.prototype;return od=function(r){var i=r.concat;return r===t||n(t,r)&&i===t.concat?e:i},od}var ad,e0;function Zj(){if(e0)return ad;e0=1;var n=Jj();return ad=n,ad}var ud,t0;function Qj(){return t0||(t0=1,ud=Zj()),ud}var eL=Qj(),tL=ee(eL),r0={},i0;function rL(){if(i0)return r0;i0=1;var n=Y(),e=qe(),t=Xn();return n({target:"Object",stat:!0,sham:!e},{create:t}),r0}var ld,n0;function iL(){if(n0)return ld;n0=1,rL();var n=Ae(),e=n.Object;return ld=function(r,i){return e.create(r,i)},ld}var dd,s0;function nL(){if(s0)return dd;s0=1;var n=iL();return dd=n,dd}var cd,o0;function sL(){return o0||(o0=1,cd=nL()),cd}var oL=sL(),aL=ee(oL),a0={},hd,u0;function uL(){if(u0)return hd;u0=1;var n=Li(),e=yr(),t=Yr(),r=RangeError;return hd=function(s){var o=e(t(this)),a="",u=n(s);if(u<0||u===1/0)throw new r("Wrong number of repetitions");for(;u>0;(u>>>=1)&&(o+=o))u&1&&(a+=o);return a},hd}var fd,l0;function lL(){if(l0)return fd;l0=1;var n=de(),e=aF(),t=yr(),r=uL(),i=Yr(),s=n(r),o=n("".slice),a=Math.ceil,u=function(l){return function(d,c,h){var f=t(i(d)),v=e(c),p=f.length,b=h===void 0?" ":t(h),y,g;return v<=p||b===""?f:(y=v-p,g=s(b,a(y/b.length)),g.length>y&&(g=o(g,0,y)),l?f+g:g+f)}};return fd={start:u(!1),end:u(!0)},fd}var vd,d0;function dL(){if(d0)return vd;d0=1;var n=de(),e=se(),t=lL().start,r=RangeError,i=isFinite,s=Math.abs,o=Date.prototype,a=o.toISOString,u=n(o.getTime),l=n(o.getUTCDate),d=n(o.getUTCFullYear),c=n(o.getUTCHours),h=n(o.getUTCMilliseconds),f=n(o.getUTCMinutes),v=n(o.getUTCMonth),p=n(o.getUTCSeconds);return vd=e(function(){return a.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"})||!e(function(){a.call(new Date(NaN))})?function(){if(!i(u(this)))throw new r("Invalid time value");var y=this,g=d(y),S=h(y),m=g<0?"-":g>9999?"+":"";return m+t(s(g),m?6:4,0)+"-"+t(v(y)+1,2,0)+"-"+t(l(y),2,0)+"T"+t(c(y),2,0)+":"+t(f(y),2,0)+":"+t(p(y),2,0)+"."+t(S,3,0)+"Z"}:a,vd}var c0;function cL(){if(c0)return a0;c0=1;var n=Y(),e=nt(),t=Tt(),r=rF(),i=dL(),s=Xt(),o=se(),a=o(function(){return new Date(NaN).toJSON()!==null||e(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1});return n({target:"Date",proto:!0,forced:a},{toJSON:function(l){var d=t(this),c=r(d,"number");return typeof c=="number"&&!isFinite(c)?null:!("toISOString"in d)&&s(d)==="Date"?e(i,d):d.toISOString()}}),a0}var pd,h0;function hL(){if(h0)return pd;h0=1,cL(),pF();var n=Ae(),e=Js();return n.JSON||(n.JSON={stringify:JSON.stringify}),pd=function(r,i,s){return e(n.JSON.stringify,null,arguments)},pd}var gd,f0;function fL(){if(f0)return gd;f0=1;var n=hL();return gd=n,gd}var yd,v0;function vL(){return v0||(v0=1,yd=fL()),yd}var pL=vL(),gL=ee(pL),p0={},g0={},md,y0;function yL(){if(y0)return md;y0=1;var n=TypeError;return md=function(e,t){if(e<t)throw new n("Not enough arguments");return e},md}var bd,m0;function xF(){if(m0)return bd;m0=1;var n=Re(),e=Js(),t=Fe(),r=PF(),i=Mi(),s=zi(),o=yL(),a=n.Function,u=/MSIE .\./.test(i)||r==="BUN"&&(function(){var l=n.Bun.version.split(".");return l.length<3||l[0]==="0"&&(l[1]<3||l[1]==="3"&&l[2]==="0")})();return bd=function(l,d){var c=d?2:1;return u?function(h,f){var v=o(arguments.length,1)>c,p=t(h)?h:a(h),b=v?s(arguments,c):[],y=v?function(){e(p,this,b)}:p;return d?l(y,f):l(y)}:l},bd}var b0;function mL(){if(b0)return g0;b0=1;var n=Y(),e=Re(),t=xF(),r=t(e.setInterval,!0);return n({global:!0,bind:!0,forced:e.setInterval!==r},{setInterval:r}),g0}var _0={},w0;function bL(){if(w0)return _0;w0=1;var n=Y(),e=Re(),t=xF(),r=t(e.setTimeout,!0);return n({global:!0,bind:!0,forced:e.setTimeout!==r},{setTimeout:r}),_0}var E0;function _L(){return E0||(E0=1,mL(),bL()),p0}var _d,S0;function wL(){if(S0)return _d;S0=1,_L();var n=Ae();return _d=n.setTimeout,_d}var wd,O0;function EL(){return O0||(O0=1,wd=wL()),wd}var SL=EL(),OL=ee(SL),Ed={exports:{}},I0;function IL(){return I0||(I0=1,(function(n){function e(r){if(r)return t(r);this._callbacks=new Map}function t(r){return Object.assign(r,e.prototype),r._callbacks=new Map,r}e.prototype.on=function(r,i){const s=this._callbacks.get(r)??[];return s.push(i),this._callbacks.set(r,s),this},e.prototype.once=function(r,i){const s=(...o)=>{this.off(r,s),i.apply(this,o)};return s.fn=i,this.on(r,s),this},e.prototype.off=function(r,i){if(r===void 0&&i===void 0)return this._callbacks.clear(),this;if(i===void 0)return this._callbacks.delete(r),this;const s=this._callbacks.get(r);if(s){for(const[o,a]of s.entries())if(a===i||a.fn===i){s.splice(o,1);break}s.length===0?this._callbacks.delete(r):this._callbacks.set(r,s)}return this},e.prototype.emit=function(r,...i){const s=this._callbacks.get(r);if(s){const o=[...s];for(const a of o)a.apply(this,i)}return this},e.prototype.listeners=function(r){return this._callbacks.get(r)??[]},e.prototype.listenerCount=function(r){if(r)return this.listeners(r).length;let i=0;for(const s of this._callbacks.values())i+=s.length;return i},e.prototype.hasListeners=function(r){return this.listenerCount(r)>0},e.prototype.addEventListener=e.prototype.on,e.prototype.removeListener=e.prototype.off,e.prototype.removeEventListener=e.prototype.off,e.prototype.removeAllListeners=e.prototype.off,n.exports=e})(Ed)),Ed.exports}var $L=IL(),TL=ee($L);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
|
|
26
|
+
* http://naver.github.io/egjs
|
|
27
|
+
*
|
|
28
|
+
* Forked By Naver egjs
|
|
29
|
+
* Copyright (c) hammerjs
|
|
30
|
+
* Licensed under the MIT license */function It(){return It=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},It.apply(this,arguments)}function pt(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}function $s(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}var dm;typeof Object.assign!="function"?dm=function(e){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1;r<arguments.length;r++){var i=arguments[r];if(i!=null)for(var s in i)i.hasOwnProperty(s)&&(t[s]=i[s])}return t}:dm=Object.assign;var zr=dm,$0=["","webkit","Moz","MS","ms","o"],PL=typeof document>"u"?{style:{}}:document.createElement("div"),RL="function",mi=Math.round,Wr=Math.abs,jm=Date.now;function co(n,e){for(var t,r,i=e[0].toUpperCase()+e.slice(1),s=0;s<$0.length;){if(t=$0[s],r=t?t+i:e,r in n)return r;s++}}var zt;typeof window>"u"?zt={}:zt=window;var DF=co(PL.style,"touchAction"),AF=DF!==void 0;function qL(){if(!AF)return!1;var n={},e=zt.CSS&&zt.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return n[t]=e?zt.CSS.supports("touch-action",t):!0}),n}var MF="compute",FF="auto",cm="manipulation",Mr="none",xn="pan-x",Dn="pan-y",Ts=qL(),CL=/mobile|tablet|ip(ad|hone|od)|android/i,NF="ontouchstart"in zt,xL=co(zt,"PointerEvent")!==void 0,DL=NF&&CL.test(navigator.userAgent),Qn="touch",AL="pen",Lm="mouse",ML="kinect",FL=25,Je=1,Zr=2,$e=4,rt=8,Ns=1,es=2,ts=4,rs=8,Ti=16,At=es|ts,Fr=rs|Ti,kF=At|Fr,BF=["x","y"],ks=["clientX","clientY"];function Wt(n,e,t){var r;if(n)if(n.forEach)n.forEach(e,t);else if(n.length!==void 0)for(r=0;r<n.length;)e.call(t,n[r],r,n),r++;else for(r in n)n.hasOwnProperty(r)&&e.call(t,n[r],r,n)}function ho(n,e){return typeof n===RL?n.apply(e&&e[0]||void 0,e):n}function Cr(n,e){return n.indexOf(e)>-1}function NL(n){if(Cr(n,Mr))return Mr;var e=Cr(n,xn),t=Cr(n,Dn);return e&&t?Mr:e||t?e?xn:Dn:Cr(n,cm)?cm:FF}var jF=(function(){function n(t,r){this.manager=t,this.set(r)}var e=n.prototype;return e.set=function(r){r===MF&&(r=this.compute()),AF&&this.manager.element.style&&Ts[r]&&(this.manager.element.style[DF]=r),this.actions=r.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var r=[];return Wt(this.manager.recognizers,function(i){ho(i.options.enable,[i])&&(r=r.concat(i.getTouchAction()))}),NL(r.join(" "))},e.preventDefaults=function(r){var i=r.srcEvent,s=r.offsetDirection;if(this.manager.session.prevented){i.preventDefault();return}var o=this.actions,a=Cr(o,Mr)&&!Ts[Mr],u=Cr(o,Dn)&&!Ts[Dn],l=Cr(o,xn)&&!Ts[xn];if(a){var d=r.pointers.length===1,c=r.distance<2,h=r.deltaTime<250;if(d&&c&&h)return}if(!(l&&u)&&(a||u&&s&At||l&&s&Fr))return this.preventSrc(i)},e.preventSrc=function(r){this.manager.session.prevented=!0,r.preventDefault()},n})();function zm(n,e){for(;n;){if(n===e)return!0;n=n.parentNode}return!1}function LF(n){var e=n.length;if(e===1)return{x:mi(n[0].clientX),y:mi(n[0].clientY)};for(var t=0,r=0,i=0;i<e;)t+=n[i].clientX,r+=n[i].clientY,i++;return{x:mi(t/e),y:mi(r/e)}}function T0(n){for(var e=[],t=0;t<n.pointers.length;)e[t]={clientX:mi(n.pointers[t].clientX),clientY:mi(n.pointers[t].clientY)},t++;return{timeStamp:jm(),pointers:e,center:LF(e),deltaX:n.deltaX,deltaY:n.deltaY}}function Bs(n,e,t){t||(t=BF);var r=e[t[0]]-n[t[0]],i=e[t[1]]-n[t[1]];return Math.sqrt(r*r+i*i)}function hm(n,e,t){t||(t=BF);var r=e[t[0]]-n[t[0]],i=e[t[1]]-n[t[1]];return Math.atan2(i,r)*180/Math.PI}function zF(n,e){return n===e?Ns:Wr(n)>=Wr(e)?n<0?es:ts:e<0?rs:Ti}function kL(n,e){var t=e.center,r=n.offsetDelta||{},i=n.prevDelta||{},s=n.prevInput||{};(e.eventType===Je||s.eventType===$e)&&(i=n.prevDelta={x:s.deltaX||0,y:s.deltaY||0},r=n.offsetDelta={x:t.x,y:t.y}),e.deltaX=i.x+(t.x-r.x),e.deltaY=i.y+(t.y-r.y)}function WF(n,e,t){return{x:e/n||0,y:t/n||0}}function BL(n,e){return Bs(e[0],e[1],ks)/Bs(n[0],n[1],ks)}function jL(n,e){return hm(e[1],e[0],ks)+hm(n[1],n[0],ks)}function LL(n,e){var t=n.lastInterval||e,r=e.timeStamp-t.timeStamp,i,s,o,a;if(e.eventType!==rt&&(r>FL||t.velocity===void 0)){var u=e.deltaX-t.deltaX,l=e.deltaY-t.deltaY,d=WF(r,u,l);s=d.x,o=d.y,i=Wr(d.x)>Wr(d.y)?d.x:d.y,a=zF(u,l),n.lastInterval=e}else i=t.velocity,s=t.velocityX,o=t.velocityY,a=t.direction;e.velocity=i,e.velocityX=s,e.velocityY=o,e.direction=a}function zL(n,e){var t=n.session,r=e.pointers,i=r.length;t.firstInput||(t.firstInput=T0(e)),i>1&&!t.firstMultiple?t.firstMultiple=T0(e):i===1&&(t.firstMultiple=!1);var s=t.firstInput,o=t.firstMultiple,a=o?o.center:s.center,u=e.center=LF(r);e.timeStamp=jm(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=hm(a,u),e.distance=Bs(a,u),kL(t,e),e.offsetDirection=zF(e.deltaX,e.deltaY);var l=WF(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=Wr(l.x)>Wr(l.y)?l.x:l.y,e.scale=o?BL(o.pointers,r):1,e.rotation=o?jL(o.pointers,r):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,LL(t,e);var d=n.element,c=e.srcEvent,h;c.composedPath?h=c.composedPath()[0]:c.path?h=c.path[0]:h=c.target,zm(h,d)&&(d=h),e.target=d}function WL(n,e,t){var r=t.pointers.length,i=t.changedPointers.length,s=e&Je&&r-i===0,o=e&($e|rt)&&r-i===0;t.isFirst=!!s,t.isFinal=!!o,s&&(n.session={}),t.eventType=e,zL(n,t),n.emit("hammer.input",t),n.recognize(t),n.session.prevInput=t}function An(n){return n.trim().split(/\s+/g)}function On(n,e,t){Wt(An(e),function(r){n.addEventListener(r,t,!1)})}function In(n,e,t){Wt(An(e),function(r){n.removeEventListener(r,t,!1)})}function P0(n){var e=n.ownerDocument||n;return e.defaultView||e.parentWindow||window}var Ui=(function(){function n(t,r){var i=this;this.manager=t,this.callback=r,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(s){ho(t.options.enable,[t])&&i.handler(s)},this.init()}var e=n.prototype;return e.handler=function(){},e.init=function(){this.evEl&&On(this.element,this.evEl,this.domHandler),this.evTarget&&On(this.target,this.evTarget,this.domHandler),this.evWin&&On(P0(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&In(this.element,this.evEl,this.domHandler),this.evTarget&&In(this.target,this.evTarget,this.domHandler),this.evWin&&In(P0(this.element),this.evWin,this.domHandler)},n})();function Hr(n,e,t){if(n.indexOf&&!t)return n.indexOf(e);for(var r=0;r<n.length;){if(t&&n[r][t]==e||!t&&n[r]===e)return r;r++}return-1}var HL={pointerdown:Je,pointermove:Zr,pointerup:$e,pointercancel:rt,pointerout:rt},UL={2:Qn,3:AL,4:Lm,5:ML},HF="pointerdown",UF="pointermove pointerup pointercancel";zt.MSPointerEvent&&!zt.PointerEvent&&(HF="MSPointerDown",UF="MSPointerMove MSPointerUp MSPointerCancel");var VF=(function(n){pt(e,n);function e(){var r,i=e.prototype;return i.evEl=HF,i.evWin=UF,r=n.apply(this,arguments)||this,r.store=r.manager.session.pointerEvents=[],r}var t=e.prototype;return t.handler=function(i){var s=this.store,o=!1,a=i.type.toLowerCase().replace("ms",""),u=HL[a],l=UL[i.pointerType]||i.pointerType,d=l===Qn,c=Hr(s,i.pointerId,"pointerId");u&Je&&(i.button===0||d)?c<0&&(s.push(i),c=s.length-1):u&($e|rt)&&(o=!0),!(c<0)&&(s[c]=i,this.callback(this.manager,u,{pointers:s,changedPointers:[i],pointerType:l,srcEvent:i}),o&&s.splice(c,1))},e})(Ui);function Mn(n){return Array.prototype.slice.call(n,0)}function Wm(n,e,t){for(var r=[],i=[],s=0;s<n.length;){var o=e?n[s][e]:n[s];Hr(i,o)<0&&r.push(n[s]),i[s]=o,s++}return t&&(e?r=r.sort(function(a,u){return a[e]>u[e]}):r=r.sort()),r}var VL={touchstart:Je,touchmove:Zr,touchend:$e,touchcancel:rt},GL="touchstart touchmove touchend touchcancel",Hm=(function(n){pt(e,n);function e(){var r;return e.prototype.evTarget=GL,r=n.apply(this,arguments)||this,r.targetIds={},r}var t=e.prototype;return t.handler=function(i){var s=VL[i.type],o=KL.call(this,i,s);o&&this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:Qn,srcEvent:i})},e})(Ui);function KL(n,e){var t=Mn(n.touches),r=this.targetIds;if(e&(Je|Zr)&&t.length===1)return r[t[0].identifier]=!0,[t,t];var i,s,o=Mn(n.changedTouches),a=[],u=this.target;if(s=t.filter(function(l){return zm(l.target,u)}),e===Je)for(i=0;i<s.length;)r[s[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&a.push(o[i]),e&($e|rt)&&delete r[o[i].identifier],i++;if(a.length)return[Wm(s.concat(a),"identifier",!0),a]}var YL={mousedown:Je,mousemove:Zr,mouseup:$e},XL="mousedown",JL="mousemove mouseup",Um=(function(n){pt(e,n);function e(){var r,i=e.prototype;return i.evEl=XL,i.evWin=JL,r=n.apply(this,arguments)||this,r.pressed=!1,r}var t=e.prototype;return t.handler=function(i){var s=YL[i.type];s&Je&&i.button===0&&(this.pressed=!0),s&Zr&&i.which!==1&&(s=$e),this.pressed&&(s&$e&&(this.pressed=!1),this.callback(this.manager,s,{pointers:[i],changedPointers:[i],pointerType:Lm,srcEvent:i}))},e})(Ui),ZL=2500,R0=25;function q0(n){var e=n.changedPointers,t=e[0];if(t.identifier===this.primaryTouch){var r={x:t.clientX,y:t.clientY},i=this.lastTouches;this.lastTouches.push(r);var s=function(){var a=i.indexOf(r);a>-1&&i.splice(a,1)};setTimeout(s,ZL)}}function QL(n,e){n&Je?(this.primaryTouch=e.changedPointers[0].identifier,q0.call(this,e)):n&($e|rt)&&q0.call(this,e)}function ez(n){for(var e=n.srcEvent.clientX,t=n.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],s=Math.abs(e-i.x),o=Math.abs(t-i.y);if(s<=R0&&o<=R0)return!0}return!1}var GF=(function(){var n=(function(e){pt(t,e);function t(i,s){var o;return o=e.call(this,i,s)||this,o.handler=function(a,u,l){var d=l.pointerType===Qn,c=l.pointerType===Lm;if(!(c&&l.sourceCapabilities&&l.sourceCapabilities.firesTouchEvents)){if(d)QL.call($s($s(o)),u,l);else if(c&&ez.call($s($s(o)),l))return;o.callback(a,u,l)}},o.touch=new Hm(o.manager,o.handler),o.mouse=new Um(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}var r=t.prototype;return r.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t})(Ui);return n})();function tz(n){var e,t=n.options.inputClass;return t?e=t:xL?e=VF:DL?e=Hm:NF?e=GF:e=Um,new e(n,WL)}function bi(n,e,t){return Array.isArray(n)?(Wt(n,t[e],t),!0):!1}var Ds=1,ht=2,Pi=4,ar=8,Ht=ar,Fn=16,Ct=32,rz=1;function iz(){return rz++}function Ps(n,e){var t=e.manager;return t?t.get(n):n}function C0(n){return n&Fn?"cancel":n&ar?"end":n&Pi?"move":n&ht?"start":""}var is=(function(){function n(t){t===void 0&&(t={}),this.options=It({enable:!0},t),this.id=iz(),this.manager=null,this.state=Ds,this.simultaneous={},this.requireFail=[]}var e=n.prototype;return e.set=function(r){return zr(this.options,r),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(r){if(bi(r,"recognizeWith",this))return this;var i=this.simultaneous;return r=Ps(r,this),i[r.id]||(i[r.id]=r,r.recognizeWith(this)),this},e.dropRecognizeWith=function(r){return bi(r,"dropRecognizeWith",this)?this:(r=Ps(r,this),delete this.simultaneous[r.id],this)},e.requireFailure=function(r){if(bi(r,"requireFailure",this))return this;var i=this.requireFail;return r=Ps(r,this),Hr(i,r)===-1&&(i.push(r),r.requireFailure(this)),this},e.dropRequireFailure=function(r){if(bi(r,"dropRequireFailure",this))return this;r=Ps(r,this);var i=Hr(this.requireFail,r);return i>-1&&this.requireFail.splice(i,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(r){return!!this.simultaneous[r.id]},e.emit=function(r){var i=this,s=this.state;function o(a){i.manager.emit(a,r)}s<ar&&o(i.options.event+C0(s)),o(i.options.event),r.additionalEvent&&o(r.additionalEvent),s>=ar&&o(i.options.event+C0(s))},e.tryEmit=function(r){if(this.canEmit())return this.emit(r);this.state=Ct},e.canEmit=function(){for(var r=0;r<this.requireFail.length;){if(!(this.requireFail[r].state&(Ct|Ds)))return!1;r++}return!0},e.recognize=function(r){var i=zr({},r);if(!ho(this.options.enable,[this,i])){this.reset(),this.state=Ct;return}this.state&(Ht|Fn|Ct)&&(this.state=Ds),this.state=this.process(i),this.state&(ht|Pi|ar|Fn)&&this.tryEmit(i)},e.process=function(r){},e.getTouchAction=function(){},e.reset=function(){},n})(),fm=(function(n){pt(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,It({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},r))||this,i.pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}var t=e.prototype;return t.getTouchAction=function(){return[cm]},t.process=function(i){var s=this,o=this.options,a=i.pointers.length===o.pointers,u=i.distance<o.threshold,l=i.deltaTime<o.time;if(this.reset(),i.eventType&Je&&this.count===0)return this.failTimeout();if(u&&l&&a){if(i.eventType!==$e)return this.failTimeout();var d=this.pTime?i.timeStamp-this.pTime<o.interval:!0,c=!this.pCenter||Bs(this.pCenter,i.center)<o.posThreshold;this.pTime=i.timeStamp,this.pCenter=i.center,!c||!d?this.count=1:this.count+=1,this._input=i;var h=this.count%o.taps;if(h===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){s.state=Ht,s.tryEmit()},o.interval),ht):Ht}return Ct},t.failTimeout=function(){var i=this;return this._timer=setTimeout(function(){i.state=Ct},this.options.interval),Ct},t.reset=function(){clearTimeout(this._timer)},t.emit=function(){this.state===Ht&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e})(is),Ri=(function(n){pt(e,n);function e(r){return r===void 0&&(r={}),n.call(this,It({pointers:1},r))||this}var t=e.prototype;return t.attrTest=function(i){var s=this.options.pointers;return s===0||i.pointers.length===s},t.process=function(i){var s=this.state,o=i.eventType,a=s&(ht|Pi),u=this.attrTest(i);return a&&(o&rt||!u)?s|Fn:a||u?o&$e?s|ar:s&ht?s|Pi:ht:Ct},e})(is);function KF(n){return n===Ti?"down":n===rs?"up":n===es?"left":n===ts?"right":""}var Vm=(function(n){pt(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,It({event:"pan",threshold:10,pointers:1,direction:kF},r))||this,i.pX=null,i.pY=null,i}var t=e.prototype;return t.getTouchAction=function(){var i=this.options.direction,s=[];return i&At&&s.push(Dn),i&Fr&&s.push(xn),s},t.directionTest=function(i){var s=this.options,o=!0,a=i.distance,u=i.direction,l=i.deltaX,d=i.deltaY;return u&s.direction||(s.direction&At?(u=l===0?Ns:l<0?es:ts,o=l!==this.pX,a=Math.abs(i.deltaX)):(u=d===0?Ns:d<0?rs:Ti,o=d!==this.pY,a=Math.abs(i.deltaY))),i.direction=u,o&&a>s.threshold&&u&s.direction},t.attrTest=function(i){return Ri.prototype.attrTest.call(this,i)&&(this.state&ht||!(this.state&ht)&&this.directionTest(i))},t.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var s=KF(i.direction);s&&(i.additionalEvent=this.options.event+s),n.prototype.emit.call(this,i)},e})(Ri),YF=(function(n){pt(e,n);function e(r){return r===void 0&&(r={}),n.call(this,It({event:"swipe",threshold:10,velocity:.3,direction:At|Fr,pointers:1},r))||this}var t=e.prototype;return t.getTouchAction=function(){return Vm.prototype.getTouchAction.call(this)},t.attrTest=function(i){var s=this.options.direction,o;return s&(At|Fr)?o=i.overallVelocity:s&At?o=i.overallVelocityX:s&Fr&&(o=i.overallVelocityY),n.prototype.attrTest.call(this,i)&&s&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&Wr(o)>this.options.velocity&&i.eventType&$e},t.emit=function(i){var s=KF(i.offsetDirection);s&&this.manager.emit(this.options.event+s,i),this.manager.emit(this.options.event,i)},e})(Ri),XF=(function(n){pt(e,n);function e(r){return r===void 0&&(r={}),n.call(this,It({event:"pinch",threshold:0,pointers:2},r))||this}var t=e.prototype;return t.getTouchAction=function(){return[Mr]},t.attrTest=function(i){return n.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state&ht)},t.emit=function(i){if(i.scale!==1){var s=i.scale<1?"in":"out";i.additionalEvent=this.options.event+s}n.prototype.emit.call(this,i)},e})(Ri),JF=(function(n){pt(e,n);function e(r){return r===void 0&&(r={}),n.call(this,It({event:"rotate",threshold:0,pointers:2},r))||this}var t=e.prototype;return t.getTouchAction=function(){return[Mr]},t.attrTest=function(i){return n.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state&ht)},e})(Ri),ZF=(function(n){pt(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,It({event:"press",pointers:1,time:251,threshold:9},r))||this,i._timer=null,i._input=null,i}var t=e.prototype;return t.getTouchAction=function(){return[FF]},t.process=function(i){var s=this,o=this.options,a=i.pointers.length===o.pointers,u=i.distance<o.threshold,l=i.deltaTime>o.time;if(this._input=i,!u||!a||i.eventType&($e|rt)&&!l)this.reset();else if(i.eventType&Je)this.reset(),this._timer=setTimeout(function(){s.state=Ht,s.tryEmit()},o.time);else if(i.eventType&$e)return Ht;return Ct},t.reset=function(){clearTimeout(this._timer)},t.emit=function(i){this.state===Ht&&(i&&i.eventType&$e?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=jm(),this.manager.emit(this.options.event,this._input)))},e})(is),QF={domEvents:!1,touchAction:MF,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},x0=[[JF,{enable:!1}],[XF,{enable:!1},["rotate"]],[YF,{direction:At}],[Vm,{direction:At},["swipe"]],[fm],[fm,{event:"doubletap",taps:2},["tap"]],[ZF]],nz=1,D0=2;function A0(n,e){var t=n.element;if(t.style){var r;Wt(n.options.cssProps,function(i,s){r=co(t.style,s),e?(n.oldCssProps[r]=t.style[r],t.style[r]=i):t.style[r]=n.oldCssProps[r]||""}),e||(n.oldCssProps={})}}function sz(n,e){var t=document.createEvent("Event");t.initEvent(n,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var M0=(function(){function n(t,r){var i=this;this.options=zr({},QF,r||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=tz(this),this.touchAction=new jF(this,this.options.touchAction),A0(this,!0),Wt(this.options.recognizers,function(s){var o=i.add(new s[0](s[1]));s[2]&&o.recognizeWith(s[2]),s[3]&&o.requireFailure(s[3])},this)}var e=n.prototype;return e.set=function(r){return zr(this.options,r),r.touchAction&&this.touchAction.update(),r.inputTarget&&(this.input.destroy(),this.input.target=r.inputTarget,this.input.init()),this},e.stop=function(r){this.session.stopped=r?D0:nz},e.recognize=function(r){var i=this.session;if(!i.stopped){this.touchAction.preventDefaults(r);var s,o=this.recognizers,a=i.curRecognizer;(!a||a&&a.state&Ht)&&(i.curRecognizer=null,a=null);for(var u=0;u<o.length;)s=o[u],i.stopped!==D0&&(!a||s===a||s.canRecognizeWith(a))?s.recognize(r):s.reset(),!a&&s.state&(ht|Pi|ar)&&(i.curRecognizer=s,a=s),u++}},e.get=function(r){if(r instanceof is)return r;for(var i=this.recognizers,s=0;s<i.length;s++)if(i[s].options.event===r)return i[s];return null},e.add=function(r){if(bi(r,"add",this))return this;var i=this.get(r.options.event);return i&&this.remove(i),this.recognizers.push(r),r.manager=this,this.touchAction.update(),r},e.remove=function(r){if(bi(r,"remove",this))return this;var i=this.get(r);if(r){var s=this.recognizers,o=Hr(s,i);o!==-1&&(s.splice(o,1),this.touchAction.update())}return this},e.on=function(r,i){if(r===void 0||i===void 0)return this;var s=this.handlers;return Wt(An(r),function(o){s[o]=s[o]||[],s[o].push(i)}),this},e.off=function(r,i){if(r===void 0)return this;var s=this.handlers;return Wt(An(r),function(o){i?s[o]&&s[o].splice(Hr(s[o],i),1):delete s[o]}),this},e.emit=function(r,i){this.options.domEvents&&sz(r,i);var s=this.handlers[r]&&this.handlers[r].slice();if(!(!s||!s.length)){i.type=r,i.preventDefault=function(){i.srcEvent.preventDefault()};for(var o=0;o<s.length;)s[o](i),o++}},e.destroy=function(){this.element&&A0(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},n})(),oz={touchstart:Je,touchmove:Zr,touchend:$e,touchcancel:rt},az="touchstart",uz="touchstart touchmove touchend touchcancel",lz=(function(n){pt(e,n);function e(){var r,i=e.prototype;return i.evTarget=az,i.evWin=uz,r=n.apply(this,arguments)||this,r.started=!1,r}var t=e.prototype;return t.handler=function(i){var s=oz[i.type];if(s===Je&&(this.started=!0),!!this.started){var o=dz.call(this,i,s);s&($e|rt)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:Qn,srcEvent:i})}},e})(Ui);function dz(n,e){var t=Mn(n.touches),r=Mn(n.changedTouches);return e&($e|rt)&&(t=Wm(t.concat(r),"identifier",!0)),[t,r]}function eN(n,e,t){var r="DEPRECATED METHOD: "+e+`
|
|
31
|
+
`+t+` AT
|
|
32
|
+
`;return function(){var i=new Error("get-stack-trace"),s=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,r,s),n.apply(this,arguments)}}var tN=eN(function(n,e,t){for(var r=Object.keys(e),i=0;i<r.length;)(!t||t&&n[r[i]]===void 0)&&(n[r[i]]=e[r[i]]),i++;return n},"extend","Use `assign`."),cz=eN(function(n,e){return tN(n,e,!0)},"merge","Use `assign`.");function hz(n,e,t){var r=e.prototype,i;i=n.prototype=Object.create(r),i.constructor=n,i._super=r,t&&zr(i,t)}function F0(n,e){return function(){return n.apply(e,arguments)}}var fz=(function(){var n=function(t,r){return r===void 0&&(r={}),new M0(t,It({recognizers:x0.concat()},r))};return n.VERSION="2.0.17-rc",n.DIRECTION_ALL=kF,n.DIRECTION_DOWN=Ti,n.DIRECTION_LEFT=es,n.DIRECTION_RIGHT=ts,n.DIRECTION_UP=rs,n.DIRECTION_HORIZONTAL=At,n.DIRECTION_VERTICAL=Fr,n.DIRECTION_NONE=Ns,n.DIRECTION_DOWN=Ti,n.INPUT_START=Je,n.INPUT_MOVE=Zr,n.INPUT_END=$e,n.INPUT_CANCEL=rt,n.STATE_POSSIBLE=Ds,n.STATE_BEGAN=ht,n.STATE_CHANGED=Pi,n.STATE_ENDED=ar,n.STATE_RECOGNIZED=Ht,n.STATE_CANCELLED=Fn,n.STATE_FAILED=Ct,n.Manager=M0,n.Input=Ui,n.TouchAction=jF,n.TouchInput=Hm,n.MouseInput=Um,n.PointerEventInput=VF,n.TouchMouseInput=GF,n.SingleTouchInput=lz,n.Recognizer=is,n.AttrRecognizer=Ri,n.Tap=fm,n.Pan=Vm,n.Swipe=YF,n.Pinch=XF,n.Rotate=JF,n.Press=ZF,n.on=On,n.off=In,n.each=Wt,n.merge=cz,n.extend=tN,n.bindFn=F0,n.assign=zr,n.inherit=hz,n.bindFn=F0,n.prefixed=co,n.toArray=Mn,n.inArray=Hr,n.uniqueArray=Wm,n.splitStr=An,n.boolOrFn=ho,n.hasParent=zm,n.addEventListeners=On,n.removeEventListeners=In,n.defaults=zr({},QF,{preset:x0}),n})();const rN=ZB("DELETE");function vz(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return iN({},n,...t)}function iN(){const n=js(...arguments);return sN(n),n}function js(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];if(e.length<2)return e[0];if(e.length>2)return js(iN(e[0],e[1]),...sj(e).call(e,2));const r=e[0],i=e[1];if(r instanceof Date&&i instanceof Date)return r.setTime(i.getTime()),r;for(const s of cj(i))Object.prototype.propertyIsEnumerable.call(i,s)&&(i[s]===rN?delete r[s]:r[s]!==null&&i[s]!==null&&typeof r[s]=="object"&&typeof i[s]=="object"&&!Rt(r[s])&&!Rt(i[s])?r[s]=js(r[s],i[s]):r[s]=nN(i[s]));return r}function nN(n){return Rt(n)?St(n).call(n,e=>nN(e)):typeof n=="object"&&n!==null?n instanceof Date?new Date(n.getTime()):js({},n):n}function sN(n){for(const e of Bm(n))n[e]===rN?delete n[e]:typeof n[e]=="object"&&n[e]!==null&&sN(n[e])}function pz(){const n=()=>{};return{on:n,off:n,destroy:n,emit:n,get(){return{set:n}}}}const gz=typeof window<"u"?window.Hammer||fz:function(){return pz()};function jt(n){var e;this._cleanupQueue=[],this.active=!1,this._dom={container:n,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)});const t=gz(this._dom.overlay);t.on("tap",TF(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{t.destroy()});const r=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Lr(r).call(r,i=>{t.on(i,s=>{s.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=i=>{yz(i.target,n)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=i=>{("key"in i?i.key==="Escape":i.keyCode===27)&&this.deactivate()}}TL(jt.prototype);jt.current=null;jt.prototype.destroy=function(){this.deactivate();for(const t of Mj(n=CF(e=this._cleanupQueue).call(e,0)).call(n)){var n,e;t()}};jt.prototype.activate=function(){jt.current&&jt.current.deactivate(),jt.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)};jt.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")};jt.prototype._onTapOverlay=function(n){this.activate(),n.srcEvent.stopPropagation()};function yz(n,e){for(;n;){if(n===e)return!0;n=n.parentNode}return!1}var Sd,N0;function mz(){if(N0)return Sd;N0=1,gF();var n=Ae();return Sd=n.Object.getOwnPropertySymbols,Sd}var Od,k0;function bz(){if(k0)return Od;k0=1;var n=mz();return Od=n,Od}var Id,B0;function _z(){return B0||(B0=1,Id=bz()),Id}var wz=_z(),j0=ee(wz),$d={exports:{}},L0={},z0;function Ez(){if(z0)return L0;z0=1;var n=Y(),e=se(),t=Ft(),r=eo().f,i=qe(),s=!i||e(function(){r(1)});return n({target:"Object",stat:!0,forced:s,sham:!i},{getOwnPropertyDescriptor:function(a,u){return r(t(a),u)}}),L0}var W0;function Sz(){if(W0)return $d.exports;W0=1,Ez();var n=Ae(),e=n.Object,t=$d.exports=function(i,s){return e.getOwnPropertyDescriptor(i,s)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),$d.exports}var Td,H0;function Oz(){if(H0)return Td;H0=1;var n=Sz();return Td=n,Td}var Pd,U0;function Iz(){return U0||(U0=1,Pd=Oz()),Pd}var $z=Iz(),oN=ee($z),V0={},G0;function Tz(){if(G0)return V0;G0=1;var n=Y(),e=qe(),t=RF(),r=Ft(),i=eo(),s=ro();return n({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(a){for(var u=r(a),l=i.f,d=t(u),c={},h=0,f,v;d.length>h;)v=l(u,f=d[h++]),v!==void 0&&s(c,f,v);return c}}),V0}var Rd,K0;function Pz(){if(K0)return Rd;K0=1,Tz();var n=Ae();return Rd=n.Object.getOwnPropertyDescriptors,Rd}var qd,Y0;function Rz(){if(Y0)return qd;Y0=1;var n=Pz();return qd=n,qd}var Cd,X0;function qz(){return X0||(X0=1,Cd=Rz()),Cd}var Cz=qz(),J0=ee(Cz),xd={exports:{}},Z0={},Q0;function xz(){if(Q0)return Z0;Q0=1;var n=Y(),e=qe(),t=Mm().f;return n({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),Z0}var eO;function Dz(){if(eO)return xd.exports;eO=1,xz();var n=Ae(),e=n.Object,t=xd.exports=function(i,s){return e.defineProperties(i,s)};return e.defineProperties.sham&&(t.sham=!0),xd.exports}var Dd,tO;function Az(){if(tO)return Dd;tO=1;var n=Dz();return Dd=n,Dd}var Ad,rO;function Mz(){return rO||(rO=1,Ad=Az()),Ad}var Fz=Mz(),Nz=ee(Fz),Md,iO;function kz(){return iO||(iO=1,Md=oF()),Md}var Bz=kz(),jz=ee(Bz),nO={},sO={},Fd={exports:{}},Nd,oO;function Lz(){if(oO)return Nd;oO=1;var n=se();return Nd=n(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),Nd}var kd,aO;function zz(){if(aO)return kd;aO=1;var n=se(),e=Qe(),t=Xt(),r=Lz(),i=Object.isExtensible,s=n(function(){});return kd=s||r?function(a){return!e(a)||r&&t(a)==="ArrayBuffer"?!1:i?i(a):!0}:i,kd}var Bd,uO;function Wz(){if(uO)return Bd;uO=1;var n=se();return Bd=!n(function(){return Object.isExtensible(Object.preventExtensions({}))}),Bd}var lO;function aN(){if(lO)return Fd.exports;lO=1;var n=Y(),e=de(),t=Yn(),r=Qe(),i=ke(),s=vt().f,o=so(),a=hF(),u=zz(),l=Qs(),d=Wz(),c=!1,h=l("meta"),f=0,v=function(m){s(m,h,{value:{objectID:"O"+f++,weakData:{}}})},p=function(m,w){if(!r(m))return typeof m=="symbol"?m:(typeof m=="string"?"S":"P")+m;if(!i(m,h)){if(!u(m))return"F";if(!w)return"E";v(m)}return m[h].objectID},b=function(m,w){if(!i(m,h)){if(!u(m))return!0;if(!w)return!1;v(m)}return m[h].weakData},y=function(m){return d&&c&&u(m)&&!i(m,h)&&v(m),m},g=function(){S.enable=function(){},c=!0;var m=o.f,w=e([].splice),O={};O[h]=1,m(O).length&&(o.f=function(I){for(var _=m(I),E=0,$=_.length;E<$;E++)if(_[E]===h){w(_,E,1);break}return _},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:a.f}))},S=Fd.exports={enable:g,fastKey:p,getWeakData:b,onFreeze:y};return t[h]=!0,Fd.exports}var jd,dO;function Hz(){if(dO)return jd;dO=1;var n=Be(),e=Hi(),t=n("iterator"),r=Array.prototype;return jd=function(i){return i!==void 0&&(e.Array===i||r[t]===i)},jd}var Ld,cO;function uN(){if(cO)return Ld;cO=1;var n=gr(),e=Pm(),t=Un(),r=Hi(),i=Be(),s=i("iterator");return Ld=function(o){if(!t(o))return e(o,s)||e(o,"@@iterator")||r[n(o)]},Ld}var zd,hO;function lN(){if(hO)return zd;hO=1;var n=nt(),e=Jt(),t=Zt(),r=Ni(),i=uN(),s=TypeError;return zd=function(o,a){var u=arguments.length<2?i(o):a;if(e(u))return t(n(u,o));throw new s(r(o)+" is not iterable")},zd}var Wd,fO;function Gm(){if(fO)return Wd;fO=1;var n=nt(),e=Zt(),t=Pm();return Wd=function(r,i,s){var o,a;e(r);try{if(o=t(r,"return"),!o){if(i==="throw")throw s;return s}o=n(o,r)}catch(u){a=!0,o=u}if(i==="throw")throw s;if(a)throw o;return e(o),s},Wd}var Hd,vO;function Km(){if(vO)return Hd;vO=1;var n=to(),e=nt(),t=Zt(),r=Ni(),i=Hz(),s=pr(),o=Ne(),a=lN(),u=uN(),l=Gm(),d=TypeError,c=function(f,v){this.stopped=f,this.result=v},h=c.prototype;return Hd=function(f,v,p){var b=p&&p.that,y=!!(p&&p.AS_ENTRIES),g=!!(p&&p.IS_RECORD),S=!!(p&&p.IS_ITERATOR),m=!!(p&&p.INTERRUPTED),w=n(v,b),O,I,_,E,$,T,P,R=function(M){return O&&l(O,"normal"),new c(!0,M)},C=function(M){return y?(t(M),m?w(M[0],M[1],R):w(M[0],M[1])):m?w(M,R):w(M)};if(g)O=f.iterator;else if(S)O=f;else{if(I=u(f),!I)throw new d(r(f)+" is not iterable");if(i(I)){for(_=0,E=s(f);E>_;_++)if($=C(f[_]),$&&o(h,$))return $;return new c(!1)}O=a(f,I)}for(T=g?f.next:O.next;!(P=e(T,O)).done;){try{$=C(P.value)}catch(M){l(O,"throw",M)}if(typeof $=="object"&&$&&o(h,$))return $}return new c(!1)},Hd}var Ud,pO;function dN(){if(pO)return Ud;pO=1;var n=Ne(),e=TypeError;return Ud=function(t,r){if(n(r,t))return t;throw new e("Incorrect invocation")},Ud}var Vd,gO;function cN(){if(gO)return Vd;gO=1;var n=Y(),e=Re(),t=aN(),r=se(),i=ji(),s=Km(),o=dN(),a=Fe(),u=Qe(),l=Un(),d=Jr(),c=vt().f,h=Wi().forEach,f=qe(),v=Zn(),p=v.set,b=v.getterFor;return Vd=function(y,g,S){var m=y.indexOf("Map")!==-1,w=y.indexOf("Weak")!==-1,O=m?"set":"add",I=e[y],_=I&&I.prototype,E={},$;if(!f||!a(I)||!(w||_.forEach&&!r(function(){new I().entries().next()})))$=S.getConstructor(g,y,m,O),t.enable();else{$=g(function(R,C){p(o(R,T),{type:y,collection:new I}),l(C)||s(C,R[O],{that:R,AS_ENTRIES:m})});var T=$.prototype,P=b(y);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(R){var C=R==="add"||R==="set";R in _&&!(w&&R==="clear")&&i(T,R,function(M,K){var L=P(this).collection;if(!C&&w&&!u(M))return R==="get"?void 0:!1;var J=L[R](M===0?0:M,K);return C?this:J})}),w||c(T,"size",{configurable:!0,get:function(){return P(this).collection.size}})}return d($,y,!1,!0),E[y]=$,n({global:!0,forced:!0},E),w||S.setStrong($,y,m),$},Vd}var Gd,yO;function Uz(){if(yO)return Gd;yO=1;var n=Jn();return Gd=function(e,t,r){for(var i in t)r&&r.unsafe&&e[i]?e[i]=t[i]:n(e,i,t[i],r);return e},Gd}var Kd,mO;function Vz(){if(mO)return Kd;mO=1;var n=at(),e=Fm(),t=Be(),r=qe(),i=t("species");return Kd=function(s){var o=n(s);r&&o&&!o[i]&&e(o,i,{configurable:!0,get:function(){return this}})},Kd}var Yd,bO;function hN(){if(bO)return Yd;bO=1;var n=Xn(),e=Fm(),t=Uz(),r=to(),i=dN(),s=Un(),o=Km(),a=Nm(),u=km(),l=Vz(),d=qe(),c=aN().fastKey,h=Zn(),f=h.set,v=h.getterFor;return Yd={getConstructor:function(p,b,y,g){var S=p(function(_,E){i(_,m),f(_,{type:b,index:n(null),first:null,last:null,size:0}),d||(_.size=0),s(E)||o(E,_[g],{that:_,AS_ENTRIES:y})}),m=S.prototype,w=v(b),O=function(_,E,$){var T=w(_),P=I(_,E),R,C;return P?P.value=$:(T.last=P={index:C=c(E,!0),key:E,value:$,previous:R=T.last,next:null,removed:!1},T.first||(T.first=P),R&&(R.next=P),d?T.size++:_.size++,C!=="F"&&(T.index[C]=P)),_},I=function(_,E){var $=w(_),T=c(E),P;if(T!=="F")return $.index[T];for(P=$.first;P;P=P.next)if(P.key===E)return P};return t(m,{clear:function(){for(var E=this,$=w(E),T=$.first;T;)T.removed=!0,T.previous&&(T.previous=T.previous.next=null),T=T.next;$.first=$.last=null,$.index=n(null),d?$.size=0:E.size=0},delete:function(_){var E=this,$=w(E),T=I(E,_);if(T){var P=T.next,R=T.previous;delete $.index[T.index],T.removed=!0,R&&(R.next=P),P&&(P.previous=R),$.first===T&&($.first=P),$.last===T&&($.last=R),d?$.size--:E.size--}return!!T},forEach:function(E){for(var $=w(this),T=r(E,arguments.length>1?arguments[1]:void 0),P;P=P?P.next:$.first;)for(T(P.value,P.key,this);P&&P.removed;)P=P.previous},has:function(E){return!!I(this,E)}}),t(m,y?{get:function(E){var $=I(this,E);return $&&$.value},set:function(E,$){return O(this,E===0?0:E,$)}}:{add:function(E){return O(this,E=E===0?0:E,E)}}),d&&e(m,"size",{configurable:!0,get:function(){return w(this).size}}),S},setStrong:function(p,b,y){var g=b+" Iterator",S=v(b),m=v(g);a(p,b,function(w,O){f(this,{type:g,target:w,state:S(w),kind:O,last:null})},function(){for(var w=m(this),O=w.kind,I=w.last;I&&I.removed;)I=I.previous;return!w.target||!(w.last=I=I?I.next:w.state.first)?(w.target=null,u(void 0,!0)):u(O==="keys"?I.key:O==="values"?I.value:[I.key,I.value],!1)},y?"entries":"values",!y,!0),l(b)}},Yd}var _O;function Gz(){if(_O)return sO;_O=1;var n=cN(),e=hN();return n("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),sO}var wO;function Kz(){return wO||(wO=1,Gz()),nO}var EO={},Xd,SO;function fN(){return SO||(SO=1,Xd=function(n,e){return e===1?function(t,r){return t[n](r)}:function(t,r,i){return t[n](r,i)}}),Xd}var Jd,OO;function Yz(){if(OO)return Jd;OO=1;var n=at(),e=fN(),t=n("Map");return Jd={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},Jd}var IO;function Xz(){if(IO)return EO;IO=1;var n=Y(),e=de(),t=Jt(),r=Yr(),i=Km(),s=Yz(),o=ki(),a=se(),u=s.Map,l=s.has,d=s.get,c=s.set,h=e([].push),f=o||a(function(){return u.groupBy("ab",function(v){return v}).get("a").length!==1});return n({target:"Map",stat:!0,forced:o||f},{groupBy:function(p,b){r(p),t(b);var y=new u,g=0;return i(p,function(S){var m=b(S,g++);l(y,m)?h(d(y,m),S):c(y,m,[S])}),y}}),EO}var Zd,$O;function Jz(){if($O)return Zd;$O=1,mr(),Kz(),Xz(),uo();var n=Ae();return Zd=n.Map,Zd}var Qd,TO;function Zz(){if(TO)return Qd;TO=1;var n=Jz();return br(),Qd=n,Qd}var ec,PO;function Qz(){return PO||(PO=1,ec=Zz()),ec}var eW=Qz(),vN=ee(eW),RO={},qO;function tW(){if(qO)return RO;qO=1;var n=Y(),e=Wi().some,t=lo(),r=t("some");return n({target:"Array",proto:!0,forced:!r},{some:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),RO}var tc,CO;function rW(){if(CO)return tc;CO=1,tW();var n=st();return tc=n("Array","some"),tc}var rc,xO;function iW(){if(xO)return rc;xO=1;var n=Ne(),e=rW(),t=Array.prototype;return rc=function(r){var i=r.some;return r===t||n(t,r)&&i===t.some?e:i},rc}var ic,DO;function nW(){if(DO)return ic;DO=1;var n=iW();return ic=n,ic}var nc,AO;function sW(){return AO||(AO=1,nc=nW()),nc}var oW=sW(),aW=ee(oW),sc,MO;function uW(){if(MO)return sc;MO=1,mr();var n=st();return sc=n("Array","keys"),sc}var oc,FO;function lW(){if(FO)return oc;FO=1;var n=uW();return oc=n,oc}var ac,NO;function dW(){if(NO)return ac;NO=1,br();var n=gr(),e=ke(),t=Ne(),r=lW(),i=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return ac=function(o){var a=o.keys;return o===i||t(i,o)&&a===i.keys||e(s,n(o))?r:a},ac}var uc,kO;function cW(){return kO||(kO=1,uc=dW()),uc}var hW=cW(),vi=ee(hW),BO={},lc,jO;function fW(){if(jO)return lc;jO=1;var n=zi(),e=Math.floor,t=function(r,i){var s=r.length;if(s<8)for(var o=1,a,u;o<s;){for(u=o,a=r[o];u&&i(r[u-1],a)>0;)r[u]=r[--u];u!==o++&&(r[u]=a)}else for(var l=e(s/2),d=t(n(r,0,l),i),c=t(n(r,l),i),h=d.length,f=c.length,v=0,p=0;v<h||p<f;)r[v+p]=v<h&&p<f?i(d[v],c[p])<=0?d[v++]:c[p++]:v<h?d[v++]:c[p++];return r};return lc=t,lc}var dc,LO;function vW(){if(LO)return dc;LO=1;var n=Mi(),e=n.match(/firefox\/(\d+)/i);return dc=!!e&&+e[1],dc}var cc,zO;function pW(){if(zO)return cc;zO=1;var n=Mi();return cc=/MSIE|Trident/.test(n),cc}var hc,WO;function gW(){if(WO)return hc;WO=1;var n=Mi(),e=n.match(/AppleWebKit\/(\d+)\./);return hc=!!e&&+e[1],hc}var HO;function yW(){if(HO)return BO;HO=1;var n=Y(),e=de(),t=Jt(),r=Tt(),i=pr(),s=qF(),o=yr(),a=se(),u=fW(),l=lo(),d=vW(),c=pW(),h=Vn(),f=gW(),v=[],p=e(v.sort),b=e(v.push),y=a(function(){v.sort(void 0)}),g=a(function(){v.sort(null)}),S=l("sort"),m=!a(function(){if(h)return h<70;if(!(d&&d>3)){if(c)return!0;if(f)return f<603;var I="",_,E,$,T;for(_=65;_<76;_++){switch(E=String.fromCharCode(_),_){case 66:case 69:case 70:case 72:$=3;break;case 68:case 71:$=4;break;default:$=2}for(T=0;T<47;T++)v.push({k:E+T,v:$})}for(v.sort(function(P,R){return R.v-P.v}),T=0;T<v.length;T++)E=v[T].k.charAt(0),I.charAt(I.length-1)!==E&&(I+=E);return I!=="DGBEFHACIJK"}}),w=y||!g||!S||!m,O=function(I){return function(_,E){return E===void 0?-1:_===void 0?1:I!==void 0?+I(_,E)||0:o(_)>o(E)?1:-1}};return n({target:"Array",proto:!0,forced:w},{sort:function(_){_!==void 0&&t(_);var E=r(this);if(m)return _===void 0?p(E):p(E,_);var $=[],T=i(E),P,R;for(R=0;R<T;R++)R in E&&b($,E[R]);for(u($,O(_)),P=i($),R=0;R<P;)E[R]=$[R++];for(;R<T;)s(E,R++);return E}}),BO}var fc,UO;function mW(){if(UO)return fc;UO=1,yW();var n=st();return fc=n("Array","sort"),fc}var vc,VO;function bW(){if(VO)return vc;VO=1;var n=Ne(),e=mW(),t=Array.prototype;return vc=function(r){var i=r.sort;return r===t||n(t,r)&&i===t.sort?e:i},vc}var pc,GO;function _W(){if(GO)return pc;GO=1;var n=bW();return pc=n,pc}var gc,KO;function wW(){return KO||(KO=1,gc=_W()),gc}var EW=wW(),vm=ee(EW),yc,YO;function SW(){if(YO)return yc;YO=1,mr();var n=st();return yc=n("Array","values"),yc}var mc,XO;function OW(){if(XO)return mc;XO=1;var n=SW();return mc=n,mc}var bc,JO;function IW(){if(JO)return bc;JO=1,br();var n=gr(),e=ke(),t=Ne(),r=OW(),i=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return bc=function(o){var a=o.values;return o===i||t(i,o)&&a===i.values||e(s,n(o))?r:a},bc}var _c,ZO;function $W(){return ZO||(ZO=1,_c=IW()),_c}var TW=$W(),QO=ee(TW),wc,eI;function PW(){return eI||(eI=1,wc=$F()),wc}var RW=PW(),_i=ee(RW),Ec,tI;function qW(){if(tI)return Ec;tI=1,mr();var n=st();return Ec=n("Array","entries"),Ec}var Sc,rI;function CW(){if(rI)return Sc;rI=1;var n=qW();return Sc=n,Sc}var Oc,iI;function xW(){if(iI)return Oc;iI=1,br();var n=gr(),e=ke(),t=Ne(),r=CW(),i=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Oc=function(o){var a=o.entries;return o===i||t(i,o)&&a===i.entries||e(s,n(o))?r:a},Oc}var Ic,nI;function DW(){return nI||(nI=1,Ic=xW()),Ic}var AW=DW(),MW=ee(AW);const ze=[];for(let n=0;n<256;++n)ze.push((n+256).toString(16).slice(1));function FW(n,e=0){return(ze[n[e+0]]+ze[n[e+1]]+ze[n[e+2]]+ze[n[e+3]]+"-"+ze[n[e+4]]+ze[n[e+5]]+"-"+ze[n[e+6]]+ze[n[e+7]]+"-"+ze[n[e+8]]+ze[n[e+9]]+"-"+ze[n[e+10]]+ze[n[e+11]]+ze[n[e+12]]+ze[n[e+13]]+ze[n[e+14]]+ze[n[e+15]]).toLowerCase()}let $c;const NW=new Uint8Array(16);function kW(){if(!$c){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");$c=crypto.getRandomValues.bind(crypto)}return $c(NW)}const BW=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var sI={randomUUID:BW};function jW(n,e,t){n=n||{};const r=n.random??n.rng?.()??kW();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,FW(r)}function LW(n,e,t){return sI.randomUUID&&!n?sI.randomUUID():jW(n)}function oI(n){return typeof n=="string"||typeof n=="number"}class Ym{constructor(e){or(this,"_queue",[]),or(this,"_timeout",null),or(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(e)}setOptions(e){e&&typeof e.delay<"u"&&(this.delay=e.delay),e&&typeof e.max<"u"&&(this.max=e.max),this._flushIfNeeded()}static extend(e,t){const r=new Ym(t);if(e.flush!==void 0)throw new Error("Target object already has a property flush");e.flush=()=>{r.flush()};const i=[{name:"flush",original:void 0}];if(t&&t.replace)for(let s=0;s<t.replace.length;s++){const o=t.replace[s];i.push({name:o,original:e[o]}),r.replace(e,o)}return r._extended={object:e,methods:i},r}destroy(){if(this.flush(),this._extended){const e=this._extended.object,t=this._extended.methods;for(let r=0;r<t.length;r++){const i=t[r];i.original?e[i.name]=i.original:delete e[i.name]}this._extended=null}}replace(e,t){const r=this,i=e[t];if(!i)throw new Error("Method "+t+" undefined");e[t]=function(){for(var s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];r.queue({args:o,fn:i,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=OL(()=>{this.flush()},this.delay))}flush(){var e,t;Lr(e=CF(t=this._queue).call(t,0)).call(e,r=>{r.fn.apply(r.context||r.fn,r.args||[])})}}class Ls{constructor(){or(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),or(this,"subscribe",Ls.prototype.on),or(this,"unsubscribe",Ls.prototype.off)}_trigger(e,t,r){var i;if(e==="*")throw new Error("Cannot trigger event *");Lr(i=[...this._subscribers[e],...this._subscribers["*"]]).call(i,s=>{s(e,t,r??null)})}on(e,t){typeof t=="function"&&this._subscribers[e].push(t)}off(e,t){var r;this._subscribers[e]=yi(r=this._subscribers[e]).call(r,i=>i!==t)}}var aI={},uI={},lI;function zW(){if(lI)return uI;lI=1;var n=cN(),e=hN();return n("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),uI}var dI;function WW(){return dI||(dI=1,zW()),aI}var cI={},Tc,hI;function Qr(){if(hI)return Tc;hI=1;var n=Ni(),e=TypeError;return Tc=function(t){if(typeof t=="object"&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new e(n(t)+" is not a set")},Tc}var Pc,fI;function ei(){if(fI)return Pc;fI=1;var n=at(),e=fN(),t=n("Set"),r=t.prototype;return Pc={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:r},Pc}var Rc,vI;function ti(){if(vI)return Rc;vI=1;var n=nt();return Rc=function(e,t,r){for(var i=r?e:e.iterator,s=e.next,o,a;!(o=n(s,i)).done;)if(a=t(o.value),a!==void 0)return a},Rc}var qc,pI;function ns(){if(pI)return qc;pI=1;var n=ti();return qc=function(e,t,r){return r?n(e.keys(),t,!0):e.forEach(t)},qc}var Cc,gI;function Xm(){if(gI)return Cc;gI=1;var n=ei(),e=ns(),t=n.Set,r=n.add;return Cc=function(i){var s=new t;return e(i,function(o){r(s,o)}),s},Cc}var xc,yI;function ss(){return yI||(yI=1,xc=function(n){return n.size}),xc}var Dc,mI;function HW(){return mI||(mI=1,Dc=function(n){return{iterator:n,next:n.next,done:!1}}),Dc}var Ac,bI;function ri(){if(bI)return Ac;bI=1;var n=Jt(),e=Zt(),t=nt(),r=Li(),i=HW(),s="Invalid size",o=RangeError,a=TypeError,u=Math.max,l=function(d,c){this.set=d,this.size=u(c,0),this.has=n(d.has),this.keys=n(d.keys)};return l.prototype={getIterator:function(){return i(e(t(this.keys,this.set)))},includes:function(d){return t(this.has,this.set,d)}},Ac=function(d){e(d);var c=+d.size;if(c!==c)throw new a(s);var h=r(c);if(h<0)throw new o(s);return new l(d,h)},Ac}var Mc,_I;function UW(){if(_I)return Mc;_I=1;var n=Qr(),e=ei(),t=Xm(),r=ss(),i=ri(),s=ns(),o=ti(),a=e.has,u=e.remove;return Mc=function(d){var c=n(this),h=i(d),f=t(c);return r(c)<=h.size?s(c,function(v){h.includes(v)&&u(f,v)}):o(h.getIterator(),function(v){a(f,v)&&u(f,v)}),f},Mc}var Fc,wI;function ii(){return wI||(wI=1,Fc=function(){return!1}),Fc}var EI;function VW(){if(EI)return cI;EI=1;var n=Y(),e=UW(),t=se(),r=ii(),i=!r("difference",function(o){return o.size===0}),s=i||t(function(){var o={size:1,has:function(){return!0},keys:function(){var u=0;return{next:function(){var l=u++>1;return a.has(1)&&a.clear(),{done:l,value:2}}}}},a=new Set([1,2,3,4]);return a.difference(o).size!==3});return n({target:"Set",proto:!0,real:!0,forced:s},{difference:e}),cI}var SI={},Nc,OI;function GW(){if(OI)return Nc;OI=1;var n=Qr(),e=ei(),t=ss(),r=ri(),i=ns(),s=ti(),o=e.Set,a=e.add,u=e.has;return Nc=function(d){var c=n(this),h=r(d),f=new o;return t(c)>h.size?s(h.getIterator(),function(v){u(c,v)&&a(f,v)}):i(c,function(v){h.includes(v)&&a(f,v)}),f},Nc}var II;function KW(){if(II)return SI;II=1;var n=Y(),e=se(),t=GW(),r=ii(),i=!r("intersection",function(s){return s.size===2&&s.has(1)&&s.has(2)})||e(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});return n({target:"Set",proto:!0,real:!0,forced:i},{intersection:t}),SI}var $I={},kc,TI;function YW(){if(TI)return kc;TI=1;var n=Qr(),e=ei().has,t=ss(),r=ri(),i=ns(),s=ti(),o=Gm();return kc=function(u){var l=n(this),d=r(u);if(t(l)<=d.size)return i(l,function(h){if(d.includes(h))return!1},!0)!==!1;var c=d.getIterator();return s(c,function(h){if(e(l,h))return o(c,"normal",!1)})!==!1},kc}var PI;function XW(){if(PI)return $I;PI=1;var n=Y(),e=YW(),t=ii(),r=!t("isDisjointFrom",function(i){return!i});return n({target:"Set",proto:!0,real:!0,forced:r},{isDisjointFrom:e}),$I}var RI={},Bc,qI;function JW(){if(qI)return Bc;qI=1;var n=Qr(),e=ss(),t=ns(),r=ri();return Bc=function(s){var o=n(this),a=r(s);return e(o)>a.size?!1:t(o,function(u){if(!a.includes(u))return!1},!0)!==!1},Bc}var CI;function ZW(){if(CI)return RI;CI=1;var n=Y(),e=JW(),t=ii(),r=!t("isSubsetOf",function(i){return i});return n({target:"Set",proto:!0,real:!0,forced:r},{isSubsetOf:e}),RI}var xI={},jc,DI;function QW(){if(DI)return jc;DI=1;var n=Qr(),e=ei().has,t=ss(),r=ri(),i=ti(),s=Gm();return jc=function(a){var u=n(this),l=r(a);if(t(u)<l.size)return!1;var d=l.getIterator();return i(d,function(c){if(!e(u,c))return s(d,"normal",!1)})!==!1},jc}var AI;function eH(){if(AI)return xI;AI=1;var n=Y(),e=QW(),t=ii(),r=!t("isSupersetOf",function(i){return!i});return n({target:"Set",proto:!0,real:!0,forced:r},{isSupersetOf:e}),xI}var MI={},Lc,FI;function tH(){if(FI)return Lc;FI=1;var n=Qr(),e=ei(),t=Xm(),r=ri(),i=ti(),s=e.add,o=e.has,a=e.remove;return Lc=function(l){var d=n(this),c=r(l).getIterator(),h=t(d);return i(c,function(f){o(d,f)?a(h,f):s(h,f)}),h},Lc}var zc,NI;function pN(){return NI||(NI=1,zc=function(n){try{var e=new Set,t={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return e.clear(),e.add(4),function(){return{done:!0}}}})}},r=e[n](t);return r.size===1&&r.values().next().value===4}catch{return!1}}),zc}var kI;function rH(){if(kI)return MI;kI=1;var n=Y(),e=tH(),t=pN(),r=ii(),i=!r("symmetricDifference")||!t("symmetricDifference");return n({target:"Set",proto:!0,real:!0,forced:i},{symmetricDifference:e}),MI}var BI={},Wc,jI;function iH(){if(jI)return Wc;jI=1;var n=Qr(),e=ei().add,t=Xm(),r=ri(),i=ti();return Wc=function(o){var a=n(this),u=r(o).getIterator(),l=t(a);return i(u,function(d){e(l,d)}),l},Wc}var LI;function nH(){if(LI)return BI;LI=1;var n=Y(),e=iH(),t=pN(),r=ii(),i=!r("union")||!t("union");return n({target:"Set",proto:!0,real:!0,forced:i},{union:e}),BI}var Hc,zI;function sH(){if(zI)return Hc;zI=1,mr(),WW(),VW(),KW(),XW(),ZW(),eH(),rH(),nH(),uo();var n=Ae();return Hc=n.Set,Hc}var Uc,WI;function oH(){if(WI)return Uc;WI=1;var n=sH();return br(),Uc=n,Uc}var Vc,HI;function aH(){return HI||(HI=1,Vc=oH()),Vc}var uH=aH(),Gc=ee(uH),Kc,UI;function lH(){if(UI)return Kc;UI=1,mr(),uo();var n=lN();return Kc=n,Kc}var Yc,VI;function dH(){if(VI)return Yc;VI=1;var n=lH();return br(),Yc=n,Yc}var Xc,GI;function cH(){if(GI)return Xc;GI=1;var n=dH();return Xc=n,Xc}var Jc,KI;function hH(){if(KI)return Jc;KI=1;var n=cH();return Jc=n,Jc}var Zc,YI;function fH(){return YI||(YI=1,Zc=hH()),Zc}var Qc,XI;function vH(){return XI||(XI=1,Qc=fH()),Qc}var pH=vH(),eh=ee(pH);class xr{constructor(e){this._pairs=e}*[_i](){for(const[e,t]of this._pairs)yield[e,t]}*entries(){for(const[e,t]of this._pairs)yield[e,t]}*keys(){for(const[e]of this._pairs)yield e}*values(){for(const[,e]of this._pairs)yield e}toIdArray(){var e;return St(e=[...this._pairs]).call(e,t=>t[0])}toItemArray(){var e;return St(e=[...this._pairs]).call(e,t=>t[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){const e=aL(null);for(const[t,r]of this._pairs)e[t]=r;return e}toMap(){return new vN(this._pairs)}toIdSet(){return new Gc(this.toIdArray())}toItemSet(){return new Gc(this.toItemArray())}cache(){return new xr([...this._pairs])}distinct(e){const t=new Gc;for(const[r,i]of this._pairs)t.add(e(i,r));return t}filter(e){const t=this._pairs;return new xr({*[_i](){for(const[r,i]of t)e(i,r)&&(yield[r,i])}})}forEach(e){for(const[t,r]of this._pairs)e(r,t)}map(e){const t=this._pairs;return new xr({*[_i](){for(const[r,i]of t)yield[r,e(i,r)]}})}max(e){const t=eh(this._pairs);let r=t.next();if(r.done)return null;let i=r.value[1],s=e(r.value[1],r.value[0]);for(;!(r=t.next()).done;){const[o,a]=r.value,u=e(a,o);u>s&&(s=u,i=a)}return i}min(e){const t=eh(this._pairs);let r=t.next();if(r.done)return null;let i=r.value[1],s=e(r.value[1],r.value[0]);for(;!(r=t.next()).done;){const[o,a]=r.value,u=e(a,o);u<s&&(s=u,i=a)}return i}reduce(e,t){for(const[r,i]of this._pairs)t=e(t,i,r);return t}sort(e){return new xr({[_i]:()=>{var t;return eh(vm(t=[...this._pairs]).call(t,(r,i)=>{let[s,o]=r,[a,u]=i;return e(o,u,s,a)}))}})}}function JI(n,e){var t=Bm(n);if(j0){var r=j0(n);e&&(r=yi(r).call(r,function(i){return oN(n,i).enumerable})),t.push.apply(t,r)}return t}function ZI(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?Lr(t=JI(Object(i),!0)).call(t,function(s){or(n,s,i[s])}):J0?Nz(n,J0(i)):Lr(r=JI(Object(i))).call(r,function(s){jz(n,s,oN(i,s))})}return n}function gH(n,e){return n[e]==null&&(n[e]=LW()),n}class zs extends Ls{get idProp(){return this._idProp}constructor(e,t){super(),or(this,"_queue",null),e&&!Rt(e)&&(t=e,e=[]),this._options=t||{},this._data=new vN,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(),this._queue=null):(this._queue||(this._queue=Ym.extend(this,{replace:["add","update","remove"]})),e.queue&&typeof e.queue=="object"&&this._queue.setOptions(e.queue)))}add(e,t){const r=[];let i;if(Rt(e)){const s=St(e).call(e,o=>o[this._idProp]);if(aW(s).call(s,o=>this._data.has(o)))throw new Error("A duplicate id was found in the parameter array.");for(let o=0,a=e.length;o<a;o++)i=this._addItem(e[o]),r.push(i)}else if(e&&typeof e=="object")i=this._addItem(e),r.push(i);else throw new Error("Unknown dataType");return r.length&&this._trigger("add",{items:r},t),r}update(e,t){const r=[],i=[],s=[],o=[],a=this._idProp,u=l=>{const d=l[a];if(d!=null&&this._data.has(d)){const c=l,h=Yj({},this._data.get(d)),f=this._updateItem(c);i.push(f),o.push(c),s.push(h)}else{const c=this._addItem(l);r.push(c)}};if(Rt(e))for(let l=0,d=e.length;l<d;l++)e[l]&&typeof e[l]=="object"?u(e[l]):console.warn("Ignoring input item, which is not an object at index "+l);else if(e&&typeof e=="object")u(e);else throw new Error("Unknown dataType");if(r.length&&this._trigger("add",{items:r},t),i.length){const l={items:i,oldData:s,data:o};this._trigger("update",l,t)}return tL(r).call(r,i)}updateOnly(e,t){var r;Rt(e)||(e=[e]);const i=St(r=St(e).call(e,s=>{const o=this._data.get(s[this._idProp]);if(o==null)throw new Error("Updating non-existent items is not allowed.");return{oldData:o,update:s}})).call(r,s=>{let{oldData:o,update:a}=s;const u=o[this._idProp],l=vz(o,a);return this._data.set(u,l),{id:u,oldData:o,updatedData:l}});if(i.length){const s={items:St(i).call(i,o=>o.id),oldData:St(i).call(i,o=>o.oldData),data:St(i).call(i,o=>o.updatedData)};return this._trigger("update",s,t),s.items}else return[]}get(e,t){let r,i,s;oI(e)?(r=e,s=t):Rt(e)?(i=e,s=t):s=e;const o=s&&s.returnType==="Object"?"Object":"Array",a=s&&yi(s),u=[];let l,d,c;if(r!=null)l=this._data.get(r),l&&a&&!a(l)&&(l=void 0);else if(i!=null)for(let f=0,v=i.length;f<v;f++)l=this._data.get(i[f]),l!=null&&(!a||a(l))&&u.push(l);else{var h;d=[...vi(h=this._data).call(h)];for(let f=0,v=d.length;f<v;f++)c=d[f],l=this._data.get(c),l!=null&&(!a||a(l))&&u.push(l)}if(s&&s.order&&r==null&&this._sort(u,s.order),s&&s.fields){const f=s.fields;if(r!=null&&l!=null)l=this._filterFields(l,f);else for(let v=0,p=u.length;v<p;v++)u[v]=this._filterFields(u[v],f)}if(o=="Object"){const f={};for(let v=0,p=u.length;v<p;v++){const b=u[v],y=b[this._idProp];f[y]=b}return f}else return r!=null?l??null:u}getIds(e){const t=this._data,r=e&&yi(e),i=e&&e.order,s=[...vi(t).call(t)],o=[];if(r)if(i){const a=[];for(let u=0,l=s.length;u<l;u++){const d=s[u],c=this._data.get(d);c!=null&&r(c)&&a.push(c)}this._sort(a,i);for(let u=0,l=a.length;u<l;u++)o.push(a[u][this._idProp])}else for(let a=0,u=s.length;a<u;a++){const l=s[a],d=this._data.get(l);d!=null&&r(d)&&o.push(d[this._idProp])}else if(i){const a=[];for(let u=0,l=s.length;u<l;u++){const d=s[u];a.push(t.get(d))}this._sort(a,i);for(let u=0,l=a.length;u<l;u++)o.push(a[u][this._idProp])}else for(let a=0,u=s.length;a<u;a++){const l=s[a],d=t.get(l);d!=null&&o.push(d[this._idProp])}return o}getDataSet(){return this}forEach(e,t){const r=t&&yi(t),i=this._data,s=[...vi(i).call(i)];if(t&&t.order){const o=this.get(t);for(let a=0,u=o.length;a<u;a++){const l=o[a],d=l[this._idProp];e(l,d)}}else for(let o=0,a=s.length;o<a;o++){const u=s[o],l=this._data.get(u);l!=null&&(!r||r(l))&&e(l,u)}}map(e,t){const r=t&&yi(t),i=[],s=this._data,o=[...vi(s).call(s)];for(let a=0,u=o.length;a<u;a++){const l=o[a],d=this._data.get(l);d!=null&&(!r||r(d))&&i.push(e(d,l))}return t&&t.order&&this._sort(i,t.order),i}_filterFields(e,t){var r;return e&&NB(r=Rt(t)?t:Bm(t)).call(r,(i,s)=>(i[s]=e[s],i),{})}_sort(e,t){if(typeof t=="string"){const r=t;vm(e).call(e,(i,s)=>{const o=i[r],a=s[r];return o>a?1:o<a?-1:0})}else if(typeof t=="function")vm(e).call(e,t);else throw new TypeError("Order must be a function or a string")}remove(e,t){const r=[],i=[],s=Rt(e)?e:[e];for(let o=0,a=s.length;o<a;o++){const u=this._remove(s[o]);if(u){const l=u[this._idProp];l!=null&&(r.push(l),i.push(u))}}return r.length&&this._trigger("remove",{items:r,oldData:i},t),r}_remove(e){let t;if(oI(e)?t=e:e&&typeof e=="object"&&(t=e[this._idProp]),t!=null&&this._data.has(t)){const r=this._data.get(t)||null;return this._data.delete(t),--this.length,r}return null}clear(e){var t;const r=[...vi(t=this._data).call(t)],i=[];for(let s=0,o=r.length;s<o;s++)i.push(this._data.get(r[s]));return this._data.clear(),this.length=0,this._trigger("remove",{items:r,oldData:i},e),r}max(e){let t=null,r=null;for(const s of QO(i=this._data).call(i)){var i;const o=s[e];typeof o=="number"&&(r==null||o>r)&&(t=s,r=o)}return t||null}min(e){let t=null,r=null;for(const s of QO(i=this._data).call(i)){var i;const o=s[e];typeof o=="number"&&(r==null||o<r)&&(t=s,r=o)}return t||null}distinct(e){const t=this._data,r=[...vi(t).call(t)],i=[];let s=0;for(let o=0,a=r.length;o<a;o++){const u=r[o],d=t.get(u)[e];let c=!1;for(let h=0;h<s;h++)if(i[h]==d){c=!0;break}!c&&d!==void 0&&(i[s]=d,s++)}return i}_addItem(e){const t=gH(e,this._idProp),r=t[this._idProp];if(this._data.has(r))throw new Error("Cannot add item: item with id "+r+" already exists");return this._data.set(r,t),++this.length,r}_updateItem(e){const t=e[this._idProp];if(t==null)throw new Error("Cannot update item: item has no id (item: "+gL(e)+")");const r=this._data.get(t);if(!r)throw new Error("Cannot update item: no item with id "+t+" found");return this._data.set(t,ZI(ZI({},r),e)),t}stream(e){if(e){const r=this._data;return new xr({*[_i](){for(const i of e){const s=r.get(i);s!=null&&(yield[i,s])}}})}else{var t;return new xr({[_i]:TF(t=MW(this._data)).call(t,this._data)})}}}function yH(n,e){return typeof e=="object"&&e!==null&&n===e.idProp&&typeof e.add=="function"&&typeof e.clear=="function"&&typeof e.distinct=="function"&&typeof Lr(e)=="function"&&typeof e.get=="function"&&typeof e.getDataSet=="function"&&typeof e.getIds=="function"&&typeof e.length=="number"&&typeof St(e)=="function"&&typeof e.max=="function"&&typeof e.min=="function"&&typeof e.off=="function"&&typeof e.on=="function"&&typeof e.remove=="function"&&typeof e.setOptions=="function"&&typeof e.stream=="function"&&typeof e.update=="function"&&typeof e.updateOnly=="function"}function gN(n,e){return typeof e=="object"&&e!==null&&n===e.idProp&&typeof Lr(e)=="function"&&typeof e.get=="function"&&typeof e.getDataSet=="function"&&typeof e.getIds=="function"&&typeof e.length=="number"&&typeof St(e)=="function"&&typeof e.off=="function"&&typeof e.on=="function"&&typeof e.stream=="function"&&yH(n,e.getDataSet())}/**
|
|
33
|
+
* vis-network
|
|
34
|
+
* https://visjs.github.io/vis-network/
|
|
35
|
+
*
|
|
36
|
+
* A dynamic, browser-based visualization library.
|
|
37
|
+
*
|
|
38
|
+
* @version 10.0.2
|
|
39
|
+
* @date 2025-09-15T17:48:13.838Z
|
|
40
|
+
*
|
|
41
|
+
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
42
|
+
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
|
43
|
+
*
|
|
44
|
+
* @license
|
|
45
|
+
* vis.js is dual licensed under both
|
|
46
|
+
*
|
|
47
|
+
* 1. The Apache 2.0 License
|
|
48
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
49
|
+
*
|
|
50
|
+
* and
|
|
51
|
+
*
|
|
52
|
+
* 2. The MIT License
|
|
53
|
+
* http://opensource.org/licenses/MIT
|
|
54
|
+
*
|
|
55
|
+
* vis.js may be distributed under either license.
|
|
56
|
+
*/var QI=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function G(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var e$={},bn,t$;function ge(){if(t$)return bn;t$=1;var n=function(e){return e&&e.Math===Math&&e};return bn=n(typeof globalThis=="object"&&globalThis)||n(typeof window=="object"&&window)||n(typeof self=="object"&&self)||n(typeof QI=="object"&&QI)||n(typeof bn=="object"&&bn)||(function(){return this})()||Function("return this")(),bn}var th,r$;function te(){return r$||(r$=1,th=function(n){try{return!!n()}catch{return!0}}),th}var rh,i$;function os(){if(i$)return rh;i$=1;var n=te();return rh=!n(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),rh}var ih,n$;function fo(){if(n$)return ih;n$=1;var n=os(),e=Function.prototype,t=e.apply,r=e.call;return ih=typeof Reflect=="object"&&Reflect.apply||(n?r.bind(t):function(){return r.apply(t,arguments)}),ih}var nh,s$;function re(){if(s$)return nh;s$=1;var n=os(),e=Function.prototype,t=e.call,r=n&&e.bind.bind(t,t);return nh=n?r:function(i){return function(){return t.apply(i,arguments)}},nh}var sh,o$;function Nt(){if(o$)return sh;o$=1;var n=re(),e=n({}.toString),t=n("".slice);return sh=function(r){return t(e(r),8,-1)},sh}var oh,a$;function Jm(){if(a$)return oh;a$=1;var n=Nt(),e=re();return oh=function(t){if(n(t)==="Function")return e(t)},oh}var ah,u$;function je(){if(u$)return ah;u$=1;var n=typeof document=="object"&&document.all;return ah=typeof n>"u"&&n!==void 0?function(e){return typeof e=="function"||e===n}:function(e){return typeof e=="function"},ah}var uh={},lh,l$;function Ie(){if(l$)return lh;l$=1;var n=te();return lh=!n(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),lh}var dh,d$;function ot(){if(d$)return dh;d$=1;var n=os(),e=Function.prototype.call;return dh=n?e.bind(e):function(){return e.apply(e,arguments)},dh}var ch={},c$;function vo(){if(c$)return ch;c$=1;var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!n.call({1:2},1);return ch.f=t?function(i){var s=e(this,i);return!!s&&s.enumerable}:n,ch}var hh,h$;function as(){return h$||(h$=1,hh=function(n,e){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:e}}),hh}var fh,f$;function po(){if(f$)return fh;f$=1;var n=re(),e=te(),t=Nt(),r=Object,i=n("".split);return fh=e(function(){return!r("z").propertyIsEnumerable(0)})?function(s){return t(s)==="String"?i(s,""):r(s)}:r,fh}var vh,v$;function Vi(){return v$||(v$=1,vh=function(n){return n==null}),vh}var ph,p$;function Qt(){if(p$)return ph;p$=1;var n=Vi(),e=TypeError;return ph=function(t){if(n(t))throw new e("Can't call method on "+t);return t},ph}var gh,g$;function Pt(){if(g$)return gh;g$=1;var n=po(),e=Qt();return gh=function(t){return n(e(t))},gh}var yh,y$;function Le(){if(y$)return yh;y$=1;var n=je();return yh=function(e){return typeof e=="object"?e!==null:n(e)},yh}var mh,m$;function oe(){return m$||(m$=1,mh={}),mh}var bh,b$;function ut(){if(b$)return bh;b$=1;var n=oe(),e=ge(),t=je(),r=function(i){return t(i)?i:void 0};return bh=function(i,s){return arguments.length<2?r(n[i])||r(e[i]):n[i]&&n[i][s]||e[i]&&e[i][s]},bh}var _h,_$;function Ce(){if(_$)return _h;_$=1;var n=re();return _h=n({}.isPrototypeOf),_h}var wh,w$;function Gi(){if(w$)return wh;w$=1;var n=ge(),e=n.navigator,t=e&&e.userAgent;return wh=t?String(t):"",wh}var Eh,E$;function us(){if(E$)return Eh;E$=1;var n=ge(),e=Gi(),t=n.process,r=n.Deno,i=t&&t.versions||r&&r.version,s=i&&i.v8,o,a;return s&&(o=s.split("."),a=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!a&&e&&(o=e.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=e.match(/Chrome\/(\d+)/),o&&(a=+o[1]))),Eh=a,Eh}var Sh,S$;function Ki(){if(S$)return Sh;S$=1;var n=us(),e=te(),t=ge(),r=t.String;return Sh=!!Object.getOwnPropertySymbols&&!e(function(){var i=Symbol("symbol detection");return!r(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&n&&n<41}),Sh}var Oh,O$;function yN(){if(O$)return Oh;O$=1;var n=Ki();return Oh=n&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Oh}var Ih,I$;function ls(){if(I$)return Ih;I$=1;var n=ut(),e=je(),t=Ce(),r=yN(),i=Object;return Ih=r?function(s){return typeof s=="symbol"}:function(s){var o=n("Symbol");return e(o)&&t(o.prototype,i(s))},Ih}var $h,$$;function Yi(){if($$)return $h;$$=1;var n=String;return $h=function(e){try{return n(e)}catch{return"Object"}},$h}var Th,T$;function er(){if(T$)return Th;T$=1;var n=je(),e=Yi(),t=TypeError;return Th=function(r){if(n(r))return r;throw new t(e(r)+" is not a function")},Th}var Ph,P$;function Zm(){if(P$)return Ph;P$=1;var n=er(),e=Vi();return Ph=function(t,r){var i=t[r];return e(i)?void 0:n(i)},Ph}var Rh,R$;function mH(){if(R$)return Rh;R$=1;var n=ot(),e=je(),t=Le(),r=TypeError;return Rh=function(i,s){var o,a;if(s==="string"&&e(o=i.toString)&&!t(a=n(o,i))||e(o=i.valueOf)&&!t(a=n(o,i))||s!=="string"&&e(o=i.toString)&&!t(a=n(o,i)))return a;throw new r("Can't convert object to primitive value")},Rh}var qh={exports:{}},Ch,q$;function Xi(){return q$||(q$=1,Ch=!0),Ch}var xh,C$;function bH(){if(C$)return xh;C$=1;var n=ge(),e=Object.defineProperty;return xh=function(t,r){try{e(n,t,{value:r,configurable:!0,writable:!0})}catch{n[t]=r}return r},xh}var x$;function Qm(){if(x$)return qh.exports;x$=1;var n=Xi(),e=ge(),t=bH(),r="__core-js_shared__",i=qh.exports=e[r]||t(r,{});return(i.versions||(i.versions=[])).push({version:"3.44.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"}),qh.exports}var Dh,D$;function Ji(){if(D$)return Dh;D$=1;var n=Qm();return Dh=function(e,t){return n[e]||(n[e]=t||{})},Dh}var Ah,A$;function lt(){if(A$)return Ah;A$=1;var n=Qt(),e=Object;return Ah=function(t){return e(n(t))},Ah}var Mh,M$;function He(){if(M$)return Mh;M$=1;var n=re(),e=lt(),t=n({}.hasOwnProperty);return Mh=Object.hasOwn||function(i,s){return t(e(i),s)},Mh}var Fh,F$;function go(){if(F$)return Fh;F$=1;var n=re(),e=0,t=Math.random(),r=n(1.1.toString);return Fh=function(i){return"Symbol("+(i===void 0?"":i)+")_"+r(++e+t,36)},Fh}var Nh,N$;function xe(){if(N$)return Nh;N$=1;var n=ge(),e=Ji(),t=He(),r=go(),i=Ki(),s=yN(),o=n.Symbol,a=e("wks"),u=s?o.for||o:o&&o.withoutSetter||r;return Nh=function(l){return t(a,l)||(a[l]=i&&t(o,l)?o[l]:u("Symbol."+l)),a[l]},Nh}var kh,k$;function mN(){if(k$)return kh;k$=1;var n=ot(),e=Le(),t=ls(),r=Zm(),i=mH(),s=xe(),o=TypeError,a=s("toPrimitive");return kh=function(u,l){if(!e(u)||t(u))return u;var d=r(u,a),c;if(d){if(l===void 0&&(l="default"),c=n(d,u,l),!e(c)||t(c))return c;throw new o("Can't convert object to primitive value")}return l===void 0&&(l="number"),i(u,l)},kh}var Bh,B$;function eb(){if(B$)return Bh;B$=1;var n=mN(),e=ls();return Bh=function(t){var r=n(t,"string");return e(r)?r:r+""},Bh}var jh,j$;function bN(){if(j$)return jh;j$=1;var n=ge(),e=Le(),t=n.document,r=e(t)&&e(t.createElement);return jh=function(i){return r?t.createElement(i):{}},jh}var Lh,L$;function _N(){if(L$)return Lh;L$=1;var n=Ie(),e=te(),t=bN();return Lh=!n&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),Lh}var z$;function yo(){if(z$)return uh;z$=1;var n=Ie(),e=ot(),t=vo(),r=as(),i=Pt(),s=eb(),o=He(),a=_N(),u=Object.getOwnPropertyDescriptor;return uh.f=n?u:function(d,c){if(d=i(d),c=s(c),a)try{return u(d,c)}catch{}if(o(d,c))return r(!e(t.f,d,c),d[c])},uh}var zh,W$;function _H(){if(W$)return zh;W$=1;var n=te(),e=je(),t=/#|\.prototype\./,r=function(u,l){var d=s[i(u)];return d===a?!0:d===o?!1:e(l)?n(l):!!l},i=r.normalize=function(u){return String(u).replace(t,".").toLowerCase()},s=r.data={},o=r.NATIVE="N",a=r.POLYFILL="P";return zh=r,zh}var Wh,H$;function mo(){if(H$)return Wh;H$=1;var n=Jm(),e=er(),t=os(),r=n(n.bind);return Wh=function(i,s){return e(i),s===void 0?i:t?r(i,s):function(){return i.apply(s,arguments)}},Wh}var Hh={},Uh,U$;function wN(){if(U$)return Uh;U$=1;var n=Ie(),e=te();return Uh=n&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Uh}var Vh,V$;function kt(){if(V$)return Vh;V$=1;var n=Le(),e=String,t=TypeError;return Vh=function(r){if(n(r))return r;throw new t(e(r)+" is not an object")},Vh}var G$;function gt(){if(G$)return Hh;G$=1;var n=Ie(),e=_N(),t=wN(),r=kt(),i=eb(),s=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",d="writable";return Hh.f=n?t?function(h,f,v){if(r(h),f=i(f),r(v),typeof h=="function"&&f==="prototype"&&"value"in v&&d in v&&!v[d]){var p=a(h,f);p&&p[d]&&(h[f]=v.value,v={configurable:l in v?v[l]:p[l],enumerable:u in v?v[u]:p[u],writable:!1})}return o(h,f,v)}:o:function(h,f,v){if(r(h),f=i(f),r(v),e)try{return o(h,f,v)}catch{}if("get"in v||"set"in v)throw new s("Accessors not supported");return"value"in v&&(h[f]=v.value),h},Hh}var Gh,K$;function Zi(){if(K$)return Gh;K$=1;var n=Ie(),e=gt(),t=as();return Gh=n?function(r,i,s){return e.f(r,i,t(1,s))}:function(r,i,s){return r[i]=s,r},Gh}var Kh,Y$;function z(){if(Y$)return Kh;Y$=1;var n=ge(),e=fo(),t=Jm(),r=je(),i=yo().f,s=_H(),o=oe(),a=mo(),u=Zi(),l=He(),d=function(c){var h=function(f,v,p){if(this instanceof h){switch(arguments.length){case 0:return new c;case 1:return new c(f);case 2:return new c(f,v)}return new c(f,v,p)}return e(c,this,arguments)};return h.prototype=c.prototype,h};return Kh=function(c,h){var f=c.target,v=c.global,p=c.stat,b=c.proto,y=v?n:p?n[f]:n[f]&&n[f].prototype,g=v?o:o[f]||u(o,f,{})[f],S=g.prototype,m,w,O,I,_,E,$,T,P;for(I in h)m=s(v?I:f+(p?".":"#")+I,c.forced),w=!m&&y&&l(y,I),E=g[I],w&&(c.dontCallGetSet?(P=i(y,I),$=P&&P.value):$=y[I]),_=w&&$?$:h[I],!(!m&&!b&&typeof E==typeof _)&&(c.bind&&w?T=a(_,n):c.wrap&&w?T=d(_):b&&r(_)?T=t(_):T=_,(c.sham||_&&_.sham||E&&E.sham)&&u(T,"sham",!0),u(g,I,T),b&&(O=f+"Prototype",l(o,O)||u(o,O,{}),u(o[O],I,_),c.real&&S&&(m||!S[I])&&u(S,I,_)))},Kh}var Yh,X$;function wH(){if(X$)return Yh;X$=1;var n=Math.ceil,e=Math.floor;return Yh=Math.trunc||function(r){var i=+r;return(i>0?e:n)(i)},Yh}var Xh,J$;function Qi(){if(J$)return Xh;J$=1;var n=wH();return Xh=function(e){var t=+e;return t!==t||t===0?0:n(t)},Xh}var Jh,Z$;function bo(){if(Z$)return Jh;Z$=1;var n=Qi(),e=Math.max,t=Math.min;return Jh=function(r,i){var s=n(r);return s<0?e(s+i,0):t(s,i)},Jh}var Zh,Q$;function EN(){if(Q$)return Zh;Q$=1;var n=Qi(),e=Math.min;return Zh=function(t){var r=n(t);return r>0?e(r,9007199254740991):0},Zh}var Qh,eT;function tr(){if(eT)return Qh;eT=1;var n=EN();return Qh=function(e){return n(e.length)},Qh}var ef,tT;function tb(){if(tT)return ef;tT=1;var n=Pt(),e=bo(),t=tr(),r=function(i){return function(s,o,a){var u=n(s),l=t(u);if(l===0)return!i&&-1;var d=e(a,l),c;if(i&&o!==o){for(;l>d;)if(c=u[d++],c!==c)return!0}else for(;l>d;d++)if((i||d in u)&&u[d]===o)return i||d||0;return!i&&-1}};return ef={includes:r(!0),indexOf:r(!1)},ef}var tf,rT;function ds(){return rT||(rT=1,tf={}),tf}var rf,iT;function SN(){if(iT)return rf;iT=1;var n=re(),e=He(),t=Pt(),r=tb().indexOf,i=ds(),s=n([].push);return rf=function(o,a){var u=t(o),l=0,d=[],c;for(c in u)!e(i,c)&&e(u,c)&&s(d,c);for(;a.length>l;)e(u,c=a[l++])&&(~r(d,c)||s(d,c));return d},rf}var nf,nT;function rb(){return nT||(nT=1,nf=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),nf}var sf,sT;function cs(){if(sT)return sf;sT=1;var n=SN(),e=rb();return sf=Object.keys||function(r){return n(r,e)},sf}var of={},oT;function _o(){return oT||(oT=1,of.f=Object.getOwnPropertySymbols),of}var af,aT;function EH(){if(aT)return af;aT=1;var n=Ie(),e=re(),t=ot(),r=te(),i=cs(),s=_o(),o=vo(),a=lt(),u=po(),l=Object.assign,d=Object.defineProperty,c=e([].concat);return af=!l||r(function(){if(n&&l({b:1},l(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var h={},f={},v=Symbol("assign detection"),p="abcdefghijklmnopqrst";return h[v]=7,p.split("").forEach(function(b){f[b]=b}),l({},h)[v]!==7||i(l({},f)).join("")!==p})?function(f,v){for(var p=a(f),b=arguments.length,y=1,g=s.f,S=o.f;b>y;)for(var m=u(arguments[y++]),w=g?c(i(m),g(m)):i(m),O=w.length,I=0,_;O>I;)_=w[I++],(!n||t(S,m,_))&&(p[_]=m[_]);return p}:l,af}var uT;function SH(){if(uT)return e$;uT=1;var n=z(),e=EH();return n({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),e$}var uf,lT;function OH(){if(lT)return uf;lT=1,SH();var n=oe();return uf=n.Object.assign,uf}var lf,dT;function IH(){if(dT)return lf;dT=1;var n=OH();return lf=n,lf}var df,cT;function $H(){return cT||(cT=1,df=IH()),df}var TH=$H(),Te=G(TH),hT={},cf,fT;function en(){if(fT)return cf;fT=1;var n=re();return cf=n([].slice),cf}var hf,vT;function PH(){if(vT)return hf;vT=1;var n=re(),e=er(),t=Le(),r=He(),i=en(),s=os(),o=Function,a=n([].concat),u=n([].join),l={},d=function(c,h,f){if(!r(l,h)){for(var v=[],p=0;p<h;p++)v[p]="a["+p+"]";l[h]=o("C,a","return new C("+u(v,",")+")")}return l[h](c,f)};return hf=s?o.bind:function(h){var f=e(this),v=f.prototype,p=i(arguments,1),b=function(){var g=a(p,i(arguments));return this instanceof b?d(f,g.length,g):f.apply(h,g)};return t(v)&&(b.prototype=v),b},hf}var pT;function RH(){if(pT)return hT;pT=1;var n=z(),e=PH();return n({target:"Function",proto:!0,forced:Function.bind!==e},{bind:e}),hT}var ff,gT;function Ue(){if(gT)return ff;gT=1;var n=ge(),e=oe();return ff=function(t,r){var i=e[t+"Prototype"],s=i&&i[r];if(s)return s;var o=n[t],a=o&&o.prototype;return a&&a[r]},ff}var vf,yT;function qH(){if(yT)return vf;yT=1,RH();var n=Ue();return vf=n("Function","bind"),vf}var pf,mT;function CH(){if(mT)return pf;mT=1;var n=Ce(),e=qH(),t=Function.prototype;return pf=function(r){var i=r.bind;return r===t||n(t,r)&&i===t.bind?e:i},pf}var gf,bT;function xH(){if(bT)return gf;bT=1;var n=CH();return gf=n,gf}var yf,_T;function DH(){return _T||(_T=1,yf=xH()),yf}var AH=DH(),D=G(AH);function ib(n,e,t,r){n.beginPath(),n.arc(e,t,r,0,2*Math.PI,!1),n.closePath()}function MH(n,e,t,r){n.beginPath(),n.rect(e-r,t-r,r*2,r*2),n.closePath()}function FH(n,e,t,r){n.beginPath(),r*=1.15,t+=.275*r;const i=r*2,s=i/2,o=Math.sqrt(3)/6*i,a=Math.sqrt(i*i-s*s);n.moveTo(e,t-(a-o)),n.lineTo(e+s,t+o),n.lineTo(e-s,t+o),n.lineTo(e,t-(a-o)),n.closePath()}function NH(n,e,t,r){n.beginPath(),r*=1.15,t-=.275*r;const i=r*2,s=i/2,o=Math.sqrt(3)/6*i,a=Math.sqrt(i*i-s*s);n.moveTo(e,t+(a-o)),n.lineTo(e+s,t-o),n.lineTo(e-s,t-o),n.lineTo(e,t+(a-o)),n.closePath()}function kH(n,e,t,r){n.beginPath(),r*=.82,t+=.1*r;for(let i=0;i<10;i++){const s=i%2===0?r*1.3:r*.5;n.lineTo(e+s*Math.sin(i*2*Math.PI/10),t-s*Math.cos(i*2*Math.PI/10))}n.closePath()}function BH(n,e,t,r){n.beginPath(),n.lineTo(e,t+r),n.lineTo(e+r,t),n.lineTo(e,t-r),n.lineTo(e-r,t),n.closePath()}function ON(n,e,t,r,i,s){const o=Math.PI/180;r-2*s<0&&(s=r/2),i-2*s<0&&(s=i/2),n.beginPath(),n.moveTo(e+s,t),n.lineTo(e+r-s,t),n.arc(e+r-s,t+s,s,o*270,o*360,!1),n.lineTo(e+r,t+i-s),n.arc(e+r-s,t+i-s,s,0,o*90,!1),n.lineTo(e+s,t+i),n.arc(e+s,t+i-s,s,o*90,o*180,!1),n.lineTo(e,t+s),n.arc(e+s,t+s,s,o*180,o*270,!1),n.closePath()}function pm(n,e,t,r,i){const s=.5522848,o=r/2*s,a=i/2*s,u=e+r,l=t+i,d=e+r/2,c=t+i/2;n.beginPath(),n.moveTo(e,c),n.bezierCurveTo(e,c-a,d-o,t,d,t),n.bezierCurveTo(d+o,t,u,c-a,u,c),n.bezierCurveTo(u,c+a,d+o,l,d,l),n.bezierCurveTo(d-o,l,e,c+a,e,c),n.closePath()}function IN(n,e,t,r,i){const s=.3333333333333333,o=r,a=i*s,u=.5522848,l=o/2*u,d=a/2*u,c=e+o,h=t+a,f=e+o/2,v=t+a/2,p=t+(i-a/2),b=t+i;n.beginPath(),n.moveTo(c,v),n.bezierCurveTo(c,v+d,f+l,h,f,h),n.bezierCurveTo(f-l,h,e,v+d,e,v),n.bezierCurveTo(e,v-d,f-l,t,f,t),n.bezierCurveTo(f+l,t,c,v-d,c,v),n.lineTo(c,p),n.bezierCurveTo(c,p+d,f+l,b,f,b),n.bezierCurveTo(f-l,b,e,p+d,e,p),n.lineTo(e,v)}function $N(n,e,t,r,i,s){n.beginPath(),n.moveTo(e,t);const o=s.length,a=r-e,u=i-t,l=u/a;let d=Math.sqrt(a*a+u*u),c=0,h=!0,f=0,v=+s[0];for(;d>=.1;)v=+s[c++%o],v>d&&(v=d),f=Math.sqrt(v*v/(1+l*l)),f=a<0?-f:f,e+=f,t+=l*f,h===!0?n.lineTo(e,t):n.moveTo(e,t),d-=v,h=!h}function jH(n,e,t,r){n.beginPath();const i=6,s=Math.PI*2/i;n.moveTo(e+r,t);for(let o=1;o<i;o++)n.lineTo(e+r*Math.cos(s*o),t+r*Math.sin(s*o));n.closePath()}const wT={circle:ib,dashedLine:$N,database:IN,diamond:BH,ellipse:pm,ellipse_vis:pm,hexagon:jH,roundRect:ON,square:MH,star:kH,triangle:FH,triangleDown:NH};function LH(n){return Object.prototype.hasOwnProperty.call(wT,n)?wT[n]:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];CanvasRenderingContext2D.prototype[n].call(e,r)}}var mf={exports:{}},ET;function zH(){return ET||(ET=1,(function(n){n.exports=e;function e(r){if(r)return t(r)}function t(r){for(var i in e.prototype)r[i]=e.prototype[i];return r}e.prototype.on=e.prototype.addEventListener=function(r,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(i),this},e.prototype.once=function(r,i){function s(){this.off(r,s),i.apply(this,arguments)}return s.fn=i,this.on(r,s),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(r,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+r];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var o,a=0;a<s.length;a++)if(o=s[a],o===i||o.fn===i){s.splice(a,1);break}return s.length===0&&delete this._callbacks["$"+r],this},e.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),s=this._callbacks["$"+r],o=1;o<arguments.length;o++)i[o-1]=arguments[o];if(s){s=s.slice(0);for(var o=0,a=s.length;o<a;++o)s[o].apply(this,i)}return this},e.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]},e.prototype.hasListeners=function(r){return!!this.listeners(r).length}})(mf)),mf.exports}var WH=zH(),TN=G(WH),ST={},bf,OT;function ni(){if(OT)return bf;OT=1;var n=Nt();return bf=Array.isArray||function(t){return n(t)==="Array"},bf}var _f,IT;function PN(){if(IT)return _f;IT=1;var n=TypeError,e=9007199254740991;return _f=function(t){if(t>e)throw n("Maximum allowed index exceeded");return t},_f}var wf,$T;function wo(){if($T)return wf;$T=1;var n=Ie(),e=gt(),t=as();return wf=function(r,i,s){n?e.f(r,i,t(0,s)):r[i]=s},wf}var Ef,TT;function nb(){if(TT)return Ef;TT=1;var n=xe(),e=n("toStringTag"),t={};return t[e]="z",Ef=String(t)==="[object z]",Ef}var Sf,PT;function tn(){if(PT)return Sf;PT=1;var n=nb(),e=je(),t=Nt(),r=xe(),i=r("toStringTag"),s=Object,o=t((function(){return arguments})())==="Arguments",a=function(u,l){try{return u[l]}catch{}};return Sf=n?t:function(u){var l,d,c;return u===void 0?"Undefined":u===null?"Null":typeof(d=a(l=s(u),i))=="string"?d:o?t(l):(c=t(l))==="Object"&&e(l.callee)?"Arguments":c},Sf}var Of,RT;function HH(){if(RT)return Of;RT=1;var n=re(),e=je(),t=Qm(),r=n(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(i){return r(i)}),Of=t.inspectSource,Of}var If,qT;function RN(){if(qT)return If;qT=1;var n=re(),e=te(),t=je(),r=tn(),i=ut(),s=HH(),o=function(){},a=i("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=n(u.exec),d=!u.test(o),c=function(v){if(!t(v))return!1;try{return a(o,[],v),!0}catch{return!1}},h=function(v){if(!t(v))return!1;switch(r(v)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!l(u,s(v))}catch{return!0}};return h.sham=!0,If=!a||e(function(){var f;return c(c.call)||!c(Object)||!c(function(){f=!0})||f})?h:c,If}var $f,CT;function UH(){if(CT)return $f;CT=1;var n=ni(),e=RN(),t=Le(),r=xe(),i=r("species"),s=Array;return $f=function(o){var a;return n(o)&&(a=o.constructor,e(a)&&(a===s||n(a.prototype))?a=void 0:t(a)&&(a=a[i],a===null&&(a=void 0))),a===void 0?s:a},$f}var Tf,xT;function sb(){if(xT)return Tf;xT=1;var n=UH();return Tf=function(e,t){return new(n(e))(t===0?0:t)},Tf}var Pf,DT;function hs(){if(DT)return Pf;DT=1;var n=te(),e=xe(),t=us(),r=e("species");return Pf=function(i){return t>=51||!n(function(){var s=[],o=s.constructor={};return o[r]=function(){return{foo:1}},s[i](Boolean).foo!==1})},Pf}var AT;function qN(){if(AT)return ST;AT=1;var n=z(),e=te(),t=ni(),r=Le(),i=lt(),s=tr(),o=PN(),a=wo(),u=sb(),l=hs(),d=xe(),c=us(),h=d("isConcatSpreadable"),f=c>=51||!e(function(){var b=[];return b[h]=!1,b.concat()[0]!==b}),v=function(b){if(!r(b))return!1;var y=b[h];return y!==void 0?!!y:t(b)},p=!f||!l("concat");return n({target:"Array",proto:!0,arity:1,forced:p},{concat:function(y){var g=i(this),S=u(g,0),m=0,w,O,I,_,E;for(w=-1,I=arguments.length;w<I;w++)if(E=w===-1?g:arguments[w],v(E))for(_=s(E),o(m+_),O=0;O<_;O++,m++)O in E&&a(S,m,E[O]);else o(m+1),a(S,m++,E);return S.length=m,S}}),ST}var MT={},FT={},Rf,NT;function yt(){if(NT)return Rf;NT=1;var n=tn(),e=String;return Rf=function(t){if(n(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(t)},Rf}var qf={},kT;function ob(){if(kT)return qf;kT=1;var n=Ie(),e=wN(),t=gt(),r=kt(),i=Pt(),s=cs();return qf.f=n&&!e?Object.defineProperties:function(a,u){r(a);for(var l=i(u),d=s(u),c=d.length,h=0,f;c>h;)t.f(a,f=d[h++],l[f]);return a},qf}var Cf,BT;function VH(){if(BT)return Cf;BT=1;var n=ut();return Cf=n("document","documentElement"),Cf}var xf,jT;function Eo(){if(jT)return xf;jT=1;var n=Ji(),e=go(),t=n("keys");return xf=function(r){return t[r]||(t[r]=e(r))},xf}var Df,LT;function fs(){if(LT)return Df;LT=1;var n=kt(),e=ob(),t=rb(),r=ds(),i=VH(),s=bN(),o=Eo(),a=">",u="<",l="prototype",d="script",c=o("IE_PROTO"),h=function(){},f=function(g){return u+d+a+g+u+"/"+d+a},v=function(g){g.write(f("")),g.close();var S=g.parentWindow.Object;return g=null,S},p=function(){var g=s("iframe"),S="java"+d+":",m;return g.style.display="none",i.appendChild(g),g.src=String(S),m=g.contentWindow.document,m.open(),m.write(f("document.F=Object")),m.close(),m.F},b,y=function(){try{b=new ActiveXObject("htmlfile")}catch{}y=typeof document<"u"?document.domain&&b?v(b):p():v(b);for(var g=t.length;g--;)delete y[l][t[g]];return y()};return r[c]=!0,Df=Object.create||function(S,m){var w;return S!==null?(h[l]=n(S),w=new h,h[l]=null,w[c]=S):w=y(),m===void 0?w:e.f(w,m)},Df}var Af={},zT;function So(){if(zT)return Af;zT=1;var n=SN(),e=rb(),t=e.concat("length","prototype");return Af.f=Object.getOwnPropertyNames||function(i){return n(i,t)},Af}var Mf={},WT;function ab(){if(WT)return Mf;WT=1;var n=Nt(),e=Pt(),t=So().f,r=en(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(o){try{return t(o)}catch{return r(i)}};return Mf.f=function(a){return i&&n(a)==="Window"?s(a):t(e(a))},Mf}var Ff,HT;function vs(){if(HT)return Ff;HT=1;var n=Zi();return Ff=function(e,t,r,i){return i&&i.enumerable?e[t]=r:n(e,t,r),e},Ff}var Nf,UT;function ub(){if(UT)return Nf;UT=1;var n=gt();return Nf=function(e,t,r){return n.f(e,t,r)},Nf}var kf={},VT;function Oo(){if(VT)return kf;VT=1;var n=xe();return kf.f=n,kf}var Bf,GT;function _e(){if(GT)return Bf;GT=1;var n=oe(),e=He(),t=Oo(),r=gt().f;return Bf=function(i){var s=n.Symbol||(n.Symbol={});e(s,i)||r(s,i,{value:t.f(i)})},Bf}var jf,KT;function CN(){if(KT)return jf;KT=1;var n=ot(),e=ut(),t=xe(),r=vs();return jf=function(){var i=e("Symbol"),s=i&&i.prototype,o=s&&s.valueOf,a=t("toPrimitive");s&&!s[a]&&r(s,a,function(u){return n(o,this)},{arity:1})},jf}var Lf,YT;function GH(){if(YT)return Lf;YT=1;var n=nb(),e=tn();return Lf=n?{}.toString:function(){return"[object "+e(this)+"]"},Lf}var zf,XT;function si(){if(XT)return zf;XT=1;var n=nb(),e=gt().f,t=Zi(),r=He(),i=GH(),s=xe(),o=s("toStringTag");return zf=function(a,u,l,d){var c=l?a:a&&a.prototype;c&&(r(c,o)||e(c,o,{configurable:!0,value:u}),d&&!n&&t(c,"toString",i))},zf}var Wf,JT;function xN(){if(JT)return Wf;JT=1;var n=ge(),e=je(),t=n.WeakMap;return Wf=e(t)&&/native code/.test(String(t)),Wf}var Hf,ZT;function oi(){if(ZT)return Hf;ZT=1;var n=xN(),e=ge(),t=Le(),r=Zi(),i=He(),s=Qm(),o=Eo(),a=ds(),u="Object already initialized",l=e.TypeError,d=e.WeakMap,c,h,f,v=function(g){return f(g)?h(g):c(g,{})},p=function(g){return function(S){var m;if(!t(S)||(m=h(S)).type!==g)throw new l("Incompatible receiver, "+g+" required");return m}};if(n||s.state){var b=s.state||(s.state=new d);b.get=b.get,b.has=b.has,b.set=b.set,c=function(g,S){if(b.has(g))throw new l(u);return S.facade=g,b.set(g,S),S},h=function(g){return b.get(g)||{}},f=function(g){return b.has(g)}}else{var y=o("state");a[y]=!0,c=function(g,S){if(i(g,y))throw new l(u);return S.facade=g,r(g,y,S),S},h=function(g){return i(g,y)?g[y]:{}},f=function(g){return i(g,y)}}return Hf={set:c,get:h,has:f,enforce:v,getterFor:p},Hf}var Uf,QT;function _r(){if(QT)return Uf;QT=1;var n=mo(),e=re(),t=po(),r=lt(),i=tr(),s=sb(),o=e([].push),a=function(u){var l=u===1,d=u===2,c=u===3,h=u===4,f=u===6,v=u===7,p=u===5||f;return function(b,y,g,S){for(var m=r(b),w=t(m),O=i(w),I=n(y,g),_=0,E=S||s,$=l?E(b,O):d||v?E(b,0):void 0,T,P;O>_;_++)if((p||_ in w)&&(T=w[_],P=I(T,_,m),u))if(l)$[_]=P;else if(P)switch(u){case 3:return!0;case 5:return T;case 6:return _;case 2:o($,T)}else switch(u){case 4:return!1;case 7:o($,T)}return f?-1:c||h?h:$}};return Uf={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},Uf}var eP;function KH(){if(eP)return FT;eP=1;var n=z(),e=ge(),t=ot(),r=re(),i=Xi(),s=Ie(),o=Ki(),a=te(),u=He(),l=Ce(),d=kt(),c=Pt(),h=eb(),f=yt(),v=as(),p=fs(),b=cs(),y=So(),g=ab(),S=_o(),m=yo(),w=gt(),O=ob(),I=vo(),_=vs(),E=ub(),$=Ji(),T=Eo(),P=ds(),R=go(),C=xe(),M=Oo(),K=_e(),L=CN(),J=si(),Q=oi(),ae=_r().forEach,W=T("hidden"),ue="Symbol",ye="prototype",me=Q.set,bt=Q.getterFor(ue),ve=Object[ye],Ve=e.Symbol,_t=Ve&&Ve[ye],Do=e.RangeError,Ao=e.TypeError,Sr=e.QObject,ln=m.f,Ge=w.f,dn=g.f,Mo=I.f,cn=r([].push),De=$("symbols"),wt=$("op-symbols"),Fo=$("wks"),Or=!Sr||!Sr[ye]||!Sr[ye].findChild,hn=function(H,F,N){var k=ln(ve,F);k&&delete ve[F],Ge(H,F,N),k&&H!==ve&&Ge(ve,F,k)},Ir=s&&a(function(){return p(Ge({},"a",{get:function(){return Ge(this,"a",{value:7}).a}})).a!==7})?hn:Ge,$r=function(H,F){var N=De[H]=p(_t);return me(N,{type:ue,tag:H,description:F}),s||(N.description=F),N},Bt=function(F,N,k){F===ve&&Bt(wt,N,k),d(F);var U=h(N);return d(k),u(De,U)?(k.enumerable?(u(F,W)&&F[W][U]&&(F[W][U]=!1),k=p(k,{enumerable:v(0,!1)})):(u(F,W)||Ge(F,W,v(1,p(null))),F[W][U]=!0),Ir(F,U,k)):Ge(F,U,k)},Tr=function(F,N){d(F);var k=c(N),U=b(k).concat(pn(k));return ae(U,function(ie){(!s||t(Pr,k,ie))&&Bt(F,ie,k[ie])}),F},No=function(F,N){return N===void 0?p(F):Tr(p(F),N)},Pr=function(F){var N=h(F),k=t(Mo,this,N);return this===ve&&u(De,N)&&!u(wt,N)?!1:k||!u(this,N)||!u(De,N)||u(this,W)&&this[W][N]?k:!0},fn=function(F,N){var k=c(F),U=h(N);if(!(k===ve&&u(De,U)&&!u(wt,U))){var ie=ln(k,U);return ie&&u(De,U)&&!(u(k,W)&&k[W][U])&&(ie.enumerable=!0),ie}},vn=function(F){var N=dn(c(F)),k=[];return ae(N,function(U){!u(De,U)&&!u(P,U)&&cn(k,U)}),k},pn=function(H){var F=H===ve,N=dn(F?wt:c(H)),k=[];return ae(N,function(U){u(De,U)&&(!F||u(ve,U))&&cn(k,De[U])}),k};return o||(Ve=function(){if(l(_t,this))throw new Ao("Symbol is not a constructor");var F=!arguments.length||arguments[0]===void 0?void 0:f(arguments[0]),N=R(F),k=function(U){var ie=this===void 0?e:this;ie===ve&&t(k,wt,U),u(ie,W)&&u(ie[W],N)&&(ie[W][N]=!1);var gn=v(1,U);try{Ir(ie,N,gn)}catch(yn){if(!(yn instanceof Do))throw yn;hn(ie,N,gn)}};return s&&Or&&Ir(ve,N,{configurable:!0,set:k}),$r(N,F)},_t=Ve[ye],_(_t,"toString",function(){return bt(this).tag}),_(Ve,"withoutSetter",function(H){return $r(R(H),H)}),I.f=Pr,w.f=Bt,O.f=Tr,m.f=fn,y.f=g.f=vn,S.f=pn,M.f=function(H){return $r(C(H),H)},s&&(E(_t,"description",{configurable:!0,get:function(){return bt(this).description}}),i||_(ve,"propertyIsEnumerable",Pr,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:Ve}),ae(b(Fo),function(H){K(H)}),n({target:ue,stat:!0,forced:!o},{useSetter:function(){Or=!0},useSimple:function(){Or=!1}}),n({target:"Object",stat:!0,forced:!o,sham:!s},{create:No,defineProperty:Bt,defineProperties:Tr,getOwnPropertyDescriptor:fn}),n({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:vn}),L(),J(Ve,ue),P[W]=!0,FT}var tP={},Vf,rP;function DN(){if(rP)return Vf;rP=1;var n=Ki();return Vf=n&&!!Symbol.for&&!!Symbol.keyFor,Vf}var iP;function YH(){if(iP)return tP;iP=1;var n=z(),e=ut(),t=He(),r=yt(),i=Ji(),s=DN(),o=i("string-to-symbol-registry"),a=i("symbol-to-string-registry");return n({target:"Symbol",stat:!0,forced:!s},{for:function(u){var l=r(u);if(t(o,l))return o[l];var d=e("Symbol")(l);return o[l]=d,a[d]=l,d}}),tP}var nP={},sP;function XH(){if(sP)return nP;sP=1;var n=z(),e=He(),t=ls(),r=Yi(),i=Ji(),s=DN(),o=i("symbol-to-string-registry");return n({target:"Symbol",stat:!0,forced:!s},{keyFor:function(u){if(!t(u))throw new TypeError(r(u)+" is not a symbol");if(e(o,u))return o[u]}}),nP}var oP={},Gf,aP;function JH(){if(aP)return Gf;aP=1;var n=re(),e=ni(),t=je(),r=Nt(),i=yt(),s=n([].push);return Gf=function(o){if(t(o))return o;if(e(o)){for(var a=o.length,u=[],l=0;l<a;l++){var d=o[l];typeof d=="string"?s(u,d):(typeof d=="number"||r(d)==="Number"||r(d)==="String")&&s(u,i(d))}var c=u.length,h=!0;return function(f,v){if(h)return h=!1,v;if(e(this))return v;for(var p=0;p<c;p++)if(u[p]===f)return v}}},Gf}var uP;function AN(){if(uP)return oP;uP=1;var n=z(),e=ut(),t=fo(),r=ot(),i=re(),s=te(),o=je(),a=ls(),u=en(),l=JH(),d=Ki(),c=String,h=e("JSON","stringify"),f=i(/./.exec),v=i("".charAt),p=i("".charCodeAt),b=i("".replace),y=i(1.1.toString),g=/[\uD800-\uDFFF]/g,S=/^[\uD800-\uDBFF]$/,m=/^[\uDC00-\uDFFF]$/,w=!d||s(function(){var E=e("Symbol")("stringify detection");return h([E])!=="[null]"||h({a:E})!=="{}"||h(Object(E))!=="{}"}),O=s(function(){return h("\uDF06\uD834")!=='"\\udf06\\ud834"'||h("\uDEAD")!=='"\\udead"'}),I=function(E,$){var T=u(arguments),P=l($);if(!(!o(P)&&(E===void 0||a(E))))return T[1]=function(R,C){if(o(P)&&(C=r(P,this,c(R),C)),!a(C))return C},t(h,null,T)},_=function(E,$,T){var P=v(T,$-1),R=v(T,$+1);return f(S,E)&&!f(m,R)||f(m,E)&&!f(S,P)?"\\u"+y(p(E,0),16):E};return h&&n({target:"JSON",stat:!0,arity:3,forced:w||O},{stringify:function($,T,P){var R=u(arguments),C=t(w?I:h,null,R);return O&&typeof C=="string"?b(C,g,_):C}}),oP}var lP={},dP;function ZH(){if(dP)return lP;dP=1;var n=z(),e=Ki(),t=te(),r=_o(),i=lt(),s=!e||t(function(){r.f(1)});return n({target:"Object",stat:!0,forced:s},{getOwnPropertySymbols:function(a){var u=r.f;return u?u(i(a)):[]}}),lP}var cP;function MN(){return cP||(cP=1,KH(),YH(),XH(),AN(),ZH()),MT}var hP={},fP;function FN(){if(fP)return hP;fP=1;var n=_e();return n("asyncDispose"),hP}var vP={},pP;function QH(){if(pP)return vP;pP=1;var n=_e();return n("asyncIterator"),vP}var gP={},yP;function NN(){if(yP)return gP;yP=1;var n=_e();return n("dispose"),gP}var mP={},bP;function e3(){if(bP)return mP;bP=1;var n=_e();return n("hasInstance"),mP}var _P={},wP;function t3(){if(wP)return _P;wP=1;var n=_e();return n("isConcatSpreadable"),_P}var EP={},SP;function kN(){if(SP)return EP;SP=1;var n=_e();return n("iterator"),EP}var OP={},IP;function r3(){if(IP)return OP;IP=1;var n=_e();return n("match"),OP}var $P={},TP;function i3(){if(TP)return $P;TP=1;var n=_e();return n("matchAll"),$P}var PP={},RP;function n3(){if(RP)return PP;RP=1;var n=_e();return n("replace"),PP}var qP={},CP;function s3(){if(CP)return qP;CP=1;var n=_e();return n("search"),qP}var xP={},DP;function o3(){if(DP)return xP;DP=1;var n=_e();return n("species"),xP}var AP={},MP;function a3(){if(MP)return AP;MP=1;var n=_e();return n("split"),AP}var FP={},NP;function BN(){if(NP)return FP;NP=1;var n=_e(),e=CN();return n("toPrimitive"),e(),FP}var kP={},BP;function u3(){if(BP)return kP;BP=1;var n=ut(),e=_e(),t=si();return e("toStringTag"),t(n("Symbol"),"Symbol"),kP}var jP={},LP;function l3(){if(LP)return jP;LP=1;var n=_e();return n("unscopables"),jP}var zP={},WP;function d3(){if(WP)return zP;WP=1;var n=ge(),e=si();return e(n.JSON,"JSON",!0),zP}var Kf,HP;function c3(){if(HP)return Kf;HP=1,qN(),MN(),FN(),QH(),NN(),e3(),t3(),kN(),r3(),i3(),n3(),s3(),o3(),a3(),BN(),u3(),l3(),d3();var n=oe();return Kf=n.Symbol,Kf}var UP={},Yf,VP;function lb(){return VP||(VP=1,Yf=function(){}),Yf}var Xf,GP;function rn(){return GP||(GP=1,Xf={}),Xf}var Jf,KP;function h3(){if(KP)return Jf;KP=1;var n=Ie(),e=He(),t=Function.prototype,r=n&&Object.getOwnPropertyDescriptor,i=e(t,"name"),s=i&&(function(){}).name==="something",o=i&&(!n||n&&r(t,"name").configurable);return Jf={EXISTS:i,PROPER:s,CONFIGURABLE:o},Jf}var Zf,YP;function jN(){if(YP)return Zf;YP=1;var n=te();return Zf=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Zf}var Qf,XP;function Io(){if(XP)return Qf;XP=1;var n=He(),e=je(),t=lt(),r=Eo(),i=jN(),s=r("IE_PROTO"),o=Object,a=o.prototype;return Qf=i?o.getPrototypeOf:function(u){var l=t(u);if(n(l,s))return l[s];var d=l.constructor;return e(d)&&l instanceof d?d.prototype:l instanceof o?a:null},Qf}var ev,JP;function LN(){if(JP)return ev;JP=1;var n=te(),e=je(),t=Le(),r=fs(),i=Io(),s=vs(),o=xe(),a=Xi(),u=o("iterator"),l=!1,d,c,h;[].keys&&(h=[].keys(),"next"in h?(c=i(i(h)),c!==Object.prototype&&(d=c)):l=!0);var f=!t(d)||n(function(){var v={};return d[u].call(v)!==v});return f?d={}:a&&(d=r(d)),e(d[u])||s(d,u,function(){return this}),ev={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:l},ev}var tv,ZP;function f3(){if(ZP)return tv;ZP=1;var n=LN().IteratorPrototype,e=fs(),t=as(),r=si(),i=rn(),s=function(){return this};return tv=function(o,a,u,l){var d=a+" Iterator";return o.prototype=e(n,{next:t(+!l,u)}),r(o,d,!1,!0),i[d]=s,o},tv}var rv,QP;function v3(){if(QP)return rv;QP=1;var n=re(),e=er();return rv=function(t,r,i){try{return n(e(Object.getOwnPropertyDescriptor(t,r)[i]))}catch{}},rv}var iv,eR;function p3(){if(eR)return iv;eR=1;var n=Le();return iv=function(e){return n(e)||e===null},iv}var nv,tR;function g3(){if(tR)return nv;tR=1;var n=p3(),e=String,t=TypeError;return nv=function(r){if(n(r))return r;throw new t("Can't set "+e(r)+" as a prototype")},nv}var sv,rR;function y3(){if(rR)return sv;rR=1;var n=v3(),e=Le(),t=Qt(),r=g3();return sv=Object.setPrototypeOf||("__proto__"in{}?(function(){var i=!1,s={},o;try{o=n(Object.prototype,"__proto__","set"),o(s,[]),i=s instanceof Array}catch{}return function(u,l){return t(u),r(l),e(u)&&(i?o(u,l):u.__proto__=l),u}})():void 0),sv}var ov,iR;function db(){if(iR)return ov;iR=1;var n=z(),e=ot(),t=Xi(),r=h3(),i=je(),s=f3(),o=Io(),a=y3(),u=si(),l=Zi(),d=vs(),c=xe(),h=rn(),f=LN(),v=r.PROPER,p=r.CONFIGURABLE,b=f.IteratorPrototype,y=f.BUGGY_SAFARI_ITERATORS,g=c("iterator"),S="keys",m="values",w="entries",O=function(){return this};return ov=function(I,_,E,$,T,P,R){s(E,_,$);var C=function(me){if(me===T&&Q)return Q;if(!y&&me&&me in L)return L[me];switch(me){case S:return function(){return new E(this,me)};case m:return function(){return new E(this,me)};case w:return function(){return new E(this,me)}}return function(){return new E(this)}},M=_+" Iterator",K=!1,L=I.prototype,J=L[g]||L["@@iterator"]||T&&L[T],Q=!y&&J||C(T),ae=_==="Array"&&L.entries||J,W,ue,ye;if(ae&&(W=o(ae.call(new I)),W!==Object.prototype&&W.next&&(!t&&o(W)!==b&&(a?a(W,b):i(W[g])||d(W,g,O)),u(W,M,!0,!0),t&&(h[M]=O))),v&&T===m&&J&&J.name!==m&&(!t&&p?l(L,"name",m):(K=!0,Q=function(){return e(J,this)})),T)if(ue={values:C(m),keys:P?Q:C(S),entries:C(w)},R)for(ye in ue)(y||K||!(ye in L))&&d(L,ye,ue[ye]);else n({target:_,proto:!0,forced:y||K},ue);return(!t||R)&&L[g]!==Q&&d(L,g,Q,{name:T}),h[_]=Q,ue},ov}var av,nR;function cb(){return nR||(nR=1,av=function(n,e){return{value:n,done:e}}),av}var uv,sR;function nn(){if(sR)return uv;sR=1;var n=Pt(),e=lb(),t=rn(),r=oi(),i=gt().f,s=db(),o=cb(),a=Xi(),u=Ie(),l="Array Iterator",d=r.set,c=r.getterFor(l);uv=s(Array,"Array",function(f,v){d(this,{type:l,target:n(f),index:0,kind:v})},function(){var f=c(this),v=f.target,p=f.index++;if(!v||p>=v.length)return f.target=null,o(void 0,!0);switch(f.kind){case"keys":return o(p,!1);case"values":return o(v[p],!1)}return o([p,v[p]],!1)},"values");var h=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!a&&u&&h.name!=="values")try{i(h,"name",{value:"values"})}catch{}return uv}var lv,oR;function m3(){return oR||(oR=1,lv={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}),lv}var aR;function sn(){if(aR)return UP;aR=1,nn();var n=m3(),e=ge(),t=si(),r=rn();for(var i in n)t(e[i],i),r[i]=r.Array;return UP}var dv,uR;function zN(){if(uR)return dv;uR=1;var n=c3();return sn(),dv=n,dv}var cv,lR;function b3(){return lR||(lR=1,cv=zN()),cv}var _3=b3(),w3=G(_3),dR={},cR;function E3(){if(cR)return dR;cR=1;var n=z(),e=ni(),t=RN(),r=Le(),i=bo(),s=tr(),o=Pt(),a=wo(),u=xe(),l=hs(),d=en(),c=l("slice"),h=u("species"),f=Array,v=Math.max;return n({target:"Array",proto:!0,forced:!c},{slice:function(b,y){var g=o(this),S=s(g),m=i(b,S),w=i(y===void 0?S:y,S),O,I,_;if(e(g)&&(O=g.constructor,t(O)&&(O===f||e(O.prototype))?O=void 0:r(O)&&(O=O[h],O===null&&(O=void 0)),O===f||O===void 0))return d(g,m,w);for(I=new(O===void 0?f:O)(v(w-m,0)),_=0;m<w;m++,_++)m in g&&a(I,_,g[m]);return I.length=_,I}}),dR}var hv,hR;function S3(){if(hR)return hv;hR=1,E3();var n=Ue();return hv=n("Array","slice"),hv}var fv,fR;function O3(){if(fR)return fv;fR=1;var n=Ce(),e=S3(),t=Array.prototype;return fv=function(r){var i=r.slice;return r===t||n(t,r)&&i===t.slice?e:i},fv}var vv,vR;function I3(){if(vR)return vv;vR=1;var n=O3();return vv=n,vv}var pv,pR;function $3(){return pR||(pR=1,pv=I3()),pv}var T3=$3(),qt=G(T3),gv,gR;function P3(){if(gR)return gv;gR=1;var n=ut(),e=re(),t=So(),r=_o(),i=kt(),s=e([].concat);return gv=n("Reflect","ownKeys")||function(a){var u=t.f(i(a)),l=r.f;return l?s(u,l(a)):u},gv}var yR={},mR;function R3(){if(mR)return yR;mR=1;var n=z(),e=ni();return n({target:"Array",stat:!0},{isArray:e}),yR}var yv,bR;function q3(){if(bR)return yv;bR=1,R3();var n=oe();return yv=n.Array.isArray,yv}var mv,_R;function C3(){if(_R)return mv;_R=1;var n=q3();return mv=n,mv}var bv,wR;function x3(){return wR||(wR=1,bv=C3()),bv}var D3=x3(),Se=G(D3),ER={},SR;function A3(){if(SR)return ER;SR=1;var n=z(),e=_r().map,t=hs(),r=t("map");return n({target:"Array",proto:!0,forced:!r},{map:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),ER}var _v,OR;function M3(){if(OR)return _v;OR=1,A3();var n=Ue();return _v=n("Array","map"),_v}var wv,IR;function F3(){if(IR)return wv;IR=1;var n=Ce(),e=M3(),t=Array.prototype;return wv=function(r){var i=r.map;return r===t||n(t,r)&&i===t.map?e:i},wv}var Ev,$R;function N3(){if($R)return Ev;$R=1;var n=F3();return Ev=n,Ev}var Sv,TR;function k3(){return TR||(TR=1,Sv=N3()),Sv}var B3=k3(),qi=G(B3),PR={},RR;function j3(){if(RR)return PR;RR=1;var n=z(),e=lt(),t=cs(),r=te(),i=r(function(){t(1)});return n({target:"Object",stat:!0,forced:i},{keys:function(o){return t(e(o))}}),PR}var Ov,qR;function L3(){if(qR)return Ov;qR=1,j3();var n=oe();return Ov=n.Object.keys,Ov}var Iv,CR;function z3(){if(CR)return Iv;CR=1;var n=L3();return Iv=n,Iv}var $v,xR;function W3(){return xR||(xR=1,$v=z3()),$v}var H3=W3(),Ee=G(H3),DR={},AR;function U3(){if(AR)return DR;AR=1;var n=z(),e=re(),t=Date,r=e(t.prototype.getTime);return n({target:"Date",stat:!0},{now:function(){return r(new t)}}),DR}var Tv,MR;function V3(){if(MR)return Tv;MR=1,U3();var n=oe();return Tv=n.Date.now,Tv}var Pv,FR;function G3(){if(FR)return Pv;FR=1;var n=V3();return Pv=n,Pv}var Rv,NR;function K3(){return NR||(NR=1,Rv=G3()),Rv}var Y3=K3(),Ws=G(Y3),kR={},qv,BR;function on(){if(BR)return qv;BR=1;var n=te();return qv=function(e,t){var r=[][e];return!!r&&n(function(){r.call(null,t||function(){return 1},1)})},qv}var Cv,jR;function X3(){if(jR)return Cv;jR=1;var n=_r().forEach,e=on(),t=e("forEach");return Cv=t?[].forEach:function(i){return n(this,i,arguments.length>1?arguments[1]:void 0)},Cv}var LR;function J3(){if(LR)return kR;LR=1;var n=z(),e=X3();return n({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),kR}var xv,zR;function Z3(){if(zR)return xv;zR=1,J3();var n=Ue();return xv=n("Array","forEach"),xv}var Dv,WR;function Q3(){if(WR)return Dv;WR=1;var n=Z3();return Dv=n,Dv}var Av,HR;function e5(){if(HR)return Av;HR=1;var n=tn(),e=He(),t=Ce(),r=Q3(),i=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Av=function(o){var a=o.forEach;return o===i||t(i,o)&&a===i.forEach||e(s,n(o))?r:a},Av}var Mv,UR;function t5(){return UR||(UR=1,Mv=e5()),Mv}var r5=t5(),le=G(r5),VR={},GR;function i5(){if(GR)return VR;GR=1;var n=z(),e=re(),t=ni(),r=e([].reverse),i=[1,2];return n({target:"Array",proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return t(this)&&(this.length=this.length),r(this)}}),VR}var Fv,KR;function n5(){if(KR)return Fv;KR=1,i5();var n=Ue();return Fv=n("Array","reverse"),Fv}var Nv,YR;function s5(){if(YR)return Nv;YR=1;var n=Ce(),e=n5(),t=Array.prototype;return Nv=function(r){var i=r.reverse;return r===t||n(t,r)&&i===t.reverse?e:i},Nv}var kv,XR;function o5(){if(XR)return kv;XR=1;var n=s5();return kv=n,kv}var Bv,JR;function a5(){return JR||(JR=1,Bv=o5()),Bv}var u5=a5(),Nr=G(u5),ZR={},jv,QR;function l5(){if(QR)return jv;QR=1;var n=Ie(),e=ni(),t=TypeError,r=Object.getOwnPropertyDescriptor,i=n&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(s){return s instanceof TypeError}})();return jv=i?function(s,o){if(e(s)&&!r(s,"length").writable)throw new t("Cannot set read only .length");return s.length=o}:function(s,o){return s.length=o},jv}var Lv,eq;function WN(){if(eq)return Lv;eq=1;var n=Yi(),e=TypeError;return Lv=function(t,r){if(!delete t[r])throw new e("Cannot delete property "+n(r)+" of "+n(t))},Lv}var tq;function d5(){if(tq)return ZR;tq=1;var n=z(),e=lt(),t=bo(),r=Qi(),i=tr(),s=l5(),o=PN(),a=sb(),u=wo(),l=WN(),d=hs(),c=d("splice"),h=Math.max,f=Math.min;return n({target:"Array",proto:!0,forced:!c},{splice:function(p,b){var y=e(this),g=i(y),S=t(p,g),m=arguments.length,w,O,I,_,E,$;for(m===0?w=O=0:m===1?(w=0,O=g-S):(w=m-2,O=f(h(r(b),0),g-S)),o(g+w-O),I=a(y,O),_=0;_<O;_++)E=S+_,E in y&&u(I,_,y[E]);if(I.length=O,w<O){for(_=S;_<g-O;_++)E=_+O,$=_+w,E in y?y[$]=y[E]:l(y,$);for(_=g;_>g-O+w;_--)l(y,_-1)}else if(w>O)for(_=g-O;_>S;_--)E=_+O-1,$=_+w-1,E in y?y[$]=y[E]:l(y,$);for(_=0;_<w;_++)y[_+S]=arguments[_+2];return s(y,g-O+w),I}}),ZR}var zv,rq;function c5(){if(rq)return zv;rq=1,d5();var n=Ue();return zv=n("Array","splice"),zv}var Wv,iq;function h5(){if(iq)return Wv;iq=1;var n=Ce(),e=c5(),t=Array.prototype;return Wv=function(r){var i=r.splice;return r===t||n(t,r)&&i===t.splice?e:i},Wv}var Hv,nq;function f5(){if(nq)return Hv;nq=1;var n=h5();return Hv=n,Hv}var Uv,sq;function v5(){return sq||(sq=1,Uv=f5()),Uv}var p5=v5(),Ut=G(p5),oq={},aq;function g5(){if(aq)return oq;aq=1;var n=z(),e=tb().includes,t=te(),r=lb(),i=t(function(){return!Array(1).includes()});return n({target:"Array",proto:!0,forced:i},{includes:function(o){return e(this,o,arguments.length>1?arguments[1]:void 0)}}),r("includes"),oq}var Vv,uq;function y5(){if(uq)return Vv;uq=1,g5();var n=Ue();return Vv=n("Array","includes"),Vv}var lq={},Gv,dq;function m5(){if(dq)return Gv;dq=1;var n=Le(),e=Nt(),t=xe(),r=t("match");return Gv=function(i){var s;return n(i)&&((s=i[r])!==void 0?!!s:e(i)==="RegExp")},Gv}var Kv,cq;function b5(){if(cq)return Kv;cq=1;var n=m5(),e=TypeError;return Kv=function(t){if(n(t))throw new e("The method doesn't accept regular expressions");return t},Kv}var Yv,hq;function _5(){if(hq)return Yv;hq=1;var n=xe(),e=n("match");return Yv=function(t){var r=/./;try{"/./"[t](r)}catch{try{return r[e]=!1,"/./"[t](r)}catch{}}return!1},Yv}var fq;function w5(){if(fq)return lq;fq=1;var n=z(),e=re(),t=b5(),r=Qt(),i=yt(),s=_5(),o=e("".indexOf);return n({target:"String",proto:!0,forced:!s("includes")},{includes:function(u){return!!~o(i(r(this)),i(t(u)),arguments.length>1?arguments[1]:void 0)}}),lq}var Xv,vq;function E5(){if(vq)return Xv;vq=1,w5();var n=Ue();return Xv=n("String","includes"),Xv}var Jv,pq;function S5(){if(pq)return Jv;pq=1;var n=Ce(),e=y5(),t=E5(),r=Array.prototype,i=String.prototype;return Jv=function(s){var o=s.includes;return s===r||n(r,s)&&o===r.includes?e:typeof s=="string"||s===i||n(i,s)&&o===i.includes?t:o},Jv}var Zv,gq;function O5(){if(gq)return Zv;gq=1;var n=S5();return Zv=n,Zv}var Qv,yq;function I5(){return yq||(yq=1,Qv=O5()),Qv}var $5=I5(),ur=G($5),mq={},bq;function T5(){if(bq)return mq;bq=1;var n=z(),e=te(),t=lt(),r=Io(),i=jN(),s=e(function(){r(1)});return n({target:"Object",stat:!0,forced:s,sham:!i},{getPrototypeOf:function(a){return r(t(a))}}),mq}var ep,_q;function P5(){if(_q)return ep;_q=1,T5();var n=oe();return ep=n.Object.getPrototypeOf,ep}var tp,wq;function R5(){if(wq)return tp;wq=1;var n=P5();return tp=n,tp}var rp,Eq;function q5(){return Eq||(Eq=1,rp=R5()),rp}var C5=q5(),Sq=G(C5),ip,Oq;function x5(){if(Oq)return ip;Oq=1,qN();var n=Ue();return ip=n("Array","concat"),ip}var np,Iq;function D5(){if(Iq)return np;Iq=1;var n=Ce(),e=x5(),t=Array.prototype;return np=function(r){var i=r.concat;return r===t||n(t,r)&&i===t.concat?e:i},np}var sp,$q;function A5(){if($q)return sp;$q=1;var n=D5();return sp=n,sp}var op,Tq;function M5(){return Tq||(Tq=1,op=A5()),op}var F5=M5(),N5=G(F5),Pq={},Rq;function k5(){if(Rq)return Pq;Rq=1;var n=z(),e=_r().filter,t=hs(),r=t("filter");return n({target:"Array",proto:!0,forced:!r},{filter:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),Pq}var ap,qq;function B5(){if(qq)return ap;qq=1,k5();var n=Ue();return ap=n("Array","filter"),ap}var up,Cq;function j5(){if(Cq)return up;Cq=1;var n=Ce(),e=B5(),t=Array.prototype;return up=function(r){var i=r.filter;return r===t||n(t,r)&&i===t.filter?e:i},up}var lp,xq;function L5(){if(xq)return lp;xq=1;var n=j5();return lp=n,lp}var dp,Dq;function z5(){return Dq||(Dq=1,dp=L5()),dp}var W5=z5(),tt=G(W5),Aq={},cp,Mq;function H5(){if(Mq)return cp;Mq=1;var n=Ie(),e=te(),t=re(),r=Io(),i=cs(),s=Pt(),o=vo().f,a=t(o),u=t([].push),l=n&&e(function(){var c=Object.create(null);return c[2]=2,!a(c,2)}),d=function(c){return function(h){for(var f=s(h),v=i(f),p=l&&r(f)===null,b=v.length,y=0,g=[],S;b>y;)S=v[y++],(!n||(p?S in f:a(f,S)))&&u(g,c?[S,f[S]]:f[S]);return g}};return cp={entries:d(!0),values:d(!1)},cp}var Fq;function U5(){if(Fq)return Aq;Fq=1;var n=z(),e=H5().values;return n({target:"Object",stat:!0},{values:function(r){return e(r)}}),Aq}var hp,Nq;function V5(){if(Nq)return hp;Nq=1,U5();var n=oe();return hp=n.Object.values,hp}var fp,kq;function G5(){if(kq)return fp;kq=1;var n=V5();return fp=n,fp}var vp,Bq;function K5(){return Bq||(Bq=1,vp=G5()),vp}var Y5=K5(),X5=G(Y5),jq={},pp,Lq;function hb(){return Lq||(Lq=1,pp=`
|
|
57
|
+
\v\f\r \u2028\u2029\uFEFF`),pp}var gp,zq;function HN(){if(zq)return gp;zq=1;var n=re(),e=Qt(),t=yt(),r=hb(),i=n("".replace),s=RegExp("^["+r+"]+"),o=RegExp("(^|[^"+r+"])["+r+"]+$"),a=function(u){return function(l){var d=t(e(l));return u&1&&(d=i(d,s,"")),u&2&&(d=i(d,o,"$1")),d}};return gp={start:a(1),end:a(2),trim:a(3)},gp}var yp,Wq;function J5(){if(Wq)return yp;Wq=1;var n=ge(),e=te(),t=re(),r=yt(),i=HN().trim,s=hb(),o=n.parseInt,a=n.Symbol,u=a&&a.iterator,l=/^[+-]?0x/i,d=t(l.exec),c=o(s+"08")!==8||o(s+"0x16")!==22||u&&!e(function(){o(Object(u))});return yp=c?function(f,v){var p=i(r(f));return o(p,v>>>0||(d(l,p)?16:10))}:o,yp}var Hq;function Z5(){if(Hq)return jq;Hq=1;var n=z(),e=J5();return n({global:!0,forced:parseInt!==e},{parseInt:e}),jq}var mp,Uq;function Q5(){if(Uq)return mp;Uq=1,Z5();var n=oe();return mp=n.parseInt,mp}var bp,Vq;function eU(){if(Vq)return bp;Vq=1;var n=Q5();return bp=n,bp}var _p,Gq;function tU(){return Gq||(Gq=1,_p=eU()),_p}var rU=tU(),Ot=G(rU),Kq={},Yq;function iU(){if(Yq)return Kq;Yq=1;var n=z(),e=Jm(),t=tb().indexOf,r=on(),i=e([].indexOf),s=!!i&&1/i([1],1,-0)<0,o=s||!r("indexOf");return n({target:"Array",proto:!0,forced:o},{indexOf:function(u){var l=arguments.length>1?arguments[1]:void 0;return s?i(this,u,l)||0:t(this,u,l)}}),Kq}var wp,Xq;function nU(){if(Xq)return wp;Xq=1,iU();var n=Ue();return wp=n("Array","indexOf"),wp}var Ep,Jq;function sU(){if(Jq)return Ep;Jq=1;var n=Ce(),e=nU(),t=Array.prototype;return Ep=function(r){var i=r.indexOf;return r===t||n(t,r)&&i===t.indexOf?e:i},Ep}var Sp,Zq;function oU(){if(Zq)return Sp;Zq=1;var n=sU();return Sp=n,Sp}var Op,Qq;function aU(){return Qq||(Qq=1,Op=oU()),Op}var uU=aU(),ne=G(uU),eC={},tC;function lU(){if(tC)return eC;tC=1;var n=z(),e=Ie(),t=fs();return n({target:"Object",stat:!0,sham:!e},{create:t}),eC}var Ip,rC;function dU(){if(rC)return Ip;rC=1,lU();var n=oe(),e=n.Object;return Ip=function(r,i){return e.create(r,i)},Ip}var $p,iC;function cU(){if(iC)return $p;iC=1;var n=dU();return $p=n,$p}var Tp,nC;function hU(){return nC||(nC=1,Tp=cU()),Tp}var fU=hU(),kr=G(fU),sC={},Pp,oC;function vU(){if(oC)return Pp;oC=1;var n=Qi(),e=yt(),t=Qt(),r=RangeError;return Pp=function(s){var o=e(t(this)),a="",u=n(s);if(u<0||u===1/0)throw new r("Wrong number of repetitions");for(;u>0;(u>>>=1)&&(o+=o))u&1&&(a+=o);return a},Pp}var Rp,aC;function pU(){if(aC)return Rp;aC=1;var n=re(),e=EN(),t=yt(),r=vU(),i=Qt(),s=n(r),o=n("".slice),a=Math.ceil,u=function(l){return function(d,c,h){var f=t(i(d)),v=e(c),p=f.length,b=h===void 0?" ":t(h),y,g;return v<=p||b===""?f:(y=v-p,g=s(b,a(y/b.length)),g.length>y&&(g=o(g,0,y)),l?f+g:g+f)}};return Rp={start:u(!1),end:u(!0)},Rp}var qp,uC;function gU(){if(uC)return qp;uC=1;var n=re(),e=te(),t=pU().start,r=RangeError,i=isFinite,s=Math.abs,o=Date.prototype,a=o.toISOString,u=n(o.getTime),l=n(o.getUTCDate),d=n(o.getUTCFullYear),c=n(o.getUTCHours),h=n(o.getUTCMilliseconds),f=n(o.getUTCMinutes),v=n(o.getUTCMonth),p=n(o.getUTCSeconds);return qp=e(function(){return a.call(new Date(-5e13-1))!=="0385-07-25T07:06:39.999Z"})||!e(function(){a.call(new Date(NaN))})?function(){if(!i(u(this)))throw new r("Invalid time value");var y=this,g=d(y),S=h(y),m=g<0?"-":g>9999?"+":"";return m+t(s(g),m?6:4,0)+"-"+t(v(y)+1,2,0)+"-"+t(l(y),2,0)+"T"+t(c(y),2,0)+":"+t(f(y),2,0)+":"+t(p(y),2,0)+"."+t(S,3,0)+"Z"}:a,qp}var lC;function yU(){if(lC)return sC;lC=1;var n=z(),e=ot(),t=lt(),r=mN(),i=gU(),s=Nt(),o=te(),a=o(function(){return new Date(NaN).toJSON()!==null||e(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1});return n({target:"Date",proto:!0,forced:a},{toJSON:function(l){var d=t(this),c=r(d,"number");return typeof c=="number"&&!isFinite(c)?null:!("toISOString"in d)&&s(d)==="Date"?e(i,d):d.toISOString()}}),sC}var Cp,dC;function mU(){if(dC)return Cp;dC=1,yU(),AN();var n=oe(),e=fo();return n.JSON||(n.JSON={stringify:JSON.stringify}),Cp=function(r,i,s){return e(n.JSON.stringify,null,arguments)},Cp}var xp,cC;function bU(){if(cC)return xp;cC=1;var n=mU();return xp=n,xp}var Dp,hC;function _U(){return hC||(hC=1,Dp=bU()),Dp}var wU=_U(),ps=G(wU),fC={},vC={},Ap,pC;function UN(){if(pC)return Ap;pC=1;var n=ge(),e=Gi(),t=Nt(),r=function(i){return e.slice(0,i.length)===i};return Ap=(function(){return r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":n.Bun&&typeof Bun.version=="string"?"BUN":n.Deno&&typeof Deno.version=="object"?"DENO":t(n.process)==="process"?"NODE":n.window&&n.document?"BROWSER":"REST"})(),Ap}var Mp,gC;function EU(){if(gC)return Mp;gC=1;var n=TypeError;return Mp=function(e,t){if(e<t)throw new n("Not enough arguments");return e},Mp}var Fp,yC;function VN(){if(yC)return Fp;yC=1;var n=ge(),e=fo(),t=je(),r=UN(),i=Gi(),s=en(),o=EU(),a=n.Function,u=/MSIE .\./.test(i)||r==="BUN"&&(function(){var l=n.Bun.version.split(".");return l.length<3||l[0]==="0"&&(l[1]<3||l[1]==="3"&&l[2]==="0")})();return Fp=function(l,d){var c=d?2:1;return u?function(h,f){var v=o(arguments.length,1)>c,p=t(h)?h:a(h),b=v?s(arguments,c):[],y=v?function(){e(p,this,b)}:p;return d?l(y,f):l(y)}:l},Fp}var mC;function SU(){if(mC)return vC;mC=1;var n=z(),e=ge(),t=VN(),r=t(e.setInterval,!0);return n({global:!0,bind:!0,forced:e.setInterval!==r},{setInterval:r}),vC}var bC={},_C;function OU(){if(_C)return bC;_C=1;var n=z(),e=ge(),t=VN(),r=t(e.setTimeout,!0);return n({global:!0,bind:!0,forced:e.setTimeout!==r},{setTimeout:r}),bC}var wC;function GN(){return wC||(wC=1,SU(),OU()),fC}var Np,EC;function IU(){if(EC)return Np;EC=1,GN();var n=oe();return Np=n.setTimeout,Np}var kp,SC;function $U(){return SC||(SC=1,kp=IU()),kp}var TU=$U(),Vt=G(TU),OC={},Bp,IC;function PU(){if(IC)return Bp;IC=1;var n=lt(),e=bo(),t=tr();return Bp=function(i){for(var s=n(this),o=t(s),a=arguments.length,u=e(a>1?arguments[1]:void 0,o),l=a>2?arguments[2]:void 0,d=l===void 0?o:e(l,o);d>u;)s[u++]=i;return s},Bp}var $C;function RU(){if($C)return OC;$C=1;var n=z(),e=PU(),t=lb();return n({target:"Array",proto:!0},{fill:e}),t("fill"),OC}var jp,TC;function qU(){if(TC)return jp;TC=1,RU();var n=Ue();return jp=n("Array","fill"),jp}var Lp,PC;function CU(){if(PC)return Lp;PC=1;var n=Ce(),e=qU(),t=Array.prototype;return Lp=function(r){var i=r.fill;return r===t||n(t,r)&&i===t.fill?e:i},Lp}var zp,RC;function xU(){if(RC)return zp;RC=1;var n=CU();return zp=n,zp}var Wp,qC;function DU(){return qC||(qC=1,Wp=xU()),Wp}var AU=DU(),gs=G(AU);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
|
|
58
|
+
* http://naver.github.io/egjs
|
|
59
|
+
*
|
|
60
|
+
* Forked By Naver egjs
|
|
61
|
+
* Copyright (c) hammerjs
|
|
62
|
+
* Licensed under the MIT license */function $t(){return $t=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},$t.apply(this,arguments)}function mt(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}function Rs(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}var gm;typeof Object.assign!="function"?gm=function(e){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1;r<arguments.length;r++){var i=arguments[r];if(i!=null)for(var s in i)i.hasOwnProperty(s)&&(t[s]=i[s])}return t}:gm=Object.assign;var Ur=gm,CC=["","webkit","Moz","MS","ms","o"],MU=typeof document>"u"?{style:{}}:document.createElement("div"),FU="function",wi=Math.round,Vr=Math.abs,fb=Date.now;function $o(n,e){for(var t,r,i=e[0].toUpperCase()+e.slice(1),s=0;s<CC.length;){if(t=CC[s],r=t?t+i:e,r in n)return r;s++}}var Gt;typeof window>"u"?Gt={}:Gt=window;var KN=$o(MU.style,"touchAction"),YN=KN!==void 0;function NU(){if(!YN)return!1;var n={},e=Gt.CSS&&Gt.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return n[t]=e?Gt.CSS.supports("touch-action",t):!0}),n}var XN="compute",JN="auto",ym="manipulation",Br="none",Nn="pan-x",kn="pan-y",qs=NU(),kU=/mobile|tablet|ip(ad|hone|od)|android/i,ZN="ontouchstart"in Gt,BU=$o(Gt,"PointerEvent")!==void 0,jU=ZN&&kU.test(navigator.userAgent),ys="touch",LU="pen",vb="mouse",zU="kinect",WU=25,Ze=1,ai=2,Pe=4,it=8,Hs=1,ms=2,bs=4,_s=8,Ci=16,Mt=ms|bs,jr=_s|Ci,QN=Mt|jr,ek=["x","y"],Us=["clientX","clientY"];function Kt(n,e,t){var r;if(n)if(n.forEach)n.forEach(e,t);else if(n.length!==void 0)for(r=0;r<n.length;)e.call(t,n[r],r,n),r++;else for(r in n)n.hasOwnProperty(r)&&e.call(t,n[r],r,n)}function To(n,e){return typeof n===FU?n.apply(e&&e[0]||void 0,e):n}function Dr(n,e){return n.indexOf(e)>-1}function HU(n){if(Dr(n,Br))return Br;var e=Dr(n,Nn),t=Dr(n,kn);return e&&t?Br:e||t?e?Nn:kn:Dr(n,ym)?ym:JN}var tk=(function(){function n(t,r){this.manager=t,this.set(r)}var e=n.prototype;return e.set=function(r){r===XN&&(r=this.compute()),YN&&this.manager.element.style&&qs[r]&&(this.manager.element.style[KN]=r),this.actions=r.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var r=[];return Kt(this.manager.recognizers,function(i){To(i.options.enable,[i])&&(r=r.concat(i.getTouchAction()))}),HU(r.join(" "))},e.preventDefaults=function(r){var i=r.srcEvent,s=r.offsetDirection;if(this.manager.session.prevented){i.preventDefault();return}var o=this.actions,a=Dr(o,Br)&&!qs[Br],u=Dr(o,kn)&&!qs[kn],l=Dr(o,Nn)&&!qs[Nn];if(a){var d=r.pointers.length===1,c=r.distance<2,h=r.deltaTime<250;if(d&&c&&h)return}if(!(l&&u)&&(a||u&&s&Mt||l&&s&jr))return this.preventSrc(i)},e.preventSrc=function(r){this.manager.session.prevented=!0,r.preventDefault()},n})();function pb(n,e){for(;n;){if(n===e)return!0;n=n.parentNode}return!1}function rk(n){var e=n.length;if(e===1)return{x:wi(n[0].clientX),y:wi(n[0].clientY)};for(var t=0,r=0,i=0;i<e;)t+=n[i].clientX,r+=n[i].clientY,i++;return{x:wi(t/e),y:wi(r/e)}}function xC(n){for(var e=[],t=0;t<n.pointers.length;)e[t]={clientX:wi(n.pointers[t].clientX),clientY:wi(n.pointers[t].clientY)},t++;return{timeStamp:fb(),pointers:e,center:rk(e),deltaX:n.deltaX,deltaY:n.deltaY}}function Vs(n,e,t){t||(t=ek);var r=e[t[0]]-n[t[0]],i=e[t[1]]-n[t[1]];return Math.sqrt(r*r+i*i)}function mm(n,e,t){t||(t=ek);var r=e[t[0]]-n[t[0]],i=e[t[1]]-n[t[1]];return Math.atan2(i,r)*180/Math.PI}function ik(n,e){return n===e?Hs:Vr(n)>=Vr(e)?n<0?ms:bs:e<0?_s:Ci}function UU(n,e){var t=e.center,r=n.offsetDelta||{},i=n.prevDelta||{},s=n.prevInput||{};(e.eventType===Ze||s.eventType===Pe)&&(i=n.prevDelta={x:s.deltaX||0,y:s.deltaY||0},r=n.offsetDelta={x:t.x,y:t.y}),e.deltaX=i.x+(t.x-r.x),e.deltaY=i.y+(t.y-r.y)}function nk(n,e,t){return{x:e/n||0,y:t/n||0}}function VU(n,e){return Vs(e[0],e[1],Us)/Vs(n[0],n[1],Us)}function GU(n,e){return mm(e[1],e[0],Us)+mm(n[1],n[0],Us)}function KU(n,e){var t=n.lastInterval||e,r=e.timeStamp-t.timeStamp,i,s,o,a;if(e.eventType!==it&&(r>WU||t.velocity===void 0)){var u=e.deltaX-t.deltaX,l=e.deltaY-t.deltaY,d=nk(r,u,l);s=d.x,o=d.y,i=Vr(d.x)>Vr(d.y)?d.x:d.y,a=ik(u,l),n.lastInterval=e}else i=t.velocity,s=t.velocityX,o=t.velocityY,a=t.direction;e.velocity=i,e.velocityX=s,e.velocityY=o,e.direction=a}function YU(n,e){var t=n.session,r=e.pointers,i=r.length;t.firstInput||(t.firstInput=xC(e)),i>1&&!t.firstMultiple?t.firstMultiple=xC(e):i===1&&(t.firstMultiple=!1);var s=t.firstInput,o=t.firstMultiple,a=o?o.center:s.center,u=e.center=rk(r);e.timeStamp=fb(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=mm(a,u),e.distance=Vs(a,u),UU(t,e),e.offsetDirection=ik(e.deltaX,e.deltaY);var l=nk(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=Vr(l.x)>Vr(l.y)?l.x:l.y,e.scale=o?VU(o.pointers,r):1,e.rotation=o?GU(o.pointers,r):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,KU(t,e);var d=n.element,c=e.srcEvent,h;c.composedPath?h=c.composedPath()[0]:c.path?h=c.path[0]:h=c.target,pb(h,d)&&(d=h),e.target=d}function XU(n,e,t){var r=t.pointers.length,i=t.changedPointers.length,s=e&Ze&&r-i===0,o=e&(Pe|it)&&r-i===0;t.isFirst=!!s,t.isFinal=!!o,s&&(n.session={}),t.eventType=e,YU(n,t),n.emit("hammer.input",t),n.recognize(t),n.session.prevInput=t}function Bn(n){return n.trim().split(/\s+/g)}function $n(n,e,t){Kt(Bn(e),function(r){n.addEventListener(r,t,!1)})}function Tn(n,e,t){Kt(Bn(e),function(r){n.removeEventListener(r,t,!1)})}function DC(n){var e=n.ownerDocument||n;return e.defaultView||e.parentWindow||window}var an=(function(){function n(t,r){var i=this;this.manager=t,this.callback=r,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(s){To(t.options.enable,[t])&&i.handler(s)},this.init()}var e=n.prototype;return e.handler=function(){},e.init=function(){this.evEl&&$n(this.element,this.evEl,this.domHandler),this.evTarget&&$n(this.target,this.evTarget,this.domHandler),this.evWin&&$n(DC(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Tn(this.element,this.evEl,this.domHandler),this.evTarget&&Tn(this.target,this.evTarget,this.domHandler),this.evWin&&Tn(DC(this.element),this.evWin,this.domHandler)},n})();function Gr(n,e,t){if(n.indexOf&&!t)return n.indexOf(e);for(var r=0;r<n.length;){if(t&&n[r][t]==e||!t&&n[r]===e)return r;r++}return-1}var JU={pointerdown:Ze,pointermove:ai,pointerup:Pe,pointercancel:it,pointerout:it},ZU={2:ys,3:LU,4:vb,5:zU},sk="pointerdown",ok="pointermove pointerup pointercancel";Gt.MSPointerEvent&&!Gt.PointerEvent&&(sk="MSPointerDown",ok="MSPointerMove MSPointerUp MSPointerCancel");var ak=(function(n){mt(e,n);function e(){var r,i=e.prototype;return i.evEl=sk,i.evWin=ok,r=n.apply(this,arguments)||this,r.store=r.manager.session.pointerEvents=[],r}var t=e.prototype;return t.handler=function(i){var s=this.store,o=!1,a=i.type.toLowerCase().replace("ms",""),u=JU[a],l=ZU[i.pointerType]||i.pointerType,d=l===ys,c=Gr(s,i.pointerId,"pointerId");u&Ze&&(i.button===0||d)?c<0&&(s.push(i),c=s.length-1):u&(Pe|it)&&(o=!0),!(c<0)&&(s[c]=i,this.callback(this.manager,u,{pointers:s,changedPointers:[i],pointerType:l,srcEvent:i}),o&&s.splice(c,1))},e})(an);function jn(n){return Array.prototype.slice.call(n,0)}function gb(n,e,t){for(var r=[],i=[],s=0;s<n.length;){var o=e?n[s][e]:n[s];Gr(i,o)<0&&r.push(n[s]),i[s]=o,s++}return t&&(e?r=r.sort(function(a,u){return a[e]>u[e]}):r=r.sort()),r}var QU={touchstart:Ze,touchmove:ai,touchend:Pe,touchcancel:it},eV="touchstart touchmove touchend touchcancel",yb=(function(n){mt(e,n);function e(){var r;return e.prototype.evTarget=eV,r=n.apply(this,arguments)||this,r.targetIds={},r}var t=e.prototype;return t.handler=function(i){var s=QU[i.type],o=tV.call(this,i,s);o&&this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:ys,srcEvent:i})},e})(an);function tV(n,e){var t=jn(n.touches),r=this.targetIds;if(e&(Ze|ai)&&t.length===1)return r[t[0].identifier]=!0,[t,t];var i,s,o=jn(n.changedTouches),a=[],u=this.target;if(s=t.filter(function(l){return pb(l.target,u)}),e===Ze)for(i=0;i<s.length;)r[s[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&a.push(o[i]),e&(Pe|it)&&delete r[o[i].identifier],i++;if(a.length)return[gb(s.concat(a),"identifier",!0),a]}var rV={mousedown:Ze,mousemove:ai,mouseup:Pe},iV="mousedown",nV="mousemove mouseup",mb=(function(n){mt(e,n);function e(){var r,i=e.prototype;return i.evEl=iV,i.evWin=nV,r=n.apply(this,arguments)||this,r.pressed=!1,r}var t=e.prototype;return t.handler=function(i){var s=rV[i.type];s&Ze&&i.button===0&&(this.pressed=!0),s&ai&&i.which!==1&&(s=Pe),this.pressed&&(s&Pe&&(this.pressed=!1),this.callback(this.manager,s,{pointers:[i],changedPointers:[i],pointerType:vb,srcEvent:i}))},e})(an),sV=2500,AC=25;function MC(n){var e=n.changedPointers,t=e[0];if(t.identifier===this.primaryTouch){var r={x:t.clientX,y:t.clientY},i=this.lastTouches;this.lastTouches.push(r);var s=function(){var a=i.indexOf(r);a>-1&&i.splice(a,1)};setTimeout(s,sV)}}function oV(n,e){n&Ze?(this.primaryTouch=e.changedPointers[0].identifier,MC.call(this,e)):n&(Pe|it)&&MC.call(this,e)}function aV(n){for(var e=n.srcEvent.clientX,t=n.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],s=Math.abs(e-i.x),o=Math.abs(t-i.y);if(s<=AC&&o<=AC)return!0}return!1}var uk=(function(){var n=(function(e){mt(t,e);function t(i,s){var o;return o=e.call(this,i,s)||this,o.handler=function(a,u,l){var d=l.pointerType===ys,c=l.pointerType===vb;if(!(c&&l.sourceCapabilities&&l.sourceCapabilities.firesTouchEvents)){if(d)oV.call(Rs(Rs(o)),u,l);else if(c&&aV.call(Rs(Rs(o)),l))return;o.callback(a,u,l)}},o.touch=new yb(o.manager,o.handler),o.mouse=new mb(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}var r=t.prototype;return r.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t})(an);return n})();function uV(n){var e,t=n.options.inputClass;return t?e=t:BU?e=ak:jU?e=yb:ZN?e=uk:e=mb,new e(n,XU)}function Ei(n,e,t){return Array.isArray(n)?(Kt(n,t[e],t),!0):!1}var As=1,ft=2,xi=4,lr=8,Yt=lr,Ln=16,xt=32,lV=1;function dV(){return lV++}function Cs(n,e){var t=e.manager;return t?t.get(n):n}function FC(n){return n&Ln?"cancel":n&lr?"end":n&xi?"move":n&ft?"start":""}var ws=(function(){function n(t){t===void 0&&(t={}),this.options=$t({enable:!0},t),this.id=dV(),this.manager=null,this.state=As,this.simultaneous={},this.requireFail=[]}var e=n.prototype;return e.set=function(r){return Ur(this.options,r),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(r){if(Ei(r,"recognizeWith",this))return this;var i=this.simultaneous;return r=Cs(r,this),i[r.id]||(i[r.id]=r,r.recognizeWith(this)),this},e.dropRecognizeWith=function(r){return Ei(r,"dropRecognizeWith",this)?this:(r=Cs(r,this),delete this.simultaneous[r.id],this)},e.requireFailure=function(r){if(Ei(r,"requireFailure",this))return this;var i=this.requireFail;return r=Cs(r,this),Gr(i,r)===-1&&(i.push(r),r.requireFailure(this)),this},e.dropRequireFailure=function(r){if(Ei(r,"dropRequireFailure",this))return this;r=Cs(r,this);var i=Gr(this.requireFail,r);return i>-1&&this.requireFail.splice(i,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(r){return!!this.simultaneous[r.id]},e.emit=function(r){var i=this,s=this.state;function o(a){i.manager.emit(a,r)}s<lr&&o(i.options.event+FC(s)),o(i.options.event),r.additionalEvent&&o(r.additionalEvent),s>=lr&&o(i.options.event+FC(s))},e.tryEmit=function(r){if(this.canEmit())return this.emit(r);this.state=xt},e.canEmit=function(){for(var r=0;r<this.requireFail.length;){if(!(this.requireFail[r].state&(xt|As)))return!1;r++}return!0},e.recognize=function(r){var i=Ur({},r);if(!To(this.options.enable,[this,i])){this.reset(),this.state=xt;return}this.state&(Yt|Ln|xt)&&(this.state=As),this.state=this.process(i),this.state&(ft|xi|lr|Ln)&&this.tryEmit(i)},e.process=function(r){},e.getTouchAction=function(){},e.reset=function(){},n})(),bm=(function(n){mt(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,$t({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},r))||this,i.pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}var t=e.prototype;return t.getTouchAction=function(){return[ym]},t.process=function(i){var s=this,o=this.options,a=i.pointers.length===o.pointers,u=i.distance<o.threshold,l=i.deltaTime<o.time;if(this.reset(),i.eventType&Ze&&this.count===0)return this.failTimeout();if(u&&l&&a){if(i.eventType!==Pe)return this.failTimeout();var d=this.pTime?i.timeStamp-this.pTime<o.interval:!0,c=!this.pCenter||Vs(this.pCenter,i.center)<o.posThreshold;this.pTime=i.timeStamp,this.pCenter=i.center,!c||!d?this.count=1:this.count+=1,this._input=i;var h=this.count%o.taps;if(h===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){s.state=Yt,s.tryEmit()},o.interval),ft):Yt}return xt},t.failTimeout=function(){var i=this;return this._timer=setTimeout(function(){i.state=xt},this.options.interval),xt},t.reset=function(){clearTimeout(this._timer)},t.emit=function(){this.state===Yt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e})(ws),Di=(function(n){mt(e,n);function e(r){return r===void 0&&(r={}),n.call(this,$t({pointers:1},r))||this}var t=e.prototype;return t.attrTest=function(i){var s=this.options.pointers;return s===0||i.pointers.length===s},t.process=function(i){var s=this.state,o=i.eventType,a=s&(ft|xi),u=this.attrTest(i);return a&&(o&it||!u)?s|Ln:a||u?o&Pe?s|lr:s&ft?s|xi:ft:xt},e})(ws);function lk(n){return n===Ci?"down":n===_s?"up":n===ms?"left":n===bs?"right":""}var bb=(function(n){mt(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,$t({event:"pan",threshold:10,pointers:1,direction:QN},r))||this,i.pX=null,i.pY=null,i}var t=e.prototype;return t.getTouchAction=function(){var i=this.options.direction,s=[];return i&Mt&&s.push(kn),i&jr&&s.push(Nn),s},t.directionTest=function(i){var s=this.options,o=!0,a=i.distance,u=i.direction,l=i.deltaX,d=i.deltaY;return u&s.direction||(s.direction&Mt?(u=l===0?Hs:l<0?ms:bs,o=l!==this.pX,a=Math.abs(i.deltaX)):(u=d===0?Hs:d<0?_s:Ci,o=d!==this.pY,a=Math.abs(i.deltaY))),i.direction=u,o&&a>s.threshold&&u&s.direction},t.attrTest=function(i){return Di.prototype.attrTest.call(this,i)&&(this.state&ft||!(this.state&ft)&&this.directionTest(i))},t.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var s=lk(i.direction);s&&(i.additionalEvent=this.options.event+s),n.prototype.emit.call(this,i)},e})(Di),dk=(function(n){mt(e,n);function e(r){return r===void 0&&(r={}),n.call(this,$t({event:"swipe",threshold:10,velocity:.3,direction:Mt|jr,pointers:1},r))||this}var t=e.prototype;return t.getTouchAction=function(){return bb.prototype.getTouchAction.call(this)},t.attrTest=function(i){var s=this.options.direction,o;return s&(Mt|jr)?o=i.overallVelocity:s&Mt?o=i.overallVelocityX:s&jr&&(o=i.overallVelocityY),n.prototype.attrTest.call(this,i)&&s&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&Vr(o)>this.options.velocity&&i.eventType&Pe},t.emit=function(i){var s=lk(i.offsetDirection);s&&this.manager.emit(this.options.event+s,i),this.manager.emit(this.options.event,i)},e})(Di),ck=(function(n){mt(e,n);function e(r){return r===void 0&&(r={}),n.call(this,$t({event:"pinch",threshold:0,pointers:2},r))||this}var t=e.prototype;return t.getTouchAction=function(){return[Br]},t.attrTest=function(i){return n.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state&ft)},t.emit=function(i){if(i.scale!==1){var s=i.scale<1?"in":"out";i.additionalEvent=this.options.event+s}n.prototype.emit.call(this,i)},e})(Di),hk=(function(n){mt(e,n);function e(r){return r===void 0&&(r={}),n.call(this,$t({event:"rotate",threshold:0,pointers:2},r))||this}var t=e.prototype;return t.getTouchAction=function(){return[Br]},t.attrTest=function(i){return n.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state&ft)},e})(Di),fk=(function(n){mt(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,$t({event:"press",pointers:1,time:251,threshold:9},r))||this,i._timer=null,i._input=null,i}var t=e.prototype;return t.getTouchAction=function(){return[JN]},t.process=function(i){var s=this,o=this.options,a=i.pointers.length===o.pointers,u=i.distance<o.threshold,l=i.deltaTime>o.time;if(this._input=i,!u||!a||i.eventType&(Pe|it)&&!l)this.reset();else if(i.eventType&Ze)this.reset(),this._timer=setTimeout(function(){s.state=Yt,s.tryEmit()},o.time);else if(i.eventType&Pe)return Yt;return xt},t.reset=function(){clearTimeout(this._timer)},t.emit=function(i){this.state===Yt&&(i&&i.eventType&Pe?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=fb(),this.manager.emit(this.options.event,this._input)))},e})(ws),vk={domEvents:!1,touchAction:XN,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},NC=[[hk,{enable:!1}],[ck,{enable:!1},["rotate"]],[dk,{direction:Mt}],[bb,{direction:Mt},["swipe"]],[bm],[bm,{event:"doubletap",taps:2},["tap"]],[fk]],cV=1,kC=2;function BC(n,e){var t=n.element;if(t.style){var r;Kt(n.options.cssProps,function(i,s){r=$o(t.style,s),e?(n.oldCssProps[r]=t.style[r],t.style[r]=i):t.style[r]=n.oldCssProps[r]||""}),e||(n.oldCssProps={})}}function hV(n,e){var t=document.createEvent("Event");t.initEvent(n,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var jC=(function(){function n(t,r){var i=this;this.options=Ur({},vk,r||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=uV(this),this.touchAction=new tk(this,this.options.touchAction),BC(this,!0),Kt(this.options.recognizers,function(s){var o=i.add(new s[0](s[1]));s[2]&&o.recognizeWith(s[2]),s[3]&&o.requireFailure(s[3])},this)}var e=n.prototype;return e.set=function(r){return Ur(this.options,r),r.touchAction&&this.touchAction.update(),r.inputTarget&&(this.input.destroy(),this.input.target=r.inputTarget,this.input.init()),this},e.stop=function(r){this.session.stopped=r?kC:cV},e.recognize=function(r){var i=this.session;if(!i.stopped){this.touchAction.preventDefaults(r);var s,o=this.recognizers,a=i.curRecognizer;(!a||a&&a.state&Yt)&&(i.curRecognizer=null,a=null);for(var u=0;u<o.length;)s=o[u],i.stopped!==kC&&(!a||s===a||s.canRecognizeWith(a))?s.recognize(r):s.reset(),!a&&s.state&(ft|xi|lr)&&(i.curRecognizer=s,a=s),u++}},e.get=function(r){if(r instanceof ws)return r;for(var i=this.recognizers,s=0;s<i.length;s++)if(i[s].options.event===r)return i[s];return null},e.add=function(r){if(Ei(r,"add",this))return this;var i=this.get(r.options.event);return i&&this.remove(i),this.recognizers.push(r),r.manager=this,this.touchAction.update(),r},e.remove=function(r){if(Ei(r,"remove",this))return this;var i=this.get(r);if(r){var s=this.recognizers,o=Gr(s,i);o!==-1&&(s.splice(o,1),this.touchAction.update())}return this},e.on=function(r,i){if(r===void 0||i===void 0)return this;var s=this.handlers;return Kt(Bn(r),function(o){s[o]=s[o]||[],s[o].push(i)}),this},e.off=function(r,i){if(r===void 0)return this;var s=this.handlers;return Kt(Bn(r),function(o){i?s[o]&&s[o].splice(Gr(s[o],i),1):delete s[o]}),this},e.emit=function(r,i){this.options.domEvents&&hV(r,i);var s=this.handlers[r]&&this.handlers[r].slice();if(!(!s||!s.length)){i.type=r,i.preventDefault=function(){i.srcEvent.preventDefault()};for(var o=0;o<s.length;)s[o](i),o++}},e.destroy=function(){this.element&&BC(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},n})(),fV={touchstart:Ze,touchmove:ai,touchend:Pe,touchcancel:it},vV="touchstart",pV="touchstart touchmove touchend touchcancel",gV=(function(n){mt(e,n);function e(){var r,i=e.prototype;return i.evTarget=vV,i.evWin=pV,r=n.apply(this,arguments)||this,r.started=!1,r}var t=e.prototype;return t.handler=function(i){var s=fV[i.type];if(s===Ze&&(this.started=!0),!!this.started){var o=yV.call(this,i,s);s&(Pe|it)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:ys,srcEvent:i})}},e})(an);function yV(n,e){var t=jn(n.touches),r=jn(n.changedTouches);return e&(Pe|it)&&(t=gb(t.concat(r),"identifier",!0)),[t,r]}function pk(n,e,t){var r="DEPRECATED METHOD: "+e+`
|
|
63
|
+
`+t+` AT
|
|
64
|
+
`;return function(){var i=new Error("get-stack-trace"),s=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,r,s),n.apply(this,arguments)}}var gk=pk(function(n,e,t){for(var r=Object.keys(e),i=0;i<r.length;)(!t||t&&n[r[i]]===void 0)&&(n[r[i]]=e[r[i]]),i++;return n},"extend","Use `assign`."),mV=pk(function(n,e){return gk(n,e,!0)},"merge","Use `assign`.");function bV(n,e,t){var r=e.prototype,i;i=n.prototype=Object.create(r),i.constructor=n,i._super=r,t&&Ur(i,t)}function LC(n,e){return function(){return n.apply(e,arguments)}}var yk=(function(){var n=function(t,r){return r===void 0&&(r={}),new jC(t,$t({recognizers:NC.concat()},r))};return n.VERSION="2.0.17-rc",n.DIRECTION_ALL=QN,n.DIRECTION_DOWN=Ci,n.DIRECTION_LEFT=ms,n.DIRECTION_RIGHT=bs,n.DIRECTION_UP=_s,n.DIRECTION_HORIZONTAL=Mt,n.DIRECTION_VERTICAL=jr,n.DIRECTION_NONE=Hs,n.DIRECTION_DOWN=Ci,n.INPUT_START=Ze,n.INPUT_MOVE=ai,n.INPUT_END=Pe,n.INPUT_CANCEL=it,n.STATE_POSSIBLE=As,n.STATE_BEGAN=ft,n.STATE_CHANGED=xi,n.STATE_ENDED=lr,n.STATE_RECOGNIZED=Yt,n.STATE_CANCELLED=Ln,n.STATE_FAILED=xt,n.Manager=jC,n.Input=an,n.TouchAction=tk,n.TouchInput=yb,n.MouseInput=mb,n.PointerEventInput=ak,n.TouchMouseInput=uk,n.SingleTouchInput=gV,n.Recognizer=ws,n.AttrRecognizer=Di,n.Tap=bm,n.Pan=bb,n.Swipe=dk,n.Pinch=ck,n.Rotate=hk,n.Press=fk,n.on=$n,n.off=Tn,n.each=Kt,n.merge=mV,n.extend=gk,n.bindFn=LC,n.assign=Ur,n.inherit=bV,n.bindFn=LC,n.prefixed=$o,n.toArray=jn,n.inArray=Gr,n.uniqueArray=gb,n.splitStr=Bn,n.boolOrFn=To,n.hasParent=pb,n.addEventListeners=$n,n.removeEventListeners=Tn,n.defaults=Ur({},vk,{preset:NC}),n})();yk.defaults;w3("DELETE");function Po(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return _V(e.length?e:[Ws()])}function _V(n){let[e,t,r]=wV(n),i=1;const s=()=>{const o=2091639*e+i*23283064365386963e-26;return e=t,t=r,r=o-(i=o|0)};return s.uint32=()=>s()*4294967296,s.fract53=()=>s()+(s()*2097152|0)*11102230246251565e-32,s.algorithm="Alea",s.seed=n,s.version="0.9",s}function wV(){const n=EV();let e=n(" "),t=n(" "),r=n(" ");for(let i=0;i<arguments.length;i++)e-=n(i<0||arguments.length<=i?void 0:arguments[i]),e<0&&(e+=1),t-=n(i<0||arguments.length<=i?void 0:arguments[i]),t<0&&(t+=1),r-=n(i<0||arguments.length<=i?void 0:arguments[i]),r<0&&(r+=1);return[e,t,r]}function EV(){let n=4022871197;return function(e){const t=e.toString();for(let r=0;r<t.length;r++){n+=t.charCodeAt(r);let i=.02519603282416938*n;n=i>>>0,i-=n,i*=n,n=i>>>0,i-=n,n+=i*4294967296}return(n>>>0)*23283064365386963e-26}}function SV(){const n=()=>{};return{on:n,off:n,destroy:n,emit:n,get(){return{set:n}}}}const _b=typeof window<"u"?window.Hammer||yk:function(){return SV()};function Dt(n){var e;this._cleanupQueue=[],this.active=!1,this._dom={container:n,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)});const t=_b(this._dom.overlay);t.on("tap",D(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{t.destroy()});const r=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];le(r).call(r,i=>{t.on(i,s=>{s.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=i=>{OV(i.target,n)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=i=>{("key"in i?i.key==="Escape":i.keyCode===27)&&this.deactivate()}}TN(Dt.prototype);Dt.current=null;Dt.prototype.destroy=function(){this.deactivate();for(const t of Nr(n=Ut(e=this._cleanupQueue).call(e,0)).call(n)){var n,e;t()}};Dt.prototype.activate=function(){Dt.current&&Dt.current.deactivate(),Dt.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)};Dt.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")};Dt.prototype._onTapOverlay=function(n){this.activate(),n.srcEvent.stopPropagation()};function OV(n,e){for(;n;){if(n===e)return!0;n=n.parentNode}return!1}const IV=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,$V=/^#?([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,PV=/^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 rr(n){if(n)for(;n.hasChildNodes()===!0;){const e=n.firstChild;e&&(rr(e),n.removeChild(e))}}function Si(n){return n instanceof String||typeof n=="string"}function zC(n){return typeof n=="object"&&n!==null}function Kr(n,e,t,r){let i=!1;r===!0&&(i=e[t]===null&&n[t]!==void 0),i?delete n[t]:n[t]=e[t]}function mk(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(const r in n)if(e[r]!==void 0)if(e[r]===null||typeof e[r]!="object")Kr(n,e,r,t);else{const i=n[r],s=e[r];zC(i)&&zC(s)&&mk(i,s,t)}}function un(n,e,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Se(t))throw new TypeError("Arrays are not supported by deepExtend");for(let i=0;i<n.length;i++){const s=n[i];if(Object.prototype.hasOwnProperty.call(t,s))if(t[s]&&t[s].constructor===Object)e[s]===void 0&&(e[s]={}),e[s].constructor===Object?he(e[s],t[s],!1,r):Kr(e,t,s,r);else{if(Se(t[s]))throw new TypeError("Arrays are not supported by deepExtend");Kr(e,t,s,r)}}return e}function Gs(n,e,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Se(t))throw new TypeError("Arrays are not supported by deepExtend");for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&!ur(n).call(n,i))if(t[i]&&t[i].constructor===Object)e[i]===void 0&&(e[i]={}),e[i].constructor===Object?he(e[i],t[i]):Kr(e,t,i,r);else if(Se(t[i])){e[i]=[];for(let s=0;s<t[i].length;s++)e[i].push(t[i][s])}else Kr(e,t,i,r);return e}function he(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)||t===!0)if(typeof e[s]=="object"&&e[s]!==null&&Sq(e[s])===Object.prototype)n[s]===void 0?n[s]=he({},e[s],t):typeof n[s]=="object"&&n[s]!==null&&Sq(n[s])===Object.prototype?he(n[s],e[s],t):Kr(n,e,s,r);else if(Se(e[s])){var i;n[s]=qt(i=e[s]).call(i)}else Kr(n,e,s,r);return n}function Ks(n,e){return[...n,e]}function RV(n){return qt(n).call(n)}function qV(n){return n.getBoundingClientRect().left}function CV(n){return n.getBoundingClientRect().top}function Z(n,e){if(Se(n)){const t=n.length;for(let r=0;r<t;r++)e(n[r],r,n)}else for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&e(n[t],t,n)}function wb(n){let e;switch(n.length){case 3:case 4:return e=$V.exec(n),e?{r:Ot(e[1]+e[1],16),g:Ot(e[2]+e[2],16),b:Ot(e[3]+e[3],16)}:null;case 6:case 7:return e=IV.exec(n),e?{r:Ot(e[1],16),g:Ot(e[2],16),b:Ot(e[3],16)}:null;default:return null}}function ct(n,e){if(ur(n).call(n,"rgba"))return n;if(ur(n).call(n,"rgb")){const t=n.substr(ne(n).call(n,"(")+1).replace(")","").split(",");return"rgba("+t[0]+","+t[1]+","+t[2]+","+e+")"}else{const t=wb(n);return t==null?n:"rgba("+t.r+","+t.g+","+t.b+","+e+")"}}function bk(n,e,t){var r;return"#"+qt(r=((1<<24)+(n<<16)+(e<<8)+t).toString(16)).call(r,1)}function _m(n,e){if(Si(n)){let r=n;if(wk(r)){var t;const i=qi(t=r.substr(4).substr(0,r.length-5).split(",")).call(t,function(s){return Ot(s)});r=bk(i[0],i[1],i[2])}if(_k(r)===!0){const i=xV(r),s={h:i.h,s:i.s*.8,v:Math.min(1,i.v*1.02)},o={h:i.h,s:Math.min(1,i.s*1.25),v:i.v*.8},a=wm(o.h,o.s,o.v),u=wm(s.h,s.s,s.v);return{background:r,border:a,highlight:{background:u,border:a},hover:{background:u,border:a}}}else return{background:r,border:r,highlight:{background:r,border:r},hover:{background:r,border:r}}}else return{background:n.background||void 0,border:n.border||void 0,highlight:Si(n.highlight)?{border:n.highlight,background:n.highlight}:{background:n.highlight&&n.highlight.background||void 0,border:n.highlight&&n.highlight.border||void 0},hover:Si(n.hover)?{border:n.hover,background:n.hover}:{border:n.hover&&n.hover.border||void 0,background:n.hover&&n.hover.background||void 0}}}function En(n,e,t){n=n/255,e=e/255,t=t/255;const r=Math.min(n,Math.min(e,t)),i=Math.max(n,Math.max(e,t));if(r===i)return{h:0,s:0,v:r};const s=n===r?e-t:t===r?n-e:t-n,a=60*((n===r?3:t===r?1:5)-s/(i-r))/360,u=(i-r)/i;return{h:a,s:u,v:i}}function Ms(n,e,t){let r,i,s;const o=Math.floor(n*6),a=n*6-o,u=t*(1-e),l=t*(1-a*e),d=t*(1-(1-a)*e);switch(o%6){case 0:r=t,i=d,s=u;break;case 1:r=l,i=t,s=u;break;case 2:r=u,i=t,s=d;break;case 3:r=u,i=l,s=t;break;case 4:r=d,i=u,s=t;break;case 5:r=t,i=u,s=l;break}return{r:Math.floor(r*255),g:Math.floor(i*255),b:Math.floor(s*255)}}function wm(n,e,t){const r=Ms(n,e,t);return bk(r.r,r.g,r.b)}function xV(n){const e=wb(n);if(!e)throw new TypeError("'".concat(n,"' is not a valid color."));return En(e.r,e.g,e.b)}function _k(n){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(n)}function wk(n){return TV.test(n)}function DV(n){return PV.test(n)}function dr(n){if(n===null||typeof n!="object")return null;if(n instanceof Element)return n;const e=kr(n);for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&typeof n[t]=="object"&&(e[t]=dr(n[t]));return e}function dt(n,e,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=function(f){return f!=null},s=function(f){return f!==null&&typeof f=="object"},o=function(f){for(const v in f)if(Object.prototype.hasOwnProperty.call(f,v))return!1;return!0};if(!s(n))throw new Error("Parameter mergeTarget must be an object");if(!s(e))throw new Error("Parameter options must be an object");if(!i(t))throw new Error("Parameter option must have a value");if(!s(r))throw new Error("Parameter globalOptions must be an object");const a=function(f,v,p){s(f[p])||(f[p]={});const b=v[p],y=f[p];for(const g in b)Object.prototype.hasOwnProperty.call(b,g)&&(y[g]=b[g])},u=e[t],d=s(r)&&!o(r)?r[t]:void 0,c=d?d.enabled:void 0;if(u===void 0)return;if(typeof u=="boolean"){s(n[t])||(n[t]={}),n[t].enabled=u;return}if(u===null&&!s(n[t]))if(i(d))n[t]=kr(d);else return;if(!s(u))return;let h=!0;u.enabled!==void 0?h=u.enabled:c!==void 0&&(h=d.enabled),a(n,e,t),n[t].enabled=h}const AV={linear(n){return n},easeInQuad(n){return n*n},easeOutQuad(n){return n*(2-n)},easeInOutQuad(n){return n<.5?2*n*n:-1+(4-2*n)*n},easeInCubic(n){return n*n*n},easeOutCubic(n){return--n*n*n+1},easeInOutCubic(n){return n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1},easeInQuart(n){return n*n*n*n},easeOutQuart(n){return 1- --n*n*n*n},easeInOutQuart(n){return n<.5?8*n*n*n*n:1-8*--n*n*n*n},easeInQuint(n){return n*n*n*n*n},easeOutQuint(n){return 1+--n*n*n*n*n},easeInOutQuint(n){return n<.5?16*n*n*n*n*n:1+16*--n*n*n*n*n}};function ir(n,e){let t;Se(e)||(e=[e]);for(const r of n)if(r){t=r[e[0]];for(let i=1;i<e.length;i++)t&&(t=t[e[i]]);if(typeof t<"u")break}return t}const MV={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"};let FV=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 new Error("Function attempted to set as colorPicker update callback is not a function.")}setCloseCallback(e){if(typeof e=="function")this.closeCallback=e;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}_isColorString(e){if(typeof e=="string")return MV[e]}setColor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e==="none")return;let r;const i=this._isColorString(e);if(i!==void 0&&(e=i),Si(e)===!0){if(wk(e)===!0){const s=e.substr(4).substr(0,e.length-5).split(",");r={r:s[0],g:s[1],b:s[2],a:1}}else if(DV(e)===!0){const s=e.substr(5).substr(0,e.length-6).split(",");r={r:s[0],g:s[1],b:s[2],a:s[3]}}else if(_k(e)===!0){const s=wb(e);r={r:s.r,g:s.g,b:s.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){const s=e.a!==void 0?e.a:"1.0";r={r:e.r,g:e.g,b:e.b,a:s}}if(r===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+ps(e));this._setColor(r,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=Te({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",Vt(()=>{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?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)===!0&&(this.initialColor=Te({},e)),this.color=e;const r=En(e.r,e.g,e.b),i=2*Math.PI,s=this.r*r.s,o=this.centerCoordinates.x+s*Math.sin(i*r.h),a=this.centerCoordinates.y+s*Math.cos(i*r.h);this.colorPickerSelector.style.left=o-.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){const t=En(this.color.r,this.color.g,this.color.b);t.v=e/100;const r=Ms(t.h,t.s,t.v);r.a=this.color.a,this.color=r,this._updatePicker()}_updatePicker(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color;const t=En(e.r,e.g,e.b),r=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1)),r.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const i=this.colorPickerCanvas.clientWidth,s=this.colorPickerCanvas.clientHeight;r.clearRect(0,0,i,s),r.putImageData(this.hueCircle,0,0),r.fillStyle="rgba(0,0,0,"+(1-t.v)+")",r.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),gs(r).call(r),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,r,i;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){const o=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(o.webkitBackingStorePixelRatio||o.mozBackingStorePixelRatio||o.msBackingStorePixelRatio||o.oBackingStorePixelRatio||o.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{const o=document.createElement("DIV");o.style.color="red",o.style.fontWeight="bold",o.style.padding="10px",o.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(o)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);const s=this;this.opacityRange.onchange=function(){s._setOpacity(this.value)},this.opacityRange.oninput=function(){s._setOpacity(this.value)},this.brightnessRange.onchange=function(){s._setBrightness(this.value)},this.brightnessRange.oninput=function(){s._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=D(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=D(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=D(r=this._save).call(r,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=D(i=this._loadLast).call(i,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 _b(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){const 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);const t=this.colorPickerCanvas.clientWidth,r=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,r);let i,s,o,a;this.centerCoordinates={x:t*.5,y:r*.5},this.r=.49*t;const u=2*Math.PI/360,l=1/360,d=1/this.r;let c;for(o=0;o<360;o++)for(a=0;a<this.r;a++)i=this.centerCoordinates.x+a*Math.sin(u*o),s=this.centerCoordinates.y+a*Math.cos(u*o),c=Ms(o*l,a*d,1),e.fillStyle="rgb("+c.r+","+c.g+","+c.b+")",e.fillRect(i-.5,s-.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,r)}this.generated=!0}_moveSelector(e){const t=this.colorPickerDiv.getBoundingClientRect(),r=e.center.x-t.left,i=e.center.y-t.top,s=.5*this.colorPickerDiv.clientHeight,o=.5*this.colorPickerDiv.clientWidth,a=r-o,u=i-s,l=Math.atan2(a,u),d=.98*Math.min(Math.sqrt(a*a+u*u),o),c=Math.cos(l)*d+s,h=Math.sin(l)*d+o;this.colorPickerSelector.style.top=c-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=h-.5*this.colorPickerSelector.clientWidth+"px";let f=l/(2*Math.PI);f=f<0?f+1:f;const v=d/this.r,p=En(this.color.r,this.color.g,this.color.b);p.h=f,p.s=v;const b=Ms(p.h,p.s,p.v);b.a=this.color.a,this.color=b,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 Em(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];if(e.length<1)throw new TypeError("Invalid arguments.");if(e.length===1)return document.createTextNode(e[0]);{const r=document.createElement(e[0]);return r.appendChild(Em(...qt(e).call(e,1))),r}}let NV=class{constructor(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:()=>!1;this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.hideOption=s,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Te(this.options,this.defaultOptions),this.configureOptions=r,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new FV(i),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(Se(e))this.options.filter=e.join();else if(typeof e=="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),tt(e)!==void 0&&(this.options.filter=tt(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);tt(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=[];const e=tt(this.options);let t=0,r=!1;for(const i in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,i)&&(this.allowCreation=!1,r=!1,typeof e=="function"?(r=e(i,[]),r=r||this._handleObject(this.configureOptions[i],[i],!0)):(e===!0||ne(e).call(e,i)!==-1)&&(r=!0),r!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(i),this._handleObject(this.configureOptions[i],[i])),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 r=0;r<e.length;r++)if(t[e[r]]!==void 0)t=t[e[r]];else{t=void 0;break}return t}_makeItem(e){if(this.allowCreation===!0){const s=document.createElement("div");s.className="vis-configuration vis-config-item vis-config-s"+e.length;for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return le(r).call(r,o=>{s.appendChild(o)}),this.domElements.push(s),this.domElements.length}return 0}_makeHeader(e){const t=document.createElement("div");t.className="vis-configuration vis-config-header",t.innerText=e,this._makeItem([],t)}_makeLabel(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const i=document.createElement("div");if(i.className="vis-configuration vis-config-label vis-config-s"+t.length,r===!0){for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(Em("i","b",e))}else i.innerText=e+":";return i}_makeDropdown(e,t,r){const i=document.createElement("select");i.className="vis-configuration vis-config-select";let s=0;t!==void 0&&ne(e).call(e,t)!==-1&&(s=ne(e).call(e,t));for(let u=0;u<e.length;u++){const l=document.createElement("option");l.value=e[u],u===s&&(l.selected="selected"),l.innerText=e[u],i.appendChild(l)}const o=this;i.onchange=function(){o._update(this.value,r)};const a=this._makeLabel(r[r.length-1],r);this._makeItem(r,a,i)}_makeRange(e,t,r){const i=e[0],s=e[1],o=e[2],a=e[3],u=document.createElement("input");u.className="vis-configuration vis-config-range";try{u.type="range",u.min=s,u.max=o}catch{}u.step=a;let l="",d=0;t!==void 0?(t<0&&t*1.2<s?(u.min=Math.ceil(t*1.2),d=u.min,l="range increased"):t/1.2<s&&(u.min=Math.ceil(t/1.2),d=u.min,l="range increased"),t*1.2>o&&o!==1&&(u.max=Math.ceil(t*1.2),d=u.max,l="range increased"),u.value=t):u.value=i;const c=document.createElement("input");c.className="vis-configuration vis-config-rangeinput",c.value=u.value;const h=this;u.onchange=function(){c.value=this.value,h._update(Number(this.value),r)},u.oninput=function(){c.value=this.value};const f=this._makeLabel(r[r.length-1],r),v=this._makeItem(r,f,u,c);l!==""&&this.popupHistory[v]!==d&&(this.popupHistory[v]=d,this._setupPopup(l,v))}_makeButton(){if(this.options.showButton===!0){const 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){const r=document.createElement("div");r.id="vis-configuration-popup",r.className="vis-configuration-popup",r.innerText=e,r.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:r,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){const t=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=t.left+"px",this.popupDiv.html.style.top=t.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=Vt(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=Vt(()=>{this._removePopup()},1800)}}_makeCheckbox(e,t,r){const i=document.createElement("input");i.type="checkbox",i.className="vis-configuration vis-config-checkbox",i.checked=e,t!==void 0&&(i.checked=t,t!==e&&(typeof e=="object"?t!==e.enabled&&this.changedOptions.push({path:r,value:t}):this.changedOptions.push({path:r,value:t})));const s=this;i.onchange=function(){s._update(this.checked,r)};const o=this._makeLabel(r[r.length-1],r);this._makeItem(r,o,i)}_makeTextInput(e,t,r){const i=document.createElement("input");i.type="text",i.className="vis-configuration vis-config-text",i.value=t,t!==e&&this.changedOptions.push({path:r,value:t});const s=this;i.onchange=function(){s._update(this.value,r)};const o=this._makeLabel(r[r.length-1],r);this._makeItem(r,o,i)}_makeColorField(e,t,r){const i=e[1],s=document.createElement("div");t=t===void 0?i:t,t!=="none"?(s.className="vis-configuration vis-config-colorBlock",s.style.backgroundColor=t):s.className="vis-configuration vis-config-colorBlock none",t=t===void 0?i:t,s.onclick=()=>{this._showColorPicker(t,s,r)};const o=this._makeLabel(r[r.length-1],r);this._makeItem(r,o,s)}_showColorPicker(e,t,r){t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(i=>{const s="rgba("+i.r+","+i.g+","+i.b+","+i.a+")";t.style.backgroundColor=s,this._update(s,r)}),this.colorPicker.setCloseCallback(()=>{t.onclick=()=>{this._showColorPicker(e,t,r)}})}_handleObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=!1;const s=tt(this.options);let o=!1;for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){i=!0;const u=e[a],l=Ks(t,a);if(typeof s=="function"&&(i=s(a,t),i===!1&&!Se(u)&&typeof u!="string"&&typeof u!="boolean"&&u instanceof Object&&(this.allowCreation=!1,i=this._handleObject(u,l,!0),this.allowCreation=r===!1)),i!==!1){o=!0;const d=this._getValue(l);if(Se(u))this._handleArray(u,d,l);else if(typeof u=="string")this._makeTextInput(u,d,l);else if(typeof u=="boolean")this._makeCheckbox(u,d,l);else if(u instanceof Object){if(!this.hideOption(t,a,this.moduleOptions))if(u.enabled!==void 0){const c=Ks(l,"enabled"),h=this._getValue(c);if(h===!0){const f=this._makeLabel(a,l,!0);this._makeItem(l,f),o=this._handleObject(u,l)||o}else this._makeCheckbox(u,h,l)}else{const c=this._makeLabel(a,l,!0);this._makeItem(l,c),o=this._handleObject(u,l)||o}}else console.error("dont know how to handle",u,a,l)}}return o}_handleArray(e,t,r){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,t,r),e[1]!==t&&this.changedOptions.push({path:r,value:t})):typeof e[0]=="string"?(this._makeDropdown(e,t,r),e[0]!==t&&this.changedOptions.push({path:r,value:t})):typeof e[0]=="number"&&(this._makeRange(e,t,r),e[0]!==t&&this.changedOptions.push({path:r,value:Number(t)}))}_update(e,t){const r=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",r),this.initialized=!0,this.parent.setOptions(r)}_constructOptions(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r;e=e==="true"?!0:e,e=e==="false"?!1:e;for(let s=0;s<t.length;s++)t[s]!=="global"&&(i[t[s]]===void 0&&(i[t[s]]={}),s!==t.length-1?i=i[t[s]]:i[t[s]]=e);return r}_printOptions(){const e=this.getOptions();for(;this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(Em("pre","const options = "+ps(e,null,2)))}getOptions(){const e={};for(let t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}},kV=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=Ot(e),this.y=Ot(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){const t=this.frame.clientHeight,r=this.frame.clientWidth,i=this.frame.parentNode.clientHeight,s=this.frame.parentNode.clientWidth;let o=0,a=0;if(this.overflowMethod=="flip"){let u=!1,l=!0;this.y-t<this.padding&&(l=!1),this.x+r>s-this.padding&&(u=!0),u?o=this.x-r:o=this.x,l?a=this.y-t:a=this.y}else a=this.y-t,a+t+this.padding>i&&(a=i-t-this.padding),a<this.padding&&(a=this.padding),o=this.x,o+r+this.padding>s&&(o=s-r-this.padding),o<this.padding&&(o=this.padding);this.frame.style.left=o+"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)}},_n=!1,WC;const Sm="background: #FFeeee; color: #dd0000";let BV=class we{static validate(e,t,r){_n=!1,WC=t;let i=t;return r!==void 0&&(i=t[r]),we.parse(e,i,[]),_n}static parse(e,t,r){for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&we.check(i,e,t,r)}static check(e,t,r,i){if(r[e]===void 0&&r.__any__===void 0){we.getSuggestion(e,r,i);return}let s=e,o=!0;r[e]===void 0&&r.__any__!==void 0&&(s="__any__",o=we.getType(t[e])==="object");let a=r[s];o&&a.__type__!==void 0&&(a=a.__type__),we.checkFields(e,t,r,s,a,i)}static checkFields(e,t,r,i,s,o){const a=function(d){console.error("%c"+d+we.printLocation(o,e),Sm)},u=we.getType(t[e]),l=s[u];l!==void 0?we.getType(l)==="array"&&ne(l).call(l,t[e])===-1?(a('Invalid option detected in "'+e+'". Allowed values are:'+we.print(l)+' not "'+t[e]+'". '),_n=!0):u==="object"&&i!=="__any__"&&(o=Ks(o,e),we.parse(t[e],r[i],o)):s.any===void 0&&(a('Invalid type received for "'+e+'". Expected: '+we.print(Ee(s))+". Received ["+u+'] "'+t[e]+'"'),_n=!0)}static getType(e){const t=typeof e;return t==="object"?e===null?"null":e instanceof Boolean?"boolean":e instanceof Number?"number":e instanceof String?"string":Se(e)?"array":e instanceof Date?"date":e.nodeType!==void 0?"dom":e._isAMomentObject===!0?"moment":"object":t==="number"?"number":t==="boolean"?"boolean":t==="string"?"string":t===void 0?"undefined":t}static getSuggestion(e,t,r){const i=we.findInOptions(e,t,r,!1),s=we.findInOptions(e,WC,[],!0),o=8,a=4;let u;i.indexMatch!==void 0?u=" in "+we.printLocation(i.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+i.indexMatch+`"?
|
|
65
|
+
|
|
66
|
+
`:s.distance<=a&&i.distance>s.distance?u=" in "+we.printLocation(i.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+we.printLocation(s.path,s.closestMatch,""):i.distance<=o?u='. Did you mean "'+i.closestMatch+'"?'+we.printLocation(i.path,e):u=". Did you mean one of these: "+we.print(Ee(t))+we.printLocation(r,e),console.error('%cUnknown option detected: "'+e+'"'+u,Sm),_n=!0}static findInOptions(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,s=1e9,o="",a=[];const u=e.toLowerCase();let l;for(const c in t){let h;if(t[c].__type__!==void 0&&i===!0){const f=we.findInOptions(e,t[c],Ks(r,c));s>f.distance&&(o=f.closestMatch,a=f.path,s=f.distance,l=f.indexMatch)}else{var d;ne(d=c.toLowerCase()).call(d,u)!==-1&&(l=c),h=we.levenshteinDistance(e,c),s>h&&(o=c,a=RV(r),s=h)}}return{closestMatch:o,path:a,distance:s,indexMatch:l}}static printLocation(e,t){let i=`
|
|
67
|
+
|
|
68
|
+
`+(arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:
|
|
69
|
+
`)+`options = {
|
|
70
|
+
`;for(let s=0;s<e.length;s++){for(let o=0;o<s+1;o++)i+=" ";i+=e[s]+`: {
|
|
71
|
+
`}for(let s=0;s<e.length+1;s++)i+=" ";i+=t+`
|
|
72
|
+
`;for(let s=0;s<e.length+1;s++){for(let o=0;o<e.length-s;o++)i+=" ";i+=`}
|
|
73
|
+
`}return i+`
|
|
74
|
+
|
|
75
|
+
`}static print(e){return ps(e).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}static levenshteinDistance(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;const r=[];let i;for(i=0;i<=t.length;i++)r[i]=[i];let s;for(s=0;s<=e.length;s++)r[0][s]=s;for(i=1;i<=t.length;i++)for(s=1;s<=e.length;s++)t.charAt(i-1)==e.charAt(s-1)?r[i][s]=r[i-1][s-1]:r[i][s]=Math.min(r[i-1][s-1]+1,Math.min(r[i][s-1]+1,r[i-1][s]+1));return r[t.length][e.length]}};const jV=Dt,LV=NV,Oi=_b,zV=kV,Ek=Sm,WV=BV;function HV(n){return sr=n,KV()}var Sk={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},Eb=kr(Sk);Eb.color="color.color";Eb.style="dashes";var Ke={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},HC={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},sr="",Ai=0,X="",V="",et=Ke.NULL;function UV(){Ai=0,X=sr.charAt(0)}function Me(){Ai++,X=sr.charAt(Ai)}function pi(){return sr.charAt(Ai+1)}function UC(n){var e=n.charCodeAt(0);return e<47?e===35||e===46:e<59?e>47:e<91?e>64:e<96?e===95:e<123?e>96:!1}function hr(n,e){if(n||(n={}),e)for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function VV(n,e,t){for(var r=e.split("."),i=n;r.length;){var s=r.shift();r.length?(i[s]||(i[s]={}),i=i[s]):i[s]=t}}function Ok(n,e){for(var t,r,i=null,s=[n],o=n;o.parent;)s.push(o.parent),o=o.parent;if(o.nodes){for(t=0,r=o.nodes.length;t<r;t++)if(e.id===o.nodes[t].id){i=o.nodes[t];break}}for(i||(i={id:e.id},n.node&&(i.attr=hr(i.attr,n.node))),t=s.length-1;t>=0;t--){var a,u=s[t];u.nodes||(u.nodes=[]),ne(a=u.nodes).call(a,i)===-1&&u.nodes.push(i)}e.attr&&(i.attr=hr(i.attr,e.attr))}function GV(n,e){if(n.edges||(n.edges=[]),n.edges.push(e),n.edge){var t=hr({},n.edge);e.attr=hr(t,e.attr)}}function Ik(n,e,t,r,i){var s={from:e,to:t,type:r};return n.edge&&(s.attr=hr({},n.edge)),s.attr=hr(s.attr||{},i),i!=null&&i.hasOwnProperty("arrows")&&i.arrows!=null&&(s.arrows={to:{enabled:!0,type:i.arrows.type}},i.arrows=null),s}function fe(){for(et=Ke.NULL,V="";X===" "||X===" "||X===`
|
|
76
|
+
`||X==="\r";)Me();do{var n=!1;if(X==="#"){for(var e=Ai-1;sr.charAt(e)===" "||sr.charAt(e)===" ";)e--;if(sr.charAt(e)===`
|
|
77
|
+
`||sr.charAt(e)===""){for(;X!=""&&X!=`
|
|
78
|
+
`;)Me();n=!0}}if(X==="/"&&pi()==="/"){for(;X!=""&&X!=`
|
|
79
|
+
`;)Me();n=!0}if(X==="/"&&pi()==="*"){for(;X!="";)if(X==="*"&&pi()==="/"){Me(),Me();break}else Me();n=!0}for(;X===" "||X===" "||X===`
|
|
80
|
+
`||X==="\r";)Me()}while(n);if(X===""){et=Ke.DELIMITER;return}var t=X+pi();if(HC[t]){et=Ke.DELIMITER,V=t,Me(),Me();return}if(HC[X]){et=Ke.DELIMITER,V=X,Me();return}if(UC(X)||X==="-"){for(V+=X,Me();UC(X);)V+=X,Me();V==="false"?V=!1:V==="true"?V=!0:isNaN(Number(V))||(V=Number(V)),et=Ke.IDENTIFIER;return}if(X==='"'){for(Me();X!=""&&(X!='"'||X==='"'&&pi()==='"');)X==='"'?(V+=X,Me()):X==="\\"&&pi()==="n"?(V+=`
|
|
81
|
+
`,Me()):V+=X,Me();if(X!='"')throw Ye('End of string " expected');Me(),et=Ke.IDENTIFIER;return}for(et=Ke.UNKNOWN;X!="";)V+=X,Me();throw new SyntaxError('Syntax error in part "'+Rk(V,30)+'"')}function KV(){var n={};if(UV(),fe(),V==="strict"&&(n.strict=!0,fe()),(V==="graph"||V==="digraph")&&(n.type=V,fe()),et===Ke.IDENTIFIER&&(n.id=V,fe()),V!="{")throw Ye("Angle bracket { expected");if(fe(),$k(n),V!="}")throw Ye("Angle bracket } expected");if(fe(),V!=="")throw Ye("End of file expected");return fe(),delete n.node,delete n.edge,delete n.graph,n}function $k(n){for(;V!==""&&V!="}";)YV(n),V===";"&&fe()}function YV(n){var e=Tk(n);if(e){Pk(n,e);return}var t=XV(n);if(!t){if(et!=Ke.IDENTIFIER)throw Ye("Identifier expected");var r=V;if(fe(),V==="="){if(fe(),et!=Ke.IDENTIFIER)throw Ye("Identifier expected");n[r]=V,fe()}else JV(n,r)}}function Tk(n){var e=null;if(V==="subgraph"&&(e={},e.type="subgraph",fe(),et===Ke.IDENTIFIER&&(e.id=V,fe())),V==="{"){if(fe(),e||(e={}),e.parent=n,e.node=n.node,e.edge=n.edge,e.graph=n.graph,$k(e),V!="}")throw Ye("Angle bracket } expected");fe(),delete e.node,delete e.edge,delete e.graph,delete e.parent,n.subgraphs||(n.subgraphs=[]),n.subgraphs.push(e)}return e}function XV(n){return V==="node"?(fe(),n.node=Pn(),"node"):V==="edge"?(fe(),n.edge=Pn(),"edge"):V==="graph"?(fe(),n.graph=Pn(),"graph"):null}function JV(n,e){var t={id:e},r=Pn();r&&(t.attr=r),Ok(n,t),Pk(n,e)}function Pk(n,e){for(;V==="->"||V==="--";){var t,r=V;fe();var i=Tk(n);if(i)t=i;else{if(et!=Ke.IDENTIFIER)throw Ye("Identifier or subgraph expected");t=V,Ok(n,{id:t}),fe()}var s=Pn(),o=Ik(n,e,t,r,s);GV(n,o),e=t}}function Pn(){for(var n,e=null,t={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=new Array,s=new Array;V==="[";){for(fe(),e={};V!==""&&V!="]";){if(et!=Ke.IDENTIFIER)throw Ye("Attribute name expected");var o=V;if(fe(),V!="=")throw Ye("Equal sign = expected");if(fe(),et!=Ke.IDENTIFIER)throw Ye("Attribute value expected");var a=V;o==="style"&&(a=t[a]);var u;o==="arrowhead"&&(u=r[a],o="arrows",a={to:{enabled:!0,type:u}}),o==="arrowtail"&&(u=r[a],o="arrows",a={from:{enabled:!0,type:u}}),i.push({attr:e,name:o,value:a}),s.push(o),fe(),V==","&&fe()}if(V!="]")throw Ye("Bracket ] expected");fe()}if(ur(s).call(s,"dir")){var l={};for(l.arrows={},n=0;n<i.length;n++)if(i[n].name==="arrows")if(i[n].value.to!=null)l.arrows.to=n;else if(i[n].value.from!=null)l.arrows.from=n;else throw Ye("Invalid value of arrows");else i[n].name==="dir"&&(l.dir=n);var d=i[l.dir].value;if(!ur(s).call(s,"arrows"))if(d==="both")i.push({attr:i[l.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),l.arrows.to=i.length-1,i.push({attr:i[l.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),l.arrows.from=i.length-1;else if(d==="forward")i.push({attr:i[l.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),l.arrows.to=i.length-1;else if(d==="back")i.push({attr:i[l.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),l.arrows.from=i.length-1;else if(d==="none")i.push({attr:i[l.dir].attr,name:"arrows",value:""}),l.arrows.to=i.length-1;else throw Ye('Invalid dir type "'+d+'"');var c,h;if(d==="both")l.arrows.to&&l.arrows.from?(h=i[l.arrows.to].value.to.type,c=i[l.arrows.from].value.from.type,i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:c}}},Ut(i).call(i,l.arrows.from,1)):l.arrows.to?(h=i[l.arrows.to].value.to.type,c="arrow",i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:c}}}):l.arrows.from&&(h="arrow",c=i[l.arrows.from].value.from.type,i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:c}}});else if(d==="back")l.arrows.to&&l.arrows.from?(h="",c=i[l.arrows.from].value.from.type,i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:c}}}):l.arrows.to?(h="",c="arrow",l.arrows.from=l.arrows.to,i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:c}}}):l.arrows.from&&(h="",c=i[l.arrows.from].value.from.type,i[l.arrows.to]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:c}}}),i[l.arrows.from]={attr:i[l.arrows.from].attr,name:i[l.arrows.from].name,value:{from:{enabled:!0,type:i[l.arrows.from].value.from.type}}};else if(d==="none"){var f;l.arrows.to?f=l.arrows.to:f=l.arrows.from,i[f]={attr:i[f].attr,name:i[f].name,value:""}}else if(d==="forward")l.arrows.to&&l.arrows.from?(h=i[l.arrows.to].value.to.type,c="",i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:c}}}):l.arrows.to?(h=i[l.arrows.to].value.to.type,c="",i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:c}}}):l.arrows.from&&(h="arrow",c="",l.arrows.to=l.arrows.from,i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:c}}}),i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:i[l.arrows.to].value.to.type}}};else throw Ye('Invalid dir type "'+d+'"');Ut(i).call(i,l.dir,1)}var v;if(ur(s).call(s,"penwidth")){var p=[];for(v=i.length,n=0;n<v;n++)i[n].name!=="width"&&(i[n].name==="penwidth"&&(i[n].name="width"),p.push(i[n]));i=p}for(v=i.length,n=0;n<v;n++)VV(i[n].attr,i[n].name,i[n].value);return e}function Ye(n){return new SyntaxError(n+', got "'+Rk(V,30)+'" (char '+Ai+")")}function Rk(n,e){return n.length<=e?n:n.substr(0,27)+"..."}function ZV(n,e,t){Se(n)?le(n).call(n,function(r){Se(e)?le(e).call(e,function(i){t(r,i)}):t(r,e)}):Se(e)?le(e).call(e,function(r){t(n,r)}):t(n,e)}function Hp(n,e,t){for(var r=e.split("."),i=r.pop(),s=n,o=0;o<r.length;o++){var a=r[o];a in s||(s[a]={}),s=s[a]}return s[i]=t,n}function VC(n,e){var t={};for(var r in n)if(n.hasOwnProperty(r)){var i=e[r];Se(i)?le(i).call(i,function(s){Hp(t,s,n[r])}):typeof i=="string"?Hp(t,i,n[r]):Hp(t,r,n[r])}return t}function QV(n){var e=HV(n),t={nodes:[],edges:[],options:{}};if(e.nodes){var r;le(r=e.nodes).call(r,function(o){var a={id:o.id,label:String(o.label||o.id)};hr(a,VC(o.attr,Sk)),a.image&&(a.shape="image"),t.nodes.push(a)})}if(e.edges){var i,s=function(o){var a={from:o.from,to:o.to};return hr(a,VC(o.attr,Eb)),a.arrows==null&&o.type==="->"&&(a.arrows="to"),a};le(i=e.edges).call(i,function(o){var a,u;if(o.from instanceof Object?a=o.from.nodes:a={id:o.from},o.to instanceof Object?u=o.to.nodes:u={id:o.to},o.from instanceof Object&&o.from.edges){var l;le(l=o.from.edges).call(l,function(c){var h=s(c);t.edges.push(h)})}if(ZV(a,u,function(c,h){var f=Ik(t,c.id,h.id,o.type,o.attr),v=s(f);t.edges.push(v)}),o.to instanceof Object&&o.to.edges){var d;le(d=o.to.edges).call(d,function(c){var h=s(c);t.edges.push(h)})}})}return e.attr&&(t.options=e.attr),t}function eG(n,e){var t;const r={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};e!=null&&(e.fixed!=null&&(r.nodes.fixed=e.fixed),e.parseColor!=null&&(r.nodes.parseColor=e.parseColor),e.inheritColor!=null&&(r.edges.inheritColor=e.inheritColor));const i=n.edges,s=qi(i).call(i,a=>{const u={from:a.source,id:a.id,to:a.target};return a.attributes!=null&&(u.attributes=a.attributes),a.label!=null&&(u.label=a.label),a.attributes!=null&&a.attributes.title!=null&&(u.title=a.attributes.title),a.type==="Directed"&&(u.arrows="to"),a.color&&r.edges.inheritColor===!1&&(u.color=a.color),u});return{nodes:qi(t=n.nodes).call(t,a=>{const u={id:a.id,fixed:r.nodes.fixed&&a.x!=null&&a.y!=null};return a.attributes!=null&&(u.attributes=a.attributes),a.label!=null&&(u.label=a.label),a.size!=null&&(u.size=a.size),a.attributes!=null&&a.attributes.title!=null&&(u.title=a.attributes.title),a.title!=null&&(u.title=a.title),a.x!=null&&(u.x=a.x),a.y!=null&&(u.y=a.y),a.color!=null&&(r.nodes.parseColor===!0?u.color=a.color:u.color={background:a.color,border:a.color,highlight:{background:a.color,border:a.color},hover:{background:a.color,border:a.color}}),u}),edges:s}}const tG={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"},rG={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"},iG={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"},nG={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"},sG={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"},oG={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ó"},aG={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},uG={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},lG={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},dG={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"},cG={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"};var hG=Object.freeze({__proto__:null,cn:uG,cs:cG,de:rG,en:tG,es:iG,fr:dG,it:nG,nl:sG,pt:oG,ru:aG,uk:lG});function fG(n,e){try{const[r,i]=e.split(/[-_ /]/,2),s=r!=null?r.toLowerCase():null,o=i!=null?i.toUpperCase():null;if(s&&o){const a=s+"-"+o;if(Object.prototype.hasOwnProperty.call(n,a))return a;var t;console.warn(N5(t="Unknown variant ".concat(o," of language ")).call(t,s,"."))}if(s){const a=s;if(Object.prototype.hasOwnProperty.call(n,a))return a;console.warn("Unknown language ".concat(s))}return console.warn("Unknown locale ".concat(e,", falling back to English.")),"en"}catch(r){return console.error(r),console.warn("Unexpected error while normalizing locale ".concat(e,", falling back to English.")),"en"}}class vG{constructor(){this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}init(){if(this.initialized())return;this.src=this.image.src;const e=this.image.width,t=this.image.height;this.width=e,this.height=t;const r=Math.floor(t/2),i=Math.floor(t/4),s=Math.floor(t/8),o=Math.floor(t/16),a=Math.floor(e/2),u=Math.floor(e/4),l=Math.floor(e/8),d=Math.floor(e/16);this.canvas.width=3*u,this.canvas.height=r,this.coordinates=[[0,0,a,r],[a,0,u,i],[a,i,l,s],[5*l,i,d,o]],this._fillMipMap()}initialized(){return this.coordinates!==void 0}_fillMipMap(){const e=this.canvas.getContext("2d"),t=this.coordinates[0];e.drawImage(this.image,t[0],t[1],t[2],t[3]);for(let r=1;r<this.NUM_ITERATIONS;r++){const i=this.coordinates[r-1],s=this.coordinates[r];e.drawImage(this.canvas,i[0],i[1],i[2],i[3],s[0],s[1],s[2],s[3])}}drawImageAtPosition(e,t,r,i,s,o){if(this.initialized())if(t>2){t*=.5;let a=0;for(;t>2&&a<this.NUM_ITERATIONS;)t*=.5,a+=1;a>=this.NUM_ITERATIONS&&(a=this.NUM_ITERATIONS-1);const u=this.coordinates[a];e.drawImage(this.canvas,u[0],u[1],u[2],u[3],r,i,s,o)}else e.drawImage(this.image,r,i,s,o)}}class pG{constructor(e){this.images={},this.imageBroken={},this.callback=e}_tryloadBrokenUrl(e,t,r){if(!(e===void 0||r===void 0)){if(t===void 0){console.warn("No broken url image defined");return}r.image.onerror=()=>{console.error("Could not load brokenImage:",t)},r.image.src=t}}_redrawWithImage(e){this.callback&&this.callback(e)}load(e,t){const r=this.images[e];if(r)return r;const i=new vG;return this.images[e]=i,i.image.onload=()=>{this._fixImageCoordinates(i.image),i.init(),this._redrawWithImage(i)},i.image.onerror=()=>{console.error("Could not load image:",e),this._tryloadBrokenUrl(e,t,i)},i.image.src=e,i}_fixImageCoordinates(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}var GC={},KC={},Up={exports:{}},Vp,YC;function gG(){if(YC)return Vp;YC=1;var n=te();return Vp=n(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),Vp}var Gp,XC;function yG(){if(XC)return Gp;XC=1;var n=te(),e=Le(),t=Nt(),r=gG(),i=Object.isExtensible,s=n(function(){});return Gp=s||r?function(a){return!e(a)||r&&t(a)==="ArrayBuffer"?!1:i?i(a):!0}:i,Gp}var Kp,JC;function qk(){if(JC)return Kp;JC=1;var n=te();return Kp=!n(function(){return Object.isExtensible(Object.preventExtensions({}))}),Kp}var ZC;function Ro(){if(ZC)return Up.exports;ZC=1;var n=z(),e=re(),t=ds(),r=Le(),i=He(),s=gt().f,o=So(),a=ab(),u=yG(),l=go(),d=qk(),c=!1,h=l("meta"),f=0,v=function(m){s(m,h,{value:{objectID:"O"+f++,weakData:{}}})},p=function(m,w){if(!r(m))return typeof m=="symbol"?m:(typeof m=="string"?"S":"P")+m;if(!i(m,h)){if(!u(m))return"F";if(!w)return"E";v(m)}return m[h].objectID},b=function(m,w){if(!i(m,h)){if(!u(m))return!0;if(!w)return!1;v(m)}return m[h].weakData},y=function(m){return d&&c&&u(m)&&!i(m,h)&&v(m),m},g=function(){S.enable=function(){},c=!0;var m=o.f,w=e([].splice),O={};O[h]=1,m(O).length&&(o.f=function(I){for(var _=m(I),E=0,$=_.length;E<$;E++)if(_[E]===h){w(_,E,1);break}return _},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:a.f}))},S=Up.exports={enable:g,fastKey:p,getWeakData:b,onFreeze:y};return t[h]=!0,Up.exports}var Yp,QC;function mG(){if(QC)return Yp;QC=1;var n=xe(),e=rn(),t=n("iterator"),r=Array.prototype;return Yp=function(i){return i!==void 0&&(e.Array===i||r[t]===i)},Yp}var Xp,ex;function Ck(){if(ex)return Xp;ex=1;var n=tn(),e=Zm(),t=Vi(),r=rn(),i=xe(),s=i("iterator");return Xp=function(o){if(!t(o))return e(o,s)||e(o,"@@iterator")||r[n(o)]},Xp}var Jp,tx;function bG(){if(tx)return Jp;tx=1;var n=ot(),e=er(),t=kt(),r=Yi(),i=Ck(),s=TypeError;return Jp=function(o,a){var u=arguments.length<2?i(o):a;if(e(u))return t(n(u,o));throw new s(r(o)+" is not iterable")},Jp}var Zp,rx;function Sb(){if(rx)return Zp;rx=1;var n=ot(),e=kt(),t=Zm();return Zp=function(r,i,s){var o,a;e(r);try{if(o=t(r,"return"),!o){if(i==="throw")throw s;return s}o=n(o,r)}catch(u){a=!0,o=u}if(i==="throw")throw s;if(a)throw o;return e(o),s},Zp}var Qp,ix;function qo(){if(ix)return Qp;ix=1;var n=mo(),e=ot(),t=kt(),r=Yi(),i=mG(),s=tr(),o=Ce(),a=bG(),u=Ck(),l=Sb(),d=TypeError,c=function(f,v){this.stopped=f,this.result=v},h=c.prototype;return Qp=function(f,v,p){var b=p&&p.that,y=!!(p&&p.AS_ENTRIES),g=!!(p&&p.IS_RECORD),S=!!(p&&p.IS_ITERATOR),m=!!(p&&p.INTERRUPTED),w=n(v,b),O,I,_,E,$,T,P,R=function(M){return O&&l(O,"normal"),new c(!0,M)},C=function(M){return y?(t(M),m?w(M[0],M[1],R):w(M[0],M[1])):m?w(M,R):w(M)};if(g)O=f.iterator;else if(S)O=f;else{if(I=u(f),!I)throw new d(r(f)+" is not iterable");if(i(I)){for(_=0,E=s(f);E>_;_++)if($=C(f[_]),$&&o(h,$))return $;return new c(!1)}O=a(f,I)}for(T=g?f.next:O.next;!(P=e(T,O)).done;){try{$=C(P.value)}catch(M){l(O,"throw",M)}if(typeof $=="object"&&$&&o(h,$))return $}return new c(!1)},Qp}var eg,nx;function Ob(){if(nx)return eg;nx=1;var n=Ce(),e=TypeError;return eg=function(t,r){if(n(r,t))return t;throw new e("Incorrect invocation")},eg}var tg,sx;function Ib(){if(sx)return tg;sx=1;var n=z(),e=ge(),t=Ro(),r=te(),i=Zi(),s=qo(),o=Ob(),a=je(),u=Le(),l=Vi(),d=si(),c=gt().f,h=_r().forEach,f=Ie(),v=oi(),p=v.set,b=v.getterFor;return tg=function(y,g,S){var m=y.indexOf("Map")!==-1,w=y.indexOf("Weak")!==-1,O=m?"set":"add",I=e[y],_=I&&I.prototype,E={},$;if(!f||!a(I)||!(w||_.forEach&&!r(function(){new I().entries().next()})))$=S.getConstructor(g,y,m,O),t.enable();else{$=g(function(R,C){p(o(R,T),{type:y,collection:new I}),l(C)||s(C,R[O],{that:R,AS_ENTRIES:m})});var T=$.prototype,P=b(y);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(R){var C=R==="add"||R==="set";R in _&&!(w&&R==="clear")&&i(T,R,function(M,K){var L=P(this).collection;if(!C&&w&&!u(M))return R==="get"?void 0:!1;var J=L[R](M===0?0:M,K);return C?this:J})}),w||c(T,"size",{configurable:!0,get:function(){return P(this).collection.size}})}return d($,y,!1,!0),E[y]=$,n({global:!0,forced:!0},E),w||S.setStrong($,y,m),$},tg}var rg,ox;function $b(){if(ox)return rg;ox=1;var n=vs();return rg=function(e,t,r){for(var i in t)r&&r.unsafe&&e[i]?e[i]=t[i]:n(e,i,t[i],r);return e},rg}var ig,ax;function _G(){if(ax)return ig;ax=1;var n=ut(),e=ub(),t=xe(),r=Ie(),i=t("species");return ig=function(s){var o=n(s);r&&o&&!o[i]&&e(o,i,{configurable:!0,get:function(){return this}})},ig}var ng,ux;function xk(){if(ux)return ng;ux=1;var n=fs(),e=ub(),t=$b(),r=mo(),i=Ob(),s=Vi(),o=qo(),a=db(),u=cb(),l=_G(),d=Ie(),c=Ro().fastKey,h=oi(),f=h.set,v=h.getterFor;return ng={getConstructor:function(p,b,y,g){var S=p(function(_,E){i(_,m),f(_,{type:b,index:n(null),first:null,last:null,size:0}),d||(_.size=0),s(E)||o(E,_[g],{that:_,AS_ENTRIES:y})}),m=S.prototype,w=v(b),O=function(_,E,$){var T=w(_),P=I(_,E),R,C;return P?P.value=$:(T.last=P={index:C=c(E,!0),key:E,value:$,previous:R=T.last,next:null,removed:!1},T.first||(T.first=P),R&&(R.next=P),d?T.size++:_.size++,C!=="F"&&(T.index[C]=P)),_},I=function(_,E){var $=w(_),T=c(E),P;if(T!=="F")return $.index[T];for(P=$.first;P;P=P.next)if(P.key===E)return P};return t(m,{clear:function(){for(var E=this,$=w(E),T=$.first;T;)T.removed=!0,T.previous&&(T.previous=T.previous.next=null),T=T.next;$.first=$.last=null,$.index=n(null),d?$.size=0:E.size=0},delete:function(_){var E=this,$=w(E),T=I(E,_);if(T){var P=T.next,R=T.previous;delete $.index[T.index],T.removed=!0,R&&(R.next=P),P&&(P.previous=R),$.first===T&&($.first=P),$.last===T&&($.last=R),d?$.size--:E.size--}return!!T},forEach:function(E){for(var $=w(this),T=r(E,arguments.length>1?arguments[1]:void 0),P;P=P?P.next:$.first;)for(T(P.value,P.key,this);P&&P.removed;)P=P.previous},has:function(E){return!!I(this,E)}}),t(m,y?{get:function(E){var $=I(this,E);return $&&$.value},set:function(E,$){return O(this,E===0?0:E,$)}}:{add:function(E){return O(this,E=E===0?0:E,E)}}),d&&e(m,"size",{configurable:!0,get:function(){return w(this).size}}),S},setStrong:function(p,b,y){var g=b+" Iterator",S=v(b),m=v(g);a(p,b,function(w,O){f(this,{type:g,target:w,state:S(w),kind:O,last:null})},function(){for(var w=m(this),O=w.kind,I=w.last;I&&I.removed;)I=I.previous;return!w.target||!(w.last=I=I?I.next:w.state.first)?(w.target=null,u(void 0,!0)):u(O==="keys"?I.key:O==="values"?I.value:[I.key,I.value],!1)},y?"entries":"values",!y,!0),l(b)}},ng}var lx;function wG(){if(lx)return KC;lx=1;var n=Ib(),e=xk();return n("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),KC}var dx;function EG(){return dx||(dx=1,wG()),GC}var cx={},sg,hx;function Dk(){return hx||(hx=1,sg=function(n,e){return e===1?function(t,r){return t[n](r)}:function(t,r,i){return t[n](r,i)}}),sg}var og,fx;function SG(){if(fx)return og;fx=1;var n=ut(),e=Dk(),t=n("Map");return og={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},og}var vx;function OG(){if(vx)return cx;vx=1;var n=z(),e=re(),t=er(),r=Qt(),i=qo(),s=SG(),o=Xi(),a=te(),u=s.Map,l=s.has,d=s.get,c=s.set,h=e([].push),f=o||a(function(){return u.groupBy("ab",function(v){return v}).get("a").length!==1});return n({target:"Map",stat:!0,forced:o||f},{groupBy:function(p,b){r(p),t(b);var y=new u,g=0;return i(p,function(S){var m=b(S,g++);l(y,m)?h(d(y,m),S):c(y,m,[S])}),y}}),cx}var px={},ag,gx;function IG(){if(gx)return ag;gx=1;var n=re(),e=Qi(),t=yt(),r=Qt(),i=n("".charAt),s=n("".charCodeAt),o=n("".slice),a=function(u){return function(l,d){var c=t(r(l)),h=e(d),f=c.length,v,p;return h<0||h>=f?u?"":void 0:(v=s(c,h),v<55296||v>56319||h+1===f||(p=s(c,h+1))<56320||p>57343?u?i(c,h):v:u?o(c,h,h+2):(v-55296<<10)+(p-56320)+65536)}};return ag={codeAt:a(!1),charAt:a(!0)},ag}var yx;function Tb(){if(yx)return px;yx=1;var n=IG().charAt,e=yt(),t=oi(),r=db(),i=cb(),s="String Iterator",o=t.set,a=t.getterFor(s);return r(String,"String",function(u){o(this,{type:s,string:e(u),index:0})},function(){var l=a(this),d=l.string,c=l.index,h;return c>=d.length?i(void 0,!0):(h=n(d,c),l.index+=h.length,i(h,!1))}),px}var ug,mx;function $G(){if(mx)return ug;mx=1,nn(),EG(),OG(),Tb();var n=oe();return ug=n.Map,ug}var lg,bx;function TG(){if(bx)return lg;bx=1;var n=$G();return sn(),lg=n,lg}var dg,_x;function PG(){return _x||(_x=1,dg=TG()),dg}var RG=PG(),Pb=G(RG);class qG{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},Te(this.options,this.defaultOptions)}setOptions(e){const t=["useDefaultGroups"];if(e!==void 0){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&ne(t).call(t,r)===-1){const i=e[r];this.add(r,i)}}}clear(){this._groups=new Pb,this._groupNames=[]}get(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this._groups.get(e);if(r===void 0&&t)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){const i=this._groupIndex%this._groupNames.length;++this._groupIndex,r={},r.color=this._groups.get(this._groupNames[i]),this._groups.set(e,r)}else{const i=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,r={},r.color=this._defaultGroups[i],this._groups.set(e,r)}return r}add(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}}var wx={},Ex;function CG(){if(Ex)return wx;Ex=1;var n=z();return n({target:"Number",stat:!0},{isNaN:function(t){return t!==t}}),wx}var cg,Sx;function xG(){if(Sx)return cg;Sx=1,CG();var n=oe();return cg=n.Number.isNaN,cg}var hg,Ox;function DG(){if(Ox)return hg;Ox=1;var n=xG();return hg=n,hg}var fg,Ix;function AG(){return Ix||(Ix=1,fg=DG()),fg}var MG=AG(),Om=G(MG),$x={},vg,Tx;function FG(){if(Tx)return vg;Tx=1;var n=ge(),e=n.isFinite;return vg=Number.isFinite||function(r){return typeof r=="number"&&e(r)},vg}var Px;function NG(){if(Px)return $x;Px=1;var n=z(),e=FG();return n({target:"Number",stat:!0},{isFinite:e}),$x}var pg,Rx;function kG(){if(Rx)return pg;Rx=1,NG();var n=oe();return pg=n.Number.isFinite,pg}var gg,qx;function BG(){if(qx)return gg;qx=1;var n=kG();return gg=n,gg}var yg,Cx;function jG(){return Cx||(Cx=1,yg=BG()),yg}var LG=jG(),Ar=G(LG),xx={},Dx;function zG(){if(Dx)return xx;Dx=1;var n=z(),e=_r().some,t=on(),r=t("some");return n({target:"Array",proto:!0,forced:!r},{some:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),xx}var mg,Ax;function WG(){if(Ax)return mg;Ax=1,zG();var n=Ue();return mg=n("Array","some"),mg}var bg,Mx;function HG(){if(Mx)return bg;Mx=1;var n=Ce(),e=WG(),t=Array.prototype;return bg=function(r){var i=r.some;return r===t||n(t,r)&&i===t.some?e:i},bg}var _g,Fx;function UG(){if(Fx)return _g;Fx=1;var n=HG();return _g=n,_g}var wg,Nx;function VG(){return Nx||(Nx=1,wg=UG()),wg}var GG=VG(),KG=G(GG),Eg={exports:{}},kx={},Bx;function YG(){if(Bx)return kx;Bx=1;var n=z(),e=Ie(),t=gt().f;return n({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),kx}var jx;function XG(){if(jx)return Eg.exports;jx=1,YG();var n=oe(),e=n.Object,t=Eg.exports=function(i,s,o){return e.defineProperty(i,s,o)};return e.defineProperty.sham&&(t.sham=!0),Eg.exports}var Sg,Lx;function Ak(){if(Lx)return Sg;Lx=1;var n=XG();return Sg=n,Sg}var Og,zx;function JG(){if(zx)return Og;zx=1;var n=Ak();return Og=n,Og}var Ig,Wx;function ZG(){if(Wx)return Ig;Wx=1;var n=JG();return Ig=n,Ig}var $g,Hx;function QG(){return Hx||(Hx=1,$g=ZG()),$g}var eK=QG(),tK=G(eK),Ux={},Vx;function rK(){if(Vx)return Ux;Vx=1;var n=xe(),e=gt().f,t=n("metadata"),r=Function.prototype;return r[t]===void 0&&e(r,t,{value:null}),Ux}var Gx={},Kx;function iK(){return Kx||(Kx=1,FN()),Gx}var Yx={},Xx;function nK(){return Xx||(Xx=1,NN()),Yx}var Jx={},Zx;function sK(){if(Zx)return Jx;Zx=1;var n=_e();return n("metadata"),Jx}var Tg,Qx;function oK(){if(Qx)return Tg;Qx=1;var n=zN();return rK(),iK(),nK(),sK(),Tg=n,Tg}var eD={},Pg,tD;function Mk(){if(tD)return Pg;tD=1;var n=ut(),e=re(),t=n("Symbol"),r=t.keyFor,i=e(t.prototype.valueOf);return Pg=t.isRegisteredSymbol||function(o){try{return r(i(o))!==void 0}catch{return!1}},Pg}var rD;function aK(){if(rD)return eD;rD=1;var n=z(),e=Mk();return n({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),eD}var iD={},Rg,nD;function Fk(){if(nD)return Rg;nD=1;for(var n=Ji(),e=ut(),t=re(),r=ls(),i=xe(),s=e("Symbol"),o=s.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),u=t(s.prototype.valueOf),l=n("wks"),d=0,c=a(s),h=c.length;d<h;d++)try{var f=c[d];r(s[f])&&i(f)}catch{}return Rg=function(p){if(o&&o(p))return!0;try{for(var b=u(p),y=0,g=a(l),S=g.length;y<S;y++)if(l[g[y]]==b)return!0}catch{}return!1},Rg}var sD;function uK(){if(sD)return iD;sD=1;var n=z(),e=Fk();return n({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:e}),iD}var oD={},aD;function lK(){if(aD)return oD;aD=1;var n=_e();return n("customMatcher"),oD}var uD={},lD;function dK(){if(lD)return uD;lD=1;var n=_e();return n("observable"),uD}var dD={},cD;function cK(){if(cD)return dD;cD=1;var n=z(),e=Mk();return n({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:e}),dD}var hD={},fD;function hK(){if(fD)return hD;fD=1;var n=z(),e=Fk();return n({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:e}),hD}var vD={},pD;function fK(){if(pD)return vD;pD=1;var n=_e();return n("matcher"),vD}var gD={},yD;function vK(){if(yD)return gD;yD=1;var n=_e();return n("metadataKey"),gD}var mD={},bD;function pK(){if(bD)return mD;bD=1;var n=_e();return n("patternMatch"),mD}var _D={},wD;function gK(){if(wD)return _D;wD=1;var n=_e();return n("replaceAll"),_D}var qg,ED;function yK(){if(ED)return qg;ED=1;var n=oK();return aK(),uK(),lK(),dK(),cK(),hK(),fK(),vK(),pK(),gK(),qg=n,qg}var Cg,SD;function mK(){return SD||(SD=1,Cg=yK()),Cg}var bK=mK(),xs=G(bK),xg,OD;function _K(){if(OD)return xg;OD=1,nn(),Tb(),kN();var n=Oo();return xg=n.f("iterator"),xg}var Dg,ID;function wK(){if(ID)return Dg;ID=1;var n=_K();return sn(),Dg=n,Dg}var Ag,$D;function EK(){if($D)return Ag;$D=1;var n=wK();return Ag=n,Ag}var Mg,TD;function SK(){if(TD)return Mg;TD=1;var n=EK();return Mg=n,Mg}var Fg,PD;function OK(){return PD||(PD=1,Fg=SK()),Fg}var IK=OK(),$K=G(IK);function zn(n){"@babel/helpers - typeof";return zn=typeof xs=="function"&&typeof $K=="symbol"?function(e){return typeof e}:function(e){return e&&typeof xs=="function"&&e.constructor===xs&&e!==xs.prototype?"symbol":typeof e},zn(n)}var Ng,RD;function TK(){if(RD)return Ng;RD=1,BN();var n=Oo();return Ng=n.f("toPrimitive"),Ng}var kg,qD;function PK(){if(qD)return kg;qD=1;var n=TK();return kg=n,kg}var Bg,CD;function RK(){if(CD)return Bg;CD=1;var n=PK();return Bg=n,Bg}var jg,xD;function qK(){if(xD)return jg;xD=1;var n=RK();return jg=n,jg}var Lg,DD;function CK(){return DD||(DD=1,Lg=qK()),Lg}var xK=CK(),DK=G(xK);function AK(n,e){if(zn(n)!="object"||!n)return n;var t=n[DK];if(t!==void 0){var r=t.call(n,e);if(zn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function MK(n){var e=AK(n,"string");return zn(e)=="symbol"?e:e+""}function Lt(n,e,t){return(e=MK(e))in n?tK(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var AD={},zg,MD;function FK(){if(MD)return zg;MD=1;var n=ge(),e=te(),t=re(),r=yt(),i=HN().trim,s=hb(),o=t("".charAt),a=n.parseFloat,u=n.Symbol,l=u&&u.iterator,d=1/a(s+"-0")!==-1/0||l&&!e(function(){a(Object(l))});return zg=d?function(h){var f=i(r(h)),v=a(f);return v===0&&o(f,0)==="-"?-0:v}:a,zg}var FD;function NK(){if(FD)return AD;FD=1;var n=z(),e=FK();return n({global:!0,forced:parseFloat!==e},{parseFloat:e}),AD}var Wg,ND;function kK(){if(ND)return Wg;ND=1,NK();var n=oe();return Wg=n.parseFloat,Wg}var Hg,kD;function BK(){if(kD)return Hg;kD=1;var n=kK();return Hg=n,Hg}var Ug,BD;function jK(){return BD||(BD=1,Ug=BK()),Ug}var LK=jK(),Nk=G(LK),jD={},LD;function zK(){if(LD)return jD;LD=1;var n=z(),e=te(),t=ab().f,r=e(function(){return!Object.getOwnPropertyNames(1)});return n({target:"Object",stat:!0,forced:r},{getOwnPropertyNames:t}),jD}var Vg,zD;function WK(){if(zD)return Vg;zD=1,zK();var n=oe(),e=n.Object;return Vg=function(r){return e.getOwnPropertyNames(r)},Vg}var Gg,WD;function HK(){if(WD)return Gg;WD=1;var n=WK();return Gg=n,Gg}var Kg,HD;function UK(){return HD||(HD=1,Kg=HK()),Kg}var VK=UK(),GK=G(VK),Yg,UD;function KK(){if(UD)return Yg;UD=1,MN();var n=oe();return Yg=n.Object.getOwnPropertySymbols,Yg}var Xg,VD;function YK(){if(VD)return Xg;VD=1;var n=KK();return Xg=n,Xg}var Jg,GD;function XK(){return GD||(GD=1,Jg=YK()),Jg}var JK=XK(),fr=G(JK),Zg={exports:{}},KD={},YD;function ZK(){if(YD)return KD;YD=1;var n=z(),e=te(),t=Pt(),r=yo().f,i=Ie(),s=!i||e(function(){r(1)});return n({target:"Object",stat:!0,forced:s,sham:!i},{getOwnPropertyDescriptor:function(a,u){return r(t(a),u)}}),KD}var XD;function QK(){if(XD)return Zg.exports;XD=1,ZK();var n=oe(),e=n.Object,t=Zg.exports=function(i,s){return e.getOwnPropertyDescriptor(i,s)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),Zg.exports}var Qg,JD;function e4(){if(JD)return Qg;JD=1;var n=QK();return Qg=n,Qg}var ey,ZD;function t4(){return ZD||(ZD=1,ey=e4()),ey}var r4=t4(),wr=G(r4),QD={},eA;function i4(){if(eA)return QD;eA=1;var n=z(),e=Ie(),t=P3(),r=Pt(),i=yo(),s=wo();return n({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(a){for(var u=r(a),l=i.f,d=t(u),c={},h=0,f,v;d.length>h;)v=l(u,f=d[h++]),v!==void 0&&s(c,f,v);return c}}),QD}var ty,tA;function n4(){if(tA)return ty;tA=1,i4();var n=oe();return ty=n.Object.getOwnPropertyDescriptors,ty}var ry,rA;function s4(){if(rA)return ry;rA=1;var n=n4();return ry=n,ry}var iy,iA;function o4(){return iA||(iA=1,iy=s4()),iy}var a4=o4(),vr=G(a4),ny={exports:{}},nA={},sA;function u4(){if(sA)return nA;sA=1;var n=z(),e=Ie(),t=ob().f;return n({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),nA}var oA;function l4(){if(oA)return ny.exports;oA=1,u4();var n=oe(),e=n.Object,t=ny.exports=function(i,s){return e.defineProperties(i,s)};return e.defineProperties.sham&&(t.sham=!0),ny.exports}var sy,aA;function d4(){if(aA)return sy;aA=1;var n=l4();return sy=n,sy}var oy,uA;function c4(){return uA||(uA=1,oy=d4()),oy}var h4=c4(),Co=G(h4),ay,lA;function f4(){return lA||(lA=1,ay=Ak()),ay}var v4=f4(),xo=G(v4);function Rb(n,e){const t=["node","edge","label"];let r=!0;const i=ir(e,"chosen");if(typeof i=="boolean")r=i;else if(typeof i=="object"){if(ne(t).call(t,n)===-1)throw new Error("choosify: subOption '"+n+"' should be one of '"+t.join("', '")+"'");const s=ir(e,["chosen",n]);(typeof s=="boolean"||typeof s=="function")&&(r=s)}return r}function Im(n,e,t){if(n.width<=0||n.height<=0)return!1;if(t!==void 0){const s={x:e.x-t.x,y:e.y-t.y};if(t.angle!==0){const o=-t.angle;e={x:Math.cos(o)*s.x-Math.sin(o)*s.y,y:Math.sin(o)*s.x+Math.cos(o)*s.y}}else e=s}const r=n.x+n.width,i=n.y+n.width;return n.left<e.x&&r>e.x&&n.top<e.y&&i>e.y}function Ys(n){return typeof n=="string"&&n!==""}function kk(n,e,t,r){let i=r.x,s=r.y;if(typeof r.distanceToBorder=="function"){const o=r.distanceToBorder(n,e),a=Math.sin(e)*o,u=Math.cos(e)*o;u===o?(i+=o,s=r.y):a===o?(i=r.x,s-=o):(i+=u,s-=a)}else r.shape.width>r.shape.height?(i=r.x+r.shape.width*.5,s=r.y-t):(i=r.x+t,s=r.y-r.shape.height*.5);return{x:i,y:s}}var uy,dA;function p4(){if(dA)return uy;dA=1,nn();var n=Ue();return uy=n("Array","values"),uy}var ly,cA;function g4(){if(cA)return ly;cA=1;var n=p4();return ly=n,ly}var dy,hA;function y4(){if(hA)return dy;hA=1,sn();var n=tn(),e=He(),t=Ce(),r=g4(),i=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return dy=function(o){var a=o.values;return o===i||t(i,o)&&a===i.values||e(s,n(o))?r:a},dy}var cy,fA;function m4(){return fA||(fA=1,cy=y4()),cy}var b4=m4(),Bk=G(b4);class _4{constructor(e){this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}_add(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});let i=t;(t===void 0||t==="")&&(i=" ");const s=this.measureText(i,r),o=Te({},Bk(s));o.text=t,o.width=s.width,o.mod=r,(t===void 0||t==="")&&(o.width=0),this.lines[e].blocks.push(o),this.lines[e].width+=o.width}curWidth(){const 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++){const t=this.lines[e];let r=0;if(t.blocks!==void 0)for(let i=0;i<t.blocks.length;i++){const s=t.blocks[i];r<s.height&&(r=s.height)}t.height=r}}determineLabelSize(){let e=0,t=0;for(let r=0;r<this.lines.length;r++){const i=this.lines[r];i.width>e&&(e=i.width),t+=i.height}this.width=e,this.height=t}removeEmptyBlocks(){const e=[];for(let t=0;t<this.lines.length;t++){const r=this.lines[t];if(r.blocks.length===0||t===this.lines.length-1&&r.width===0)continue;const i={};Te(i,r),i.blocks=[];let s;const o=[];for(let a=0;a<r.blocks.length;a++){const u=r.blocks[a];u.width!==0?o.push(u):s===void 0&&(s=u)}o.length===0&&s!==void 0&&o.push(s),i.blocks=o,e.push(i)}return e}finalize(){this.determineLineHeights(),this.determineLabelSize();const e=this.removeEmptyBlocks();return{width:this.width,height:this.height,lines:e}}}const w4={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/};class vA{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(" "),this.spacing=!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+=" ",this.spacing=!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;const[r,i]=this.prepareRegExp(e),s=r.test(this.text.substr(this.position,i));return s&&t&&(this.position+=i-1),s}parseEndTag(e,t,r){let i=this.mod()===e;return e==="mono"?i=i&&this.mono:i=i&&!this.mono,i&&this.match(t)?(r!==void 0?(this.position===this.text.length-1||this.match(r,!1))&&this.unsetTag(e):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,r;if(e instanceof RegExp)r=e,t=1;else{const i=w4[e];i!==void 0?r=i:r=new RegExp(e),t=e.length}return[r,t]}}class E4{constructor(e,t,r,i){this.ctx=e,this.parent=t,this.selected=r,this.hover=i;const s=(o,a)=>{if(o===void 0)return 0;const u=this.parent.getFormattingValues(e,r,i,a);let l=0;return o!==""&&(l=this.ctx.measureText(o).width),{width:l,values:u}};this.lines=new _4(s)}process(e){if(!Ys(e))return this.lines.finalize();const t=this.parent.fontOptions;e=e.replace(/\r\n/g,`
|
|
82
|
+
`),e=e.replace(/\r/g,`
|
|
83
|
+
`);const r=String(e).split(`
|
|
84
|
+
`),i=r.length;if(t.multi)for(let s=0;s<i;s++){const o=this.splitBlocks(r[s],t.multi);if(o!==void 0){if(o.length===0){this.lines.newLine("");continue}if(t.maxWdt>0)for(let a=0;a<o.length;a++){const u=o[a].mod,l=o[a].text;this.splitStringIntoLines(l,u,!0)}else for(let a=0;a<o.length;a++){const u=o[a].mod,l=o[a].text;this.lines.append(l,u)}this.lines.newLine()}}else if(t.maxWdt>0)for(let s=0;s<i;s++)this.splitStringIntoLines(r[s]);else for(let s=0;s<i;s++)this.lines.newLine(r[s]);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){const t=new vA(e),r=i=>/&/.test(i)?(t.replace(t.text,"<","<")||t.replace(t.text,"&","&")||t.add("&"),!0):!1;for(;t.position<t.text.length;){const i=t.text.charAt(t.position);t.parseWS(i)||/</.test(i)&&(t.parseStartTag("bold","<b>")||t.parseStartTag("ital","<i>")||t.parseStartTag("mono","<code>")||t.parseEndTag("bold","</b>")||t.parseEndTag("ital","</i>")||t.parseEndTag("mono","</code>"))||r(i)||t.add(i),t.position++}return t.emitBlock(),t.blocks}splitMarkdownBlocks(e){const t=new vA(e);let r=!0;const i=s=>/\\/.test(s)?(t.position<this.text.length+1&&(t.position++,s=this.text.charAt(t.position),/ \t/.test(s)?t.spacing=!0:(t.add(s),r=!1)),!0):!1;for(;t.position<t.text.length;){const s=t.text.charAt(t.position);t.parseWS(s)||i(s)||(r||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(s),r=!1),t.position++}return t.emitBlock(),t.blocks}splitBlocks(e,t){const r=this.decodeMarkupSystem(t);if(r==="none")return[{text:e,mod:"normal"}];if(r==="markdown")return this.splitMarkdownBlocks(e);if(r==="html")return this.splitHtmlBlocks(e)}overMaxWidth(e){const t=this.ctx.measureText(e).width;return this.lines.curWidth()+t>this.parent.fontOptions.maxWdt}getLongestFit(e){let t="",r=0;for(;r<e.length;){const s=t+(t===""?"":" ")+e[r];if(this.overMaxWidth(s))break;t=s,r++}return r}getLongestFitWord(e){let t=0;for(;t<e.length&&!this.overMaxWidth(qt(e).call(e,0,t));)t++;return t}splitStringIntoLines(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;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 i=e.split("\r");for(;i.length>0;){let s=this.getLongestFit(i);if(s===0){const o=i[0],a=this.getLongestFitWord(o);this.lines.newLine(qt(o).call(o,0,a),t),i[0]=qt(o).call(o,a)}else{let o=s;i[s-1]===" "?s--:i[o]===" "&&o++;const a=qt(i).call(i,0,s).join("");s==i.length&&r?this.lines.append(a,t):this.lines.newLine(a,t),i=qt(i).call(i,o)}}}}const wn=["bold","ital","boldital","mono"];class Ii{constructor(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;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=r}setOptions(e){if(this.elementOptions=e,this.initFontOptions(e.font),Ys(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"){const t=e.font.size;t!==void 0&&(this.baseSize=t)}}}initFontOptions(e){if(Z(wn,t=>{this.fontOptions[t]={}}),Ii.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}Z(e,(t,r)=>{t!=null&&typeof t!="object"&&(this.fontOptions[r]=t)})}static parseFontString(e,t){if(!t||typeof t!="string")return!1;const r=t.split(" ");return e.size=+r[0].replace("px",""),e.face=r[1],e.color=r[2],!0}constrain(e){const t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},r=ir(e,"widthConstraint");if(typeof r=="number")t.maxWdt=Number(r),t.minWdt=Number(r);else if(typeof r=="object"){const s=ir(e,["widthConstraint","maximum"]);typeof s=="number"&&(t.maxWdt=Number(s));const o=ir(e,["widthConstraint","minimum"]);typeof o=="number"&&(t.minWdt=Number(o))}const i=ir(e,"heightConstraint");if(typeof i=="number")t.minHgt=Number(i);else if(typeof i=="object"){const s=ir(e,["heightConstraint","minimum"]);typeof s=="number"&&(t.minHgt=Number(s));const o=ir(e,["heightConstraint","valign"]);typeof o=="string"&&(o==="top"||o==="bottom")&&(t.valign=o)}return t}update(e,t){this.setOptions(e,!0),this.propagateFonts(t),he(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=Rb("label",t)}adjustSizes(e){const t=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t);const r=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=r)}addFontOptionsToPile(e,t){for(let r=0;r<t.length;++r)this.addFontToPile(e,t[r])}addFontToPile(e,t){if(t===void 0||t.font===void 0||t.font===null)return;const r=t.font;e.push(r)}getBasicOptions(e){const t={};for(let r=0;r<e.length;++r){let i=e[r];const s={};Ii.parseFontString(s,i)&&(i=s),Z(i,(o,a)=>{o!==void 0&&(Object.prototype.hasOwnProperty.call(t,a)||(ne(wn).call(wn,a)!==-1?t[a]={}:t[a]=o))})}return t}getFontOption(e,t,r){let i;for(let s=0;s<e.length;++s){const o=e[s];if(Object.prototype.hasOwnProperty.call(o,t)){if(i=o[t],i==null)continue;const a={};if(Ii.parseFontString(a,i)&&(i=a),Object.prototype.hasOwnProperty.call(i,r))return i[r]}}if(Object.prototype.hasOwnProperty.call(this.fontOptions,r))return this.fontOptions[r];throw new Error("Did not find value for multi-font for property: '"+r+"'")}getFontOptions(e,t){const r={},i=["color","size","face","mod","vadjust"];for(let s=0;s<i.length;++s){const o=i[s];r[o]=this.getFontOption(e,t,o)}return r}propagateFonts(e){const t=[];this.addFontOptionsToPile(t,e),this.fontOptions=this.getBasicOptions(t);for(let r=0;r<wn.length;++r){const i=wn[r],s=this.fontOptions[i],o=this.getFontOptions(t,i);Z(o,(a,u)=>{s[u]=a}),s.size=Number(s.size),s.vadjust=Number(s.vadjust)}}draw(e,t,r,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label===void 0)return;let a=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&a<this.elementOptions.scaling.label.drawThreshold-1||(a>=this.elementOptions.scaling.label.maxVisible&&(a=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,i,s,t,r,o),this._drawBackground(e),this._drawText(e,t,this.size.yLine,o,a))}_drawBackground(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;const t=this.getSize();e.fillRect(t.left,t.top,t.width,t.height)}}_drawText(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",s=arguments.length>4?arguments[4]:void 0;[t,r]=this._setAlignment(e,t,r,i),e.textAlign="left",t=t-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(r-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(r+=(this.size.height-this.size.labelHeight)/2));for(let o=0;o<this.lineCount;o++){const a=this.lines[o];if(a&&a.blocks){let u=0;this.isEdgeLabel||this.fontOptions.align==="center"?u+=(this.size.width-a.width)/2:this.fontOptions.align==="right"&&(u+=this.size.width-a.width);for(let l=0;l<a.blocks.length;l++){const d=a.blocks[l];e.font=d.font;const[c,h]=this._getColor(d.color,s,d.strokeColor);d.strokeWidth>0&&(e.lineWidth=d.strokeWidth,e.strokeStyle=h,e.lineJoin="round"),e.fillStyle=c,d.strokeWidth>0&&e.strokeText(d.text,t+u,r+d.vadjust),e.fillText(d.text,t+u,r+d.vadjust),u+=d.width}r+=a.height}}}_setAlignment(e,t,r,i){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){t=0,r=0;const s=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",r-=2*s):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",r+=2*s):e.textBaseline="middle"}else e.textBaseline=i;return[t,r]}_getColor(e,t,r){let i=e||"#000000",s=r||"#ffffff";if(t<=this.elementOptions.scaling.label.drawThreshold){const o=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)));i=ct(i,o),s=ct(s,o)}return[i,s]}getTextSize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,t,r),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}getSize(){let t=this.size.left,r=this.size.top-.5*2;if(this.isEdgeLabel){const s=-this.size.width*.5;switch(this.fontOptions.align){case"middle":t=s,r=-this.size.height*.5;break;case"top":t=s,r=-(this.size.height+2);break;case"bottom":t=s,r=2;break}}return{left:t,top:r,width:this.size.width,height:this.size.height}}calculateLabelSize(e,t,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,t,r),this.size.left=i-this.size.width*.5,this.size.top=s-this.size.height*.5,this.size.yLine=s+(1-this.lineCount)*.5*this.fontOptions.size,o==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}getFormattingValues(e,t,r,i){const s=function(u,l,d){return l==="normal"?d==="mod"?"":u[d]:u[l][d]!==void 0?u[l][d]:u[d]},o={color:s(this.fontOptions,i,"color"),size:s(this.fontOptions,i,"size"),face:s(this.fontOptions,i,"face"),mod:s(this.fontOptions,i,"mod"),vadjust:s(this.fontOptions,i,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(t||r)&&(i==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?o.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(o,this.elementOptions.id,t,r));let a="";return o.mod!==void 0&&o.mod!==""&&(a+=o.mod+" "),a+=o.size+"px "+o.face,e.font=a.replace(/"/g,""),o.font=e.font,o.height=o.size,o}differentState(e,t){return e!==this.selectedState||t!==this.hoverState}_processLabelText(e,t,r,i){return new E4(e,this,t,r).process(i)}_processLabel(e,t,r){if(this.labelDirty===!1&&!this.differentState(t,r))return;const i=this._processLabelText(e,t,r,this.elementOptions.label);this.fontOptions.minWdt>0&&i.width<this.fontOptions.minWdt&&(i.width=this.fontOptions.minWdt),this.size.labelHeight=i.height,this.fontOptions.minHgt>0&&i.height<this.fontOptions.minHgt&&(i.height=this.fontOptions.minHgt),this.lines=i.lines,this.lineCount=i.lines.length,this.size.width=i.width,this.size.height=i.height,this.selectedState=t,this.hoverState=r,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)}}class ui{constructor(e,t,r){this.body=t,this.labelModule=r,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){const r=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)))+r}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 r=t.borderDashes;r===!0&&(r=[5,15]),e.setLineDash(r)}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?e.setLineDash([0]):(console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1))}needsRefresh(e,t){return this.refreshNeeded===!0?(this.refreshNeeded=!1,!0):this.width===void 0||this.labelModule.differentState(e,t)}initContextForDraw(e,t){const r=t.borderWidth/this.body.view.scale;e.lineWidth=Math.min(this.width,r),e.strokeStyle=t.borderColor,e.fillStyle=t.color}performStroke(e,t){const r=t.borderWidth/this.body.view.scale;e.save(),r>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),gs(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,r,i,s){r!==void 0&&this.resize(r,i,s),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,r,i,s){this._updateBoundingBox(e,t,r,i,s)}getDimensionsFromLabel(e,t,r){this.textSize=this.labelModule.getTextSize(e,t,r);let i=this.textSize.width,s=this.textSize.height;const o=14;return i===0&&(i=o,s=o),{width:i,height:s}}}let S4=class extends ui{constructor(e,t,r){super(e,t,r),this._setMargins(r)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,r)){const i=this.getDimensionsFromLabel(e,t,r);this.width=i.width+this.margin.right+this.margin.left,this.height=i.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}draw(e,t,r,i,s,o){this.resize(e,i,s),this.left=t-this.width/2,this.top=r-this.height/2,this.initContextForDraw(e,o),ON(e,this.left,this.top,this.width,this.height,o.borderRadius),this.performFill(e,o),this.updateBoundingBox(t,r,e,i,s),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,i,s)}updateBoundingBox(e,t,r,i,s){this._updateBoundingBox(e,t,r,i,s);const o=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(o)}distanceToBorder(e,t){e&&this.resize(e);const r=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+r}};class qb extends ui{constructor(e,t,r){super(e,t,r),this.labelOffset=0,this.selected=!1}setOptions(e,t,r){this.options=e,t===void 0&&r===void 0||this.setImages(t,r)}setImages(e,t){t&&this.selected?(this.imageObj=t,this.imageObjAlt=e):(this.imageObj=e,this.imageObjAlt=t)}switchImages(e){const t=e&&!this.selected||!e&&this.selected;if(this.selected=e,this.imageObjAlt!==void 0&&t){const r=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=r}}_getImagePadding(){const e={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){const 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 r=1,i=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?r=this.imageObj.width/this.imageObj.height:i=this.imageObj.height/this.imageObj.width),e=this.options.size*2*r,t=this.options.size*2*i}else{const r=this._getImagePadding();e=this.imageObj.width+r.left+r.right,t=this.imageObj.height+r.top+r.bottom}this.width=e,this.height=t,this.radius=.5*this.width}_drawRawCircle(e,t,r,i){this.initContextForDraw(e,i),ib(e,t,r,i.size),this.performFill(e,i)}_drawImageAtPosition(e,t){if(this.imageObj.width!=0){e.globalAlpha=t.opacity!==void 0?t.opacity:1,this.enableShadow(e,t);let r=1;this.options.shapeProperties.interpolation===!0&&(r=this.imageObj.width/this.width/this.body.view.scale);const i=this._getImagePadding(),s=this.left+i.left,o=this.top+i.top,a=this.width-i.left-i.right,u=this.height-i.top-i.bottom;this.imageObj.drawImageAtPosition(e,r,s,o,a,u),this.disableShadow(e,t)}}_drawImageLabel(e,t,r,i,s){let o=0;if(this.height!==void 0){o=this.height*.5;const u=this.labelModule.getTextSize(e,i,s);u.lineCount>=1&&(o+=u.height/2)}const a=r+o;this.options.label&&(this.labelOffset=o),this.labelModule.draw(e,t,a,i,s,"hanging")}}let O4=class extends qb{constructor(e,t,r){super(e,t,r),this._setMargins(r)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,r)){const i=this.getDimensionsFromLabel(e,t,r),s=Math.max(i.width+this.margin.right+this.margin.left,i.height+this.margin.top+this.margin.bottom);this.options.size=s/2,this.width=s,this.height=s,this.radius=this.width/2}}draw(e,t,r,i,s,o){this.resize(e,i,s),this.left=t-this.width/2,this.top=r-this.height/2,this._drawRawCircle(e,t,r,o),this.updateBoundingBox(t,r),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,r,i,s)}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}};class I4 extends qb{constructor(e,t,r,i,s){super(e,t,r),this.setImages(i,s)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,r=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){const s=this.options.size*2;this.width=s,this.height=s,this.radius=.5*this.width;return}this.needsRefresh(t,r)&&this._resizeImage()}draw(e,t,r,i,s,o){this.switchImages(i),this.resize();let a=t,u=r;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=r,a+=this.width/2,u+=this.height/2):(this.left=t-this.width/2,this.top=r-this.height/2),this._drawRawCircle(e,a,u,o),e.save(),e.clip(),this._drawImageAtPosition(e,o),e.restore(),this._drawImageLabel(e,a,u,i,s),this.updateBoundingBox(t,r)}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}}class Er extends ui{constructor(e,t,r){super(e,t,r)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(t,r)){var s,o;this.labelModule.getTextSize(e,t,r);const a=2*i.size;this.width=(s=this.customSizeWidth)!==null&&s!==void 0?s:a,this.height=(o=this.customSizeHeight)!==null&&o!==void 0?o:a,this.radius=.5*this.width}}_drawShape(e,t,r,i,s,o,a,u){return this.resize(e,o,a,u),this.left=i-this.width/2,this.top=s-this.height/2,this.initContextForDraw(e,u),LH(t)(e,i,s,u.size),this.performFill(e,u),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(e.font=(o?"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,i,s)),{drawExternalLabel:()=>{if(this.options.label!==void 0){this.labelModule.calculateLabelSize(e,o,a,i,s,"hanging");const l=s+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(e,i,l,o,a,"hanging")}this.updateBoundingBox(i,s)}}}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 pA(n,e){var t=Ee(n);if(fr){var r=fr(n);e&&(r=tt(r).call(r,function(i){return wr(n,i).enumerable})),t.push.apply(t,r)}return t}function $4(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?le(t=pA(Object(i),!0)).call(t,function(s){Lt(n,s,i[s])}):vr?Co(n,vr(i)):le(r=pA(Object(i))).call(r,function(s){xo(n,s,wr(i,s))})}return n}class T4 extends Er{constructor(e,t,r,i){super(e,t,r,i),this.ctxRenderer=i}draw(e,t,r,i,s,o){this.resize(e,i,s,o),this.left=t-this.width/2,this.top=r-this.height/2,e.save();const a=this.ctxRenderer({ctx:e,id:this.options.id,x:t,y:r,state:{selected:i,hover:s},style:$4({},o),label:this.options.label});if(a.drawNode!=null&&a.drawNode(),e.restore(),a.drawExternalLabel){const u=a.drawExternalLabel;a.drawExternalLabel=()=>{e.save(),u(),e.restore()}}return a.nodeDimensions&&(this.customSizeWidth=a.nodeDimensions.width,this.customSizeHeight=a.nodeDimensions.height),a}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class P4 extends ui{constructor(e,t,r){super(e,t,r),this._setMargins(r)}resize(e,t,r){if(this.needsRefresh(t,r)){const s=this.getDimensionsFromLabel(e,t,r).width+this.margin.right+this.margin.left;this.width=s,this.height=s,this.radius=this.width/2}}draw(e,t,r,i,s,o){this.resize(e,i,s),this.left=t-this.width/2,this.top=r-this.height/2,this.initContextForDraw(e,o),IN(e,t-this.width/2,r-this.height/2,this.width,this.height),this.performFill(e,o),this.updateBoundingBox(t,r,e,i,s),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,i,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let R4=class extends Er{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,s,o){return this._drawShape(e,"diamond",4,t,r,i,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class q4 extends Er{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,s,o){return this._drawShape(e,"circle",2,t,r,i,s,o)}distanceToBorder(e){return e&&this.resize(e),this.options.size}}class gA extends ui{constructor(e,t,r){super(e,t,r)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(t,r)){const i=this.getDimensionsFromLabel(e,t,r);this.height=i.height*2,this.width=i.width+i.height,this.radius=.5*this.width}}draw(e,t,r,i,s,o){this.resize(e,i,s),this.left=t-this.width*.5,this.top=r-this.height*.5,this.initContextForDraw(e,o),pm(e,this.left,this.top,this.width,this.height),this.performFill(e,o),this.updateBoundingBox(t,r,e,i,s),this.labelModule.draw(e,t,r,i,s)}distanceToBorder(e,t){e&&this.resize(e);const r=this.width*.5,i=this.height*.5,s=Math.sin(t)*r,o=Math.cos(t)*i;return r*i/Math.sqrt(s*s+o*o)}}class C4 extends ui{constructor(e,t,r){super(e,t,r),this._setMargins(r)}resize(e,t,r){this.needsRefresh(t,r)&&(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,r,i,s,o){return this.resize(e,i,s),this.options.icon.size=this.options.icon.size||50,this.left=t-this.width/2,this.top=r-this.height/2,this._icon(e,t,r,i,s,o),{drawExternalLabel:()=>{this.options.label!==void 0&&this.labelModule.draw(e,this.left+this.iconSize.width/2+this.margin.left,r+this.height/2+5,i),this.updateBoundingBox(t,r)}}}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,r,i,s,o){const a=Number(this.options.icon.size);this.options.icon.code!==void 0?(e.font=[this.options.icon.weight!=null?this.options.icon.weight:i?"bold":"",(this.options.icon.weight!=null&&i?5:0)+a+"px",this.options.icon.face].join(" "),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",this.enableShadow(e,o),e.fillText(this.options.icon.code,t,r),this.disableShadow(e,o)):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.")}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let x4=class extends qb{constructor(e,t,r,i,s){super(e,t,r),this.setImages(i,s)}resize(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,r=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){const s=this.options.size*2;this.width=s,this.height=s;return}this.needsRefresh(t,r)&&this._resizeImage()}draw(e,t,r,i,s,o){e.save(),this.switchImages(i),this.resize();let a=t,u=r;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=t,this.top=r,a+=this.width/2,u+=this.height/2):(this.left=t-this.width/2,this.top=r-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){const l=this.options.borderWidth,d=this.options.borderWidthSelected||2*this.options.borderWidth,c=(i?d:l)/this.body.view.scale;e.lineWidth=Math.min(this.width,c),e.beginPath();let h=i?this.options.color.highlight.border:s?this.options.color.hover.border:this.options.color.border,f=i?this.options.color.highlight.background:s?this.options.color.hover.background:this.options.color.background;o.opacity!==void 0&&(h=ct(h,o.opacity),f=ct(f,o.opacity)),e.strokeStyle=h,e.fillStyle=f,e.rect(this.left-.5*e.lineWidth,this.top-.5*e.lineWidth,this.width+e.lineWidth,this.height+e.lineWidth),gs(e).call(e),this.performStroke(e,o),e.closePath()}this._drawImageAtPosition(e,o),this._drawImageLabel(e,a,u,i,s),this.updateBoundingBox(t,r),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)}};class D4 extends Er{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,s,o){return this._drawShape(e,"square",2,t,r,i,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class A4 extends Er{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,s,o){return this._drawShape(e,"hexagon",4,t,r,i,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class M4 extends Er{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,s,o){return this._drawShape(e,"star",4,t,r,i,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}class F4 extends ui{constructor(e,t,r){super(e,t,r),this._setMargins(r)}resize(e,t,r){this.needsRefresh(t,r)&&(this.textSize=this.labelModule.getTextSize(e,t,r),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,r,i,s,o){this.resize(e,i,s),this.left=t-this.width/2,this.top=r-this.height/2,this.enableShadow(e,o),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,i,s),this.disableShadow(e,o),this.updateBoundingBox(t,r,e,i,s)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}let N4=class extends Er{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,s,o){return this._drawShape(e,"triangle",3,t,r,i,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}};class k4 extends Er{constructor(e,t,r){super(e,t,r)}draw(e,t,r,i,s,o){return this._drawShape(e,"triangleDown",3,t,r,i,s,o)}distanceToBorder(e,t){return this._distanceToBorder(e,t)}}function yA(n,e){var t=Ee(n);if(fr){var r=fr(n);e&&(r=tt(r).call(r,function(i){return wr(n,i).enumerable})),t.push.apply(t,r)}return t}function mA(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?le(t=yA(Object(i),!0)).call(t,function(s){Lt(n,s,i[s])}):vr?Co(n,vr(i)):le(r=yA(Object(i))).call(r,function(s){xo(n,s,wr(i,s))})}return n}class pe{constructor(e,t,r,i,s,o){this.options=dr(s),this.globalOptions=s,this.defaultOptions=o,this.body=t,this.edges=[],this.id=void 0,this.imagelist=r,this.grouplist=i,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 Ii(this.body,this.options,!1),this.setOptions(e)}attachEdge(e){var t;ne(t=this.edges).call(t,e)===-1&&this.edges.push(e)}detachEdge(e){var t;const r=ne(t=this.edges).call(t,e);if(r!=-1){var i;Ut(i=this.edges).call(i,r,1)}}setOptions(e){const t=this.options.shape;if(!e)return;if(typeof e.color<"u"&&(this._localColor=e.color),e.id!==void 0&&(this.id=e.id),this.id===void 0)throw new Error("Node must have an id");pe.checkMass(e,this.id),e.x!==void 0&&(e.x===null?(this.x=void 0,this.predefinedPosition=!1):(this.x=Ot(e.x),this.predefinedPosition=!0)),e.y!==void 0&&(e.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=Ot(e.y),this.predefinedPosition=!0)),e.size!==void 0&&(this.baseSize=e.size),e.value!==void 0&&(e.value=Nk(e.value)),pe.parseOptions(this.options,e,!0,this.globalOptions,this.grouplist);const r=[e,this.options,this.defaultOptions];return this.chooser=Rb("node",r),this._load_images(),this.updateLabelModule(e),e.opacity!==void 0&&pe.checkOpacity(e.opacity)&&(this.options.opacity=e.opacity),this.updateShape(t),e.hidden!==void 0||e.physics!==void 0}_load_images(){if((this.options.shape==="circularImage"||this.options.shape==="image")&&this.options.image===void 0)throw new Error("Option image must be defined for node type '"+this.options.shape+"'");if(this.options.image!==void 0){if(this.imagelist===void 0)throw new Error("Internal Error: No images provided");if(typeof this.options.image=="string")this.imageObj=this.imagelist.load(this.options.image,this.options.brokenImage,this.id);else{if(this.options.image.unselected===void 0)throw new Error("No unselected image provided");this.imageObj=this.imagelist.load(this.options.image.unselected,this.options.brokenImage,this.id),this.options.image.selected!==void 0?this.imageObjAlt=this.imagelist.load(this.options.image.selected,this.options.brokenImage,this.id):this.imageObjAlt=void 0}}}static checkOpacity(e){return 0<=e&&e<=1}static checkCoordinateOrigin(e){return e===void 0||e==="center"||e==="top-left"}static updateGroupOptions(e,t,r){var i;if(r===void 0)return;const s=e.group;if(t!==void 0&&t.group!==void 0&&s!==t.group)throw new Error("updateGroupOptions: group values in options don't match.");if(!(typeof s=="number"||typeof s=="string"&&s!=""))return;const a=r.get(s);a.opacity!==void 0&&t.opacity===void 0&&(pe.checkOpacity(a.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+a.opacity),a.opacity=void 0));const u=tt(i=GK(t)).call(i,l=>t[l]!=null);u.push("font"),Gs(u,e,a),e.color=_m(e.color)}static parseOptions(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=arguments.length>4?arguments[4]:void 0;if(Gs(["color","fixed","shadow"],e,t,r),pe.checkMass(t),e.opacity!==void 0&&(pe.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),t.opacity!==void 0&&(pe.checkOpacity(t.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity),t.opacity=void 0)),t.shapeProperties&&!pe.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),dt(e,t,"shadow",i),t.color!==void 0&&t.color!==null){const a=_m(t.color);mk(e.color,a)}else r===!0&&t.color===null&&(e.color=dr(i.color));t.fixed!==void 0&&t.fixed!==null&&(typeof t.fixed=="boolean"?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(t.fixed.x!==void 0&&typeof t.fixed.x=="boolean"&&(e.fixed.x=t.fixed.x),t.fixed.y!==void 0&&typeof t.fixed.y=="boolean"&&(e.fixed.y=t.fixed.y))),r===!0&&t.font===null&&(e.font=dr(i.font)),pe.updateGroupOptions(e,t,s),t.scaling!==void 0&&dt(e.scaling,t.scaling,"label",i.scaling)}getFormattingValues(){const e={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};if(this.selected||this.hover?this.chooser===!0?this.selected?(this.options.borderWidthSelected!=null?e.borderWidth=this.options.borderWidthSelected:e.borderWidth*=2,e.color=this.options.color.highlight.background,e.borderColor=this.options.color.highlight.border,e.shadow=this.options.shadow.enabled):this.hover&&(e.color=this.options.color.hover.background,e.borderColor=this.options.color.hover.border,e.shadow=this.options.shadow.enabled):typeof this.chooser=="function"&&(this.chooser(e,this.options.id,this.selected,this.hover),e.shadow===!1&&(e.shadowColor!==this.options.shadow.color||e.shadowSize!==this.options.shadow.size||e.shadowX!==this.options.shadow.x||e.shadowY!==this.options.shadow.y)&&(e.shadow=!0)):e.shadow=this.options.shadow.enabled,this.options.opacity!==void 0){const t=this.options.opacity;e.borderColor=ct(e.borderColor,t),e.color=ct(e.color,t),e.shadowColor=ct(e.shadowColor,t)}return e}updateLabelModule(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),pe.updateGroupOptions(this.options,mA(mA({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);const t=this.grouplist.get(this.options.group,!1),r=[e,this.options,t,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 S4(this.options,this.body,this.labelModule);break;case"circle":this.shape=new O4(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new I4(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new T4(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new P4(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new R4(this.options,this.body,this.labelModule);break;case"dot":this.shape=new q4(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new gA(this.options,this.body,this.labelModule);break;case"icon":this.shape=new C4(this.options,this.body,this.labelModule);break;case"image":this.shape=new x4(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new D4(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new A4(this.options,this.body,this.labelModule);break;case"star":this.shape=new M4(this.options,this.body,this.labelModule);break;case"text":this.shape=new F4(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new N4(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new k4(this.options,this.body,this.labelModule);break;default:this.shape=new gA(this.options,this.body,this.labelModule);break}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,r){if(this.options.value!==void 0){const i=this.options.scaling.customScalingFunction(e,t,r,this.options.value),s=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const o=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+i*o}this.options.size=this.options.scaling.min+i*s}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}draw(e){const 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){const t=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,t)}getItemsOnPoint(e){const t=[];return this.labelModule.visible()&&Im(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),Im(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 r="";t!==void 0&&(r=" in node id: "+t),console.error("%cNegative or zero mass disallowed"+r+", setting mass to 1.",Ek),e.mass=1}}}class B4{constructor(e,t,r,i){var s;if(this.body=e,this.images=t,this.groups=r,this.layoutEngine=i,this.body.functions.createNode=D(s=this.create).call(s,this),this.nodesListeners={add:(o,a)=>{this.add(a.items)},update:(o,a)=>{this.update(a.items,a.data,a.oldData)},remove:(o,a)=>{this.remove(a.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(o,a,u,l){if(a===o)return .5;{const d=1/(a-o);return Math.max(0,(l-o)*d)}}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1,coordinateOrigin:"center"},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=dr(this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e,t;this.body.emitter.on("refreshNodes",D(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",D(t=this.refresh).call(t,this)),this.body.emitter.on("destroy",()=>{Z(this.nodesListeners,(r,i)=>{this.body.data.nodes&&this.body.data.nodes.off(i,r)}),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(pe.parseOptions(this.options,e),e.opacity!==void 0&&(Om(e.opacity)||!Ar(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(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(const t of Ee(this.body.nodes))this.body.nodes[t].updateLabelModule(),this.body.nodes[t].needsRefresh();if(e.size!==void 0)for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].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]:!1;const r=this.body.data.nodes;if(gN("id",e))this.body.data.nodes=e;else if(Se(e))this.body.data.nodes=new zs,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new zs;else throw new TypeError("Array or DataSet expected");if(r&&Z(this.nodesListeners,function(i,s){r.off(s,i)}),this.body.nodes={},this.body.data.nodes){const i=this;Z(this.nodesListeners,function(o,a){i.body.data.nodes.on(a,o)});const s=this.body.data.nodes.getIds();this.add(s,!0)}t===!1&&this.body.emitter.emit("_dataChanged")}add(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r;const i=[];for(let s=0;s<e.length;s++){r=e[s];const o=this.body.data.nodes.get(r),a=this.create(o);i.push(a),this.body.nodes[r]=a}this.layoutEngine.positionInitially(i),t===!1&&this.body.emitter.emit("_dataChanged")}update(e,t,r){const i=this.body.nodes;let s=!1;for(let o=0;o<e.length;o++){const a=e[o];let u=i[a];const l=t[o];u!==void 0?u.setOptions(l)&&(s=!0):(s=!0,u=this.create(l),i[a]=u)}!s&&r!==void 0&&(s=KG(t).call(t,function(o,a){const u=r[a];return u&&u.level!==o.level})),s===!0?this.body.emitter.emit("_dataChanged"):this.body.emitter.emit("_dataUpdated")}remove(e){const t=this.body.nodes;for(let r=0;r<e.length;r++){const i=e[r];delete t[i]}this.body.emitter.emit("_dataChanged")}create(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pe;return new t(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}refresh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Z(this.body.nodes,(t,r)=>{const i=this.body.data.nodes.get(r);i!==void 0&&(e===!0&&t.setOptions({x:null,y:null}),t.setOptions({fixed:!1}),t.setOptions(i))})}getPositions(e){const t={};if(e!==void 0){if(Se(e)===!0){for(let r=0;r<e.length;r++)if(this.body.nodes[e[r]]!==void 0){const i=this.body.nodes[e[r]];t[e[r]]={x:Math.round(i.x),y:Math.round(i.y)}}}else if(this.body.nodes[e]!==void 0){const r=this.body.nodes[e];t[e]={x:Math.round(r.x),y:Math.round(r.y)}}}else for(let r=0;r<this.body.nodeIndices.length;r++){const i=this.body.nodes[this.body.nodeIndices[r]];t[this.body.nodeIndices[r]]={x:Math.round(i.x),y:Math.round(i.y)}}return t}getPosition(e){if(e==null)throw new TypeError("No id was specified for getPosition method.");if(this.body.nodes[e]==null)throw new ReferenceError("NodeId provided for getPosition does not exist. Provided: ".concat(e));return{x:Math.round(this.body.nodes[e].x),y:Math.round(this.body.nodes[e].y)}}storePositions(){const e=[],t=this.body.data.nodes.getDataSet();for(const r of t.get()){const i=r.id,s=this.body.nodes[i],o=Math.round(s.x),a=Math.round(s.y);(r.x!==o||r.y!==a)&&e.push({id:i,x:o,y:a})}t.update(e)}getBoundingBox(e){if(this.body.nodes[e]!==void 0)return this.body.nodes[e].shape.boundingBox}getConnectedNodes(e,t){const r=[];if(this.body.nodes[e]!==void 0){const i=this.body.nodes[e],s={};for(let o=0;o<i.edges.length;o++){const a=i.edges[o];t!=="to"&&a.toId==i.id?s[a.fromId]===void 0&&(r.push(a.fromId),s[a.fromId]=!0):t!=="from"&&a.fromId==i.id&&s[a.toId]===void 0&&(r.push(a.toId),s[a.toId]=!0)}}return r}getConnectedEdges(e){const t=[];if(this.body.nodes[e]!==void 0){const r=this.body.nodes[e];for(let i=0;i<r.edges.length;i++)t.push(r.edges[i].id)}else console.error("NodeId provided for getConnectedEdges does not exist. Provided: ",e);return t}moveNode(e,t,r){this.body.nodes[e]!==void 0?(this.body.nodes[e].x=Number(t),this.body.nodes[e].y=Number(r),Vt(()=>{this.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}var bA={},_A;function j4(){if(_A)return bA;_A=1;var n=z(),e=Math.hypot,t=Math.abs,r=Math.sqrt,i=!!e&&e(1/0,NaN)!==1/0;return n({target:"Math",stat:!0,arity:2,forced:i},{hypot:function(o,a){for(var u=0,l=0,d=arguments.length,c=0,h,f;l<d;)h=t(arguments[l++]),c<h?(f=c/h,u=u*f*f+1,c=h):h>0?(f=h/c,u+=f*f):u+=h;return c===1/0?1/0:c*r(u)}}),bA}var hy,wA;function L4(){if(wA)return hy;wA=1,j4();var n=oe();return hy=n.Math.hypot,hy}var fy,EA;function z4(){if(EA)return fy;EA=1;var n=L4();return fy=n,fy}var vy,SA;function W4(){return SA||(SA=1,vy=z4()),vy}var H4=W4(),U4=G(H4);class Oe{static transform(e,t){Se(e)||(e=[e]);const r=t.point.x,i=t.point.y,s=t.angle,o=t.length;for(let a=0;a<e.length;++a){const u=e[a],l=u.x*Math.cos(s)-u.y*Math.sin(s),d=u.x*Math.sin(s)+u.y*Math.cos(s);u.x=r+o*l,u.y=i+o*d}}static drawPath(e,t){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(let r=1;r<t.length;++r)e.lineTo(t[r].x,t[r].y);e.closePath()}}let V4=class extends Oe{static draw(e,t){if(t.image){e.save(),e.translate(t.point.x,t.point.y),e.rotate(Math.PI/2+t.angle);const r=t.imageWidth!=null?t.imageWidth:t.image.width,i=t.imageHeight!=null?t.imageHeight:t.image.height;t.image.drawImageAtPosition(e,1,-r/2,0,r,i),e.restore()}return!1}};class G4 extends Oe{static draw(e,t){const r=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return Oe.transform(r,t),Oe.drawPath(e,r),!0}}class K4{static draw(e,t){const r=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return Oe.transform(r,t),Oe.drawPath(e,r),!0}}class Y4{static draw(e,t){const r={x:-.4,y:0};Oe.transform(r,t),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";const i=Math.PI,s=t.angle-i/2,o=t.angle+i/2;return e.beginPath(),e.arc(r.x,r.y,t.length*.4,s,o,!1),e.stroke(),!0}}class X4{static draw(e,t){const r={x:-.3,y:0};Oe.transform(r,t),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";const i=Math.PI,s=t.angle+i/2,o=t.angle+3*i/2;return e.beginPath(),e.arc(r.x,r.y,t.length*.4,s,o,!1),e.stroke(),!0}}class J4{static draw(e,t){const r=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return Oe.transform(r,t),Oe.drawPath(e,r),!0}}class Z4{static draw(e,t){const r=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return Oe.transform(r,t),Oe.drawPath(e,r),!0}}class Q4{static draw(e,t){const r={x:-.4,y:0};return Oe.transform(r,t),ib(e,r.x,r.y,t.length*.4),!0}}class e6{static draw(e,t){const r=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return Oe.transform(r,t),Oe.drawPath(e,r),!0}}class t6{static draw(e,t){const r=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return Oe.transform(r,t),Oe.drawPath(e,r),!0}}class r6{static draw(e,t){const r=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return Oe.transform(r,t),Oe.drawPath(e,r),!0}}class i6{static draw(e,t){const r=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return Oe.transform(r,t),Oe.drawPath(e,r),!0}}class jk{static draw(e,t){let r;switch(t.type&&(r=t.type.toLowerCase()),r){case"image":return V4.draw(e,t);case"circle":return Q4.draw(e,t);case"box":return t6.draw(e,t);case"crow":return K4.draw(e,t);case"curve":return Y4.draw(e,t);case"diamond":return r6.draw(e,t);case"inv_curve":return X4.draw(e,t);case"triangle":return J4.draw(e,t);case"inv_triangle":return Z4.draw(e,t);case"bar":return e6.draw(e,t);case"vee":return i6.draw(e,t);case"arrow":default:return G4.draw(e,t)}}}function OA(n,e){var t=Ee(n);if(fr){var r=fr(n);e&&(r=tt(r).call(r,function(i){return wr(n,i).enumerable})),t.push.apply(t,r)}return t}function IA(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?le(t=OA(Object(i),!0)).call(t,function(s){Lt(n,s,i[s])}):vr?Co(n,vr(i)):le(r=OA(Object(i))).call(r,function(s){xo(n,s,wr(i,s))})}return n}class Lk{constructor(e,t,r){Lt(this,"color",{}),Lt(this,"colorDirty",!0),Lt(this,"hoverWidth",1.5),Lt(this,"selectionWidth",2),this._body=t,this._labelModule=r,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,r,i){let s=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._drawDashedLine(e,t,s):this._drawLine(e,t,s)}_drawLine(e,t,r,i,s){if(this.from!=this.to)this._line(e,t,r,i,s);else{const[o,a,u]=this._getCircleData(e);this._circle(e,t,o,a,u)}}_drawDashedLine(e,t,r,i,s){e.lineCap="round";const o=Se(t.dashes)?t.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(o),e.lineDashOffset=0,this.from!=this.to)this._line(e,t,r);else{const[a,u,l]=this._getCircleData(e);this._circle(e,t,a,u,l)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)$N(e,this.from.x,this.from.y,this.to.x,this.to.y,o);else{const[a,u,l]=this._getCircleData(e);this._circle(e,t,a,u,l)}this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}}findBorderPosition(e,t,r){return this.from!=this.to?this._findBorderPosition(e,t,r):this._findBorderPositionCircle(e,t,r)}findBorderPositions(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};{var t;const[r,i]=qt(t=this._getCircleData(e)).call(t,0,2);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){const t=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);const r=kk(e,this.options.selfReference.angle,t,this.from);return[r.x,r.y,t]}_pointOnCircle(e,t,r,i){const s=i*2*Math.PI;return{x:e+r*Math.cos(s),y:t-r*Math.sin(s)}}_findBorderPositionCircle(e,t,r){const i=r.x,s=r.y;let o=r.low,a=r.high;const u=r.direction,l=10,d=this.options.selfReference.size,c=.05;let h,f=(o+a)*.5,v=0;this.options.arrowStrikethrough===!0&&(u===-1?v=this.options.endPointOffset.from:u===1&&(v=this.options.endPointOffset.to));let p=0;do{f=(o+a)*.5,h=this._pointOnCircle(i,s,d,f);const b=Math.atan2(e.y-h.y,e.x-h.x),y=e.distanceToBorder(t,b)+v,g=Math.sqrt(Math.pow(h.x-e.x,2)+Math.pow(h.y-e.y,2)),S=y-g;if(Math.abs(S)<c)break;S>0?u>0?o=f:a=f:u>0?a=f:o=f,++p}while(o<=a&&p<l);return IA(IA({},h),{},{t:f})}getLineWidth(e,t){return e===!0?Math.max(this.selectionWidth,.3/this._body.view.scale):t===!0?Math.max(this.hoverWidth,.3/this._body.view.scale):Math.max(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){const r=e.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y);let i=this.from.options.color.highlight.border,s=this.to.options.color.highlight.border;return this.from.selected===!1&&this.to.selected===!1?(i=ct(this.from.options.color.border,t.opacity),s=ct(this.to.options.color.border,t.opacity)):this.from.selected===!0&&this.to.selected===!1?s=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(i=this.from.options.color.border),r.addColorStop(0,i),r.addColorStop(1,s),r}return t.inheritsColor==="to"?ct(this.to.options.color.border,t.opacity):ct(this.from.options.color.border,t.opacity)}else return ct(t.color,t.opacity)}_circle(e,t,r,i,s){this.enableShadow(e,t);let o=0,a=Math.PI*2;if(!this.options.selfReference.renderBehindTheNode){const u=this.options.selfReference.angle,l=this.options.selfReference.angle+Math.PI,d=this._findBorderPositionCircle(this.from,e,{x:r,y:i,low:u,high:l,direction:-1}),c=this._findBorderPositionCircle(this.from,e,{x:r,y:i,low:u,high:l,direction:1});o=Math.atan2(d.y-i,d.x-r),a=Math.atan2(c.y-i,c.x-r)}e.beginPath(),e.arc(r,i,s,o,a,!1),e.stroke(),this.disableShadow(e,t)}getDistanceToEdge(e,t,r,i,s,o){if(this.from!=this.to)return this._getDistanceToEdge(e,t,r,i,s,o);{const[a,u,l]=this._getCircleData(void 0),d=a-s,c=u-o;return Math.abs(Math.sqrt(d*d+c*c)-l)}}_getDistanceToLine(e,t,r,i,s,o){const a=r-e,u=i-t,l=a*a+u*u;let d=((s-e)*a+(o-t)*u)/l;d>1?d=1:d<0&&(d=0);const c=e+d*a,h=t+d*u,f=c-s,v=h-o;return Math.sqrt(f*f+v*v)}getArrowData(e,t,r,i,s,o){let a,u,l,d,c,h,f;const v=o.width;t==="from"?(l=this.from,d=this.to,c=o.fromArrowScale<0,h=Math.abs(o.fromArrowScale),f=o.fromArrowType):t==="to"?(l=this.to,d=this.from,c=o.toArrowScale<0,h=Math.abs(o.toArrowScale),f=o.toArrowType):(l=this.to,d=this.from,c=o.middleArrowScale<0,h=Math.abs(o.middleArrowScale),f=o.middleArrowType);const p=15*h+3*v;if(l!=d){const S=U4(l.x-d.x,l.y-d.y),m=p/S;if(t!=="middle")if(this.options.smooth.enabled===!0){const w=this._findBorderPosition(l,e,{via:r}),O=this.getPoint(w.t+m*(t==="from"?1:-1),r);a=Math.atan2(w.y-O.y,w.x-O.x),u=w}else a=Math.atan2(l.y-d.y,l.x-d.x),u=this._findBorderPosition(l,e);else{const w=(c?-m:m)/2,O=this.getPoint(.5+w,r),I=this.getPoint(.5-w,r);a=Math.atan2(O.y-I.y,O.x-I.x),u=this.getPoint(.5,r)}}else{const[S,m,w]=this._getCircleData(e);if(t==="from"){const O=this.options.selfReference.angle,I=this.options.selfReference.angle+Math.PI,_=this._findBorderPositionCircle(this.from,e,{x:S,y:m,low:O,high:I,direction:-1});a=_.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,u=_}else if(t==="to"){const O=this.options.selfReference.angle,I=this.options.selfReference.angle+Math.PI,_=this._findBorderPositionCircle(this.from,e,{x:S,y:m,low:O,high:I,direction:1});a=_.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,u=_}else{const O=this.options.selfReference.angle/(2*Math.PI);u=this._pointOnCircle(S,m,w,O),a=O*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}const b=u.x-p*.9*Math.cos(a),y=u.y-p*.9*Math.sin(a);return{point:u,core:{x:b,y},angle:a,length:p,type:f}}drawArrowHead(e,t,r,i,s){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width,jk.draw(e,s)&&(this.enableShadow(e,t),gs(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){const r={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=r.strokeStyle,e.lineWidth=r.lineWidth,e.dashes=r.dashes,this.setStrokeDashed(e,t.dashes)}}setStrokeDashed(e,t){if(t!==!1)if(e.setLineDash!==void 0){const r=Se(t)?t:[5,5];e.setLineDash(r)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}function $A(n,e){var t=Ee(n);if(fr){var r=fr(n);e&&(r=tt(r).call(r,function(i){return wr(n,i).enumerable})),t.push.apply(t,r)}return t}function TA(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?le(t=$A(Object(i),!0)).call(t,function(s){Lt(n,s,i[s])}):vr?Co(n,vr(i)):le(r=$A(Object(i))).call(r,function(s){xo(n,s,wr(i,s))})}return n}class Cb extends Lk{constructor(e,t,r){super(e,t,r)}_findBorderPositionBezier(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates();const i=10,s=.2;let o=!1,a=1,u=0,l=this.to,d,c,h=this.options.endPointOffset?this.options.endPointOffset.to:0;e.id===this.from.id&&(l=this.from,o=!0,h=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(h=0);let f=0;do{c=(u+a)*.5,d=this.getPoint(c,r);const v=Math.atan2(l.y-d.y,l.x-d.x),p=l.distanceToBorder(t,v)+h,b=Math.sqrt(Math.pow(d.x-l.x,2)+Math.pow(d.y-l.y,2)),y=p-b;if(Math.abs(y)<s)break;y<0?o===!1?u=c:a=c:o===!1?a=c:u=c,++f}while(u<=a&&f<i);return TA(TA({},d),{},{t:c})}_getDistanceToBezierEdge(e,t,r,i,s,o,a){let u=1e9,l,d,c,h,f,v=e,p=t;for(d=1;d<10;d++)c=.1*d,h=Math.pow(1-c,2)*e+2*c*(1-c)*a.x+Math.pow(c,2)*r,f=Math.pow(1-c,2)*t+2*c*(1-c)*a.y+Math.pow(c,2)*i,d>0&&(l=this._getDistanceToLine(v,p,h,f,s,o),u=l<u?l:u),v=h,p=f;return u}_bezierCurve(e,t,r,i){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),r!=null&&r.x!=null?i!=null&&i.x!=null?e.bezierCurveTo(r.x,r.y,i.x,i.y,this.toPoint.x,this.toPoint.y):e.quadraticCurveTo(r.x,r.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()}}class PA extends Cb{constructor(e,t,r){super(e,t,r),Lt(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.via.setOptions({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):!1}setupSupportNode(){if(this.via===void 0){const 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,r){this._bezierCurve(e,t,r)}_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){const[r,i,s]=this._getCircleData(),o=2*Math.PI*(1-e);return{x:r+s*Math.sin(o),y:i+s-s*(1-Math.cos(o))}}else return{x:Math.pow(1-e,2)*this.fromPoint.x+2*e*(1-e)*t.x+Math.pow(e,2)*this.toPoint.x,y:Math.pow(1-e,2)*this.fromPoint.y+2*e*(1-e)*t.y+Math.pow(e,2)*this.toPoint.y}}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t,this.via)}_getDistanceToEdge(e,t,r,i,s,o){return this._getDistanceToBezierEdge(e,t,r,i,s,o,this.via)}}class RA extends Cb{constructor(e,t,r){super(e,t,r)}_line(e,t,r){this._bezierCurve(e,t,r)}getViaNode(){return this._getViaCoordinates()}_getViaCoordinates(){const e=this.options.smooth.roundness,t=this.options.smooth.type;let r=Math.abs(this.from.x-this.to.x),i=Math.abs(this.from.y-this.to.y);if(t==="discrete"||t==="diagonalCross"){let s,o;r<=i?s=o=e*i:s=o=e*r,this.from.x>this.to.x&&(s=-s),this.from.y>=this.to.y&&(o=-o);let a=this.from.x+s,u=this.from.y+o;return t==="discrete"&&(r<=i?a=r<e*i?this.from.x:a:u=i<e*r?this.from.y:u),{x:a,y:u}}else if(t==="straightCross"){let s=(1-e)*r,o=(1-e)*i;return r<=i?(s=0,this.from.y<this.to.y&&(o=-o)):(this.from.x<this.to.x&&(s=-s),o=0),{x:this.to.x+s,y:this.to.y+o}}else if(t==="horizontal"){let s=(1-e)*r;return this.from.x<this.to.x&&(s=-s),{x:this.to.x+s,y:this.from.y}}else if(t==="vertical"){let s=(1-e)*i;return this.from.y<this.to.y&&(s=-s),{x:this.from.x,y:this.to.y+s}}else if(t==="curvedCW"){r=this.to.x-this.from.x,i=this.from.y-this.to.y;const s=Math.sqrt(r*r+i*i),o=Math.PI,u=(Math.atan2(i,r)+(e*.5+.5)*o)%(2*o);return{x:this.from.x+(e*.5+.5)*s*Math.sin(u),y:this.from.y+(e*.5+.5)*s*Math.cos(u)}}else if(t==="curvedCCW"){r=this.to.x-this.from.x,i=this.from.y-this.to.y;const s=Math.sqrt(r*r+i*i),o=Math.PI,u=(Math.atan2(i,r)+(-e*.5+.5)*o)%(2*o);return{x:this.from.x+(e*.5+.5)*s*Math.sin(u),y:this.from.y+(e*.5+.5)*s*Math.cos(u)}}else{let s,o;r<=i?s=o=e*i:s=o=e*r,this.from.x>this.to.x&&(s=-s),this.from.y>=this.to.y&&(o=-o);let a=this.from.x+s,u=this.from.y+o;return r<=i?this.from.x<=this.to.x?a=this.to.x<a?this.to.x:a:a=this.to.x>a?this.to.x:a:this.from.y>=this.to.y?u=this.to.y>u?this.to.y:u:u=this.to.y<u?this.to.y:u,{x:a,y:u}}}_findBorderPosition(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(e,t,r.via)}_getDistanceToEdge(e,t,r,i,s,o){let a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(e,t,r,i,s,o,a)}getPoint(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const r=e,i=Math.pow(1-r,2)*this.fromPoint.x+2*r*(1-r)*t.x+Math.pow(r,2)*this.toPoint.x,s=Math.pow(1-r,2)*this.fromPoint.y+2*r*(1-r)*t.y+Math.pow(r,2)*this.toPoint.y;return{x:i,y:s}}}class n6 extends Cb{constructor(e,t,r){super(e,t,r)}_getDistanceToBezierEdge2(e,t,r,i,s,o,a,u){let l=1e9,d=e,c=t;const h=[0,0,0,0];for(let f=1;f<10;f++){const v=.1*f;h[0]=Math.pow(1-v,3),h[1]=3*v*Math.pow(1-v,2),h[2]=3*Math.pow(v,2)*(1-v),h[3]=Math.pow(v,3);const p=h[0]*e+h[1]*a.x+h[2]*u.x+h[3]*r,b=h[0]*t+h[1]*a.y+h[2]*u.y+h[3]*i;if(f>0){const y=this._getDistanceToLine(d,c,p,b,s,o);l=y<l?y:l}d=p,c=b}return l}}class qA extends n6{constructor(e,t,r){super(e,t,r)}_line(e,t,r){const i=r[0],s=r[1];this._bezierCurve(e,t,i,s)}_getViaCoordinates(){const e=this.from.x-this.to.x,t=this.from.y-this.to.y;let r,i,s,o;const a=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"?(i=this.from.y,o=this.to.y,r=this.from.x-a*e,s=this.to.x+a*e):(i=this.from.y-a*t,o=this.to.y+a*t,r=this.from.x,s=this.to.x),[{x:r,y:i},{x:s,y:o}]}getViaNode(){return this._getViaCoordinates()}_findBorderPosition(e,t){return this._findBorderPositionBezier(e,t)}_getDistanceToEdge(e,t,r,i,s,o){let[a,u]=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge2(e,t,r,i,s,o,a,u)}getPoint(e){let[t,r]=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const i=e,s=[Math.pow(1-i,3),3*i*Math.pow(1-i,2),3*Math.pow(i,2)*(1-i),Math.pow(i,3)],o=s[0]*this.fromPoint.x+s[1]*t.x+s[2]*r.x+s[3]*this.toPoint.x,a=s[0]*this.fromPoint.y+s[1]*t.y+s[2]*r.y+s[3]*this.toPoint.y;return{x:o,y:a}}}class CA extends Lk{constructor(e,t,r){super(e,t,r)}_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 r=this.to,i=this.from;e.id===this.from.id&&(r=this.from,i=this.to);const s=Math.atan2(r.y-i.y,r.x-i.x),o=r.x-i.x,a=r.y-i.y,u=Math.sqrt(o*o+a*a),l=e.distanceToBorder(t,s),d=(u-l)/u;return{x:(1-d)*i.x+d*r.x,y:(1-d)*i.y+d*r.y,t:0}}_getDistanceToEdge(e,t,r,i,s,o){return this._getDistanceToLine(e,t,r,i,s,o)}}class cr{constructor(e,t,r,i,s){if(t===void 0)throw new Error("No body provided");this.options=dr(i),this.globalOptions=i,this.defaultOptions=s,this.body=t,this.imagelist=r,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new Ii(this.body,this.options,!0),this.setOptions(e)}setOptions(e){if(!e)return;let t=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;cr.parseOptions(this.options,e,!0,this.globalOptions),e.id!==void 0&&(this.id=e.id),e.from!==void 0&&(this.fromId=e.from),e.to!==void 0&&(this.toId=e.to),e.title!==void 0&&(this.title=e.title),e.value!==void 0&&(e.value=Nk(e.value));const r=[e,this.options,this.defaultOptions];return this.chooser=Rb("edge",r),this.updateLabelModule(e),t=this.updateEdgeType()||t,this._setInteractionWidths(),this.connect(),t}static parseOptions(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(un(["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"],e,t,r),t.endPointOffset!==void 0&&t.endPointOffset.from!==void 0&&(Ar(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=i.endPointOffset.from!==void 0?i.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),t.endPointOffset!==void 0&&t.endPointOffset.to!==void 0&&(Ar(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=i.endPointOffset.to!==void 0?i.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),Ys(t.label)?e.label=t.label:Ys(e.label)||(e.label=void 0),dt(e,t,"smooth",i),dt(e,t,"shadow",i),dt(e,t,"background",i),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:r===!0&&t.dashes===null&&(e.dashes=kr(i.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),dt(e.scaling,t.scaling,"label",i.scaling)):r===!0&&t.scaling===null&&(e.scaling=kr(i.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){const a=t.arrows.toLowerCase();e.arrows.to.enabled=ne(a).call(a,"to")!=-1,e.arrows.middle.enabled=ne(a).call(a,"middle")!=-1,e.arrows.from.enabled=ne(a).call(a,"from")!=-1}else if(typeof t.arrows=="object")dt(e.arrows,t.arrows,"to",i.arrows),dt(e.arrows,t.arrows,"middle",i.arrows),dt(e.arrows,t.arrows,"from",i.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+ps(t.arrows));else r===!0&&t.arrows===null&&(e.arrows=kr(i.arrows));if(t.color!==void 0&&t.color!==null){const a=Si(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,u=e.color;if(s)he(u,i.color,!1,r);else for(const l in u)Object.prototype.hasOwnProperty.call(u,l)&&delete u[l];if(Si(u))u.color=u,u.highlight=u,u.hover=u,u.inherit=!1,a.opacity===void 0&&(u.opacity=1);else{let l=!1;a.color!==void 0&&(u.color=a.color,l=!0),a.highlight!==void 0&&(u.highlight=a.highlight,l=!0),a.hover!==void 0&&(u.hover=a.hover,l=!0),a.inherit!==void 0&&(u.inherit=a.inherit),a.opacity!==void 0&&(u.opacity=Math.min(1,Math.max(0,a.opacity))),l===!0?u.inherit=!1:u.inherit===void 0&&(u.inherit="from")}}else r===!0&&t.color===null&&(e.color=dr(i.color));r===!0&&t.font===null&&(e.font=dr(i.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(){const e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,t=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,r=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,i=this.options.color.inherit,s={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:r,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:i?void 0:this.options.color.color,inheritsColor:i,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){const o=this.options.selectionWidth;typeof o=="function"?s.width=o(s.width):typeof o=="number"&&(s.width+=o),s.width=Math.max(s.width,.3/this.body.view.scale),s.color=this.options.color.highlight,s.shadow=this.options.shadow.enabled}else if(this.hover){const o=this.options.hoverWidth;typeof o=="function"?s.width=o(s.width):typeof o=="number"&&(s.width+=o),s.width=Math.max(s.width,.3/this.body.view.scale),s.color=this.options.color.hover,s.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(s,this.options.id,this.selected,this.hover),s.color!==void 0&&(s.inheritsColor=!1),s.shadow===!1&&(s.shadowColor!==this.options.shadow.color||s.shadowSize!==this.options.shadow.size||s.shadowX!==this.options.shadow.x||s.shadowY!==this.options.shadow.y)&&(s.shadow=!0));else s.shadow=this.options.shadow.enabled,s.width=Math.max(s.width,.3/this.body.view.scale);return s}updateLabelModule(e){const 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(){const e=this.options.smooth;let t=!1,r=!0;return this.edgeType!==void 0&&((this.edgeType instanceof PA&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof qA&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof RA&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof CA&&e.type.enabled===!1)&&(r=!1),r===!0&&(t=this.cleanup())),r===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new PA(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new qA(this.options,this.body,this.labelModule):this.edgeType=new RA(this.options,this.body,this.labelModule):this.edgeType=new CA(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),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}getTitle(){return this.title}isSelected(){return this.selected}getValue(){return this.options.value}setValueRange(e,t,r){if(this.options.value!==void 0){const i=this.options.scaling.customScalingFunction(e,t,r,this.options.value),s=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const o=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+i*o}this.options.width=this.options.scaling.min+i*s}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){const t=this.getFormattingValues();if(t.hidden)return;const r=this.edgeType.getViaNode();this.edgeType.drawLine(e,t,this.selected,this.hover,r),this.drawLabel(e,r)}drawArrows(e){const t=this.getFormattingValues();if(t.hidden)return;const r=this.edgeType.getViaNode(),i={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,t.fromArrow&&(i.from=this.edgeType.getArrowData(e,"from",r,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.fromPoint=i.from.core),t.fromArrowSrc&&(i.from.image=this.imagelist.load(t.fromArrowSrc)),t.fromArrowImageWidth&&(i.from.imageWidth=t.fromArrowImageWidth),t.fromArrowImageHeight&&(i.from.imageHeight=t.fromArrowImageHeight)),t.toArrow&&(i.to=this.edgeType.getArrowData(e,"to",r,this.selected,this.hover,t),t.arrowStrikethrough===!1&&(this.edgeType.toPoint=i.to.core),t.toArrowSrc&&(i.to.image=this.imagelist.load(t.toArrowSrc)),t.toArrowImageWidth&&(i.to.imageWidth=t.toArrowImageWidth),t.toArrowImageHeight&&(i.to.imageHeight=t.toArrowImageHeight)),t.middleArrow&&(i.middle=this.edgeType.getArrowData(e,"middle",r,this.selected,this.hover,t),t.middleArrowSrc&&(i.middle.image=this.imagelist.load(t.middleArrowSrc)),t.middleArrowImageWidth&&(i.middle.imageWidth=t.middleArrowImageWidth),t.middleArrowImageHeight&&(i.middle.imageHeight=t.middleArrowImageHeight)),t.fromArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,i.from),t.middleArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,i.middle),t.toArrow&&this.edgeType.drawArrowHead(e,t,this.selected,this.hover,i.to)}drawLabel(e,t){if(this.options.label!==void 0){const r=this.from,i=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);let s;if(r.id!=i.id){this.labelModule.pointToSelf=!1,s=this.edgeType.getPoint(.5,t),e.save();const o=this._getRotation(e);o.angle!=0&&(e.translate(o.x,o.y),e.rotate(o.angle)),this.labelModule.draw(e,s.x,s.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;const o=kk(e,this.options.selfReference.angle,this.options.selfReference.size,r);s=this._pointOnCircle(o.x,o.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,s.x,s.y,this.selected,this.hover)}}}getItemsOnPoint(e){const t=[];if(this.labelModule.visible()){const i=this._getRotation();Im(this.labelModule.getSize(),e,i)&&t.push({edgeId:this.id,labelId:0})}const r={left:e.x,top:e.y};return this.isOverlappingWith(r)&&t.push({edgeId:this.id}),t}isOverlappingWith(e){if(this.connected){const r=this.from.x,i=this.from.y,s=this.to.x,o=this.to.y,a=e.left,u=e.top;return this.edgeType.getDistanceToEdge(r,i,s,o,a,u)<10}else return!1}_getRotation(e){const t=this.edgeType.getViaNode(),r=this.edgeType.getPoint(.5,t);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,r.x,r.y);const i={x:r.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align==="horizontal")return i;const s=this.from.y-this.to.y,o=this.from.x-this.to.x;let a=Math.atan2(s,o);return(a<-1&&o<0||a>0&&o<0)&&(a+=Math.PI),i.angle=a,i}_pointOnCircle(e,t,r,i){return{x:e+r*Math.cos(i),y:t-r*Math.sin(i)}}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}}class s6{constructor(e,t,r){var i;this.body=e,this.images=t,this.groups=r,this.body.functions.createEdge=D(i=this.create).call(i,this),this.edgesListeners={add:(s,o)=>{this.add(o.items)},update:(s,o)=>{this.update(o.items)},remove:(s,o)=>{this.remove(o.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(s,o,a,u){if(o===s)return .5;{const l=1/(o-s);return Math.max(0,(u-s)*l)}}},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},he(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e=this,t,r;this.body.emitter.on("_forceDisableDynamicCurves",function(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;i==="dynamic"&&(i="continuous");let o=!1;for(const a in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,a)){const u=e.body.edges[a],l=e.body.data.edges.get(a);if(l!=null){const d=l.smooth;d!==void 0&&d.enabled===!0&&d.type==="dynamic"&&(i===void 0?u.setOptions({smooth:!1}):u.setOptions({smooth:{type:i}}),o=!0)}}s===!0&&o===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",()=>{this.reconnectEdges()}),this.body.emitter.on("refreshEdges",D(t=this.refresh).call(t,this)),this.body.emitter.on("refresh",D(r=this.refresh).call(r,this)),this.body.emitter.on("destroy",()=>{Z(this.edgesListeners,(i,s)=>{this.body.data.edges&&this.body.data.edges.off(s,i)}),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){cr.parseOptions(this.options,e,!0,this.defaultOptions,!0);let t=!1;if(e.smooth!==void 0)for(const r in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,r)&&(t=this.body.edges[r].updateEdgeType()||t);if(e.font!==void 0)for(const r in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,r)&&this.body.edges[r].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]:!1;const r=this.body.data.edges;if(gN("id",e))this.body.data.edges=e;else if(Se(e))this.body.data.edges=new zs,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new zs;else throw new TypeError("Array or DataSet expected");if(r&&Z(this.edgesListeners,(i,s)=>{r.off(s,i)}),this.body.edges={},this.body.data.edges){Z(this.edgesListeners,(s,o)=>{this.body.data.edges.on(o,s)});const i=this.body.data.edges.getIds();this.add(i,!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]:!1;const r=this.body.edges,i=this.body.data.edges;for(let s=0;s<e.length;s++){const o=e[s],a=r[o];a&&a.disconnect();const u=i.get(o,{showInternalIds:!0});r[o]=this.create(u)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),t===!1&&this.body.emitter.emit("_dataChanged")}update(e){const t=this.body.edges,r=this.body.data.edges;let i=!1;for(let s=0;s<e.length;s++){const o=e[s],a=r.get(o),u=t[o];u!==void 0?(u.disconnect(),i=u.setOptions(a)||i,u.connect()):(this.body.edges[o]=this.create(a),i=!0)}i===!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;const r=this.body.edges;Z(e,i=>{const s=r[i];s!==void 0&&s.remove()}),t&&this.body.emitter.emit("_dataChanged")}refresh(){Z(this.body.edges,(e,t)=>{const r=this.body.data.edges.get(t);r!==void 0&&e.setOptions(r)})}create(e){return new cr(e,this.body,this.images,this.options,this.defaultOptions)}reconnectEdges(){let e;const t=this.body.nodes,r=this.body.edges;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e].edges=[]);for(e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const i=r[e];i.from=null,i.to=null,i.connect()}}getConnectedNodes(e){const t=[];if(this.body.edges[e]!==void 0){const r=this.body.edges[e];r.fromId!==void 0&&t.push(r.fromId),r.toId!==void 0&&t.push(r.toId)}return t}_updateState(){this._addMissingEdges(),this._removeInvalidEdges()}_removeInvalidEdges(){const e=[];Z(this.body.edges,(t,r)=>{const i=this.body.nodes[t.toId],s=this.body.nodes[t.fromId];i!==void 0&&i.isCluster===!0||s!==void 0&&s.isCluster===!0||(i===void 0||s===void 0)&&e.push(r)}),this.remove(e,!1)}_addMissingEdges(){const e=this.body.data.edges;if(e==null)return;const t=this.body.edges,r=[];le(e).call(e,(i,s)=>{t[s]===void 0&&r.push(s)}),this.add(r,!0)}}class zk{constructor(e,t,r){this.body=e,this.physicsBody=t,this.barnesHutTree,this.setOptions(r),this._rng=Po("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;const t=this.body.nodes,r=this.physicsBody.physicsNodeIndices,i=r.length,s=this._formBarnesHutTree(t,r);this.barnesHutTree=s;for(let o=0;o<i;o++)e=t[r[o]],e.options.mass>0&&this._getForceContributions(s.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){const r=e.centerOfMass.x-t.x,i=e.centerOfMass.y-t.y,s=Math.sqrt(r*r+i*i);s*e.calcSize>this.thetaInversed?this._calculateForces(s,r,i,t,e):e.childrenCount===4?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(s,r,i,t,e)}}_calculateForces(e,t,r,i,s){e===0&&(e=.1,t=e),this.overlapAvoidanceFactor<1&&i.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*i.shape.radius,e-i.shape.radius));const o=this.options.gravitationalConstant*s.mass*i.options.mass/Math.pow(e,3),a=t*o,u=r*o;this.physicsBody.forces[i.id].x+=a,this.physicsBody.forces[i.id].y+=u}_formBarnesHutTree(e,t){let r;const i=t.length;let s=e[t[0]].x,o=e[t[0]].y,a=e[t[0]].x,u=e[t[0]].y;for(let b=1;b<i;b++){const y=e[t[b]],g=y.x,S=y.y;y.options.mass>0&&(g<s&&(s=g),g>a&&(a=g),S<o&&(o=S),S>u&&(u=S))}const l=Math.abs(a-s)-Math.abs(u-o);l>0?(o-=.5*l,u+=.5*l):(s+=.5*l,a-=.5*l);const c=Math.max(1e-5,Math.abs(a-s)),h=.5*c,f=.5*(s+a),v=.5*(o+u),p={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:f-h,maxX:f+h,minY:v-h,maxY:v+h},size:c,calcSize:1/c,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(p.root);for(let b=0;b<i;b++)r=e[t[b]],r.options.mass>0&&this._placeInTree(p.root,r);return p}_updateBranchMass(e,t){const r=e.centerOfMass,i=e.mass+t.options.mass,s=1/i;r.x=r.x*e.mass+t.x*t.options.mass,r.x*=s,r.y=r.y*e.mass+t.y*t.options.mass,r.y*=s,e.mass=i;const o=Math.max(Math.max(t.height,t.radius),t.width);e.maxWidth=e.maxWidth<o?o:e.maxWidth}_placeInTree(e,t,r){(r!=!0||r===void 0)&&this._updateBranchMass(e,t);const i=e.children.NW.range;let s;i.maxX>t.x?i.maxY>t.y?s="NW":s="SW":i.maxY>t.y?s="NE":s="SE",this._placeInRegion(e,t,s)}_placeInRegion(e,t,r){const i=e.children[r];switch(i.childrenCount){case 0:i.children.data=t,i.childrenCount=1,this._updateBranchMass(i,t);break;case 1:i.children.data.x===t.x&&i.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(i),this._placeInTree(i,t));break;case 4:this._placeInTree(i,t);break}}_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 r,i,s,o;const a=.5*e.size;switch(t){case"NW":r=e.range.minX,i=e.range.minX+a,s=e.range.minY,o=e.range.minY+a;break;case"NE":r=e.range.minX+a,i=e.range.maxX,s=e.range.minY,o=e.range.minY+a;break;case"SW":r=e.range.minX,i=e.range.minX+a,s=e.range.minY+a,o=e.range.maxY;break;case"SE":r=e.range.minX+a,i=e.range.maxX,s=e.range.minY+a,o=e.range.maxY;break}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:r,maxX:i,minY:s,maxY:o},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,r){r===void 0&&(r="#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=r,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()}}class o6{constructor(e,t,r){this._rng=Po("REPULSION SOLVER"),this.body=e,this.physicsBody=t,this.setOptions(r)}setOptions(e){this.options=e}solve(){let e,t,r,i,s,o,a,u;const l=this.body.nodes,d=this.physicsBody.physicsNodeIndices,c=this.physicsBody.forces,h=this.options.nodeDistance,f=-2/3/h,v=4/3;for(let p=0;p<d.length-1;p++){a=l[d[p]];for(let b=p+1;b<d.length;b++)u=l[d[b]],e=u.x-a.x,t=u.y-a.y,r=Math.sqrt(e*e+t*t),r===0&&(r=.1*this._rng(),e=r),r<2*h&&(r<.5*h?o=1:o=f*r+v,o=o/r,i=e*o,s=t*o,c[a.id].x-=i,c[a.id].y-=s,c[u.id].x+=i,c[u.id].y+=s)}}}class a6{constructor(e,t,r){this.body=e,this.physicsBody=t,this.setOptions(r)}setOptions(e){this.options=e,this.overlapAvoidanceFactor=Math.max(0,Math.min(1,this.options.avoidOverlap||0))}solve(){const e=this.body.nodes,t=this.physicsBody.physicsNodeIndices,r=this.physicsBody.forces,i=this.options.nodeDistance;for(let s=0;s<t.length-1;s++){const o=e[t[s]];for(let a=s+1;a<t.length;a++){const u=e[t[a]];if(o.level===u.level){const l=i+this.overlapAvoidanceFactor*((o.shape.radius||0)/2+(u.shape.radius||0)/2),d=u.x-o.x,c=u.y-o.y,h=Math.sqrt(d*d+c*c),f=.05;let v;h<l?v=-Math.pow(f*h,2)+Math.pow(f*l,2):v=0,h!==0&&(v=v/h);const p=d*v,b=c*v;r[o.id].x-=p,r[o.id].y-=b,r[u.id].x+=p,r[u.id].y+=b}}}}}class py{constructor(e,t,r){this.body=e,this.physicsBody=t,this.setOptions(r)}setOptions(e){this.options=e}solve(){let e,t;const r=this.physicsBody.physicsEdgeIndices,i=this.body.edges;let s,o,a;for(let u=0;u<r.length;u++)t=i[r[u]],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:t.options.length,s=t.to,o=t.edgeType.via,a=t.from,this._calculateSpringForce(s,o,.5*e),this._calculateSpringForce(o,a,.5*e)):(e=t.options.length===void 0?this.options.springLength*1.5:t.options.length,this._calculateSpringForce(t.from,t.to,e)))}_calculateSpringForce(e,t,r){const i=e.x-t.x,s=e.y-t.y,o=Math.max(Math.sqrt(i*i+s*s),.01),a=this.options.springConstant*(r-o)/o,u=i*a,l=s*a;this.physicsBody.forces[e.id]!==void 0&&(this.physicsBody.forces[e.id].x+=u,this.physicsBody.forces[e.id].y+=l),this.physicsBody.forces[t.id]!==void 0&&(this.physicsBody.forces[t.id].x-=u,this.physicsBody.forces[t.id].y-=l)}}class u6{constructor(e,t,r){this.body=e,this.physicsBody=t,this.setOptions(r)}setOptions(e){this.options=e}solve(){let e,t,r,i,s,o,a,u;const l=this.body.edges,d=.5,c=this.physicsBody.physicsEdgeIndices,h=this.physicsBody.physicsNodeIndices,f=this.physicsBody.forces;for(let m=0;m<h.length;m++){const w=h[m];f[w].springFx=0,f[w].springFy=0}for(let m=0;m<c.length;m++)t=l[c[m]],t.connected===!0&&(e=t.options.length===void 0?this.options.springLength:t.options.length,r=t.from.x-t.to.x,i=t.from.y-t.to.y,u=Math.sqrt(r*r+i*i),u=u===0?.01:u,a=this.options.springConstant*(e-u)/u,s=r*a,o=i*a,t.to.level!=t.from.level?(f[t.toId]!==void 0&&(f[t.toId].springFx-=s,f[t.toId].springFy-=o),f[t.fromId]!==void 0&&(f[t.fromId].springFx+=s,f[t.fromId].springFy+=o)):(f[t.toId]!==void 0&&(f[t.toId].x-=d*s,f[t.toId].y-=d*o),f[t.fromId]!==void 0&&(f[t.fromId].x+=d*s,f[t.fromId].y+=d*o)));a=1;let v,p;for(let m=0;m<h.length;m++){const w=h[m];v=Math.min(a,Math.max(-a,f[w].springFx)),p=Math.min(a,Math.max(-a,f[w].springFy)),f[w].x+=v,f[w].y+=p}let b=0,y=0;for(let m=0;m<h.length;m++){const w=h[m];b+=f[w].x,y+=f[w].y}const g=b/h.length,S=y/h.length;for(let m=0;m<h.length;m++){const w=h[m];f[w].x-=g,f[w].y-=S}}}class Fs{constructor(e,t,r){this.body=e,this.physicsBody=t,this.setOptions(r)}setOptions(e){this.options=e}solve(){let e,t,r,i;const s=this.body.nodes,o=this.physicsBody.physicsNodeIndices,a=this.physicsBody.forces;for(let u=0;u<o.length;u++){const l=o[u];i=s[l],e=-i.x,t=-i.y,r=Math.sqrt(e*e+t*t),this._calculateForces(r,e,t,a,i)}}_calculateForces(e,t,r,i,s){const o=e===0?0:this.options.centralGravity/e;i[s.id].x=t*o,i[s.id].y=r*o}}class l6 extends zk{constructor(e,t,r){super(e,t,r),this._rng=Po("FORCE ATLAS 2 BASED REPULSION SOLVER")}_calculateForces(e,t,r,i,s){e===0&&(e=.1*this._rng(),t=e),this.overlapAvoidanceFactor<1&&i.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*i.shape.radius,e-i.shape.radius));const o=i.edges.length+1,a=this.options.gravitationalConstant*s.mass*i.options.mass*o/Math.pow(e,2),u=t*a,l=r*a;this.physicsBody.forces[i.id].x+=u,this.physicsBody.forces[i.id].y+=l}}class d6 extends Fs{constructor(e,t,r){super(e,t,r)}_calculateForces(e,t,r,i,s){if(e>0){const o=s.edges.length+1,a=this.options.centralGravity*o*s.options.mass;i[s.id].x=t*a,i[s.id].y=r*a}}}class c6{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}},Te(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,Gs(["stabilization"],this.options,e),dt(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());const t=this.options.wind;t&&((typeof t.x!="number"||Om(t.x))&&(t.x=0),(typeof t.y!="number"||Om(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 l6(this.body,this.physicsBody,e),this.edgesSolver=new py(this.body,this.physicsBody,e),this.gravitySolver=new d6(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new o6(this.body,this.physicsBody,e),this.edgesSolver=new py(this.body,this.physicsBody,e),this.gravitySolver=new Fs(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new a6(this.body,this.physicsBody,e),this.edgesSolver=new u6(this.body,this.physicsBody,e),this.gravitySolver=new Fs(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new zk(this.body,this.physicsBody,e),this.edgesSolver=new py(this.body,this.physicsBody,e),this.gravitySolver=new Fs(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=D(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(){const e=Ws();this.physicsTick(),(Ws()-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)&&Vt(()=>{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(){this._evaluateStepQuality()===!0?this.timestep=1.2*this.timestep:this.timestep/1.2<this.options.timestep?this.timestep=this.options.timestep:(this.adaptiveCounter=-1,this.timestep=Math.max(this.options.timestep,this.timestep/1.2))}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=[];const e=this.body.nodes,t=this.body.edges;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&e[r].options.physics===!0&&this.physicsBody.physicsNodeIndices.push(e[r].id);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&t[r].options.physics===!0&&this.physicsBody.physicsEdgeIndices.push(t[r].id);for(let r=0;r<this.physicsBody.physicsNodeIndices.length;r++){const i=this.physicsBody.physicsNodeIndices[r];this.physicsBody.forces[i]={x:0,y:0},this.physicsBody.velocities[i]===void 0&&(this.physicsBody.velocities[i]={x:0,y:0})}for(const r in this.physicsBody.velocities)e[r]===void 0&&delete this.physicsBody.velocities[r]}revert(){const e=Ee(this.previousStates),t=this.body.nodes,r=this.physicsBody.velocities;this.referenceState={};for(let i=0;i<e.length;i++){const s=e[i];t[s]!==void 0?t[s].options.physics===!0&&(this.referenceState[s]={positions:{x:t[s].x,y:t[s].y}},r[s].x=this.previousStates[s].vx,r[s].y=this.previousStates[s].vy,t[s].x=this.previousStates[s].x,t[s].y=this.previousStates[s].y):delete this.previousStates[s]}}_evaluateStepQuality(){let e,t,r;const i=this.body.nodes,s=this.referenceState,o=.3;for(const a in this.referenceState)if(Object.prototype.hasOwnProperty.call(this.referenceState,a)&&i[a]!==void 0&&(e=i[a].x-s[a].positions.x,t=i[a].y-s[a].positions.y,r=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),r>o))return!1;return!0}moveNodes(){const e=this.physicsBody.physicsNodeIndices;let t=0,r=0;const i=5;for(let s=0;s<e.length;s++){const o=e[s],a=this._performStep(o);t=Math.max(t,a),r+=a}this.adaptiveTimestepEnabled=r/e.length<i,this.stabilized=t<this.options.minVelocity}calculateComponentVelocity(e,t,r){const i=this.modelOptions.damping*e,s=(t-i)/r;e+=s*this.timestep;const o=this.options.maxVelocity||1e9;return Math.abs(e)>o&&(e=e>0?o:-o),e}_performStep(e){const t=this.body.nodes[e],r=this.physicsBody.forces[e];this.options.wind&&(r.x+=this.options.wind.x,r.y+=this.options.wind.y);const i=this.physicsBody.velocities[e];return this.previousStates[e]={x:t.x,y:t.y,vx:i.x,vy:i.y},t.options.fixed.x===!1?(i.x=this.calculateComponentVelocity(i.x,r.x,t.options.mass),t.x+=i.x*this.timestep):(r.x=0,i.x=0),t.options.fixed.y===!1?(i.y=this.calculateComponentVelocity(i.y,r.y,t.options.mass),t.y+=i.y*this.timestep):(r.y=0,i.y=0),Math.sqrt(Math.pow(i.x,2)+Math.pow(i.y,2))}_freezeNodes(){const e=this.body.nodes;for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].x&&e[t].y){const r=e[t].options.fixed;this.freezeCache[t]={x:r.x,y:r.y},r.x=!0,r.y=!0}}_restoreFrozenNodes(){const e=this.body.nodes;for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.freezeCache[t]!==void 0&&(e[t].options.fixed.x=this.freezeCache[t].x,e[t].options.fixed.y=this.freezeCache[t].y);this.freezeCache={}}stabilize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof e!="number"&&(e=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,Vt(()=>this._stabilizationBatch(),0)}_startStabilizing(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}_stabilizationBatch(){const e=()=>this.stabilized===!1&&this.stabilizationIterations<this.targetIterations,t=()=>{this.body.emitter.emit("stabilizationProgress",{iterations:this.stabilizationIterations,total:this.targetIterations})};this._startStabilizing()&&t();let r=0;for(;e()&&r<this.options.stabilization.updateInterval;)this.physicsTick(),r++;if(t(),e()){var i;Vt(D(i=this._stabilizationBatch).call(i,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++){const r=this.physicsBody.physicsNodeIndices[t],i=this.body.nodes[r],s=this.physicsBody.forces[r],o=20,a=.03,u=Math.sqrt(Math.pow(s.x,2)+Math.pow(s.x,2)),l=Math.min(Math.max(5,u),15),d=3*l,c=wm((180-Math.min(1,Math.max(0,a*u))*180)/360,1,1),h={x:i.x+o*s.x,y:i.y+o*s.y};e.lineWidth=l,e.strokeStyle=c,e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(h.x,h.y),e.stroke();const f=Math.atan2(s.y,s.x);e.fillStyle=c,jk.draw(e,{type:"arrow",point:h,angle:f,length:d}),gs(e).call(e)}}}const We=[];for(let n=0;n<256;++n)We.push((n+256).toString(16).slice(1));function h6(n,e=0){return(We[n[e+0]]+We[n[e+1]]+We[n[e+2]]+We[n[e+3]]+"-"+We[n[e+4]]+We[n[e+5]]+"-"+We[n[e+6]]+We[n[e+7]]+"-"+We[n[e+8]]+We[n[e+9]]+"-"+We[n[e+10]]+We[n[e+11]]+We[n[e+12]]+We[n[e+13]]+We[n[e+14]]+We[n[e+15]]).toLowerCase()}let gy;const f6=new Uint8Array(16);function v6(){if(!gy){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");gy=crypto.getRandomValues.bind(crypto)}return gy(f6)}const p6=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var xA={randomUUID:p6};function g6(n,e,t){n=n||{};const r=n.random??n.rng?.()??v6();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,h6(r)}function Rn(n,e,t){return xA.randomUUID&&!n?xA.randomUUID():g6(n)}class Xe{constructor(){}static getRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=1e9,i=-1e9,s=1e9,o=-1e9,a;if(t.length>0)for(let u=0;u<t.length;u++)a=e[t[u]],s>a.shape.boundingBox.left&&(s=a.shape.boundingBox.left),o<a.shape.boundingBox.right&&(o=a.shape.boundingBox.right),r>a.shape.boundingBox.top&&(r=a.shape.boundingBox.top),i<a.shape.boundingBox.bottom&&(i=a.shape.boundingBox.bottom);return s===1e9&&o===-1e9&&r===1e9&&i===-1e9&&(r=0,i=0,s=0,o=0),{minX:s,maxX:o,minY:r,maxY:i}}static getRangeCore(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=1e9,i=-1e9,s=1e9,o=-1e9,a;if(t.length>0)for(let u=0;u<t.length;u++)a=e[t[u]],s>a.x&&(s=a.x),o<a.x&&(o=a.x),r>a.y&&(r=a.y),i<a.y&&(i=a.y);return s===1e9&&o===-1e9&&r===1e9&&i===-1e9&&(r=0,i=0,s=0,o=0),{minX:s,maxX:o,minY:r,maxY:i}}static findCenter(e){return{x:.5*(e.maxX+e.minX),y:.5*(e.maxY+e.minY)}}static cloneOptions(e,t){const r={};return t===void 0||t==="node"?(he(r,e.options,!0),r.x=e.x,r.y=e.y,r.amountOfConnections=e.edges.length):he(r,e.options,!0),r}}class y6 extends pe{constructor(e,t,r,i,s,o){super(e,t,r,i,s,o),this.isCluster=!0,this.containedNodes={},this.containedEdges={}}_openChildCluster(e){const t=this.body.nodes[e];if(this.containedNodes[e]===void 0)throw new Error("node with id: "+e+" not in current cluster");if(!t.isCluster)throw new Error("node with id: "+e+" is not a cluster");delete this.containedNodes[e],Z(t.edges,r=>{delete this.containedEdges[r.id]}),Z(t.containedNodes,(r,i)=>{this.containedNodes[i]=r}),t.containedNodes={},Z(t.containedEdges,(r,i)=>{this.containedEdges[i]=r}),t.containedEdges={},Z(t.edges,r=>{Z(this.edges,i=>{var s,o;const a=ne(s=i.clusteringEdgeReplacingIds).call(s,r.id);a!==-1&&(Z(r.clusteringEdgeReplacingIds,u=>{i.clusteringEdgeReplacingIds.push(u),this.body.edges[u].edgeReplacedById=i.id}),Ut(o=i.clusteringEdgeReplacingIds).call(o,a,1))})}),t.edges=[]}}class m6{constructor(e){this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},Te(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());const r=[];for(let i=0;i<this.body.nodeIndices.length;i++){const s=this.body.nodes[this.body.nodeIndices[i]];s.edges.length>=e&&r.push(s.id)}for(let i=0;i<r.length;i++)this.clusterByConnection(r[i],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 new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);const r={},i={};Z(this.body.nodes,(s,o)=>{s.options&&e.joinCondition(s.options)===!0&&(r[o]=s,Z(s.edges,a=>{this.clusteredEdges[a.id]===void 0&&(i[a.id]=a)}))}),this._cluster(r,i,e,t)}clusterByEdgeCount(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;t=this._checkOptions(t);const i=[],s={};let o,a,u;for(let l=0;l<this.body.nodeIndices.length;l++){const d={},c={},h=this.body.nodeIndices[l],f=this.body.nodes[h];if(s[h]===void 0){u=0,a=[];for(let v=0;v<f.edges.length;v++)o=f.edges[v],this.clusteredEdges[o.id]===void 0&&(o.toId!==o.fromId&&u++,a.push(o));if(u===e){const v=function(b){if(t.joinCondition===void 0||t.joinCondition===null)return!0;const y=Xe.cloneOptions(b);return t.joinCondition(y)};let p=!0;for(let b=0;b<a.length;b++){o=a[b];const y=this._getConnectedId(o,h);if(v(f))c[o.id]=o,d[h]=f,d[y]=this.body.nodes[y],s[h]=!0;else{p=!1;break}}if(Ee(d).length>0&&Ee(c).length>0&&p===!0){const y=function(){for(let g=0;g<i.length;++g)for(const S in d)if(i[g].nodes[S]!==void 0)return i[g]}();if(y!==void 0){for(const g in d)y.nodes[g]===void 0&&(y.nodes[g]=d[g]);for(const g in c)y.edges[g]===void 0&&(y.edges[g]=c[g])}else i.push({nodes:d,edges:c})}}}}for(let l=0;l<i.length;l++)this._cluster(i[l].nodes,i[l].edges,t,!1);r===!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 r;let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");const s=this.body.nodes[e];t=this._checkOptions(t,s),t.clusterNodeProperties.x===void 0&&(t.clusterNodeProperties.x=s.x),t.clusterNodeProperties.y===void 0&&(t.clusterNodeProperties.y=s.y),t.clusterNodeProperties.fixed===void 0&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=s.options.fixed.x,t.clusterNodeProperties.fixed.y=s.options.fixed.y);const o={},a={},u=s.id,l=Xe.cloneOptions(s);o[u]=s;for(let c=0;c<s.edges.length;c++){const h=s.edges[c];if(this.clusteredEdges[h.id]===void 0){const f=this._getConnectedId(h,u);if(this.clusteredNodes[f]===void 0)if(f!==u)if(t.joinCondition===void 0)a[h.id]=h,o[f]=this.body.nodes[f];else{const v=Xe.cloneOptions(this.body.nodes[f]);t.joinCondition(l,v)===!0&&(a[h.id]=h,o[f]=this.body.nodes[f])}else a[h.id]=h}}const d=qi(r=Ee(o)).call(r,function(c){return o[c].id});for(const c in o){if(!Object.prototype.hasOwnProperty.call(o,c))continue;const h=o[c];for(let f=0;f<h.edges.length;f++){const v=h.edges[f];ne(d).call(d,this._getConnectedId(v,h.id))>-1&&(a[v.id]=v)}}this._cluster(o,a,t,i)}_createClusterEdges(e,t,r,i){let s,o,a,u,l,d;const c=Ee(e),h=[];for(let p=0;p<c.length;p++){o=c[p],a=e[o];for(let b=0;b<a.edges.length;b++)s=a.edges[b],this.clusteredEdges[s.id]===void 0&&(s.toId==s.fromId?t[s.id]=s:s.toId==o?(u=r.id,l=s.fromId,d=l):(u=s.toId,l=r.id,d=u),e[d]===void 0&&h.push({edge:s,fromId:l,toId:u}))}const f=[],v=function(p){for(let b=0;b<f.length;b++){const y=f[b],g=p.fromId===y.fromId&&p.toId===y.toId,S=p.fromId===y.toId&&p.toId===y.fromId;if(g||S)return y}return null};for(let p=0;p<h.length;p++){const b=h[p],y=b.edge;let g=v(b);g===null?(g=this._createClusteredEdge(b.fromId,b.toId,y,i),f.push(g)):g.clusteringEdgeReplacingIds.push(y.id),this.body.edges[y.id].edgeReplacedById=g.id,this._backupEdgeOptions(y),y.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,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;const s=[];for(const d in e)Object.prototype.hasOwnProperty.call(e,d)&&this.clusteredNodes[d]!==void 0&&s.push(d);for(let d=0;d<s.length;++d)delete e[s[d]];if(Ee(e).length==0||Ee(e).length==1&&r.clusterNodeProperties.allowSingleNodeCluster!=!0)return;let o=he({},r.clusterNodeProperties);if(r.processProperties!==void 0){const d=[];for(const h in e)if(Object.prototype.hasOwnProperty.call(e,h)){const f=Xe.cloneOptions(e[h]);d.push(f)}const c=[];for(const h in t)if(Object.prototype.hasOwnProperty.call(t,h)&&h.substr(0,12)!=="clusterEdge:"){const f=Xe.cloneOptions(t[h],"edge");c.push(f)}if(o=r.processProperties(o,d,c),!o)throw new Error("The processProperties function does not return properties!")}o.id===void 0&&(o.id="cluster:"+Rn());const a=o.id;o.label===void 0&&(o.label="cluster");let u;o.x===void 0&&(u=this._getClusterPosition(e),o.x=u.x),o.y===void 0&&(u===void 0&&(u=this._getClusterPosition(e)),o.y=u.y),o.id=a;const l=this.body.functions.createNode(o,y6);l.containedNodes=e,l.containedEdges=t,l.clusterEdgeProperties=r.clusterEdgeProperties,this.body.nodes[o.id]=l,this._clusterEdges(e,t,o,r.clusterEdgeProperties),o.id=void 0,i===!0&&this.body.emitter.emit("_dataChanged")}_backupEdgeOptions(e){this.clusteredEdges[e.id]===void 0&&(this.clusteredEdges[e.id]={physics:e.options.physics})}_restoreEdge(e){const 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?this.body.nodes[e].isCluster===!0:(console.error("Node does not exist."),!1)}_getClusterPosition(e){const t=Ee(e);let r=e[t[0]].x,i=e[t[0]].x,s=e[t[0]].y,o=e[t[0]].y,a;for(let u=1;u<t.length;u++)a=e[t[u]],r=a.x<r?a.x:r,i=a.x>i?a.x:i,s=a.y<s?a.y:s,o=a.y>o?a.y:o;return{x:.5*(r+i),y:.5*(s+o)}}openCluster(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");const i=this.body.nodes[e];if(i===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(i.isCluster!==!0||i.containedNodes===void 0||i.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");const s=this.findNode(e),o=ne(s).call(s,e)-1;if(o>=0){const d=s[o];this.body.nodes[d]._openChildCluster(e),delete this.body.nodes[e],r===!0&&this.body.emitter.emit("_dataChanged");return}const a=i.containedNodes,u=i.containedEdges;if(t!==void 0&&t.releaseFunction!==void 0&&typeof t.releaseFunction=="function"){const d={},c={x:i.x,y:i.y};for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const v=this.body.nodes[f];d[f]={x:v.x,y:v.y}}const h=t.releaseFunction(c,d);for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const v=this.body.nodes[f];h[f]!==void 0&&(v.x=h[f].x===void 0?i.x:h[f].x,v.y=h[f].y===void 0?i.y:h[f].y)}}else Z(a,function(d){d.options.fixed.x===!1&&(d.x=i.x),d.options.fixed.y===!1&&(d.y=i.y)});for(const d in a)if(Object.prototype.hasOwnProperty.call(a,d)){const c=this.body.nodes[d];c.vx=i.vx,c.vy=i.vy,c.setOptions({physics:!0}),delete this.clusteredNodes[d]}const l=[];for(let d=0;d<i.edges.length;d++)l.push(i.edges[d]);for(let d=0;d<l.length;d++){const c=l[d],h=this._getConnectedId(c,e),f=this.clusteredNodes[h];for(let v=0;v<c.clusteringEdgeReplacingIds.length;v++){const p=c.clusteringEdgeReplacingIds[v],b=this.body.edges[p];if(b!==void 0)if(f!==void 0){const y=this.body.nodes[f.clusterId];y.containedEdges[b.id]=b,delete u[b.id];let g=b.fromId,S=b.toId;b.toId==h?S=f.clusterId:g=f.clusterId,this._createClusteredEdge(g,S,b,y.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(b)}c.remove()}for(const d in u)Object.prototype.hasOwnProperty.call(u,d)&&this._restoreEdge(u[d]);delete this.body.nodes[e],r===!0&&this.body.emitter.emit("_dataChanged")}getNodesInCluster(e){const t=[];if(this.isCluster(e)===!0){const r=this.body.nodes[e].containedNodes;for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&t.push(this.body.nodes[i].id)}return t}findNode(e){const t=[];let i=0,s;for(;this.clusteredNodes[e]!==void 0&&i<100;){if(s=this.body.nodes[e],s===void 0)return[];t.push(s.id),e=this.clusteredNodes[e].clusterId,i++}return s=this.body.nodes[e],s===void 0?[]:(t.push(s.id),Nr(t).call(t),t)}updateClusteredNode(e,t){if(e===void 0)throw new Error("No clusteredNodeId supplied to updateClusteredNode.");if(t===void 0)throw new Error("No newOptions supplied to updateClusteredNode.");if(this.body.nodes[e]===void 0)throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist.");this.body.nodes[e].setOptions(t),this.body.emitter.emit("_dataChanged")}updateEdge(e,t){if(e===void 0)throw new Error("No startEdgeId supplied to updateEdge.");if(t===void 0)throw new Error("No newOptions supplied to updateEdge.");if(this.body.edges[e]===void 0)throw new Error("The startEdgeId supplied to updateEdge does not exist.");const r=this.getClusteredEdges(e);for(let i=0;i<r.length;i++)this.body.edges[r[i]].setOptions(t);this.body.emitter.emit("_dataChanged")}getClusteredEdges(e){const t=[];let i=0;for(;e!==void 0&&this.body.edges[e]!==void 0&&i<100;)t.push(this.body.edges[e].id),e=this.body.edges[e].edgeReplacedById,i++;return Nr(t).call(t),t}getBaseEdge(e){return this.getBaseEdges(e)[0]}getBaseEdges(e){const t=[e],r=[],i=[],s=100;let o=0;for(;t.length>0&&o<s;){const a=t.pop();if(a===void 0)continue;const u=this.body.edges[a];if(u===void 0)continue;o++;const l=u.clusteringEdgeReplacingIds;if(l===void 0)i.push(a);else for(let d=0;d<l.length;++d){const c=l[d];ne(t).call(t,l)!==-1||ne(r).call(r,l)!==-1||t.push(c)}r.push(a)}return i}_getConnectedId(e,t){return e.toId!=t?e.toId:(e.fromId!=t,e.fromId)}_getHubSize(){let e=0,t=0,r=0,i=0;for(let u=0;u<this.body.nodeIndices.length;u++){const l=this.body.nodes[this.body.nodeIndices[u]];l.edges.length>i&&(i=l.edges.length),e+=l.edges.length,t+=Math.pow(l.edges.length,2),r+=1}e=e/r,t=t/r;const s=t-Math.pow(e,2),o=Math.sqrt(s);let a=Math.floor(e+2*o);return a>i&&(a=i),a}_createClusteredEdge(e,t,r,i,s){const o=Xe.cloneOptions(r,"edge");he(o,i),o.from=e,o.to=t,o.id="clusterEdge:"+Rn(),s!==void 0&&he(o,s);const a=this.body.functions.createEdge(o);return a.clusteringEdgeReplacingIds=[r.id],a.connect(),this.body.edges[a.id]=a,a}_clusterEdges(e,t,r,i){if(t instanceof cr){const s=t,o={};o[s.id]=s,t=o}if(e instanceof pe){const s=e,o={};o[s.id]=s,e=o}if(r==null)throw new Error("_clusterEdges: parameter clusterNode required");i===void 0&&(i=r.clusterEdgeProperties),this._createClusterEdges(e,t,r,i);for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)&&this.body.edges[s]!==void 0){const o=this.body.edges[s];this._backupEdgeOptions(o),o.setOptions({physics:!1})}for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(this.clusteredNodes[s]={clusterId:r.id,node:this.body.nodes[s]},this.body.nodes[s].setOptions({physics:!1}))}_getClusterNodeForNode(e){if(e===void 0)return;const t=this.clusteredNodes[e];if(t===void 0)return;const r=t.clusterId;if(r!==void 0)return this.body.nodes[r]}_filter(e,t){const r=[];return Z(e,i=>{t(i)&&r.push(i)}),r}_updateState(){let e;const t=[],r={},i=u=>{Z(this.body.nodes,l=>{l.isCluster===!0&&u(l)})};for(e in this.clusteredNodes){if(!Object.prototype.hasOwnProperty.call(this.clusteredNodes,e))continue;this.body.nodes[e]===void 0&&t.push(e)}i(function(u){for(let l=0;l<t.length;l++)delete u.containedNodes[t[l]]});for(let u=0;u<t.length;u++)delete this.clusteredNodes[t[u]];Z(this.clusteredEdges,u=>{const l=this.body.edges[u];(l===void 0||!l.endPointsValid())&&(r[u]=u)}),i(function(u){Z(u.containedEdges,(l,d)=>{!l.endPointsValid()&&!r[d]&&(r[d]=d)})}),Z(this.body.edges,(u,l)=>{let d=!0;const c=u.clusteringEdgeReplacingIds;if(c!==void 0){let h=0;Z(c,f=>{const v=this.body.edges[f];v!==void 0&&v.endPointsValid()&&(h+=1)}),d=h>0}(!u.endPointsValid()||!d)&&(r[l]=l)}),i(u=>{Z(r,l=>{delete u.containedEdges[l],Z(u.edges,(d,c)=>{if(d.id===l){u.edges[c]=null;return}d.clusteringEdgeReplacingIds=this._filter(d.clusteringEdgeReplacingIds,function(h){return!r[h]})}),u.edges=this._filter(u.edges,function(d){return d!==null})})}),Z(r,u=>{delete this.clusteredEdges[u]}),Z(r,u=>{delete this.body.edges[u]});const s=Ee(this.body.edges);Z(s,u=>{const l=this.body.edges[u],d=this._isClusteredNode(l.fromId)||this._isClusteredNode(l.toId);if(d!==this._isClusteredEdge(l.id))if(d){const c=this._getClusterNodeForNode(l.fromId);c!==void 0&&this._clusterEdges(this.body.nodes[l.fromId],l,c);const h=this._getClusterNodeForNode(l.toId);h!==void 0&&this._clusterEdges(this.body.nodes[l.toId],l,h)}else delete this._clusterEdges[u],this._restoreEdge(l)});let o=!1,a=!0;for(;a;){const u=[];i(function(l){const d=Ee(l.containedNodes).length,c=l.options.allowSingleNodeCluster===!0;(c&&d<1||!c&&d<2)&&u.push(l.id)});for(let l=0;l<u.length;++l)this.openCluster(u[l],{},!1);a=u.length>0,o=o||a}o&&this._updateState()}_isClusteredNode(e){return this.clusteredNodes[e]!==void 0}_isClusteredEdge(e){return this.clusteredEdges[e]!==void 0}}class b6{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},Te(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=Vt(()=>{var t;this.zooming=!1,D(t=this._requestRedraw).call(t,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",D(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-=1,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&&un(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,e)}_startRendering(){if(this.renderingActive===!0&&this.requestAnimationFrameRequestId===void 0){var e;this.requestAnimationFrameRequestId=window.requestAnimationFrame(D(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]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;const t={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();const r=this.canvas.getContext(),i=this.canvas.frame.canvas.clientWidth,s=this.canvas.frame.canvas.clientHeight;if(r.clearRect(0,0,i,s),this.canvas.frame.clientWidth===0)return;if(r.save(),r.translate(this.body.view.translation.x,this.body.view.translation.y),r.scale(this.body.view.scale,this.body.view.scale),r.beginPath(),this.body.emitter.emit("beforeDrawing",r),r.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(r),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){const{drawExternalLabels:o}=this._drawNodes(r,e);t.drawExternalLabels=o}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(r),t.drawExternalLabels!=null&&t.drawExternalLabels(),e===!1&&this._drawSelectionBox(r),r.beginPath(),this.body.emitter.emit("afterDrawing",r),r.closePath(),r.restore(),e===!0&&r.clearRect(0,0,i,s)}}_resizeNodes(){this.canvas.setTransform();const 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);const t=this.body.nodes;let r;for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r=t[i],r.resize(e),r.updateBoundingBox(e,r.selected));e.restore()}_drawNodes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.body.nodes,i=this.body.nodeIndices;let s;const o=[],a=[],u=20,l=this.canvas.DOMtoCanvas({x:-u,y:-u}),d=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+u,y:this.canvas.frame.canvas.clientHeight+u}),c={top:l.y,left:l.x,bottom:d.y,right:d.x},h=[];for(let b=0;b<i.length;b++)if(s=r[i[b]],s.hover)a.push(i[b]);else if(s.isSelected())o.push(i[b]);else if(t===!0){const y=s.draw(e);y.drawExternalLabel!=null&&h.push(y.drawExternalLabel)}else if(s.isBoundingBoxOverlappingWith(c)===!0){const y=s.draw(e);y.drawExternalLabel!=null&&h.push(y.drawExternalLabel)}else s.updateBoundingBox(e,s.selected);let f;const v=o.length,p=a.length;for(f=0;f<v;f++){s=r[o[f]];const b=s.draw(e);b.drawExternalLabel!=null&&h.push(b.drawExternalLabel)}for(f=0;f<p;f++){s=r[a[f]];const b=s.draw(e);b.drawExternalLabel!=null&&h.push(b.drawExternalLabel)}return{drawExternalLabels:()=>{for(const b of h)b()}}}_drawEdges(e){const t=this.body.edges,r=this.body.edgeIndices;for(let i=0;i<r.length;i++){const s=t[r[i]];s.connected===!0&&s.draw(e)}}_drawArrows(e){const t=this.body.edges,r=this.body.edgeIndices;for(let i=0;i<r.length;i++){const s=t[r[i]];s.connected===!0&&s.drawArrows(e)}}_drawSelectionBox(e){if(this.body.selectionBox.show){e.beginPath();const t=this.body.selectionBox.position.end.x-this.body.selectionBox.position.start.x,r=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,r),e.fillStyle="rgba(151, 194, 252, 0.2)",e.fillRect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,r),e.strokeStyle="rgba(151, 194, 252, 1)",e.stroke()}else e.closePath()}}var yy,DA;function _6(){if(DA)return yy;DA=1,GN();var n=oe();return yy=n.setInterval,yy}var my,AA;function w6(){return AA||(AA=1,my=_6()),my}var E6=w6(),S6=G(E6);function Xs(n,e){e.inputHandler=function(t){t.isFirst&&e(t)},n.on("hammer.input",e.inputHandler)}function Wk(n,e){return e.inputHandler=function(t){t.isFinal&&e(t)},n.on("hammer.input",e.inputHandler)}class O6{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%"},Te(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.once("resize",t=>{t.width!==0&&(this.body.view.translation.x=t.width*.5),t.height!==0&&(this.body.view.translation.y=t.height*.5)}),this.body.emitter.on("setSize",D(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&&un(["width","height","autoResize"],this.options,e),this._cleanUp(),this.options.autoResize===!0){var t;if(window.ResizeObserver){const i=new ResizeObserver(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")}),{frame:s}=this;i.observe(s),this._cleanupCallbacks.push(()=>{i.unobserve(s)})}else{const i=S6(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(()=>{clearInterval(i)})}const r=D(t=this._onResize).call(t,this);window.addEventListener("resize",r),this._cleanupCallbacks.push(()=>{window.removeEventListener("resize",r)})}}_cleanUp(){var e,t,r;le(e=Nr(t=Ut(r=this._cleanupCallbacks).call(r,0)).call(t)).call(e,i=>{try{i()}catch(s){console.error(s)}})}_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){const e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight;let r=this.cameraState.scale;e!=1&&t!=1?r=this.cameraState.scale*.5*(e+t):e!=1?r=this.cameraState.scale*e:t!=1&&(r=this.cameraState.scale*t),this.body.view.scale=r;const i=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),s={x:i.x-this.cameraState.position.x,y:i.y-this.cameraState.position.y};this.body.view.translation.x+=s.x*this.body.view.scale,this.body.view.translation.y+=s.y*this.body.view.scale}}_prepareValue(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(ne(e).call(e,"%")!==-1||ne(e).call(e,"px")!==-1)return e;if(ne(e).call(e,"%")===-1)return e+"px"}throw new 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{const 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 Oi(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Oi.DIRECTION_ALL}),Xs(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 Oi(this.frame),Wk(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 r=!1;const i=this.frame.canvas.width,s=this.frame.canvas.height,o=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(o),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},r=!0;else{const a=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),u=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==a||this.frame.canvas.height!==u)&&this._getCameraState(o),this.frame.canvas.width!==a&&(this.frame.canvas.width=a,r=!0),this.frame.canvas.height!==u&&(this.frame.canvas.height=u,r=!0)}return r===!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(i/this.pixelRatio),oldHeight:Math.round(s/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,r}getContext(){return this.frame.canvas.getContext("2d")}_determinePixelRatio(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");let t=1;typeof window<"u"&&(t=window.devicePixelRatio||1);const r=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/r}_setPixelRatio(){this.pixelRatio=this._determinePixelRatio()}setTransform(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}_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)}}}function I6(n,e){const t=Te({nodes:e,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},n??{});if(!Se(t.nodes))throw new TypeError("Nodes has to be an array of ids.");if(t.nodes.length===0&&(t.nodes=e),!(typeof t.minZoomLevel=="number"&&t.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof t.maxZoomLevel=="number"&&t.minZoomLevel<=t.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return t}class $6{constructor(e,t){var r,i;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",D(r=this.fit).call(r,this)),this.body.emitter.on("animationFinished",()=>{this.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",D(i=this.releaseNode).call(i,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]:!1;e=I6(e,this.body.nodeIndices);const r=this.canvas.frame.canvas.clientWidth,i=this.canvas.frame.canvas.clientHeight;let s,o;if(r===0||i===0)o=1,s=Xe.getRange(this.body.nodes,e.nodes);else if(t===!0){let l=0;for(const h in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,h)&&this.body.nodes[h].predefinedPosition===!0&&(l+=1);if(l>.5*this.body.nodeIndices.length){this.fit(e,!1);return}s=Xe.getRange(this.body.nodes,e.nodes),o=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;const c=Math.min(r/600,i/600);o*=c}else{this.body.emitter.emit("_resizeNodes"),s=Xe.getRange(this.body.nodes,e.nodes);const l=Math.abs(s.maxX-s.minX)*1.1,d=Math.abs(s.maxY-s.minY)*1.1,c=r/l,h=i/d;o=c<=h?c:h}o>e.maxZoomLevel?o=e.maxZoomLevel:o<e.minZoomLevel&&(o=e.minZoomLevel);const u={position:Xe.findCenter(s),scale:o,animation:e.animation};this.moveTo(u)}focus(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){const r={x:this.body.nodes[e].x,y:this.body.nodes[e].y};t.position=r,t.lockedOnNode=e,this.moveTo(t)}else console.error("Node: "+e+" cannot be found.")}moveTo(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!Ar(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!Ar(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!Ar(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!Ar(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}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;const t=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),r={x:t.x-e.position.x,y:t.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+r.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+r.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var i;this.viewFunction=D(i=this._lockedRedraw).call(i,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 s;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=D(s=this._transitionRedraw).call(s,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}_lockedRedraw(){const 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}),r={x:t.x-e.x,y:t.y-e.y},i=this.body.view.translation,s={x:i.x+r.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:i.y+r.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=s}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]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;const t=AV[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 r;this.viewFunction=D(r=this._lockedRedraw).call(r,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})}}function MA(n){var e=n&&n.preventDefault||!1,t=n&&n.container||window,r={},i={keydown:{},keyup:{}},s={},o;for(o=97;o<=122;o++)s[String.fromCharCode(o)]={code:65+(o-97),shift:!1};for(o=65;o<=90;o++)s[String.fromCharCode(o)]={code:o,shift:!0};for(o=0;o<=9;o++)s[""+o]={code:48+o,shift:!1};for(o=1;o<=12;o++)s["F"+o]={code:111+o,shift:!1};for(o=0;o<=9;o++)s["num"+o]={code:96+o,shift:!1};s["num*"]={code:106,shift:!1},s["num+"]={code:107,shift:!1},s["num-"]={code:109,shift:!1},s["num/"]={code:111,shift:!1},s["num."]={code:110,shift:!1},s.left={code:37,shift:!1},s.up={code:38,shift:!1},s.right={code:39,shift:!1},s.down={code:40,shift:!1},s.space={code:32,shift:!1},s.enter={code:13,shift:!1},s.shift={code:16,shift:void 0},s.esc={code:27,shift:!1},s.backspace={code:8,shift:!1},s.tab={code:9,shift:!1},s.ctrl={code:17,shift:!1},s.alt={code:18,shift:!1},s.delete={code:46,shift:!1},s.pageup={code:33,shift:!1},s.pagedown={code:34,shift:!1},s["="]={code:187,shift:!1},s["-"]={code:189,shift:!1},s["]"]={code:221,shift:!1},s["["]={code:219,shift:!1};var a=function(d){l(d,"keydown")},u=function(d){l(d,"keyup")},l=function(d,c){if(i[c][d.keyCode]!==void 0){for(var h=i[c][d.keyCode],f=0;f<h.length;f++)(h[f].shift===void 0||h[f].shift==!0&&d.shiftKey==!0||h[f].shift==!1&&d.shiftKey==!1)&&h[f].fn(d);e==!0&&d.preventDefault()}};return r.bind=function(d,c,h){if(h===void 0&&(h="keydown"),s[d]===void 0)throw new Error("unsupported key: "+d);i[h][s[d].code]===void 0&&(i[h][s[d].code]=[]),i[h][s[d].code].push({fn:c,shift:s[d].shift})},r.bindAll=function(d,c){c===void 0&&(c="keydown");for(var h in s)s.hasOwnProperty(h)&&r.bind(h,d,c)},r.getKey=function(d){for(var c in s)if(s.hasOwnProperty(c)){if(d.shiftKey==!0&&s[c].shift==!0&&d.keyCode==s[c].code)return c;if(d.shiftKey==!1&&s[c].shift==!1&&d.keyCode==s[c].code)return c;if(d.keyCode==s[c].code&&c=="shift")return c}return"unknown key, currently not supported"},r.unbind=function(d,c,h){if(h===void 0&&(h="keydown"),s[d]===void 0)throw new Error("unsupported key: "+d);if(c!==void 0){var f=[],v=i[h][s[d].code];if(v!==void 0)for(var p=0;p<v.length;p++)v[p].fn==c&&v[p].shift==s[d].shift||f.push(i[h][s[d].code][p]);i[h][s[d].code]=f}else i[h][s[d].code]=[]},r.reset=function(){i={keydown:{},keyup:{}}},r.destroy=function(){i={keydown:{},keyup:{}},t.removeEventListener("keydown",a,!0),t.removeEventListener("keyup",u,!0)},t.addEventListener("keydown",a,!0),t.addEventListener("keyup",u,!0),r}class T6{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={};const 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 o=0;o<e.length;o++){this.navigationDOM[e[o]]=document.createElement("div"),this.navigationDOM[e[o]].className="vis-button vis-"+e[o],this.navigationDOM.wrapper.appendChild(this.navigationDOM[e[o]]);const a=new Oi(this.navigationDOM[e[o]]);if(t[o]==="_fit"){var r;Xs(a,D(r=this._fit).call(r,this))}else{var i;Xs(a,D(i=this.bindToRedraw).call(i,this,t[o]))}this.navigationHammers.push(a)}const s=new Oi(this.canvas.frame);Wk(s,()=>{this._stopMovement()}),this.navigationHammers.push(s),this.iconsCreated=!0}bindToRedraw(e){if(this.boundFunctions[e]===void 0){var t;this.boundFunctions[e]=D(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(const 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(){const e=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),r=this.body.view.translation,i=t/e,s=(1-i)*this.canvas.canvasViewCenter.x+r.x*i,o=(1-i)*this.canvas.canvasViewCenter.y+r.y*i;this.body.view.scale=t,this.body.view.translation={x:s,y:o},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}_zoomOut(){const e=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),r=this.body.view.translation,i=t/e,s=(1-i)*this.canvas.canvasViewCenter.x+r.x*i,o=(1-i)*this.canvas.canvasViewCenter.y+r.y*i;this.body.view.scale=t,this.body.view.translation={x:s,y:o},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.options.keyboard.bindToWindow===!0?this.keycharm=MA({container:window,preventDefault:!0}):this.keycharm=MA({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var e,t,r,i,s,o,a,u,l,d,c,h,f,v,p,b,y,g,S,m,w,O,I,_;D(e=this.keycharm).call(e,"up",()=>{this.bindToRedraw("_moveUp")},"keydown"),D(t=this.keycharm).call(t,"down",()=>{this.bindToRedraw("_moveDown")},"keydown"),D(r=this.keycharm).call(r,"left",()=>{this.bindToRedraw("_moveLeft")},"keydown"),D(i=this.keycharm).call(i,"right",()=>{this.bindToRedraw("_moveRight")},"keydown"),D(s=this.keycharm).call(s,"=",()=>{this.bindToRedraw("_zoomIn")},"keydown"),D(o=this.keycharm).call(o,"num+",()=>{this.bindToRedraw("_zoomIn")},"keydown"),D(a=this.keycharm).call(a,"num-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),D(u=this.keycharm).call(u,"-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),D(l=this.keycharm).call(l,"[",()=>{this.bindToRedraw("_zoomOut")},"keydown"),D(d=this.keycharm).call(d,"]",()=>{this.bindToRedraw("_zoomIn")},"keydown"),D(c=this.keycharm).call(c,"pageup",()=>{this.bindToRedraw("_zoomIn")},"keydown"),D(h=this.keycharm).call(h,"pagedown",()=>{this.bindToRedraw("_zoomOut")},"keydown"),D(f=this.keycharm).call(f,"up",()=>{this.unbindFromRedraw("_moveUp")},"keyup"),D(v=this.keycharm).call(v,"down",()=>{this.unbindFromRedraw("_moveDown")},"keyup"),D(p=this.keycharm).call(p,"left",()=>{this.unbindFromRedraw("_moveLeft")},"keyup"),D(b=this.keycharm).call(b,"right",()=>{this.unbindFromRedraw("_moveRight")},"keyup"),D(y=this.keycharm).call(y,"=",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),D(g=this.keycharm).call(g,"num+",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),D(S=this.keycharm).call(S,"num-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),D(m=this.keycharm).call(m,"-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),D(w=this.keycharm).call(w,"[",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),D(O=this.keycharm).call(O,"]",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),D(I=this.keycharm).call(I,"pageup",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),D(_=this.keycharm).call(_,"pagedown",()=>{this.unbindFromRedraw("_zoomOut")},"keyup")}}}class P6{constructor(e,t,r){var i,s,o,a,u,l,d,c,h,f,v,p,b;this.body=e,this.canvas=t,this.selectionHandler=r,this.navigationHandler=new T6(e,t),this.body.eventListeners.onTap=D(i=this.onTap).call(i,this),this.body.eventListeners.onTouch=D(s=this.onTouch).call(s,this),this.body.eventListeners.onDoubleTap=D(o=this.onDoubleTap).call(o,this),this.body.eventListeners.onHold=D(a=this.onHold).call(a,this),this.body.eventListeners.onDragStart=D(u=this.onDragStart).call(u,this),this.body.eventListeners.onDrag=D(l=this.onDrag).call(l,this),this.body.eventListeners.onDragEnd=D(d=this.onDragEnd).call(d,this),this.body.eventListeners.onMouseWheel=D(c=this.onMouseWheel).call(c,this),this.body.eventListeners.onPinch=D(h=this.onPinch).call(h,this),this.body.eventListeners.onMouseMove=D(f=this.onMouseMove).call(f,this),this.body.eventListeners.onRelease=D(v=this.onRelease).call(v,this),this.body.eventListeners.onContext=D(p=this.onContext).call(p,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=D(b=this.getPointer).call(b,this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0,autoFocus:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},Te(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&&(Gs(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,e),dt(this.options,e,"keyboard"),e.tooltip&&(Te(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=_m(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}getPointer(e){return{x:e.x-qV(this.canvas.frame.canvas),y:e.y-CV(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){const t=this.getPointer(e.center),r=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,r),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t)}onDoubleTap(e){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,t)}onHold(e){const t=this.getPointer(e.center),r=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,r),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){const t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,t),this.touchTime=new Date().valueOf()}}onContext(e){const 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]:!1)===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}_determineDifference(e,t){const r=function(i,s){const o=[];for(let a=0;a<i.length;a++){const u=i[a];ne(s).call(s,u)===-1&&o.push(u)}return o};return{nodes:r(e.nodes,t.nodes),edges:r(e.edges,t.edges)}}onDragStart(e){if(this.drag.dragging)return;this.drag.pointer===void 0&&this.onTouch(e);const t=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=Te({},this.body.view.translation),this.drag.nodeId=void 0,e.srcEvent.shiftKey){this.body.selectionBox.show=!0;const r=this.getPointer(e.center);this.body.selectionBox.position.start={x:this.canvas._XconvertDOMtoCanvas(r.x),y:this.canvas._YconvertDOMtoCanvas(r.y)},this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(r.x),y:this.canvas._YconvertDOMtoCanvas(r.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(const r of this.selectionHandler.getSelectedNodes()){const i={id:r.id,node:r,x:r.x,y:r.y,xFixed:r.options.fixed.x,yFixed:r.options.fixed.y};r.options.fixed.x=!0,r.options.fixed.y=!0,this.drag.selection.push(i)}}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");const t=this.getPointer(e.center),r=this.drag.selection;if(r&&r.length&&this.options.dragNodes===!0){this.selectionHandler.generateClickEvent("dragging",e,t);const i=t.x-this.drag.pointer.x,s=t.y-this.drag.pointer.y;le(r).call(r,o=>{const a=o.node;o.xFixed===!1&&(a.x=this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(o.x)+i)),o.yFixed===!1&&(a.y=this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(o.y)+s))}),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}const i=t.x-this.drag.pointer.x,s=t.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+i,y:this.drag.translation.y+s},this.body.emitter.emit("_requestRedraw")}}}onDragEnd(e){if(this.drag.dragging=!1,this.body.selectionBox.show){var t;this.body.selectionBox.show=!1;const r=this.body.selectionBox.position,i={minX:Math.min(r.start.x,r.end.x),minY:Math.min(r.start.y,r.end.y),maxX:Math.max(r.start.x,r.end.x),maxY:Math.max(r.start.y,r.end.y)},s=tt(t=this.body.nodeIndices).call(t,a=>{const u=this.body.nodes[a];return u.x>=i.minX&&u.x<=i.maxX&&u.y>=i.minY&&u.y<=i.maxY});le(s).call(s,a=>this.selectionHandler.selectObject(this.body.nodes[a]));const o=this.getPointer(e.center);this.selectionHandler.commitAndEmit(o,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{const r=this.drag.selection;r&&r.length?(le(r).call(r,function(i){i.node.options.fixed.x=i.xFixed,i.node.options.fixed.y=i.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){const t=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);const r=this.pinch.scale*e.scale;this.zoom(r,t)}zoom(e,t){if(this.options.zoomView===!0){const r=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);let i;this.drag!==void 0&&this.drag.dragging===!0&&(i=this.canvas.DOMtoCanvas(this.drag.pointer));const s=this.body.view.translation,o=e/r,a=(1-o)*t.x+s.x*o,u=(1-o)*t.y+s.y*o;if(this.body.view.scale=e,this.body.view.translation={x:a,y:u},i!=null){const l=this.canvas.canvasToDOM(i);this.drag.pointer.x=l.x,this.drag.pointer.y=l.y}this.body.emitter.emit("_requestRedraw"),r<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);const r=this.getPointer({x:e.clientX,y:e.clientY});this.zoom(t,r)}e.preventDefault()}}onMouseMove(e){const t=this.getPointer({x:e.clientX,y:e.clientY});let r=!1;this.popup!==void 0&&(this.popup.hidden===!1&&this._checkHidePopup(t),this.popup.hidden===!1&&(r=!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(),r===!1&&(this.popupTimer!==void 0&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=Vt(()=>this._checkShowPopup(t),this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,t)}_checkShowPopup(e){const t=this.canvas._XconvertDOMtoCanvas(e.x),r=this.canvas._YconvertDOMtoCanvas(e.y),i={left:t,top:r,right:t,bottom:r},s=this.popupObj===void 0?void 0:this.popupObj.id;let o=!1,a="node";if(this.popupObj===void 0){const u=this.body.nodeIndices,l=this.body.nodes;let d;const c=[];for(let h=0;h<u.length;h++)d=l[u[h]],d.isOverlappingWith(i)===!0&&(o=!0,d.getTitle()!==void 0&&c.push(u[h]));c.length>0&&(this.popupObj=l[c[c.length-1]],o=!0)}if(this.popupObj===void 0&&o===!1){const u=this.body.edgeIndices,l=this.body.edges;let d;const c=[];for(let h=0;h<u.length;h++)d=l[u[h]],d.isOverlappingWith(i)===!0&&d.connected===!0&&d.getTitle()!==void 0&&c.push(u[h]);c.length>0&&(this.popupObj=l[c[c.length-1]],a="edge")}this.popupObj!==void 0?this.popupObj.id!==s&&(this.popup===void 0&&(this.popup=new zV(this.canvas.frame)),this.popup.popupTargetType=a,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}_checkHidePopup(e){const t=this.selectionHandler._pointerToPositionObject(e);let r=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(r=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(t),r===!0)){const i=this.selectionHandler.getNodeAt(e);r=i===void 0?!1:i.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(r=this.body.edges[this.popup.popupTargetId].isOverlappingWith(t));r===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}var FA={},NA={},kA;function R6(){if(kA)return NA;kA=1;var n=Ib(),e=xk();return n("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),NA}var BA;function q6(){return BA||(BA=1,R6()),FA}var jA={},by,LA;function li(){if(LA)return by;LA=1;var n=Yi(),e=TypeError;return by=function(t){if(typeof t=="object"&&"size"in t&&"has"in t&&"add"in t&&"delete"in t&&"keys"in t)return t;throw new e(n(t)+" is not a set")},by}var _y,zA;function di(){if(zA)return _y;zA=1;var n=ut(),e=Dk(),t=n("Set"),r=t.prototype;return _y={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:r},_y}var wy,WA;function ci(){if(WA)return wy;WA=1;var n=ot();return wy=function(e,t,r){for(var i=r?e:e.iterator,s=e.next,o,a;!(o=n(s,i)).done;)if(a=t(o.value),a!==void 0)return a},wy}var Ey,HA;function Es(){if(HA)return Ey;HA=1;var n=ci();return Ey=function(e,t,r){return r?n(e.keys(),t,!0):e.forEach(t)},Ey}var Sy,UA;function xb(){if(UA)return Sy;UA=1;var n=di(),e=Es(),t=n.Set,r=n.add;return Sy=function(i){var s=new t;return e(i,function(o){r(s,o)}),s},Sy}var Oy,VA;function Ss(){return VA||(VA=1,Oy=function(n){return n.size}),Oy}var Iy,GA;function C6(){return GA||(GA=1,Iy=function(n){return{iterator:n,next:n.next,done:!1}}),Iy}var $y,KA;function hi(){if(KA)return $y;KA=1;var n=er(),e=kt(),t=ot(),r=Qi(),i=C6(),s="Invalid size",o=RangeError,a=TypeError,u=Math.max,l=function(d,c){this.set=d,this.size=u(c,0),this.has=n(d.has),this.keys=n(d.keys)};return l.prototype={getIterator:function(){return i(e(t(this.keys,this.set)))},includes:function(d){return t(this.has,this.set,d)}},$y=function(d){e(d);var c=+d.size;if(c!==c)throw new a(s);var h=r(c);if(h<0)throw new o(s);return new l(d,h)},$y}var Ty,YA;function x6(){if(YA)return Ty;YA=1;var n=li(),e=di(),t=xb(),r=Ss(),i=hi(),s=Es(),o=ci(),a=e.has,u=e.remove;return Ty=function(d){var c=n(this),h=i(d),f=t(c);return r(c)<=h.size?s(c,function(v){h.includes(v)&&u(f,v)}):o(h.getIterator(),function(v){a(f,v)&&u(f,v)}),f},Ty}var Py,XA;function fi(){return XA||(XA=1,Py=function(){return!1}),Py}var JA;function D6(){if(JA)return jA;JA=1;var n=z(),e=x6(),t=te(),r=fi(),i=!r("difference",function(o){return o.size===0}),s=i||t(function(){var o={size:1,has:function(){return!0},keys:function(){var u=0;return{next:function(){var l=u++>1;return a.has(1)&&a.clear(),{done:l,value:2}}}}},a=new Set([1,2,3,4]);return a.difference(o).size!==3});return n({target:"Set",proto:!0,real:!0,forced:s},{difference:e}),jA}var ZA={},Ry,QA;function A6(){if(QA)return Ry;QA=1;var n=li(),e=di(),t=Ss(),r=hi(),i=Es(),s=ci(),o=e.Set,a=e.add,u=e.has;return Ry=function(d){var c=n(this),h=r(d),f=new o;return t(c)>h.size?s(h.getIterator(),function(v){u(c,v)&&a(f,v)}):i(c,function(v){h.includes(v)&&a(f,v)}),f},Ry}var eM;function M6(){if(eM)return ZA;eM=1;var n=z(),e=te(),t=A6(),r=fi(),i=!r("intersection",function(s){return s.size===2&&s.has(1)&&s.has(2)})||e(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});return n({target:"Set",proto:!0,real:!0,forced:i},{intersection:t}),ZA}var tM={},qy,rM;function F6(){if(rM)return qy;rM=1;var n=li(),e=di().has,t=Ss(),r=hi(),i=Es(),s=ci(),o=Sb();return qy=function(u){var l=n(this),d=r(u);if(t(l)<=d.size)return i(l,function(h){if(d.includes(h))return!1},!0)!==!1;var c=d.getIterator();return s(c,function(h){if(e(l,h))return o(c,"normal",!1)})!==!1},qy}var iM;function N6(){if(iM)return tM;iM=1;var n=z(),e=F6(),t=fi(),r=!t("isDisjointFrom",function(i){return!i});return n({target:"Set",proto:!0,real:!0,forced:r},{isDisjointFrom:e}),tM}var nM={},Cy,sM;function k6(){if(sM)return Cy;sM=1;var n=li(),e=Ss(),t=Es(),r=hi();return Cy=function(s){var o=n(this),a=r(s);return e(o)>a.size?!1:t(o,function(u){if(!a.includes(u))return!1},!0)!==!1},Cy}var oM;function B6(){if(oM)return nM;oM=1;var n=z(),e=k6(),t=fi(),r=!t("isSubsetOf",function(i){return i});return n({target:"Set",proto:!0,real:!0,forced:r},{isSubsetOf:e}),nM}var aM={},xy,uM;function j6(){if(uM)return xy;uM=1;var n=li(),e=di().has,t=Ss(),r=hi(),i=ci(),s=Sb();return xy=function(a){var u=n(this),l=r(a);if(t(u)<l.size)return!1;var d=l.getIterator();return i(d,function(c){if(!e(u,c))return s(d,"normal",!1)})!==!1},xy}var lM;function L6(){if(lM)return aM;lM=1;var n=z(),e=j6(),t=fi(),r=!t("isSupersetOf",function(i){return!i});return n({target:"Set",proto:!0,real:!0,forced:r},{isSupersetOf:e}),aM}var dM={},Dy,cM;function z6(){if(cM)return Dy;cM=1;var n=li(),e=di(),t=xb(),r=hi(),i=ci(),s=e.add,o=e.has,a=e.remove;return Dy=function(l){var d=n(this),c=r(l).getIterator(),h=t(d);return i(c,function(f){o(d,f)?a(h,f):s(h,f)}),h},Dy}var Ay,hM;function Hk(){return hM||(hM=1,Ay=function(n){try{var e=new Set,t={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return e.clear(),e.add(4),function(){return{done:!0}}}})}},r=e[n](t);return r.size===1&&r.values().next().value===4}catch{return!1}}),Ay}var fM;function W6(){if(fM)return dM;fM=1;var n=z(),e=z6(),t=Hk(),r=fi(),i=!r("symmetricDifference")||!t("symmetricDifference");return n({target:"Set",proto:!0,real:!0,forced:i},{symmetricDifference:e}),dM}var vM={},My,pM;function H6(){if(pM)return My;pM=1;var n=li(),e=di().add,t=xb(),r=hi(),i=ci();return My=function(o){var a=n(this),u=r(o).getIterator(),l=t(a);return i(u,function(d){e(l,d)}),l},My}var gM;function U6(){if(gM)return vM;gM=1;var n=z(),e=H6(),t=Hk(),r=fi(),i=!r("union")||!t("union");return n({target:"Set",proto:!0,real:!0,forced:i},{union:e}),vM}var Fy,yM;function V6(){if(yM)return Fy;yM=1,nn(),q6(),D6(),M6(),N6(),B6(),L6(),W6(),U6(),Tb();var n=oe();return Fy=n.Set,Fy}var Ny,mM;function G6(){if(mM)return Ny;mM=1;var n=V6();return sn(),Ny=n,Ny}var ky,bM;function K6(){return bM||(bM=1,ky=G6()),ky}var Y6=K6(),nr=G(Y6),_M={},wM={},By,EM;function X6(){if(EM)return By;EM=1;var n=re(),e=$b(),t=Ro().getWeakData,r=Ob(),i=kt(),s=Vi(),o=Le(),a=qo(),u=_r(),l=He(),d=oi(),c=d.set,h=d.getterFor,f=u.find,v=u.findIndex,p=n([].splice),b=0,y=function(m){return m.frozen||(m.frozen=new g)},g=function(){this.entries=[]},S=function(m,w){return f(m.entries,function(O){return O[0]===w})};return g.prototype={get:function(m){var w=S(this,m);if(w)return w[1]},has:function(m){return!!S(this,m)},set:function(m,w){var O=S(this,m);O?O[1]=w:this.entries.push([m,w])},delete:function(m){var w=v(this.entries,function(O){return O[0]===m});return~w&&p(this.entries,w,1),!!~w}},By={getConstructor:function(m,w,O,I){var _=m(function(P,R){r(P,E),c(P,{type:w,id:b++,frozen:null}),s(R)||a(R,P[I],{that:P,AS_ENTRIES:O})}),E=_.prototype,$=h(w),T=function(P,R,C){var M=$(P),K=t(i(R),!0);return K===!0?y(M).set(R,C):K[M.id]=C,P};return e(E,{delete:function(P){var R=$(this);if(!o(P))return!1;var C=t(P);return C===!0?y(R).delete(P):C&&l(C,R.id)&&delete C[R.id]},has:function(R){var C=$(this);if(!o(R))return!1;var M=t(R);return M===!0?y(C).has(R):M&&l(M,C.id)}}),e(E,O?{get:function(R){var C=$(this);if(o(R)){var M=t(R);if(M===!0)return y(C).get(R);if(M)return M[C.id]}},set:function(R,C){return T(this,R,C)}}:{add:function(R){return T(this,R,!0)}}),_}},By}var SM;function J6(){if(SM)return wM;SM=1;var n=qk(),e=ge(),t=re(),r=$b(),i=Ro(),s=Ib(),o=X6(),a=Le(),u=oi().enforce,l=te(),d=xN(),c=Object,h=Array.isArray,f=c.isExtensible,v=c.isFrozen,p=c.isSealed,b=c.freeze,y=c.seal,g=!e.ActiveXObject&&"ActiveXObject"in e,S,m=function(P){return function(){return P(this,arguments.length?arguments[0]:void 0)}},w=s("WeakMap",m,o),O=w.prototype,I=t(O.set),_=function(){return n&&l(function(){var P=b([]);return I(new w,P,1),!v(P)})};if(d)if(g){S=o.getConstructor(m,"WeakMap",!0),i.enable();var E=t(O.delete),$=t(O.has),T=t(O.get);r(O,{delete:function(P){if(a(P)&&!f(P)){var R=u(this);return R.frozen||(R.frozen=new S),E(this,P)||R.frozen.delete(P)}return E(this,P)},has:function(R){if(a(R)&&!f(R)){var C=u(this);return C.frozen||(C.frozen=new S),$(this,R)||C.frozen.has(R)}return $(this,R)},get:function(R){if(a(R)&&!f(R)){var C=u(this);return C.frozen||(C.frozen=new S),$(this,R)?T(this,R):C.frozen.get(R)}return T(this,R)},set:function(R,C){if(a(R)&&!f(R)){var M=u(this);M.frozen||(M.frozen=new S),$(this,R)?I(this,R,C):M.frozen.set(R,C)}else I(this,R,C);return this}})}else _()&&r(O,{set:function(R,C){var M;return h(R)&&(v(R)?M=b:p(R)&&(M=y)),I(this,R,C),M&&M(R),this}});return wM}var OM;function Z6(){return OM||(OM=1,J6()),_M}var jy,IM;function Q6(){if(IM)return jy;IM=1,nn(),Z6();var n=oe();return jy=n.WeakMap,jy}var Ly,$M;function e8(){if($M)return Ly;$M=1;var n=Q6();return sn(),Ly=n,Ly}var zy,TM;function t8(){return TM||(TM=1,zy=e8()),zy}var r8=t8(),Os=G(r8);function qn(n,e,t){i8(n,e),e.set(n,t)}function i8(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function $m(n,e,t){return n.set(Uk(n,e),t),t}function ce(n,e){return n.get(Uk(n,e))}function Uk(n,e,t){if(typeof n=="function"?n===e:n.has(e))return arguments.length<3?e:t;throw new TypeError("Private element is not present on this object")}function PM(n,e){const t=new nr;for(const r of e)n.has(r)||t.add(r);return t}var gi=new Os,Et=new Os;class RM{constructor(){qn(this,gi,new nr),qn(this,Et,new nr)}get size(){return ce(Et,this).size}add(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(const i of t)ce(Et,this).add(i)}delete(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(const i of t)ce(Et,this).delete(i)}clear(){ce(Et,this).clear()}getSelection(){return[...ce(Et,this)]}getChanges(){return{added:[...PM(ce(gi,this),ce(Et,this))],deleted:[...PM(ce(Et,this),ce(gi,this))],previous:[...new nr(ce(gi,this))],current:[...new nr(ce(Et,this))]}}commit(){const e=this.getChanges();$m(gi,this,ce(Et,this)),$m(Et,this,new nr(ce(gi,this)));for(const t of e.added)t.select();for(const t of e.deleted)t.unselect();return e}}var Rr=new Os,qr=new Os,Wy=new Os;class n8{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:()=>{};qn(this,Rr,new RM),qn(this,qr,new RM),qn(this,Wy,void 0),$m(Wy,this,e)}get sizeNodes(){return ce(Rr,this).size}get sizeEdges(){return ce(qr,this).size}getNodes(){return ce(Rr,this).getSelection()}getEdges(){return ce(qr,this).getSelection()}addNodes(){ce(Rr,this).add(...arguments)}addEdges(){ce(qr,this).add(...arguments)}deleteNodes(e){ce(Rr,this).delete(e)}deleteEdges(e){ce(qr,this).delete(e)}clear(){ce(Rr,this).clear(),ce(qr,this).clear()}commit(){const e={nodes:ce(Rr,this).commit(),edges:ce(qr,this).commit()};for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return ce(Wy,this).call(this,e,...r),e}}class s8{constructor(e,t){this.body=e,this.canvas=t,this._selectionAccumulator=new n8,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},Te(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",()=>{this.updateSelection()})}setOptions(e){e!==void 0&&un(["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"],this.options,e)}selectOnPoint(e){let t=!1;if(this.options.selectable===!0){const r=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),r!==void 0&&(t=this.selectObject(r)),this.body.emitter.emit("_requestRedraw")}return t}selectAdditionalOnPoint(e){let t=!1;if(this.options.selectable===!0){const r=this.getNodeAt(e)||this.getEdgeAt(e);r!==void 0&&(t=!0,r.isSelected()===!0?this.deselectObject(r):this.selectObject(r),this.body.emitter.emit("_requestRedraw"))}return t}_initBaseEvent(e,t){const r={};return r.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},r.event=e,r}generateClickEvent(e,t,r,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;const o=this._initBaseEvent(t,r);if(s===!0)o.nodes=[],o.edges=[];else{const a=this.getSelection();o.nodes=a.nodes,o.edges=a.edges}i!==void 0&&(o.previousSelection=i),e=="click"&&(o.items=this.getClickedItems(r)),t.controlEdge!==void 0&&(o.controlEdge=t.controlEdge),this.body.emitter.emit(e,o)}selectObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;return e!==void 0?(e instanceof pe?(t===!0&&this._selectionAccumulator.addEdges(...e.edges),this._selectionAccumulator.addNodes(e)):this._selectionAccumulator.addEdges(e),!0):!1}deselectObject(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}_getAllNodesOverlappingWith(e){const t=[],r=this.body.nodes;for(let i=0;i<this.body.nodeIndices.length;i++){const s=this.body.nodeIndices[i];r[s].isOverlappingWith(e)&&t.push(s)}return t}_pointerToPositionObject(e){const 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;const r=this._pointerToPositionObject(e),i=this._getAllNodesOverlappingWith(r);if(i.length>0)return t===!0?this.body.nodes[i[i.length-1]]:i[i.length-1]}_getEdgesOverlappingWith(e,t){const r=this.body.edges;for(let i=0;i<this.body.edgeIndices.length;i++){const s=this.body.edgeIndices[i];r[s].isOverlappingWith(e)&&t.push(s)}}_getAllEdgesOverlappingWith(e){const t=[];return this._getEdgesOverlappingWith(e,t),t}getEdgeAt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const r=this.canvas.DOMtoCanvas(e);let i=10,s=null;const o=this.body.edges;for(let a=0;a<this.body.edgeIndices.length;a++){const u=this.body.edgeIndices[a],l=o[u];if(l.connected){const d=l.from.x,c=l.from.y,h=l.to.x,f=l.to.y,v=l.edgeType.getDistanceToEdge(d,c,h,f,r.x,r.y);v<i&&(s=u,i=v)}}if(s!==null)return t===!0?this.body.edges[s]:s}_addToHover(e){e instanceof pe?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}_removeFromSelection(e){e instanceof pe?(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++){const r=e.edges[t];r.hover=!0,this._addToHover(r)}}emitBlurEvent(e,t,r){const i=this._initBaseEvent(e,t);r.hover===!0&&(r.hover=!1,r instanceof pe?(i.node=r.id,this.body.emitter.emit("blurNode",i)):(i.edge=r.id,this.body.emitter.emit("blurEdge",i)))}emitHoverEvent(e,t,r){const i=this._initBaseEvent(e,t);let s=!1;return r.hover===!1&&(r.hover=!0,this._addToHover(r),s=!0,r instanceof pe?(i.node=r.id,this.body.emitter.emit("hoverNode",i)):(i.edge=r.id,this.body.emitter.emit("hoverEdge",i))),s}hoverObject(e,t){let r=this.getNodeAt(t);r===void 0&&(r=this.getEdgeAt(t));let i=!1;for(const s in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,s)&&(r===void 0||r instanceof pe&&r.id!=s||r instanceof cr)&&(this.emitBlurEvent(e,t,this.hoverObj.nodes[s]),delete this.hoverObj.nodes[s],i=!0);for(const s in this.hoverObj.edges)Object.prototype.hasOwnProperty.call(this.hoverObj.edges,s)&&(i===!0?(this.hoverObj.edges[s].hover=!1,delete this.hoverObj.edges[s]):(r===void 0||r instanceof cr&&r.id!=s||r instanceof pe&&!r.hover)&&(this.emitBlurEvent(e,t,this.hoverObj.edges[s]),delete this.hoverObj.edges[s],i=!0));if(r!==void 0){const s=Ee(this.hoverObj.edges).length,o=Ee(this.hoverObj.nodes).length,a=r instanceof cr&&s===0&&o===0,u=r instanceof pe&&s===0&&o===0;(i||a||u)&&(i=this.emitHoverEvent(e,t,r)),r instanceof pe&&this.options.hoverConnectedEdges===!0&&this._hoverConnectedEdges(r)}i===!0&&this.body.emitter.emit("_requestRedraw")}commitWithoutEmitting(){this._selectionAccumulator.commit()}commitAndEmit(e,t){let r=!1;const i=this._selectionAccumulator.commit(),s={nodes:i.nodes.previous,edges:i.edges.previous};i.edges.deleted.length>0&&(this.generateClickEvent("deselectEdge",t,e,s),r=!0),i.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",t,e,s),r=!0),i.nodes.added.length>0&&(this.generateClickEvent("selectNode",t,e),r=!0),i.edges.added.length>0&&(this.generateClickEvent("selectEdge",t,e),r=!0),r===!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 qi(e=this._selectionAccumulator.getNodes()).call(e,t=>t.id)}getSelectedEdgeIds(){var e;return qi(e=this._selectionAccumulator.getEdges()).call(e,t=>t.id)}setSelection(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes)for(const r of e.nodes){const i=this.body.nodes[r];if(!i)throw new RangeError('Node with id "'+r+'" not found');this.selectObject(i,t.highlightEdges)}if(e.edges)for(const r of e.edges){const i=this.body.edges[r];if(!i)throw new RangeError('Edge with id "'+r+'" not found');this.selectObject(i)}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(const e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(const e in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,e.id)||this._selectionAccumulator.deleteEdges(e)}getClickedItems(e){const t=this.canvas.DOMtoCanvas(e),r=[],i=this.body.nodeIndices,s=this.body.nodes;for(let u=i.length-1;u>=0;u--){const d=s[i[u]].getItemsOnPoint(t);r.push.apply(r,d)}const o=this.body.edgeIndices,a=this.body.edges;for(let u=o.length-1;u>=0;u--){const d=a[o[u]].getItemsOnPoint(t);r.push.apply(r,d)}return r}}var qM={},Hy,CM;function o8(){if(CM)return Hy;CM=1;var n=en(),e=Math.floor,t=function(r,i){var s=r.length;if(s<8)for(var o=1,a,u;o<s;){for(u=o,a=r[o];u&&i(r[u-1],a)>0;)r[u]=r[--u];u!==o++&&(r[u]=a)}else for(var l=e(s/2),d=t(n(r,0,l),i),c=t(n(r,l),i),h=d.length,f=c.length,v=0,p=0;v<h||p<f;)r[v+p]=v<h&&p<f?i(d[v],c[p])<=0?d[v++]:c[p++]:v<h?d[v++]:c[p++];return r};return Hy=t,Hy}var Uy,xM;function a8(){if(xM)return Uy;xM=1;var n=Gi(),e=n.match(/firefox\/(\d+)/i);return Uy=!!e&&+e[1],Uy}var Vy,DM;function u8(){if(DM)return Vy;DM=1;var n=Gi();return Vy=/MSIE|Trident/.test(n),Vy}var Gy,AM;function l8(){if(AM)return Gy;AM=1;var n=Gi(),e=n.match(/AppleWebKit\/(\d+)\./);return Gy=!!e&&+e[1],Gy}var MM;function d8(){if(MM)return qM;MM=1;var n=z(),e=re(),t=er(),r=lt(),i=tr(),s=WN(),o=yt(),a=te(),u=o8(),l=on(),d=a8(),c=u8(),h=us(),f=l8(),v=[],p=e(v.sort),b=e(v.push),y=a(function(){v.sort(void 0)}),g=a(function(){v.sort(null)}),S=l("sort"),m=!a(function(){if(h)return h<70;if(!(d&&d>3)){if(c)return!0;if(f)return f<603;var I="",_,E,$,T;for(_=65;_<76;_++){switch(E=String.fromCharCode(_),_){case 66:case 69:case 70:case 72:$=3;break;case 68:case 71:$=4;break;default:$=2}for(T=0;T<47;T++)v.push({k:E+T,v:$})}for(v.sort(function(P,R){return R.v-P.v}),T=0;T<v.length;T++)E=v[T].k.charAt(0),I.charAt(I.length-1)!==E&&(I+=E);return I!=="DGBEFHACIJK"}}),w=y||!g||!S||!m,O=function(I){return function(_,E){return E===void 0?-1:_===void 0?1:I!==void 0?+I(_,E)||0:o(_)>o(E)?1:-1}};return n({target:"Array",proto:!0,forced:w},{sort:function(_){_!==void 0&&t(_);var E=r(this);if(m)return _===void 0?p(E):p(E,_);var $=[],T=i(E),P,R;for(R=0;R<T;R++)R in E&&b($,E[R]);for(u($,O(_)),P=i($),R=0;R<P;)E[R]=$[R++];for(;R<T;)s(E,R++);return E}}),qM}var Ky,FM;function c8(){if(FM)return Ky;FM=1,d8();var n=Ue();return Ky=n("Array","sort"),Ky}var Yy,NM;function h8(){if(NM)return Yy;NM=1;var n=Ce(),e=c8(),t=Array.prototype;return Yy=function(r){var i=r.sort;return r===t||n(t,r)&&i===t.sort?e:i},Yy}var Xy,kM;function f8(){if(kM)return Xy;kM=1;var n=h8();return Xy=n,Xy}var Jy,BM;function v8(){return BM||(BM=1,Jy=f8()),Jy}var p8=v8(),$i=G(p8),jM={},Zy,LM;function g8(){if(LM)return Zy;LM=1;var n=er(),e=lt(),t=po(),r=tr(),i=TypeError,s="Reduce of empty array with no initial value",o=function(a){return function(u,l,d,c){var h=e(u),f=t(h),v=r(h);if(n(l),v===0&&d<2)throw new i(s);var p=a?v-1:0,b=a?-1:1;if(d<2)for(;;){if(p in f){c=f[p],p+=b;break}if(p+=b,a?p<0:v<=p)throw new i(s)}for(;a?p>=0:v>p;p+=b)p in f&&(c=l(c,f[p],p,h));return c}};return Zy={left:o(!1),right:o(!0)},Zy}var Qy,zM;function y8(){if(zM)return Qy;zM=1;var n=UN();return Qy=n==="NODE",Qy}var WM;function m8(){if(WM)return jM;WM=1;var n=z(),e=g8().left,t=on(),r=us(),i=y8(),s=!i&&r>79&&r<83,o=s||!t("reduce");return n({target:"Array",proto:!0,forced:o},{reduce:function(u){var l=arguments.length;return e(this,u,l,l>1?arguments[1]:void 0)}}),jM}var em,HM;function b8(){if(HM)return em;HM=1,m8();var n=Ue();return em=n("Array","reduce"),em}var tm,UM;function _8(){if(UM)return tm;UM=1;var n=Ce(),e=b8(),t=Array.prototype;return tm=function(r){var i=r.reduce;return r===t||n(t,r)&&i===t.reduce?e:i},tm}var rm,VM;function w8(){if(VM)return rm;VM=1;var n=_8();return rm=n,rm}var im,GM;function E8(){return GM||(GM=1,im=w8()),im}var S8=E8(),Vk=G(S8);class Gk{abstract(){throw new 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 r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,r),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()}}class O8 extends Gk{constructor(e){super(),this.layout=e}curveType(){return"horizontal"}getPosition(e){return e.x}setPosition(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;r!==void 0&&this.layout.hierarchical.addToOrdering(e,r),e.x=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_x,max:t.max_x}}sort(e){$i(e).call(e,function(t,r){return t.x-r.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}}class I8 extends Gk{constructor(e){super(),this.layout=e}curveType(){return"vertical"}getPosition(e){return e.y}setPosition(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;r!==void 0&&this.layout.hierarchical.addToOrdering(e,r),e.y=t}getTreeSize(e){const t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_y,max:t.max_y}}sort(e){$i(e).call(e,function(t,r){return t.y-r.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}}var KM={},YM;function $8(){if(YM)return KM;YM=1;var n=z(),e=_r().every,t=on(),r=t("every");return n({target:"Array",proto:!0,forced:!r},{every:function(s){return e(this,s,arguments.length>1?arguments[1]:void 0)}}),KM}var nm,XM;function T8(){if(XM)return nm;XM=1,$8();var n=Ue();return nm=n("Array","every"),nm}var sm,JM;function P8(){if(JM)return sm;JM=1;var n=Ce(),e=T8(),t=Array.prototype;return sm=function(r){var i=r.every;return r===t||n(t,r)&&i===t.every?e:i},sm}var om,ZM;function R8(){if(ZM)return om;ZM=1;var n=P8();return om=n,om}var am,QM;function q8(){return QM||(QM=1,am=R8()),am}var C8=q8(),Kk=G(C8);function x8(n,e){const t=new nr;return le(n).call(n,r=>{var i;le(i=r.edges).call(i,s=>{s.connected&&t.add(s)})}),le(t).call(t,r=>{const i=r.from.id,s=r.to.id;e[i]==null&&(e[i]=0),(e[s]==null||e[i]>=e[s])&&(e[s]=e[i]+1)}),e}function D8(n){return Yk(e=>{var t,r;return Kk(t=tt(r=e.edges).call(r,i=>n.has(i.toId))).call(t,i=>i.to===e)},(e,t)=>t>e,"from",n)}function A8(n){return Yk(e=>{var t,r;return Kk(t=tt(r=e.edges).call(r,i=>n.has(i.toId))).call(t,i=>i.from===e)},(e,t)=>t<e,"to",n)}function Yk(n,e,t,r){var i;const s=kr(null),o=Vk(i=[...Bk(r).call(r)]).call(i,(c,h)=>c+1+h.edges.length,0),a=t+"Id",u=t==="to"?1:-1;for(const[c,h]of r){if(!r.has(c)||!n(h))continue;s[c]=0;const f=[h];let v=0,p;for(;p=f.pop();){var l,d;if(!r.has(c))continue;const b=s[p.id]+u;if(le(l=tt(d=p.edges).call(d,y=>y.connected&&y.to!==y.from&&y[t]!==p&&r.has(y.toId)&&r.has(y.fromId))).call(l,y=>{const g=y[a],S=s[g];(S==null||e(b,S))&&(s[g]=b,f.push(y[t]))}),v>o)return x8(r,s);++v}}return s}class M8{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(const 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){const t={},r=i=>{if(t[i]!==void 0)return t[i];let s=this.levels[i];if(this.childrenReference[i]){const o=this.childrenReference[i];if(o.length>0)for(let a=0;a<o.length;a++)s=Math.max(s,r(o[a]))}return t[i]=s,s};return r(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(){var e;const t=new Pb;let r=0;const i=$i(e=[...new nr(X5(this.levels))]).call(e,(s,o)=>s-o);for(const s of i)t.set(s,r++);for(const s in this.levels)Object.prototype.hasOwnProperty.call(this.levels,s)&&(this.levels[s]=t.get(this.levels[s]))}getTreeSize(e,t){let r=1e9,i=-1e9,s=1e9,o=-1e9;for(const a in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,a)&&this.trees[a]===t){const u=e[a];r=Math.min(u.x,r),i=Math.max(u.x,i),s=Math.min(u.y,s),o=Math.max(u.y,o)}return{min_x:r,max_x:i,min_y:s,max_y:o}}hasSameParent(e,t){const r=this.parentReference[e.id],i=this.parentReference[t.id];if(r===void 0||i===void 0)return!1;for(let s=0;s<r.length;s++)for(let o=0;o<i.length;o++)if(r[s]==i[o])return!0;return!1}inSameSubNetwork(e,t){return this.trees[e.id]===this.trees[t.id]}getLevels(){return Ee(this.distributionOrdering)}addToOrdering(e,t){this.distributionOrdering[t]===void 0&&(this.distributionOrdering[t]=[]);let r=!1;const i=this.distributionOrdering[t];for(const s in i)if(i[s]===e){r=!0;break}r||(this.distributionOrdering[t].push(e),this.distributionIndex[e.id]=this.distributionOrdering[t].length-1)}}class F8{constructor(e){this.body=e,this._resetRNG(Math.random()+":"+Ws()),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"}},Te(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;const e=this.direction.curveType();this.body.emitter.emit("_forceDisableDynamicCurves",e,!1)})}setOptions(e,t){if(e!==void 0){const r=this.options.hierarchical,i=r.enabled;if(un(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),dt(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),r.enabled===!0)return i===!0&&this.body.emitter.emit("refresh",!0),r.direction==="RL"||r.direction==="DU"?r.levelSeparation>0&&(r.levelSeparation*=-1):r.levelSeparation<0&&(r.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(i===!0)return this.body.emitter.emit("refresh"),he(t,this.optionsBackup)}return t}_resetRNG(e){this.initialRandomSeed=e,this._rng=Po(this.initialRandomSeed)}adaptAllOptionsForHierarchicalLayout(e){if(this.options.hierarchical.enabled===!0){const t=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:t.enabled===void 0?!0:t.enabled,solver:"hierarchicalRepulsion"},t.enabled=t.enabled===void 0?!0:t.enabled,t.solver=t.solver||"barnesHut"):typeof e.physics=="object"?(t.enabled=e.physics.enabled===void 0?!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 r=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:r};else{const i=e.edges.smooth;i.type!==void 0&&i.type!=="dynamic"&&(r=i.type),this.optionsBackup.edges={smooth:{enabled:i.enabled===void 0?!0:i.enabled,type:i.type===void 0?"dynamic":i.type,roundness:i.roundness===void 0?.5:i.roundness,forceDirection:i.forceDirection===void 0?!1:i.forceDirection}},e.edges.smooth={enabled:i.enabled===void 0?!0:i.enabled,type:r,roundness:i.roundness===void 0?.5:i.roundness,forceDirection:i.forceDirection===void 0?!1:i.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",r)}return e}positionInitially(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);const t=e.length+50;for(let r=0;r<e.length;r++){const i=e[r],s=2*Math.PI*this._rng();i.x===void 0&&(i.x=t*Math.cos(s)),i.y===void 0&&(i.y=t*Math.sin(s))}}}layoutNetwork(){if(this.options.hierarchical.enabled!==!0&&this.options.improvedLayout===!0){const e=this.body.nodeIndices;let t=0;for(let r=0;r<e.length;r++)this.body.nodes[e[r]].predefinedPosition===!0&&(t+=1);if(t<.5*e.length){let i=0;const s=this.options.clusterThreshold,o={clusterNodeProperties:{shape:"ellipse",label:"",group:"",font:{multi:!1}},clusterEdgeProperties:{label:"",font:{multi:!1},smooth:{enabled:!1}}};if(e.length>s){const u=e.length;for(;e.length>s&&i<=10;){i+=1;const l=e.length;i%3===0?this.body.modules.clustering.clusterBridges(o):this.body.modules.clustering.clusterOutliers(o);const d=e.length;if(l==d&&i%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*u)})}i>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();const a=70;for(let u=0;u<e.length;u++){const l=this.body.nodes[e[u]];l.predefinedPosition===!1&&(l.x+=(.5-this._rng())*a,l.y+=(.5-this._rng())*a)}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}_shiftToCenter(){const e=Xe.getRangeCore(this.body.nodes,this.body.nodeIndices),t=Xe.findCenter(e);for(let r=0;r<this.body.nodeIndices.length;r++){const i=this.body.nodes[this.body.nodeIndices[r]];i.x-=t.x,i.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,r=!1,i=!1;this.lastNodeOnLevel={},this.hierarchical=new M8;for(t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(e=this.body.nodes[t],e.options.level!==void 0?(r=!0,this.hierarchical.levels[t]=e.options.level):i=!0);if(i===!0&&r===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");{if(i===!0){const o=this.options.hierarchical.sortMethod;o==="hubsize"?this._determineLevelsByHubsize():o==="directed"?this._determineLevelsDirected():o==="custom"&&this._determineLevelsCustomCallback()}for(const o in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,o)&&this.hierarchical.ensureLevel(o);const s=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(s),this._condenseHierarchy(),this._shiftToCenter()}}}_condenseHierarchy(){var e=this;let t=!1;const r={},i=()=>{const y=o();let g=0;for(let S=0;S<y.length-1;S++){const m=y[S].max-y[S+1].min;g+=m+this.options.hierarchical.treeSpacing,s(S+1,g)}},s=(y,g)=>{const S=this.hierarchical.trees;for(const m in S)Object.prototype.hasOwnProperty.call(S,m)&&S[m]===y&&this.direction.shift(m,g)},o=()=>{const y=[];for(let g=0;g<this.hierarchical.numTrees();g++)y.push(this.direction.getTreeSize(g));return y},a=(y,g)=>{if(!g[y.id]&&(g[y.id]=!0,this.hierarchical.childrenReference[y.id])){const S=this.hierarchical.childrenReference[y.id];if(S.length>0)for(let m=0;m<S.length;m++)a(this.body.nodes[S[m]],g)}},u=function(y){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,S=1e9,m=1e9,w=1e9,O=-1e9;for(const I in y)if(Object.prototype.hasOwnProperty.call(y,I)){const _=e.body.nodes[I],E=e.hierarchical.levels[_.id],$=e.direction.getPosition(_),[T,P]=e._getSpaceAroundNode(_,y);S=Math.min(T,S),m=Math.min(P,m),E<=g&&(w=Math.min($,w),O=Math.max($,O))}return[w,O,S,m]},l=(y,g)=>{const S=this.hierarchical.getMaxLevel(y.id),m=this.hierarchical.getMaxLevel(g.id);return Math.min(S,m)},d=(y,g,S)=>{const m=this.hierarchical;for(let w=0;w<g.length;w++){const O=g[w],I=m.distributionOrdering[O];if(I.length>1)for(let _=0;_<I.length-1;_++){const E=I[_],$=I[_+1];m.hasSameParent(E,$)&&m.inSameSubNetwork(E,$)&&y(E,$,S)}}},c=function(y,g){let S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const m=e.direction.getPosition(y),w=e.direction.getPosition(g),O=Math.abs(w-m),I=e.options.hierarchical.nodeSpacing;if(O>I){const _={},E={};a(y,_),a(g,E);const $=l(y,g),T=u(_,$),P=u(E,$),R=T[1],C=P[0],M=P[2];if(Math.abs(R-C)>I){let L=R-C+I;L<-M+I&&(L=-M+I),L<0&&(e._shiftBlock(g.id,L),t=!0,S===!0&&e._centerParent(g))}}},h=(y,g)=>{const S=g.id,m=g.edges,w=this.hierarchical.levels[g.id],O=this.options.hierarchical.levelSeparation*this.options.hierarchical.levelSeparation,I={},_=[];for(let M=0;M<m.length;M++){const K=m[M];if(K.toId!=K.fromId){const L=K.toId==S?K.from:K.to;I[m[M].id]=L,this.hierarchical.levels[L.id]<w&&_.push(K)}}const E=(M,K)=>{let L=0;for(let J=0;J<K.length;J++)if(I[K[J].id]!==void 0){const Q=this.direction.getPosition(I[K[J].id])-M;L+=Q/Math.sqrt(Q*Q+O)}return L},$=(M,K)=>{let L=0;for(let J=0;J<K.length;J++)if(I[K[J].id]!==void 0){const Q=this.direction.getPosition(I[K[J].id])-M;L-=O*Math.pow(Q*Q+O,-1.5)}return L},T=(M,K)=>{let L=this.direction.getPosition(g);const J={};for(let Q=0;Q<M;Q++){const ae=E(L,K),W=$(L,K),ue=40,ye=Math.max(-ue,Math.min(ue,Math.round(ae/W)));if(L=L-ye,J[L]!==void 0)break;J[L]=Q}return L},P=M=>{const K=this.direction.getPosition(g);if(r[g.id]===void 0){const ue={};a(g,ue),r[g.id]=ue}const L=u(r[g.id]),J=L[2],Q=L[3],ae=M-K;let W=0;ae>0?W=Math.min(ae,Q-this.options.hierarchical.nodeSpacing):ae<0&&(W=-Math.min(-ae,J-this.options.hierarchical.nodeSpacing)),W!=0&&(this._shiftBlock(g.id,W),t=!0)},R=M=>{const K=this.direction.getPosition(g),[L,J]=this._getSpaceAroundNode(g),Q=M-K;let ae=K;Q>0?ae=Math.min(K+(J-this.options.hierarchical.nodeSpacing),M):Q<0&&(ae=Math.max(K-(L-this.options.hierarchical.nodeSpacing),M)),ae!==K&&(this.direction.setPosition(g,ae),t=!0)};let C=T(y,_);P(C),C=T(y,m),R(C)},f=y=>{let g=this.hierarchical.getLevels();g=Nr(g).call(g);for(let S=0;S<y;S++){t=!1;for(let m=0;m<g.length;m++){const w=g[m],O=this.hierarchical.distributionOrdering[w];for(let I=0;I<O.length;I++)h(1e3,O[I])}if(t!==!0)break}},v=y=>{let g=this.hierarchical.getLevels();g=Nr(g).call(g);for(let S=0;S<y&&(t=!1,d(c,g,!0),t===!0);S++);},p=()=>{for(const y in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,y)&&this._centerParent(this.body.nodes[y])},b=()=>{let y=this.hierarchical.getLevels();y=Nr(y).call(y);for(let g=0;g<y.length;g++){const S=y[g],m=this.hierarchical.distributionOrdering[S];for(let w=0;w<m.length;w++)this._centerParent(m[w])}};this.options.hierarchical.blockShifting===!0&&(v(5),p()),this.options.hierarchical.edgeMinimization===!0&&f(20),this.options.hierarchical.parentCentralization===!0&&b(),i()}_getSpaceAroundNode(e,t){let r=!0;t===void 0&&(r=!1);const i=this.hierarchical.levels[e.id];if(i!==void 0){const s=this.hierarchical.distributionIndex[e.id],o=this.direction.getPosition(e),a=this.hierarchical.distributionOrdering[i];let u=1e9,l=1e9;if(s!==0){const d=a[s-1];if(r===!0&&t[d.id]===void 0||r===!1){const c=this.direction.getPosition(d);u=o-c}}if(s!=a.length-1){const d=a[s+1];if(r===!0&&t[d.id]===void 0||r===!1){const c=this.direction.getPosition(d);l=Math.min(l,c-o)}}return[u,l]}else return[0,0]}_centerParent(e){if(this.hierarchical.parentReference[e.id]){const t=this.hierarchical.parentReference[e.id];for(let r=0;r<t.length;r++){const i=t[r],s=this.body.nodes[i],o=this.hierarchical.childrenReference[i];if(o!==void 0){const a=this._getCenterPosition(o),u=this.direction.getPosition(s),[l,d]=this._getSpaceAroundNode(s),c=u-a;(c<0&&Math.abs(c)<d-this.options.hierarchical.nodeSpacing||c>0&&Math.abs(c)<l-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(s,a)}}}}_placeNodesByHierarchy(e){this.positionedNodes={};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var t;let i=Ee(e[r]);i=this._indexArrayToNodes(i),$i(t=this.direction).call(t,i);let s=0;for(let o=0;o<i.length;o++){const a=i[o];if(this.positionedNodes[a.id]===void 0){const u=this.options.hierarchical.nodeSpacing;let l=u*s;s>0&&(l=this.direction.getPosition(i[o-1])+u),this.direction.setPosition(a,l,r),this._validatePositionAndContinue(a,r,l),s++}}}}_placeBranchNodes(e,t){var r;const i=this.hierarchical.childrenReference[e];if(i===void 0)return;const s=[];for(let a=0;a<i.length;a++)s.push(this.body.nodes[i[a]]);$i(r=this.direction).call(r,s);for(let a=0;a<s.length;a++){const u=s[a],l=this.hierarchical.levels[u.id];if(l>t&&this.positionedNodes[u.id]===void 0){const d=this.options.hierarchical.nodeSpacing;let c;a===0?c=this.direction.getPosition(this.body.nodes[e]):c=this.direction.getPosition(s[a-1])+d,this.direction.setPosition(u,c,l),this._validatePositionAndContinue(u,l,c)}else return}const o=this._getCenterPosition(s);this.direction.setPosition(this.body.nodes[e],o,t)}_validatePositionAndContinue(e,t,r){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){const i=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(r-i<this.options.hierarchical.nodeSpacing){const s=i+this.options.hierarchical.nodeSpacing-r,o=this._findCommonParent(this.lastNodeOnLevel[t],e.id);this._shiftBlock(o.withChild,s)}}this.lastNodeOnLevel[t]=e.id,this.positionedNodes[e.id]=!0,this._placeBranchNodes(e.id,t)}}_indexArrayToNodes(e){const t=[];for(let r=0;r<e.length;r++)t.push(this.body.nodes[e[r]]);return t}_getDistribution(){const e={};let t,r;for(t in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,t)){r=this.body.nodes[t];const i=this.hierarchical.levels[t]===void 0?0:this.hierarchical.levels[t];this.direction.fix(r,i),e[i]===void 0&&(e[i]={}),e[i][t]=r}return e}_getActiveEdges(e){const t=[];return Z(e.edges,r=>{var i;ne(i=this.body.edgeIndices).call(i,r.id)!==-1&&t.push(r)}),t}_getHubSizes(){const e={},t=this.body.nodeIndices;Z(t,i=>{const s=this.body.nodes[i],o=this._getActiveEdges(s).length;e[o]=!0});const r=[];return Z(e,i=>{r.push(Number(i))}),$i(r).call(r,function(i,s){return s-i}),r}_determineLevelsByHubsize(){const e=(r,i)=>{this.hierarchical.levelDownstream(r,i)},t=this._getHubSizes();for(let r=0;r<t.length;++r){const i=t[r];if(i===0)break;Z(this.body.nodeIndices,s=>{const o=this.body.nodes[s];i===this._getActiveEdges(o).length&&this._crawlNetwork(e,s)})}}_determineLevelsCustomCallback(){const t=function(i,s,o){},r=(i,s,o)=>{let a=this.hierarchical.levels[i.id];a===void 0&&(a=this.hierarchical.levels[i.id]=1e5);const u=t(Xe.cloneOptions(i,"node"),Xe.cloneOptions(s,"node"),Xe.cloneOptions(o,"edge"));this.hierarchical.levels[s.id]=a+u};this._crawlNetwork(r),this.hierarchical.setMinLevelToZero()}_determineLevelsDirected(){var e;const t=Vk(e=this.body.nodeIndices).call(e,(r,i)=>(r.set(i,this.body.nodes[i]),r),new Pb);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=A8(t):this.hierarchical.levels=D8(t),this.hierarchical.setMinLevelToZero()}_generateMap(){const e=(t,r)=>{this.hierarchical.levels[r.id]>this.hierarchical.levels[t.id]&&this.hierarchical.addRelation(t.id,r.id)};this._crawlNetwork(e),this.hierarchical.checkIfTree()}_crawlNetwork(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},t=arguments.length>1?arguments[1]:void 0;const r={},i=(s,o)=>{if(r[s.id]===void 0){this.hierarchical.setTreeIndex(s,o),r[s.id]=!0;let a;const u=this._getActiveEdges(s);for(let l=0;l<u.length;l++){const d=u[l];d.connected===!0&&(d.toId==s.id?a=d.from:a=d.to,s.id!=a.id&&(e(s,a,d),i(a,o)))}}};if(t===void 0){let s=0;for(let o=0;o<this.body.nodeIndices.length;o++){const a=this.body.nodeIndices[o];if(r[a]===void 0){const u=this.body.nodes[a];i(u,s),s+=1}}}else{const s=this.body.nodes[t];if(s===void 0){console.error("Node not found:",t);return}i(s)}}_shiftBlock(e,t){const r={},i=s=>{if(r[s])return;r[s]=!0,this.direction.shift(s,t);const o=this.hierarchical.childrenReference[s];if(o!==void 0)for(let a=0;a<o.length;a++)i(o[a])};i(e)}_findCommonParent(e,t){const r={},i=(o,a)=>{const u=this.hierarchical.parentReference[a];if(u!==void 0)for(let l=0;l<u.length;l++){const d=u[l];o[d]=!0,i(o,d)}},s=(o,a)=>{const u=this.hierarchical.parentReference[a];if(u!==void 0)for(let l=0;l<u.length;l++){const d=u[l];if(o[d]!==void 0)return{foundParent:d,withChild:a};const c=s(o,d);if(c.foundParent!==null)return c}return{foundParent:null,withChild:a}};return i(r,e),s(r,t)}setDirectionStrategy(){this.options.hierarchical.direction==="UD"||this.options.hierarchical.direction==="DU"?this.direction=new O8(this):this.direction=new I8(this)}_getCenterPosition(e){let t=1e9,r=-1e9;for(let i=0;i<e.length;i++){let s;if(e[i].id!==void 0)s=e[i];else{const a=e[i];s=this.body.nodes[a]}const o=this.direction.getPosition(s);t=Math.min(t,o),r=Math.max(r,o)}return .5*(t+r)}}class N8{constructor(e,t,r,i){var s,o;this.body=e,this.canvas=t,this.selectionHandler=r,this.interactionHandler=i,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}},Te(this.options,this.defaultOptions),this.body.emitter.on("destroy",()=>{this._clean()}),this.body.emitter.on("_dataChanged",D(s=this._restore).call(s,this)),this.body.emitter.on("_resetData",D(o=this._restore).call(o,this))}_restore(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}setOptions(e,t,r){t!==void 0&&(t.locale!==void 0?this.options.locale=t.locale:this.options.locale=r.locale,t.locales!==void 0?this.options.locales=t.locales:this.options.locales=r.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,he(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";const r=this.selectionHandler.getSelectedNodeCount(),i=this.selectionHandler.getSelectedEdgeCount(),s=r+i,o=this.options.locales[this.options.locale];let a=!1;this.options.addNode!==!1&&(this._createAddNodeButton(o),a=!0),this.options.addEdge!==!1&&(a===!0?this._createSeperator(1):a=!0,this._createAddEdgeButton(o)),r===1&&typeof this.options.editNode=="function"?(a===!0?this._createSeperator(2):a=!0,this._createEditNodeButton(o)):i===1&&r===0&&this.options.editEdge!==!1&&(a===!0?this._createSeperator(3):a=!0,this._createEditEdgeButton(o)),s!==0&&(r>0&&this.options.deleteNode!==!1?(a===!0&&this._createSeperator(4),this._createDeleteButton(o)):r===0&&this.options.deleteEdge!==!1&&(a===!0&&this._createSeperator(4),this._createDeleteButton(o))),this._bindElementEvents(this.closeDiv,D(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",D(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;const r=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(r),this._createSeperator(),this._createDescription(r.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,D(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent("click",D(e=this._performAddNode).call(e,this))}editNode(){this.editMode!==!0&&this.enableEditMode(),this._clean();const e=this.selectionHandler.getSelectedNodes()[0];if(e!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(e.isCluster!==!0){const t=he({},e.options,!1);if(t.x=e.x,t.y=e.y,this.options.editNode.length===2)this.options.editNode(t,r=>{r!=null&&this.inMode==="editNode"&&this.body.data.nodes.getDataSet().update(r),this.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}addEdgeMode(){var e,t,r,i,s;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var o;const a=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(a),this._createSeperator(),this._createDescription(a.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,D(o=this.toggleEditMode).call(o,this))}this._temporaryBindUI("onTouch",D(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",D(t=this._finishConnect).call(t,this)),this._temporaryBindUI("onDrag",D(r=this._dragControlNode).call(r,this)),this._temporaryBindUI("onRelease",D(i=this._finishConnect).call(i,this)),this._temporaryBindUI("onDragStart",D(s=this._dragStartEdge).call(s,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)){const o=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(o.from.id,o.to.id);return}if(this.guiEnabled===!0){var e;const o=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(o),this._createSeperator(),this._createDescription(o.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,D(e=this.toggleEditMode).call(e,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var t,r,i,s;const o=this.body.edges[this.edgeBeingEditedId],a=this._getNewTargetNode(o.from.x,o.from.y),u=this._getNewTargetNode(o.to.x,o.to.y);this.temporaryIds.nodes.push(a.id),this.temporaryIds.nodes.push(u.id),this.body.nodes[a.id]=a,this.body.nodeIndices.push(a.id),this.body.nodes[u.id]=u,this.body.nodeIndices.push(u.id),this._temporaryBindUI("onTouch",D(t=this._controlNodeTouch).call(t,this)),this._temporaryBindUI("onTap",()=>{}),this._temporaryBindUI("onHold",()=>{}),this._temporaryBindUI("onDragStart",D(r=this._controlNodeDragStart).call(r,this)),this._temporaryBindUI("onDrag",D(i=this._controlNodeDrag).call(i,this)),this._temporaryBindUI("onDragEnd",D(s=this._controlNodeDragEnd).call(s,this)),this._temporaryBindUI("onMouseMove",()=>{}),this._temporaryBindEvent("beforeDrawing",l=>{const d=o.edgeType.findBorderPositions(l);a.selected===!1&&(a.x=d.from.x,a.y=d.from.y),u.selected===!1&&(u.x=d.to.x,u.y=d.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}deleteSelected(){this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";const e=this.selectionHandler.getSelectedNodeIds(),t=this.selectionHandler.getSelectedEdgeIds();let r;if(e.length>0){for(let i=0;i<e.length;i++)if(this.body.nodes[e[i]].isCluster===!0){alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);return}typeof this.options.deleteNode=="function"&&(r=this.options.deleteNode)}else t.length>0&&typeof this.options.deleteEdge=="function"&&(r=this.options.deleteEdge);if(typeof r=="function"){const i={nodes:e,edges:t};if(r.length===2)r(i,s=>{s!=null&&this.inMode==="delete"?(this.body.data.edges.getDataSet().remove(s.edges),this.body.data.nodes.getDataSet().remove(s.nodes),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()):(this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar())});else throw new 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(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,t;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(t=this.options.locales[this.options.locale])===null||t===void 0?void 0:t.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}_getNewTargetNode(e,t){const r=he({},this.options.controlNodeStyle);r.id="targetNode"+Rn(),r.hidden=!1,r.physics=!1,r.x=e,r.y=t;const i=this.body.functions.createNode(r);return i.shape.boundingBox={left:e,right:e,top:t,bottom:t},i}_createEditButton(){var e;this._clean(),this.manipulationDOM={},rr(this.editModeDiv);const t=this.options.locales[this.options.locale],r=this._createButton("editMode","vis-edit vis-edit-mode",t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(r),this._bindElementEvents(r,D(e=this.toggleEditMode).call(e,this))}_clean(){this.inMode=!1,this.guiEnabled===!0&&(rr(this.editModeDiv),rr(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}_cleanupDOMEventListeners(){for(const t of Ut(e=this._domEventListenerCleanupQueue).call(e,0)){var e;t()}}_removeManipulationDOM(){this._clean(),rr(this.manipulationDiv),rr(this.editModeDiv),rr(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;const r=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,D(t=this.addNodeMode).call(t,this))}_createAddEdgeButton(e){var t;const r=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,D(t=this.addEdgeMode).call(t,this))}_createEditNodeButton(e){var t;const r=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,D(t=this.editNode).call(t,this))}_createEditEdgeButton(e){var t;const r=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,D(t=this.editEdgeMode).call(t,this))}_createDeleteButton(e){var t;let r;this.options.rtl?r="vis-delete-rtl":r="vis-delete";const i=this._createButton("delete",r,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,D(t=this.deleteSelected).call(t,this))}_createBackButton(e){var t;const r=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,D(t=this.showManipulatorToolbar).call(t,this))}_createButton(e,t,r){let i=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=i,this.manipulationDOM[e+"Label"].innerText=r,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 new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+ps(Ee(this.body.eventListeners)))}_unbindTemporaryUIs(){for(const 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++){const t=this.temporaryEventFunctions[e].event,r=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(t,r)}this.temporaryEventFunctions=[]}_bindElementEvents(e,t){const r=new Oi(e,{});Xs(r,t),this._domEventListenerCleanupQueue.push(()=>{r.destroy()});const i=s=>{let{keyCode:o,key:a}=s;(a==="Enter"||a===" "||o===13||o===32)&&t()};e.addEventListener("keyup",i,!1),this._domEventListenerCleanupQueue.push(()=>{e.removeEventListener("keyup",i,!1)})}_cleanupTemporaryNodesAndEdges(){for(let s=0;s<this.temporaryIds.edges.length;s++){var e;this.body.edges[this.temporaryIds.edges[s]].disconnect(),delete this.body.edges[this.temporaryIds.edges[s]];const o=ne(e=this.body.edgeIndices).call(e,this.temporaryIds.edges[s]);if(o!==-1){var t;Ut(t=this.body.edgeIndices).call(t,o,1)}}for(let s=0;s<this.temporaryIds.nodes.length;s++){var r;delete this.body.nodes[this.temporaryIds.nodes[s]];const o=ne(r=this.body.nodeIndices).call(r,this.temporaryIds.nodes[s]);if(o!==-1){var i;Ut(i=this.body.nodeIndices).call(i,o,1)}}this.temporaryIds={nodes:[],edges:[]}}_controlNodeTouch(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Te({},this.body.view.translation)}_controlNodeDragStart(){const e=this.lastTouch,t=this.selectionHandler._pointerToPositionObject(e),r=this.body.nodes[this.temporaryIds.nodes[0]],i=this.body.nodes[this.temporaryIds.nodes[1]],s=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;const o=r.isOverlappingWith(t),a=i.isOverlappingWith(t);o===!0?(this.selectedControlNode=r,s.edgeType.from=r):a===!0&&(this.selectedControlNode=i,s.edgeType.to=i),this.selectedControlNode!==void 0&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit("_redraw")}_controlNodeDrag(e){this.body.emitter.emit("disablePhysics");const t=this.body.functions.getPointer(e.center),r=this.canvas.DOMtoCanvas(t);this.selectedControlNode!==void 0?(this.selectedControlNode.x=r.x,this.selectedControlNode.y=r.y):this.interactionHandler.onDrag(e),this.body.emitter.emit("_redraw")}_controlNodeDragEnd(e){const t=this.body.functions.getPointer(e.center),r=this.selectionHandler._pointerToPositionObject(t),i=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode===void 0)return;this.selectionHandler.unselectAll();const s=this.selectionHandler._getAllNodesOverlappingWith(r);let o;for(let a=s.length-1;a>=0;a--)if(s[a]!==this.selectedControlNode.id){o=this.body.nodes[s[a]];break}if(o!==void 0&&this.selectedControlNode!==void 0)if(o.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const a=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===a.id?this._performEditEdge(o.id,i.to.id):this._performEditEdge(i.from.id,o.id)}else i.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=Te({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;const t=this.lastTouch,r=this.selectionHandler.getNodeAt(t);if(r!==void 0)if(r.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const i=this._getNewTargetNode(r.x,r.y);this.body.nodes[i.id]=i,this.body.nodeIndices.push(i.id);const s=this.body.functions.createEdge({id:"connectionEdge"+Rn(),from:r.id,to:i.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[s.id]=s,this.body.edgeIndices.push(s.id),this.temporaryIds.nodes.push(i.id),this.temporaryIds.edges.push(s.id)}this.touchTime=new Date().valueOf()}}_dragControlNode(e){const t=this.body.functions.getPointer(e.center),r=this.selectionHandler._pointerToPositionObject(t);let i;this.temporaryIds.edges[0]!==void 0&&(i=this.body.edges[this.temporaryIds.edges[0]].fromId);const s=this.selectionHandler._getAllNodesOverlappingWith(r);let o;for(let u=s.length-1;u>=0;u--){var a;if(ne(a=this.temporaryIds.nodes).call(a,s[u])===-1){o=this.body.nodes[s[u]];break}}if(e.controlEdge={from:i,to:o?o.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,t),this.temporaryIds.nodes[0]!==void 0){const u=this.body.nodes[this.temporaryIds.nodes[0]];u.x=this.canvas._XconvertDOMtoCanvas(t.x),u.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}_finishConnect(e){const t=this.body.functions.getPointer(e.center),r=this.selectionHandler._pointerToPositionObject(t);let i;this.temporaryIds.edges[0]!==void 0&&(i=this.body.edges[this.temporaryIds.edges[0]].fromId);const s=this.selectionHandler._getAllNodesOverlappingWith(r);let o;for(let u=s.length-1;u>=0;u--){var a;if(ne(a=this.temporaryIds.nodes).call(a,s[u])===-1){o=this.body.nodes[s[u]];break}}this._cleanupTemporaryNodesAndEdges(),o!==void 0&&(o.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[i]!==void 0&&this.body.nodes[o.id]!==void 0&&this._performAddEdge(i,o.id)),e.controlEdge={from:i,to:o?o.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,t),this.body.emitter.emit("_redraw")}_dragStartEdge(e){const t=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,t,void 0,!0)}_performAddNode(e){const t={id:Rn(),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,r=>{r!=null&&this.inMode==="addNode"&&this.body.data.nodes.getDataSet().add(r),this.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(t),this.showManipulatorToolbar()}_performAddEdge(e,t){const r={from:e,to:t};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(r,i=>{i!=null&&this.inMode==="addEdge"&&(this.body.data.edges.getDataSet().add(i),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(r),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}_performEditEdge(e,t){const r={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label};let i=this.options.editEdge;if(typeof i=="object"&&(i=i.editWithoutDrag),typeof i=="function")if(i.length===2)i(r,s=>{s==null||this.inMode!=="editEdge"?(this.body.edges[r.id].updateEdgeType(),this.body.emitter.emit("_redraw"),this.showManipulatorToolbar()):(this.body.data.edges.getDataSet().update(s),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(r),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}const A="string",x="boolean",q="number",Sn="array",j="object",Xk="dom",k8="any",um=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],lm={borderWidth:{number:q},borderWidthSelected:{number:q,undefined:"undefined"},brokenImage:{string:A,undefined:"undefined"},chosen:{label:{boolean:x,function:"function"},node:{boolean:x,function:"function"},__type__:{object:j,boolean:x}},color:{border:{string:A},background:{string:A},highlight:{border:{string:A},background:{string:A},__type__:{object:j,string:A}},hover:{border:{string:A},background:{string:A},__type__:{object:j,string:A}},__type__:{object:j,string:A}},opacity:{number:q,undefined:"undefined"},fixed:{x:{boolean:x},y:{boolean:x},__type__:{object:j,boolean:x}},font:{align:{string:A},color:{string:A},size:{number:q},face:{string:A},background:{string:A},strokeWidth:{number:q},strokeColor:{string:A},vadjust:{number:q},multi:{boolean:x,string:A},bold:{color:{string:A},size:{number:q},face:{string:A},mod:{string:A},vadjust:{number:q},__type__:{object:j,string:A}},boldital:{color:{string:A},size:{number:q},face:{string:A},mod:{string:A},vadjust:{number:q},__type__:{object:j,string:A}},ital:{color:{string:A},size:{number:q},face:{string:A},mod:{string:A},vadjust:{number:q},__type__:{object:j,string:A}},mono:{color:{string:A},size:{number:q},face:{string:A},mod:{string:A},vadjust:{number:q},__type__:{object:j,string:A}},__type__:{object:j,string:A}},group:{string:A,number:q,undefined:"undefined"},heightConstraint:{minimum:{number:q},valign:{string:A},__type__:{object:j,boolean:x,number:q}},hidden:{boolean:x},icon:{face:{string:A},code:{string:A},size:{number:q},color:{string:A},weight:{string:A,number:q},__type__:{object:j}},id:{string:A,number:q},image:{selected:{string:A,undefined:"undefined"},unselected:{string:A,undefined:"undefined"},__type__:{object:j,string:A}},imagePadding:{top:{number:q},right:{number:q},bottom:{number:q},left:{number:q},__type__:{object:j,number:q}},label:{string:A,undefined:"undefined"},labelHighlightBold:{boolean:x},level:{number:q,undefined:"undefined"},margin:{top:{number:q},right:{number:q},bottom:{number:q},left:{number:q},__type__:{object:j,number:q}},mass:{number:q},physics:{boolean:x},scaling:{min:{number:q},max:{number:q},label:{enabled:{boolean:x},min:{number:q},max:{number:q},maxVisible:{number:q},drawThreshold:{number:q},__type__:{object:j,boolean:x}},customScalingFunction:{function:"function"},__type__:{object:j}},shadow:{enabled:{boolean:x},color:{string:A},size:{number:q},x:{number:q},y:{number:q},__type__:{object:j,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:Sn},borderRadius:{number:q},interpolation:{boolean:x},useImageSize:{boolean:x},useBorderWithImage:{boolean:x},coordinateOrigin:{string:["center","top-left"]},__type__:{object:j}},size:{number:q},title:{string:A,dom:Xk,undefined:"undefined"},value:{number:q,undefined:"undefined"},widthConstraint:{minimum:{number:q},maximum:{number:q},__type__:{object:j,boolean:x,number:q}},x:{number:q},y:{number:q},__type__:{object:j}},B8={configure:{enabled:{boolean:x},filter:{boolean:x,string:A,array:Sn,function:"function"},container:{dom:Xk},showButton:{boolean:x},__type__:{object:j,boolean:x,string:A,array:Sn,function:"function"}},edges:{arrows:{to:{enabled:{boolean:x},scaleFactor:{number:q},type:{string:um},imageHeight:{number:q},imageWidth:{number:q},src:{string:A},__type__:{object:j,boolean:x}},middle:{enabled:{boolean:x},scaleFactor:{number:q},type:{string:um},imageWidth:{number:q},imageHeight:{number:q},src:{string:A},__type__:{object:j,boolean:x}},from:{enabled:{boolean:x},scaleFactor:{number:q},type:{string:um},imageWidth:{number:q},imageHeight:{number:q},src:{string:A},__type__:{object:j,boolean:x}},__type__:{string:["from","to","middle"],object:j}},endPointOffset:{from:{number:q},to:{number:q},__type__:{object:j,number:q}},arrowStrikethrough:{boolean:x},background:{enabled:{boolean:x},color:{string:A},size:{number:q},dashes:{boolean:x,array:Sn},__type__:{object:j,boolean:x}},chosen:{label:{boolean:x,function:"function"},edge:{boolean:x,function:"function"},__type__:{object:j,boolean:x}},color:{color:{string:A},highlight:{string:A},hover:{string:A},inherit:{string:["from","to","both"],boolean:x},opacity:{number:q},__type__:{object:j,string:A}},dashes:{boolean:x,array:Sn},font:{color:{string:A},size:{number:q},face:{string:A},background:{string:A},strokeWidth:{number:q},strokeColor:{string:A},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:q},multi:{boolean:x,string:A},bold:{color:{string:A},size:{number:q},face:{string:A},mod:{string:A},vadjust:{number:q},__type__:{object:j,string:A}},boldital:{color:{string:A},size:{number:q},face:{string:A},mod:{string:A},vadjust:{number:q},__type__:{object:j,string:A}},ital:{color:{string:A},size:{number:q},face:{string:A},mod:{string:A},vadjust:{number:q},__type__:{object:j,string:A}},mono:{color:{string:A},size:{number:q},face:{string:A},mod:{string:A},vadjust:{number:q},__type__:{object:j,string:A}},__type__:{object:j,string:A}},hidden:{boolean:x},hoverWidth:{function:"function",number:q},label:{string:A,undefined:"undefined"},labelHighlightBold:{boolean:x},length:{number:q,undefined:"undefined"},physics:{boolean:x},scaling:{min:{number:q},max:{number:q},label:{enabled:{boolean:x},min:{number:q},max:{number:q},maxVisible:{number:q},drawThreshold:{number:q},__type__:{object:j,boolean:x}},customScalingFunction:{function:"function"},__type__:{object:j}},selectionWidth:{function:"function",number:q},selfReferenceSize:{number:q},selfReference:{size:{number:q},angle:{number:q},renderBehindTheNode:{boolean:x},__type__:{object:j}},shadow:{enabled:{boolean:x},color:{string:A},size:{number:q},x:{number:q},y:{number:q},__type__:{object:j,boolean:x}},smooth:{enabled:{boolean:x},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:q},forceDirection:{string:["horizontal","vertical","none"],boolean:x},__type__:{object:j,boolean:x}},title:{string:A,undefined:"undefined"},width:{number:q},widthConstraint:{maximum:{number:q},__type__:{object:j,boolean:x,number:q}},value:{number:q,undefined:"undefined"},__type__:{object:j}},groups:{useDefaultGroups:{boolean:x},__any__:lm,__type__:{object:j}},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:q},y:{number:q},zoom:{number:q},__type__:{object:j}},bindToWindow:{boolean:x},autoFocus:{boolean:x},__type__:{object:j,boolean:x}},multiselect:{boolean:x},navigationButtons:{boolean:x},selectable:{boolean:x},selectConnectedEdges:{boolean:x},hoverConnectedEdges:{boolean:x},tooltipDelay:{number:q},zoomView:{boolean:x},zoomSpeed:{number:q},__type__:{object:j}},layout:{randomSeed:{undefined:"undefined",number:q,string:A},improvedLayout:{boolean:x},clusterThreshold:{number:q},hierarchical:{enabled:{boolean:x},levelSeparation:{number:q},nodeSpacing:{number:q},treeSpacing:{number:q},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:j,boolean:x}},__type__:{object:j}},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:j,boolean:x,function:"function"}},deleteNode:{boolean:x,function:"function"},deleteEdge:{boolean:x,function:"function"},controlNodeStyle:lm,__type__:{object:j,boolean:x}},nodes:lm,physics:{enabled:{boolean:x},barnesHut:{theta:{number:q},gravitationalConstant:{number:q},centralGravity:{number:q},springLength:{number:q},springConstant:{number:q},damping:{number:q},avoidOverlap:{number:q},__type__:{object:j}},forceAtlas2Based:{theta:{number:q},gravitationalConstant:{number:q},centralGravity:{number:q},springLength:{number:q},springConstant:{number:q},damping:{number:q},avoidOverlap:{number:q},__type__:{object:j}},repulsion:{centralGravity:{number:q},springLength:{number:q},springConstant:{number:q},nodeDistance:{number:q},damping:{number:q},__type__:{object:j}},hierarchicalRepulsion:{centralGravity:{number:q},springLength:{number:q},springConstant:{number:q},nodeDistance:{number:q},damping:{number:q},avoidOverlap:{number:q},__type__:{object:j}},maxVelocity:{number:q},minVelocity:{number:q},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:x},iterations:{number:q},updateInterval:{number:q},onlyDynamicEdges:{boolean:x},fit:{boolean:x},__type__:{object:j,boolean:x}},timestep:{number:q},adaptiveTimestep:{boolean:x},wind:{x:{number:q},y:{number:q},__type__:{object:j}},__type__:{object:j,boolean:x}},autoResize:{boolean:x},clickToUse:{boolean:x},locale:{string:A},locales:{__any__:{any:k8},__type__:{object:j}},height:{string:A},width:{string:A},__type__:{object:j}},Jk={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]}}},j8=(n,e,t)=>{var r;return!!(ur(n).call(n,"physics")&&ur(r=Jk.physics.solver).call(r,e)&&t.physics.solver!==e&&e!=="wind")};class L8{constructor(){}getDistances(e,t,r){const i={},s=e.edges;for(let a=0;a<t.length;a++){const u=t[a],l={};i[u]=l;for(let d=0;d<t.length;d++)l[t[d]]=a==d?0:1e9}for(let a=0;a<r.length;a++){const u=s[r[a]];u.connected===!0&&i[u.fromId]!==void 0&&i[u.toId]!==void 0&&(i[u.fromId][u.toId]=1,i[u.toId][u.fromId]=1)}const o=t.length;for(let a=0;a<o;a++){const u=t[a],l=i[u];for(let d=0;d<o-1;d++){const c=t[d],h=i[c];for(let f=d+1;f<o;f++){const v=t[f],p=i[v],b=Math.min(h[v],h[u]+l[v]);h[v]=b,p[c]=b}}}return i}}class z8{constructor(e,t,r){this.body=e,this.springLength=t,this.springConstant=r,this.distanceSolver=new L8}setOptions(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}solve(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const i=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(i),this._createK_matrix(i),this._createE_matrix();const s=.01,o=1;let a=0;const u=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),l=5;let d=1e9,c=0,h=0,f=0,v=0,p=0;for(;d>s&&a<u;)for(a+=1,[c,d,h,f]=this._getHighestEnergyNode(r),v=d,p=0;v>o&&p<l;)p+=1,this._moveNode(c,h,f),[v,h,f]=this._getEnergy(c)}_getHighestEnergyNode(e){const t=this.body.nodeIndices,r=this.body.nodes;let i=0,s=t[0],o=0,a=0;for(let u=0;u<t.length;u++){const l=t[u];if(r[l].predefinedPosition!==!0||r[l].isCluster===!0&&e===!0||r[l].options.fixed.x!==!0||r[l].options.fixed.y!==!0){const[d,c,h]=this._getEnergy(l);i<d&&(i=d,s=l,o=c,a=h)}}return[s,i,o,a]}_getEnergy(e){const[t,r]=this.E_sums[e];return[Math.sqrt(t**2+r**2),t,r]}_moveNode(e,t,r){const i=this.body.nodeIndices,s=this.body.nodes;let o=0,a=0,u=0;const l=s[e].x,d=s[e].y,c=this.K_matrix[e],h=this.L_matrix[e];for(let m=0;m<i.length;m++){const w=i[m];if(w!==e){const O=s[w].x,I=s[w].y,_=c[w],E=h[w],$=1/((l-O)**2+(d-I)**2)**1.5;o+=_*(1-E*(d-I)**2*$),a+=_*(E*(l-O)*(d-I)*$),u+=_*(1-E*(l-O)**2*$)}}const f=o,v=a,p=t,b=u,y=r,g=(p/f+y/v)/(v/f-b/v),S=-(v*g+p)/f;s[e].x+=S,s[e].y+=g,this._updateE_matrix(e)}_createL_matrix(e){const t=this.body.nodeIndices,r=this.springLength;this.L_matrix=[];for(let i=0;i<t.length;i++){this.L_matrix[t[i]]={};for(let s=0;s<t.length;s++)this.L_matrix[t[i]][t[s]]=r*e[t[i]][t[s]]}}_createK_matrix(e){const t=this.body.nodeIndices,r=this.springConstant;this.K_matrix=[];for(let i=0;i<t.length;i++){this.K_matrix[t[i]]={};for(let s=0;s<t.length;s++)this.K_matrix[t[i]][t[s]]=r*e[t[i]][t[s]]**-2}}_createE_matrix(){const e=this.body.nodeIndices,t=this.body.nodes;this.E_matrix={},this.E_sums={};for(let r=0;r<e.length;r++)this.E_matrix[e[r]]=[];for(let r=0;r<e.length;r++){const i=e[r],s=t[i].x,o=t[i].y;let a=0,u=0;for(let l=r;l<e.length;l++){const d=e[l];if(d!==i){const c=t[d].x,h=t[d].y,f=1/Math.sqrt((s-c)**2+(o-h)**2);this.E_matrix[i][l]=[this.K_matrix[i][d]*(s-c-this.L_matrix[i][d]*(s-c)*f),this.K_matrix[i][d]*(o-h-this.L_matrix[i][d]*(o-h)*f)],this.E_matrix[d][r]=this.E_matrix[i][l],a+=this.E_matrix[i][l][0],u+=this.E_matrix[i][l][1]}}this.E_sums[i]=[a,u]}}_updateE_matrix(e){const t=this.body.nodeIndices,r=this.body.nodes,i=this.E_matrix[e],s=this.K_matrix[e],o=this.L_matrix[e],a=r[e].x,u=r[e].y;let l=0,d=0;for(let c=0;c<t.length;c++){const h=t[c];if(h!==e){const f=i[c],v=f[0],p=f[1],b=r[h].x,y=r[h].y,g=1/Math.sqrt((a-b)**2+(u-y)**2),S=s[h]*(a-b-o[h]*(a-b)*g),m=s[h]*(u-y-o[h]*(u-y)*g);i[c]=[S,m],l+=S,d+=m;const w=this.E_sums[h];w[0]+=S-v,w[1]+=m-p}}this.E_sums[e]=[l,d]}}function B(n,e,t){var r,i,s,o;if(!(this instanceof B))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:hG,clickToUse:!1},Te(this.options,this.defaultOptions),this.body={container:n,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:D(r=this.on).call(r,this),off:D(i=this.off).call(i,this),emit:D(s=this.emit).call(s,this),once:D(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 pG(()=>this.body.emitter.emit("_requestRedraw")),this.groups=new qG,this.canvas=new O6(this.body),this.selectionHandler=new s8(this.body,this.canvas),this.interactionHandler=new P6(this.body,this.canvas,this.selectionHandler),this.view=new $6(this.body,this.canvas),this.renderer=new b6(this.body,this.canvas),this.physics=new c6(this.body),this.layoutEngine=new F8(this.body),this.clustering=new m6(this.body),this.manipulation=new N8(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new B4(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new s6(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new z8(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(t),this.setData(e)}TN(B.prototype);B.prototype.setOptions=function(n){if(n===null&&(n=void 0),n!==void 0){if(WV.validate(n,B8)===!0&&console.error("%cErrors have been found in the supplied options object.",Ek),un(["locale","locales","clickToUse"],this.options,n),n.locale!==void 0&&(n.locale=fG(n.locales||this.options.locales,n.locale)),n=this.layoutEngine.setOptions(n.layout,n),this.canvas.setOptions(n),this.groups.setOptions(n.groups),this.nodesHandler.setOptions(n.nodes),this.edgesHandler.setOptions(n.edges),this.physics.setOptions(n.physics),this.manipulation.setOptions(n.manipulation,n,this.options),this.interactionHandler.setOptions(n.interaction),this.renderer.setOptions(n.interaction),this.selectionHandler.setOptions(n.interaction),n.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in n&&(this.configurator||(this.configurator=new LV(this,this.body.container,Jk,this.canvas.pixelRatio,j8)),this.configurator.setOptions(n.configure)),this.configurator&&this.configurator.options.enabled===!0){const r={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};he(r.nodes,this.nodesHandler.options),he(r.edges,this.edgesHandler.options),he(r.layout,this.layoutEngine.options),he(r.interaction,this.selectionHandler.options),he(r.interaction,this.renderer.options),he(r.interaction,this.interactionHandler.options),he(r.manipulation,this.manipulation.options),he(r.physics,this.physics.options),he(r.global,this.canvas.options),he(r.global,this.options),this.configurator.setModuleOptions(r)}n.clickToUse!==void 0?n.clickToUse===!0?this.activator===void 0&&(this.activator=new jV(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.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}};B.prototype._updateVisibleIndices=function(){const n=this.body.nodes,e=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&!this.clustering._isClusteredNode(t)&&n[t].options.hidden===!1&&this.body.nodeIndices.push(n[t].id);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t],i=n[r.fromId],s=n[r.toId],o=i!==void 0&&s!==void 0;!this.clustering._isClusteredEdge(t)&&r.options.hidden===!1&&o&&i.options.hidden===!1&&s.options.hidden===!1&&this.body.edgeIndices.push(r.id)}};B.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")})};B.prototype.setData=function(n){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),n&&n.dot&&(n.nodes||n.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');if(this.setOptions(n&&n.options),n&&n.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);");const e=QV(n.dot);this.setData(e);return}else if(n&&n.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);");const e=eG(n.gephi);this.setData(e);return}else this.nodesHandler.setData(n&&n.nodes,!0),this.edgesHandler.setData(n&&n.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};B.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(const n in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,n)&&delete this.body.nodes[n];for(const n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&delete this.body.edges[n];rr(this.body.container)};B.prototype._updateValueRange=function(n){let e,t,r,i=0;for(e in n)if(Object.prototype.hasOwnProperty.call(n,e)){const s=n[e].getValue();s!==void 0&&(t=t===void 0?s:Math.min(s,t),r=r===void 0?s:Math.max(s,r),i+=s)}if(t!==void 0&&r!==void 0)for(e in n)Object.prototype.hasOwnProperty.call(n,e)&&n[e].setValueRange(t,r,i)};B.prototype.isActive=function(){return!this.activator||this.activator.active};B.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};B.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};B.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};B.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};B.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};B.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};B.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};B.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};B.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};B.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};B.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};B.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};B.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};B.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};B.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};B.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};B.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};B.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};B.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};B.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};B.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};B.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};B.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};B.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};B.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};B.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};B.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};B.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};B.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};B.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};B.prototype.getConnectedNodes=function(n){return this.body.nodes[n]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};B.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};B.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};B.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};B.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};B.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};B.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};B.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};B.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};B.prototype.getNodeAt=function(){const n=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return n!==void 0&&n.id!==void 0?n.id:n};B.prototype.getEdgeAt=function(){const n=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return n!==void 0&&n.id!==void 0?n.id:n};B.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};B.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};B.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};B.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};B.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};B.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};B.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};B.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};B.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};B.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};B.prototype.getOptionsFromConfigurator=function(){let n={};return this.configurator&&(n=this.configurator.getOptions.apply(this.configurator)),n};export{zs as D,B as N};
|