@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
|
@@ -1,132 +0,0 @@
|
|
|
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.1
|
|
8
|
-
* @date 2025-07-13T02:52:37.151Z
|
|
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 fb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function re(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Do={exports:{}},vb={},cn,pb;function Te(){if(pb)return cn;pb=1;var n=function(e){return e&&e.Math===Math&&e};return cn=n(typeof globalThis=="object"&&globalThis)||n(typeof window=="object"&&window)||n(typeof self=="object"&&self)||n(typeof fb=="object"&&fb)||n(typeof cn=="object"&&cn)||(function(){return this})()||Function("return this")(),cn}var Ao,gb;function ne(){return gb||(gb=1,Ao=function(n){try{return!!n()}catch{return!0}}),Ao}var Mo,yb;function jn(){if(yb)return Mo;yb=1;var n=ne();return Mo=!n(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Mo}var Fo,mb;function Vs(){if(mb)return Fo;mb=1;var n=jn(),e=Function.prototype,t=e.apply,r=e.call;return Fo=typeof Reflect=="object"&&Reflect.apply||(n?r.bind(t):function(){return r.apply(t,arguments)}),Fo}var No,bb;function he(){if(bb)return No;bb=1;var n=jn(),e=Function.prototype,t=e.call,r=n&&e.bind.bind(t,t);return No=n?r:function(i){return function(){return t.apply(i,arguments)}},No}var ko,_b;function Wt(){if(_b)return ko;_b=1;var n=he(),e=n({}.toString),t=n("".slice);return ko=function(r){return t(e(r),8,-1)},ko}var Bo,wb;function dM(){if(wb)return Bo;wb=1;var n=Wt(),e=he();return Bo=function(t){if(n(t)==="Function")return e(t)},Bo}var jo,Eb;function De(){if(Eb)return jo;Eb=1;var n=typeof document=="object"&&document.all;return jo=typeof n>"u"&&n!==void 0?function(e){return typeof e=="function"||e===n}:function(e){return typeof e=="function"},jo}var Lo={},zo,Sb;function Pe(){if(Sb)return zo;Sb=1;var n=ne();return zo=!n(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),zo}var Wo,Ob;function tt(){if(Ob)return Wo;Ob=1;var n=jn(),e=Function.prototype.call;return Wo=n?e.bind(e):function(){return e.apply(e,arguments)},Wo}var Ho={},Ib;function am(){if(Ib)return Ho;Ib=1;var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!n.call({1:2},1);return Ho.f=t?function(i){var s=e(this,i);return!!s&&s.enumerable}:n,Ho}var Uo,$b;function Ln(){return $b||($b=1,Uo=function(n,e){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:e}}),Uo}var Vo,Tb;function Gs(){if(Tb)return Vo;Tb=1;var n=he(),e=ne(),t=Wt(),r=Object,i=n("".split);return Vo=e(function(){return!r("z").propertyIsEnumerable(0)})?function(s){return t(s)==="String"?i(s,""):r(s)}:r,Vo}var Go,Pb;function zn(){return Pb||(Pb=1,Go=function(n){return n==null}),Go}var Ko,Rb;function Lr(){if(Rb)return Ko;Rb=1;var n=zn(),e=TypeError;return Ko=function(t){if(n(t))throw new e("Can't call method on "+t);return t},Ko}var Yo,qb;function Ht(){if(qb)return Yo;qb=1;var n=Gs(),e=Lr();return Yo=function(t){return n(e(t))},Yo}var Xo,Cb;function rt(){if(Cb)return Xo;Cb=1;var n=De();return Xo=function(e){return typeof e=="object"?e!==null:n(e)},Xo}var Jo,xb;function Ae(){return xb||(xb=1,Jo={}),Jo}var Zo,Db;function nt(){if(Db)return Zo;Db=1;var n=Ae(),e=Te(),t=De(),r=function(i){return t(i)?i:void 0};return Zo=function(i,s){return arguments.length<2?r(n[i])||r(e[i]):n[i]&&n[i][s]||e[i]&&e[i][s]},Zo}var Qo,Ab;function He(){if(Ab)return Qo;Ab=1;var n=he();return Qo=n({}.isPrototypeOf),Qo}var ea,Mb;function qi(){if(Mb)return ea;Mb=1;var n=Te(),e=n.navigator,t=e&&e.userAgent;return ea=t?String(t):"",ea}var ta,Fb;function Wn(){if(Fb)return ta;Fb=1;var n=Te(),e=qi(),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]))),ta=a,ta}var ra,Nb;function Ci(){if(Nb)return ra;Nb=1;var n=Wn(),e=ne(),t=Te(),r=t.String;return ra=!!Object.getOwnPropertySymbols&&!e(function(){var i=Symbol("symbol detection");return!r(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&n&&n<41}),ra}var ia,kb;function hM(){if(kb)return ia;kb=1;var n=Ci();return ia=n&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ia}var na,Bb;function Hn(){if(Bb)return na;Bb=1;var n=nt(),e=De(),t=He(),r=hM(),i=Object;return na=r?function(s){return typeof s=="symbol"}:function(s){var o=n("Symbol");return e(o)&&t(o.prototype,i(s))},na}var sa,jb;function xi(){if(jb)return sa;jb=1;var n=String;return sa=function(e){try{return n(e)}catch{return"Object"}},sa}var oa,Lb;function Ut(){if(Lb)return oa;Lb=1;var n=De(),e=xi(),t=TypeError;return oa=function(r){if(n(r))return r;throw new t(e(r)+" is not a function")},oa}var aa,zb;function um(){if(zb)return aa;zb=1;var n=Ut(),e=zn();return aa=function(t,r){var i=t[r];return e(i)?void 0:n(i)},aa}var ua,Wb;function nk(){if(Wb)return ua;Wb=1;var n=tt(),e=De(),t=rt(),r=TypeError;return ua=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")},ua}var la={exports:{}},da,Hb;function Di(){return Hb||(Hb=1,da=!0),da}var ha,Ub;function sk(){if(Ub)return ha;Ub=1;var n=Te(),e=Object.defineProperty;return ha=function(t,r){try{e(n,t,{value:r,configurable:!0,writable:!0})}catch{n[t]=r}return r},ha}var Vb;function lm(){if(Vb)return la.exports;Vb=1;var n=Di(),e=Te(),t=sk(),r="__core-js_shared__",i=la.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"}),la.exports}var ca,Gb;function Ai(){if(Gb)return ca;Gb=1;var n=lm();return ca=function(e,t){return n[e]||(n[e]=t||{})},ca}var fa,Kb;function Ot(){if(Kb)return fa;Kb=1;var n=Lr(),e=Object;return fa=function(t){return e(n(t))},fa}var va,Yb;function Me(){if(Yb)return va;Yb=1;var n=he(),e=Ot(),t=n({}.hasOwnProperty);return va=Object.hasOwn||function(i,s){return t(e(i),s)},va}var pa,Xb;function Ks(){if(Xb)return pa;Xb=1;var n=he(),e=0,t=Math.random(),r=n(1.1.toString);return pa=function(i){return"Symbol("+(i===void 0?"":i)+")_"+r(++e+t,36)},pa}var ga,Jb;function Le(){if(Jb)return ga;Jb=1;var n=Te(),e=Ai(),t=Me(),r=Ks(),i=Ci(),s=hM(),o=n.Symbol,a=e("wks"),u=s?o.for||o:o&&o.withoutSetter||r;return ga=function(l){return t(a,l)||(a[l]=i&&t(o,l)?o[l]:u("Symbol."+l)),a[l]},ga}var ya,Zb;function cM(){if(Zb)return ya;Zb=1;var n=tt(),e=rt(),t=Hn(),r=um(),i=nk(),s=Le(),o=TypeError,a=s("toPrimitive");return ya=function(u,l){if(!e(u)||t(u))return u;var d=r(u,a),h;if(d){if(l===void 0&&(l="default"),h=n(d,u,l),!e(h)||t(h))return h;throw new o("Can't convert object to primitive value")}return l===void 0&&(l="number"),i(u,l)},ya}var ma,Qb;function dm(){if(Qb)return ma;Qb=1;var n=cM(),e=Hn();return ma=function(t){var r=n(t,"string");return e(r)?r:r+""},ma}var ba,e1;function fM(){if(e1)return ba;e1=1;var n=Te(),e=rt(),t=n.document,r=e(t)&&e(t.createElement);return ba=function(i){return r?t.createElement(i):{}},ba}var _a,t1;function vM(){if(t1)return _a;t1=1;var n=Pe(),e=ne(),t=fM();return _a=!n&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),_a}var r1;function Ys(){if(r1)return Lo;r1=1;var n=Pe(),e=tt(),t=am(),r=Ln(),i=Ht(),s=dm(),o=Me(),a=vM(),u=Object.getOwnPropertyDescriptor;return Lo.f=n?u:function(d,h){if(d=i(d),h=s(h),a)try{return u(d,h)}catch{}if(o(d,h))return r(!e(t.f,d,h),d[h])},Lo}var wa,i1;function ok(){if(i1)return wa;i1=1;var n=ne(),e=De(),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 wa=r,wa}var Ea,n1;function Xs(){if(n1)return Ea;n1=1;var n=dM(),e=Ut(),t=jn(),r=n(n.bind);return Ea=function(i,s){return e(i),s===void 0?i:t?r(i,s):function(){return i.apply(s,arguments)}},Ea}var Sa={},Oa,s1;function pM(){if(s1)return Oa;s1=1;var n=Pe(),e=ne();return Oa=n&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Oa}var Ia,o1;function Vt(){if(o1)return Ia;o1=1;var n=rt(),e=String,t=TypeError;return Ia=function(r){if(n(r))return r;throw new t(e(r)+" is not an object")},Ia}var a1;function dt(){if(a1)return Sa;a1=1;var n=Pe(),e=vM(),t=pM(),r=Vt(),i=dm(),s=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",d="writable";return Sa.f=n?t?function(c,f,v){if(r(c),f=i(f),r(v),typeof c=="function"&&f==="prototype"&&"value"in v&&d in v&&!v[d]){var p=a(c,f);p&&p[d]&&(c[f]=v.value,v={configurable:l in v?v[l]:p[l],enumerable:u in v?v[u]:p[u],writable:!1})}return o(c,f,v)}:o:function(c,f,v){if(r(c),f=i(f),r(v),e)try{return o(c,f,v)}catch{}if("get"in v||"set"in v)throw new s("Accessors not supported");return"value"in v&&(c[f]=v.value),c},Sa}var $a,u1;function Mi(){if(u1)return $a;u1=1;var n=Pe(),e=dt(),t=Ln();return $a=n?function(r,i,s){return e.f(r,i,t(1,s))}:function(r,i,s){return r[i]=s,r},$a}var Ta,l1;function Y(){if(l1)return Ta;l1=1;var n=Te(),e=Vs(),t=dM(),r=De(),i=Ys().f,s=ok(),o=Ae(),a=Xs(),u=Mi(),l=Me(),d=function(h){var c=function(f,v,p){if(this instanceof c){switch(arguments.length){case 0:return new h;case 1:return new h(f);case 2:return new h(f,v)}return new h(f,v,p)}return e(h,this,arguments)};return c.prototype=h.prototype,c};return Ta=function(h,c){var f=h.target,v=h.global,p=h.stat,b=h.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 c)m=s(v?I:f+(p?".":"#")+I,h.forced),w=!m&&y&&l(y,I),E=g[I],w&&(h.dontCallGetSet?(P=i(y,I),$=P&&P.value):$=y[I]),_=w&&$?$:c[I],!(!m&&!b&&typeof E==typeof _)&&(h.bind&&w?T=a(_,n):h.wrap&&w?T=d(_):b&&r(_)?T=t(_):T=_,(h.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,_),h.real&&S&&(m||!S[I])&&u(S,I,_)))},Ta}var d1;function ak(){if(d1)return vb;d1=1;var n=Y(),e=Pe(),t=dt().f;return n({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),vb}var h1;function uk(){if(h1)return Do.exports;h1=1,ak();var n=Ae(),e=n.Object,t=Do.exports=function(i,s,o){return e.defineProperty(i,s,o)};return e.defineProperty.sham&&(t.sham=!0),Do.exports}var Pa,c1;function gM(){if(c1)return Pa;c1=1;var n=uk();return Pa=n,Pa}var Ra,f1;function lk(){if(f1)return Ra;f1=1;var n=gM();return Ra=n,Ra}var qa,v1;function dk(){if(v1)return qa;v1=1;var n=lk();return qa=n,qa}var Ca,p1;function hk(){return p1||(p1=1,Ca=dk()),Ca}var ck=hk(),fk=re(ck),g1={},xa,y1;function Un(){if(y1)return xa;y1=1;var n=Wt();return xa=Array.isArray||function(t){return n(t)==="Array"},xa}var Da,m1;function vk(){if(m1)return Da;m1=1;var n=Math.ceil,e=Math.floor;return Da=Math.trunc||function(r){var i=+r;return(i>0?e:n)(i)},Da}var Aa,b1;function Fi(){if(b1)return Aa;b1=1;var n=vk();return Aa=function(e){var t=+e;return t!==t||t===0?0:n(t)},Aa}var Ma,_1;function yM(){if(_1)return Ma;_1=1;var n=Fi(),e=Math.min;return Ma=function(t){var r=n(t);return r>0?e(r,9007199254740991):0},Ma}var Fa,w1;function zr(){if(w1)return Fa;w1=1;var n=yM();return Fa=function(e){return n(e.length)},Fa}var Na,E1;function mM(){if(E1)return Na;E1=1;var n=TypeError,e=9007199254740991;return Na=function(t){if(t>e)throw n("Maximum allowed index exceeded");return t},Na}var ka,S1;function hm(){if(S1)return ka;S1=1;var n=Pe(),e=dt(),t=Ln();return ka=function(r,i,s){n?e.f(r,i,t(0,s)):r[i]=s},ka}var Ba,O1;function cm(){if(O1)return Ba;O1=1;var n=Le(),e=n("toStringTag"),t={};return t[e]="z",Ba=String(t)==="[object z]",Ba}var ja,I1;function dr(){if(I1)return ja;I1=1;var n=cm(),e=De(),t=Wt(),r=Le(),i=r("toStringTag"),s=Object,o=t((function(){return arguments})())==="Arguments",a=function(u,l){try{return u[l]}catch{}};return ja=n?t:function(u){var l,d,h;return u===void 0?"Undefined":u===null?"Null":typeof(d=a(l=s(u),i))=="string"?d:o?t(l):(h=t(l))==="Object"&&e(l.callee)?"Arguments":h},ja}var La,$1;function pk(){if($1)return La;$1=1;var n=he(),e=De(),t=lm(),r=n(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(i){return r(i)}),La=t.inspectSource,La}var za,T1;function gk(){if(T1)return za;T1=1;var n=he(),e=ne(),t=De(),r=dr(),i=nt(),s=pk(),o=function(){},a=i("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=n(u.exec),d=!u.test(o),h=function(v){if(!t(v))return!1;try{return a(o,[],v),!0}catch{return!1}},c=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 c.sham=!0,za=!a||e(function(){var f;return h(h.call)||!h(Object)||!h(function(){f=!0})||f})?c:h,za}var Wa,P1;function yk(){if(P1)return Wa;P1=1;var n=Un(),e=gk(),t=rt(),r=Le(),i=r("species"),s=Array;return Wa=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},Wa}var Ha,R1;function fm(){if(R1)return Ha;R1=1;var n=yk();return Ha=function(e,t){return new(n(e))(t===0?0:t)},Ha}var Ua,q1;function Js(){if(q1)return Ua;q1=1;var n=ne(),e=Le(),t=Wn(),r=e("species");return Ua=function(i){return t>=51||!n(function(){var s=[],o=s.constructor={};return o[r]=function(){return{foo:1}},s[i](Boolean).foo!==1})},Ua}var C1;function bM(){if(C1)return g1;C1=1;var n=Y(),e=ne(),t=Un(),r=rt(),i=Ot(),s=zr(),o=mM(),a=hm(),u=fm(),l=Js(),d=Le(),h=Wn(),c=d("isConcatSpreadable"),f=h>=51||!e(function(){var b=[];return b[c]=!1,b.concat()[0]!==b}),v=function(b){if(!r(b))return!1;var y=b[c];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}}),g1}var x1={},D1={},Va,A1;function hr(){if(A1)return Va;A1=1;var n=dr(),e=String;return Va=function(t){if(n(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(t)},Va}var Ga={},Ka,M1;function _M(){if(M1)return Ka;M1=1;var n=Fi(),e=Math.max,t=Math.min;return Ka=function(r,i){var s=n(r);return s<0?e(s+i,0):t(s,i)},Ka}var Ya,F1;function mk(){if(F1)return Ya;F1=1;var n=Ht(),e=_M(),t=zr(),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),h;if(i&&o!==o){for(;l>d;)if(h=u[d++],h!==h)return!0}else for(;l>d;d++)if((i||d in u)&&u[d]===o)return i||d||0;return!i&&-1}};return Ya={includes:r(!0),indexOf:r(!1)},Ya}var Xa,N1;function Vn(){return N1||(N1=1,Xa={}),Xa}var Ja,k1;function wM(){if(k1)return Ja;k1=1;var n=he(),e=Me(),t=Ht(),r=mk().indexOf,i=Vn(),s=n([].push);return Ja=function(o,a){var u=t(o),l=0,d=[],h;for(h in u)!e(i,h)&&e(u,h)&&s(d,h);for(;a.length>l;)e(u,h=a[l++])&&(~r(d,h)||s(d,h));return d},Ja}var Za,B1;function vm(){return B1||(B1=1,Za=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Za}var Qa,j1;function Zs(){if(j1)return Qa;j1=1;var n=wM(),e=vm();return Qa=Object.keys||function(r){return n(r,e)},Qa}var L1;function pm(){if(L1)return Ga;L1=1;var n=Pe(),e=pM(),t=dt(),r=Vt(),i=Ht(),s=Zs();return Ga.f=n&&!e?Object.defineProperties:function(a,u){r(a);for(var l=i(u),d=s(u),h=d.length,c=0,f;h>c;)t.f(a,f=d[c++],l[f]);return a},Ga}var eu,z1;function bk(){if(z1)return eu;z1=1;var n=nt();return eu=n("document","documentElement"),eu}var tu,W1;function Qs(){if(W1)return tu;W1=1;var n=Ai(),e=Ks(),t=n("keys");return tu=function(r){return t[r]||(t[r]=e(r))},tu}var ru,H1;function Gn(){if(H1)return ru;H1=1;var n=Vt(),e=pm(),t=vm(),r=Vn(),i=bk(),s=fM(),o=Qs(),a=">",u="<",l="prototype",d="script",h=o("IE_PROTO"),c=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[h]=!0,ru=Object.create||function(S,m){var w;return S!==null?(c[l]=n(S),w=new c,c[l]=null,w[h]=S):w=y(),m===void 0?w:e.f(w,m)},ru}var iu={},U1;function eo(){if(U1)return iu;U1=1;var n=wM(),e=vm(),t=e.concat("length","prototype");return iu.f=Object.getOwnPropertyNames||function(i){return n(i,t)},iu}var nu={},su,V1;function Kn(){if(V1)return su;V1=1;var n=he();return su=n([].slice),su}var G1;function EM(){if(G1)return nu;G1=1;var n=Wt(),e=Ht(),t=eo().f,r=Kn(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(o){try{return t(o)}catch{return r(i)}};return nu.f=function(a){return i&&n(a)==="Window"?s(a):t(e(a))},nu}var ou={},K1;function to(){return K1||(K1=1,ou.f=Object.getOwnPropertySymbols),ou}var au,Y1;function Yn(){if(Y1)return au;Y1=1;var n=Mi();return au=function(e,t,r,i){return i&&i.enumerable?e[t]=r:n(e,t,r),e},au}var uu,X1;function gm(){if(X1)return uu;X1=1;var n=dt();return uu=function(e,t,r){return n.f(e,t,r)},uu}var lu={},J1;function ro(){if(J1)return lu;J1=1;var n=Le();return lu.f=n,lu}var du,Z1;function be(){if(Z1)return du;Z1=1;var n=Ae(),e=Me(),t=ro(),r=dt().f;return du=function(i){var s=n.Symbol||(n.Symbol={});e(s,i)||r(s,i,{value:t.f(i)})},du}var hu,Q1;function SM(){if(Q1)return hu;Q1=1;var n=tt(),e=nt(),t=Le(),r=Yn();return hu=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})},hu}var cu,e_;function _k(){if(e_)return cu;e_=1;var n=cm(),e=dr();return cu=n?{}.toString:function(){return"[object "+e(this)+"]"},cu}var fu,t_;function Wr(){if(t_)return fu;t_=1;var n=cm(),e=dt().f,t=Mi(),r=Me(),i=_k(),s=Le(),o=s("toStringTag");return fu=function(a,u,l,d){var h=l?a:a&&a.prototype;h&&(r(h,o)||e(h,o,{configurable:!0,value:u}),d&&!n&&t(h,"toString",i))},fu}var vu,r_;function wk(){if(r_)return vu;r_=1;var n=Te(),e=De(),t=n.WeakMap;return vu=e(t)&&/native code/.test(String(t)),vu}var pu,i_;function Xn(){if(i_)return pu;i_=1;var n=wk(),e=Te(),t=rt(),r=Mi(),i=Me(),s=lm(),o=Qs(),a=Vn(),u="Object already initialized",l=e.TypeError,d=e.WeakMap,h,c,f,v=function(g){return f(g)?c(g):h(g,{})},p=function(g){return function(S){var m;if(!t(S)||(m=c(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,h=function(g,S){if(b.has(g))throw new l(u);return S.facade=g,b.set(g,S),S},c=function(g){return b.get(g)||{}},f=function(g){return b.has(g)}}else{var y=o("state");a[y]=!0,h=function(g,S){if(i(g,y))throw new l(u);return S.facade=g,r(g,y,S),S},c=function(g){return i(g,y)?g[y]:{}},f=function(g){return i(g,y)}}return pu={set:h,get:c,has:f,enforce:v,getterFor:p},pu}var gu,n_;function Ni(){if(n_)return gu;n_=1;var n=Xs(),e=he(),t=Gs(),r=Ot(),i=zr(),s=fm(),o=e([].push),a=function(u){var l=u===1,d=u===2,h=u===3,c=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:h||c?c:$}};return gu={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},gu}var s_;function Ek(){if(s_)return D1;s_=1;var n=Y(),e=Te(),t=tt(),r=he(),i=Di(),s=Pe(),o=Ci(),a=ne(),u=Me(),l=He(),d=Vt(),h=Ht(),c=dm(),f=hr(),v=Ln(),p=Gn(),b=Zs(),y=eo(),g=EM(),S=to(),m=Ys(),w=dt(),O=pm(),I=am(),_=Yn(),E=gm(),$=Ai(),T=Qs(),P=Vn(),R=Ks(),C=Le(),M=ro(),G=be(),L=SM(),J=Wr(),Q=Xn(),oe=Ni().forEach,W=T("hidden"),ae="Symbol",ge="prototype",ye=Q.set,yt=Q.getterFor(ae),ce=Object[ge],Ue=e.Symbol,mt=Ue&&Ue[ge],Po=e.RangeError,Ro=e.TypeError,yr=e.QObject,rn=m.f,Ve=w.f,nn=g.f,qo=I.f,sn=r([].push),Ce=$("symbols"),bt=$("op-symbols"),Co=$("wks"),mr=!yr||!yr[ge]||!yr[ge].findChild,on=function(H,F,N){var k=rn(ce,F);k&&delete ce[F],Ve(H,F,N),k&&H!==ce&&Ve(ce,F,k)},br=s&&a(function(){return p(Ve({},"a",{get:function(){return Ve(this,"a",{value:7}).a}})).a!==7})?on:Ve,_r=function(H,F){var N=Ce[H]=p(mt);return ye(N,{type:ae,tag:H,description:F}),s||(N.description=F),N},At=function(F,N,k){F===ce&&At(bt,N,k),d(F);var U=c(N);return d(k),u(Ce,U)?(k.enumerable?(u(F,W)&&F[W][U]&&(F[W][U]=!1),k=p(k,{enumerable:v(0,!1)})):(u(F,W)||Ve(F,W,v(1,p(null))),F[W][U]=!0),br(F,U,k)):Ve(F,U,k)},wr=function(F,N){d(F);var k=h(N),U=b(k).concat(ln(k));return oe(U,function(ie){(!s||t(Er,k,ie))&&At(F,ie,k[ie])}),F},xo=function(F,N){return N===void 0?p(F):wr(p(F),N)},Er=function(F){var N=c(F),k=t(qo,this,N);return this===ce&&u(Ce,N)&&!u(bt,N)?!1:k||!u(this,N)||!u(Ce,N)||u(this,W)&&this[W][N]?k:!0},an=function(F,N){var k=h(F),U=c(N);if(!(k===ce&&u(Ce,U)&&!u(bt,U))){var ie=rn(k,U);return ie&&u(Ce,U)&&!(u(k,W)&&k[W][U])&&(ie.enumerable=!0),ie}},un=function(F){var N=nn(h(F)),k=[];return oe(N,function(U){!u(Ce,U)&&!u(P,U)&&sn(k,U)}),k},ln=function(H){var F=H===ce,N=nn(F?bt:h(H)),k=[];return oe(N,function(U){u(Ce,U)&&(!F||u(ce,U))&&sn(k,Ce[U])}),k};return o||(Ue=function(){if(l(mt,this))throw new Ro("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===ce&&t(k,bt,U),u(ie,W)&&u(ie[W],N)&&(ie[W][N]=!1);var dn=v(1,U);try{br(ie,N,dn)}catch(hn){if(!(hn instanceof Po))throw hn;on(ie,N,dn)}};return s&&mr&&br(ce,N,{configurable:!0,set:k}),_r(N,F)},mt=Ue[ge],_(mt,"toString",function(){return yt(this).tag}),_(Ue,"withoutSetter",function(H){return _r(R(H),H)}),I.f=Er,w.f=At,O.f=wr,m.f=an,y.f=g.f=un,S.f=ln,M.f=function(H){return _r(C(H),H)},s&&(E(mt,"description",{configurable:!0,get:function(){return yt(this).description}}),i||_(ce,"propertyIsEnumerable",Er,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:Ue}),oe(b(Co),function(H){G(H)}),n({target:ae,stat:!0,forced:!o},{useSetter:function(){mr=!0},useSimple:function(){mr=!1}}),n({target:"Object",stat:!0,forced:!o,sham:!s},{create:xo,defineProperty:At,defineProperties:wr,getOwnPropertyDescriptor:an}),n({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:un}),L(),J(Ue,ae),P[W]=!0,D1}var o_={},yu,a_;function OM(){if(a_)return yu;a_=1;var n=Ci();return yu=n&&!!Symbol.for&&!!Symbol.keyFor,yu}var u_;function Sk(){if(u_)return o_;u_=1;var n=Y(),e=nt(),t=Me(),r=hr(),i=Ai(),s=OM(),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}}),o_}var l_={},d_;function Ok(){if(d_)return l_;d_=1;var n=Y(),e=Me(),t=Hn(),r=xi(),i=Ai(),s=OM(),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]}}),l_}var h_={},mu,c_;function Ik(){if(c_)return mu;c_=1;var n=he(),e=Un(),t=De(),r=Wt(),i=hr(),s=n([].push);return mu=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 h=u.length,c=!0;return function(f,v){if(c)return c=!1,v;if(e(this))return v;for(var p=0;p<h;p++)if(u[p]===f)return v}}},mu}var f_;function IM(){if(f_)return h_;f_=1;var n=Y(),e=nt(),t=Vs(),r=tt(),i=he(),s=ne(),o=De(),a=Hn(),u=Kn(),l=Ik(),d=Ci(),h=String,c=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 c([E])!=="[null]"||c({a:E})!=="{}"||c(Object(E))!=="{}"}),O=s(function(){return c("\uDF06\uD834")!=='"\\udf06\\ud834"'||c("\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,h(R),C)),!a(C))return C},t(c,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 c&&n({target:"JSON",stat:!0,arity:3,forced:w||O},{stringify:function($,T,P){var R=u(arguments),C=t(w?I:c,null,R);return O&&typeof C=="string"?b(C,g,_):C}}),h_}var v_={},p_;function $k(){if(p_)return v_;p_=1;var n=Y(),e=Ci(),t=ne(),r=to(),i=Ot(),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)):[]}}),v_}var g_;function $M(){return g_||(g_=1,Ek(),Sk(),Ok(),IM(),$k()),x1}var y_={},m_;function TM(){if(m_)return y_;m_=1;var n=be();return n("asyncDispose"),y_}var b_={},__;function Tk(){if(__)return b_;__=1;var n=be();return n("asyncIterator"),b_}var w_={},E_;function PM(){if(E_)return w_;E_=1;var n=be();return n("dispose"),w_}var S_={},O_;function Pk(){if(O_)return S_;O_=1;var n=be();return n("hasInstance"),S_}var I_={},$_;function Rk(){if($_)return I_;$_=1;var n=be();return n("isConcatSpreadable"),I_}var T_={},P_;function RM(){if(P_)return T_;P_=1;var n=be();return n("iterator"),T_}var R_={},q_;function qk(){if(q_)return R_;q_=1;var n=be();return n("match"),R_}var C_={},x_;function Ck(){if(x_)return C_;x_=1;var n=be();return n("matchAll"),C_}var D_={},A_;function xk(){if(A_)return D_;A_=1;var n=be();return n("replace"),D_}var M_={},F_;function Dk(){if(F_)return M_;F_=1;var n=be();return n("search"),M_}var N_={},k_;function Ak(){if(k_)return N_;k_=1;var n=be();return n("species"),N_}var B_={},j_;function Mk(){if(j_)return B_;j_=1;var n=be();return n("split"),B_}var L_={},z_;function qM(){if(z_)return L_;z_=1;var n=be(),e=SM();return n("toPrimitive"),e(),L_}var W_={},H_;function Fk(){if(H_)return W_;H_=1;var n=nt(),e=be(),t=Wr();return e("toStringTag"),t(n("Symbol"),"Symbol"),W_}var U_={},V_;function Nk(){if(V_)return U_;V_=1;var n=be();return n("unscopables"),U_}var G_={},K_;function kk(){if(K_)return G_;K_=1;var n=Te(),e=Wr();return e(n.JSON,"JSON",!0),G_}var bu,Y_;function Bk(){if(Y_)return bu;Y_=1,bM(),$M(),TM(),Tk(),PM(),Pk(),Rk(),RM(),qk(),Ck(),xk(),Dk(),Ak(),Mk(),qM(),Fk(),Nk(),kk();var n=Ae();return bu=n.Symbol,bu}var X_={},_u,J_;function jk(){return J_||(J_=1,_u=function(){}),_u}var wu,Z_;function ki(){return Z_||(Z_=1,wu={}),wu}var Eu,Q_;function Lk(){if(Q_)return Eu;Q_=1;var n=Pe(),e=Me(),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 Eu={EXISTS:i,PROPER:s,CONFIGURABLE:o},Eu}var Su,ew;function zk(){if(ew)return Su;ew=1;var n=ne();return Su=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Su}var Ou,tw;function CM(){if(tw)return Ou;tw=1;var n=Me(),e=De(),t=Ot(),r=Qs(),i=zk(),s=r("IE_PROTO"),o=Object,a=o.prototype;return Ou=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},Ou}var Iu,rw;function xM(){if(rw)return Iu;rw=1;var n=ne(),e=De(),t=rt(),r=Gn(),i=CM(),s=Yn(),o=Le(),a=Di(),u=o("iterator"),l=!1,d,h,c;[].keys&&(c=[].keys(),"next"in c?(h=i(i(c)),h!==Object.prototype&&(d=h)):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}),Iu={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:l},Iu}var $u,iw;function Wk(){if(iw)return $u;iw=1;var n=xM().IteratorPrototype,e=Gn(),t=Ln(),r=Wr(),i=ki(),s=function(){return this};return $u=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},$u}var Tu,nw;function Hk(){if(nw)return Tu;nw=1;var n=he(),e=Ut();return Tu=function(t,r,i){try{return n(e(Object.getOwnPropertyDescriptor(t,r)[i]))}catch{}},Tu}var Pu,sw;function Uk(){if(sw)return Pu;sw=1;var n=rt();return Pu=function(e){return n(e)||e===null},Pu}var Ru,ow;function Vk(){if(ow)return Ru;ow=1;var n=Uk(),e=String,t=TypeError;return Ru=function(r){if(n(r))return r;throw new t("Can't set "+e(r)+" as a prototype")},Ru}var qu,aw;function Gk(){if(aw)return qu;aw=1;var n=Hk(),e=rt(),t=Lr(),r=Vk();return qu=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),qu}var Cu,uw;function ym(){if(uw)return Cu;uw=1;var n=Y(),e=tt(),t=Di(),r=Lk(),i=De(),s=Wk(),o=CM(),a=Gk(),u=Wr(),l=Mi(),d=Yn(),h=Le(),c=ki(),f=xM(),v=r.PROPER,p=r.CONFIGURABLE,b=f.IteratorPrototype,y=f.BUGGY_SAFARI_ITERATORS,g=h("iterator"),S="keys",m="values",w="entries",O=function(){return this};return Cu=function(I,_,E,$,T,P,R){s(E,_,$);var C=function(ye){if(ye===T&&Q)return Q;if(!y&&ye&&ye in L)return L[ye];switch(ye){case S:return function(){return new E(this,ye)};case m:return function(){return new E(this,ye)};case w:return function(){return new E(this,ye)}}return function(){return new E(this)}},M=_+" Iterator",G=!1,L=I.prototype,J=L[g]||L["@@iterator"]||T&&L[T],Q=!y&&J||C(T),oe=_==="Array"&&L.entries||J,W,ae,ge;if(oe&&(W=o(oe.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&&(c[M]=O))),v&&T===m&&J&&J.name!==m&&(!t&&p?l(L,"name",m):(G=!0,Q=function(){return e(J,this)})),T)if(ae={values:C(m),keys:P?Q:C(S),entries:C(w)},R)for(ge in ae)(y||G||!(ge in L))&&d(L,ge,ae[ge]);else n({target:_,proto:!0,forced:y||G},ae);return(!t||R)&&L[g]!==Q&&d(L,g,Q,{name:T}),c[_]=Q,ae},Cu}var xu,lw;function mm(){return lw||(lw=1,xu=function(n,e){return{value:n,done:e}}),xu}var Du,dw;function cr(){if(dw)return Du;dw=1;var n=Ht(),e=jk(),t=ki(),r=Xn(),i=dt().f,s=ym(),o=mm(),a=Di(),u=Pe(),l="Array Iterator",d=r.set,h=r.getterFor(l);Du=s(Array,"Array",function(f,v){d(this,{type:l,target:n(f),index:0,kind:v})},function(){var f=h(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 c=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!a&&u&&c.name!=="values")try{i(c,"name",{value:"values"})}catch{}return Du}var Au,hw;function Kk(){return hw||(hw=1,Au={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}),Au}var cw;function fr(){if(cw)return X_;cw=1,cr();var n=Kk(),e=Te(),t=Wr(),r=ki();for(var i in n)t(e[i],i),r[i]=r.Array;return X_}var Mu,fw;function Yk(){if(fw)return Mu;fw=1;var n=Bk();return fr(),Mu=n,Mu}var vw={},pw;function Xk(){if(pw)return vw;pw=1;var n=Le(),e=dt().f,t=n("metadata"),r=Function.prototype;return r[t]===void 0&&e(r,t,{value:null}),vw}var gw={},yw;function Jk(){return yw||(yw=1,TM()),gw}var mw={},bw;function Zk(){return bw||(bw=1,PM()),mw}var _w={},ww;function Qk(){if(ww)return _w;ww=1;var n=be();return n("metadata"),_w}var Fu,Ew;function eB(){if(Ew)return Fu;Ew=1;var n=Yk();return Xk(),Jk(),Zk(),Qk(),Fu=n,Fu}var Sw={},Nu,Ow;function DM(){if(Ow)return Nu;Ow=1;var n=nt(),e=he(),t=n("Symbol"),r=t.keyFor,i=e(t.prototype.valueOf);return Nu=t.isRegisteredSymbol||function(o){try{return r(i(o))!==void 0}catch{return!1}},Nu}var Iw;function tB(){if(Iw)return Sw;Iw=1;var n=Y(),e=DM();return n({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),Sw}var $w={},ku,Tw;function AM(){if(Tw)return ku;Tw=1;for(var n=Ai(),e=nt(),t=he(),r=Hn(),i=Le(),s=e("Symbol"),o=s.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),u=t(s.prototype.valueOf),l=n("wks"),d=0,h=a(s),c=h.length;d<c;d++)try{var f=h[d];r(s[f])&&i(f)}catch{}return ku=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},ku}var Pw;function rB(){if(Pw)return $w;Pw=1;var n=Y(),e=AM();return n({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:e}),$w}var Rw={},qw;function iB(){if(qw)return Rw;qw=1;var n=be();return n("customMatcher"),Rw}var Cw={},xw;function nB(){if(xw)return Cw;xw=1;var n=be();return n("observable"),Cw}var Dw={},Aw;function sB(){if(Aw)return Dw;Aw=1;var n=Y(),e=DM();return n({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:e}),Dw}var Mw={},Fw;function oB(){if(Fw)return Mw;Fw=1;var n=Y(),e=AM();return n({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:e}),Mw}var Nw={},kw;function aB(){if(kw)return Nw;kw=1;var n=be();return n("matcher"),Nw}var Bw={},jw;function uB(){if(jw)return Bw;jw=1;var n=be();return n("metadataKey"),Bw}var Lw={},zw;function lB(){if(zw)return Lw;zw=1;var n=be();return n("patternMatch"),Lw}var Ww={},Hw;function dB(){if(Hw)return Ww;Hw=1;var n=be();return n("replaceAll"),Ww}var Bu,Uw;function hB(){if(Uw)return Bu;Uw=1;var n=eB();return tB(),rB(),iB(),nB(),sB(),oB(),aB(),uB(),lB(),dB(),Bu=n,Bu}var ju,Vw;function cB(){return Vw||(Vw=1,ju=hB()),ju}var fB=cB(),ws=re(fB),Gw={},Lu,Kw;function vB(){if(Kw)return Lu;Kw=1;var n=he(),e=Fi(),t=hr(),r=Lr(),i=n("".charAt),s=n("".charCodeAt),o=n("".slice),a=function(u){return function(l,d){var h=t(r(l)),c=e(d),f=h.length,v,p;return c<0||c>=f?u?"":void 0:(v=s(h,c),v<55296||v>56319||c+1===f||(p=s(h,c+1))<56320||p>57343?u?i(h,c):v:u?o(h,c,c+2):(v-55296<<10)+(p-56320)+65536)}};return Lu={codeAt:a(!1),charAt:a(!0)},Lu}var Yw;function io(){if(Yw)return Gw;Yw=1;var n=vB().charAt,e=hr(),t=Xn(),r=ym(),i=mm(),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,h=l.index,c;return h>=d.length?i(void 0,!0):(c=n(d,h),l.index+=c.length,i(c,!1))}),Gw}var zu,Xw;function pB(){if(Xw)return zu;Xw=1,cr(),io(),RM();var n=ro();return zu=n.f("iterator"),zu}var Wu,Jw;function MM(){if(Jw)return Wu;Jw=1;var n=pB();return fr(),Wu=n,Wu}var Hu,Zw;function gB(){if(Zw)return Hu;Zw=1;var n=MM();return Hu=n,Hu}var Uu,Qw;function yB(){if(Qw)return Uu;Qw=1;var n=gB();return Uu=n,Uu}var Vu,eE;function mB(){return eE||(eE=1,Vu=yB()),Vu}var bB=mB(),_B=re(bB);function Tn(n){"@babel/helpers - typeof";return Tn=typeof ws=="function"&&typeof _B=="symbol"?function(e){return typeof e}:function(e){return e&&typeof ws=="function"&&e.constructor===ws&&e!==ws.prototype?"symbol":typeof e},Tn(n)}var Gu,tE;function wB(){if(tE)return Gu;tE=1,qM();var n=ro();return Gu=n.f("toPrimitive"),Gu}var Ku,rE;function EB(){if(rE)return Ku;rE=1;var n=wB();return Ku=n,Ku}var Yu,iE;function SB(){if(iE)return Yu;iE=1;var n=EB();return Yu=n,Yu}var Xu,nE;function OB(){if(nE)return Xu;nE=1;var n=SB();return Xu=n,Xu}var Ju,sE;function IB(){return sE||(sE=1,Ju=OB()),Ju}var $B=IB(),TB=re($B);function PB(n,e){if(Tn(n)!="object"||!n)return n;var t=n[TB];if(t!==void 0){var r=t.call(n,e);if(Tn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function RB(n){var e=PB(n,"string");return Tn(e)=="symbol"?e:e+""}function tr(n,e,t){return(e=RB(e))in n?fk(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var oE={},Zu,aE;function qB(){if(aE)return Zu;aE=1;var n=he(),e=Ut(),t=rt(),r=Me(),i=Kn(),s=jn(),o=Function,a=n([].concat),u=n([].join),l={},d=function(h,c,f){if(!r(l,c)){for(var v=[],p=0;p<c;p++)v[p]="a["+p+"]";l[c]=o("C,a","return new C("+u(v,",")+")")}return l[c](h,f)};return Zu=s?o.bind:function(c){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(c,g)};return t(v)&&(b.prototype=v),b},Zu}var uE;function CB(){if(uE)return oE;uE=1;var n=Y(),e=qB();return n({target:"Function",proto:!0,forced:Function.bind!==e},{bind:e}),oE}var Qu,lE;function ht(){if(lE)return Qu;lE=1;var n=Te(),e=Ae();return Qu=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]},Qu}var el,dE;function xB(){if(dE)return el;dE=1,CB();var n=ht();return el=n("Function","bind"),el}var tl,hE;function DB(){if(hE)return tl;hE=1;var n=He(),e=xB(),t=Function.prototype;return tl=function(r){var i=r.bind;return r===t||n(t,r)&&i===t.bind?e:i},tl}var rl,cE;function AB(){if(cE)return rl;cE=1;var n=DB();return rl=n,rl}var il,fE;function MB(){return fE||(fE=1,il=AB()),il}var FB=MB(),NB=re(FB),vE={},nl,pE;function kB(){if(pE)return nl;pE=1;var n=Ut(),e=Ot(),t=Gs(),r=zr(),i=TypeError,s="Reduce of empty array with no initial value",o=function(a){return function(u,l,d,h){var c=e(u),f=t(c),v=r(c);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){h=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&&(h=l(h,f[p],p,c));return h}};return nl={left:o(!1),right:o(!0)},nl}var sl,gE;function no(){if(gE)return sl;gE=1;var n=ne();return sl=function(e,t){var r=[][e];return!!r&&n(function(){r.call(null,t||function(){return 1},1)})},sl}var ol,yE;function FM(){if(yE)return ol;yE=1;var n=Te(),e=qi(),t=Wt(),r=function(i){return e.slice(0,i.length)===i};return ol=(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"})(),ol}var al,mE;function BB(){if(mE)return al;mE=1;var n=FM();return al=n==="NODE",al}var bE;function jB(){if(bE)return vE;bE=1;var n=Y(),e=kB().left,t=no(),r=Wn(),i=BB(),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)}}),vE}var ul,_E;function LB(){if(_E)return ul;_E=1,jB();var n=ht();return ul=n("Array","reduce"),ul}var ll,wE;function zB(){if(wE)return ll;wE=1;var n=He(),e=LB(),t=Array.prototype;return ll=function(r){var i=r.reduce;return r===t||n(t,r)&&i===t.reduce?e:i},ll}var dl,EE;function WB(){if(EE)return dl;EE=1;var n=zB();return dl=n,dl}var hl,SE;function HB(){return SE||(SE=1,hl=WB()),hl}var UB=HB(),VB=re(UB),OE={},IE;function GB(){if(IE)return OE;IE=1;var n=Y(),e=Ni().filter,t=Js(),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)}}),OE}var cl,$E;function KB(){if($E)return cl;$E=1,GB();var n=ht();return cl=n("Array","filter"),cl}var fl,TE;function YB(){if(TE)return fl;TE=1;var n=He(),e=KB(),t=Array.prototype;return fl=function(r){var i=r.filter;return r===t||n(t,r)&&i===t.filter?e:i},fl}var vl,PE;function XB(){if(PE)return vl;PE=1;var n=YB();return vl=n,vl}var pl,RE;function JB(){return RE||(RE=1,pl=XB()),pl}var ZB=JB(),di=re(ZB),qE={},CE;function QB(){if(CE)return qE;CE=1;var n=Y(),e=Ni().map,t=Js(),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)}}),qE}var gl,xE;function e2(){if(xE)return gl;xE=1,QB();var n=ht();return gl=n("Array","map"),gl}var yl,DE;function t2(){if(DE)return yl;DE=1;var n=He(),e=e2(),t=Array.prototype;return yl=function(r){var i=r.map;return r===t||n(t,r)&&i===t.map?e:i},yl}var ml,AE;function r2(){if(AE)return ml;AE=1;var n=t2();return ml=n,ml}var bl,ME;function i2(){return ME||(ME=1,bl=r2()),bl}var n2=i2(),$t=re(n2),_l={exports:{}},FE;function s2(){return FE||(FE=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})(_l)),_l.exports}var o2=s2(),a2=re(o2);/*! 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 Et(){return Et=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},Et.apply(this,arguments)}function ct(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}function Es(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}var Wy;typeof Object.assign!="function"?Wy=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}:Wy=Object.assign;var Ar=Wy,NE=["","webkit","Moz","MS","ms","o"],u2=typeof document>"u"?{style:{}}:document.createElement("div"),l2="function",hi=Math.round,Mr=Math.abs,bm=Date.now;function so(n,e){for(var t,r,i=e[0].toUpperCase()+e.slice(1),s=0;s<NE.length;){if(t=NE[s],r=t?t+i:e,r in n)return r;s++}}var Nt;typeof window>"u"?Nt={}:Nt=window;var NM=so(u2.style,"touchAction"),kM=NM!==void 0;function d2(){if(!kM)return!1;var n={},e=Nt.CSS&&Nt.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return n[t]=e?Nt.CSS.supports("touch-action",t):!0}),n}var BM="compute",jM="auto",Hy="manipulation",qr="none",Pn="pan-x",Rn="pan-y",Ss=d2(),h2=/mobile|tablet|ip(ad|hone|od)|android/i,LM="ontouchstart"in Nt,c2=so(Nt,"PointerEvent")!==void 0,f2=LM&&h2.test(navigator.userAgent),Jn="touch",v2="pen",_m="mouse",p2="kinect",g2=25,Xe=1,Hr=2,Ie=4,Qe=8,Ds=1,Zn=2,Qn=4,es=8,Ei=16,qt=Zn|Qn,Cr=es|Ei,zM=qt|Cr,WM=["x","y"],As=["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 oo(n,e){return typeof n===l2?n.apply(e&&e[0]||void 0,e):n}function $r(n,e){return n.indexOf(e)>-1}function y2(n){if($r(n,qr))return qr;var e=$r(n,Pn),t=$r(n,Rn);return e&&t?qr:e||t?e?Pn:Rn:$r(n,Hy)?Hy:jM}var HM=(function(){function n(t,r){this.manager=t,this.set(r)}var e=n.prototype;return e.set=function(r){r===BM&&(r=this.compute()),kM&&this.manager.element.style&&Ss[r]&&(this.manager.element.style[NM]=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){oo(i.options.enable,[i])&&(r=r.concat(i.getTouchAction()))}),y2(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=$r(o,qr)&&!Ss[qr],u=$r(o,Rn)&&!Ss[Rn],l=$r(o,Pn)&&!Ss[Pn];if(a){var d=r.pointers.length===1,h=r.distance<2,c=r.deltaTime<250;if(d&&h&&c)return}if(!(l&&u)&&(a||u&&s&qt||l&&s&Cr))return this.preventSrc(i)},e.preventSrc=function(r){this.manager.session.prevented=!0,r.preventDefault()},n})();function wm(n,e){for(;n;){if(n===e)return!0;n=n.parentNode}return!1}function UM(n){var e=n.length;if(e===1)return{x:hi(n[0].clientX),y:hi(n[0].clientY)};for(var t=0,r=0,i=0;i<e;)t+=n[i].clientX,r+=n[i].clientY,i++;return{x:hi(t/e),y:hi(r/e)}}function kE(n){for(var e=[],t=0;t<n.pointers.length;)e[t]={clientX:hi(n.pointers[t].clientX),clientY:hi(n.pointers[t].clientY)},t++;return{timeStamp:bm(),pointers:e,center:UM(e),deltaX:n.deltaX,deltaY:n.deltaY}}function Ms(n,e,t){t||(t=WM);var r=e[t[0]]-n[t[0]],i=e[t[1]]-n[t[1]];return Math.sqrt(r*r+i*i)}function Uy(n,e,t){t||(t=WM);var r=e[t[0]]-n[t[0]],i=e[t[1]]-n[t[1]];return Math.atan2(i,r)*180/Math.PI}function VM(n,e){return n===e?Ds:Mr(n)>=Mr(e)?n<0?Zn:Qn:e<0?es:Ei}function m2(n,e){var t=e.center,r=n.offsetDelta||{},i=n.prevDelta||{},s=n.prevInput||{};(e.eventType===Xe||s.eventType===Ie)&&(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 GM(n,e,t){return{x:e/n||0,y:t/n||0}}function b2(n,e){return Ms(e[0],e[1],As)/Ms(n[0],n[1],As)}function _2(n,e){return Uy(e[1],e[0],As)+Uy(n[1],n[0],As)}function w2(n,e){var t=n.lastInterval||e,r=e.timeStamp-t.timeStamp,i,s,o,a;if(e.eventType!==Qe&&(r>g2||t.velocity===void 0)){var u=e.deltaX-t.deltaX,l=e.deltaY-t.deltaY,d=GM(r,u,l);s=d.x,o=d.y,i=Mr(d.x)>Mr(d.y)?d.x:d.y,a=VM(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 E2(n,e){var t=n.session,r=e.pointers,i=r.length;t.firstInput||(t.firstInput=kE(e)),i>1&&!t.firstMultiple?t.firstMultiple=kE(e):i===1&&(t.firstMultiple=!1);var s=t.firstInput,o=t.firstMultiple,a=o?o.center:s.center,u=e.center=UM(r);e.timeStamp=bm(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=Uy(a,u),e.distance=Ms(a,u),m2(t,e),e.offsetDirection=VM(e.deltaX,e.deltaY);var l=GM(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=Mr(l.x)>Mr(l.y)?l.x:l.y,e.scale=o?b2(o.pointers,r):1,e.rotation=o?_2(o.pointers,r):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,w2(t,e);var d=n.element,h=e.srcEvent,c;h.composedPath?c=h.composedPath()[0]:h.path?c=h.path[0]:c=h.target,wm(c,d)&&(d=c),e.target=d}function S2(n,e,t){var r=t.pointers.length,i=t.changedPointers.length,s=e&Xe&&r-i===0,o=e&(Ie|Qe)&&r-i===0;t.isFirst=!!s,t.isFinal=!!o,s&&(n.session={}),t.eventType=e,E2(n,t),n.emit("hammer.input",t),n.recognize(t),n.session.prevInput=t}function qn(n){return n.trim().split(/\s+/g)}function mn(n,e,t){kt(qn(e),function(r){n.addEventListener(r,t,!1)})}function bn(n,e,t){kt(qn(e),function(r){n.removeEventListener(r,t,!1)})}function BE(n){var e=n.ownerDocument||n;return e.defaultView||e.parentWindow||window}var Bi=(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){oo(t.options.enable,[t])&&i.handler(s)},this.init()}var e=n.prototype;return e.handler=function(){},e.init=function(){this.evEl&&mn(this.element,this.evEl,this.domHandler),this.evTarget&&mn(this.target,this.evTarget,this.domHandler),this.evWin&&mn(BE(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&bn(this.element,this.evEl,this.domHandler),this.evTarget&&bn(this.target,this.evTarget,this.domHandler),this.evWin&&bn(BE(this.element),this.evWin,this.domHandler)},n})();function Fr(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 O2={pointerdown:Xe,pointermove:Hr,pointerup:Ie,pointercancel:Qe,pointerout:Qe},I2={2:Jn,3:v2,4:_m,5:p2},KM="pointerdown",YM="pointermove pointerup pointercancel";Nt.MSPointerEvent&&!Nt.PointerEvent&&(KM="MSPointerDown",YM="MSPointerMove MSPointerUp MSPointerCancel");var XM=(function(n){ct(e,n);function e(){var r,i=e.prototype;return i.evEl=KM,i.evWin=YM,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=O2[a],l=I2[i.pointerType]||i.pointerType,d=l===Jn,h=Fr(s,i.pointerId,"pointerId");u&Xe&&(i.button===0||d)?h<0&&(s.push(i),h=s.length-1):u&(Ie|Qe)&&(o=!0),!(h<0)&&(s[h]=i,this.callback(this.manager,u,{pointers:s,changedPointers:[i],pointerType:l,srcEvent:i}),o&&s.splice(h,1))},e})(Bi);function Cn(n){return Array.prototype.slice.call(n,0)}function Em(n,e,t){for(var r=[],i=[],s=0;s<n.length;){var o=e?n[s][e]:n[s];Fr(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 $2={touchstart:Xe,touchmove:Hr,touchend:Ie,touchcancel:Qe},T2="touchstart touchmove touchend touchcancel",Sm=(function(n){ct(e,n);function e(){var r;return e.prototype.evTarget=T2,r=n.apply(this,arguments)||this,r.targetIds={},r}var t=e.prototype;return t.handler=function(i){var s=$2[i.type],o=P2.call(this,i,s);o&&this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:Jn,srcEvent:i})},e})(Bi);function P2(n,e){var t=Cn(n.touches),r=this.targetIds;if(e&(Xe|Hr)&&t.length===1)return r[t[0].identifier]=!0,[t,t];var i,s,o=Cn(n.changedTouches),a=[],u=this.target;if(s=t.filter(function(l){return wm(l.target,u)}),e===Xe)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&(Ie|Qe)&&delete r[o[i].identifier],i++;if(a.length)return[Em(s.concat(a),"identifier",!0),a]}var R2={mousedown:Xe,mousemove:Hr,mouseup:Ie},q2="mousedown",C2="mousemove mouseup",Om=(function(n){ct(e,n);function e(){var r,i=e.prototype;return i.evEl=q2,i.evWin=C2,r=n.apply(this,arguments)||this,r.pressed=!1,r}var t=e.prototype;return t.handler=function(i){var s=R2[i.type];s&Xe&&i.button===0&&(this.pressed=!0),s&Hr&&i.which!==1&&(s=Ie),this.pressed&&(s&Ie&&(this.pressed=!1),this.callback(this.manager,s,{pointers:[i],changedPointers:[i],pointerType:_m,srcEvent:i}))},e})(Bi),x2=2500,jE=25;function LE(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,x2)}}function D2(n,e){n&Xe?(this.primaryTouch=e.changedPointers[0].identifier,LE.call(this,e)):n&(Ie|Qe)&&LE.call(this,e)}function A2(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<=jE&&o<=jE)return!0}return!1}var JM=(function(){var n=(function(e){ct(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===Jn,h=l.pointerType===_m;if(!(h&&l.sourceCapabilities&&l.sourceCapabilities.firesTouchEvents)){if(d)D2.call(Es(Es(o)),u,l);else if(h&&A2.call(Es(Es(o)),l))return;o.callback(a,u,l)}},o.touch=new Sm(o.manager,o.handler),o.mouse=new Om(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})(Bi);return n})();function M2(n){var e,t=n.options.inputClass;return t?e=t:c2?e=XM:f2?e=Sm:LM?e=JM:e=Om,new e(n,S2)}function ci(n,e,t){return Array.isArray(n)?(kt(n,t[e],t),!0):!1}var Rs=1,ut=2,Si=4,rr=8,Bt=rr,xn=16,Tt=32,F2=1;function N2(){return F2++}function Os(n,e){var t=e.manager;return t?t.get(n):n}function zE(n){return n&xn?"cancel":n&rr?"end":n&Si?"move":n&ut?"start":""}var ts=(function(){function n(t){t===void 0&&(t={}),this.options=Et({enable:!0},t),this.id=N2(),this.manager=null,this.state=Rs,this.simultaneous={},this.requireFail=[]}var e=n.prototype;return e.set=function(r){return Ar(this.options,r),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(r){if(ci(r,"recognizeWith",this))return this;var i=this.simultaneous;return r=Os(r,this),i[r.id]||(i[r.id]=r,r.recognizeWith(this)),this},e.dropRecognizeWith=function(r){return ci(r,"dropRecognizeWith",this)?this:(r=Os(r,this),delete this.simultaneous[r.id],this)},e.requireFailure=function(r){if(ci(r,"requireFailure",this))return this;var i=this.requireFail;return r=Os(r,this),Fr(i,r)===-1&&(i.push(r),r.requireFailure(this)),this},e.dropRequireFailure=function(r){if(ci(r,"dropRequireFailure",this))return this;r=Os(r,this);var i=Fr(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<rr&&o(i.options.event+zE(s)),o(i.options.event),r.additionalEvent&&o(r.additionalEvent),s>=rr&&o(i.options.event+zE(s))},e.tryEmit=function(r){if(this.canEmit())return this.emit(r);this.state=Tt},e.canEmit=function(){for(var r=0;r<this.requireFail.length;){if(!(this.requireFail[r].state&(Tt|Rs)))return!1;r++}return!0},e.recognize=function(r){var i=Ar({},r);if(!oo(this.options.enable,[this,i])){this.reset(),this.state=Tt;return}this.state&(Bt|xn|Tt)&&(this.state=Rs),this.state=this.process(i),this.state&(ut|Si|rr|xn)&&this.tryEmit(i)},e.process=function(r){},e.getTouchAction=function(){},e.reset=function(){},n})(),Vy=(function(n){ct(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,Et({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[Hy]},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&Xe&&this.count===0)return this.failTimeout();if(u&&l&&a){if(i.eventType!==Ie)return this.failTimeout();var d=this.pTime?i.timeStamp-this.pTime<o.interval:!0,h=!this.pCenter||Ms(this.pCenter,i.center)<o.posThreshold;this.pTime=i.timeStamp,this.pCenter=i.center,!h||!d?this.count=1:this.count+=1,this._input=i;var c=this.count%o.taps;if(c===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){s.state=Bt,s.tryEmit()},o.interval),ut):Bt}return Tt},t.failTimeout=function(){var i=this;return this._timer=setTimeout(function(){i.state=Tt},this.options.interval),Tt},t.reset=function(){clearTimeout(this._timer)},t.emit=function(){this.state===Bt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e})(ts),Oi=(function(n){ct(e,n);function e(r){return r===void 0&&(r={}),n.call(this,Et({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&(ut|Si),u=this.attrTest(i);return a&&(o&Qe||!u)?s|xn:a||u?o&Ie?s|rr:s&ut?s|Si:ut:Tt},e})(ts);function ZM(n){return n===Ei?"down":n===es?"up":n===Zn?"left":n===Qn?"right":""}var Im=(function(n){ct(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,Et({event:"pan",threshold:10,pointers:1,direction:zM},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&qt&&s.push(Rn),i&Cr&&s.push(Pn),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&qt?(u=l===0?Ds:l<0?Zn:Qn,o=l!==this.pX,a=Math.abs(i.deltaX)):(u=d===0?Ds:d<0?es:Ei,o=d!==this.pY,a=Math.abs(i.deltaY))),i.direction=u,o&&a>s.threshold&&u&s.direction},t.attrTest=function(i){return Oi.prototype.attrTest.call(this,i)&&(this.state&ut||!(this.state&ut)&&this.directionTest(i))},t.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var s=ZM(i.direction);s&&(i.additionalEvent=this.options.event+s),n.prototype.emit.call(this,i)},e})(Oi),QM=(function(n){ct(e,n);function e(r){return r===void 0&&(r={}),n.call(this,Et({event:"swipe",threshold:10,velocity:.3,direction:qt|Cr,pointers:1},r))||this}var t=e.prototype;return t.getTouchAction=function(){return Im.prototype.getTouchAction.call(this)},t.attrTest=function(i){var s=this.options.direction,o;return s&(qt|Cr)?o=i.overallVelocity:s&qt?o=i.overallVelocityX:s&Cr&&(o=i.overallVelocityY),n.prototype.attrTest.call(this,i)&&s&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&Mr(o)>this.options.velocity&&i.eventType&Ie},t.emit=function(i){var s=ZM(i.offsetDirection);s&&this.manager.emit(this.options.event+s,i),this.manager.emit(this.options.event,i)},e})(Oi),eF=(function(n){ct(e,n);function e(r){return r===void 0&&(r={}),n.call(this,Et({event:"pinch",threshold:0,pointers:2},r))||this}var t=e.prototype;return t.getTouchAction=function(){return[qr]},t.attrTest=function(i){return n.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state&ut)},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})(Oi),tF=(function(n){ct(e,n);function e(r){return r===void 0&&(r={}),n.call(this,Et({event:"rotate",threshold:0,pointers:2},r))||this}var t=e.prototype;return t.getTouchAction=function(){return[qr]},t.attrTest=function(i){return n.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state&ut)},e})(Oi),rF=(function(n){ct(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,Et({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[jM]},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&(Ie|Qe)&&!l)this.reset();else if(i.eventType&Xe)this.reset(),this._timer=setTimeout(function(){s.state=Bt,s.tryEmit()},o.time);else if(i.eventType&Ie)return Bt;return Tt},t.reset=function(){clearTimeout(this._timer)},t.emit=function(i){this.state===Bt&&(i&&i.eventType&Ie?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=bm(),this.manager.emit(this.options.event,this._input)))},e})(ts),iF={domEvents:!1,touchAction:BM,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},WE=[[tF,{enable:!1}],[eF,{enable:!1},["rotate"]],[QM,{direction:qt}],[Im,{direction:qt},["swipe"]],[Vy],[Vy,{event:"doubletap",taps:2},["tap"]],[rF]],k2=1,HE=2;function UE(n,e){var t=n.element;if(t.style){var r;kt(n.options.cssProps,function(i,s){r=so(t.style,s),e?(n.oldCssProps[r]=t.style[r],t.style[r]=i):t.style[r]=n.oldCssProps[r]||""}),e||(n.oldCssProps={})}}function B2(n,e){var t=document.createEvent("Event");t.initEvent(n,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var VE=(function(){function n(t,r){var i=this;this.options=Ar({},iF,r||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=M2(this),this.touchAction=new HM(this,this.options.touchAction),UE(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 Ar(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?HE:k2},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&Bt)&&(i.curRecognizer=null,a=null);for(var u=0;u<o.length;)s=o[u],i.stopped!==HE&&(!a||s===a||s.canRecognizeWith(a))?s.recognize(r):s.reset(),!a&&s.state&(ut|Si|rr)&&(i.curRecognizer=s,a=s),u++}},e.get=function(r){if(r instanceof ts)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(ci(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(ci(r,"remove",this))return this;var i=this.get(r);if(r){var s=this.recognizers,o=Fr(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(qn(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(qn(r),function(o){i?s[o]&&s[o].splice(Fr(s[o],i),1):delete s[o]}),this},e.emit=function(r,i){this.options.domEvents&&B2(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&&UE(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},n})(),j2={touchstart:Xe,touchmove:Hr,touchend:Ie,touchcancel:Qe},L2="touchstart",z2="touchstart touchmove touchend touchcancel",W2=(function(n){ct(e,n);function e(){var r,i=e.prototype;return i.evTarget=L2,i.evWin=z2,r=n.apply(this,arguments)||this,r.started=!1,r}var t=e.prototype;return t.handler=function(i){var s=j2[i.type];if(s===Xe&&(this.started=!0),!!this.started){var o=H2.call(this,i,s);s&(Ie|Qe)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:Jn,srcEvent:i})}},e})(Bi);function H2(n,e){var t=Cn(n.touches),r=Cn(n.changedTouches);return e&(Ie|Qe)&&(t=Em(t.concat(r),"identifier",!0)),[t,r]}function nF(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 sF=nF(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`."),U2=nF(function(n,e){return sF(n,e,!0)},"merge","Use `assign`.");function V2(n,e,t){var r=e.prototype,i;i=n.prototype=Object.create(r),i.constructor=n,i._super=r,t&&Ar(i,t)}function GE(n,e){return function(){return n.apply(e,arguments)}}var G2=(function(){var n=function(t,r){return r===void 0&&(r={}),new VE(t,Et({recognizers:WE.concat()},r))};return n.VERSION="2.0.17-rc",n.DIRECTION_ALL=zM,n.DIRECTION_DOWN=Ei,n.DIRECTION_LEFT=Zn,n.DIRECTION_RIGHT=Qn,n.DIRECTION_UP=es,n.DIRECTION_HORIZONTAL=qt,n.DIRECTION_VERTICAL=Cr,n.DIRECTION_NONE=Ds,n.DIRECTION_DOWN=Ei,n.INPUT_START=Xe,n.INPUT_MOVE=Hr,n.INPUT_END=Ie,n.INPUT_CANCEL=Qe,n.STATE_POSSIBLE=Rs,n.STATE_BEGAN=ut,n.STATE_CHANGED=Si,n.STATE_ENDED=rr,n.STATE_RECOGNIZED=Bt,n.STATE_CANCELLED=xn,n.STATE_FAILED=Tt,n.Manager=VE,n.Input=Bi,n.TouchAction=HM,n.TouchInput=Sm,n.MouseInput=Om,n.PointerEventInput=XM,n.TouchMouseInput=JM,n.SingleTouchInput=W2,n.Recognizer=ts,n.AttrRecognizer=Oi,n.Tap=Vy,n.Pan=Im,n.Swipe=QM,n.Pinch=eF,n.Rotate=tF,n.Press=rF,n.on=mn,n.off=bn,n.each=kt,n.merge=U2,n.extend=sF,n.bindFn=GE,n.assign=Ar,n.inherit=V2,n.bindFn=GE,n.prefixed=so,n.toArray=Cn,n.inArray=Fr,n.uniqueArray=Em,n.splitStr=qn,n.boolOrFn=oo,n.hasParent=wm,n.addEventListeners=mn,n.removeEventListeners=bn,n.defaults=Ar({},iF,{preset:WE}),n})();/**
|
|
33
|
-
* vis-util
|
|
34
|
-
* https://github.com/visjs/vis-util
|
|
35
|
-
*
|
|
36
|
-
* utilitie collection for visjs
|
|
37
|
-
*
|
|
38
|
-
* @version 6.0.0
|
|
39
|
-
* @date 2025-07-12T18:02:43.836Z
|
|
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
|
-
*/const oF=Symbol("DELETE");function K2(n,...e){return aF({},n,...e)}function aF(...n){const e=Fs(...n);return lF(e),e}function Fs(...n){if(n.length<2)return n[0];if(n.length>2)return Fs(aF(n[0],n[1]),...n.slice(2));const e=n[0],t=n[1];if(e instanceof Date&&t instanceof Date)return e.setTime(t.getTime()),e;for(const r of Reflect.ownKeys(t))Object.prototype.propertyIsEnumerable.call(t,r)&&(t[r]===oF?delete e[r]:e[r]!==null&&t[r]!==null&&typeof e[r]=="object"&&typeof t[r]=="object"&&!Array.isArray(e[r])&&!Array.isArray(t[r])?e[r]=Fs(e[r],t[r]):e[r]=uF(t[r]));return e}function uF(n){return Array.isArray(n)?n.map(e=>uF(e)):typeof n=="object"&&n!==null?n instanceof Date?new Date(n.getTime()):Fs({},n):n}function lF(n){for(const e of Object.keys(n))n[e]===oF?delete n[e]:typeof n[e]=="object"&&n[e]!==null&&lF(n[e])}function Y2(){const n=()=>{};return{on:n,off:n,destroy:n,emit:n,get(){return{set:n}}}}const X2=typeof window<"u"?window.Hammer||G2:function(){return Y2()};function Mt(n){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 e=X2(this._dom.overlay);e.on("tap",this._onTapOverlay.bind(this)),this._cleanupQueue.push(()=>{e.destroy()}),["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach(r=>{e.on(r,i=>{i.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=r=>{J2(r.target,n)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=r=>{("key"in r?r.key==="Escape":r.keyCode===27)&&this.deactivate()}}a2(Mt.prototype);Mt.current=null;Mt.prototype.destroy=function(){this.deactivate();for(const n of this._cleanupQueue.splice(0).reverse())n()};Mt.prototype.activate=function(){Mt.current&&Mt.current.deactivate(),Mt.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)};Mt.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")};Mt.prototype._onTapOverlay=function(n){this.activate(),n.srcEvent.stopPropagation()};function J2(n,e){for(;n;){if(n===e)return!0;n=n.parentNode}return!1}var wl,KE;function Z2(){if(KE)return wl;KE=1,$M();var n=Ae();return wl=n.Object.getOwnPropertySymbols,wl}var El,YE;function Q2(){if(YE)return El;YE=1;var n=Z2();return El=n,El}var Sl,XE;function ej(){return XE||(XE=1,Sl=Q2()),Sl}var tj=ej(),JE=re(tj),Ol={exports:{}},ZE={},QE;function rj(){if(QE)return ZE;QE=1;var n=Y(),e=ne(),t=Ht(),r=Ys().f,i=Pe(),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)}}),ZE}var eS;function ij(){if(eS)return Ol.exports;eS=1,rj();var n=Ae(),e=n.Object,t=Ol.exports=function(i,s){return e.getOwnPropertyDescriptor(i,s)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),Ol.exports}var Il,tS;function nj(){if(tS)return Il;tS=1;var n=ij();return Il=n,Il}var $l,rS;function sj(){return rS||(rS=1,$l=nj()),$l}var oj=sj(),dF=re(oj),iS={},Tl,nS;function aj(){if(nS)return Tl;nS=1;var n=Ni().forEach,e=no(),t=e("forEach");return Tl=t?[].forEach:function(i){return n(this,i,arguments.length>1?arguments[1]:void 0)},Tl}var sS;function uj(){if(sS)return iS;sS=1;var n=Y(),e=aj();return n({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),iS}var Pl,oS;function lj(){if(oS)return Pl;oS=1,uj();var n=ht();return Pl=n("Array","forEach"),Pl}var Rl,aS;function dj(){if(aS)return Rl;aS=1;var n=lj();return Rl=n,Rl}var ql,uS;function hj(){if(uS)return ql;uS=1;var n=dr(),e=Me(),t=He(),r=dj(),i=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return ql=function(o){var a=o.forEach;return o===i||t(i,o)&&a===i.forEach||e(s,n(o))?r:a},ql}var Cl,lS;function cj(){return lS||(lS=1,Cl=hj()),Cl}var fj=cj(),Ii=re(fj),dS={},xl,hS;function vj(){if(hS)return xl;hS=1;var n=nt(),e=he(),t=eo(),r=to(),i=Vt(),s=e([].concat);return xl=n("Reflect","ownKeys")||function(a){var u=t.f(i(a)),l=r.f;return l?s(u,l(a)):u},xl}var cS;function pj(){if(cS)return dS;cS=1;var n=Y(),e=Pe(),t=vj(),r=Ht(),i=Ys(),s=hm();return n({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(a){for(var u=r(a),l=i.f,d=t(u),h={},c=0,f,v;d.length>c;)v=l(u,f=d[c++]),v!==void 0&&s(h,f,v);return h}}),dS}var Dl,fS;function gj(){if(fS)return Dl;fS=1,pj();var n=Ae();return Dl=n.Object.getOwnPropertyDescriptors,Dl}var Al,vS;function yj(){if(vS)return Al;vS=1;var n=gj();return Al=n,Al}var Ml,pS;function mj(){return pS||(pS=1,Ml=yj()),Ml}var bj=mj(),gS=re(bj),Fl={exports:{}},yS={},mS;function _j(){if(mS)return yS;mS=1;var n=Y(),e=Pe(),t=pm().f;return n({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),yS}var bS;function wj(){if(bS)return Fl.exports;bS=1,_j();var n=Ae(),e=n.Object,t=Fl.exports=function(i,s){return e.defineProperties(i,s)};return e.defineProperties.sham&&(t.sham=!0),Fl.exports}var Nl,_S;function Ej(){if(_S)return Nl;_S=1;var n=wj();return Nl=n,Nl}var kl,wS;function Sj(){return wS||(wS=1,kl=Ej()),kl}var Oj=Sj(),Ij=re(Oj),Bl,ES;function $j(){return ES||(ES=1,Bl=gM()),Bl}var Tj=$j(),Pj=re(Tj),SS={},OS;function Rj(){if(OS)return SS;OS=1;var n=Y(),e=Un();return n({target:"Array",stat:!0},{isArray:e}),SS}var jl,IS;function qj(){if(IS)return jl;IS=1,Rj();var n=Ae();return jl=n.Array.isArray,jl}var Ll,$S;function Cj(){if($S)return Ll;$S=1;var n=qj();return Ll=n,Ll}var zl,TS;function xj(){return TS||(TS=1,zl=Cj()),zl}var Dj=xj(),Sr=re(Dj),PS={},RS={},Wl={exports:{}},Hl,qS;function Aj(){if(qS)return Hl;qS=1;var n=ne();return Hl=n(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),Hl}var Ul,CS;function Mj(){if(CS)return Ul;CS=1;var n=ne(),e=rt(),t=Wt(),r=Aj(),i=Object.isExtensible,s=n(function(){});return Ul=s||r?function(a){return!e(a)||r&&t(a)==="ArrayBuffer"?!1:i?i(a):!0}:i,Ul}var Vl,xS;function Fj(){if(xS)return Vl;xS=1;var n=ne();return Vl=!n(function(){return Object.isExtensible(Object.preventExtensions({}))}),Vl}var DS;function hF(){if(DS)return Wl.exports;DS=1;var n=Y(),e=he(),t=Vn(),r=rt(),i=Me(),s=dt().f,o=eo(),a=EM(),u=Mj(),l=Ks(),d=Fj(),h=!1,c=l("meta"),f=0,v=function(m){s(m,c,{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,c)){if(!u(m))return"F";if(!w)return"E";v(m)}return m[c].objectID},b=function(m,w){if(!i(m,c)){if(!u(m))return!0;if(!w)return!1;v(m)}return m[c].weakData},y=function(m){return d&&h&&u(m)&&!i(m,c)&&v(m),m},g=function(){S.enable=function(){},h=!0;var m=o.f,w=e([].splice),O={};O[c]=1,m(O).length&&(o.f=function(I){for(var _=m(I),E=0,$=_.length;E<$;E++)if(_[E]===c){w(_,E,1);break}return _},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:a.f}))},S=Wl.exports={enable:g,fastKey:p,getWeakData:b,onFreeze:y};return t[c]=!0,Wl.exports}var Gl,AS;function Nj(){if(AS)return Gl;AS=1;var n=Le(),e=ki(),t=n("iterator"),r=Array.prototype;return Gl=function(i){return i!==void 0&&(e.Array===i||r[t]===i)},Gl}var Kl,MS;function cF(){if(MS)return Kl;MS=1;var n=dr(),e=um(),t=zn(),r=ki(),i=Le(),s=i("iterator");return Kl=function(o){if(!t(o))return e(o,s)||e(o,"@@iterator")||r[n(o)]},Kl}var Yl,FS;function fF(){if(FS)return Yl;FS=1;var n=tt(),e=Ut(),t=Vt(),r=xi(),i=cF(),s=TypeError;return Yl=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")},Yl}var Xl,NS;function $m(){if(NS)return Xl;NS=1;var n=tt(),e=Vt(),t=um();return Xl=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},Xl}var Jl,kS;function Tm(){if(kS)return Jl;kS=1;var n=Xs(),e=tt(),t=Vt(),r=xi(),i=Nj(),s=zr(),o=He(),a=fF(),u=cF(),l=$m(),d=TypeError,h=function(f,v){this.stopped=f,this.result=v},c=h.prototype;return Jl=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 h(!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(c,$))return $;return new h(!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(c,$))return $}return new h(!1)},Jl}var Zl,BS;function vF(){if(BS)return Zl;BS=1;var n=He(),e=TypeError;return Zl=function(t,r){if(n(r,t))return t;throw new e("Incorrect invocation")},Zl}var Ql,jS;function pF(){if(jS)return Ql;jS=1;var n=Y(),e=Te(),t=hF(),r=ne(),i=Mi(),s=Tm(),o=vF(),a=De(),u=rt(),l=zn(),d=Wr(),h=dt().f,c=Ni().forEach,f=Pe(),v=Xn(),p=v.set,b=v.getterFor;return Ql=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);c(["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,G){var L=P(this).collection;if(!C&&w&&!u(M))return R==="get"?void 0:!1;var J=L[R](M===0?0:M,G);return C?this:J})}),w||h(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),$},Ql}var ed,LS;function kj(){if(LS)return ed;LS=1;var n=Yn();return ed=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},ed}var td,zS;function Bj(){if(zS)return td;zS=1;var n=nt(),e=gm(),t=Le(),r=Pe(),i=t("species");return td=function(s){var o=n(s);r&&o&&!o[i]&&e(o,i,{configurable:!0,get:function(){return this}})},td}var rd,WS;function gF(){if(WS)return rd;WS=1;var n=Gn(),e=gm(),t=kj(),r=Xs(),i=vF(),s=zn(),o=Tm(),a=ym(),u=mm(),l=Bj(),d=Pe(),h=hF().fastKey,c=Xn(),f=c.set,v=c.getterFor;return rd={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=h(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=h(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)}},rd}var HS;function jj(){if(HS)return RS;HS=1;var n=pF(),e=gF();return n("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),RS}var US;function Lj(){return US||(US=1,jj()),PS}var VS={},id,GS;function yF(){return GS||(GS=1,id=function(n,e){return e===1?function(t,r){return t[n](r)}:function(t,r,i){return t[n](r,i)}}),id}var nd,KS;function zj(){if(KS)return nd;KS=1;var n=nt(),e=yF(),t=n("Map");return nd={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},nd}var YS;function Wj(){if(YS)return VS;YS=1;var n=Y(),e=he(),t=Ut(),r=Lr(),i=Tm(),s=zj(),o=Di(),a=ne(),u=s.Map,l=s.has,d=s.get,h=s.set,c=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)?c(d(y,m),S):h(y,m,[S])}),y}}),VS}var sd,XS;function Hj(){if(XS)return sd;XS=1,cr(),Lj(),Wj(),io();var n=Ae();return sd=n.Map,sd}var od,JS;function Uj(){if(JS)return od;JS=1;var n=Hj();return fr(),od=n,od}var ad,ZS;function Vj(){return ZS||(ZS=1,ad=Uj()),ad}var Gj=Vj(),mF=re(Gj),QS={},e0;function Kj(){if(e0)return QS;e0=1;var n=Y(),e=Ni().some,t=no(),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)}}),QS}var ud,t0;function Yj(){if(t0)return ud;t0=1,Kj();var n=ht();return ud=n("Array","some"),ud}var ld,r0;function Xj(){if(r0)return ld;r0=1;var n=He(),e=Yj(),t=Array.prototype;return ld=function(r){var i=r.some;return r===t||n(t,r)&&i===t.some?e:i},ld}var dd,i0;function Jj(){if(i0)return dd;i0=1;var n=Xj();return dd=n,dd}var hd,n0;function Zj(){return n0||(n0=1,hd=Jj()),hd}var Qj=Zj(),eL=re(Qj),s0={},cd,o0;function tL(){if(o0)return cd;o0=1;var n=Pe(),e=he(),t=tt(),r=ne(),i=Zs(),s=to(),o=am(),a=Ot(),u=Gs(),l=Object.assign,d=Object.defineProperty,h=e([].concat);return cd=!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 c={},f={},v=Symbol("assign detection"),p="abcdefghijklmnopqrst";return c[v]=7,p.split("").forEach(function(b){f[b]=b}),l({},c)[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?h(i(m),g(m)):i(m),O=w.length,I=0,_;O>I;)_=w[I++],(!n||t(S,m,_))&&(p[_]=m[_]);return p}:l,cd}var a0;function rL(){if(a0)return s0;a0=1;var n=Y(),e=tL();return n({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),s0}var fd,u0;function iL(){if(u0)return fd;u0=1,rL();var n=Ae();return fd=n.Object.assign,fd}var vd,l0;function nL(){if(l0)return vd;l0=1;var n=iL();return vd=n,vd}var pd,d0;function sL(){return d0||(d0=1,pd=nL()),pd}var oL=sL(),aL=re(oL),gd,h0;function uL(){if(h0)return gd;h0=1,bM();var n=ht();return gd=n("Array","concat"),gd}var yd,c0;function lL(){if(c0)return yd;c0=1;var n=He(),e=uL(),t=Array.prototype;return yd=function(r){var i=r.concat;return r===t||n(t,r)&&i===t.concat?e:i},yd}var md,f0;function dL(){if(f0)return md;f0=1;var n=lL();return md=n,md}var bd,v0;function hL(){return v0||(v0=1,bd=dL()),bd}var cL=hL(),fL=re(cL),_d,p0;function vL(){if(p0)return _d;p0=1,cr();var n=ht();return _d=n("Array","keys"),_d}var wd,g0;function pL(){if(g0)return wd;g0=1;var n=vL();return wd=n,wd}var Ed,y0;function gL(){if(y0)return Ed;y0=1,fr();var n=dr(),e=Me(),t=He(),r=pL(),i=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Ed=function(o){var a=o.keys;return o===i||t(i,o)&&a===i.keys||e(s,n(o))?r:a},Ed}var Sd,m0;function yL(){return m0||(m0=1,Sd=gL()),Sd}var mL=yL(),oi=re(mL),b0={},_0;function bL(){if(_0)return b0;_0=1;var n=Y(),e=Ot(),t=Zs(),r=ne(),i=r(function(){t(1)});return n({target:"Object",stat:!0,forced:i},{keys:function(o){return t(e(o))}}),b0}var Od,w0;function _L(){if(w0)return Od;w0=1,bL();var n=Ae();return Od=n.Object.keys,Od}var Id,E0;function wL(){if(E0)return Id;E0=1;var n=_L();return Id=n,Id}var $d,S0;function EL(){return S0||(S0=1,$d=wL()),$d}var SL=EL(),bF=re(SL),O0={},Td,I0;function _F(){if(I0)return Td;I0=1;var n=xi(),e=TypeError;return Td=function(t,r){if(!delete t[r])throw new e("Cannot delete property "+n(r)+" of "+n(t))},Td}var Pd,$0;function OL(){if($0)return Pd;$0=1;var n=Kn(),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),h=t(n(r,l),i),c=d.length,f=h.length,v=0,p=0;v<c||p<f;)r[v+p]=v<c&&p<f?i(d[v],h[p])<=0?d[v++]:h[p++]:v<c?d[v++]:h[p++];return r};return Pd=t,Pd}var Rd,T0;function IL(){if(T0)return Rd;T0=1;var n=qi(),e=n.match(/firefox\/(\d+)/i);return Rd=!!e&&+e[1],Rd}var qd,P0;function $L(){if(P0)return qd;P0=1;var n=qi();return qd=/MSIE|Trident/.test(n),qd}var Cd,R0;function TL(){if(R0)return Cd;R0=1;var n=qi(),e=n.match(/AppleWebKit\/(\d+)\./);return Cd=!!e&&+e[1],Cd}var q0;function PL(){if(q0)return O0;q0=1;var n=Y(),e=he(),t=Ut(),r=Ot(),i=zr(),s=_F(),o=hr(),a=ne(),u=OL(),l=no(),d=IL(),h=$L(),c=Wn(),f=TL(),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(c)return c<70;if(!(d&&d>3)){if(h)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}}),O0}var xd,C0;function RL(){if(C0)return xd;C0=1,PL();var n=ht();return xd=n("Array","sort"),xd}var Dd,x0;function qL(){if(x0)return Dd;x0=1;var n=He(),e=RL(),t=Array.prototype;return Dd=function(r){var i=r.sort;return r===t||n(t,r)&&i===t.sort?e:i},Dd}var Ad,D0;function CL(){if(D0)return Ad;D0=1;var n=qL();return Ad=n,Ad}var Md,A0;function xL(){return A0||(A0=1,Md=CL()),Md}var DL=xL(),Gy=re(DL),Fd,M0;function AL(){if(M0)return Fd;M0=1,cr();var n=ht();return Fd=n("Array","values"),Fd}var Nd,F0;function ML(){if(F0)return Nd;F0=1;var n=AL();return Nd=n,Nd}var kd,N0;function FL(){if(N0)return kd;N0=1,fr();var n=dr(),e=Me(),t=He(),r=ML(),i=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return kd=function(o){var a=o.values;return o===i||t(i,o)&&a===i.values||e(s,n(o))?r:a},kd}var Bd,k0;function NL(){return k0||(k0=1,Bd=FL()),Bd}var kL=NL(),B0=re(kL),j0={},jd,L0;function BL(){if(L0)return jd;L0=1;var n=Fi(),e=hr(),t=Lr(),r=RangeError;return jd=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},jd}var Ld,z0;function jL(){if(z0)return Ld;z0=1;var n=he(),e=yM(),t=hr(),r=BL(),i=Lr(),s=n(r),o=n("".slice),a=Math.ceil,u=function(l){return function(d,h,c){var f=t(i(d)),v=e(h),p=f.length,b=c===void 0?" ":t(c),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 Ld={start:u(!1),end:u(!0)},Ld}var zd,W0;function LL(){if(W0)return zd;W0=1;var n=he(),e=ne(),t=jL().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),h=n(o.getUTCHours),c=n(o.getUTCMilliseconds),f=n(o.getUTCMinutes),v=n(o.getUTCMonth),p=n(o.getUTCSeconds);return zd=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=c(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(h(y),2,0)+":"+t(f(y),2,0)+":"+t(p(y),2,0)+"."+t(S,3,0)+"Z"}:a,zd}var H0;function zL(){if(H0)return j0;H0=1;var n=Y(),e=tt(),t=Ot(),r=cM(),i=LL(),s=Wt(),o=ne(),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),h=r(d,"number");return typeof h=="number"&&!isFinite(h)?null:!("toISOString"in d)&&s(d)==="Date"?e(i,d):d.toISOString()}}),j0}var Wd,U0;function WL(){if(U0)return Wd;U0=1,zL(),IM();var n=Ae(),e=Vs();return n.JSON||(n.JSON={stringify:JSON.stringify}),Wd=function(r,i,s){return e(n.JSON.stringify,null,arguments)},Wd}var Hd,V0;function HL(){if(V0)return Hd;V0=1;var n=WL();return Hd=n,Hd}var Ud,G0;function UL(){return G0||(G0=1,Ud=HL()),Ud}var VL=UL(),GL=re(VL),Vd,K0;function KL(){return K0||(K0=1,Vd=MM()),Vd}var YL=KL(),fi=re(YL),Gd,Y0;function XL(){if(Y0)return Gd;Y0=1,cr();var n=ht();return Gd=n("Array","entries"),Gd}var Kd,X0;function JL(){if(X0)return Kd;X0=1;var n=XL();return Kd=n,Kd}var Yd,J0;function ZL(){if(J0)return Yd;J0=1,fr();var n=dr(),e=Me(),t=He(),r=JL(),i=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Yd=function(o){var a=o.entries;return o===i||t(i,o)&&a===i.entries||e(s,n(o))?r:a},Yd}var Xd,Z0;function QL(){return Z0||(Z0=1,Xd=ZL()),Xd}var ez=QL(),tz=re(ez);const ke=[];for(let n=0;n<256;++n)ke.push((n+256).toString(16).slice(1));function rz(n,e=0){return(ke[n[e+0]]+ke[n[e+1]]+ke[n[e+2]]+ke[n[e+3]]+"-"+ke[n[e+4]]+ke[n[e+5]]+"-"+ke[n[e+6]]+ke[n[e+7]]+"-"+ke[n[e+8]]+ke[n[e+9]]+"-"+ke[n[e+10]]+ke[n[e+11]]+ke[n[e+12]]+ke[n[e+13]]+ke[n[e+14]]+ke[n[e+15]]).toLowerCase()}let Jd;const iz=new Uint8Array(16);function nz(){if(!Jd){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Jd=crypto.getRandomValues.bind(crypto)}return Jd(iz)}const sz=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var Q0={randomUUID:sz};function oz(n,e,t){if(Q0.randomUUID&&!n)return Q0.randomUUID();n=n||{};const r=n.random??n.rng?.()??nz();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,rz(r)}function eO(n){return typeof n=="string"||typeof n=="number"}var tO={},rO={},Zd,iO;function az(){if(iO)return Zd;iO=1;var n=TypeError;return Zd=function(e,t){if(e<t)throw new n("Not enough arguments");return e},Zd}var Qd,nO;function wF(){if(nO)return Qd;nO=1;var n=Te(),e=Vs(),t=De(),r=FM(),i=qi(),s=Kn(),o=az(),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 Qd=function(l,d){var h=d?2:1;return u?function(c,f){var v=o(arguments.length,1)>h,p=t(c)?c:a(c),b=v?s(arguments,h):[],y=v?function(){e(p,this,b)}:p;return d?l(y,f):l(y)}:l},Qd}var sO;function uz(){if(sO)return rO;sO=1;var n=Y(),e=Te(),t=wF(),r=t(e.setInterval,!0);return n({global:!0,bind:!0,forced:e.setInterval!==r},{setInterval:r}),rO}var oO={},aO;function lz(){if(aO)return oO;aO=1;var n=Y(),e=Te(),t=wF(),r=t(e.setTimeout,!0);return n({global:!0,bind:!0,forced:e.setTimeout!==r},{setTimeout:r}),oO}var uO;function dz(){return uO||(uO=1,uz(),lz()),tO}var eh,lO;function hz(){if(lO)return eh;lO=1,dz();var n=Ae();return eh=n.setTimeout,eh}var th,dO;function cz(){return dO||(dO=1,th=hz()),th}var fz=cz(),vz=re(fz),hO={},rh,cO;function pz(){if(cO)return rh;cO=1;var n=Pe(),e=Un(),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 rh=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},rh}var fO;function gz(){if(fO)return hO;fO=1;var n=Y(),e=Ot(),t=_M(),r=Fi(),i=zr(),s=pz(),o=mM(),a=fm(),u=hm(),l=_F(),d=Js(),h=d("splice"),c=Math.max,f=Math.min;return n({target:"Array",proto:!0,forced:!h},{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(c(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}}),hO}var ih,vO;function yz(){if(vO)return ih;vO=1,gz();var n=ht();return ih=n("Array","splice"),ih}var nh,pO;function mz(){if(pO)return nh;pO=1;var n=He(),e=yz(),t=Array.prototype;return nh=function(r){var i=r.splice;return r===t||n(t,r)&&i===t.splice?e:i},nh}var sh,gO;function bz(){if(gO)return sh;gO=1;var n=mz();return sh=n,sh}var oh,yO;function _z(){return yO||(yO=1,oh=bz()),oh}var wz=_z(),Ez=re(wz);class Pm{constructor(e){tr(this,"_queue",[]),tr(this,"_timeout",null),tr(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 Pm(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=vz(()=>{this.flush()},this.delay))}flush(){var e,t;Ii(e=Ez(t=this._queue).call(t,0)).call(e,r=>{r.fn.apply(r.context||r.fn,r.args||[])})}}class Ns{constructor(){tr(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),tr(this,"subscribe",Ns.prototype.on),tr(this,"unsubscribe",Ns.prototype.off)}_trigger(e,t,r){var i;if(e==="*")throw new Error("Cannot trigger event *");Ii(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]=di(r=this._subscribers[e]).call(r,i=>i!==t)}get testLeakSubscribers(){return this._subscribers}}var mO={},bO;function Sz(){if(bO)return mO;bO=1;var n=Y(),e=Pe(),t=Gn();return n({target:"Object",stat:!0,sham:!e},{create:t}),mO}var ah,_O;function Oz(){if(_O)return ah;_O=1,Sz();var n=Ae(),e=n.Object;return ah=function(r,i){return e.create(r,i)},ah}var uh,wO;function Iz(){if(wO)return uh;wO=1;var n=Oz();return uh=n,uh}var lh,EO;function $z(){return EO||(EO=1,lh=Iz()),lh}var Tz=$z(),Pz=re(Tz),SO={},OO={},IO;function Rz(){if(IO)return OO;IO=1;var n=pF(),e=gF();return n("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),OO}var $O;function qz(){return $O||($O=1,Rz()),SO}var TO={},dh,PO;function Ur(){if(PO)return dh;PO=1;var n=xi(),e=TypeError;return dh=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")},dh}var hh,RO;function Vr(){if(RO)return hh;RO=1;var n=nt(),e=yF(),t=n("Set"),r=t.prototype;return hh={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:r},hh}var ch,qO;function Gr(){if(qO)return ch;qO=1;var n=tt();return ch=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},ch}var fh,CO;function rs(){if(CO)return fh;CO=1;var n=Gr();return fh=function(e,t,r){return r?n(e.keys(),t,!0):e.forEach(t)},fh}var vh,xO;function Rm(){if(xO)return vh;xO=1;var n=Vr(),e=rs(),t=n.Set,r=n.add;return vh=function(i){var s=new t;return e(i,function(o){r(s,o)}),s},vh}var ph,DO;function is(){return DO||(DO=1,ph=function(n){return n.size}),ph}var gh,AO;function Cz(){return AO||(AO=1,gh=function(n){return{iterator:n,next:n.next,done:!1}}),gh}var yh,MO;function Kr(){if(MO)return yh;MO=1;var n=Ut(),e=Vt(),t=tt(),r=Fi(),i=Cz(),s="Invalid size",o=RangeError,a=TypeError,u=Math.max,l=function(d,h){this.set=d,this.size=u(h,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)}},yh=function(d){e(d);var h=+d.size;if(h!==h)throw new a(s);var c=r(h);if(c<0)throw new o(s);return new l(d,c)},yh}var mh,FO;function xz(){if(FO)return mh;FO=1;var n=Ur(),e=Vr(),t=Rm(),r=is(),i=Kr(),s=rs(),o=Gr(),a=e.has,u=e.remove;return mh=function(d){var h=n(this),c=i(d),f=t(h);return r(h)<=c.size?s(h,function(v){c.includes(v)&&u(f,v)}):o(c.getIterator(),function(v){a(f,v)&&u(f,v)}),f},mh}var bh,NO;function Yr(){return NO||(NO=1,bh=function(){return!1}),bh}var kO;function Dz(){if(kO)return TO;kO=1;var n=Y(),e=xz(),t=ne(),r=Yr(),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}),TO}var BO={},_h,jO;function Az(){if(jO)return _h;jO=1;var n=Ur(),e=Vr(),t=is(),r=Kr(),i=rs(),s=Gr(),o=e.Set,a=e.add,u=e.has;return _h=function(d){var h=n(this),c=r(d),f=new o;return t(h)>c.size?s(c.getIterator(),function(v){u(h,v)&&a(f,v)}):i(h,function(v){c.includes(v)&&a(f,v)}),f},_h}var LO;function Mz(){if(LO)return BO;LO=1;var n=Y(),e=ne(),t=Az(),r=Yr(),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}),BO}var zO={},wh,WO;function Fz(){if(WO)return wh;WO=1;var n=Ur(),e=Vr().has,t=is(),r=Kr(),i=rs(),s=Gr(),o=$m();return wh=function(u){var l=n(this),d=r(u);if(t(l)<=d.size)return i(l,function(c){if(d.includes(c))return!1},!0)!==!1;var h=d.getIterator();return s(h,function(c){if(e(l,c))return o(h,"normal",!1)})!==!1},wh}var HO;function Nz(){if(HO)return zO;HO=1;var n=Y(),e=Fz(),t=Yr(),r=!t("isDisjointFrom",function(i){return!i});return n({target:"Set",proto:!0,real:!0,forced:r},{isDisjointFrom:e}),zO}var UO={},Eh,VO;function kz(){if(VO)return Eh;VO=1;var n=Ur(),e=is(),t=rs(),r=Kr();return Eh=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},Eh}var GO;function Bz(){if(GO)return UO;GO=1;var n=Y(),e=kz(),t=Yr(),r=!t("isSubsetOf",function(i){return i});return n({target:"Set",proto:!0,real:!0,forced:r},{isSubsetOf:e}),UO}var KO={},Sh,YO;function jz(){if(YO)return Sh;YO=1;var n=Ur(),e=Vr().has,t=is(),r=Kr(),i=Gr(),s=$m();return Sh=function(a){var u=n(this),l=r(a);if(t(u)<l.size)return!1;var d=l.getIterator();return i(d,function(h){if(!e(u,h))return s(d,"normal",!1)})!==!1},Sh}var XO;function Lz(){if(XO)return KO;XO=1;var n=Y(),e=jz(),t=Yr(),r=!t("isSupersetOf",function(i){return!i});return n({target:"Set",proto:!0,real:!0,forced:r},{isSupersetOf:e}),KO}var JO={},Oh,ZO;function zz(){if(ZO)return Oh;ZO=1;var n=Ur(),e=Vr(),t=Rm(),r=Kr(),i=Gr(),s=e.add,o=e.has,a=e.remove;return Oh=function(l){var d=n(this),h=r(l).getIterator(),c=t(d);return i(h,function(f){o(d,f)?a(c,f):s(c,f)}),c},Oh}var Ih,QO;function EF(){return QO||(QO=1,Ih=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}}),Ih}var eI;function Wz(){if(eI)return JO;eI=1;var n=Y(),e=zz(),t=EF(),r=Yr(),i=!r("symmetricDifference")||!t("symmetricDifference");return n({target:"Set",proto:!0,real:!0,forced:i},{symmetricDifference:e}),JO}var tI={},$h,rI;function Hz(){if(rI)return $h;rI=1;var n=Ur(),e=Vr().add,t=Rm(),r=Kr(),i=Gr();return $h=function(o){var a=n(this),u=r(o).getIterator(),l=t(a);return i(u,function(d){e(l,d)}),l},$h}var iI;function Uz(){if(iI)return tI;iI=1;var n=Y(),e=Hz(),t=EF(),r=Yr(),i=!r("union")||!t("union");return n({target:"Set",proto:!0,real:!0,forced:i},{union:e}),tI}var Th,nI;function Vz(){if(nI)return Th;nI=1,cr(),qz(),Dz(),Mz(),Nz(),Bz(),Lz(),Wz(),Uz(),io();var n=Ae();return Th=n.Set,Th}var Ph,sI;function Gz(){if(sI)return Ph;sI=1;var n=Vz();return fr(),Ph=n,Ph}var Rh,oI;function Kz(){return oI||(oI=1,Rh=Gz()),Rh}var Yz=Kz(),qh=re(Yz),Ch,aI;function Xz(){if(aI)return Ch;aI=1,cr(),io();var n=fF();return Ch=n,Ch}var xh,uI;function Jz(){if(uI)return xh;uI=1;var n=Xz();return fr(),xh=n,xh}var Dh,lI;function Zz(){if(lI)return Dh;lI=1;var n=Jz();return Dh=n,Dh}var Ah,dI;function Qz(){if(dI)return Ah;dI=1;var n=Zz();return Ah=n,Ah}var Mh,hI;function eW(){return hI||(hI=1,Mh=Qz()),Mh}var Fh,cI;function tW(){return cI||(cI=1,Fh=eW()),Fh}var rW=tW(),Nh=re(rW);class Tr{constructor(e){this._pairs=e}*[fi](){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 $t(e=[...this._pairs]).call(e,t=>t[0])}toItemArray(){var e;return $t(e=[...this._pairs]).call(e,t=>t[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){const e=Pz(null);for(const[t,r]of this._pairs)e[t]=r;return e}toMap(){return new mF(this._pairs)}toIdSet(){return new qh(this.toIdArray())}toItemSet(){return new qh(this.toItemArray())}cache(){return new Tr([...this._pairs])}distinct(e){const t=new qh;for(const[r,i]of this._pairs)t.add(e(i,r));return t}filter(e){const t=this._pairs;return new Tr({*[fi](){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 Tr({*[fi](){for(const[r,i]of t)yield[r,e(i,r)]}})}max(e){const t=Nh(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=Nh(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 Tr({[fi]:()=>{var t;return Nh(Gy(t=[...this._pairs]).call(t,(r,i)=>{let[s,o]=r,[a,u]=i;return e(o,u,s,a)}))}})}}function fI(n,e){var t=bF(n);if(JE){var r=JE(n);e&&(r=di(r).call(r,function(i){return dF(n,i).enumerable})),t.push.apply(t,r)}return t}function vI(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?Ii(t=fI(Object(i),!0)).call(t,function(s){tr(n,s,i[s])}):gS?Ij(n,gS(i)):Ii(r=fI(Object(i))).call(r,function(s){Pj(n,s,dF(i,s))})}return n}function iW(n,e){return n[e]==null&&(n[e]=oz()),n}class ks extends Ns{get idProp(){return this._idProp}constructor(e,t){super(),tr(this,"_queue",null),e&&!Sr(e)&&(t=e,e=[]),this._options=t||{},this._data=new mF,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=Pm.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(Sr(e)){const s=$t(e).call(e,o=>o[this._idProp]);if(eL(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 h=l,c=aL({},this._data.get(d)),f=this._updateItem(h);i.push(f),o.push(h),s.push(c)}else{const h=this._addItem(l);r.push(h)}};if(Sr(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 fL(r).call(r,i)}updateOnly(e,t){var r;Sr(e)||(e=[e]);const i=$t(r=$t(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=K2(o,a);return this._data.set(u,l),{id:u,oldData:o,updatedData:l}});if(i.length){const s={items:$t(i).call(i,o=>o.id),oldData:$t(i).call(i,o=>o.oldData),data:$t(i).call(i,o=>o.updatedData)};return this._trigger("update",s,t),s.items}else return[]}get(e,t){let r,i,s;eO(e)?(r=e,s=t):Sr(e)?(i=e,s=t):s=e;const o=s&&s.returnType==="Object"?"Object":"Array",a=s&&di(s),u=[];let l,d,h;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 c;d=[...oi(c=this._data).call(c)];for(let f=0,v=d.length;f<v;f++)h=d[f],l=this._data.get(h),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&&di(e),i=e&&e.order,s=[...oi(t).call(t)],o=[];if(r)if(i){const a=[];for(let u=0,l=s.length;u<l;u++){const d=s[u],h=this._data.get(d);h!=null&&r(h)&&a.push(h)}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&&di(t),i=this._data,s=[...oi(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&&di(t),i=[],s=this._data,o=[...oi(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&&VB(r=Sr(t)?t:bF(t)).call(r,(i,s)=>(i[s]=e[s],i),{})}_sort(e,t){if(typeof t=="string"){const r=t;Gy(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")Gy(e).call(e,t);else throw new TypeError("Order must be a function or a string")}remove(e,t){const r=[],i=[],s=Sr(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(eO(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=[...oi(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 B0(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 B0(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=[...oi(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 h=!1;for(let c=0;c<s;c++)if(i[c]==d){h=!0;break}!h&&d!==void 0&&(i[s]=d,s++)}return i}_addItem(e){const t=iW(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,vI(vI({},r),e)),t}stream(e){if(e){const r=this._data;return new Tr({*[fi](){for(const i of e){const s=r.get(i);s!=null&&(yield[i,s])}}})}else{var t;return new Tr({[fi]:NB(t=tz(this._data)).call(t,this._data)})}}get testLeakData(){return this._data}get testLeakIdProp(){return this._idProp}get testLeakOptions(){return this._options}get testLeakQueue(){return this._queue}set testLeakQueue(e){this._queue=e}}function nW(n,e){return typeof e=="object"&&e!==null&&n===e.idProp&&typeof e.add=="function"&&typeof e.clear=="function"&&typeof e.distinct=="function"&&typeof Ii(e)=="function"&&typeof e.get=="function"&&typeof e.getDataSet=="function"&&typeof e.getIds=="function"&&typeof e.length=="number"&&typeof $t(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 SF(n,e){return typeof e=="object"&&e!==null&&n===e.idProp&&typeof Ii(e)=="function"&&typeof e.get=="function"&&typeof e.getDataSet=="function"&&typeof e.getIds=="function"&&typeof e.length=="number"&&typeof $t(e)=="function"&&typeof e.off=="function"&&typeof e.on=="function"&&typeof e.stream=="function"&&nW(n,e.getDataSet())}console.warn("You're running a development build.");/**
|
|
57
|
-
* vis-network
|
|
58
|
-
* https://visjs.github.io/vis-network/
|
|
59
|
-
*
|
|
60
|
-
* A dynamic, browser-based visualization library.
|
|
61
|
-
*
|
|
62
|
-
* @version 10.0.1
|
|
63
|
-
* @date 2025-07-13T08:15:32.270Z
|
|
64
|
-
*
|
|
65
|
-
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
66
|
-
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
|
67
|
-
*
|
|
68
|
-
* @license
|
|
69
|
-
* vis.js is dual licensed under both
|
|
70
|
-
*
|
|
71
|
-
* 1. The Apache 2.0 License
|
|
72
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
73
|
-
*
|
|
74
|
-
* and
|
|
75
|
-
*
|
|
76
|
-
* 2. The MIT License
|
|
77
|
-
* http://opensource.org/licenses/MIT
|
|
78
|
-
*
|
|
79
|
-
* vis.js may be distributed under either license.
|
|
80
|
-
*/var pI=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function K(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var gI={},fn,yI;function pe(){if(yI)return fn;yI=1;var n=function(e){return e&&e.Math===Math&&e};return fn=n(typeof globalThis=="object"&&globalThis)||n(typeof window=="object"&&window)||n(typeof self=="object"&&self)||n(typeof pI=="object"&&pI)||n(typeof fn=="object"&&fn)||(function(){return this})()||Function("return this")(),fn}var kh,mI;function ee(){return mI||(mI=1,kh=function(n){try{return!!n()}catch{return!0}}),kh}var Bh,bI;function ns(){if(bI)return Bh;bI=1;var n=ee();return Bh=!n(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Bh}var jh,_I;function ao(){if(_I)return jh;_I=1;var n=ns(),e=Function.prototype,t=e.apply,r=e.call;return jh=typeof Reflect=="object"&&Reflect.apply||(n?r.bind(t):function(){return r.apply(t,arguments)}),jh}var Lh,wI;function te(){if(wI)return Lh;wI=1;var n=ns(),e=Function.prototype,t=e.call,r=n&&e.bind.bind(t,t);return Lh=n?r:function(i){return function(){return t.apply(i,arguments)}},Lh}var zh,EI;function xt(){if(EI)return zh;EI=1;var n=te(),e=n({}.toString),t=n("".slice);return zh=function(r){return t(e(r),8,-1)},zh}var Wh,SI;function qm(){if(SI)return Wh;SI=1;var n=xt(),e=te();return Wh=function(t){if(n(t)==="Function")return e(t)},Wh}var Hh,OI;function Fe(){if(OI)return Hh;OI=1;var n=typeof document=="object"&&document.all;return Hh=typeof n>"u"&&n!==void 0?function(e){return typeof e=="function"||e===n}:function(e){return typeof e=="function"},Hh}var Uh={},Vh,II;function Se(){if(II)return Vh;II=1;var n=ee();return Vh=!n(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Vh}var Gh,$I;function it(){if($I)return Gh;$I=1;var n=ns(),e=Function.prototype.call;return Gh=n?e.bind(e):function(){return e.apply(e,arguments)},Gh}var Kh={},TI;function uo(){if(TI)return Kh;TI=1;var n={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!n.call({1:2},1);return Kh.f=t?function(i){var s=e(this,i);return!!s&&s.enumerable}:n,Kh}var Yh,PI;function ss(){return PI||(PI=1,Yh=function(n,e){return{enumerable:!(n&1),configurable:!(n&2),writable:!(n&4),value:e}}),Yh}var Xh,RI;function lo(){if(RI)return Xh;RI=1;var n=te(),e=ee(),t=xt(),r=Object,i=n("".split);return Xh=e(function(){return!r("z").propertyIsEnumerable(0)})?function(s){return t(s)==="String"?i(s,""):r(s)}:r,Xh}var Jh,qI;function ji(){return qI||(qI=1,Jh=function(n){return n==null}),Jh}var Zh,CI;function Gt(){if(CI)return Zh;CI=1;var n=ji(),e=TypeError;return Zh=function(t){if(n(t))throw new e("Can't call method on "+t);return t},Zh}var Qh,xI;function It(){if(xI)return Qh;xI=1;var n=lo(),e=Gt();return Qh=function(t){return n(e(t))},Qh}var ec,DI;function Ne(){if(DI)return ec;DI=1;var n=Fe();return ec=function(e){return typeof e=="object"?e!==null:n(e)},ec}var tc,AI;function se(){return AI||(AI=1,tc={}),tc}var rc,MI;function st(){if(MI)return rc;MI=1;var n=se(),e=pe(),t=Fe(),r=function(i){return t(i)?i:void 0};return rc=function(i,s){return arguments.length<2?r(n[i])||r(e[i]):n[i]&&n[i][s]||e[i]&&e[i][s]},rc}var ic,FI;function Re(){if(FI)return ic;FI=1;var n=te();return ic=n({}.isPrototypeOf),ic}var nc,NI;function Li(){if(NI)return nc;NI=1;var n=pe(),e=n.navigator,t=e&&e.userAgent;return nc=t?String(t):"",nc}var sc,kI;function os(){if(kI)return sc;kI=1;var n=pe(),e=Li(),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]))),sc=a,sc}var oc,BI;function zi(){if(BI)return oc;BI=1;var n=os(),e=ee(),t=pe(),r=t.String;return oc=!!Object.getOwnPropertySymbols&&!e(function(){var i=Symbol("symbol detection");return!r(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&n&&n<41}),oc}var ac,jI;function OF(){if(jI)return ac;jI=1;var n=zi();return ac=n&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ac}var uc,LI;function as(){if(LI)return uc;LI=1;var n=st(),e=Fe(),t=Re(),r=OF(),i=Object;return uc=r?function(s){return typeof s=="symbol"}:function(s){var o=n("Symbol");return e(o)&&t(o.prototype,i(s))},uc}var lc,zI;function Wi(){if(zI)return lc;zI=1;var n=String;return lc=function(e){try{return n(e)}catch{return"Object"}},lc}var dc,WI;function Kt(){if(WI)return dc;WI=1;var n=Fe(),e=Wi(),t=TypeError;return dc=function(r){if(n(r))return r;throw new t(e(r)+" is not a function")},dc}var hc,HI;function Cm(){if(HI)return hc;HI=1;var n=Kt(),e=ji();return hc=function(t,r){var i=t[r];return e(i)?void 0:n(i)},hc}var cc,UI;function sW(){if(UI)return cc;UI=1;var n=it(),e=Fe(),t=Ne(),r=TypeError;return cc=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")},cc}var fc={exports:{}},vc,VI;function Hi(){return VI||(VI=1,vc=!0),vc}var pc,GI;function oW(){if(GI)return pc;GI=1;var n=pe(),e=Object.defineProperty;return pc=function(t,r){try{e(n,t,{value:r,configurable:!0,writable:!0})}catch{n[t]=r}return r},pc}var KI;function xm(){if(KI)return fc.exports;KI=1;var n=Hi(),e=pe(),t=oW(),r="__core-js_shared__",i=fc.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"}),fc.exports}var gc,YI;function Ui(){if(YI)return gc;YI=1;var n=xm();return gc=function(e,t){return n[e]||(n[e]=t||{})},gc}var yc,XI;function ft(){if(XI)return yc;XI=1;var n=Gt(),e=Object;return yc=function(t){return e(n(t))},yc}var mc,JI;function ze(){if(JI)return mc;JI=1;var n=te(),e=ft(),t=n({}.hasOwnProperty);return mc=Object.hasOwn||function(i,s){return t(e(i),s)},mc}var bc,ZI;function ho(){if(ZI)return bc;ZI=1;var n=te(),e=0,t=Math.random(),r=n(1.1.toString);return bc=function(i){return"Symbol("+(i===void 0?"":i)+")_"+r(++e+t,36)},bc}var _c,QI;function qe(){if(QI)return _c;QI=1;var n=pe(),e=Ui(),t=ze(),r=ho(),i=zi(),s=OF(),o=n.Symbol,a=e("wks"),u=s?o.for||o:o&&o.withoutSetter||r;return _c=function(l){return t(a,l)||(a[l]=i&&t(o,l)?o[l]:u("Symbol."+l)),a[l]},_c}var wc,e$;function IF(){if(e$)return wc;e$=1;var n=it(),e=Ne(),t=as(),r=Cm(),i=sW(),s=qe(),o=TypeError,a=s("toPrimitive");return wc=function(u,l){if(!e(u)||t(u))return u;var d=r(u,a),h;if(d){if(l===void 0&&(l="default"),h=n(d,u,l),!e(h)||t(h))return h;throw new o("Can't convert object to primitive value")}return l===void 0&&(l="number"),i(u,l)},wc}var Ec,t$;function Dm(){if(t$)return Ec;t$=1;var n=IF(),e=as();return Ec=function(t){var r=n(t,"string");return e(r)?r:r+""},Ec}var Sc,r$;function $F(){if(r$)return Sc;r$=1;var n=pe(),e=Ne(),t=n.document,r=e(t)&&e(t.createElement);return Sc=function(i){return r?t.createElement(i):{}},Sc}var Oc,i$;function TF(){if(i$)return Oc;i$=1;var n=Se(),e=ee(),t=$F();return Oc=!n&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),Oc}var n$;function co(){if(n$)return Uh;n$=1;var n=Se(),e=it(),t=uo(),r=ss(),i=It(),s=Dm(),o=ze(),a=TF(),u=Object.getOwnPropertyDescriptor;return Uh.f=n?u:function(d,h){if(d=i(d),h=s(h),a)try{return u(d,h)}catch{}if(o(d,h))return r(!e(t.f,d,h),d[h])},Uh}var Ic,s$;function aW(){if(s$)return Ic;s$=1;var n=ee(),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 Ic=r,Ic}var $c,o$;function fo(){if(o$)return $c;o$=1;var n=qm(),e=Kt(),t=ns(),r=n(n.bind);return $c=function(i,s){return e(i),s===void 0?i:t?r(i,s):function(){return i.apply(s,arguments)}},$c}var Tc={},Pc,a$;function PF(){if(a$)return Pc;a$=1;var n=Se(),e=ee();return Pc=n&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Pc}var Rc,u$;function Dt(){if(u$)return Rc;u$=1;var n=Ne(),e=String,t=TypeError;return Rc=function(r){if(n(r))return r;throw new t(e(r)+" is not an object")},Rc}var l$;function vt(){if(l$)return Tc;l$=1;var n=Se(),e=TF(),t=PF(),r=Dt(),i=Dm(),s=TypeError,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",d="writable";return Tc.f=n?t?function(c,f,v){if(r(c),f=i(f),r(v),typeof c=="function"&&f==="prototype"&&"value"in v&&d in v&&!v[d]){var p=a(c,f);p&&p[d]&&(c[f]=v.value,v={configurable:l in v?v[l]:p[l],enumerable:u in v?v[u]:p[u],writable:!1})}return o(c,f,v)}:o:function(c,f,v){if(r(c),f=i(f),r(v),e)try{return o(c,f,v)}catch{}if("get"in v||"set"in v)throw new s("Accessors not supported");return"value"in v&&(c[f]=v.value),c},Tc}var qc,d$;function Vi(){if(d$)return qc;d$=1;var n=Se(),e=vt(),t=ss();return qc=n?function(r,i,s){return e.f(r,i,t(1,s))}:function(r,i,s){return r[i]=s,r},qc}var Cc,h$;function z(){if(h$)return Cc;h$=1;var n=pe(),e=ao(),t=qm(),r=Fe(),i=co().f,s=aW(),o=se(),a=fo(),u=Vi(),l=ze(),d=function(h){var c=function(f,v,p){if(this instanceof c){switch(arguments.length){case 0:return new h;case 1:return new h(f);case 2:return new h(f,v)}return new h(f,v,p)}return e(h,this,arguments)};return c.prototype=h.prototype,c};return Cc=function(h,c){var f=h.target,v=h.global,p=h.stat,b=h.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 c)m=s(v?I:f+(p?".":"#")+I,h.forced),w=!m&&y&&l(y,I),E=g[I],w&&(h.dontCallGetSet?(P=i(y,I),$=P&&P.value):$=y[I]),_=w&&$?$:c[I],!(!m&&!b&&typeof E==typeof _)&&(h.bind&&w?T=a(_,n):h.wrap&&w?T=d(_):b&&r(_)?T=t(_):T=_,(h.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,_),h.real&&S&&(m||!S[I])&&u(S,I,_)))},Cc}var xc,c$;function uW(){if(c$)return xc;c$=1;var n=Math.ceil,e=Math.floor;return xc=Math.trunc||function(r){var i=+r;return(i>0?e:n)(i)},xc}var Dc,f$;function Gi(){if(f$)return Dc;f$=1;var n=uW();return Dc=function(e){var t=+e;return t!==t||t===0?0:n(t)},Dc}var Ac,v$;function vo(){if(v$)return Ac;v$=1;var n=Gi(),e=Math.max,t=Math.min;return Ac=function(r,i){var s=n(r);return s<0?e(s+i,0):t(s,i)},Ac}var Mc,p$;function RF(){if(p$)return Mc;p$=1;var n=Gi(),e=Math.min;return Mc=function(t){var r=n(t);return r>0?e(r,9007199254740991):0},Mc}var Fc,g$;function Yt(){if(g$)return Fc;g$=1;var n=RF();return Fc=function(e){return n(e.length)},Fc}var Nc,y$;function Am(){if(y$)return Nc;y$=1;var n=It(),e=vo(),t=Yt(),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),h;if(i&&o!==o){for(;l>d;)if(h=u[d++],h!==h)return!0}else for(;l>d;d++)if((i||d in u)&&u[d]===o)return i||d||0;return!i&&-1}};return Nc={includes:r(!0),indexOf:r(!1)},Nc}var kc,m$;function us(){return m$||(m$=1,kc={}),kc}var Bc,b$;function qF(){if(b$)return Bc;b$=1;var n=te(),e=ze(),t=It(),r=Am().indexOf,i=us(),s=n([].push);return Bc=function(o,a){var u=t(o),l=0,d=[],h;for(h in u)!e(i,h)&&e(u,h)&&s(d,h);for(;a.length>l;)e(u,h=a[l++])&&(~r(d,h)||s(d,h));return d},Bc}var jc,_$;function Mm(){return _$||(_$=1,jc=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),jc}var Lc,w$;function ls(){if(w$)return Lc;w$=1;var n=qF(),e=Mm();return Lc=Object.keys||function(r){return n(r,e)},Lc}var zc={},E$;function po(){return E$||(E$=1,zc.f=Object.getOwnPropertySymbols),zc}var Wc,S$;function lW(){if(S$)return Wc;S$=1;var n=Se(),e=te(),t=it(),r=ee(),i=ls(),s=po(),o=uo(),a=ft(),u=lo(),l=Object.assign,d=Object.defineProperty,h=e([].concat);return Wc=!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 c={},f={},v=Symbol("assign detection"),p="abcdefghijklmnopqrst";return c[v]=7,p.split("").forEach(function(b){f[b]=b}),l({},c)[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?h(i(m),g(m)):i(m),O=w.length,I=0,_;O>I;)_=w[I++],(!n||t(S,m,_))&&(p[_]=m[_]);return p}:l,Wc}var O$;function dW(){if(O$)return gI;O$=1;var n=z(),e=lW();return n({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e}),gI}var Hc,I$;function hW(){if(I$)return Hc;I$=1,dW();var n=se();return Hc=n.Object.assign,Hc}var Uc,$$;function cW(){if($$)return Uc;$$=1;var n=hW();return Uc=n,Uc}var Vc,T$;function fW(){return T$||(T$=1,Vc=cW()),Vc}var vW=fW(),je=K(vW),P$={},Gc,R$;function Ki(){if(R$)return Gc;R$=1;var n=te();return Gc=n([].slice),Gc}var Kc,q$;function pW(){if(q$)return Kc;q$=1;var n=te(),e=Kt(),t=Ne(),r=ze(),i=Ki(),s=ns(),o=Function,a=n([].concat),u=n([].join),l={},d=function(h,c,f){if(!r(l,c)){for(var v=[],p=0;p<c;p++)v[p]="a["+p+"]";l[c]=o("C,a","return new C("+u(v,",")+")")}return l[c](h,f)};return Kc=s?o.bind:function(c){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(c,g)};return t(v)&&(b.prototype=v),b},Kc}var C$;function gW(){if(C$)return P$;C$=1;var n=z(),e=pW();return n({target:"Function",proto:!0,forced:Function.bind!==e},{bind:e}),P$}var Yc,x$;function We(){if(x$)return Yc;x$=1;var n=pe(),e=se();return Yc=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]},Yc}var Xc,D$;function yW(){if(D$)return Xc;D$=1,gW();var n=We();return Xc=n("Function","bind"),Xc}var Jc,A$;function mW(){if(A$)return Jc;A$=1;var n=Re(),e=yW(),t=Function.prototype;return Jc=function(r){var i=r.bind;return r===t||n(t,r)&&i===t.bind?e:i},Jc}var Zc,M$;function bW(){if(M$)return Zc;M$=1;var n=mW();return Zc=n,Zc}var Qc,F$;function _W(){return F$||(F$=1,Qc=bW()),Qc}var wW=_W(),D=K(wW);function Fm(n,e,t,r){n.beginPath(),n.arc(e,t,r,0,2*Math.PI,!1),n.closePath()}function EW(n,e,t,r){n.beginPath(),n.rect(e-r,t-r,r*2,r*2),n.closePath()}function SW(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 OW(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 IW(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 $W(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 CF(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 Ky(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,h=t+i/2;n.beginPath(),n.moveTo(e,h),n.bezierCurveTo(e,h-a,d-o,t,d,t),n.bezierCurveTo(d+o,t,u,h-a,u,h),n.bezierCurveTo(u,h+a,d+o,l,d,l),n.bezierCurveTo(d-o,l,e,h+a,e,h),n.closePath()}function xF(n,e,t,r,i){const s=.3333333333333333,o=r,a=i*s,u=.5522848,l=o/2*u,d=a/2*u,h=e+o,c=t+a,f=e+o/2,v=t+a/2,p=t+(i-a/2),b=t+i;n.beginPath(),n.moveTo(h,v),n.bezierCurveTo(h,v+d,f+l,c,f,c),n.bezierCurveTo(f-l,c,e,v+d,e,v),n.bezierCurveTo(e,v-d,f-l,t,f,t),n.bezierCurveTo(f+l,t,h,v-d,h,v),n.lineTo(h,p),n.bezierCurveTo(h,p+d,f+l,b,f,b),n.bezierCurveTo(f-l,b,e,p+d,e,p),n.lineTo(e,v)}function DF(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),h=0,c=!0,f=0,v=+s[0];for(;d>=.1;)v=+s[h++%o],v>d&&(v=d),f=Math.sqrt(v*v/(1+l*l)),f=a<0?-f:f,e+=f,t+=l*f,c===!0?n.lineTo(e,t):n.moveTo(e,t),d-=v,c=!c}function TW(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 N$={circle:Fm,dashedLine:DF,database:xF,diamond:$W,ellipse:Ky,ellipse_vis:Ky,hexagon:TW,roundRect:CF,square:EW,star:IW,triangle:SW,triangleDown:OW};function PW(n){return Object.prototype.hasOwnProperty.call(N$,n)?N$[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 ef={exports:{}},k$;function RW(){return k$||(k$=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}})(ef)),ef.exports}var qW=RW(),AF=K(qW);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
|
|
81
|
-
* http://naver.github.io/egjs
|
|
82
|
-
*
|
|
83
|
-
* Forked By Naver egjs
|
|
84
|
-
* Copyright (c) hammerjs
|
|
85
|
-
* Licensed under the MIT license */function St(){return St=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},St.apply(this,arguments)}function pt(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}function Is(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}var Yy;typeof Object.assign!="function"?Yy=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}:Yy=Object.assign;var Nr=Yy,B$=["","webkit","Moz","MS","ms","o"],CW=typeof document>"u"?{style:{}}:document.createElement("div"),xW="function",vi=Math.round,kr=Math.abs,Nm=Date.now;function go(n,e){for(var t,r,i=e[0].toUpperCase()+e.slice(1),s=0;s<B$.length;){if(t=B$[s],r=t?t+i:e,r in n)return r;s++}}var jt;typeof window>"u"?jt={}:jt=window;var MF=go(CW.style,"touchAction"),FF=MF!==void 0;function DW(){if(!FF)return!1;var n={},e=jt.CSS&&jt.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(t){return n[t]=e?jt.CSS.supports("touch-action",t):!0}),n}var NF="compute",kF="auto",Xy="manipulation",xr="none",Dn="pan-x",An="pan-y",$s=DW(),AW=/mobile|tablet|ip(ad|hone|od)|android/i,BF="ontouchstart"in jt,MW=go(jt,"PointerEvent")!==void 0,FW=BF&&AW.test(navigator.userAgent),ds="touch",NW="pen",km="mouse",kW="kinect",BW=25,Je=1,Xr=2,$e=4,et=8,Bs=1,hs=2,cs=4,fs=8,$i=16,Ct=hs|cs,Dr=fs|$i,jF=Ct|Dr,LF=["x","y"],js=["clientX","clientY"];function Lt(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 yo(n,e){return typeof n===xW?n.apply(e&&e[0]||void 0,e):n}function Pr(n,e){return n.indexOf(e)>-1}function jW(n){if(Pr(n,xr))return xr;var e=Pr(n,Dn),t=Pr(n,An);return e&&t?xr:e||t?e?Dn:An:Pr(n,Xy)?Xy:kF}var zF=(function(){function n(t,r){this.manager=t,this.set(r)}var e=n.prototype;return e.set=function(r){r===NF&&(r=this.compute()),FF&&this.manager.element.style&&$s[r]&&(this.manager.element.style[MF]=r),this.actions=r.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var r=[];return Lt(this.manager.recognizers,function(i){yo(i.options.enable,[i])&&(r=r.concat(i.getTouchAction()))}),jW(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=Pr(o,xr)&&!$s[xr],u=Pr(o,An)&&!$s[An],l=Pr(o,Dn)&&!$s[Dn];if(a){var d=r.pointers.length===1,h=r.distance<2,c=r.deltaTime<250;if(d&&h&&c)return}if(!(l&&u)&&(a||u&&s&Ct||l&&s&Dr))return this.preventSrc(i)},e.preventSrc=function(r){this.manager.session.prevented=!0,r.preventDefault()},n})();function Bm(n,e){for(;n;){if(n===e)return!0;n=n.parentNode}return!1}function WF(n){var e=n.length;if(e===1)return{x:vi(n[0].clientX),y:vi(n[0].clientY)};for(var t=0,r=0,i=0;i<e;)t+=n[i].clientX,r+=n[i].clientY,i++;return{x:vi(t/e),y:vi(r/e)}}function j$(n){for(var e=[],t=0;t<n.pointers.length;)e[t]={clientX:vi(n.pointers[t].clientX),clientY:vi(n.pointers[t].clientY)},t++;return{timeStamp:Nm(),pointers:e,center:WF(e),deltaX:n.deltaX,deltaY:n.deltaY}}function Ls(n,e,t){t||(t=LF);var r=e[t[0]]-n[t[0]],i=e[t[1]]-n[t[1]];return Math.sqrt(r*r+i*i)}function Jy(n,e,t){t||(t=LF);var r=e[t[0]]-n[t[0]],i=e[t[1]]-n[t[1]];return Math.atan2(i,r)*180/Math.PI}function HF(n,e){return n===e?Bs:kr(n)>=kr(e)?n<0?hs:cs:e<0?fs:$i}function LW(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 UF(n,e,t){return{x:e/n||0,y:t/n||0}}function zW(n,e){return Ls(e[0],e[1],js)/Ls(n[0],n[1],js)}function WW(n,e){return Jy(e[1],e[0],js)+Jy(n[1],n[0],js)}function HW(n,e){var t=n.lastInterval||e,r=e.timeStamp-t.timeStamp,i,s,o,a;if(e.eventType!==et&&(r>BW||t.velocity===void 0)){var u=e.deltaX-t.deltaX,l=e.deltaY-t.deltaY,d=UF(r,u,l);s=d.x,o=d.y,i=kr(d.x)>kr(d.y)?d.x:d.y,a=HF(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 UW(n,e){var t=n.session,r=e.pointers,i=r.length;t.firstInput||(t.firstInput=j$(e)),i>1&&!t.firstMultiple?t.firstMultiple=j$(e):i===1&&(t.firstMultiple=!1);var s=t.firstInput,o=t.firstMultiple,a=o?o.center:s.center,u=e.center=WF(r);e.timeStamp=Nm(),e.deltaTime=e.timeStamp-s.timeStamp,e.angle=Jy(a,u),e.distance=Ls(a,u),LW(t,e),e.offsetDirection=HF(e.deltaX,e.deltaY);var l=UF(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=kr(l.x)>kr(l.y)?l.x:l.y,e.scale=o?zW(o.pointers,r):1,e.rotation=o?WW(o.pointers,r):0,e.maxPointers=t.prevInput?e.pointers.length>t.prevInput.maxPointers?e.pointers.length:t.prevInput.maxPointers:e.pointers.length,HW(t,e);var d=n.element,h=e.srcEvent,c;h.composedPath?c=h.composedPath()[0]:h.path?c=h.path[0]:c=h.target,Bm(c,d)&&(d=c),e.target=d}function VW(n,e,t){var r=t.pointers.length,i=t.changedPointers.length,s=e&Je&&r-i===0,o=e&($e|et)&&r-i===0;t.isFirst=!!s,t.isFinal=!!o,s&&(n.session={}),t.eventType=e,UW(n,t),n.emit("hammer.input",t),n.recognize(t),n.session.prevInput=t}function Mn(n){return n.trim().split(/\s+/g)}function _n(n,e,t){Lt(Mn(e),function(r){n.addEventListener(r,t,!1)})}function wn(n,e,t){Lt(Mn(e),function(r){n.removeEventListener(r,t,!1)})}function L$(n){var e=n.ownerDocument||n;return e.defaultView||e.parentWindow||window}var Yi=(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){yo(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(L$(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&wn(this.element,this.evEl,this.domHandler),this.evTarget&&wn(this.target,this.evTarget,this.domHandler),this.evWin&&wn(L$(this.element),this.evWin,this.domHandler)},n})();function Br(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 GW={pointerdown:Je,pointermove:Xr,pointerup:$e,pointercancel:et,pointerout:et},KW={2:ds,3:NW,4:km,5:kW},VF="pointerdown",GF="pointermove pointerup pointercancel";jt.MSPointerEvent&&!jt.PointerEvent&&(VF="MSPointerDown",GF="MSPointerMove MSPointerUp MSPointerCancel");var KF=(function(n){pt(e,n);function e(){var r,i=e.prototype;return i.evEl=VF,i.evWin=GF,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=GW[a],l=KW[i.pointerType]||i.pointerType,d=l===ds,h=Br(s,i.pointerId,"pointerId");u&Je&&(i.button===0||d)?h<0&&(s.push(i),h=s.length-1):u&($e|et)&&(o=!0),!(h<0)&&(s[h]=i,this.callback(this.manager,u,{pointers:s,changedPointers:[i],pointerType:l,srcEvent:i}),o&&s.splice(h,1))},e})(Yi);function Fn(n){return Array.prototype.slice.call(n,0)}function jm(n,e,t){for(var r=[],i=[],s=0;s<n.length;){var o=e?n[s][e]:n[s];Br(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 YW={touchstart:Je,touchmove:Xr,touchend:$e,touchcancel:et},XW="touchstart touchmove touchend touchcancel",Lm=(function(n){pt(e,n);function e(){var r;return e.prototype.evTarget=XW,r=n.apply(this,arguments)||this,r.targetIds={},r}var t=e.prototype;return t.handler=function(i){var s=YW[i.type],o=JW.call(this,i,s);o&&this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:ds,srcEvent:i})},e})(Yi);function JW(n,e){var t=Fn(n.touches),r=this.targetIds;if(e&(Je|Xr)&&t.length===1)return r[t[0].identifier]=!0,[t,t];var i,s,o=Fn(n.changedTouches),a=[],u=this.target;if(s=t.filter(function(l){return Bm(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|et)&&delete r[o[i].identifier],i++;if(a.length)return[jm(s.concat(a),"identifier",!0),a]}var ZW={mousedown:Je,mousemove:Xr,mouseup:$e},QW="mousedown",eH="mousemove mouseup",zm=(function(n){pt(e,n);function e(){var r,i=e.prototype;return i.evEl=QW,i.evWin=eH,r=n.apply(this,arguments)||this,r.pressed=!1,r}var t=e.prototype;return t.handler=function(i){var s=ZW[i.type];s&Je&&i.button===0&&(this.pressed=!0),s&Xr&&i.which!==1&&(s=$e),this.pressed&&(s&$e&&(this.pressed=!1),this.callback(this.manager,s,{pointers:[i],changedPointers:[i],pointerType:km,srcEvent:i}))},e})(Yi),tH=2500,z$=25;function W$(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,tH)}}function rH(n,e){n&Je?(this.primaryTouch=e.changedPointers[0].identifier,W$.call(this,e)):n&($e|et)&&W$.call(this,e)}function iH(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<=z$&&o<=z$)return!0}return!1}var YF=(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===ds,h=l.pointerType===km;if(!(h&&l.sourceCapabilities&&l.sourceCapabilities.firesTouchEvents)){if(d)rH.call(Is(Is(o)),u,l);else if(h&&iH.call(Is(Is(o)),l))return;o.callback(a,u,l)}},o.touch=new Lm(o.manager,o.handler),o.mouse=new zm(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})(Yi);return n})();function nH(n){var e,t=n.options.inputClass;return t?e=t:MW?e=KF:FW?e=Lm:BF?e=YF:e=zm,new e(n,VW)}function pi(n,e,t){return Array.isArray(n)?(Lt(n,t[e],t),!0):!1}var qs=1,lt=2,Ti=4,ir=8,zt=ir,Nn=16,Pt=32,sH=1;function oH(){return sH++}function Ts(n,e){var t=e.manager;return t?t.get(n):n}function H$(n){return n&Nn?"cancel":n&ir?"end":n&Ti?"move":n<?"start":""}var vs=(function(){function n(t){t===void 0&&(t={}),this.options=St({enable:!0},t),this.id=oH(),this.manager=null,this.state=qs,this.simultaneous={},this.requireFail=[]}var e=n.prototype;return e.set=function(r){return Nr(this.options,r),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(r){if(pi(r,"recognizeWith",this))return this;var i=this.simultaneous;return r=Ts(r,this),i[r.id]||(i[r.id]=r,r.recognizeWith(this)),this},e.dropRecognizeWith=function(r){return pi(r,"dropRecognizeWith",this)?this:(r=Ts(r,this),delete this.simultaneous[r.id],this)},e.requireFailure=function(r){if(pi(r,"requireFailure",this))return this;var i=this.requireFail;return r=Ts(r,this),Br(i,r)===-1&&(i.push(r),r.requireFailure(this)),this},e.dropRequireFailure=function(r){if(pi(r,"dropRequireFailure",this))return this;r=Ts(r,this);var i=Br(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<ir&&o(i.options.event+H$(s)),o(i.options.event),r.additionalEvent&&o(r.additionalEvent),s>=ir&&o(i.options.event+H$(s))},e.tryEmit=function(r){if(this.canEmit())return this.emit(r);this.state=Pt},e.canEmit=function(){for(var r=0;r<this.requireFail.length;){if(!(this.requireFail[r].state&(Pt|qs)))return!1;r++}return!0},e.recognize=function(r){var i=Nr({},r);if(!yo(this.options.enable,[this,i])){this.reset(),this.state=Pt;return}this.state&(zt|Nn|Pt)&&(this.state=qs),this.state=this.process(i),this.state&(lt|Ti|ir|Nn)&&this.tryEmit(i)},e.process=function(r){},e.getTouchAction=function(){},e.reset=function(){},n})(),Zy=(function(n){pt(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,St({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[Xy]},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,h=!this.pCenter||Ls(this.pCenter,i.center)<o.posThreshold;this.pTime=i.timeStamp,this.pCenter=i.center,!h||!d?this.count=1:this.count+=1,this._input=i;var c=this.count%o.taps;if(c===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){s.state=zt,s.tryEmit()},o.interval),lt):zt}return Pt},t.failTimeout=function(){var i=this;return this._timer=setTimeout(function(){i.state=Pt},this.options.interval),Pt},t.reset=function(){clearTimeout(this._timer)},t.emit=function(){this.state===zt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e})(vs),Pi=(function(n){pt(e,n);function e(r){return r===void 0&&(r={}),n.call(this,St({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&(lt|Ti),u=this.attrTest(i);return a&&(o&et||!u)?s|Nn:a||u?o&$e?s|ir:s<?s|Ti:lt:Pt},e})(vs);function XF(n){return n===$i?"down":n===fs?"up":n===hs?"left":n===cs?"right":""}var Wm=(function(n){pt(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,St({event:"pan",threshold:10,pointers:1,direction:jF},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&Ct&&s.push(An),i&Dr&&s.push(Dn),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&Ct?(u=l===0?Bs:l<0?hs:cs,o=l!==this.pX,a=Math.abs(i.deltaX)):(u=d===0?Bs:d<0?fs:$i,o=d!==this.pY,a=Math.abs(i.deltaY))),i.direction=u,o&&a>s.threshold&&u&s.direction},t.attrTest=function(i){return Pi.prototype.attrTest.call(this,i)&&(this.state<||!(this.state<)&&this.directionTest(i))},t.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var s=XF(i.direction);s&&(i.additionalEvent=this.options.event+s),n.prototype.emit.call(this,i)},e})(Pi),JF=(function(n){pt(e,n);function e(r){return r===void 0&&(r={}),n.call(this,St({event:"swipe",threshold:10,velocity:.3,direction:Ct|Dr,pointers:1},r))||this}var t=e.prototype;return t.getTouchAction=function(){return Wm.prototype.getTouchAction.call(this)},t.attrTest=function(i){var s=this.options.direction,o;return s&(Ct|Dr)?o=i.overallVelocity:s&Ct?o=i.overallVelocityX:s&Dr&&(o=i.overallVelocityY),n.prototype.attrTest.call(this,i)&&s&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&kr(o)>this.options.velocity&&i.eventType&$e},t.emit=function(i){var s=XF(i.offsetDirection);s&&this.manager.emit(this.options.event+s,i),this.manager.emit(this.options.event,i)},e})(Pi),ZF=(function(n){pt(e,n);function e(r){return r===void 0&&(r={}),n.call(this,St({event:"pinch",threshold:0,pointers:2},r))||this}var t=e.prototype;return t.getTouchAction=function(){return[xr]},t.attrTest=function(i){return n.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state<)},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})(Pi),QF=(function(n){pt(e,n);function e(r){return r===void 0&&(r={}),n.call(this,St({event:"rotate",threshold:0,pointers:2},r))||this}var t=e.prototype;return t.getTouchAction=function(){return[xr]},t.attrTest=function(i){return n.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state<)},e})(Pi),eN=(function(n){pt(e,n);function e(r){var i;return r===void 0&&(r={}),i=n.call(this,St({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[kF]},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|et)&&!l)this.reset();else if(i.eventType&Je)this.reset(),this._timer=setTimeout(function(){s.state=zt,s.tryEmit()},o.time);else if(i.eventType&$e)return zt;return Pt},t.reset=function(){clearTimeout(this._timer)},t.emit=function(i){this.state===zt&&(i&&i.eventType&$e?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=Nm(),this.manager.emit(this.options.event,this._input)))},e})(vs),tN={domEvents:!1,touchAction:NF,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},U$=[[QF,{enable:!1}],[ZF,{enable:!1},["rotate"]],[JF,{direction:Ct}],[Wm,{direction:Ct},["swipe"]],[Zy],[Zy,{event:"doubletap",taps:2},["tap"]],[eN]],aH=1,V$=2;function G$(n,e){var t=n.element;if(t.style){var r;Lt(n.options.cssProps,function(i,s){r=go(t.style,s),e?(n.oldCssProps[r]=t.style[r],t.style[r]=i):t.style[r]=n.oldCssProps[r]||""}),e||(n.oldCssProps={})}}function uH(n,e){var t=document.createEvent("Event");t.initEvent(n,!0,!0),t.gesture=e,e.target.dispatchEvent(t)}var K$=(function(){function n(t,r){var i=this;this.options=Nr({},tN,r||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=nH(this),this.touchAction=new zF(this,this.options.touchAction),G$(this,!0),Lt(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 Nr(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?V$:aH},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&zt)&&(i.curRecognizer=null,a=null);for(var u=0;u<o.length;)s=o[u],i.stopped!==V$&&(!a||s===a||s.canRecognizeWith(a))?s.recognize(r):s.reset(),!a&&s.state&(lt|Ti|ir)&&(i.curRecognizer=s,a=s),u++}},e.get=function(r){if(r instanceof vs)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(pi(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(pi(r,"remove",this))return this;var i=this.get(r);if(r){var s=this.recognizers,o=Br(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 Lt(Mn(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 Lt(Mn(r),function(o){i?s[o]&&s[o].splice(Br(s[o],i),1):delete s[o]}),this},e.emit=function(r,i){this.options.domEvents&&uH(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&&G$(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},n})(),lH={touchstart:Je,touchmove:Xr,touchend:$e,touchcancel:et},dH="touchstart",hH="touchstart touchmove touchend touchcancel",cH=(function(n){pt(e,n);function e(){var r,i=e.prototype;return i.evTarget=dH,i.evWin=hH,r=n.apply(this,arguments)||this,r.started=!1,r}var t=e.prototype;return t.handler=function(i){var s=lH[i.type];if(s===Je&&(this.started=!0),!!this.started){var o=fH.call(this,i,s);s&($e|et)&&o[0].length-o[1].length===0&&(this.started=!1),this.callback(this.manager,s,{pointers:o[0],changedPointers:o[1],pointerType:ds,srcEvent:i})}},e})(Yi);function fH(n,e){var t=Fn(n.touches),r=Fn(n.changedTouches);return e&($e|et)&&(t=jm(t.concat(r),"identifier",!0)),[t,r]}function rN(n,e,t){var r="DEPRECATED METHOD: "+e+`
|
|
86
|
-
`+t+` AT
|
|
87
|
-
`;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 iN=rN(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`."),vH=rN(function(n,e){return iN(n,e,!0)},"merge","Use `assign`.");function pH(n,e,t){var r=e.prototype,i;i=n.prototype=Object.create(r),i.constructor=n,i._super=r,t&&Nr(i,t)}function Y$(n,e){return function(){return n.apply(e,arguments)}}var nN=(function(){var n=function(t,r){return r===void 0&&(r={}),new K$(t,St({recognizers:U$.concat()},r))};return n.VERSION="2.0.17-rc",n.DIRECTION_ALL=jF,n.DIRECTION_DOWN=$i,n.DIRECTION_LEFT=hs,n.DIRECTION_RIGHT=cs,n.DIRECTION_UP=fs,n.DIRECTION_HORIZONTAL=Ct,n.DIRECTION_VERTICAL=Dr,n.DIRECTION_NONE=Bs,n.DIRECTION_DOWN=$i,n.INPUT_START=Je,n.INPUT_MOVE=Xr,n.INPUT_END=$e,n.INPUT_CANCEL=et,n.STATE_POSSIBLE=qs,n.STATE_BEGAN=lt,n.STATE_CHANGED=Ti,n.STATE_ENDED=ir,n.STATE_RECOGNIZED=zt,n.STATE_CANCELLED=Nn,n.STATE_FAILED=Pt,n.Manager=K$,n.Input=Yi,n.TouchAction=zF,n.TouchInput=Lm,n.MouseInput=zm,n.PointerEventInput=KF,n.TouchMouseInput=YF,n.SingleTouchInput=cH,n.Recognizer=vs,n.AttrRecognizer=Pi,n.Tap=Zy,n.Pan=Wm,n.Swipe=JF,n.Pinch=ZF,n.Rotate=QF,n.Press=eN,n.on=_n,n.off=wn,n.each=Lt,n.merge=vH,n.extend=iN,n.bindFn=Y$,n.assign=Nr,n.inherit=pH,n.bindFn=Y$,n.prefixed=go,n.toArray=Fn,n.inArray=Br,n.uniqueArray=jm,n.splitStr=Mn,n.boolOrFn=yo,n.hasParent=Bm,n.addEventListeners=_n,n.removeEventListeners=wn,n.defaults=Nr({},tN,{preset:U$}),n})();nN.defaults;/**
|
|
88
|
-
* vis-util
|
|
89
|
-
* https://github.com/visjs/vis-util
|
|
90
|
-
*
|
|
91
|
-
* utilitie collection for visjs
|
|
92
|
-
*
|
|
93
|
-
* @version 6.0.0
|
|
94
|
-
* @date 2025-07-12T18:02:43.836Z
|
|
95
|
-
*
|
|
96
|
-
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
|
|
97
|
-
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
|
|
98
|
-
*
|
|
99
|
-
* @license
|
|
100
|
-
* vis.js is dual licensed under both
|
|
101
|
-
*
|
|
102
|
-
* 1. The Apache 2.0 License
|
|
103
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
104
|
-
*
|
|
105
|
-
* and
|
|
106
|
-
*
|
|
107
|
-
* 2. The MIT License
|
|
108
|
-
* http://opensource.org/licenses/MIT
|
|
109
|
-
*
|
|
110
|
-
* vis.js may be distributed under either license.
|
|
111
|
-
*/function mo(...n){return gH(n.length?n:[Date.now()])}function gH(n){let[e,t,r]=yH(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 yH(...n){const e=mH();let t=e(" "),r=e(" "),i=e(" ");for(let s=0;s<n.length;s++)t-=e(n[s]),t<0&&(t+=1),r-=e(n[s]),r<0&&(r+=1),i-=e(n[s]),i<0&&(i+=1);return[t,r,i]}function mH(){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 bH(){const n=()=>{};return{on:n,off:n,destroy:n,emit:n,get(){return{set:n}}}}const Hm=typeof window<"u"?window.Hammer||nN:function(){return bH()};function Rt(n){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 e=Hm(this._dom.overlay);e.on("tap",this._onTapOverlay.bind(this)),this._cleanupQueue.push(()=>{e.destroy()}),["tap","doubletap","press","pinch","pan","panstart","panmove","panend"].forEach(r=>{e.on(r,i=>{i.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=r=>{_H(r.target,n)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=r=>{("key"in r?r.key==="Escape":r.keyCode===27)&&this.deactivate()}}AF(Rt.prototype);Rt.current=null;Rt.prototype.destroy=function(){this.deactivate();for(const n of this._cleanupQueue.splice(0).reverse())n()};Rt.prototype.activate=function(){Rt.current&&Rt.current.deactivate(),Rt.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)};Rt.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")};Rt.prototype._onTapOverlay=function(n){this.activate(),n.srcEvent.stopPropagation()};function _H(n,e){for(;n;){if(n===e)return!0;n=n.parentNode}return!1}const wH=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,EH=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,SH=/^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,OH=/^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 Jt(n){if(n)for(;n.hasChildNodes()===!0;){const e=n.firstChild;e&&(Jt(e),n.removeChild(e))}}function gi(n){return n instanceof String||typeof n=="string"}function X$(n){return typeof n=="object"&&n!==null}function jr(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 sN(n,e,t=!1){for(const r in n)if(e[r]!==void 0)if(e[r]===null||typeof e[r]!="object")jr(n,e,r,t);else{const i=n[r],s=e[r];X$(i)&&X$(s)&&sN(i,s,t)}}function Xi(n,e,t,r=!1){if(Array.isArray(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?le(e[s],t[s],!1,r):jr(e,t,s,r);else{if(Array.isArray(t[s]))throw new TypeError("Arrays are not supported by deepExtend");jr(e,t,s,r)}}return e}function zs(n,e,t,r=!1){if(Array.isArray(t))throw new TypeError("Arrays are not supported by deepExtend");for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&!n.includes(i))if(t[i]&&t[i].constructor===Object)e[i]===void 0&&(e[i]={}),e[i].constructor===Object?le(e[i],t[i]):jr(e,t,i,r);else if(Array.isArray(t[i])){e[i]=[];for(let s=0;s<t[i].length;s++)e[i].push(t[i][s])}else jr(e,t,i,r);return e}function le(n,e,t=!1,r=!1){for(const i in e)(Object.prototype.hasOwnProperty.call(e,i)||t===!0)&&(typeof e[i]=="object"&&e[i]!==null&&Object.getPrototypeOf(e[i])===Object.prototype?n[i]===void 0?n[i]=le({},e[i],t):typeof n[i]=="object"&&n[i]!==null&&Object.getPrototypeOf(n[i])===Object.prototype?le(n[i],e[i],t):jr(n,e,i,r):Array.isArray(e[i])?n[i]=e[i].slice():jr(n,e,i,r));return n}function Ws(n,e){return[...n,e]}function IH(n){return n.slice()}function $H(n){return n.getBoundingClientRect().left}function TH(n){return n.getBoundingClientRect().top}function Z(n,e){if(Array.isArray(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 Um(n){let e;switch(n.length){case 3:case 4:return e=EH.exec(n),e?{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16)}:null;case 6:case 7:return e=wH.exec(n),e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null;default:return null}}function at(n,e){if(n.includes("rgba"))return n;if(n.includes("rgb")){const t=n.substr(n.indexOf("(")+1).replace(")","").split(",");return"rgba("+t[0]+","+t[1]+","+t[2]+","+e+")"}else{const t=Um(n);return t==null?n:"rgba("+t.r+","+t.g+","+t.b+","+e+")"}}function oN(n,e,t){return"#"+((1<<24)+(n<<16)+(e<<8)+t).toString(16).slice(1)}function Qy(n,e){if(gi(n)){let t=n;if(uN(t)){const r=t.substr(4).substr(0,t.length-5).split(",").map(function(i){return parseInt(i)});t=oN(r[0],r[1],r[2])}if(aN(t)===!0){const r=PH(t),i={h:r.h,s:r.s*.8,v:Math.min(1,r.v*1.02)},s={h:r.h,s:Math.min(1,r.s*1.25),v:r.v*.8},o=em(s.h,s.s,s.v),a=em(i.h,i.s,i.v);return{background:t,border:o,highlight:{background:a,border:o},hover:{background:a,border:o}}}else return{background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else return{background:n.background||void 0,border:n.border||void 0,highlight:gi(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:gi(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 gn(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 Cs(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 em(n,e,t){const r=Cs(n,e,t);return oN(r.r,r.g,r.b)}function PH(n){const e=Um(n);if(!e)throw new TypeError(`'${n}' is not a valid color.`);return gn(e.r,e.g,e.b)}function aN(n){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(n)}function uN(n){return SH.test(n)}function RH(n){return OH.test(n)}function nr(n){if(n===null||typeof n!="object")return null;if(n instanceof Element)return n;const e=Object.create(n);for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&typeof n[t]=="object"&&(e[t]=nr(n[t]));return e}function ot(n,e,t,r={}){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,h=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]=Object.create(d);else return;if(!s(u))return;let c=!0;u.enabled!==void 0?c=u.enabled:h!==void 0&&(c=d.enabled),a(n,e,t),n[t].enabled=c}const qH={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 Zt(n,e){let t;Array.isArray(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 CH={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 xH=class{constructor(e=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 CH[e]}setColor(e,t=!0){if(e==="none")return;let r;const i=this._isColorString(e);if(i!==void 0&&(e=i),gi(e)===!0){if(uN(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(RH(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(aN(e)===!0){const s=Um(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: "+JSON.stringify(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(e=!0){e===!0&&(this.previousColor=Object.assign({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",setTimeout(()=>{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,t=!0){t===!0&&(this.initialColor=Object.assign({},e)),this.color=e;const r=gn(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=gn(this.color.r,this.color.g,this.color.b);t.v=e/100;const r=Cs(t.h,t.s,t.v);r.a=this.color.a,this.color=r,this._updatePicker()}_updatePicker(e=this.color){const t=gn(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),r.fill(),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(){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 t=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{const t=document.createElement("DIV");t.style.color="red",t.style.fontWeight="bold",t.style.padding="10px",t.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(t)}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 e=this;this.opacityRange.onchange=function(){e._setOpacity(this.value)},this.opacityRange.oninput=function(){e._setOpacity(this.value)},this.brightnessRange.onchange=function(){e._setBrightness(this.value)},this.brightnessRange.oninput=function(){e._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=this._hide.bind(this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=this._apply.bind(this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=this._save.bind(this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=this._loadLast.bind(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 Hm(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 h;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),h=Cs(o*l,a*d,1),e.fillStyle="rgb("+h.r+","+h.g+","+h.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),h=Math.cos(l)*d+s,c=Math.sin(l)*d+o;this.colorPickerSelector.style.top=h-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=c-.5*this.colorPickerSelector.clientWidth+"px";let f=l/(2*Math.PI);f=f<0?f+1:f;const v=d/this.r,p=gn(this.color.r,this.color.g,this.color.b);p.h=f,p.s=v;const b=Cs(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 tm(...n){if(n.length<1)throw new TypeError("Invalid arguments.");if(n.length===1)return document.createTextNode(n[0]);{const e=document.createElement(n[0]);return e.appendChild(tm(...n.slice(1))),e}}let DH=class{constructor(e,t,r,i=1,s=()=>!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},Object.assign(this.options,this.defaultOptions),this.configureOptions=r,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new xH(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(Array.isArray(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),e.filter!==void 0&&(this.options.filter=e.filter),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);this.options.filter===!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=this.options.filter;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||e.indexOf(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,...t){if(this.allowCreation===!0){const r=document.createElement("div");return r.className="vis-configuration vis-config-item vis-config-s"+e.length,t.forEach(i=>{r.appendChild(i)}),this.domElements.push(r),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,r=!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(tm("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&&e.indexOf(t)!==-1&&(s=e.indexOf(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 h=document.createElement("input");h.className="vis-configuration vis-config-rangeinput",h.value=u.value;const c=this;u.onchange=function(){h.value=this.value,c._update(Number(this.value),r)},u.oninput=function(){h.value=this.value};const f=this._makeLabel(r[r.length-1],r),v=this._makeItem(r,f,u,h);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=setTimeout(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=setTimeout(()=>{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,t=[],r=!1){let i=!1;const s=this.options.filter;let o=!1;for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){i=!0;const u=e[a],l=Ws(t,a);if(typeof s=="function"&&(i=s(a,t),i===!1&&!Array.isArray(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(Array.isArray(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 h=Ws(l,"enabled"),c=this._getValue(h);if(c===!0){const f=this._makeLabel(a,l,!0);this._makeItem(l,f),o=this._handleObject(u,l)||o}else this._makeCheckbox(u,c,l)}else{const h=this._makeLabel(a,l,!0);this._makeItem(l,h),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,r={}){let 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(tm("pre","const options = "+JSON.stringify(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}},AH=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=parseInt(e),this.y=parseInt(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)}},vn=!1,J$;const rm="background: #FFeeee; color: #dd0000";let MH=class we{static validate(e,t,r){vn=!1,J$=t;let i=t;return r!==void 0&&(i=t[r]),we.parse(e,i,[]),vn}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),rm)},u=we.getType(t[e]),l=s[u];l!==void 0?we.getType(l)==="array"&&l.indexOf(t[e])===-1?(a('Invalid option detected in "'+e+'". Allowed values are:'+we.print(l)+' not "'+t[e]+'". '),vn=!0):u==="object"&&i!=="__any__"&&(o=Ws(o,e),we.parse(t[e],r[i],o)):s.any===void 0&&(a('Invalid type received for "'+e+'". Expected: '+we.print(Object.keys(s))+". Received ["+u+'] "'+t[e]+'"'),vn=!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":Array.isArray(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,J$,[],!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+`"?
|
|
112
|
-
|
|
113
|
-
`: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(Object.keys(t))+we.printLocation(r,e),console.error('%cUnknown option detected: "'+e+'"'+u,rm),vn=!0}static findInOptions(e,t,r,i=!1){let s=1e9,o="",a=[];const u=e.toLowerCase();let l;for(const d in t){let h;if(t[d].__type__!==void 0&&i===!0){const c=we.findInOptions(e,t[d],Ws(r,d));s>c.distance&&(o=c.closestMatch,a=c.path,s=c.distance,l=c.indexMatch)}else d.toLowerCase().indexOf(u)!==-1&&(l=d),h=we.levenshteinDistance(e,d),s>h&&(o=d,a=IH(r),s=h)}return{closestMatch:o,path:a,distance:s,indexMatch:l}}static printLocation(e,t,r=`Problem value found at:
|
|
114
|
-
`){let i=`
|
|
115
|
-
|
|
116
|
-
`+r+`options = {
|
|
117
|
-
`;for(let s=0;s<e.length;s++){for(let o=0;o<s+1;o++)i+=" ";i+=e[s]+`: {
|
|
118
|
-
`}for(let s=0;s<e.length+1;s++)i+=" ";i+=t+`
|
|
119
|
-
`;for(let s=0;s<e.length+1;s++){for(let o=0;o<e.length-s;o++)i+=" ";i+=`}
|
|
120
|
-
`}return i+`
|
|
121
|
-
|
|
122
|
-
`}static print(e){return JSON.stringify(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 FH=Rt,NH=DH,yi=Hm,kH=AH,lN=rm,BH=MH;var Z$={},tf={},Q$;function Vm(){if(Q$)return tf;Q$=1;var n=Se(),e=PF(),t=vt(),r=Dt(),i=It(),s=ls();return tf.f=n&&!e?Object.defineProperties:function(a,u){r(a);for(var l=i(u),d=s(u),h=d.length,c=0,f;h>c;)t.f(a,f=d[c++],l[f]);return a},tf}var rf,eT;function jH(){if(eT)return rf;eT=1;var n=st();return rf=n("document","documentElement"),rf}var nf,tT;function bo(){if(tT)return nf;tT=1;var n=Ui(),e=ho(),t=n("keys");return nf=function(r){return t[r]||(t[r]=e(r))},nf}var sf,rT;function ps(){if(rT)return sf;rT=1;var n=Dt(),e=Vm(),t=Mm(),r=us(),i=jH(),s=$F(),o=bo(),a=">",u="<",l="prototype",d="script",h=o("IE_PROTO"),c=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[h]=!0,sf=Object.create||function(S,m){var w;return S!==null?(c[l]=n(S),w=new c,c[l]=null,w[h]=S):w=y(),m===void 0?w:e.f(w,m)},sf}var iT;function LH(){if(iT)return Z$;iT=1;var n=z(),e=Se(),t=ps();return n({target:"Object",stat:!0,sham:!e},{create:t}),Z$}var of,nT;function zH(){if(nT)return of;nT=1,LH();var n=se(),e=n.Object;return of=function(r,i){return e.create(r,i)},of}var af,sT;function WH(){if(sT)return af;sT=1;var n=zH();return af=n,af}var uf,oT;function HH(){return oT||(oT=1,uf=WH()),uf}var UH=HH(),En=K(UH),aT={},lf,uT;function Ji(){if(uT)return lf;uT=1;var n=ee();return lf=function(e,t){var r=[][e];return!!r&&n(function(){r.call(null,t||function(){return 1},1)})},lf}var lT;function VH(){if(lT)return aT;lT=1;var n=z(),e=qm(),t=Am().indexOf,r=Ji(),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)}}),aT}var df,dT;function GH(){if(dT)return df;dT=1,VH();var n=We();return df=n("Array","indexOf"),df}var hf,hT;function KH(){if(hT)return hf;hT=1;var n=Re(),e=GH(),t=Array.prototype;return hf=function(r){var i=r.indexOf;return r===t||n(t,r)&&i===t.indexOf?e:i},hf}var cf,cT;function YH(){if(cT)return cf;cT=1;var n=KH();return cf=n,cf}var ff,fT;function XH(){return fT||(fT=1,ff=YH()),ff}var JH=XH(),me=K(JH),vT={},vf,pT;function Gm(){return pT||(pT=1,vf=function(){}),vf}var gT;function ZH(){if(gT)return vT;gT=1;var n=z(),e=Am().includes,t=ee(),r=Gm(),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"),vT}var pf,yT;function QH(){if(yT)return pf;yT=1,ZH();var n=We();return pf=n("Array","includes"),pf}var mT={},gf,bT;function e5(){if(bT)return gf;bT=1;var n=Ne(),e=xt(),t=qe(),r=t("match");return gf=function(i){var s;return n(i)&&((s=i[r])!==void 0?!!s:e(i)==="RegExp")},gf}var yf,_T;function t5(){if(_T)return yf;_T=1;var n=e5(),e=TypeError;return yf=function(t){if(n(t))throw new e("The method doesn't accept regular expressions");return t},yf}var mf,wT;function Km(){if(wT)return mf;wT=1;var n=qe(),e=n("toStringTag"),t={};return t[e]="z",mf=String(t)==="[object z]",mf}var bf,ET;function Zi(){if(ET)return bf;ET=1;var n=Km(),e=Fe(),t=xt(),r=qe(),i=r("toStringTag"),s=Object,o=t((function(){return arguments})())==="Arguments",a=function(u,l){try{return u[l]}catch{}};return bf=n?t:function(u){var l,d,h;return u===void 0?"Undefined":u===null?"Null":typeof(d=a(l=s(u),i))=="string"?d:o?t(l):(h=t(l))==="Object"&&e(l.callee)?"Arguments":h},bf}var _f,ST;function gt(){if(ST)return _f;ST=1;var n=Zi(),e=String;return _f=function(t){if(n(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(t)},_f}var wf,OT;function r5(){if(OT)return wf;OT=1;var n=qe(),e=n("match");return wf=function(t){var r=/./;try{"/./"[t](r)}catch{try{return r[e]=!1,"/./"[t](r)}catch{}}return!1},wf}var IT;function i5(){if(IT)return mT;IT=1;var n=z(),e=te(),t=t5(),r=Gt(),i=gt(),s=r5(),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)}}),mT}var Ef,$T;function n5(){if($T)return Ef;$T=1,i5();var n=We();return Ef=n("String","includes"),Ef}var Sf,TT;function s5(){if(TT)return Sf;TT=1;var n=Re(),e=QH(),t=n5(),r=Array.prototype,i=String.prototype;return Sf=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},Sf}var Of,PT;function o5(){if(PT)return Of;PT=1;var n=s5();return Of=n,Of}var If,RT;function a5(){return RT||(RT=1,If=o5()),If}var u5=a5(),Sn=K(u5),qT={},$f,CT;function Jr(){if(CT)return $f;CT=1;var n=xt();return $f=Array.isArray||function(t){return n(t)==="Array"},$f}var Tf,xT;function l5(){if(xT)return Tf;xT=1;var n=Se(),e=Jr(),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 Tf=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},Tf}var Pf,DT;function dN(){if(DT)return Pf;DT=1;var n=TypeError,e=9007199254740991;return Pf=function(t){if(t>e)throw n("Maximum allowed index exceeded");return t},Pf}var Rf,AT;function d5(){if(AT)return Rf;AT=1;var n=te(),e=Fe(),t=xm(),r=n(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(i){return r(i)}),Rf=t.inspectSource,Rf}var qf,MT;function hN(){if(MT)return qf;MT=1;var n=te(),e=ee(),t=Fe(),r=Zi(),i=st(),s=d5(),o=function(){},a=i("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=n(u.exec),d=!u.test(o),h=function(v){if(!t(v))return!1;try{return a(o,[],v),!0}catch{return!1}},c=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 c.sham=!0,qf=!a||e(function(){var f;return h(h.call)||!h(Object)||!h(function(){f=!0})||f})?c:h,qf}var Cf,FT;function h5(){if(FT)return Cf;FT=1;var n=Jr(),e=hN(),t=Ne(),r=qe(),i=r("species"),s=Array;return Cf=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},Cf}var xf,NT;function Ym(){if(NT)return xf;NT=1;var n=h5();return xf=function(e,t){return new(n(e))(t===0?0:t)},xf}var Df,kT;function _o(){if(kT)return Df;kT=1;var n=Se(),e=vt(),t=ss();return Df=function(r,i,s){n?e.f(r,i,t(0,s)):r[i]=s},Df}var Af,BT;function cN(){if(BT)return Af;BT=1;var n=Wi(),e=TypeError;return Af=function(t,r){if(!delete t[r])throw new e("Cannot delete property "+n(r)+" of "+n(t))},Af}var Mf,jT;function gs(){if(jT)return Mf;jT=1;var n=ee(),e=qe(),t=os(),r=e("species");return Mf=function(i){return t>=51||!n(function(){var s=[],o=s.constructor={};return o[r]=function(){return{foo:1}},s[i](Boolean).foo!==1})},Mf}var LT;function c5(){if(LT)return qT;LT=1;var n=z(),e=ft(),t=vo(),r=Gi(),i=Yt(),s=l5(),o=dN(),a=Ym(),u=_o(),l=cN(),d=gs(),h=d("splice"),c=Math.max,f=Math.min;return n({target:"Array",proto:!0,forced:!h},{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(c(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}}),qT}var Ff,zT;function f5(){if(zT)return Ff;zT=1,c5();var n=We();return Ff=n("Array","splice"),Ff}var Nf,WT;function v5(){if(WT)return Nf;WT=1;var n=Re(),e=f5(),t=Array.prototype;return Nf=function(r){var i=r.splice;return r===t||n(t,r)&&i===t.splice?e:i},Nf}var kf,HT;function p5(){if(HT)return kf;HT=1;var n=v5();return kf=n,kf}var Bf,UT;function g5(){return UT||(UT=1,Bf=p5()),Bf}var y5=g5(),sr=K(y5),VT={},GT;function m5(){if(GT)return VT;GT=1;var n=z(),e=Jr();return n({target:"Array",stat:!0},{isArray:e}),VT}var jf,KT;function b5(){if(KT)return jf;KT=1,m5();var n=se();return jf=n.Array.isArray,jf}var Lf,YT;function _5(){if(YT)return Lf;YT=1;var n=b5();return Lf=n,Lf}var zf,XT;function w5(){return XT||(XT=1,zf=_5()),zf}var E5=w5(),wt=K(E5),JT={},Wf,ZT;function vr(){if(ZT)return Wf;ZT=1;var n=fo(),e=te(),t=lo(),r=ft(),i=Yt(),s=Ym(),o=e([].push),a=function(u){var l=u===1,d=u===2,h=u===3,c=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:h||c?c:$}};return Wf={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},Wf}var Hf,QT;function S5(){if(QT)return Hf;QT=1;var n=vr().forEach,e=Ji(),t=e("forEach");return Hf=t?[].forEach:function(i){return n(this,i,arguments.length>1?arguments[1]:void 0)},Hf}var eP;function O5(){if(eP)return JT;eP=1;var n=z(),e=S5();return n({target:"Array",proto:!0,forced:[].forEach!==e},{forEach:e}),JT}var Uf,tP;function I5(){if(tP)return Uf;tP=1,O5();var n=We();return Uf=n("Array","forEach"),Uf}var Vf,rP;function $5(){if(rP)return Vf;rP=1;var n=I5();return Vf=n,Vf}var Gf,iP;function T5(){if(iP)return Gf;iP=1;var n=Zi(),e=ze(),t=Re(),r=$5(),i=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return Gf=function(o){var a=o.forEach;return o===i||t(i,o)&&a===i.forEach||e(s,n(o))?r:a},Gf}var Kf,nP;function P5(){return nP||(nP=1,Kf=T5()),Kf}var R5=P5(),fe=K(R5);function q5(n){return er=n,A5()}var fN={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},Xm=En(fN);Xm.color="color.color";Xm.style="dashes";var Ge={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},sP={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},er="",Ri=0,X="",V="",Ze=Ge.NULL;function C5(){Ri=0,X=er.charAt(0)}function xe(){Ri++,X=er.charAt(Ri)}function ai(){return er.charAt(Ri+1)}function oP(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 ar(n,e){if(n||(n={}),e)for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function x5(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 vN(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=ar(i.attr,n.node))),t=s.length-1;t>=0;t--){var a,u=s[t];u.nodes||(u.nodes=[]),me(a=u.nodes).call(a,i)===-1&&u.nodes.push(i)}e.attr&&(i.attr=ar(i.attr,e.attr))}function D5(n,e){if(n.edges||(n.edges=[]),n.edges.push(e),n.edge){var t=ar({},n.edge);e.attr=ar(t,e.attr)}}function pN(n,e,t,r,i){var s={from:e,to:t,type:r};return n.edge&&(s.attr=ar({},n.edge)),s.attr=ar(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 de(){for(Ze=Ge.NULL,V="";X===" "||X===" "||X===`
|
|
123
|
-
`||X==="\r";)xe();do{var n=!1;if(X==="#"){for(var e=Ri-1;er.charAt(e)===" "||er.charAt(e)===" ";)e--;if(er.charAt(e)===`
|
|
124
|
-
`||er.charAt(e)===""){for(;X!=""&&X!=`
|
|
125
|
-
`;)xe();n=!0}}if(X==="/"&&ai()==="/"){for(;X!=""&&X!=`
|
|
126
|
-
`;)xe();n=!0}if(X==="/"&&ai()==="*"){for(;X!="";)if(X==="*"&&ai()==="/"){xe(),xe();break}else xe();n=!0}for(;X===" "||X===" "||X===`
|
|
127
|
-
`||X==="\r";)xe()}while(n);if(X===""){Ze=Ge.DELIMITER;return}var t=X+ai();if(sP[t]){Ze=Ge.DELIMITER,V=t,xe(),xe();return}if(sP[X]){Ze=Ge.DELIMITER,V=X,xe();return}if(oP(X)||X==="-"){for(V+=X,xe();oP(X);)V+=X,xe();V==="false"?V=!1:V==="true"?V=!0:isNaN(Number(V))||(V=Number(V)),Ze=Ge.IDENTIFIER;return}if(X==='"'){for(xe();X!=""&&(X!='"'||X==='"'&&ai()==='"');)X==='"'?(V+=X,xe()):X==="\\"&&ai()==="n"?(V+=`
|
|
128
|
-
`,xe()):V+=X,xe();if(X!='"')throw Ke('End of string " expected');xe(),Ze=Ge.IDENTIFIER;return}for(Ze=Ge.UNKNOWN;X!="";)V+=X,xe();throw new SyntaxError('Syntax error in part "'+bN(V,30)+'"')}function A5(){var n={};if(C5(),de(),V==="strict"&&(n.strict=!0,de()),(V==="graph"||V==="digraph")&&(n.type=V,de()),Ze===Ge.IDENTIFIER&&(n.id=V,de()),V!="{")throw Ke("Angle bracket { expected");if(de(),gN(n),V!="}")throw Ke("Angle bracket } expected");if(de(),V!=="")throw Ke("End of file expected");return de(),delete n.node,delete n.edge,delete n.graph,n}function gN(n){for(;V!==""&&V!="}";)M5(n),V===";"&&de()}function M5(n){var e=yN(n);if(e){mN(n,e);return}var t=F5(n);if(!t){if(Ze!=Ge.IDENTIFIER)throw Ke("Identifier expected");var r=V;if(de(),V==="="){if(de(),Ze!=Ge.IDENTIFIER)throw Ke("Identifier expected");n[r]=V,de()}else N5(n,r)}}function yN(n){var e=null;if(V==="subgraph"&&(e={},e.type="subgraph",de(),Ze===Ge.IDENTIFIER&&(e.id=V,de())),V==="{"){if(de(),e||(e={}),e.parent=n,e.node=n.node,e.edge=n.edge,e.graph=n.graph,gN(e),V!="}")throw Ke("Angle bracket } expected");de(),delete e.node,delete e.edge,delete e.graph,delete e.parent,n.subgraphs||(n.subgraphs=[]),n.subgraphs.push(e)}return e}function F5(n){return V==="node"?(de(),n.node=On(),"node"):V==="edge"?(de(),n.edge=On(),"edge"):V==="graph"?(de(),n.graph=On(),"graph"):null}function N5(n,e){var t={id:e},r=On();r&&(t.attr=r),vN(n,t),mN(n,e)}function mN(n,e){for(;V==="->"||V==="--";){var t,r=V;de();var i=yN(n);if(i)t=i;else{if(Ze!=Ge.IDENTIFIER)throw Ke("Identifier or subgraph expected");t=V,vN(n,{id:t}),de()}var s=On(),o=pN(n,e,t,r,s);D5(n,o),e=t}}function On(){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(de(),e={};V!==""&&V!="]";){if(Ze!=Ge.IDENTIFIER)throw Ke("Attribute name expected");var o=V;if(de(),V!="=")throw Ke("Equal sign = expected");if(de(),Ze!=Ge.IDENTIFIER)throw Ke("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),de(),V==","&&de()}if(V!="]")throw Ke("Bracket ] expected");de()}if(Sn(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 Ke("Invalid value of arrows");else i[n].name==="dir"&&(l.dir=n);var d=i[l.dir].value;if(!Sn(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 Ke('Invalid dir type "'+d+'"');var h,c;if(d==="both")l.arrows.to&&l.arrows.from?(c=i[l.arrows.to].value.to.type,h=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:c},from:{enabled:!0,type:h}}},sr(i).call(i,l.arrows.from,1)):l.arrows.to?(c=i[l.arrows.to].value.to.type,h="arrow",i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:h}}}):l.arrows.from&&(c="arrow",h=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:c},from:{enabled:!0,type:h}}});else if(d==="back")l.arrows.to&&l.arrows.from?(c="",h=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:c},from:{enabled:!0,type:h}}}):l.arrows.to?(c="",h="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:c},from:{enabled:!0,type:h}}}):l.arrows.from&&(c="",h=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:c},from:{enabled:!0,type:h}}}),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?(c=i[l.arrows.to].value.to.type,h="",i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:h}}}):l.arrows.to?(c=i[l.arrows.to].value.to.type,h="",i[l.arrows.to]={attr:i[l.arrows.to].attr,name:i[l.arrows.to].name,value:{to:{enabled:!0,type:c},from:{enabled:!0,type:h}}}):l.arrows.from&&(c="arrow",h="",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:c},from:{enabled:!0,type:h}}}),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 Ke('Invalid dir type "'+d+'"');sr(i).call(i,l.dir,1)}var v;if(Sn(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++)x5(i[n].attr,i[n].name,i[n].value);return e}function Ke(n){return new SyntaxError(n+', got "'+bN(V,30)+'" (char '+Ri+")")}function bN(n,e){return n.length<=e?n:n.substr(0,27)+"..."}function k5(n,e,t){wt(n)?fe(n).call(n,function(r){wt(e)?fe(e).call(e,function(i){t(r,i)}):t(r,e)}):wt(e)?fe(e).call(e,function(r){t(n,r)}):t(n,e)}function Yf(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 aP(n,e){var t={};for(var r in n)if(n.hasOwnProperty(r)){var i=e[r];wt(i)?fe(i).call(i,function(s){Yf(t,s,n[r])}):typeof i=="string"?Yf(t,i,n[r]):Yf(t,r,n[r])}return t}function B5(n){var e=q5(n),t={nodes:[],edges:[],options:{}};if(e.nodes){var r;fe(r=e.nodes).call(r,function(o){var a={id:o.id,label:String(o.label||o.id)};ar(a,aP(o.attr,fN)),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 ar(a,aP(o.attr,Xm)),a.arrows==null&&o.type==="->"&&(a.arrows="to"),a};fe(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;fe(l=o.from.edges).call(l,function(h){var c=s(h);t.edges.push(c)})}if(k5(a,u,function(h,c){var f=pN(t,h.id,c.id,o.type,o.attr),v=s(f);t.edges.push(v)}),o.to instanceof Object&&o.to.edges){var d;fe(d=o.to.edges).call(d,function(h){var c=s(h);t.edges.push(c)})}})}return e.attr&&(t.options=e.attr),t}var uP={},lP;function j5(){if(lP)return uP;lP=1;var n=z(),e=vr().map,t=gs(),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)}}),uP}var Xf,dP;function L5(){if(dP)return Xf;dP=1,j5();var n=We();return Xf=n("Array","map"),Xf}var Jf,hP;function z5(){if(hP)return Jf;hP=1;var n=Re(),e=L5(),t=Array.prototype;return Jf=function(r){var i=r.map;return r===t||n(t,r)&&i===t.map?e:i},Jf}var Zf,cP;function W5(){if(cP)return Zf;cP=1;var n=z5();return Zf=n,Zf}var Qf,fP;function H5(){return fP||(fP=1,Qf=W5()),Qf}var U5=H5(),kn=K(U5);function V5(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=kn(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:kn(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 G5={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"},K5={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"},Y5={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"},X5={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"},J5={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"},Z5={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ó"},Q5={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},e3={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},t3={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},r3={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"},i3={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 n3=Object.freeze({__proto__:null,cn:e3,cs:i3,de:K5,en:G5,es:Y5,fr:r3,it:X5,nl:J5,pt:Z5,ru:Q5,uk:t3}),vP={},pP;function _N(){if(pP)return vP;pP=1;var n=z(),e=ee(),t=Jr(),r=Ne(),i=ft(),s=Yt(),o=dN(),a=_o(),u=Ym(),l=gs(),d=qe(),h=os(),c=d("isConcatSpreadable"),f=h>=51||!e(function(){var b=[];return b[c]=!1,b.concat()[0]!==b}),v=function(b){if(!r(b))return!1;var y=b[c];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}}),vP}var ev,gP;function s3(){if(gP)return ev;gP=1,_N();var n=We();return ev=n("Array","concat"),ev}var tv,yP;function o3(){if(yP)return tv;yP=1;var n=Re(),e=s3(),t=Array.prototype;return tv=function(r){var i=r.concat;return r===t||n(t,r)&&i===t.concat?e:i},tv}var rv,mP;function a3(){if(mP)return rv;mP=1;var n=o3();return rv=n,rv}var iv,bP;function u3(){return bP||(bP=1,iv=a3()),iv}var l3=u3(),d3=K(l3);function h3(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(d3(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 c3{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 f3{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 c3;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 nv,_P;function Qi(){return _P||(_P=1,nv={}),nv}var sv,wP;function wN(){if(wP)return sv;wP=1;var n=pe(),e=Fe(),t=n.WeakMap;return sv=e(t)&&/native code/.test(String(t)),sv}var ov,EP;function Zr(){if(EP)return ov;EP=1;var n=wN(),e=pe(),t=Ne(),r=Vi(),i=ze(),s=xm(),o=bo(),a=us(),u="Object already initialized",l=e.TypeError,d=e.WeakMap,h,c,f,v=function(g){return f(g)?c(g):h(g,{})},p=function(g){return function(S){var m;if(!t(S)||(m=c(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,h=function(g,S){if(b.has(g))throw new l(u);return S.facade=g,b.set(g,S),S},c=function(g){return b.get(g)||{}},f=function(g){return b.has(g)}}else{var y=o("state");a[y]=!0,h=function(g,S){if(i(g,y))throw new l(u);return S.facade=g,r(g,y,S),S},c=function(g){return i(g,y)?g[y]:{}},f=function(g){return i(g,y)}}return ov={set:h,get:c,has:f,enforce:v,getterFor:p},ov}var av,SP;function v3(){if(SP)return av;SP=1;var n=Se(),e=ze(),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 av={EXISTS:i,PROPER:s,CONFIGURABLE:o},av}var uv,OP;function p3(){if(OP)return uv;OP=1;var n=ee();return uv=!n(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),uv}var lv,IP;function Jm(){if(IP)return lv;IP=1;var n=ze(),e=Fe(),t=ft(),r=bo(),i=p3(),s=r("IE_PROTO"),o=Object,a=o.prototype;return lv=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},lv}var dv,$P;function ys(){if($P)return dv;$P=1;var n=Vi();return dv=function(e,t,r,i){return i&&i.enumerable?e[t]=r:n(e,t,r),e},dv}var hv,TP;function EN(){if(TP)return hv;TP=1;var n=ee(),e=Fe(),t=Ne(),r=ps(),i=Jm(),s=ys(),o=qe(),a=Hi(),u=o("iterator"),l=!1,d,h,c;[].keys&&(c=[].keys(),"next"in c?(h=i(i(c)),h!==Object.prototype&&(d=h)):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}),hv={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:l},hv}var cv,PP;function g3(){if(PP)return cv;PP=1;var n=Km(),e=Zi();return cv=n?{}.toString:function(){return"[object "+e(this)+"]"},cv}var fv,RP;function Qr(){if(RP)return fv;RP=1;var n=Km(),e=vt().f,t=Vi(),r=ze(),i=g3(),s=qe(),o=s("toStringTag");return fv=function(a,u,l,d){var h=l?a:a&&a.prototype;h&&(r(h,o)||e(h,o,{configurable:!0,value:u}),d&&!n&&t(h,"toString",i))},fv}var vv,qP;function y3(){if(qP)return vv;qP=1;var n=EN().IteratorPrototype,e=ps(),t=ss(),r=Qr(),i=Qi(),s=function(){return this};return vv=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},vv}var pv,CP;function m3(){if(CP)return pv;CP=1;var n=te(),e=Kt();return pv=function(t,r,i){try{return n(e(Object.getOwnPropertyDescriptor(t,r)[i]))}catch{}},pv}var gv,xP;function b3(){if(xP)return gv;xP=1;var n=Ne();return gv=function(e){return n(e)||e===null},gv}var yv,DP;function _3(){if(DP)return yv;DP=1;var n=b3(),e=String,t=TypeError;return yv=function(r){if(n(r))return r;throw new t("Can't set "+e(r)+" as a prototype")},yv}var mv,AP;function w3(){if(AP)return mv;AP=1;var n=m3(),e=Ne(),t=Gt(),r=_3();return mv=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),mv}var bv,MP;function Zm(){if(MP)return bv;MP=1;var n=z(),e=it(),t=Hi(),r=v3(),i=Fe(),s=y3(),o=Jm(),a=w3(),u=Qr(),l=Vi(),d=ys(),h=qe(),c=Qi(),f=EN(),v=r.PROPER,p=r.CONFIGURABLE,b=f.IteratorPrototype,y=f.BUGGY_SAFARI_ITERATORS,g=h("iterator"),S="keys",m="values",w="entries",O=function(){return this};return bv=function(I,_,E,$,T,P,R){s(E,_,$);var C=function(ye){if(ye===T&&Q)return Q;if(!y&&ye&&ye in L)return L[ye];switch(ye){case S:return function(){return new E(this,ye)};case m:return function(){return new E(this,ye)};case w:return function(){return new E(this,ye)}}return function(){return new E(this)}},M=_+" Iterator",G=!1,L=I.prototype,J=L[g]||L["@@iterator"]||T&&L[T],Q=!y&&J||C(T),oe=_==="Array"&&L.entries||J,W,ae,ge;if(oe&&(W=o(oe.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&&(c[M]=O))),v&&T===m&&J&&J.name!==m&&(!t&&p?l(L,"name",m):(G=!0,Q=function(){return e(J,this)})),T)if(ae={values:C(m),keys:P?Q:C(S),entries:C(w)},R)for(ge in ae)(y||G||!(ge in L))&&d(L,ge,ae[ge]);else n({target:_,proto:!0,forced:y||G},ae);return(!t||R)&&L[g]!==Q&&d(L,g,Q,{name:T}),c[_]=Q,ae},bv}var _v,FP;function Qm(){return FP||(FP=1,_v=function(n,e){return{value:n,done:e}}),_v}var wv,NP;function en(){if(NP)return wv;NP=1;var n=It(),e=Gm(),t=Qi(),r=Zr(),i=vt().f,s=Zm(),o=Qm(),a=Hi(),u=Se(),l="Array Iterator",d=r.set,h=r.getterFor(l);wv=s(Array,"Array",function(f,v){d(this,{type:l,target:n(f),index:0,kind:v})},function(){var f=h(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 c=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!a&&u&&c.name!=="values")try{i(c,"name",{value:"values"})}catch{}return wv}var kP={},BP={},Ev={exports:{}},Sv={},jP;function wo(){if(jP)return Sv;jP=1;var n=qF(),e=Mm(),t=e.concat("length","prototype");return Sv.f=Object.getOwnPropertyNames||function(i){return n(i,t)},Sv}var Ov={},LP;function eb(){if(LP)return Ov;LP=1;var n=xt(),e=It(),t=wo().f,r=Ki(),i=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(o){try{return t(o)}catch{return r(i)}};return Ov.f=function(a){return i&&n(a)==="Window"?s(a):t(e(a))},Ov}var Iv,zP;function E3(){if(zP)return Iv;zP=1;var n=ee();return Iv=n(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),Iv}var $v,WP;function S3(){if(WP)return $v;WP=1;var n=ee(),e=Ne(),t=xt(),r=E3(),i=Object.isExtensible,s=n(function(){});return $v=s||r?function(a){return!e(a)||r&&t(a)==="ArrayBuffer"?!1:i?i(a):!0}:i,$v}var Tv,HP;function SN(){if(HP)return Tv;HP=1;var n=ee();return Tv=!n(function(){return Object.isExtensible(Object.preventExtensions({}))}),Tv}var UP;function Eo(){if(UP)return Ev.exports;UP=1;var n=z(),e=te(),t=us(),r=Ne(),i=ze(),s=vt().f,o=wo(),a=eb(),u=S3(),l=ho(),d=SN(),h=!1,c=l("meta"),f=0,v=function(m){s(m,c,{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,c)){if(!u(m))return"F";if(!w)return"E";v(m)}return m[c].objectID},b=function(m,w){if(!i(m,c)){if(!u(m))return!0;if(!w)return!1;v(m)}return m[c].weakData},y=function(m){return d&&h&&u(m)&&!i(m,c)&&v(m),m},g=function(){S.enable=function(){},h=!0;var m=o.f,w=e([].splice),O={};O[c]=1,m(O).length&&(o.f=function(I){for(var _=m(I),E=0,$=_.length;E<$;E++)if(_[E]===c){w(_,E,1);break}return _},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:a.f}))},S=Ev.exports={enable:g,fastKey:p,getWeakData:b,onFreeze:y};return t[c]=!0,Ev.exports}var Pv,VP;function O3(){if(VP)return Pv;VP=1;var n=qe(),e=Qi(),t=n("iterator"),r=Array.prototype;return Pv=function(i){return i!==void 0&&(e.Array===i||r[t]===i)},Pv}var Rv,GP;function ON(){if(GP)return Rv;GP=1;var n=Zi(),e=Cm(),t=ji(),r=Qi(),i=qe(),s=i("iterator");return Rv=function(o){if(!t(o))return e(o,s)||e(o,"@@iterator")||r[n(o)]},Rv}var qv,KP;function I3(){if(KP)return qv;KP=1;var n=it(),e=Kt(),t=Dt(),r=Wi(),i=ON(),s=TypeError;return qv=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")},qv}var Cv,YP;function tb(){if(YP)return Cv;YP=1;var n=it(),e=Dt(),t=Cm();return Cv=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},Cv}var xv,XP;function So(){if(XP)return xv;XP=1;var n=fo(),e=it(),t=Dt(),r=Wi(),i=O3(),s=Yt(),o=Re(),a=I3(),u=ON(),l=tb(),d=TypeError,h=function(f,v){this.stopped=f,this.result=v},c=h.prototype;return xv=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 h(!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(c,$))return $;return new h(!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(c,$))return $}return new h(!1)},xv}var Dv,JP;function rb(){if(JP)return Dv;JP=1;var n=Re(),e=TypeError;return Dv=function(t,r){if(n(r,t))return t;throw new e("Incorrect invocation")},Dv}var Av,ZP;function ib(){if(ZP)return Av;ZP=1;var n=z(),e=pe(),t=Eo(),r=ee(),i=Vi(),s=So(),o=rb(),a=Fe(),u=Ne(),l=ji(),d=Qr(),h=vt().f,c=vr().forEach,f=Se(),v=Zr(),p=v.set,b=v.getterFor;return Av=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);c(["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,G){var L=P(this).collection;if(!C&&w&&!u(M))return R==="get"?void 0:!1;var J=L[R](M===0?0:M,G);return C?this:J})}),w||h(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),$},Av}var Mv,QP;function nb(){if(QP)return Mv;QP=1;var n=vt();return Mv=function(e,t,r){return n.f(e,t,r)},Mv}var Fv,eR;function sb(){if(eR)return Fv;eR=1;var n=ys();return Fv=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},Fv}var Nv,tR;function $3(){if(tR)return Nv;tR=1;var n=st(),e=nb(),t=qe(),r=Se(),i=t("species");return Nv=function(s){var o=n(s);r&&o&&!o[i]&&e(o,i,{configurable:!0,get:function(){return this}})},Nv}var kv,rR;function IN(){if(rR)return kv;rR=1;var n=ps(),e=nb(),t=sb(),r=fo(),i=rb(),s=ji(),o=So(),a=Zm(),u=Qm(),l=$3(),d=Se(),h=Eo().fastKey,c=Zr(),f=c.set,v=c.getterFor;return kv={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=h(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=h(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)}},kv}var iR;function T3(){if(iR)return BP;iR=1;var n=ib(),e=IN();return n("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),BP}var nR;function P3(){return nR||(nR=1,T3()),kP}var sR={},Bv,oR;function $N(){return oR||(oR=1,Bv=function(n,e){return e===1?function(t,r){return t[n](r)}:function(t,r,i){return t[n](r,i)}}),Bv}var jv,aR;function R3(){if(aR)return jv;aR=1;var n=st(),e=$N(),t=n("Map");return jv={Map:t,set:e("set",2),get:e("get",1),has:e("has",1),remove:e("delete",1),proto:t.prototype},jv}var uR;function q3(){if(uR)return sR;uR=1;var n=z(),e=te(),t=Kt(),r=Gt(),i=So(),s=R3(),o=Hi(),a=ee(),u=s.Map,l=s.has,d=s.get,h=s.set,c=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)?c(d(y,m),S):h(y,m,[S])}),y}}),sR}var lR={},Lv,dR;function C3(){if(dR)return Lv;dR=1;var n=te(),e=Gi(),t=gt(),r=Gt(),i=n("".charAt),s=n("".charCodeAt),o=n("".slice),a=function(u){return function(l,d){var h=t(r(l)),c=e(d),f=h.length,v,p;return c<0||c>=f?u?"":void 0:(v=s(h,c),v<55296||v>56319||c+1===f||(p=s(h,c+1))<56320||p>57343?u?i(h,c):v:u?o(h,c,c+2):(v-55296<<10)+(p-56320)+65536)}};return Lv={codeAt:a(!1),charAt:a(!0)},Lv}var hR;function ob(){if(hR)return lR;hR=1;var n=C3().charAt,e=gt(),t=Zr(),r=Zm(),i=Qm(),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,h=l.index,c;return h>=d.length?i(void 0,!0):(c=n(d,h),l.index+=c.length,i(c,!1))}),lR}var zv,cR;function x3(){if(cR)return zv;cR=1,en(),P3(),q3(),ob();var n=se();return zv=n.Map,zv}var fR={},Wv,vR;function D3(){return vR||(vR=1,Wv={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}),Wv}var pR;function tn(){if(pR)return fR;pR=1,en();var n=D3(),e=pe(),t=Qr(),r=Qi();for(var i in n)t(e[i],i),r[i]=r.Array;return fR}var Hv,gR;function A3(){if(gR)return Hv;gR=1;var n=x3();return tn(),Hv=n,Hv}var Uv,yR;function M3(){return yR||(yR=1,Uv=A3()),Uv}var F3=M3(),ab=K(F3);class N3{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},je(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)&&me(t).call(t,r)===-1){const i=e[r];this.add(r,i)}}}clear(){this._groups=new ab,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 mR={},bR;function k3(){if(bR)return mR;bR=1;var n=z();return n({target:"Number",stat:!0},{isNaN:function(t){return t!==t}}),mR}var Vv,_R;function B3(){if(_R)return Vv;_R=1,k3();var n=se();return Vv=n.Number.isNaN,Vv}var Gv,wR;function j3(){if(wR)return Gv;wR=1;var n=B3();return Gv=n,Gv}var Kv,ER;function L3(){return ER||(ER=1,Kv=j3()),Kv}var z3=L3(),im=K(z3),SR={},Yv,OR;function W3(){if(OR)return Yv;OR=1;var n=pe(),e=n.isFinite;return Yv=Number.isFinite||function(r){return typeof r=="number"&&e(r)},Yv}var IR;function H3(){if(IR)return SR;IR=1;var n=z(),e=W3();return n({target:"Number",stat:!0},{isFinite:e}),SR}var Xv,$R;function U3(){if($R)return Xv;$R=1,H3();var n=se();return Xv=n.Number.isFinite,Xv}var Jv,TR;function V3(){if(TR)return Jv;TR=1;var n=U3();return Jv=n,Jv}var Zv,PR;function G3(){return PR||(PR=1,Zv=V3()),Zv}var K3=G3(),Rr=K(K3),RR={},qR;function Y3(){if(qR)return RR;qR=1;var n=z(),e=ft(),t=ls(),r=ee(),i=r(function(){t(1)});return n({target:"Object",stat:!0,forced:i},{keys:function(o){return t(e(o))}}),RR}var Qv,CR;function X3(){if(CR)return Qv;CR=1,Y3();var n=se();return Qv=n.Object.keys,Qv}var ep,xR;function J3(){if(xR)return ep;xR=1;var n=X3();return ep=n,ep}var tp,DR;function Z3(){return DR||(DR=1,tp=J3()),tp}var Q3=Z3(),Oe=K(Q3),AR={},MR;function eU(){if(MR)return AR;MR=1;var n=z(),e=vr().some,t=Ji(),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)}}),AR}var rp,FR;function tU(){if(FR)return rp;FR=1,eU();var n=We();return rp=n("Array","some"),rp}var ip,NR;function rU(){if(NR)return ip;NR=1;var n=Re(),e=tU(),t=Array.prototype;return ip=function(r){var i=r.some;return r===t||n(t,r)&&i===t.some?e:i},ip}var np,kR;function iU(){if(kR)return np;kR=1;var n=rU();return np=n,np}var sp,BR;function nU(){return BR||(BR=1,sp=iU()),sp}var sU=nU(),oU=K(sU),jR={},LR={},op,zR;function TN(){if(zR)return op;zR=1;var n=pe(),e=Li(),t=xt(),r=function(i){return e.slice(0,i.length)===i};return op=(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"})(),op}var ap,WR;function aU(){if(WR)return ap;WR=1;var n=TypeError;return ap=function(e,t){if(e<t)throw new n("Not enough arguments");return e},ap}var up,HR;function PN(){if(HR)return up;HR=1;var n=pe(),e=ao(),t=Fe(),r=TN(),i=Li(),s=Ki(),o=aU(),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 up=function(l,d){var h=d?2:1;return u?function(c,f){var v=o(arguments.length,1)>h,p=t(c)?c:a(c),b=v?s(arguments,h):[],y=v?function(){e(p,this,b)}:p;return d?l(y,f):l(y)}:l},up}var UR;function uU(){if(UR)return LR;UR=1;var n=z(),e=pe(),t=PN(),r=t(e.setInterval,!0);return n({global:!0,bind:!0,forced:e.setInterval!==r},{setInterval:r}),LR}var VR={},GR;function lU(){if(GR)return VR;GR=1;var n=z(),e=pe(),t=PN(),r=t(e.setTimeout,!0);return n({global:!0,bind:!0,forced:e.setTimeout!==r},{setTimeout:r}),VR}var KR;function RN(){return KR||(KR=1,uU(),lU()),jR}var lp,YR;function dU(){if(YR)return lp;YR=1,RN();var n=se();return lp=n.setTimeout,lp}var dp,XR;function hU(){return XR||(XR=1,dp=dU()),dp}var cU=hU(),mi=K(cU),hp={exports:{}},JR={},ZR;function fU(){if(ZR)return JR;ZR=1;var n=z(),e=Se(),t=vt().f;return n({target:"Object",stat:!0,forced:Object.defineProperty!==t,sham:!e},{defineProperty:t}),JR}var QR;function vU(){if(QR)return hp.exports;QR=1,fU();var n=se(),e=n.Object,t=hp.exports=function(i,s,o){return e.defineProperty(i,s,o)};return e.defineProperty.sham&&(t.sham=!0),hp.exports}var cp,eq;function qN(){if(eq)return cp;eq=1;var n=vU();return cp=n,cp}var fp,tq;function pU(){if(tq)return fp;tq=1;var n=qN();return fp=n,fp}var vp,rq;function gU(){if(rq)return vp;rq=1;var n=pU();return vp=n,vp}var pp,iq;function yU(){return iq||(iq=1,pp=gU()),pp}var mU=yU(),bU=K(mU),nq={},sq={},gp={},oq;function Oo(){if(oq)return gp;oq=1;var n=qe();return gp.f=n,gp}var yp,aq;function _e(){if(aq)return yp;aq=1;var n=se(),e=ze(),t=Oo(),r=vt().f;return yp=function(i){var s=n.Symbol||(n.Symbol={});e(s,i)||r(s,i,{value:t.f(i)})},yp}var mp,uq;function CN(){if(uq)return mp;uq=1;var n=it(),e=st(),t=qe(),r=ys();return mp=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})},mp}var lq;function _U(){if(lq)return sq;lq=1;var n=z(),e=pe(),t=it(),r=te(),i=Hi(),s=Se(),o=zi(),a=ee(),u=ze(),l=Re(),d=Dt(),h=It(),c=Dm(),f=gt(),v=ss(),p=ps(),b=ls(),y=wo(),g=eb(),S=po(),m=co(),w=vt(),O=Vm(),I=uo(),_=ys(),E=nb(),$=Ui(),T=bo(),P=us(),R=ho(),C=qe(),M=Oo(),G=_e(),L=CN(),J=Qr(),Q=Zr(),oe=vr().forEach,W=T("hidden"),ae="Symbol",ge="prototype",ye=Q.set,yt=Q.getterFor(ae),ce=Object[ge],Ue=e.Symbol,mt=Ue&&Ue[ge],Po=e.RangeError,Ro=e.TypeError,yr=e.QObject,rn=m.f,Ve=w.f,nn=g.f,qo=I.f,sn=r([].push),Ce=$("symbols"),bt=$("op-symbols"),Co=$("wks"),mr=!yr||!yr[ge]||!yr[ge].findChild,on=function(H,F,N){var k=rn(ce,F);k&&delete ce[F],Ve(H,F,N),k&&H!==ce&&Ve(ce,F,k)},br=s&&a(function(){return p(Ve({},"a",{get:function(){return Ve(this,"a",{value:7}).a}})).a!==7})?on:Ve,_r=function(H,F){var N=Ce[H]=p(mt);return ye(N,{type:ae,tag:H,description:F}),s||(N.description=F),N},At=function(F,N,k){F===ce&&At(bt,N,k),d(F);var U=c(N);return d(k),u(Ce,U)?(k.enumerable?(u(F,W)&&F[W][U]&&(F[W][U]=!1),k=p(k,{enumerable:v(0,!1)})):(u(F,W)||Ve(F,W,v(1,p(null))),F[W][U]=!0),br(F,U,k)):Ve(F,U,k)},wr=function(F,N){d(F);var k=h(N),U=b(k).concat(ln(k));return oe(U,function(ie){(!s||t(Er,k,ie))&&At(F,ie,k[ie])}),F},xo=function(F,N){return N===void 0?p(F):wr(p(F),N)},Er=function(F){var N=c(F),k=t(qo,this,N);return this===ce&&u(Ce,N)&&!u(bt,N)?!1:k||!u(this,N)||!u(Ce,N)||u(this,W)&&this[W][N]?k:!0},an=function(F,N){var k=h(F),U=c(N);if(!(k===ce&&u(Ce,U)&&!u(bt,U))){var ie=rn(k,U);return ie&&u(Ce,U)&&!(u(k,W)&&k[W][U])&&(ie.enumerable=!0),ie}},un=function(F){var N=nn(h(F)),k=[];return oe(N,function(U){!u(Ce,U)&&!u(P,U)&&sn(k,U)}),k},ln=function(H){var F=H===ce,N=nn(F?bt:h(H)),k=[];return oe(N,function(U){u(Ce,U)&&(!F||u(ce,U))&&sn(k,Ce[U])}),k};return o||(Ue=function(){if(l(mt,this))throw new Ro("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===ce&&t(k,bt,U),u(ie,W)&&u(ie[W],N)&&(ie[W][N]=!1);var dn=v(1,U);try{br(ie,N,dn)}catch(hn){if(!(hn instanceof Po))throw hn;on(ie,N,dn)}};return s&&mr&&br(ce,N,{configurable:!0,set:k}),_r(N,F)},mt=Ue[ge],_(mt,"toString",function(){return yt(this).tag}),_(Ue,"withoutSetter",function(H){return _r(R(H),H)}),I.f=Er,w.f=At,O.f=wr,m.f=an,y.f=g.f=un,S.f=ln,M.f=function(H){return _r(C(H),H)},s&&(E(mt,"description",{configurable:!0,get:function(){return yt(this).description}}),i||_(ce,"propertyIsEnumerable",Er,{unsafe:!0}))),n({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:Ue}),oe(b(Co),function(H){G(H)}),n({target:ae,stat:!0,forced:!o},{useSetter:function(){mr=!0},useSimple:function(){mr=!1}}),n({target:"Object",stat:!0,forced:!o,sham:!s},{create:xo,defineProperty:At,defineProperties:wr,getOwnPropertyDescriptor:an}),n({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:un}),L(),J(Ue,ae),P[W]=!0,sq}var dq={},bp,hq;function xN(){if(hq)return bp;hq=1;var n=zi();return bp=n&&!!Symbol.for&&!!Symbol.keyFor,bp}var cq;function wU(){if(cq)return dq;cq=1;var n=z(),e=st(),t=ze(),r=gt(),i=Ui(),s=xN(),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}}),dq}var fq={},vq;function EU(){if(vq)return fq;vq=1;var n=z(),e=ze(),t=as(),r=Wi(),i=Ui(),s=xN(),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]}}),fq}var pq={},_p,gq;function SU(){if(gq)return _p;gq=1;var n=te(),e=Jr(),t=Fe(),r=xt(),i=gt(),s=n([].push);return _p=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 h=u.length,c=!0;return function(f,v){if(c)return c=!1,v;if(e(this))return v;for(var p=0;p<h;p++)if(u[p]===f)return v}}},_p}var yq;function DN(){if(yq)return pq;yq=1;var n=z(),e=st(),t=ao(),r=it(),i=te(),s=ee(),o=Fe(),a=as(),u=Ki(),l=SU(),d=zi(),h=String,c=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 c([E])!=="[null]"||c({a:E})!=="{}"||c(Object(E))!=="{}"}),O=s(function(){return c("\uDF06\uD834")!=='"\\udf06\\ud834"'||c("\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,h(R),C)),!a(C))return C},t(c,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 c&&n({target:"JSON",stat:!0,arity:3,forced:w||O},{stringify:function($,T,P){var R=u(arguments),C=t(w?I:c,null,R);return O&&typeof C=="string"?b(C,g,_):C}}),pq}var mq={},bq;function OU(){if(bq)return mq;bq=1;var n=z(),e=zi(),t=ee(),r=po(),i=ft(),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)):[]}}),mq}var _q;function AN(){return _q||(_q=1,_U(),wU(),EU(),DN(),OU()),nq}var wq={},Eq;function MN(){if(Eq)return wq;Eq=1;var n=_e();return n("asyncDispose"),wq}var Sq={},Oq;function IU(){if(Oq)return Sq;Oq=1;var n=_e();return n("asyncIterator"),Sq}var Iq={},$q;function FN(){if($q)return Iq;$q=1;var n=_e();return n("dispose"),Iq}var Tq={},Pq;function $U(){if(Pq)return Tq;Pq=1;var n=_e();return n("hasInstance"),Tq}var Rq={},qq;function TU(){if(qq)return Rq;qq=1;var n=_e();return n("isConcatSpreadable"),Rq}var Cq={},xq;function NN(){if(xq)return Cq;xq=1;var n=_e();return n("iterator"),Cq}var Dq={},Aq;function PU(){if(Aq)return Dq;Aq=1;var n=_e();return n("match"),Dq}var Mq={},Fq;function RU(){if(Fq)return Mq;Fq=1;var n=_e();return n("matchAll"),Mq}var Nq={},kq;function qU(){if(kq)return Nq;kq=1;var n=_e();return n("replace"),Nq}var Bq={},jq;function CU(){if(jq)return Bq;jq=1;var n=_e();return n("search"),Bq}var Lq={},zq;function xU(){if(zq)return Lq;zq=1;var n=_e();return n("species"),Lq}var Wq={},Hq;function DU(){if(Hq)return Wq;Hq=1;var n=_e();return n("split"),Wq}var Uq={},Vq;function kN(){if(Vq)return Uq;Vq=1;var n=_e(),e=CN();return n("toPrimitive"),e(),Uq}var Gq={},Kq;function AU(){if(Kq)return Gq;Kq=1;var n=st(),e=_e(),t=Qr();return e("toStringTag"),t(n("Symbol"),"Symbol"),Gq}var Yq={},Xq;function MU(){if(Xq)return Yq;Xq=1;var n=_e();return n("unscopables"),Yq}var Jq={},Zq;function FU(){if(Zq)return Jq;Zq=1;var n=pe(),e=Qr();return e(n.JSON,"JSON",!0),Jq}var wp,Qq;function NU(){if(Qq)return wp;Qq=1,_N(),AN(),MN(),IU(),FN(),$U(),TU(),NN(),PU(),RU(),qU(),CU(),xU(),DU(),kN(),AU(),MU(),FU();var n=se();return wp=n.Symbol,wp}var Ep,eC;function kU(){if(eC)return Ep;eC=1;var n=NU();return tn(),Ep=n,Ep}var tC={},rC;function BU(){if(rC)return tC;rC=1;var n=qe(),e=vt().f,t=n("metadata"),r=Function.prototype;return r[t]===void 0&&e(r,t,{value:null}),tC}var iC={},nC;function jU(){return nC||(nC=1,MN()),iC}var sC={},oC;function LU(){return oC||(oC=1,FN()),sC}var aC={},uC;function zU(){if(uC)return aC;uC=1;var n=_e();return n("metadata"),aC}var Sp,lC;function WU(){if(lC)return Sp;lC=1;var n=kU();return BU(),jU(),LU(),zU(),Sp=n,Sp}var dC={},Op,hC;function BN(){if(hC)return Op;hC=1;var n=st(),e=te(),t=n("Symbol"),r=t.keyFor,i=e(t.prototype.valueOf);return Op=t.isRegisteredSymbol||function(o){try{return r(i(o))!==void 0}catch{return!1}},Op}var cC;function HU(){if(cC)return dC;cC=1;var n=z(),e=BN();return n({target:"Symbol",stat:!0},{isRegisteredSymbol:e}),dC}var fC={},Ip,vC;function jN(){if(vC)return Ip;vC=1;for(var n=Ui(),e=st(),t=te(),r=as(),i=qe(),s=e("Symbol"),o=s.isWellKnownSymbol,a=e("Object","getOwnPropertyNames"),u=t(s.prototype.valueOf),l=n("wks"),d=0,h=a(s),c=h.length;d<c;d++)try{var f=h[d];r(s[f])&&i(f)}catch{}return Ip=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},Ip}var pC;function UU(){if(pC)return fC;pC=1;var n=z(),e=jN();return n({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:e}),fC}var gC={},yC;function VU(){if(yC)return gC;yC=1;var n=_e();return n("customMatcher"),gC}var mC={},bC;function GU(){if(bC)return mC;bC=1;var n=_e();return n("observable"),mC}var _C={},wC;function KU(){if(wC)return _C;wC=1;var n=z(),e=BN();return n({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:e}),_C}var EC={},SC;function YU(){if(SC)return EC;SC=1;var n=z(),e=jN();return n({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:e}),EC}var OC={},IC;function XU(){if(IC)return OC;IC=1;var n=_e();return n("matcher"),OC}var $C={},TC;function JU(){if(TC)return $C;TC=1;var n=_e();return n("metadataKey"),$C}var PC={},RC;function ZU(){if(RC)return PC;RC=1;var n=_e();return n("patternMatch"),PC}var qC={},CC;function QU(){if(CC)return qC;CC=1;var n=_e();return n("replaceAll"),qC}var $p,xC;function eV(){if(xC)return $p;xC=1;var n=WU();return HU(),UU(),VU(),GU(),KU(),YU(),XU(),JU(),ZU(),QU(),$p=n,$p}var Tp,DC;function tV(){return DC||(DC=1,Tp=eV()),Tp}var rV=tV(),Ps=K(rV),Pp,AC;function iV(){if(AC)return Pp;AC=1,en(),ob(),NN();var n=Oo();return Pp=n.f("iterator"),Pp}var Rp,MC;function nV(){if(MC)return Rp;MC=1;var n=iV();return tn(),Rp=n,Rp}var qp,FC;function sV(){if(FC)return qp;FC=1;var n=nV();return qp=n,qp}var Cp,NC;function oV(){if(NC)return Cp;NC=1;var n=sV();return Cp=n,Cp}var xp,kC;function aV(){return kC||(kC=1,xp=oV()),xp}var uV=aV(),lV=K(uV);function Bn(n){"@babel/helpers - typeof";return Bn=typeof Ps=="function"&&typeof lV=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Ps=="function"&&e.constructor===Ps&&e!==Ps.prototype?"symbol":typeof e},Bn(n)}var Dp,BC;function dV(){if(BC)return Dp;BC=1,kN();var n=Oo();return Dp=n.f("toPrimitive"),Dp}var Ap,jC;function hV(){if(jC)return Ap;jC=1;var n=dV();return Ap=n,Ap}var Mp,LC;function cV(){if(LC)return Mp;LC=1;var n=hV();return Mp=n,Mp}var Fp,zC;function fV(){if(zC)return Fp;zC=1;var n=cV();return Fp=n,Fp}var Np,WC;function vV(){return WC||(WC=1,Np=fV()),Np}var pV=vV(),gV=K(pV);function yV(n,e){if(Bn(n)!="object"||!n)return n;var t=n[gV];if(t!==void 0){var r=t.call(n,e);if(Bn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function mV(n){var e=yV(n,"string");return Bn(e)=="symbol"?e:e+""}function Ft(n,e,t){return(e=mV(e))in n?bU(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var HC={},kp,UC;function ub(){return UC||(UC=1,kp=`
|
|
129
|
-
\v\f\r \u2028\u2029\uFEFF`),kp}var Bp,VC;function LN(){if(VC)return Bp;VC=1;var n=te(),e=Gt(),t=gt(),r=ub(),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 Bp={start:a(1),end:a(2),trim:a(3)},Bp}var jp,GC;function bV(){if(GC)return jp;GC=1;var n=pe(),e=ee(),t=te(),r=gt(),i=LN().trim,s=ub(),o=n.parseInt,a=n.Symbol,u=a&&a.iterator,l=/^[+-]?0x/i,d=t(l.exec),h=o(s+"08")!==8||o(s+"0x16")!==22||u&&!e(function(){o(Object(u))});return jp=h?function(f,v){var p=i(r(f));return o(p,v>>>0||(d(l,p)?16:10))}:o,jp}var KC;function _V(){if(KC)return HC;KC=1;var n=z(),e=bV();return n({global:!0,forced:parseInt!==e},{parseInt:e}),HC}var Lp,YC;function wV(){if(YC)return Lp;YC=1,_V();var n=se();return Lp=n.parseInt,Lp}var zp,XC;function EV(){if(XC)return zp;XC=1;var n=wV();return zp=n,zp}var Wp,JC;function SV(){return JC||(JC=1,Wp=EV()),Wp}var OV=SV(),ZC=K(OV),QC={},Hp,ex;function IV(){if(ex)return Hp;ex=1;var n=pe(),e=ee(),t=te(),r=gt(),i=LN().trim,s=ub(),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 Hp=d?function(c){var f=i(r(c)),v=a(f);return v===0&&o(f,0)==="-"?-0:v}:a,Hp}var tx;function $V(){if(tx)return QC;tx=1;var n=z(),e=IV();return n({global:!0,forced:parseFloat!==e},{parseFloat:e}),QC}var Up,rx;function TV(){if(rx)return Up;rx=1,$V();var n=se();return Up=n.parseFloat,Up}var Vp,ix;function PV(){if(ix)return Vp;ix=1;var n=TV();return Vp=n,Vp}var Gp,nx;function RV(){return nx||(nx=1,Gp=PV()),Gp}var qV=RV(),zN=K(qV),sx={},ox;function CV(){if(ox)return sx;ox=1;var n=z(),e=vr().filter,t=gs(),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)}}),sx}var Kp,ax;function xV(){if(ax)return Kp;ax=1,CV();var n=We();return Kp=n("Array","filter"),Kp}var Yp,ux;function DV(){if(ux)return Yp;ux=1;var n=Re(),e=xV(),t=Array.prototype;return Yp=function(r){var i=r.filter;return r===t||n(t,r)&&i===t.filter?e:i},Yp}var Xp,lx;function AV(){if(lx)return Xp;lx=1;var n=DV();return Xp=n,Xp}var Jp,dx;function MV(){return dx||(dx=1,Jp=AV()),Jp}var FV=MV(),Xt=K(FV),hx={},cx;function NV(){if(cx)return hx;cx=1;var n=z(),e=ee(),t=eb().f,r=e(function(){return!Object.getOwnPropertyNames(1)});return n({target:"Object",stat:!0,forced:r},{getOwnPropertyNames:t}),hx}var Zp,fx;function kV(){if(fx)return Zp;fx=1,NV();var n=se(),e=n.Object;return Zp=function(r){return e.getOwnPropertyNames(r)},Zp}var Qp,vx;function BV(){if(vx)return Qp;vx=1;var n=kV();return Qp=n,Qp}var eg,px;function jV(){return px||(px=1,eg=BV()),eg}var LV=jV(),zV=K(LV),tg,gx;function WV(){if(gx)return tg;gx=1,AN();var n=se();return tg=n.Object.getOwnPropertySymbols,tg}var rg,yx;function HV(){if(yx)return rg;yx=1;var n=WV();return rg=n,rg}var ig,mx;function UV(){return mx||(mx=1,ig=HV()),ig}var VV=UV(),ur=K(VV),ng={exports:{}},bx={},_x;function GV(){if(_x)return bx;_x=1;var n=z(),e=ee(),t=It(),r=co().f,i=Se(),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)}}),bx}var wx;function KV(){if(wx)return ng.exports;wx=1,GV();var n=se(),e=n.Object,t=ng.exports=function(i,s){return e.getOwnPropertyDescriptor(i,s)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),ng.exports}var sg,Ex;function YV(){if(Ex)return sg;Ex=1;var n=KV();return sg=n,sg}var og,Sx;function XV(){return Sx||(Sx=1,og=YV()),og}var JV=XV(),pr=K(JV),Ox={},ag,Ix;function ZV(){if(Ix)return ag;Ix=1;var n=st(),e=te(),t=wo(),r=po(),i=Dt(),s=e([].concat);return ag=n("Reflect","ownKeys")||function(a){var u=t.f(i(a)),l=r.f;return l?s(u,l(a)):u},ag}var $x;function QV(){if($x)return Ox;$x=1;var n=z(),e=Se(),t=ZV(),r=It(),i=co(),s=_o();return n({target:"Object",stat:!0,sham:!e},{getOwnPropertyDescriptors:function(a){for(var u=r(a),l=i.f,d=t(u),h={},c=0,f,v;d.length>c;)v=l(u,f=d[c++]),v!==void 0&&s(h,f,v);return h}}),Ox}var ug,Tx;function eG(){if(Tx)return ug;Tx=1,QV();var n=se();return ug=n.Object.getOwnPropertyDescriptors,ug}var lg,Px;function tG(){if(Px)return lg;Px=1;var n=eG();return lg=n,lg}var dg,Rx;function rG(){return Rx||(Rx=1,dg=tG()),dg}var iG=rG(),lr=K(iG),hg={exports:{}},qx={},Cx;function nG(){if(Cx)return qx;Cx=1;var n=z(),e=Se(),t=Vm().f;return n({target:"Object",stat:!0,forced:Object.defineProperties!==t,sham:!e},{defineProperties:t}),qx}var xx;function sG(){if(xx)return hg.exports;xx=1,nG();var n=se(),e=n.Object,t=hg.exports=function(i,s){return e.defineProperties(i,s)};return e.defineProperties.sham&&(t.sham=!0),hg.exports}var cg,Dx;function oG(){if(Dx)return cg;Dx=1;var n=sG();return cg=n,cg}var fg,Ax;function aG(){return Ax||(Ax=1,fg=oG()),fg}var uG=aG(),Io=K(uG),vg,Mx;function lG(){return Mx||(Mx=1,vg=qN()),vg}var dG=lG(),$o=K(dG);function lb(n,e){const t=["node","edge","label"];let r=!0;const i=Zt(e,"chosen");if(typeof i=="boolean")r=i;else if(typeof i=="object"){if(me(t).call(t,n)===-1)throw new Error("choosify: subOption '"+n+"' should be one of '"+t.join("', '")+"'");const s=Zt(e,["chosen",n]);(typeof s=="boolean"||typeof s=="function")&&(r=s)}return r}function nm(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 Hs(n){return typeof n=="string"&&n!==""}function WN(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 Fx={},Nx;function hG(){if(Nx)return Fx;Nx=1;var n=z(),e=Jr(),t=hN(),r=Ne(),i=vo(),s=Yt(),o=It(),a=_o(),u=qe(),l=gs(),d=Ki(),h=l("slice"),c=u("species"),f=Array,v=Math.max;return n({target:"Array",proto:!0,forced:!h},{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[c],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}}),Fx}var pg,kx;function cG(){if(kx)return pg;kx=1,hG();var n=We();return pg=n("Array","slice"),pg}var gg,Bx;function fG(){if(Bx)return gg;Bx=1;var n=Re(),e=cG(),t=Array.prototype;return gg=function(r){var i=r.slice;return r===t||n(t,r)&&i===t.slice?e:i},gg}var yg,jx;function vG(){if(jx)return yg;jx=1;var n=fG();return yg=n,yg}var mg,Lx;function pG(){return Lx||(Lx=1,mg=vG()),mg}var gG=pG(),li=K(gG),bg,zx;function yG(){if(zx)return bg;zx=1,en();var n=We();return bg=n("Array","values"),bg}var _g,Wx;function mG(){if(Wx)return _g;Wx=1;var n=yG();return _g=n,_g}var wg,Hx;function bG(){if(Hx)return wg;Hx=1,tn();var n=Zi(),e=ze(),t=Re(),r=mG(),i=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return wg=function(o){var a=o.values;return o===i||t(i,o)&&a===i.values||e(s,n(o))?r:a},wg}var Eg,Ux;function _G(){return Ux||(Ux=1,Eg=bG()),Eg}var wG=_G(),HN=K(wG);class EG{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=je({},HN(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={};je(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 SG={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/};class Vx{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=SG[e];i!==void 0?r=i:r=new RegExp(e),t=e.length}return[r,t]}}class OG{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 EG(s)}process(e){if(!Hs(e))return this.lines.finalize();const t=this.parent.fontOptions;e=e.replace(/\r\n/g,`
|
|
130
|
-
`),e=e.replace(/\r/g,`
|
|
131
|
-
`);const r=String(e).split(`
|
|
132
|
-
`),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 Vx(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 Vx(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(li(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(li(o).call(o,0,a),t),i[0]=li(o).call(o,a)}else{let o=s;i[s-1]===" "?s--:i[o]===" "&&o++;const a=li(i).call(i,0,s).join("");s==i.length&&r?this.lines.append(a,t):this.lines.newLine(a,t),i=li(i).call(i,o)}}}}const pn=["bold","ital","boldital","mono"];class bi{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),Hs(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(pn,t=>{this.fontOptions[t]={}}),bi.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=Zt(e,"widthConstraint");if(typeof r=="number")t.maxWdt=Number(r),t.minWdt=Number(r);else if(typeof r=="object"){const s=Zt(e,["widthConstraint","maximum"]);typeof s=="number"&&(t.maxWdt=Number(s));const o=Zt(e,["widthConstraint","minimum"]);typeof o=="number"&&(t.minWdt=Number(o))}const i=Zt(e,"heightConstraint");if(typeof i=="number")t.minHgt=Number(i);else if(typeof i=="object"){const s=Zt(e,["heightConstraint","minimum"]);typeof s=="number"&&(t.minHgt=Number(s));const o=Zt(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),le(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=lb("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={};bi.parseFontString(s,i)&&(i=s),Z(i,(o,a)=>{o!==void 0&&(Object.prototype.hasOwnProperty.call(t,a)||(me(pn).call(pn,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(bi.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<pn.length;++r){const i=pn[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[h,c]=this._getColor(d.color,s,d.strokeColor);d.strokeWidth>0&&(e.lineWidth=d.strokeWidth,e.strokeStyle=c,e.lineJoin="round"),e.fillStyle=h,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=at(i,o),s=at(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 OG(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)}}var Gx={},Sg,Kx;function IG(){if(Kx)return Sg;Kx=1;var n=ft(),e=vo(),t=Yt();return Sg=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},Sg}var Yx;function $G(){if(Yx)return Gx;Yx=1;var n=z(),e=IG(),t=Gm();return n({target:"Array",proto:!0},{fill:e}),t("fill"),Gx}var Og,Xx;function TG(){if(Xx)return Og;Xx=1,$G();var n=We();return Og=n("Array","fill"),Og}var Ig,Jx;function PG(){if(Jx)return Ig;Jx=1;var n=Re(),e=TG(),t=Array.prototype;return Ig=function(r){var i=r.fill;return r===t||n(t,r)&&i===t.fill?e:i},Ig}var $g,Zx;function RG(){if(Zx)return $g;Zx=1;var n=PG();return $g=n,$g}var Tg,Qx;function qG(){return Qx||(Qx=1,Tg=RG()),Tg}var CG=qG(),To=K(CG);class ei{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),To(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 xG=class extends ei{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),CF(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 db extends ei{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),Fm(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 DG=class extends db{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 AG extends db{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 gr extends ei{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),PW(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 eD(n,e){var t=Oe(n);if(ur){var r=ur(n);e&&(r=Xt(r).call(r,function(i){return pr(n,i).enumerable})),t.push.apply(t,r)}return t}function MG(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?fe(t=eD(Object(i),!0)).call(t,function(s){Ft(n,s,i[s])}):lr?Io(n,lr(i)):fe(r=eD(Object(i))).call(r,function(s){$o(n,s,pr(i,s))})}return n}class FG extends gr{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:MG({},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 NG extends ei{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),xF(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 kG=class extends gr{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 BG extends gr{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 tD extends ei{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),Ky(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 jG extends ei{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 LG=class extends db{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,h=(i?d:l)/this.body.view.scale;e.lineWidth=Math.min(this.width,h),e.beginPath();let c=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&&(c=at(c,o.opacity),f=at(f,o.opacity)),e.strokeStyle=c,e.fillStyle=f,e.rect(this.left-.5*e.lineWidth,this.top-.5*e.lineWidth,this.width+e.lineWidth,this.height+e.lineWidth),To(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 zG extends gr{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 WG extends gr{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 HG extends gr{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 UG extends ei{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 VG=class extends gr{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 GG extends gr{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 rD(n,e){var t=Oe(n);if(ur){var r=ur(n);e&&(r=Xt(r).call(r,function(i){return pr(n,i).enumerable})),t.push.apply(t,r)}return t}function iD(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?fe(t=rD(Object(i),!0)).call(t,function(s){Ft(n,s,i[s])}):lr?Io(n,lr(i)):fe(r=rD(Object(i))).call(r,function(s){$o(n,s,pr(i,s))})}return n}class ve{constructor(e,t,r,i,s,o){this.options=nr(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 bi(this.body,this.options,!1),this.setOptions(e)}attachEdge(e){var t;me(t=this.edges).call(t,e)===-1&&this.edges.push(e)}detachEdge(e){var t;const r=me(t=this.edges).call(t,e);if(r!=-1){var i;sr(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");ve.checkMass(e,this.id),e.x!==void 0&&(e.x===null?(this.x=void 0,this.predefinedPosition=!1):(this.x=ZC(e.x),this.predefinedPosition=!0)),e.y!==void 0&&(e.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=ZC(e.y),this.predefinedPosition=!0)),e.size!==void 0&&(this.baseSize=e.size),e.value!==void 0&&(e.value=zN(e.value)),ve.parseOptions(this.options,e,!0,this.globalOptions,this.grouplist);const r=[e,this.options,this.defaultOptions];return this.chooser=lb("node",r),this._load_images(),this.updateLabelModule(e),e.opacity!==void 0&&ve.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&&(ve.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=Xt(i=zV(t)).call(i,l=>t[l]!=null);u.push("font"),zs(u,e,a),e.color=Qy(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(zs(["color","fixed","shadow"],e,t,r),ve.checkMass(t),e.opacity!==void 0&&(ve.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&&(ve.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&&!ve.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),ot(e,t,"shadow",i),t.color!==void 0&&t.color!==null){const a=Qy(t.color);sN(e.color,a)}else r===!0&&t.color===null&&(e.color=nr(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=nr(i.font)),ve.updateGroupOptions(e,t,s),t.scaling!==void 0&&ot(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=at(e.borderColor,t),e.color=at(e.color,t),e.shadowColor=at(e.shadowColor,t)}return e}updateLabelModule(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),ve.updateGroupOptions(this.options,iD(iD({},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 xG(this.options,this.body,this.labelModule);break;case"circle":this.shape=new DG(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new AG(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new FG(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new NG(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new kG(this.options,this.body,this.labelModule);break;case"dot":this.shape=new BG(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new tD(this.options,this.body,this.labelModule);break;case"icon":this.shape=new jG(this.options,this.body,this.labelModule);break;case"image":this.shape=new LG(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new zG(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new WG(this.options,this.body,this.labelModule);break;case"star":this.shape=new HG(this.options,this.body,this.labelModule);break;case"text":this.shape=new UG(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new VG(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new GG(this.options,this.body,this.labelModule);break;default:this.shape=new tD(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()&&nm(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),nm(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.",lN),e.mass=1}}}class KG{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=nr(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(ve.parseOptions(this.options,e),e.opacity!==void 0&&(im(e.opacity)||!Rr(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 Oe(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(SF("id",e))this.body.data.nodes=e;else if(wt(e))this.body.data.nodes=new ks,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new ks;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=oU(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]:ve;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(wt(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),mi(()=>{this.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}var nD={},Pg,sD;function YG(){if(sD)return Pg;sD=1;var n=Gi(),e=gt(),t=Gt(),r=RangeError;return Pg=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},Pg}var Rg,oD;function XG(){if(oD)return Rg;oD=1;var n=te(),e=RF(),t=gt(),r=YG(),i=Gt(),s=n(r),o=n("".slice),a=Math.ceil,u=function(l){return function(d,h,c){var f=t(i(d)),v=e(h),p=f.length,b=c===void 0?" ":t(c),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 Rg={start:u(!1),end:u(!0)},Rg}var qg,aD;function JG(){if(aD)return qg;aD=1;var n=te(),e=ee(),t=XG().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),h=n(o.getUTCHours),c=n(o.getUTCMilliseconds),f=n(o.getUTCMinutes),v=n(o.getUTCMonth),p=n(o.getUTCSeconds);return qg=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=c(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(h(y),2,0)+":"+t(f(y),2,0)+":"+t(p(y),2,0)+"."+t(S,3,0)+"Z"}:a,qg}var uD;function ZG(){if(uD)return nD;uD=1;var n=z(),e=it(),t=ft(),r=IF(),i=JG(),s=xt(),o=ee(),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),h=r(d,"number");return typeof h=="number"&&!isFinite(h)?null:!("toISOString"in d)&&s(d)==="Date"?e(i,d):d.toISOString()}}),nD}var Cg,lD;function QG(){if(lD)return Cg;lD=1,ZG(),DN();var n=se(),e=ao();return n.JSON||(n.JSON={stringify:JSON.stringify}),Cg=function(r,i,s){return e(n.JSON.stringify,null,arguments)},Cg}var xg,dD;function eK(){if(dD)return xg;dD=1;var n=QG();return xg=n,xg}var Dg,hD;function tK(){return hD||(hD=1,Dg=eK()),Dg}var rK=tK(),UN=K(rK),cD={},fD;function iK(){if(fD)return cD;fD=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,h=0,c,f;l<d;)c=t(arguments[l++]),h<c?(f=h/c,u=u*f*f+1,h=c):c>0?(f=c/h,u+=f*f):u+=c;return h===1/0?1/0:h*r(u)}}),cD}var Ag,vD;function nK(){if(vD)return Ag;vD=1,iK();var n=se();return Ag=n.Math.hypot,Ag}var Mg,pD;function sK(){if(pD)return Mg;pD=1;var n=nK();return Mg=n,Mg}var Fg,gD;function oK(){return gD||(gD=1,Fg=sK()),Fg}var aK=oK(),uK=K(aK);class Ee{static transform(e,t){wt(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 lK=class extends Ee{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 dK extends Ee{static draw(e,t){const r=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return Ee.transform(r,t),Ee.drawPath(e,r),!0}}class hK{static draw(e,t){const r=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return Ee.transform(r,t),Ee.drawPath(e,r),!0}}class cK{static draw(e,t){const r={x:-.4,y:0};Ee.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 fK{static draw(e,t){const r={x:-.3,y:0};Ee.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 vK{static draw(e,t){const r=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return Ee.transform(r,t),Ee.drawPath(e,r),!0}}class pK{static draw(e,t){const r=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return Ee.transform(r,t),Ee.drawPath(e,r),!0}}class gK{static draw(e,t){const r={x:-.4,y:0};return Ee.transform(r,t),Fm(e,r.x,r.y,t.length*.4),!0}}class yK{static draw(e,t){const r=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return Ee.transform(r,t),Ee.drawPath(e,r),!0}}class mK{static draw(e,t){const r=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return Ee.transform(r,t),Ee.drawPath(e,r),!0}}class bK{static draw(e,t){const r=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return Ee.transform(r,t),Ee.drawPath(e,r),!0}}class _K{static draw(e,t){const r=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return Ee.transform(r,t),Ee.drawPath(e,r),!0}}class VN{static draw(e,t){let r;switch(t.type&&(r=t.type.toLowerCase()),r){case"image":return lK.draw(e,t);case"circle":return gK.draw(e,t);case"box":return mK.draw(e,t);case"crow":return hK.draw(e,t);case"curve":return cK.draw(e,t);case"diamond":return bK.draw(e,t);case"inv_curve":return fK.draw(e,t);case"triangle":return vK.draw(e,t);case"inv_triangle":return pK.draw(e,t);case"bar":return yK.draw(e,t);case"vee":return _K.draw(e,t);case"arrow":default:return dK.draw(e,t)}}}function yD(n,e){var t=Oe(n);if(ur){var r=ur(n);e&&(r=Xt(r).call(r,function(i){return pr(n,i).enumerable})),t.push.apply(t,r)}return t}function mD(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?fe(t=yD(Object(i),!0)).call(t,function(s){Ft(n,s,i[s])}):lr?Io(n,lr(i)):fe(r=yD(Object(i))).call(r,function(s){$o(n,s,pr(i,s))})}return n}class GN{constructor(e,t,r){Ft(this,"color",{}),Ft(this,"colorDirty",!0),Ft(this,"hoverWidth",1.5),Ft(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=wt(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)DF(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]=li(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=WN(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,h=.05;let c,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,c=this._pointOnCircle(i,s,d,f);const b=Math.atan2(e.y-c.y,e.x-c.x),y=e.distanceToBorder(t,b)+v,g=Math.sqrt(Math.pow(c.x-e.x,2)+Math.pow(c.y-e.y,2)),S=y-g;if(Math.abs(S)<h)break;S>0?u>0?o=f:a=f:u>0?a=f:o=f,++p}while(o<=a&&p<l);return mD(mD({},c),{},{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=at(this.from.options.color.border,t.opacity),s=at(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"?at(this.to.options.color.border,t.opacity):at(this.from.options.color.border,t.opacity)}else return at(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}),h=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(h.y-i,h.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,h=u-o;return Math.abs(Math.sqrt(d*d+h*h)-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 h=e+d*a,c=t+d*u,f=h-s,v=c-o;return Math.sqrt(f*f+v*v)}getArrowData(e,t,r,i,s,o){let a,u,l,d,h,c,f;const v=o.width;t==="from"?(l=this.from,d=this.to,h=o.fromArrowScale<0,c=Math.abs(o.fromArrowScale),f=o.fromArrowType):t==="to"?(l=this.to,d=this.from,h=o.toArrowScale<0,c=Math.abs(o.toArrowScale),f=o.toArrowType):(l=this.to,d=this.from,h=o.middleArrowScale<0,c=Math.abs(o.middleArrowScale),f=o.middleArrowType);const p=15*c+3*v;if(l!=d){const S=uK(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=(h?-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,VN.draw(e,s)&&(this.enableShadow(e,t),To(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=wt(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 bD(n,e){var t=Oe(n);if(ur){var r=ur(n);e&&(r=Xt(r).call(r,function(i){return pr(n,i).enumerable})),t.push.apply(t,r)}return t}function _D(n){for(var e=1;e<arguments.length;e++){var t,r,i=arguments[e]!=null?arguments[e]:{};e%2?fe(t=bD(Object(i),!0)).call(t,function(s){Ft(n,s,i[s])}):lr?Io(n,lr(i)):fe(r=bD(Object(i))).call(r,function(s){$o(n,s,pr(i,s))})}return n}class hb extends GN{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,h,c=this.options.endPointOffset?this.options.endPointOffset.to:0;e.id===this.from.id&&(l=this.from,o=!0,c=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(c=0);let f=0;do{h=(u+a)*.5,d=this.getPoint(h,r);const v=Math.atan2(l.y-d.y,l.x-d.x),p=l.distanceToBorder(t,v)+c,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=h:a=h:o===!1?a=h:u=h,++f}while(u<=a&&f<i);return _D(_D({},d),{},{t:h})}_getDistanceToBezierEdge(e,t,r,i,s,o,a){let u=1e9,l,d,h,c,f,v=e,p=t;for(d=1;d<10;d++)h=.1*d,c=Math.pow(1-h,2)*e+2*h*(1-h)*a.x+Math.pow(h,2)*r,f=Math.pow(1-h,2)*t+2*h*(1-h)*a.y+Math.pow(h,2)*i,d>0&&(l=this._getDistanceToLine(v,p,c,f,s,o),u=l<u?l:u),v=c,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 wD extends hb{constructor(e,t,r){super(e,t,r),Ft(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 ED extends hb{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 wK extends hb{constructor(e,t,r){super(e,t,r)}_getDistanceToBezierEdge2(e,t,r,i,s,o,a,u){let l=1e9,d=e,h=t;const c=[0,0,0,0];for(let f=1;f<10;f++){const v=.1*f;c[0]=Math.pow(1-v,3),c[1]=3*v*Math.pow(1-v,2),c[2]=3*Math.pow(v,2)*(1-v),c[3]=Math.pow(v,3);const p=c[0]*e+c[1]*a.x+c[2]*u.x+c[3]*r,b=c[0]*t+c[1]*a.y+c[2]*u.y+c[3]*i;if(f>0){const y=this._getDistanceToLine(d,h,p,b,s,o);l=y<l?y:l}d=p,h=b}return l}}class SD extends wK{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 OD extends GN{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 or{constructor(e,t,r,i,s){if(t===void 0)throw new Error("No body provided");this.options=nr(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 bi(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;or.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=zN(e.value));const r=[e,this.options,this.defaultOptions];return this.chooser=lb("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(Xi(["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&&(Rr(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&&(Rr(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"))),Hs(t.label)?e.label=t.label:Hs(e.label)||(e.label=void 0),ot(e,t,"smooth",i),ot(e,t,"shadow",i),ot(e,t,"background",i),t.dashes!==void 0&&t.dashes!==null?e.dashes=t.dashes:r===!0&&t.dashes===null&&(e.dashes=En(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),ot(e.scaling,t.scaling,"label",i.scaling)):r===!0&&t.scaling===null&&(e.scaling=En(i.scaling)),t.arrows!==void 0&&t.arrows!==null)if(typeof t.arrows=="string"){const a=t.arrows.toLowerCase();e.arrows.to.enabled=me(a).call(a,"to")!=-1,e.arrows.middle.enabled=me(a).call(a,"middle")!=-1,e.arrows.from.enabled=me(a).call(a,"from")!=-1}else if(typeof t.arrows=="object")ot(e.arrows,t.arrows,"to",i.arrows),ot(e.arrows,t.arrows,"middle",i.arrows),ot(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:"+UN(t.arrows));else r===!0&&t.arrows===null&&(e.arrows=En(i.arrows));if(t.color!==void 0&&t.color!==null){const a=gi(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,u=e.color;if(s)le(u,i.color,!1,r);else for(const l in u)Object.prototype.hasOwnProperty.call(u,l)&&delete u[l];if(gi(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=nr(i.color));r===!0&&t.font===null&&(e.font=nr(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 wD&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof SD&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof ED&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof OD&&e.type.enabled===!1)&&(r=!1),r===!0&&(t=this.cleanup())),r===!0?e.enabled===!0?e.type==="dynamic"?(t=!0,this.edgeType=new wD(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new SD(this.options,this.body,this.labelModule):this.edgeType=new ED(this.options,this.body,this.labelModule):this.edgeType=new OD(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=WN(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();nm(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 EK{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},le(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){or.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(SF("id",e))this.body.data.edges=e;else if(wt(e))this.body.data.edges=new ks,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new ks;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 or(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=[];fe(e).call(e,(i,s)=>{t[s]===void 0&&r.push(s)}),this.add(r,!0)}}var ID={},$D;function SK(){if($D)return ID;$D=1;var n=z(),e=te(),t=Date,r=e(t.prototype.getTime);return n({target:"Date",stat:!0},{now:function(){return r(new t)}}),ID}var Ng,TD;function OK(){if(TD)return Ng;TD=1,SK();var n=se();return Ng=n.Date.now,Ng}var kg,PD;function IK(){if(PD)return kg;PD=1;var n=OK();return kg=n,kg}var Bg,RD;function $K(){return RD||(RD=1,Bg=IK()),Bg}var TK=$K(),sm=K(TK);class KN{constructor(e,t,r){this.body=e,this.physicsBody=t,this.barnesHutTree,this.setOptions(r),this._rng=mo("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 h=Math.max(1e-5,Math.abs(a-s)),c=.5*h,f=.5*(s+a),v=.5*(o+u),p={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:f-c,maxX:f+c,minY:v-c,maxY:v+c},size:h,calcSize:1/h,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 PK{constructor(e,t,r){this._rng=mo("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,h=this.physicsBody.forces,c=this.options.nodeDistance,f=-2/3/c,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*c&&(r<.5*c?o=1:o=f*r+v,o=o/r,i=e*o,s=t*o,h[a.id].x-=i,h[a.id].y-=s,h[u.id].x+=i,h[u.id].y+=s)}}}class RK{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,h=u.y-o.y,c=Math.sqrt(d*d+h*h),f=.05;let v;c<l?v=-Math.pow(f*c,2)+Math.pow(f*l,2):v=0,c!==0&&(v=v/c);const p=d*v,b=h*v;r[o.id].x-=p,r[o.id].y-=b,r[u.id].x+=p,r[u.id].y+=b}}}}}class jg{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 qK{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,h=this.physicsBody.physicsEdgeIndices,c=this.physicsBody.physicsNodeIndices,f=this.physicsBody.forces;for(let m=0;m<c.length;m++){const w=c[m];f[w].springFx=0,f[w].springFy=0}for(let m=0;m<h.length;m++)t=l[h[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<c.length;m++){const w=c[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<c.length;m++){const w=c[m];b+=f[w].x,y+=f[w].y}const g=b/c.length,S=y/c.length;for(let m=0;m<c.length;m++){const w=c[m];f[w].x-=g,f[w].y-=S}}}class xs{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 CK extends KN{constructor(e,t,r){super(e,t,r),this._rng=mo("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 xK extends xs{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 DK{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}},je(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,zs(["stabilization"],this.options,e),ot(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"||im(t.x))&&(t.x=0),(typeof t.y!="number"||im(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 CK(this.body,this.physicsBody,e),this.edgesSolver=new jg(this.body,this.physicsBody,e),this.gravitySolver=new xK(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new PK(this.body,this.physicsBody,e),this.edgesSolver=new jg(this.body,this.physicsBody,e),this.gravitySolver=new xs(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new RK(this.body,this.physicsBody,e),this.edgesSolver=new qK(this.body,this.physicsBody,e),this.gravitySolver=new xs(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new KN(this.body,this.physicsBody,e),this.edgesSolver=new jg(this.body,this.physicsBody,e),this.gravitySolver=new xs(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=sm();this.physicsTick(),(sm()-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)&&mi(()=>{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=Oe(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,mi(()=>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;mi(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,h=em((180-Math.min(1,Math.max(0,a*u))*180)/360,1,1),c={x:i.x+o*s.x,y:i.y+o*s.y};e.lineWidth=l,e.strokeStyle=h,e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(c.x,c.y),e.stroke();const f=Math.atan2(s.y,s.x);e.fillStyle=h,VN.draw(e,{type:"arrow",point:c,angle:f,length:d}),To(e).call(e)}}}var qD={},CD;function AK(){if(CD)return qD;CD=1;var n=z(),e=te(),t=Jr(),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)}}),qD}var Lg,xD;function MK(){if(xD)return Lg;xD=1,AK();var n=We();return Lg=n("Array","reverse"),Lg}var zg,DD;function FK(){if(DD)return zg;DD=1;var n=Re(),e=MK(),t=Array.prototype;return zg=function(r){var i=r.reverse;return r===t||n(t,r)&&i===t.reverse?e:i},zg}var Wg,AD;function NK(){if(AD)return Wg;AD=1;var n=FK();return Wg=n,Wg}var Hg,MD;function kK(){return MD||(MD=1,Hg=NK()),Hg}var BK=kK(),_i=K(BK);const Be=[];for(let n=0;n<256;++n)Be.push((n+256).toString(16).slice(1));function jK(n,e=0){return(Be[n[e+0]]+Be[n[e+1]]+Be[n[e+2]]+Be[n[e+3]]+"-"+Be[n[e+4]]+Be[n[e+5]]+"-"+Be[n[e+6]]+Be[n[e+7]]+"-"+Be[n[e+8]]+Be[n[e+9]]+"-"+Be[n[e+10]]+Be[n[e+11]]+Be[n[e+12]]+Be[n[e+13]]+Be[n[e+14]]+Be[n[e+15]]).toLowerCase()}let Ug;const LK=new Uint8Array(16);function zK(){if(!Ug){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ug=crypto.getRandomValues.bind(crypto)}return Ug(LK)}const WK=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var FD={randomUUID:WK};function In(n,e,t){if(FD.randomUUID&&!n)return FD.randomUUID();n=n||{};const r=n.random??n.rng?.()??zK();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,jK(r)}class Ye{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"?(le(r,e.options,!0),r.x=e.x,r.y=e.y,r.amountOfConnections=e.edges.length):le(r,e.options,!0),r}}class HK extends ve{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=me(s=i.clusteringEdgeReplacingIds).call(s,r.id);a!==-1&&(Z(r.clusteringEdgeReplacingIds,u=>{i.clusteringEdgeReplacingIds.push(u),this.body.edges[u].edgeReplacedById=i.id}),sr(o=i.clusteringEdgeReplacingIds).call(o,a,1))})}),t.edges=[]}}class UK{constructor(e){this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},je(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={},h={},c=this.body.nodeIndices[l],f=this.body.nodes[c];if(s[c]===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=Ye.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,c);if(v(f))h[o.id]=o,d[c]=f,d[y]=this.body.nodes[y],s[c]=!0;else{p=!1;break}}if(Oe(d).length>0&&Oe(h).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 h)y.edges[g]===void 0&&(y.edges[g]=h[g])}else i.push({nodes:d,edges:h})}}}}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=Ye.cloneOptions(s);o[u]=s;for(let h=0;h<s.edges.length;h++){const c=s.edges[h];if(this.clusteredEdges[c.id]===void 0){const f=this._getConnectedId(c,u);if(this.clusteredNodes[f]===void 0)if(f!==u)if(t.joinCondition===void 0)a[c.id]=c,o[f]=this.body.nodes[f];else{const v=Ye.cloneOptions(this.body.nodes[f]);t.joinCondition(l,v)===!0&&(a[c.id]=c,o[f]=this.body.nodes[f])}else a[c.id]=c}}const d=kn(r=Oe(o)).call(r,function(h){return o[h].id});for(const h in o){if(!Object.prototype.hasOwnProperty.call(o,h))continue;const c=o[h];for(let f=0;f<c.edges.length;f++){const v=c.edges[f];me(d).call(d,this._getConnectedId(v,c.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 h=Oe(e),c=[];for(let p=0;p<h.length;p++){o=h[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&&c.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<c.length;p++){const b=c[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(Oe(e).length==0||Oe(e).length==1&&r.clusterNodeProperties.allowSingleNodeCluster!=!0)return;let o=le({},r.clusterNodeProperties);if(r.processProperties!==void 0){const d=[];for(const c in e)if(Object.prototype.hasOwnProperty.call(e,c)){const f=Ye.cloneOptions(e[c]);d.push(f)}const h=[];for(const c in t)if(Object.prototype.hasOwnProperty.call(t,c)&&c.substr(0,12)!=="clusterEdge:"){const f=Ye.cloneOptions(t[c],"edge");h.push(f)}if(o=r.processProperties(o,d,h),!o)throw new Error("The processProperties function does not return properties!")}o.id===void 0&&(o.id="cluster:"+In());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,HK);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=Oe(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=me(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={},h={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 c=t.releaseFunction(h,d);for(const f in a)if(Object.prototype.hasOwnProperty.call(a,f)){const v=this.body.nodes[f];c[f]!==void 0&&(v.x=c[f].x===void 0?i.x:c[f].x,v.y=c[f].y===void 0?i.y:c[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 h=this.body.nodes[d];h.vx=i.vx,h.vy=i.vy,h.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 h=l[d],c=this._getConnectedId(h,e),f=this.clusteredNodes[c];for(let v=0;v<h.clusteringEdgeReplacingIds.length;v++){const p=h.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==c?S=f.clusterId:g=f.clusterId,this._createClusteredEdge(g,S,b,y.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(b)}h.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),_i(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 _i(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 h=l[d];me(t).call(t,l)!==-1||me(r).call(r,l)!==-1||t.push(h)}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=Ye.cloneOptions(r,"edge");le(o,i),o.from=e,o.to=t,o.id="clusterEdge:"+In(),s!==void 0&&le(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 or){const s=t,o={};o[s.id]=s,t=o}if(e instanceof ve){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 h=u.clusteringEdgeReplacingIds;if(h!==void 0){let c=0;Z(h,f=>{const v=this.body.edges[f];v!==void 0&&v.endPointsValid()&&(c+=1)}),d=c>0}(!u.endPointsValid()||!d)&&(r[l]=l)}),i(u=>{Z(r,l=>{delete u.containedEdges[l],Z(u.edges,(d,h)=>{if(d.id===l){u.edges[h]=null;return}d.clusteringEdgeReplacingIds=this._filter(d.clusteringEdgeReplacingIds,function(c){return!r[c]})}),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=Oe(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 h=this._getClusterNodeForNode(l.fromId);h!==void 0&&this._clusterEdges(this.body.nodes[l.fromId],l,h);const c=this._getClusterNodeForNode(l.toId);c!==void 0&&this._clusterEdges(this.body.nodes[l.toId],l,c)}else delete this._clusterEdges[u],this._restoreEdge(l)});let o=!1,a=!0;for(;a;){const u=[];i(function(l){const d=Oe(l.containedNodes).length,h=l.options.allowSingleNodeCluster===!0;(h&&d<1||!h&&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 VK{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},je(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=mi(()=>{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&&Xi(["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}),h={top:l.y,left:l.x,bottom:d.y,right:d.x},c=[];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&&c.push(y.drawExternalLabel)}else if(s.isBoundingBoxOverlappingWith(h)===!0){const y=s.draw(e);y.drawExternalLabel!=null&&c.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&&c.push(b.drawExternalLabel)}for(f=0;f<p;f++){s=r[a[f]];const b=s.draw(e);b.drawExternalLabel!=null&&c.push(b.drawExternalLabel)}return{drawExternalLabels:()=>{for(const b of c)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 Vg,ND;function GK(){if(ND)return Vg;ND=1,RN();var n=se();return Vg=n.setInterval,Vg}var Gg,kD;function KK(){return kD||(kD=1,Gg=GK()),Gg}var YK=KK(),XK=K(YK);function Us(n,e){e.inputHandler=function(t){t.isFirst&&e(t)},n.on("hammer.input",e.inputHandler)}function YN(n,e){return e.inputHandler=function(t){t.isFinal&&e(t)},n.on("hammer.input",e.inputHandler)}class JK{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%"},je(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&&Xi(["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=XK(()=>{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;fe(e=_i(t=sr(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(me(e).call(e,"%")!==-1||me(e).call(e,"px")!==-1)return e;if(me(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 yi(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:yi.DIRECTION_ALL}),Us(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 yi(this.frame),YN(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 ZK(n,e){const t=je({nodes:e,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},n??{});if(!wt(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 QK{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=ZK(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=Ye.getRange(this.body.nodes,e.nodes);else if(t===!0){let l=0;for(const c in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,c)&&this.body.nodes[c].predefinedPosition===!0&&(l+=1);if(l>.5*this.body.nodeIndices.length){this.fit(e,!1);return}s=Ye.getRange(this.body.nodes,e.nodes),o=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;const h=Math.min(r/600,i/600);o*=h}else{this.body.emitter.emit("_resizeNodes"),s=Ye.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,h=r/l,c=i/d;o=h<=c?h:c}o>e.maxZoomLevel?o=e.maxZoomLevel:o<e.minZoomLevel&&(o=e.minZoomLevel);const u={position:Ye.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,!Rr(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,!Rr(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,!Rr(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,!Rr(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=qH[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 BD(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,h){if(i[h][d.keyCode]!==void 0){for(var c=i[h][d.keyCode],f=0;f<c.length;f++)(c[f].shift===void 0||c[f].shift==!0&&d.shiftKey==!0||c[f].shift==!1&&d.shiftKey==!1)&&c[f].fn(d);e==!0&&d.preventDefault()}};return r.bind=function(d,h,c){if(c===void 0&&(c="keydown"),s[d]===void 0)throw new Error("unsupported key: "+d);i[c][s[d].code]===void 0&&(i[c][s[d].code]=[]),i[c][s[d].code].push({fn:h,shift:s[d].shift})},r.bindAll=function(d,h){h===void 0&&(h="keydown");for(var c in s)s.hasOwnProperty(c)&&r.bind(c,d,h)},r.getKey=function(d){for(var h in s)if(s.hasOwnProperty(h)){if(d.shiftKey==!0&&s[h].shift==!0&&d.keyCode==s[h].code)return h;if(d.shiftKey==!1&&s[h].shift==!1&&d.keyCode==s[h].code)return h;if(d.keyCode==s[h].code&&h=="shift")return h}return"unknown key, currently not supported"},r.unbind=function(d,h,c){if(c===void 0&&(c="keydown"),s[d]===void 0)throw new Error("unsupported key: "+d);if(h!==void 0){var f=[],v=i[c][s[d].code];if(v!==void 0)for(var p=0;p<v.length;p++)v[p].fn==h&&v[p].shift==s[d].shift||f.push(i[c][s[d].code][p]);i[c][s[d].code]=f}else i[c][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 e4{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 yi(this.navigationDOM[e[o]]);if(t[o]==="_fit"){var r;Us(a,D(r=this._fit).call(r,this))}else{var i;Us(a,D(i=this.bindToRedraw).call(i,this,t[o]))}this.navigationHammers.push(a)}const s=new yi(this.canvas.frame);YN(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=BD({container:window,preventDefault:!0}):this.keycharm=BD({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var e,t,r,i,s,o,a,u,l,d,h,c,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(h=this.keycharm).call(h,"pageup",()=>{this.bindToRedraw("_zoomIn")},"keydown"),D(c=this.keycharm).call(c,"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 t4{constructor(e,t,r){var i,s,o,a,u,l,d,h,c,f,v,p,b;this.body=e,this.canvas=t,this.selectionHandler=r,this.navigationHandler=new e4(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(h=this.onMouseWheel).call(h,this),this.body.eventListeners.onPinch=D(c=this.onPinch).call(c,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},je(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&&(zs(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,e),ot(this.options,e,"keyboard"),e.tooltip&&(je(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=Qy(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}getPointer(e){return{x:e.x-$H(this.canvas.frame.canvas),y:e.y-TH(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];me(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=je({},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;fe(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=Xt(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});fe(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?(fe(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=mi(()=>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 h=[];for(let c=0;c<u.length;c++)d=l[u[c]],d.isOverlappingWith(i)===!0&&(o=!0,d.getTitle()!==void 0&&h.push(u[c]));h.length>0&&(this.popupObj=l[h[h.length-1]],o=!0)}if(this.popupObj===void 0&&o===!1){const u=this.body.edgeIndices,l=this.body.edges;let d;const h=[];for(let c=0;c<u.length;c++)d=l[u[c]],d.isOverlappingWith(i)===!0&&d.connected===!0&&d.getTitle()!==void 0&&h.push(u[c]);h.length>0&&(this.popupObj=l[h[h.length-1]],a="edge")}this.popupObj!==void 0?this.popupObj.id!==s&&(this.popup===void 0&&(this.popup=new kH(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 jD={},LD={},zD;function r4(){if(zD)return LD;zD=1;var n=ib(),e=IN();return n("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},e),LD}var WD;function i4(){return WD||(WD=1,r4()),jD}var HD={},Kg,UD;function ti(){if(UD)return Kg;UD=1;var n=Wi(),e=TypeError;return Kg=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")},Kg}var Yg,VD;function ri(){if(VD)return Yg;VD=1;var n=st(),e=$N(),t=n("Set"),r=t.prototype;return Yg={Set:t,add:e("add",1),has:e("has",1),remove:e("delete",1),proto:r},Yg}var Xg,GD;function ii(){if(GD)return Xg;GD=1;var n=it();return Xg=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},Xg}var Jg,KD;function ms(){if(KD)return Jg;KD=1;var n=ii();return Jg=function(e,t,r){return r?n(e.keys(),t,!0):e.forEach(t)},Jg}var Zg,YD;function cb(){if(YD)return Zg;YD=1;var n=ri(),e=ms(),t=n.Set,r=n.add;return Zg=function(i){var s=new t;return e(i,function(o){r(s,o)}),s},Zg}var Qg,XD;function bs(){return XD||(XD=1,Qg=function(n){return n.size}),Qg}var ey,JD;function n4(){return JD||(JD=1,ey=function(n){return{iterator:n,next:n.next,done:!1}}),ey}var ty,ZD;function ni(){if(ZD)return ty;ZD=1;var n=Kt(),e=Dt(),t=it(),r=Gi(),i=n4(),s="Invalid size",o=RangeError,a=TypeError,u=Math.max,l=function(d,h){this.set=d,this.size=u(h,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)}},ty=function(d){e(d);var h=+d.size;if(h!==h)throw new a(s);var c=r(h);if(c<0)throw new o(s);return new l(d,c)},ty}var ry,QD;function s4(){if(QD)return ry;QD=1;var n=ti(),e=ri(),t=cb(),r=bs(),i=ni(),s=ms(),o=ii(),a=e.has,u=e.remove;return ry=function(d){var h=n(this),c=i(d),f=t(h);return r(h)<=c.size?s(h,function(v){c.includes(v)&&u(f,v)}):o(c.getIterator(),function(v){a(f,v)&&u(f,v)}),f},ry}var iy,eA;function si(){return eA||(eA=1,iy=function(){return!1}),iy}var tA;function o4(){if(tA)return HD;tA=1;var n=z(),e=s4(),t=ee(),r=si(),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}),HD}var rA={},ny,iA;function a4(){if(iA)return ny;iA=1;var n=ti(),e=ri(),t=bs(),r=ni(),i=ms(),s=ii(),o=e.Set,a=e.add,u=e.has;return ny=function(d){var h=n(this),c=r(d),f=new o;return t(h)>c.size?s(c.getIterator(),function(v){u(h,v)&&a(f,v)}):i(h,function(v){c.includes(v)&&a(f,v)}),f},ny}var nA;function u4(){if(nA)return rA;nA=1;var n=z(),e=ee(),t=a4(),r=si(),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}),rA}var sA={},sy,oA;function l4(){if(oA)return sy;oA=1;var n=ti(),e=ri().has,t=bs(),r=ni(),i=ms(),s=ii(),o=tb();return sy=function(u){var l=n(this),d=r(u);if(t(l)<=d.size)return i(l,function(c){if(d.includes(c))return!1},!0)!==!1;var h=d.getIterator();return s(h,function(c){if(e(l,c))return o(h,"normal",!1)})!==!1},sy}var aA;function d4(){if(aA)return sA;aA=1;var n=z(),e=l4(),t=si(),r=!t("isDisjointFrom",function(i){return!i});return n({target:"Set",proto:!0,real:!0,forced:r},{isDisjointFrom:e}),sA}var uA={},oy,lA;function h4(){if(lA)return oy;lA=1;var n=ti(),e=bs(),t=ms(),r=ni();return oy=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},oy}var dA;function c4(){if(dA)return uA;dA=1;var n=z(),e=h4(),t=si(),r=!t("isSubsetOf",function(i){return i});return n({target:"Set",proto:!0,real:!0,forced:r},{isSubsetOf:e}),uA}var hA={},ay,cA;function f4(){if(cA)return ay;cA=1;var n=ti(),e=ri().has,t=bs(),r=ni(),i=ii(),s=tb();return ay=function(a){var u=n(this),l=r(a);if(t(u)<l.size)return!1;var d=l.getIterator();return i(d,function(h){if(!e(u,h))return s(d,"normal",!1)})!==!1},ay}var fA;function v4(){if(fA)return hA;fA=1;var n=z(),e=f4(),t=si(),r=!t("isSupersetOf",function(i){return!i});return n({target:"Set",proto:!0,real:!0,forced:r},{isSupersetOf:e}),hA}var vA={},uy,pA;function p4(){if(pA)return uy;pA=1;var n=ti(),e=ri(),t=cb(),r=ni(),i=ii(),s=e.add,o=e.has,a=e.remove;return uy=function(l){var d=n(this),h=r(l).getIterator(),c=t(d);return i(h,function(f){o(d,f)?a(c,f):s(c,f)}),c},uy}var ly,gA;function XN(){return gA||(gA=1,ly=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}}),ly}var yA;function g4(){if(yA)return vA;yA=1;var n=z(),e=p4(),t=XN(),r=si(),i=!r("symmetricDifference")||!t("symmetricDifference");return n({target:"Set",proto:!0,real:!0,forced:i},{symmetricDifference:e}),vA}var mA={},dy,bA;function y4(){if(bA)return dy;bA=1;var n=ti(),e=ri().add,t=cb(),r=ni(),i=ii();return dy=function(o){var a=n(this),u=r(o).getIterator(),l=t(a);return i(u,function(d){e(l,d)}),l},dy}var _A;function m4(){if(_A)return mA;_A=1;var n=z(),e=y4(),t=XN(),r=si(),i=!r("union")||!t("union");return n({target:"Set",proto:!0,real:!0,forced:i},{union:e}),mA}var hy,wA;function b4(){if(wA)return hy;wA=1,en(),i4(),o4(),u4(),d4(),c4(),v4(),g4(),m4(),ob();var n=se();return hy=n.Set,hy}var cy,EA;function _4(){if(EA)return cy;EA=1;var n=b4();return tn(),cy=n,cy}var fy,SA;function w4(){return SA||(SA=1,fy=_4()),fy}var E4=w4(),Qt=K(E4),OA={},IA={},vy,$A;function S4(){if($A)return vy;$A=1;var n=te(),e=sb(),t=Eo().getWeakData,r=rb(),i=Dt(),s=ji(),o=Ne(),a=So(),u=vr(),l=ze(),d=Zr(),h=d.set,c=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}},vy={getConstructor:function(m,w,O,I){var _=m(function(P,R){r(P,E),h(P,{type:w,id:b++,frozen:null}),s(R)||a(R,P[I],{that:P,AS_ENTRIES:O})}),E=_.prototype,$=c(w),T=function(P,R,C){var M=$(P),G=t(i(R),!0);return G===!0?y(M).set(R,C):G[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)}}),_}},vy}var TA;function O4(){if(TA)return IA;TA=1;var n=SN(),e=pe(),t=te(),r=sb(),i=Eo(),s=ib(),o=S4(),a=Ne(),u=Zr().enforce,l=ee(),d=wN(),h=Object,c=Array.isArray,f=h.isExtensible,v=h.isFrozen,p=h.isSealed,b=h.freeze,y=h.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 c(R)&&(v(R)?M=b:p(R)&&(M=y)),I(this,R,C),M&&M(R),this}});return IA}var PA;function I4(){return PA||(PA=1,O4()),OA}var py,RA;function $4(){if(RA)return py;RA=1,en(),I4();var n=se();return py=n.WeakMap,py}var gy,qA;function T4(){if(qA)return gy;qA=1;var n=$4();return tn(),gy=n,gy}var yy,CA;function P4(){return CA||(CA=1,yy=T4()),yy}var R4=P4(),_s=K(R4);function $n(n,e,t){q4(n,e),e.set(n,t)}function q4(n,e){if(e.has(n))throw new TypeError("Cannot initialize the same private elements twice on an object")}function om(n,e,t){return n.set(JN(n,e),t),t}function ue(n,e){return n.get(JN(n,e))}function JN(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 xA(n,e){const t=new Qt;for(const r of e)n.has(r)||t.add(r);return t}var ui=new _s,_t=new _s;class DA{constructor(){$n(this,ui,new Qt),$n(this,_t,new Qt)}get size(){return ue(_t,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)ue(_t,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)ue(_t,this).delete(i)}clear(){ue(_t,this).clear()}getSelection(){return[...ue(_t,this)]}getChanges(){return{added:[...xA(ue(ui,this),ue(_t,this))],deleted:[...xA(ue(_t,this),ue(ui,this))],previous:[...new Qt(ue(ui,this))],current:[...new Qt(ue(_t,this))]}}commit(){const e=this.getChanges();om(ui,this,ue(_t,this)),om(_t,this,new Qt(ue(ui,this)));for(const t of e.added)t.select();for(const t of e.deleted)t.unselect();return e}}var Or=new _s,Ir=new _s,my=new _s;class C4{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:()=>{};$n(this,Or,new DA),$n(this,Ir,new DA),$n(this,my,void 0),om(my,this,e)}get sizeNodes(){return ue(Or,this).size}get sizeEdges(){return ue(Ir,this).size}getNodes(){return ue(Or,this).getSelection()}getEdges(){return ue(Ir,this).getSelection()}addNodes(){ue(Or,this).add(...arguments)}addEdges(){ue(Ir,this).add(...arguments)}deleteNodes(e){ue(Or,this).delete(e)}deleteEdges(e){ue(Ir,this).delete(e)}clear(){ue(Or,this).clear(),ue(Ir,this).clear()}commit(){const e={nodes:ue(Or,this).commit(),edges:ue(Ir,this).commit()};for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return ue(my,this).call(this,e,...r),e}}class x4{constructor(e,t){this.body=e,this.canvas=t,this._selectionAccumulator=new C4,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},je(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",()=>{this.updateSelection()})}setOptions(e){e!==void 0&&Xi(["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 ve?(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,h=l.from.y,c=l.to.x,f=l.to.y,v=l.edgeType.getDistanceToEdge(d,h,c,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 ve?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}_removeFromSelection(e){e instanceof ve?(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 ve?(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 ve?(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 ve&&r.id!=s||r instanceof or)&&(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 or&&r.id!=s||r instanceof ve&&!r.hover)&&(this.emitBlurEvent(e,t,this.hoverObj.edges[s]),delete this.hoverObj.edges[s],i=!0));if(r!==void 0){const s=Oe(this.hoverObj.edges).length,o=Oe(this.hoverObj.nodes).length,a=r instanceof or&&s===0&&o===0,u=r instanceof ve&&s===0&&o===0;(i||a||u)&&(i=this.emitHoverEvent(e,t,r)),r instanceof ve&&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 kn(e=this._selectionAccumulator.getNodes()).call(e,t=>t.id)}getSelectedEdgeIds(){var e;return kn(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 AA={},by,MA;function D4(){if(MA)return by;MA=1;var n=Ki(),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),h=t(n(r,l),i),c=d.length,f=h.length,v=0,p=0;v<c||p<f;)r[v+p]=v<c&&p<f?i(d[v],h[p])<=0?d[v++]:h[p++]:v<c?d[v++]:h[p++];return r};return by=t,by}var _y,FA;function A4(){if(FA)return _y;FA=1;var n=Li(),e=n.match(/firefox\/(\d+)/i);return _y=!!e&&+e[1],_y}var wy,NA;function M4(){if(NA)return wy;NA=1;var n=Li();return wy=/MSIE|Trident/.test(n),wy}var Ey,kA;function F4(){if(kA)return Ey;kA=1;var n=Li(),e=n.match(/AppleWebKit\/(\d+)\./);return Ey=!!e&&+e[1],Ey}var BA;function N4(){if(BA)return AA;BA=1;var n=z(),e=te(),t=Kt(),r=ft(),i=Yt(),s=cN(),o=gt(),a=ee(),u=D4(),l=Ji(),d=A4(),h=M4(),c=os(),f=F4(),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(c)return c<70;if(!(d&&d>3)){if(h)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}}),AA}var Sy,jA;function k4(){if(jA)return Sy;jA=1,N4();var n=We();return Sy=n("Array","sort"),Sy}var Oy,LA;function B4(){if(LA)return Oy;LA=1;var n=Re(),e=k4(),t=Array.prototype;return Oy=function(r){var i=r.sort;return r===t||n(t,r)&&i===t.sort?e:i},Oy}var Iy,zA;function j4(){if(zA)return Iy;zA=1;var n=B4();return Iy=n,Iy}var $y,WA;function L4(){return WA||(WA=1,$y=j4()),$y}var z4=L4(),wi=K(z4),HA={},Ty,UA;function W4(){if(UA)return Ty;UA=1;var n=Se(),e=ee(),t=te(),r=Jm(),i=ls(),s=It(),o=uo().f,a=t(o),u=t([].push),l=n&&e(function(){var h=Object.create(null);return h[2]=2,!a(h,2)}),d=function(h){return function(c){for(var f=s(c),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,h?[S,f[S]]:f[S]);return g}};return Ty={entries:d(!0),values:d(!1)},Ty}var VA;function H4(){if(VA)return HA;VA=1;var n=z(),e=W4().values;return n({target:"Object",stat:!0},{values:function(r){return e(r)}}),HA}var Py,GA;function U4(){if(GA)return Py;GA=1,H4();var n=se();return Py=n.Object.values,Py}var Ry,KA;function V4(){if(KA)return Ry;KA=1;var n=U4();return Ry=n,Ry}var qy,YA;function G4(){return YA||(YA=1,qy=V4()),qy}var K4=G4(),Y4=K(K4),XA={},Cy,JA;function X4(){if(JA)return Cy;JA=1;var n=Kt(),e=ft(),t=lo(),r=Yt(),i=TypeError,s="Reduce of empty array with no initial value",o=function(a){return function(u,l,d,h){var c=e(u),f=t(c),v=r(c);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){h=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&&(h=l(h,f[p],p,c));return h}};return Cy={left:o(!1),right:o(!0)},Cy}var xy,ZA;function J4(){if(ZA)return xy;ZA=1;var n=TN();return xy=n==="NODE",xy}var QA;function Z4(){if(QA)return XA;QA=1;var n=z(),e=X4().left,t=Ji(),r=os(),i=J4(),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)}}),XA}var Dy,eM;function Q4(){if(eM)return Dy;eM=1,Z4();var n=We();return Dy=n("Array","reduce"),Dy}var Ay,tM;function e6(){if(tM)return Ay;tM=1;var n=Re(),e=Q4(),t=Array.prototype;return Ay=function(r){var i=r.reduce;return r===t||n(t,r)&&i===t.reduce?e:i},Ay}var My,rM;function t6(){if(rM)return My;rM=1;var n=e6();return My=n,My}var Fy,iM;function r6(){return iM||(iM=1,Fy=t6()),Fy}var i6=r6(),ZN=K(i6);class QN{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 n6 extends QN{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){wi(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 s6 extends QN{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){wi(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 nM={},sM;function o6(){if(sM)return nM;sM=1;var n=z(),e=vr().every,t=Ji(),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)}}),nM}var Ny,oM;function a6(){if(oM)return Ny;oM=1,o6();var n=We();return Ny=n("Array","every"),Ny}var ky,aM;function u6(){if(aM)return ky;aM=1;var n=Re(),e=a6(),t=Array.prototype;return ky=function(r){var i=r.every;return r===t||n(t,r)&&i===t.every?e:i},ky}var By,uM;function l6(){if(uM)return By;uM=1;var n=u6();return By=n,By}var jy,lM;function d6(){return lM||(lM=1,jy=l6()),jy}var h6=d6(),ek=K(h6);function c6(n,e){const t=new Qt;return fe(n).call(n,r=>{var i;fe(i=r.edges).call(i,s=>{s.connected&&t.add(s)})}),fe(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 f6(n){return tk(e=>{var t,r;return ek(t=Xt(r=e.edges).call(r,i=>n.has(i.toId))).call(t,i=>i.to===e)},(e,t)=>t>e,"from",n)}function v6(n){return tk(e=>{var t,r;return ek(t=Xt(r=e.edges).call(r,i=>n.has(i.toId))).call(t,i=>i.from===e)},(e,t)=>t<e,"to",n)}function tk(n,e,t,r){var i;const s=En(null),o=ZN(i=[...HN(r).call(r)]).call(i,(h,c)=>h+1+c.edges.length,0),a=t+"Id",u=t==="to"?1:-1;for(const[h,c]of r){if(!r.has(h)||!n(c))continue;s[h]=0;const f=[c];let v=0,p;for(;p=f.pop();){var l,d;if(!r.has(h))continue;const b=s[p.id]+u;if(fe(l=Xt(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 c6(r,s);++v}}return s}class p6{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 ab;let r=0;const i=wi(e=[...new Qt(Y4(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 Oe(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 g6{constructor(e){this.body=e,this._resetRNG(Math.random()+":"+sm()),this.setPhysics=!1,this.options={},this.optionsBackup={physics:{}},this.defaultOptions={randomSeed:void 0,improvedLayout:!0,clusterThreshold:150,hierarchical:{enabled:!1,levelSeparation:150,nodeSpacing:100,treeSpacing:200,blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:"UD",sortMethod:"hubsize"}},je(this.options,this.defaultOptions),this.bindEventListeners()}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(Xi(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),ot(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"),le(t,this.optionsBackup)}return t}_resetRNG(e){this.initialRandomSeed=e,this._rng=mo(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=Ye.getRangeCore(this.body.nodes,this.body.nodeIndices),t=Ye.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 p6;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)}}},h=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))}}},c=(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 G=m[M];if(G.toId!=G.fromId){const L=G.toId==S?G.from:G.to;I[m[M].id]=L,this.hierarchical.levels[L.id]<w&&_.push(G)}}const E=(M,G)=>{let L=0;for(let J=0;J<G.length;J++)if(I[G[J].id]!==void 0){const Q=this.direction.getPosition(I[G[J].id])-M;L+=Q/Math.sqrt(Q*Q+O)}return L},$=(M,G)=>{let L=0;for(let J=0;J<G.length;J++)if(I[G[J].id]!==void 0){const Q=this.direction.getPosition(I[G[J].id])-M;L-=O*Math.pow(Q*Q+O,-1.5)}return L},T=(M,G)=>{let L=this.direction.getPosition(g);const J={};for(let Q=0;Q<M;Q++){const oe=E(L,G),W=$(L,G),ae=40,ge=Math.max(-ae,Math.min(ae,Math.round(oe/W)));if(L=L-ge,J[L]!==void 0)break;J[L]=Q}return L},P=M=>{const G=this.direction.getPosition(g);if(r[g.id]===void 0){const ae={};a(g,ae),r[g.id]=ae}const L=u(r[g.id]),J=L[2],Q=L[3],oe=M-G;let W=0;oe>0?W=Math.min(oe,Q-this.options.hierarchical.nodeSpacing):oe<0&&(W=-Math.min(-oe,J-this.options.hierarchical.nodeSpacing)),W!=0&&(this._shiftBlock(g.id,W),t=!0)},R=M=>{const G=this.direction.getPosition(g),[L,J]=this._getSpaceAroundNode(g),Q=M-G;let oe=G;Q>0?oe=Math.min(G+(J-this.options.hierarchical.nodeSpacing),M):Q<0&&(oe=Math.max(G-(L-this.options.hierarchical.nodeSpacing),M)),oe!==G&&(this.direction.setPosition(g,oe),t=!0)};let C=T(y,_);P(C),C=T(y,m),R(C)},f=y=>{let g=this.hierarchical.getLevels();g=_i(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++)c(1e3,O[I])}if(t!==!0)break}},v=y=>{let g=this.hierarchical.getLevels();g=_i(g).call(g);for(let S=0;S<y&&(t=!1,d(h,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=_i(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 h=this.direction.getPosition(d);u=o-h}}if(s!=a.length-1){const d=a[s+1];if(r===!0&&t[d.id]===void 0||r===!1){const h=this.direction.getPosition(d);l=Math.min(l,h-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),h=u-a;(h<0&&Math.abs(h)<d-this.options.hierarchical.nodeSpacing||h>0&&Math.abs(h)<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=Oe(e[r]);i=this._indexArrayToNodes(i),wi(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]]);wi(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 h;a===0?h=this.direction.getPosition(this.body.nodes[e]):h=this.direction.getPosition(s[a-1])+d,this.direction.setPosition(u,h,l),this._validatePositionAndContinue(u,l,h)}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;me(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))}),wi(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(Ye.cloneOptions(i,"node"),Ye.cloneOptions(s,"node"),Ye.cloneOptions(o,"edge"));this.hierarchical.levels[s.id]=a+u};this._crawlNetwork(r),this.hierarchical.setMinLevelToZero()}_determineLevelsDirected(){var e;const t=ZN(e=this.body.nodeIndices).call(e,(r,i)=>(r.set(i,this.body.nodes[i]),r),new ab);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=v6(t):this.hierarchical.levels=f6(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 h=s(o,d);if(h.foundParent!==null)return h}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 n6(this):this.direction=new s6(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 y6{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}},je(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,le(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=le({},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=le({},this.options.controlNodeStyle);r.id="targetNode"+In(),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={},Jt(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&&(Jt(this.editModeDiv),Jt(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}_cleanupDOMEventListeners(){for(const t of sr(e=this._domEventListenerCleanupQueue).call(e,0)){var e;t()}}_removeManipulationDOM(){this._clean(),Jt(this.manipulationDiv),Jt(this.editModeDiv),Jt(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: "+UN(Oe(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 yi(e,{});Us(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=me(e=this.body.edgeIndices).call(e,this.temporaryIds.edges[s]);if(o!==-1){var t;sr(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=me(r=this.body.nodeIndices).call(r,this.temporaryIds.nodes[s]);if(o!==-1){var i;sr(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=je({},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=je({},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"+In(),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(me(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(me(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:In(),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",yn="array",j="object",rk="dom",m6="any",Ly=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],zy={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:yn},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:rk,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}},b6={configure:{enabled:{boolean:x},filter:{boolean:x,string:A,array:yn,function:"function"},container:{dom:rk},showButton:{boolean:x},__type__:{object:j,boolean:x,string:A,array:yn,function:"function"}},edges:{arrows:{to:{enabled:{boolean:x},scaleFactor:{number:q},type:{string:Ly},imageHeight:{number:q},imageWidth:{number:q},src:{string:A},__type__:{object:j,boolean:x}},middle:{enabled:{boolean:x},scaleFactor:{number:q},type:{string:Ly},imageWidth:{number:q},imageHeight:{number:q},src:{string:A},__type__:{object:j,boolean:x}},from:{enabled:{boolean:x},scaleFactor:{number:q},type:{string:Ly},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:yn},__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:yn},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__:zy,__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:zy,__type__:{object:j,boolean:x}},nodes:zy,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:m6},__type__:{object:j}},height:{string:A},width:{string:A},__type__:{object:j}},ik={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]}}},_6=(n,e,t)=>{var r;return!!(Sn(n).call(n,"physics")&&Sn(r=ik.physics.solver).call(r,e)&&t.physics.solver!==e&&e!=="wind")};class w6{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 h=t[d],c=i[h];for(let f=d+1;f<o;f++){const v=t[f],p=i[v],b=Math.min(c[v],c[u]+l[v]);c[v]=b,p[h]=b}}}return i}}class E6{constructor(e,t,r){this.body=e,this.springLength=t,this.springConstant=r,this.distanceSolver=new w6}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,h=0,c=0,f=0,v=0,p=0;for(;d>s&&a<u;)for(a+=1,[h,d,c,f]=this._getHighestEnergyNode(r),v=d,p=0;v>o&&p<l;)p+=1,this._moveNode(h,c,f),[v,c,f]=this._getEnergy(h)}_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,h,c]=this._getEnergy(l);i<d&&(i=d,s=l,o=h,a=c)}}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,h=this.K_matrix[e],c=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,_=h[w],E=c[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 h=t[d].x,c=t[d].y,f=1/Math.sqrt((s-h)**2+(o-c)**2);this.E_matrix[i][l]=[this.K_matrix[i][d]*(s-h-this.L_matrix[i][d]*(s-h)*f),this.K_matrix[i][d]*(o-c-this.L_matrix[i][d]*(o-c)*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 h=0;h<t.length;h++){const c=t[h];if(c!==e){const f=i[h],v=f[0],p=f[1],b=r[c].x,y=r[c].y,g=1/Math.sqrt((a-b)**2+(u-y)**2),S=s[c]*(a-b-o[c]*(a-b)*g),m=s[c]*(u-y-o[c]*(u-y)*g);i[h]=[S,m],l+=S,d+=m;const w=this.E_sums[c];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:n3,clickToUse:!1},je(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 f3(()=>this.body.emitter.emit("_requestRedraw")),this.groups=new N3,this.canvas=new JK(this.body),this.selectionHandler=new x4(this.body,this.canvas),this.interactionHandler=new t4(this.body,this.canvas,this.selectionHandler),this.view=new QK(this.body,this.canvas),this.renderer=new VK(this.body,this.canvas),this.physics=new DK(this.body),this.layoutEngine=new g6(this.body),this.clustering=new UK(this.body),this.manipulation=new y6(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new KG(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new EK(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new E6(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(t),this.setData(e)}AF(B.prototype);B.prototype.setOptions=function(n){if(n===null&&(n=void 0),n!==void 0){if(BH.validate(n,b6)===!0&&console.error("%cErrors have been found in the supplied options object.",lN),Xi(["locale","locales","clickToUse"],this.options,n),n.locale!==void 0&&(n.locale=h3(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 NH(this,this.body.container,ik,this.canvas.pixelRatio,_6)),this.configurator.setOptions(n.configure)),this.configurator&&this.configurator.options.enabled===!0){const r={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};le(r.nodes,this.nodesHandler.options),le(r.edges,this.edgesHandler.options),le(r.layout,this.layoutEngine.options),le(r.interaction,this.selectionHandler.options),le(r.interaction,this.renderer.options),le(r.interaction,this.interactionHandler.options),le(r.manipulation,this.manipulation.options),le(r.physics,this.physics.options),le(r.global,this.canvas.options),le(r.global,this.options),this.configurator.setModuleOptions(r)}n.clickToUse!==void 0?n.clickToUse===!0?this.activator===void 0&&(this.activator=new FH(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=B5(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=V5(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];Jt(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{ks as D,B as N};
|