@rubytech/create-maxy-code 0.1.362 → 0.1.364

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +21 -4
  3. package/payload/platform/plugins/cloudflare/bin/__tests__/wait-for.test.sh +107 -0
  4. package/payload/platform/plugins/cloudflare/bin/wait-for.sh +100 -0
  5. package/payload/platform/plugins/cloudflare/skills/site-deploy/SKILL.md +1 -1
  6. package/payload/platform/plugins/docs/references/claudeai-connectors.md +20 -3
  7. package/payload/platform/plugins/whatsapp/.claude-plugin/plugin.json +1 -1
  8. package/payload/platform/plugins/whatsapp/PLUGIN.md +8 -1
  9. package/payload/platform/plugins/whatsapp/mcp/dist/index.js +16 -0
  10. package/payload/platform/plugins/whatsapp/mcp/dist/index.js.map +1 -1
  11. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.d.ts.map +1 -1
  12. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js +1 -0
  13. package/payload/platform/services/claude-session-manager/dist/canonical-tool-names.generated.js.map +1 -1
  14. package/payload/platform/services/claude-session-manager/dist/http-server.d.ts.map +1 -1
  15. package/payload/platform/services/claude-session-manager/dist/http-server.js +40 -6
  16. package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
  17. package/payload/platform/services/claude-session-manager/dist/system-prompt.d.ts +8 -0
  18. package/payload/platform/services/claude-session-manager/dist/system-prompt.d.ts.map +1 -1
  19. package/payload/platform/services/claude-session-manager/dist/system-prompt.js +25 -3
  20. package/payload/platform/services/claude-session-manager/dist/system-prompt.js.map +1 -1
  21. package/payload/platform/templates/specialists/agents/coding-assistant.md +2 -0
  22. package/payload/platform/templates/specialists/agents/personal-assistant.md +1 -1
  23. package/payload/server/public/assets/{AdminLoginScreens-D6JtrY9a.js → AdminLoginScreens-CJatEEai.js} +1 -1
  24. package/payload/server/public/assets/{AdminShell-CaVRZTmj.js → AdminShell-D0MDlfI1.js} +1 -1
  25. package/payload/server/public/assets/{Checkbox-BiHO47mz.js → Checkbox-DqnBuFEU.js} +1 -1
  26. package/payload/server/public/assets/OperatorConversations-DDUzu1h8.css +1 -0
  27. package/payload/server/public/assets/{admin-BrCL9qSn.js → admin-Cocx_If1.js} +1 -1
  28. package/payload/server/public/assets/{browser-DNIV6o_p.js → browser-BsFHTA93.js} +1 -1
  29. package/payload/server/public/assets/{calendar-Arx94jTH.js → calendar-hwGeTmWC.js} +1 -1
  30. package/payload/server/public/assets/chat-DMssYitp.js +1 -0
  31. package/payload/server/public/assets/{data-DBInTT-w.js → data-DOjJ8031.js} +1 -1
  32. package/payload/server/public/assets/{graph-z-RYpYMZ.js → graph-CYMIe4B_.js} +4 -4
  33. package/payload/server/public/assets/{graph-labels-CVZClzPb.js → graph-labels-CXt55mIP.js} +1 -1
  34. package/payload/server/public/assets/{operator-CoCf8Lk7.js → operator-CRRc0nD-.js} +1 -1
  35. package/payload/server/public/assets/{page-CWnkJCxo.js → page-wUvf2I5u.js} +1 -1
  36. package/payload/server/public/assets/{public-CKMOOQiq.js → public-Ba5G74iP.js} +1 -1
  37. package/payload/server/public/assets/{rotate-ccw-Dgw6hmsm.js → rotate-ccw-BfYwa6ew.js} +1 -1
  38. package/payload/server/public/browser.html +4 -4
  39. package/payload/server/public/calendar.html +4 -4
  40. package/payload/server/public/chat.html +6 -6
  41. package/payload/server/public/data.html +4 -4
  42. package/payload/server/public/graph.html +7 -7
  43. package/payload/server/public/index.html +6 -6
  44. package/payload/server/public/operator.html +8 -8
  45. package/payload/server/public/public.html +6 -6
  46. package/payload/server/server.js +37 -0
  47. package/payload/server/public/assets/OperatorConversations-D3UBU6SM.css +0 -1
  48. package/payload/server/public/assets/chat-BwShkhcz.js +0 -1
  49. /package/payload/server/public/assets/{OperatorConversations-CzhbxFwN.js → OperatorConversations-BwnO3IUP.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{o as e,t}from"./chunk-CAM3fms7.js";import{D as n,E as r,H as i,L as a,O as o,T as s,V as c,W as l,j as u,v as d,w as f,z as p}from"./OperatorConversations-CzhbxFwN.js";import{m,p as h,t as g,y as _}from"./AdminShell-CaVRZTmj.js";import{t as v}from"./rotate-ccw-Dgw6hmsm.js";import{i as y,n as b,r as x}from"./graph-labels-CVZClzPb.js";import{t as S}from"./Checkbox-BiHO47mz.js";var ee=p(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),C=p(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),te=p(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),w=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.vis=n.vis||{}))})(e,(function(e){function t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var n=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var i={exports:{}},a=function(e){return e&&e.Math===Math&&e},o=a(typeof globalThis==`object`&&globalThis)||a(typeof window==`object`&&window)||a(typeof self==`object`&&self)||a(typeof n==`object`&&n)||(function(){return this})()||n||Function(`return this`)(),s=function(e){try{return!!e()}catch{return!0}},c=!s(function(){var e=(function(){}).bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}),l=c,u=Function.prototype,d=u.apply,f=u.call,p=typeof Reflect==`object`&&Reflect.apply||(l?f.bind(d):function(){return f.apply(d,arguments)}),m=c,h=Function.prototype,g=h.call,_=m&&h.bind.bind(g,g),v=m?_:function(e){return function(){return g.apply(e,arguments)}},y=v,b=y({}.toString),x=y(``.slice),S=function(e){return x(b(e),8,-1)},ee=S,C=v,te=function(e){if(ee(e)===`Function`)return C(e)},w=typeof document==`object`&&document.all,ne={all:w,IS_HTMLDDA:w===void 0&&w!==void 0},re=ne,T=re.all,E=re.IS_HTMLDDA?function(e){return typeof e==`function`||e===T}:function(e){return typeof e==`function`},D={},O=!s(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ie=c,ae=Function.prototype.call,k=ie?ae.bind(ae):function(){return ae.apply(ae,arguments)},oe={},se={}.propertyIsEnumerable,ce=Object.getOwnPropertyDescriptor;oe.f=ce&&!se.call({1:2},1)?function(e){var t=ce(this,e);return!!t&&t.enumerable}:se;var le=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},ue=v,de=s,fe=S,pe=Object,me=ue(``.split),he=de(function(){return!pe(`z`).propertyIsEnumerable(0)})?function(e){return fe(e)===`String`?me(e,``):pe(e)}:pe,ge=function(e){return e==null},_e=ge,ve=TypeError,ye=function(e){if(_e(e))throw new ve(`Can't call method on `+e);return e},be=he,xe=ye,A=function(e){return be(xe(e))},Se=E,Ce=ne,j=Ce.all,M=Ce.IS_HTMLDDA?function(e){return typeof e==`object`?e!==null:Se(e)||e===j}:function(e){return typeof e==`object`?e!==null:Se(e)},N={},we=N,Te=o,Ee=E,P=function(e){return Ee(e)?e:void 0},F=function(e,t){return arguments.length<2?P(we[e])||P(Te[e]):we[e]&&we[e][t]||Te[e]&&Te[e][t]},De=v({}.isPrototypeOf),Oe=typeof navigator<`u`&&String(navigator.userAgent)||``,ke=o,Ae=Oe,I=ke.process,je=ke.Deno,Me=I&&I.versions||je&&je.version,Ne=Me&&Me.v8,Pe,Fe;Ne&&(Pe=Ne.split(`.`),Fe=Pe[0]>0&&Pe[0]<4?1:+(Pe[0]+Pe[1])),!Fe&&Ae&&(Pe=Ae.match(/Edge\/(\d+)/),(!Pe||Pe[1]>=74)&&(Pe=Ae.match(/Chrome\/(\d+)/),Pe&&(Fe=+Pe[1])));var Ie=Fe,Le=Ie,Re=s,ze=o.String,Be=!!Object.getOwnPropertySymbols&&!Re(function(){var e=Symbol(`symbol detection`);return!ze(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Le&&Le<41}),Ve=Be&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,He=F,Ue=E,We=De,Ge=Ve,Ke=Object,qe=Ge?function(e){return typeof e==`symbol`}:function(e){var t=He(`Symbol`);return Ue(t)&&We(t.prototype,Ke(e))},Je=String,Ye=function(e){try{return Je(e)}catch{return`Object`}},Xe=E,Ze=Ye,Qe=TypeError,$e=function(e){if(Xe(e))return e;throw new Qe(Ze(e)+` is not a function`)},et=$e,tt=ge,nt=function(e,t){var n=e[t];return tt(n)?void 0:et(n)},rt=k,it=E,at=M,ot=TypeError,st=function(e,t){var n,r;if(t===`string`&&it(n=e.toString)&&!at(r=rt(n,e))||it(n=e.valueOf)&&!at(r=rt(n,e))||t!==`string`&&it(n=e.toString)&&!at(r=rt(n,e)))return r;throw new ot(`Can't convert object to primitive value`)},ct={exports:{}},lt=!0,ut=o,dt=Object.defineProperty,ft=function(e,t){try{dt(ut,e,{value:t,configurable:!0,writable:!0})}catch{ut[e]=t}return t},pt=o,mt=ft,ht=`__core-js_shared__`,gt=pt[ht]||mt(ht,{}),_t=gt;(ct.exports=function(e,t){return _t[e]||(_t[e]=t===void 0?{}:t)})(`versions`,[]).push({version:`3.33.2`,mode:`pure`,copyright:`© 2014-2023 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE`,source:`https://github.com/zloirock/core-js`});var vt=ct.exports,yt=ye,bt=Object,xt=function(e){return bt(yt(e))},St=v,Ct=xt,wt=St({}.hasOwnProperty),Tt=Object.hasOwn||function(e,t){return wt(Ct(e),t)},Et=v,Dt=0,Ot=Math.random(),kt=Et(1 .toString),At=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+kt(++Dt+Ot,36)},jt=o,Mt=vt,Nt=Tt,Pt=At,Ft=Be,It=Ve,Lt=jt.Symbol,Rt=Mt(`wks`),zt=It?Lt.for||Lt:Lt&&Lt.withoutSetter||Pt,Bt=function(e){return Nt(Rt,e)||(Rt[e]=Ft&&Nt(Lt,e)?Lt[e]:zt(`Symbol.`+e)),Rt[e]},Vt=k,Ht=M,Ut=qe,Wt=nt,Gt=st,Kt=Bt,qt=TypeError,Jt=Kt(`toPrimitive`),Yt=function(e,t){if(!Ht(e)||Ut(e))return e;var n=Wt(e,Jt),r;if(n){if(t===void 0&&(t=`default`),r=Vt(n,e,t),!Ht(r)||Ut(r))return r;throw new qt(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),Gt(e,t)},Xt=qe,Zt=function(e){var t=Yt(e,`string`);return Xt(t)?t:t+``},Qt=o,$t=M,en=Qt.document,tn=$t(en)&&$t(en.createElement),nn=function(e){return tn?en.createElement(e):{}},rn=O,an=s,on=nn,sn=!rn&&!an(function(){return Object.defineProperty(on(`div`),`a`,{get:function(){return 7}}).a!==7}),cn=O,ln=k,un=oe,dn=le,fn=A,pn=Zt,mn=Tt,hn=sn,gn=Object.getOwnPropertyDescriptor;D.f=cn?gn:function(e,t){if(e=fn(e),t=pn(t),hn)try{return gn(e,t)}catch{}if(mn(e,t))return dn(!ln(un.f,e,t),e[t])};var _n=s,vn=E,yn=/#|\.prototype\./,bn=function(e,t){var n=Sn[xn(e)];return n===wn?!0:n===Cn?!1:vn(t)?_n(t):!!t},xn=bn.normalize=function(e){return String(e).replace(yn,`.`).toLowerCase()},Sn=bn.data={},Cn=bn.NATIVE=`N`,wn=bn.POLYFILL=`P`,Tn=bn,En=te,Dn=$e,On=c,kn=En(En.bind),An=function(e,t){return Dn(e),t===void 0?e:On?kn(e,t):function(){return e.apply(t,arguments)}},jn={},Mn=O&&s(function(){return Object.defineProperty(function(){},`prototype`,{value:42,writable:!1}).prototype!==42}),Nn=M,Pn=String,Fn=TypeError,In=function(e){if(Nn(e))return e;throw new Fn(Pn(e)+` is not an object`)},Ln=O,Rn=sn,zn=Mn,Bn=In,Vn=Zt,Hn=TypeError,Un=Object.defineProperty,Wn=Object.getOwnPropertyDescriptor,Gn=`enumerable`,L=`configurable`,R=`writable`;jn.f=Ln?zn?function(e,t,n){if(Bn(e),t=Vn(t),Bn(n),typeof e==`function`&&t===`prototype`&&`value`in n&&R in n&&!n[R]){var r=Wn(e,t);r&&r[R]&&(e[t]=n.value,n={configurable:L in n?n[L]:r[L],enumerable:Gn in n?n[Gn]:r[Gn],writable:!1})}return Un(e,t,n)}:Un:function(e,t,n){if(Bn(e),t=Vn(t),Bn(n),Rn)try{return Un(e,t,n)}catch{}if(`get`in n||`set`in n)throw new Hn(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e};var Kn=O,qn=jn,Jn=le,Yn=Kn?function(e,t,n){return qn.f(e,t,Jn(1,n))}:function(e,t,n){return e[t]=n,e},Xn=o,Zn=p,Qn=te,$n=E,er=D.f,tr=Tn,nr=N,rr=An,ir=Yn,ar=Tt,or=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return Zn(e,this,arguments)};return t.prototype=e.prototype,t},z=function(e,t){var n=e.target,r=e.global,i=e.stat,a=e.proto,o=r?Xn:i?Xn[n]:(Xn[n]||{}).prototype,s=r?nr:nr[n]||ir(nr,n,{})[n],c=s.prototype,l,u,d,f,p,m,h,g,_;for(f in t)l=tr(r?f:n+(i?`.`:`#`)+f,e.forced),u=!l&&o&&ar(o,f),m=s[f],u&&(e.dontCallGetSet?(_=er(o,f),h=_&&_.value):h=o[f]),p=u&&h?h:t[f],!(u&&typeof m==typeof p)&&(g=e.bind&&u?rr(p,Xn):e.wrap&&u?or(p):a&&$n(p)?Qn(p):p,(e.sham||p&&p.sham||m&&m.sham)&&ir(g,`sham`,!0),ir(s,f,g),a&&(d=n+`Prototype`,ar(nr,d)||ir(nr,d,{}),ir(nr[d],f,p),e.real&&c&&(l||!c[f])&&ir(c,f,p)))},sr=z,cr=O,lr=jn.f;sr({target:`Object`,stat:!0,forced:Object.defineProperty!==lr,sham:!cr},{defineProperty:lr});var ur=N.Object,dr=i.exports=function(e,t,n){return ur.defineProperty(e,t,n)};ur.defineProperty.sham&&(dr.sham=!0);var fr=i.exports,pr=fr,mr=r(pr),hr=S,gr=Array.isArray||function(e){return hr(e)===`Array`},_r=Math.ceil,vr=Math.floor,yr=Math.trunc||function(e){var t=+e;return(t>0?vr:_r)(t)},br=function(e){var t=+e;return t!==t||t===0?0:yr(t)},xr=br,Sr=Math.min,Cr=function(e){return e>0?Sr(xr(e),9007199254740991):0},wr=function(e){return Cr(e.length)},Tr=TypeError,Er=9007199254740991,Dr=function(e){if(e>Er)throw Tr(`Maximum allowed index exceeded`);return e},Or=Zt,kr=jn,Ar=le,jr=function(e,t,n){var r=Or(t);r in e?kr.f(e,r,Ar(0,n)):e[r]=n},Mr=Bt(`toStringTag`),Nr={};Nr[Mr]=`z`;var Pr=String(Nr)===`[object z]`,Fr=Pr,Ir=E,Lr=S,Rr=Bt(`toStringTag`),zr=Object,Br=Lr(function(){return arguments}())===`Arguments`,Vr=function(e,t){try{return e[t]}catch{}},Hr=Fr?Lr:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=Vr(t=zr(e),Rr))==`string`?n:Br?Lr(t):(r=Lr(t))===`Object`&&Ir(t.callee)?`Arguments`:r},Ur=v,Wr=E,Gr=gt,Kr=Ur(Function.toString);Wr(Gr.inspectSource)||(Gr.inspectSource=function(e){return Kr(e)});var qr=Gr.inspectSource,Jr=v,Yr=s,Xr=E,Zr=Hr,Qr=F,B=qr,$r=function(){},ei=[],ti=Qr(`Reflect`,`construct`),ni=/^\s*(?:class|function)\b/,ri=Jr(ni.exec),ii=!ni.test($r),ai=function(e){if(!Xr(e))return!1;try{return ti($r,ei,e),!0}catch{return!1}},oi=function(e){if(!Xr(e))return!1;switch(Zr(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return ii||!!ri(ni,B(e))}catch{return!0}};oi.sham=!0;var si=!ti||Yr(function(){var e;return ai(ai.call)||!ai(Object)||!ai(function(){e=!0})||e})?oi:ai,ci=gr,li=si,ui=M,di=Bt(`species`),fi=Array,pi=function(e){var t;return ci(e)&&(t=e.constructor,li(t)&&(t===fi||ci(t.prototype))?t=void 0:ui(t)&&(t=t[di],t===null&&(t=void 0))),t===void 0?fi:t},mi=function(e,t){return new(pi(e))(t===0?0:t)},hi=s,gi=Bt,_i=Ie,vi=gi(`species`),yi=function(e){return _i>=51||!hi(function(){var t=[],n=t.constructor={};return n[vi]=function(){return{foo:1}},t[e](Boolean).foo!==1})},bi=z,xi=s,Si=gr,Ci=M,wi=xt,Ti=wr,Ei=Dr,Di=jr,Oi=mi,ki=yi,Ai=Bt,ji=Ie,Mi=Ai(`isConcatSpreadable`),Ni=ji>=51||!xi(function(){var e=[];return e[Mi]=!1,e.concat()[0]!==e}),Pi=function(e){if(!Ci(e))return!1;var t=e[Mi];return t===void 0?Si(e):!!t};bi({target:`Array`,proto:!0,arity:1,forced:!Ni||!ki(`concat`)},{concat:function(e){var t=wi(this),n=Oi(t,0),r=0,i,a,o,s,c;for(i=-1,o=arguments.length;i<o;i++)if(c=i===-1?t:arguments[i],Pi(c))for(s=Ti(c),Ei(r+s),a=0;a<s;a++,r++)a in c&&Di(n,r,c[a]);else Ei(r+1),Di(n,r++,c);return n.length=r,n}});var Fi=Hr,Ii=String,Li=function(e){if(Fi(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return Ii(e)},Ri={},zi=br,Bi=Math.max,Vi=Math.min,Hi=function(e,t){var n=zi(e);return n<0?Bi(n+t,0):Vi(n,t)},Ui=A,Wi=Hi,Gi=wr,Ki=function(e){return function(t,n,r){var i=Ui(t),a=Gi(i),o=Wi(r,a),s;if(e&&n!==n){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},qi={includes:Ki(!0),indexOf:Ki(!1)},Ji={},Yi=v,Xi=Tt,Zi=A,Qi=qi.indexOf,$i=Ji,ea=Yi([].push),ta=function(e,t){var n=Zi(e),r=0,i=[],a;for(a in n)!Xi($i,a)&&Xi(n,a)&&ea(i,a);for(;t.length>r;)Xi(n,a=t[r++])&&(~Qi(i,a)||ea(i,a));return i},na=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],ra=ta,ia=na,aa=Object.keys||function(e){return ra(e,ia)},oa=O,sa=Mn,ca=jn,la=In,ua=A,da=aa;Ri.f=oa&&!sa?Object.defineProperties:function(e,t){la(e);for(var n=ua(t),r=da(t),i=r.length,a=0,o;i>a;)ca.f(e,o=r[a++],n[o]);return e};var fa=F(`document`,`documentElement`),pa=vt,ma=At,ha=pa(`keys`),ga=function(e){return ha[e]||(ha[e]=ma(e))},_a=In,va=Ri,ya=na,ba=Ji,xa=fa,Sa=nn,Ca=ga,wa=`>`,Ta=`<`,Ea=`prototype`,Da=`script`,Oa=Ca(`IE_PROTO`),ka=function(){},Aa=function(e){return Ta+Da+wa+e+Ta+`/`+Da+wa},ja=function(e){e.write(Aa(``)),e.close();var t=e.parentWindow.Object;return e=null,t},Ma=function(){var e=Sa(`iframe`),t=`java`+Da+`:`,n;return e.style.display=`none`,xa.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(Aa(`document.F=Object`)),n.close(),n.F},Na,Pa=function(){try{Na=new ActiveXObject(`htmlfile`)}catch{}Pa=typeof document<`u`?document.domain&&Na?ja(Na):Ma():ja(Na);for(var e=ya.length;e--;)delete Pa[Ea][ya[e]];return Pa()};ba[Oa]=!0;var Fa=Object.create||function(e,t){var n;return e===null?n=Pa():(ka[Ea]=_a(e),n=new ka,ka[Ea]=null,n[Oa]=e),t===void 0?n:va.f(n,t)},Ia={},La=ta,Ra=na.concat(`length`,`prototype`);Ia.f=Object.getOwnPropertyNames||function(e){return La(e,Ra)};var za={},Ba=Hi,Va=wr,Ha=jr,Ua=Array,Wa=Math.max,Ga=function(e,t,n){for(var r=Va(e),i=Ba(t,r),a=Ba(n===void 0?r:n,r),o=Ua(Wa(a-i,0)),s=0;i<a;i++,s++)Ha(o,s,e[i]);return o.length=s,o},Ka=S,qa=A,Ja=Ia.f,Ya=Ga,Xa=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Za=function(e){try{return Ja(e)}catch{return Ya(Xa)}};za.f=function(e){return Xa&&Ka(e)===`Window`?Za(e):Ja(qa(e))};var Qa={};Qa.f=Object.getOwnPropertySymbols;var $a=Yn,eo=function(e,t,n,r){return r&&r.enumerable?e[t]=n:$a(e,t,n),e},to=jn,no=function(e,t,n){return to.f(e,t,n)},ro={};ro.f=Bt;var io=N,ao=Tt,oo=ro,so=jn.f,co=function(e){var t=io.Symbol||={};ao(t,e)||so(t,e,{value:oo.f(e)})},lo=k,uo=F,fo=Bt,po=eo,mo=function(){var e=uo(`Symbol`),t=e&&e.prototype,n=t&&t.valueOf,r=fo(`toPrimitive`);t&&!t[r]&&po(t,r,function(e){return lo(n,this)},{arity:1})},ho=Pr,go=Hr,_o=ho?{}.toString:function(){return`[object `+go(this)+`]`},vo=Pr,yo=jn.f,bo=Yn,xo=Tt,So=_o,Co=Bt(`toStringTag`),wo=function(e,t,n,r){if(e){var i=n?e:e.prototype;xo(i,Co)||yo(i,Co,{configurable:!0,value:t}),r&&!vo&&bo(i,`toString`,So)}},To=o,Eo=E,Do=To.WeakMap,Oo=Eo(Do)&&/native code/.test(String(Do)),ko=o,Ao=M,jo=Yn,Mo=Tt,No=gt,Po=ga,Fo=Ji,Io=`Object already initialized`,Lo=ko.TypeError,Ro=ko.WeakMap,zo,Bo,Vo,Ho=function(e){return Vo(e)?Bo(e):zo(e,{})},Uo=function(e){return function(t){var n;if(!Ao(t)||(n=Bo(t)).type!==e)throw new Lo(`Incompatible receiver, `+e+` required`);return n}};if(Oo||No.state){var Wo=No.state||=new Ro;Wo.get=Wo.get,Wo.has=Wo.has,Wo.set=Wo.set,zo=function(e,t){if(Wo.has(e))throw new Lo(Io);return t.facade=e,Wo.set(e,t),t},Bo=function(e){return Wo.get(e)||{}},Vo=function(e){return Wo.has(e)}}else{var Go=Po(`state`);Fo[Go]=!0,zo=function(e,t){if(Mo(e,Go))throw new Lo(Io);return t.facade=e,jo(e,Go,t),t},Bo=function(e){return Mo(e,Go)?e[Go]:{}},Vo=function(e){return Mo(e,Go)}}var Ko={set:zo,get:Bo,has:Vo,enforce:Ho,getterFor:Uo},qo=An,Jo=v,Yo=he,Xo=xt,Zo=wr,Qo=mi,$o=Jo([].push),es=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(c,l,u,d){for(var f=Xo(c),p=Yo(f),m=qo(l,u),h=Zo(p),g=0,_=d||Qo,v=t?_(c,h):n||o?_(c,0):void 0,y,b;h>g;g++)if((s||g in p)&&(y=p[g],b=m(y,g,f),e))if(t)v[g]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return g;case 2:$o(v,y)}else switch(e){case 4:return!1;case 7:$o(v,y)}return a?-1:r||i?i:v}},ts={forEach:es(0),map:es(1),filter:es(2),some:es(3),every:es(4),find:es(5),findIndex:es(6),filterReject:es(7)},ns=z,rs=o,is=k,as=v,os=O,ss=Be,cs=s,ls=Tt,us=De,ds=In,fs=A,ps=Zt,ms=Li,hs=le,gs=Fa,_s=aa,vs=Ia,ys=za,bs=Qa,xs=D,Ss=jn,Cs=Ri,ws=oe,Ts=eo,Es=no,Ds=vt,Os=ga,ks=Ji,As=At,js=Bt,Ms=ro,Ns=co,Ps=mo,Fs=wo,Is=Ko,Ls=ts.forEach,Rs=Os(`hidden`),zs=`Symbol`,Bs=`prototype`,Vs=Is.set,Hs=Is.getterFor(zs),Us=Object[Bs],Ws=rs.Symbol,Gs=Ws&&Ws[Bs],Ks=rs.RangeError,qs=rs.TypeError,Js=rs.QObject,Ys=xs.f,Xs=Ss.f,Zs=ys.f,Qs=ws.f,$s=as([].push),ec=Ds(`symbols`),tc=Ds(`op-symbols`),nc=Ds(`wks`),rc=!Js||!Js[Bs]||!Js[Bs].findChild,ic=function(e,t,n){var r=Ys(Us,t);r&&delete Us[t],Xs(e,t,n),r&&e!==Us&&Xs(Us,t,r)},ac=os&&cs(function(){return gs(Xs({},`a`,{get:function(){return Xs(this,`a`,{value:7}).a}})).a!==7})?ic:Xs,oc=function(e,t){var n=ec[e]=gs(Gs);return Vs(n,{type:zs,tag:e,description:t}),os||(n.description=t),n},sc=function(e,t,n){e===Us&&sc(tc,t,n),ds(e);var r=ps(t);return ds(n),ls(ec,r)?(n.enumerable?(ls(e,Rs)&&e[Rs][r]&&(e[Rs][r]=!1),n=gs(n,{enumerable:hs(0,!1)})):(ls(e,Rs)||Xs(e,Rs,hs(1,{})),e[Rs][r]=!0),ac(e,r,n)):Xs(e,r,n)},cc=function(e,t){ds(e);var n=fs(t);return Ls(_s(n).concat(pc(n)),function(t){(!os||is(uc,n,t))&&sc(e,t,n[t])}),e},lc=function(e,t){return t===void 0?gs(e):cc(gs(e),t)},uc=function(e){var t=ps(e),n=is(Qs,this,t);return this===Us&&ls(ec,t)&&!ls(tc,t)?!1:n||!ls(this,t)||!ls(ec,t)||ls(this,Rs)&&this[Rs][t]?n:!0},dc=function(e,t){var n=fs(e),r=ps(t);if(!(n===Us&&ls(ec,r)&&!ls(tc,r))){var i=Ys(n,r);return i&&ls(ec,r)&&!(ls(n,Rs)&&n[Rs][r])&&(i.enumerable=!0),i}},fc=function(e){var t=Zs(fs(e)),n=[];return Ls(t,function(e){!ls(ec,e)&&!ls(ks,e)&&$s(n,e)}),n},pc=function(e){var t=e===Us,n=Zs(t?tc:fs(e)),r=[];return Ls(n,function(e){ls(ec,e)&&(!t||ls(Us,e))&&$s(r,ec[e])}),r};ss||(Ws=function(){if(us(Gs,this))throw new qs(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:ms(arguments[0]),t=As(e),n=function(e){var r=this===void 0?rs:this;r===Us&&is(n,tc,e),ls(r,Rs)&&ls(r[Rs],t)&&(r[Rs][t]=!1);var i=hs(1,e);try{ac(r,t,i)}catch(e){if(!(e instanceof Ks))throw e;ic(r,t,i)}};return os&&rc&&ac(Us,t,{configurable:!0,set:n}),oc(t,e)},Gs=Ws[Bs],Ts(Gs,`toString`,function(){return Hs(this).tag}),Ts(Ws,`withoutSetter`,function(e){return oc(As(e),e)}),ws.f=uc,Ss.f=sc,Cs.f=cc,xs.f=dc,vs.f=ys.f=fc,bs.f=pc,Ms.f=function(e){return oc(js(e),e)},os&&Es(Gs,`description`,{configurable:!0,get:function(){return Hs(this).description}})),ns({global:!0,constructor:!0,wrap:!0,forced:!ss,sham:!ss},{Symbol:Ws}),Ls(_s(nc),function(e){Ns(e)}),ns({target:zs,stat:!0,forced:!ss},{useSetter:function(){rc=!0},useSimple:function(){rc=!1}}),ns({target:`Object`,stat:!0,forced:!ss,sham:!os},{create:lc,defineProperty:sc,defineProperties:cc,getOwnPropertyDescriptor:dc}),ns({target:`Object`,stat:!0,forced:!ss},{getOwnPropertyNames:fc}),Ps(),Fs(Ws,zs),ks[Rs]=!0;var mc=Be&&!!Symbol.for&&!!Symbol.keyFor,hc=z,gc=F,_c=Tt,vc=Li,yc=vt,bc=mc,xc=yc(`string-to-symbol-registry`),V=yc(`symbol-to-string-registry`);hc({target:`Symbol`,stat:!0,forced:!bc},{for:function(e){var t=vc(e);if(_c(xc,t))return xc[t];var n=gc(`Symbol`)(t);return xc[t]=n,V[n]=t,n}});var Sc=z,Cc=Tt,wc=qe,Tc=Ye,Ec=vt,Dc=mc,Oc=Ec(`symbol-to-string-registry`);Sc({target:`Symbol`,stat:!0,forced:!Dc},{keyFor:function(e){if(!wc(e))throw TypeError(Tc(e)+` is not a symbol`);if(Cc(Oc,e))return Oc[e]}});var kc=v([].slice),Ac=v,jc=gr,Mc=E,Nc=S,Pc=Li,Fc=Ac([].push),Ic=function(e){if(Mc(e))return e;if(jc(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i==`string`?Fc(n,i):(typeof i==`number`||Nc(i)===`Number`||Nc(i)===`String`)&&Fc(n,Pc(i))}var a=n.length,o=!0;return function(e,t){if(o)return o=!1,t;if(jc(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Lc=z,Rc=F,zc=p,Bc=k,Vc=v,Hc=s,Uc=E,Wc=qe,Gc=kc,Kc=Ic,qc=Be,Jc=String,Yc=Rc(`JSON`,`stringify`),Xc=Vc(/./.exec),Zc=Vc(``.charAt),Qc=Vc(``.charCodeAt),$c=Vc(``.replace),el=Vc(1 .toString),tl=/[\uD800-\uDFFF]/g,nl=/^[\uD800-\uDBFF]$/,rl=/^[\uDC00-\uDFFF]$/,il=!qc||Hc(function(){var e=Rc(`Symbol`)(`stringify detection`);return Yc([e])!==`[null]`||Yc({a:e})!==`{}`||Yc(Object(e))!==`{}`}),al=Hc(function(){return Yc(`\udf06\ud834`)!==`"\\udf06\\ud834"`||Yc(`\udead`)!==`"\\udead"`}),ol=function(e,t){var n=Gc(arguments),r=Kc(t);if(!(!Uc(r)&&(e===void 0||Wc(e))))return n[1]=function(e,t){if(Uc(r)&&(t=Bc(r,this,Jc(e),t)),!Wc(t))return t},zc(Yc,null,n)},sl=function(e,t,n){var r=Zc(n,t-1),i=Zc(n,t+1);return Xc(nl,e)&&!Xc(rl,i)||Xc(rl,e)&&!Xc(nl,r)?`\\u`+el(Qc(e,0),16):e};Yc&&Lc({target:`JSON`,stat:!0,arity:3,forced:il||al},{stringify:function(e,t,n){var r=Gc(arguments),i=zc(il?ol:Yc,null,r);return al&&typeof i==`string`?$c(i,tl,sl):i}});var cl=z,ll=Be,ul=s,dl=Qa,fl=xt;cl({target:`Object`,stat:!0,forced:!ll||ul(function(){dl.f(1)})},{getOwnPropertySymbols:function(e){var t=dl.f;return t?t(fl(e)):[]}}),co(`asyncIterator`),co(`hasInstance`),co(`isConcatSpreadable`),co(`iterator`),co(`match`),co(`matchAll`),co(`replace`),co(`search`),co(`species`),co(`split`);var pl=co,ml=mo;pl(`toPrimitive`),ml();var hl=F,gl=co,_l=wo;gl(`toStringTag`),_l(hl(`Symbol`),`Symbol`),co(`unscopables`),wo(o.JSON,`JSON`,!0);var vl=N.Symbol,yl={},bl=O,xl=Tt,Sl=Function.prototype,Cl=bl&&Object.getOwnPropertyDescriptor,wl=xl(Sl,`name`),Tl={EXISTS:wl,PROPER:wl&&(function(){}).name===`something`,CONFIGURABLE:wl&&(!bl||bl&&Cl(Sl,`name`).configurable)},El=!s(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Dl=Tt,Ol=E,kl=xt,Al=ga,jl=El,Ml=Al(`IE_PROTO`),Nl=Object,Pl=Nl.prototype,Fl=jl?Nl.getPrototypeOf:function(e){var t=kl(e);if(Dl(t,Ml))return t[Ml];var n=t.constructor;return Ol(n)&&t instanceof n?n.prototype:t instanceof Nl?Pl:null},Il=s,Ll=E,Rl=M,zl=Fa,Bl=Fl,Vl=eo,Hl=Bt(`iterator`),Ul=!1,Wl,Gl,Kl;[].keys&&(Kl=[].keys(),`next`in Kl?(Gl=Bl(Bl(Kl)),Gl!==Object.prototype&&(Wl=Gl)):Ul=!0),Wl=!Rl(Wl)||Il(function(){var e={};return Wl[Hl].call(e)!==e})?{}:zl(Wl),Ll(Wl[Hl])||Vl(Wl,Hl,function(){return this});var ql={IteratorPrototype:Wl,BUGGY_SAFARI_ITERATORS:Ul},Jl=ql.IteratorPrototype,Yl=Fa,Xl=le,Zl=wo,Ql=yl,$l=function(){return this},eu=function(e,t,n,r){var i=t+` Iterator`;return e.prototype=Yl(Jl,{next:Xl(+!r,n)}),Zl(e,i,!1,!0),Ql[i]=$l,e},tu=v,nu=$e,ru=function(e,t,n){try{return tu(nu(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},iu=E,au=String,ou=TypeError,su=function(e){if(typeof e==`object`||iu(e))return e;throw new ou(`Can't set `+au(e)+` as a prototype`)},cu=ru,lu=In,uu=su,du=Object.setPrototypeOf||(`__proto__`in{}?function(){var e=!1,t={},n;try{n=cu(Object.prototype,`__proto__`,`set`),n(t,[]),e=t instanceof Array}catch{}return function(t,r){return lu(t),uu(r),e?n(t,r):t.__proto__=r,t}}():void 0),fu=z,pu=k,mu=Tl,hu=eu,gu=Fl,_u=wo,vu=eo,yu=Bt,bu=yl,xu=ql,Su=mu.PROPER;mu.CONFIGURABLE,xu.IteratorPrototype;var Cu=xu.BUGGY_SAFARI_ITERATORS,wu=yu(`iterator`),Tu=`keys`,Eu=`values`,Du=`entries`,Ou=function(){return this},ku=function(e,t,n,r,i,a,o){hu(n,t,r);var s=function(e){if(e===i&&f)return f;if(!Cu&&e&&e in u)return u[e];switch(e){case Tu:return function(){return new n(this,e)};case Eu:return function(){return new n(this,e)};case Du:return function(){return new n(this,e)}}return function(){return new n(this)}},c=t+` Iterator`,l=!1,u=e.prototype,d=u[wu]||u[`@@iterator`]||i&&u[i],f=!Cu&&d||s(i),p=t===`Array`&&u.entries||d,m,h,g;if(p&&(m=gu(p.call(new e)),m!==Object.prototype&&m.next&&(_u(m,c,!0,!0),bu[c]=Ou)),Su&&i===Eu&&d&&d.name!==Eu&&(l=!0,f=function(){return pu(d,this)}),i)if(h={values:s(Eu),keys:a?f:s(Tu),entries:s(Du)},o)for(g in h)(Cu||l||!(g in u))&&vu(u,g,h[g]);else fu({target:t,proto:!0,forced:Cu||l},h);return o&&u[wu]!==f&&vu(u,wu,f,{name:i}),bu[t]=f,h},Au=function(e,t){return{value:e,done:t}},ju=A,Mu=yl,Nu=Ko;jn.f;var Pu=ku,Fu=Au,Iu=`Array Iterator`,Lu=Nu.set,Ru=Nu.getterFor(Iu);Pu(Array,`Array`,function(e,t){Lu(this,{type:Iu,target:ju(e),index:0,kind:t})},function(){var e=Ru(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,Fu(void 0,!0);switch(e.kind){case`keys`:return Fu(n,!1);case`values`:return Fu(t[n],!1)}return Fu([n,t[n]],!1)},`values`),Mu.Arguments=Mu.Array;var zu={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Bu=o,Vu=Hr,Hu=Yn,Uu=yl,Wu=Bt(`toStringTag`);for(var Gu in zu){var Ku=Bu[Gu],qu=Ku&&Ku.prototype;qu&&Vu(qu)!==Wu&&Hu(qu,Wu,Gu),Uu[Gu]=Uu.Array}var Ju=vl,Yu=Bt,Xu=jn.f,Zu=Yu(`metadata`),Qu=Function.prototype;Qu[Zu]===void 0&&Xu(Qu,Zu,{value:null}),co(`asyncDispose`),co(`dispose`),co(`metadata`);var $u=Ju,ed=F,td=v,nd=ed(`Symbol`),rd=nd.keyFor,id=td(nd.prototype.valueOf),ad=nd.isRegisteredSymbol||function(e){try{return rd(id(e))!==void 0}catch{return!1}};z({target:`Symbol`,stat:!0},{isRegisteredSymbol:ad});for(var od=vt,sd=F,cd=v,ld=qe,ud=Bt,dd=sd(`Symbol`),fd=dd.isWellKnownSymbol,pd=sd(`Object`,`getOwnPropertyNames`),md=cd(dd.prototype.valueOf),hd=od(`wks`),gd=0,_d=pd(dd),vd=_d.length;gd<vd;gd++)try{var yd=_d[gd];ld(dd[yd])&&ud(yd)}catch{}var bd=function(e){if(fd&&fd(e))return!0;try{for(var t=md(e),n=0,r=pd(hd),i=r.length;n<i;n++)if(hd[r[n]]==t)return!0}catch{}return!1};z({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:bd}),co(`matcher`),co(`observable`),z({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:ad}),z({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:bd}),co(`metadataKey`),co(`patternMatch`),co(`replaceAll`);var xd=$u,Sd=r(xd),Cd=v,wd=br,Td=Li,Ed=ye,Dd=Cd(``.charAt),Od=Cd(``.charCodeAt),kd=Cd(``.slice),Ad=function(e){return function(t,n){var r=Td(Ed(t)),i=wd(n),a=r.length,o,s;return i<0||i>=a?e?``:void 0:(o=Od(r,i),o<55296||o>56319||i+1===a||(s=Od(r,i+1))<56320||s>57343?e?Dd(r,i):o:e?kd(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},jd={codeAt:Ad(!1),charAt:Ad(!0)}.charAt,Md=Li,Nd=Ko,Pd=ku,Fd=Au,Id=`String Iterator`,Ld=Nd.set,Rd=Nd.getterFor(Id);Pd(String,`String`,function(e){Ld(this,{type:Id,string:Md(e),index:0})},function(){var e=Rd(this),t=e.string,n=e.index,r;return n>=t.length?Fd(void 0,!0):(r=jd(t,n),e.index+=r.length,Fd(r,!1))});var zd=ro.f(`iterator`),Bd=zd,Vd=r(Bd);function Hd(e){"@babel/helpers - typeof";return Hd=typeof Sd==`function`&&typeof Vd==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Sd==`function`&&e.constructor===Sd&&e!==Sd.prototype?`symbol`:typeof e},Hd(e)}var Ud=r(ro.f(`toPrimitive`));function Wd(e,t){if(Hd(e)!==`object`||e===null)return e;var n=e[Ud];if(n!==void 0){var r=n.call(e,t||`default`);if(Hd(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Gd(e){var t=Wd(e,`string`);return Hd(t)===`symbol`?t:String(t)}function Kd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),mr(e,Gd(r.key),r)}}function qd(e,t,n){return t&&Kd(e.prototype,t),n&&Kd(e,n),mr(e,`prototype`,{writable:!1}),e}function Jd(e,t,n){return t=Gd(t),t in e?mr(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Yd=v,Xd=$e,Zd=M,Qd=Tt,$d=kc,ef=c,tf=Function,nf=Yd([].concat),rf=Yd([].join),af={},of=function(e,t,n){if(!Qd(af,t)){for(var r=[],i=0;i<t;i++)r[i]=`a[`+i+`]`;af[t]=tf(`C,a`,`return new C(`+rf(r,`,`)+`)`)}return af[t](e,n)},sf=ef?tf.bind:function(e){var t=Xd(this),n=t.prototype,r=$d(arguments,1),i=function(){var n=nf(r,$d(arguments));return this instanceof i?of(t,n.length,n):t.apply(e,n)};return Zd(n)&&(i.prototype=n),i},cf=z,lf=sf;cf({target:`Function`,proto:!0,forced:Function.bind!==lf},{bind:lf});var uf=o,df=N,ff=function(e,t){var n=df[e+`Prototype`],r=n&&n[t];if(r)return r;var i=uf[e],a=i&&i.prototype;return a&&a[t]},pf=ff(`Function`,`bind`),mf=De,hf=pf,gf=Function.prototype,_f=function(e){var t=e.bind;return e===gf||mf(gf,e)&&t===gf.bind?hf:t},vf=r(_f),yf=$e,bf=xt,xf=he,Sf=wr,Cf=TypeError,wf=function(e){return function(t,n,r,i){yf(n);var a=bf(t),o=xf(a),s=Sf(a),c=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(c in o){i=o[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw new Cf(`Reduce of empty array with no initial value`)}for(;e?c>=0:s>c;c+=l)c in o&&(i=n(i,o[c],c,a));return i}},Tf={left:wf(!1),right:wf(!0)},H=s,Ef=function(e,t){var n=[][e];return!!n&&H(function(){n.call(null,t||function(){return 1},1)})},Df=S(o.process)===`process`,Of=z,kf=Tf.left,Af=Ef,jf=Ie;Of({target:`Array`,proto:!0,forced:!Df&&jf>79&&jf<83||!Af(`reduce`)},{reduce:function(e){var t=arguments.length;return kf(this,e,t,t>1?arguments[1]:void 0)}});var Mf=ff(`Array`,`reduce`),Nf=De,Pf=Mf,Ff=Array.prototype,If=r(function(e){var t=e.reduce;return e===Ff||Nf(Ff,e)&&t===Ff.reduce?Pf:t}),Lf=z,Rf=ts.filter;Lf({target:`Array`,proto:!0,forced:!yi(`filter`)},{filter:function(e){return Rf(this,e,arguments.length>1?arguments[1]:void 0)}});var zf=ff(`Array`,`filter`),Bf=De,Vf=zf,Hf=Array.prototype,Uf=r(function(e){var t=e.filter;return e===Hf||Bf(Hf,e)&&t===Hf.filter?Vf:t}),Wf=z,Gf=ts.map;Wf({target:`Array`,proto:!0,forced:!yi(`map`)},{map:function(e){return Gf(this,e,arguments.length>1?arguments[1]:void 0)}});var Kf=ff(`Array`,`map`),qf=De,Jf=Kf,Yf=Array.prototype,Xf=r(function(e){var t=e.map;return e===Yf||qf(Yf,e)&&t===Yf.map?Jf:t}),Zf=gr,Qf=wr,$f=Dr,ep=An,tp=function(e,t,n,r,i,a,o,s){for(var c=i,l=0,u=o?ep(o,s):!1,d,f;l<r;)l in n&&(d=u?u(n[l],l,t):n[l],a>0&&Zf(d)?(f=Qf(d),c=tp(e,t,d,f,c,a-1)-1):($f(c+1),e[c]=d),c++),l++;return c},np=tp,rp=z,ip=np,ap=$e,op=xt,sp=wr,cp=mi;rp({target:`Array`,proto:!0},{flatMap:function(e){var t=op(this),n=sp(t),r;return ap(e),r=cp(t,0),r.length=ip(r,t,t,n,0,1,e,arguments.length>1?arguments[1]:void 0),r}});var lp=ff(`Array`,`flatMap`),up=De,dp=lp,fp=Array.prototype,pp=r(function(e){var t=e.flatMap;return e===fp||up(fp,e)&&t===fp.flatMap?dp:t});function mp(e){return new gp(e)}var hp=function(){function e(n,r,i){var a,o,s;t(this,e),Jd(this,`_listeners`,{add:vf(a=this._add).call(a,this),remove:vf(o=this._remove).call(o,this),update:vf(s=this._update).call(s,this)}),this._source=n,this._transformers=r,this._target=i}return qd(e,[{key:`all`,value:function(){return this._target.update(this._transformItems(this._source.get())),this}},{key:`start`,value:function(){return this._source.on(`add`,this._listeners.add),this._source.on(`remove`,this._listeners.remove),this._source.on(`update`,this._listeners.update),this}},{key:`stop`,value:function(){return this._source.off(`add`,this._listeners.add),this._source.off(`remove`,this._listeners.remove),this._source.off(`update`,this._listeners.update),this}},{key:`_transformItems`,value:function(e){var t;return If(t=this._transformers).call(t,function(e,t){return t(e)},e)}},{key:`_add`,value:function(e,t){t!=null&&this._target.add(this._transformItems(this._source.get(t.items)))}},{key:`_update`,value:function(e,t){t!=null&&this._target.update(this._transformItems(this._source.get(t.items)))}},{key:`_remove`,value:function(e,t){t!=null&&this._target.remove(this._transformItems(t.oldData))}}]),e}(),gp=function(){function e(n){t(this,e),Jd(this,`_transformers`,[]),this._source=n}return qd(e,[{key:`filter`,value:function(e){return this._transformers.push(function(t){return Uf(t).call(t,e)}),this}},{key:`map`,value:function(e){return this._transformers.push(function(t){return Xf(t).call(t,e)}),this}},{key:`flatMap`,value:function(e){return this._transformers.push(function(t){return pp(t).call(t,e)}),this}},{key:`to`,value:function(e){return new hp(this._source,this._transformers,e)}}]),e}(),_p=k,vp=In,yp=nt,bp=function(e,t,n){var r,i;vp(e);try{if(r=yp(e,`return`),!r){if(t===`throw`)throw n;return n}r=_p(r,e)}catch(e){i=!0,r=e}if(t===`throw`)throw n;if(i)throw r;return vp(r),n},xp=In,Sp=bp,Cp=function(e,t,n,r){try{return r?t(xp(n)[0],n[1]):t(n)}catch(t){Sp(e,`throw`,t)}},wp=Bt,Tp=yl,Ep=wp(`iterator`),Dp=Array.prototype,Op=function(e){return e!==void 0&&(Tp.Array===e||Dp[Ep]===e)},kp=Hr,Ap=nt,jp=ge,Mp=yl,Np=Bt(`iterator`),Pp=function(e){if(!jp(e))return Ap(e,Np)||Ap(e,`@@iterator`)||Mp[kp(e)]},Fp=k,Ip=$e,Lp=In,Rp=Ye,zp=Pp,Bp=TypeError,Vp=function(e,t){var n=arguments.length<2?zp(e):t;if(Ip(n))return Lp(Fp(n,e));throw new Bp(Rp(e)+` is not iterable`)},Hp=An,Up=k,Wp=xt,Gp=Cp,Kp=Op,qp=si,Jp=wr,Yp=jr,Xp=Vp,Zp=Pp,Qp=Array,$p=function(e){var t=Wp(e),n=qp(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=i!==void 0;a&&(i=Hp(i,r>2?arguments[2]:void 0));var o=Zp(t),s=0,c,l,u,d,f,p;if(o&&!(this===Qp&&Kp(o)))for(d=Xp(t,o),f=d.next,l=n?new this:[];!(u=Up(f,d)).done;s++)p=a?Gp(d,i,[u.value,s],!0):u.value,Yp(l,s,p);else for(c=Jp(t),l=n?new this(c):Qp(c);c>s;s++)p=a?i(t[s],s):t[s],Yp(l,s,p);return l.length=s,l},em=Bt(`iterator`),tm=!1;try{var nm=0,rm={next:function(){return{done:!!nm++}},return:function(){tm=!0}};rm[em]=function(){return this},Array.from(rm,function(){throw 2})}catch{}var im=function(e,t){try{if(!t&&!tm)return!1}catch{return!1}var n=!1;try{var r={};r[em]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},am=z,om=$p;am({target:`Array`,stat:!0,forced:!im(function(e){Array.from(e)})},{from:om});var sm=N.Array.from,cm=r(sm),lm=Pp,um=r(lm),dm=r(lm);z({target:`Array`,stat:!0},{isArray:gr});var fm=N.Array.isArray,pm=r(fm);function mm(e){if(pm(e))return e}var hm=O,gm=gr,_m=TypeError,vm=Object.getOwnPropertyDescriptor,ym=hm&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(gm(e)&&!vm(e,`length`).writable)throw new _m(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t},bm=z,xm=xt,Sm=wr,Cm=ym,wm=Dr;bm({target:`Array`,proto:!0,arity:1,forced:s(function(){return[].push.call({length:4294967296},1)!==4294967297})||!function(){try{Object.defineProperty([],`length`,{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=xm(this),n=Sm(t),r=arguments.length;wm(n+r);for(var i=0;i<r;i++)t[n]=arguments[i],n++;return Cm(t,n),n}});var Tm=ff(`Array`,`push`),Em=De,Dm=Tm,Om=Array.prototype,km=function(e){var t=e.push;return e===Om||Em(Om,e)&&t===Om.push?Dm:t},Am=r(km);function jm(e,t){var n=e==null?null:Sd!==void 0&&um(e)||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(Am(s).call(s,r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var Mm=z,Nm=gr,Pm=si,Fm=M,Im=Hi,Lm=wr,Rm=A,zm=jr,Bm=Bt,Vm=yi,Hm=kc,Um=Vm(`slice`),Wm=Bm(`species`),Gm=Array,Km=Math.max;Mm({target:`Array`,proto:!0,forced:!Um},{slice:function(e,t){var n=Rm(this),r=Lm(n),i=Im(e,r),a=Im(t===void 0?r:t,r),o,s,c;if(Nm(n)&&(o=n.constructor,Pm(o)&&(o===Gm||Nm(o.prototype))?o=void 0:Fm(o)&&(o=o[Wm],o===null&&(o=void 0)),o===Gm||o===void 0))return Hm(n,i,a);for(s=new(o===void 0?Gm:o)(Km(a-i,0)),c=0;i<a;i++,c++)i in n&&zm(s,c,n[i]);return s.length=c,s}});var qm=ff(`Array`,`slice`),Jm=De,Ym=qm,Xm=Array.prototype,Zm=function(e){var t=e.slice;return e===Xm||Jm(Xm,e)&&t===Xm.slice?Ym:t},Qm=Zm,$m=r(Qm),eh=r(sm);function th(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nh(e,t){var n;if(e){if(typeof e==`string`)return th(e,t);var r=$m(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return eh(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return th(e,t)}}function rh(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{o as e,t}from"./chunk-CAM3fms7.js";import{D as n,E as r,H as i,L as a,O as o,T as s,V as c,W as l,j as u,v as d,w as f,z as p}from"./OperatorConversations-BwnO3IUP.js";import{m,p as h,t as g,y as _}from"./AdminShell-D0MDlfI1.js";import{t as v}from"./rotate-ccw-BfYwa6ew.js";import{i as y,n as b,r as x}from"./graph-labels-CXt55mIP.js";import{t as S}from"./Checkbox-DqnBuFEU.js";var ee=p(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),C=p(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),te=p(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),w=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n.vis=n.vis||{}))})(e,(function(e){function t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var n=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var i={exports:{}},a=function(e){return e&&e.Math===Math&&e},o=a(typeof globalThis==`object`&&globalThis)||a(typeof window==`object`&&window)||a(typeof self==`object`&&self)||a(typeof n==`object`&&n)||(function(){return this})()||n||Function(`return this`)(),s=function(e){try{return!!e()}catch{return!0}},c=!s(function(){var e=(function(){}).bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}),l=c,u=Function.prototype,d=u.apply,f=u.call,p=typeof Reflect==`object`&&Reflect.apply||(l?f.bind(d):function(){return f.apply(d,arguments)}),m=c,h=Function.prototype,g=h.call,_=m&&h.bind.bind(g,g),v=m?_:function(e){return function(){return g.apply(e,arguments)}},y=v,b=y({}.toString),x=y(``.slice),S=function(e){return x(b(e),8,-1)},ee=S,C=v,te=function(e){if(ee(e)===`Function`)return C(e)},w=typeof document==`object`&&document.all,ne={all:w,IS_HTMLDDA:w===void 0&&w!==void 0},re=ne,T=re.all,E=re.IS_HTMLDDA?function(e){return typeof e==`function`||e===T}:function(e){return typeof e==`function`},D={},O=!s(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),ie=c,ae=Function.prototype.call,k=ie?ae.bind(ae):function(){return ae.apply(ae,arguments)},oe={},se={}.propertyIsEnumerable,ce=Object.getOwnPropertyDescriptor;oe.f=ce&&!se.call({1:2},1)?function(e){var t=ce(this,e);return!!t&&t.enumerable}:se;var le=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},ue=v,de=s,fe=S,pe=Object,me=ue(``.split),he=de(function(){return!pe(`z`).propertyIsEnumerable(0)})?function(e){return fe(e)===`String`?me(e,``):pe(e)}:pe,ge=function(e){return e==null},_e=ge,ve=TypeError,ye=function(e){if(_e(e))throw new ve(`Can't call method on `+e);return e},be=he,xe=ye,A=function(e){return be(xe(e))},Se=E,Ce=ne,j=Ce.all,M=Ce.IS_HTMLDDA?function(e){return typeof e==`object`?e!==null:Se(e)||e===j}:function(e){return typeof e==`object`?e!==null:Se(e)},N={},we=N,Te=o,Ee=E,P=function(e){return Ee(e)?e:void 0},F=function(e,t){return arguments.length<2?P(we[e])||P(Te[e]):we[e]&&we[e][t]||Te[e]&&Te[e][t]},De=v({}.isPrototypeOf),Oe=typeof navigator<`u`&&String(navigator.userAgent)||``,ke=o,Ae=Oe,je=ke.process,I=ke.Deno,Me=je&&je.versions||I&&I.version,Ne=Me&&Me.v8,Pe,Fe;Ne&&(Pe=Ne.split(`.`),Fe=Pe[0]>0&&Pe[0]<4?1:+(Pe[0]+Pe[1])),!Fe&&Ae&&(Pe=Ae.match(/Edge\/(\d+)/),(!Pe||Pe[1]>=74)&&(Pe=Ae.match(/Chrome\/(\d+)/),Pe&&(Fe=+Pe[1])));var Ie=Fe,Le=Ie,Re=s,ze=o.String,Be=!!Object.getOwnPropertySymbols&&!Re(function(){var e=Symbol(`symbol detection`);return!ze(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Le&&Le<41}),Ve=Be&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,He=F,Ue=E,We=De,Ge=Ve,Ke=Object,qe=Ge?function(e){return typeof e==`symbol`}:function(e){var t=He(`Symbol`);return Ue(t)&&We(t.prototype,Ke(e))},Je=String,Ye=function(e){try{return Je(e)}catch{return`Object`}},Xe=E,Ze=Ye,Qe=TypeError,$e=function(e){if(Xe(e))return e;throw new Qe(Ze(e)+` is not a function`)},et=$e,tt=ge,nt=function(e,t){var n=e[t];return tt(n)?void 0:et(n)},rt=k,it=E,at=M,ot=TypeError,st=function(e,t){var n,r;if(t===`string`&&it(n=e.toString)&&!at(r=rt(n,e))||it(n=e.valueOf)&&!at(r=rt(n,e))||t!==`string`&&it(n=e.toString)&&!at(r=rt(n,e)))return r;throw new ot(`Can't convert object to primitive value`)},ct={exports:{}},lt=!0,ut=o,dt=Object.defineProperty,ft=function(e,t){try{dt(ut,e,{value:t,configurable:!0,writable:!0})}catch{ut[e]=t}return t},pt=o,mt=ft,ht=`__core-js_shared__`,gt=pt[ht]||mt(ht,{}),_t=gt;(ct.exports=function(e,t){return _t[e]||(_t[e]=t===void 0?{}:t)})(`versions`,[]).push({version:`3.33.2`,mode:`pure`,copyright:`© 2014-2023 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE`,source:`https://github.com/zloirock/core-js`});var vt=ct.exports,yt=ye,bt=Object,xt=function(e){return bt(yt(e))},St=v,Ct=xt,wt=St({}.hasOwnProperty),Tt=Object.hasOwn||function(e,t){return wt(Ct(e),t)},Et=v,Dt=0,Ot=Math.random(),kt=Et(1 .toString),At=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+kt(++Dt+Ot,36)},jt=o,Mt=vt,Nt=Tt,Pt=At,Ft=Be,It=Ve,Lt=jt.Symbol,Rt=Mt(`wks`),zt=It?Lt.for||Lt:Lt&&Lt.withoutSetter||Pt,Bt=function(e){return Nt(Rt,e)||(Rt[e]=Ft&&Nt(Lt,e)?Lt[e]:zt(`Symbol.`+e)),Rt[e]},Vt=k,Ht=M,Ut=qe,Wt=nt,Gt=st,Kt=Bt,qt=TypeError,Jt=Kt(`toPrimitive`),Yt=function(e,t){if(!Ht(e)||Ut(e))return e;var n=Wt(e,Jt),r;if(n){if(t===void 0&&(t=`default`),r=Vt(n,e,t),!Ht(r)||Ut(r))return r;throw new qt(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),Gt(e,t)},Xt=qe,Zt=function(e){var t=Yt(e,`string`);return Xt(t)?t:t+``},Qt=o,$t=M,en=Qt.document,tn=$t(en)&&$t(en.createElement),nn=function(e){return tn?en.createElement(e):{}},rn=O,an=s,on=nn,sn=!rn&&!an(function(){return Object.defineProperty(on(`div`),`a`,{get:function(){return 7}}).a!==7}),cn=O,ln=k,un=oe,dn=le,fn=A,pn=Zt,mn=Tt,hn=sn,gn=Object.getOwnPropertyDescriptor;D.f=cn?gn:function(e,t){if(e=fn(e),t=pn(t),hn)try{return gn(e,t)}catch{}if(mn(e,t))return dn(!ln(un.f,e,t),e[t])};var _n=s,vn=E,yn=/#|\.prototype\./,bn=function(e,t){var n=Sn[xn(e)];return n===wn?!0:n===Cn?!1:vn(t)?_n(t):!!t},xn=bn.normalize=function(e){return String(e).replace(yn,`.`).toLowerCase()},Sn=bn.data={},Cn=bn.NATIVE=`N`,wn=bn.POLYFILL=`P`,Tn=bn,En=te,Dn=$e,On=c,kn=En(En.bind),An=function(e,t){return Dn(e),t===void 0?e:On?kn(e,t):function(){return e.apply(t,arguments)}},jn={},Mn=O&&s(function(){return Object.defineProperty(function(){},`prototype`,{value:42,writable:!1}).prototype!==42}),Nn=M,Pn=String,Fn=TypeError,In=function(e){if(Nn(e))return e;throw new Fn(Pn(e)+` is not an object`)},Ln=O,Rn=sn,zn=Mn,Bn=In,Vn=Zt,Hn=TypeError,Un=Object.defineProperty,Wn=Object.getOwnPropertyDescriptor,Gn=`enumerable`,L=`configurable`,R=`writable`;jn.f=Ln?zn?function(e,t,n){if(Bn(e),t=Vn(t),Bn(n),typeof e==`function`&&t===`prototype`&&`value`in n&&R in n&&!n[R]){var r=Wn(e,t);r&&r[R]&&(e[t]=n.value,n={configurable:L in n?n[L]:r[L],enumerable:Gn in n?n[Gn]:r[Gn],writable:!1})}return Un(e,t,n)}:Un:function(e,t,n){if(Bn(e),t=Vn(t),Bn(n),Rn)try{return Un(e,t,n)}catch{}if(`get`in n||`set`in n)throw new Hn(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e};var Kn=O,qn=jn,Jn=le,Yn=Kn?function(e,t,n){return qn.f(e,t,Jn(1,n))}:function(e,t,n){return e[t]=n,e},Xn=o,Zn=p,Qn=te,$n=E,er=D.f,tr=Tn,nr=N,rr=An,ir=Yn,ar=Tt,or=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return Zn(e,this,arguments)};return t.prototype=e.prototype,t},z=function(e,t){var n=e.target,r=e.global,i=e.stat,a=e.proto,o=r?Xn:i?Xn[n]:(Xn[n]||{}).prototype,s=r?nr:nr[n]||ir(nr,n,{})[n],c=s.prototype,l,u,d,f,p,m,h,g,_;for(f in t)l=tr(r?f:n+(i?`.`:`#`)+f,e.forced),u=!l&&o&&ar(o,f),m=s[f],u&&(e.dontCallGetSet?(_=er(o,f),h=_&&_.value):h=o[f]),p=u&&h?h:t[f],!(u&&typeof m==typeof p)&&(g=e.bind&&u?rr(p,Xn):e.wrap&&u?or(p):a&&$n(p)?Qn(p):p,(e.sham||p&&p.sham||m&&m.sham)&&ir(g,`sham`,!0),ir(s,f,g),a&&(d=n+`Prototype`,ar(nr,d)||ir(nr,d,{}),ir(nr[d],f,p),e.real&&c&&(l||!c[f])&&ir(c,f,p)))},sr=z,cr=O,lr=jn.f;sr({target:`Object`,stat:!0,forced:Object.defineProperty!==lr,sham:!cr},{defineProperty:lr});var ur=N.Object,dr=i.exports=function(e,t,n){return ur.defineProperty(e,t,n)};ur.defineProperty.sham&&(dr.sham=!0);var fr=i.exports,pr=fr,mr=r(pr),hr=S,gr=Array.isArray||function(e){return hr(e)===`Array`},_r=Math.ceil,vr=Math.floor,yr=Math.trunc||function(e){var t=+e;return(t>0?vr:_r)(t)},br=function(e){var t=+e;return t!==t||t===0?0:yr(t)},xr=br,Sr=Math.min,Cr=function(e){return e>0?Sr(xr(e),9007199254740991):0},wr=function(e){return Cr(e.length)},Tr=TypeError,Er=9007199254740991,Dr=function(e){if(e>Er)throw Tr(`Maximum allowed index exceeded`);return e},Or=Zt,kr=jn,Ar=le,jr=function(e,t,n){var r=Or(t);r in e?kr.f(e,r,Ar(0,n)):e[r]=n},Mr=Bt(`toStringTag`),Nr={};Nr[Mr]=`z`;var Pr=String(Nr)===`[object z]`,Fr=Pr,Ir=E,Lr=S,Rr=Bt(`toStringTag`),zr=Object,Br=Lr(function(){return arguments}())===`Arguments`,Vr=function(e,t){try{return e[t]}catch{}},Hr=Fr?Lr:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=Vr(t=zr(e),Rr))==`string`?n:Br?Lr(t):(r=Lr(t))===`Object`&&Ir(t.callee)?`Arguments`:r},Ur=v,Wr=E,Gr=gt,Kr=Ur(Function.toString);Wr(Gr.inspectSource)||(Gr.inspectSource=function(e){return Kr(e)});var qr=Gr.inspectSource,Jr=v,Yr=s,Xr=E,Zr=Hr,Qr=F,B=qr,$r=function(){},ei=[],ti=Qr(`Reflect`,`construct`),ni=/^\s*(?:class|function)\b/,ri=Jr(ni.exec),ii=!ni.test($r),ai=function(e){if(!Xr(e))return!1;try{return ti($r,ei,e),!0}catch{return!1}},oi=function(e){if(!Xr(e))return!1;switch(Zr(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return ii||!!ri(ni,B(e))}catch{return!0}};oi.sham=!0;var si=!ti||Yr(function(){var e;return ai(ai.call)||!ai(Object)||!ai(function(){e=!0})||e})?oi:ai,ci=gr,li=si,ui=M,di=Bt(`species`),fi=Array,pi=function(e){var t;return ci(e)&&(t=e.constructor,li(t)&&(t===fi||ci(t.prototype))?t=void 0:ui(t)&&(t=t[di],t===null&&(t=void 0))),t===void 0?fi:t},mi=function(e,t){return new(pi(e))(t===0?0:t)},hi=s,gi=Bt,_i=Ie,vi=gi(`species`),yi=function(e){return _i>=51||!hi(function(){var t=[],n=t.constructor={};return n[vi]=function(){return{foo:1}},t[e](Boolean).foo!==1})},bi=z,xi=s,Si=gr,Ci=M,wi=xt,Ti=wr,Ei=Dr,Di=jr,Oi=mi,ki=yi,Ai=Bt,ji=Ie,Mi=Ai(`isConcatSpreadable`),Ni=ji>=51||!xi(function(){var e=[];return e[Mi]=!1,e.concat()[0]!==e}),Pi=function(e){if(!Ci(e))return!1;var t=e[Mi];return t===void 0?Si(e):!!t};bi({target:`Array`,proto:!0,arity:1,forced:!Ni||!ki(`concat`)},{concat:function(e){var t=wi(this),n=Oi(t,0),r=0,i,a,o,s,c;for(i=-1,o=arguments.length;i<o;i++)if(c=i===-1?t:arguments[i],Pi(c))for(s=Ti(c),Ei(r+s),a=0;a<s;a++,r++)a in c&&Di(n,r,c[a]);else Ei(r+1),Di(n,r++,c);return n.length=r,n}});var Fi=Hr,Ii=String,Li=function(e){if(Fi(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return Ii(e)},Ri={},zi=br,Bi=Math.max,Vi=Math.min,Hi=function(e,t){var n=zi(e);return n<0?Bi(n+t,0):Vi(n,t)},Ui=A,Wi=Hi,Gi=wr,Ki=function(e){return function(t,n,r){var i=Ui(t),a=Gi(i),o=Wi(r,a),s;if(e&&n!==n){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},qi={includes:Ki(!0),indexOf:Ki(!1)},Ji={},Yi=v,Xi=Tt,Zi=A,Qi=qi.indexOf,$i=Ji,ea=Yi([].push),ta=function(e,t){var n=Zi(e),r=0,i=[],a;for(a in n)!Xi($i,a)&&Xi(n,a)&&ea(i,a);for(;t.length>r;)Xi(n,a=t[r++])&&(~Qi(i,a)||ea(i,a));return i},na=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],ra=ta,ia=na,aa=Object.keys||function(e){return ra(e,ia)},oa=O,sa=Mn,ca=jn,la=In,ua=A,da=aa;Ri.f=oa&&!sa?Object.defineProperties:function(e,t){la(e);for(var n=ua(t),r=da(t),i=r.length,a=0,o;i>a;)ca.f(e,o=r[a++],n[o]);return e};var fa=F(`document`,`documentElement`),pa=vt,ma=At,ha=pa(`keys`),ga=function(e){return ha[e]||(ha[e]=ma(e))},_a=In,va=Ri,ya=na,ba=Ji,xa=fa,Sa=nn,Ca=ga,wa=`>`,Ta=`<`,Ea=`prototype`,Da=`script`,Oa=Ca(`IE_PROTO`),ka=function(){},Aa=function(e){return Ta+Da+wa+e+Ta+`/`+Da+wa},ja=function(e){e.write(Aa(``)),e.close();var t=e.parentWindow.Object;return e=null,t},Ma=function(){var e=Sa(`iframe`),t=`java`+Da+`:`,n;return e.style.display=`none`,xa.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(Aa(`document.F=Object`)),n.close(),n.F},Na,Pa=function(){try{Na=new ActiveXObject(`htmlfile`)}catch{}Pa=typeof document<`u`?document.domain&&Na?ja(Na):Ma():ja(Na);for(var e=ya.length;e--;)delete Pa[Ea][ya[e]];return Pa()};ba[Oa]=!0;var Fa=Object.create||function(e,t){var n;return e===null?n=Pa():(ka[Ea]=_a(e),n=new ka,ka[Ea]=null,n[Oa]=e),t===void 0?n:va.f(n,t)},Ia={},La=ta,Ra=na.concat(`length`,`prototype`);Ia.f=Object.getOwnPropertyNames||function(e){return La(e,Ra)};var za={},Ba=Hi,Va=wr,Ha=jr,Ua=Array,Wa=Math.max,Ga=function(e,t,n){for(var r=Va(e),i=Ba(t,r),a=Ba(n===void 0?r:n,r),o=Ua(Wa(a-i,0)),s=0;i<a;i++,s++)Ha(o,s,e[i]);return o.length=s,o},Ka=S,qa=A,Ja=Ia.f,Ya=Ga,Xa=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Za=function(e){try{return Ja(e)}catch{return Ya(Xa)}};za.f=function(e){return Xa&&Ka(e)===`Window`?Za(e):Ja(qa(e))};var Qa={};Qa.f=Object.getOwnPropertySymbols;var $a=Yn,eo=function(e,t,n,r){return r&&r.enumerable?e[t]=n:$a(e,t,n),e},to=jn,no=function(e,t,n){return to.f(e,t,n)},ro={};ro.f=Bt;var io=N,ao=Tt,oo=ro,so=jn.f,co=function(e){var t=io.Symbol||={};ao(t,e)||so(t,e,{value:oo.f(e)})},lo=k,uo=F,fo=Bt,po=eo,mo=function(){var e=uo(`Symbol`),t=e&&e.prototype,n=t&&t.valueOf,r=fo(`toPrimitive`);t&&!t[r]&&po(t,r,function(e){return lo(n,this)},{arity:1})},ho=Pr,go=Hr,_o=ho?{}.toString:function(){return`[object `+go(this)+`]`},vo=Pr,yo=jn.f,bo=Yn,xo=Tt,So=_o,Co=Bt(`toStringTag`),wo=function(e,t,n,r){if(e){var i=n?e:e.prototype;xo(i,Co)||yo(i,Co,{configurable:!0,value:t}),r&&!vo&&bo(i,`toString`,So)}},To=o,Eo=E,Do=To.WeakMap,Oo=Eo(Do)&&/native code/.test(String(Do)),ko=o,Ao=M,jo=Yn,Mo=Tt,No=gt,Po=ga,Fo=Ji,Io=`Object already initialized`,Lo=ko.TypeError,Ro=ko.WeakMap,zo,Bo,Vo,Ho=function(e){return Vo(e)?Bo(e):zo(e,{})},Uo=function(e){return function(t){var n;if(!Ao(t)||(n=Bo(t)).type!==e)throw new Lo(`Incompatible receiver, `+e+` required`);return n}};if(Oo||No.state){var Wo=No.state||=new Ro;Wo.get=Wo.get,Wo.has=Wo.has,Wo.set=Wo.set,zo=function(e,t){if(Wo.has(e))throw new Lo(Io);return t.facade=e,Wo.set(e,t),t},Bo=function(e){return Wo.get(e)||{}},Vo=function(e){return Wo.has(e)}}else{var Go=Po(`state`);Fo[Go]=!0,zo=function(e,t){if(Mo(e,Go))throw new Lo(Io);return t.facade=e,jo(e,Go,t),t},Bo=function(e){return Mo(e,Go)?e[Go]:{}},Vo=function(e){return Mo(e,Go)}}var Ko={set:zo,get:Bo,has:Vo,enforce:Ho,getterFor:Uo},qo=An,Jo=v,Yo=he,Xo=xt,Zo=wr,Qo=mi,$o=Jo([].push),es=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(c,l,u,d){for(var f=Xo(c),p=Yo(f),m=qo(l,u),h=Zo(p),g=0,_=d||Qo,v=t?_(c,h):n||o?_(c,0):void 0,y,b;h>g;g++)if((s||g in p)&&(y=p[g],b=m(y,g,f),e))if(t)v[g]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return g;case 2:$o(v,y)}else switch(e){case 4:return!1;case 7:$o(v,y)}return a?-1:r||i?i:v}},ts={forEach:es(0),map:es(1),filter:es(2),some:es(3),every:es(4),find:es(5),findIndex:es(6),filterReject:es(7)},ns=z,rs=o,is=k,as=v,os=O,ss=Be,cs=s,ls=Tt,us=De,ds=In,fs=A,ps=Zt,ms=Li,hs=le,gs=Fa,_s=aa,vs=Ia,ys=za,bs=Qa,xs=D,Ss=jn,Cs=Ri,ws=oe,Ts=eo,Es=no,Ds=vt,Os=ga,ks=Ji,As=At,js=Bt,Ms=ro,Ns=co,Ps=mo,Fs=wo,Is=Ko,Ls=ts.forEach,Rs=Os(`hidden`),zs=`Symbol`,Bs=`prototype`,Vs=Is.set,Hs=Is.getterFor(zs),Us=Object[Bs],Ws=rs.Symbol,Gs=Ws&&Ws[Bs],Ks=rs.RangeError,qs=rs.TypeError,Js=rs.QObject,Ys=xs.f,Xs=Ss.f,Zs=ys.f,Qs=ws.f,$s=as([].push),ec=Ds(`symbols`),tc=Ds(`op-symbols`),nc=Ds(`wks`),rc=!Js||!Js[Bs]||!Js[Bs].findChild,ic=function(e,t,n){var r=Ys(Us,t);r&&delete Us[t],Xs(e,t,n),r&&e!==Us&&Xs(Us,t,r)},ac=os&&cs(function(){return gs(Xs({},`a`,{get:function(){return Xs(this,`a`,{value:7}).a}})).a!==7})?ic:Xs,oc=function(e,t){var n=ec[e]=gs(Gs);return Vs(n,{type:zs,tag:e,description:t}),os||(n.description=t),n},sc=function(e,t,n){e===Us&&sc(tc,t,n),ds(e);var r=ps(t);return ds(n),ls(ec,r)?(n.enumerable?(ls(e,Rs)&&e[Rs][r]&&(e[Rs][r]=!1),n=gs(n,{enumerable:hs(0,!1)})):(ls(e,Rs)||Xs(e,Rs,hs(1,{})),e[Rs][r]=!0),ac(e,r,n)):Xs(e,r,n)},cc=function(e,t){ds(e);var n=fs(t);return Ls(_s(n).concat(pc(n)),function(t){(!os||is(uc,n,t))&&sc(e,t,n[t])}),e},lc=function(e,t){return t===void 0?gs(e):cc(gs(e),t)},uc=function(e){var t=ps(e),n=is(Qs,this,t);return this===Us&&ls(ec,t)&&!ls(tc,t)?!1:n||!ls(this,t)||!ls(ec,t)||ls(this,Rs)&&this[Rs][t]?n:!0},dc=function(e,t){var n=fs(e),r=ps(t);if(!(n===Us&&ls(ec,r)&&!ls(tc,r))){var i=Ys(n,r);return i&&ls(ec,r)&&!(ls(n,Rs)&&n[Rs][r])&&(i.enumerable=!0),i}},fc=function(e){var t=Zs(fs(e)),n=[];return Ls(t,function(e){!ls(ec,e)&&!ls(ks,e)&&$s(n,e)}),n},pc=function(e){var t=e===Us,n=Zs(t?tc:fs(e)),r=[];return Ls(n,function(e){ls(ec,e)&&(!t||ls(Us,e))&&$s(r,ec[e])}),r};ss||(Ws=function(){if(us(Gs,this))throw new qs(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:ms(arguments[0]),t=As(e),n=function(e){var r=this===void 0?rs:this;r===Us&&is(n,tc,e),ls(r,Rs)&&ls(r[Rs],t)&&(r[Rs][t]=!1);var i=hs(1,e);try{ac(r,t,i)}catch(e){if(!(e instanceof Ks))throw e;ic(r,t,i)}};return os&&rc&&ac(Us,t,{configurable:!0,set:n}),oc(t,e)},Gs=Ws[Bs],Ts(Gs,`toString`,function(){return Hs(this).tag}),Ts(Ws,`withoutSetter`,function(e){return oc(As(e),e)}),ws.f=uc,Ss.f=sc,Cs.f=cc,xs.f=dc,vs.f=ys.f=fc,bs.f=pc,Ms.f=function(e){return oc(js(e),e)},os&&Es(Gs,`description`,{configurable:!0,get:function(){return Hs(this).description}})),ns({global:!0,constructor:!0,wrap:!0,forced:!ss,sham:!ss},{Symbol:Ws}),Ls(_s(nc),function(e){Ns(e)}),ns({target:zs,stat:!0,forced:!ss},{useSetter:function(){rc=!0},useSimple:function(){rc=!1}}),ns({target:`Object`,stat:!0,forced:!ss,sham:!os},{create:lc,defineProperty:sc,defineProperties:cc,getOwnPropertyDescriptor:dc}),ns({target:`Object`,stat:!0,forced:!ss},{getOwnPropertyNames:fc}),Ps(),Fs(Ws,zs),ks[Rs]=!0;var mc=Be&&!!Symbol.for&&!!Symbol.keyFor,hc=z,gc=F,_c=Tt,vc=Li,yc=vt,bc=mc,xc=yc(`string-to-symbol-registry`),V=yc(`symbol-to-string-registry`);hc({target:`Symbol`,stat:!0,forced:!bc},{for:function(e){var t=vc(e);if(_c(xc,t))return xc[t];var n=gc(`Symbol`)(t);return xc[t]=n,V[n]=t,n}});var Sc=z,Cc=Tt,wc=qe,Tc=Ye,Ec=vt,Dc=mc,Oc=Ec(`symbol-to-string-registry`);Sc({target:`Symbol`,stat:!0,forced:!Dc},{keyFor:function(e){if(!wc(e))throw TypeError(Tc(e)+` is not a symbol`);if(Cc(Oc,e))return Oc[e]}});var kc=v([].slice),Ac=v,jc=gr,Mc=E,Nc=S,Pc=Li,Fc=Ac([].push),Ic=function(e){if(Mc(e))return e;if(jc(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i==`string`?Fc(n,i):(typeof i==`number`||Nc(i)===`Number`||Nc(i)===`String`)&&Fc(n,Pc(i))}var a=n.length,o=!0;return function(e,t){if(o)return o=!1,t;if(jc(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Lc=z,Rc=F,zc=p,Bc=k,Vc=v,Hc=s,Uc=E,Wc=qe,Gc=kc,Kc=Ic,qc=Be,Jc=String,Yc=Rc(`JSON`,`stringify`),Xc=Vc(/./.exec),Zc=Vc(``.charAt),Qc=Vc(``.charCodeAt),$c=Vc(``.replace),el=Vc(1 .toString),tl=/[\uD800-\uDFFF]/g,nl=/^[\uD800-\uDBFF]$/,rl=/^[\uDC00-\uDFFF]$/,il=!qc||Hc(function(){var e=Rc(`Symbol`)(`stringify detection`);return Yc([e])!==`[null]`||Yc({a:e})!==`{}`||Yc(Object(e))!==`{}`}),al=Hc(function(){return Yc(`\udf06\ud834`)!==`"\\udf06\\ud834"`||Yc(`\udead`)!==`"\\udead"`}),ol=function(e,t){var n=Gc(arguments),r=Kc(t);if(!(!Uc(r)&&(e===void 0||Wc(e))))return n[1]=function(e,t){if(Uc(r)&&(t=Bc(r,this,Jc(e),t)),!Wc(t))return t},zc(Yc,null,n)},sl=function(e,t,n){var r=Zc(n,t-1),i=Zc(n,t+1);return Xc(nl,e)&&!Xc(rl,i)||Xc(rl,e)&&!Xc(nl,r)?`\\u`+el(Qc(e,0),16):e};Yc&&Lc({target:`JSON`,stat:!0,arity:3,forced:il||al},{stringify:function(e,t,n){var r=Gc(arguments),i=zc(il?ol:Yc,null,r);return al&&typeof i==`string`?$c(i,tl,sl):i}});var cl=z,ll=Be,ul=s,dl=Qa,fl=xt;cl({target:`Object`,stat:!0,forced:!ll||ul(function(){dl.f(1)})},{getOwnPropertySymbols:function(e){var t=dl.f;return t?t(fl(e)):[]}}),co(`asyncIterator`),co(`hasInstance`),co(`isConcatSpreadable`),co(`iterator`),co(`match`),co(`matchAll`),co(`replace`),co(`search`),co(`species`),co(`split`);var pl=co,ml=mo;pl(`toPrimitive`),ml();var hl=F,gl=co,_l=wo;gl(`toStringTag`),_l(hl(`Symbol`),`Symbol`),co(`unscopables`),wo(o.JSON,`JSON`,!0);var vl=N.Symbol,yl={},bl=O,xl=Tt,Sl=Function.prototype,Cl=bl&&Object.getOwnPropertyDescriptor,wl=xl(Sl,`name`),Tl={EXISTS:wl,PROPER:wl&&(function(){}).name===`something`,CONFIGURABLE:wl&&(!bl||bl&&Cl(Sl,`name`).configurable)},El=!s(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Dl=Tt,Ol=E,kl=xt,Al=ga,jl=El,Ml=Al(`IE_PROTO`),Nl=Object,Pl=Nl.prototype,Fl=jl?Nl.getPrototypeOf:function(e){var t=kl(e);if(Dl(t,Ml))return t[Ml];var n=t.constructor;return Ol(n)&&t instanceof n?n.prototype:t instanceof Nl?Pl:null},Il=s,Ll=E,Rl=M,zl=Fa,Bl=Fl,Vl=eo,Hl=Bt(`iterator`),Ul=!1,Wl,Gl,Kl;[].keys&&(Kl=[].keys(),`next`in Kl?(Gl=Bl(Bl(Kl)),Gl!==Object.prototype&&(Wl=Gl)):Ul=!0),Wl=!Rl(Wl)||Il(function(){var e={};return Wl[Hl].call(e)!==e})?{}:zl(Wl),Ll(Wl[Hl])||Vl(Wl,Hl,function(){return this});var ql={IteratorPrototype:Wl,BUGGY_SAFARI_ITERATORS:Ul},Jl=ql.IteratorPrototype,Yl=Fa,Xl=le,Zl=wo,Ql=yl,$l=function(){return this},eu=function(e,t,n,r){var i=t+` Iterator`;return e.prototype=Yl(Jl,{next:Xl(+!r,n)}),Zl(e,i,!1,!0),Ql[i]=$l,e},tu=v,nu=$e,ru=function(e,t,n){try{return tu(nu(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},iu=E,au=String,ou=TypeError,su=function(e){if(typeof e==`object`||iu(e))return e;throw new ou(`Can't set `+au(e)+` as a prototype`)},cu=ru,lu=In,uu=su,du=Object.setPrototypeOf||(`__proto__`in{}?function(){var e=!1,t={},n;try{n=cu(Object.prototype,`__proto__`,`set`),n(t,[]),e=t instanceof Array}catch{}return function(t,r){return lu(t),uu(r),e?n(t,r):t.__proto__=r,t}}():void 0),fu=z,pu=k,mu=Tl,hu=eu,gu=Fl,_u=wo,vu=eo,yu=Bt,bu=yl,xu=ql,Su=mu.PROPER;mu.CONFIGURABLE,xu.IteratorPrototype;var Cu=xu.BUGGY_SAFARI_ITERATORS,wu=yu(`iterator`),Tu=`keys`,Eu=`values`,Du=`entries`,Ou=function(){return this},ku=function(e,t,n,r,i,a,o){hu(n,t,r);var s=function(e){if(e===i&&f)return f;if(!Cu&&e&&e in u)return u[e];switch(e){case Tu:return function(){return new n(this,e)};case Eu:return function(){return new n(this,e)};case Du:return function(){return new n(this,e)}}return function(){return new n(this)}},c=t+` Iterator`,l=!1,u=e.prototype,d=u[wu]||u[`@@iterator`]||i&&u[i],f=!Cu&&d||s(i),p=t===`Array`&&u.entries||d,m,h,g;if(p&&(m=gu(p.call(new e)),m!==Object.prototype&&m.next&&(_u(m,c,!0,!0),bu[c]=Ou)),Su&&i===Eu&&d&&d.name!==Eu&&(l=!0,f=function(){return pu(d,this)}),i)if(h={values:s(Eu),keys:a?f:s(Tu),entries:s(Du)},o)for(g in h)(Cu||l||!(g in u))&&vu(u,g,h[g]);else fu({target:t,proto:!0,forced:Cu||l},h);return o&&u[wu]!==f&&vu(u,wu,f,{name:i}),bu[t]=f,h},Au=function(e,t){return{value:e,done:t}},ju=A,Mu=yl,Nu=Ko;jn.f;var Pu=ku,Fu=Au,Iu=`Array Iterator`,Lu=Nu.set,Ru=Nu.getterFor(Iu);Pu(Array,`Array`,function(e,t){Lu(this,{type:Iu,target:ju(e),index:0,kind:t})},function(){var e=Ru(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,Fu(void 0,!0);switch(e.kind){case`keys`:return Fu(n,!1);case`values`:return Fu(t[n],!1)}return Fu([n,t[n]],!1)},`values`),Mu.Arguments=Mu.Array;var zu={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Bu=o,Vu=Hr,Hu=Yn,Uu=yl,Wu=Bt(`toStringTag`);for(var Gu in zu){var Ku=Bu[Gu],qu=Ku&&Ku.prototype;qu&&Vu(qu)!==Wu&&Hu(qu,Wu,Gu),Uu[Gu]=Uu.Array}var Ju=vl,Yu=Bt,Xu=jn.f,Zu=Yu(`metadata`),Qu=Function.prototype;Qu[Zu]===void 0&&Xu(Qu,Zu,{value:null}),co(`asyncDispose`),co(`dispose`),co(`metadata`);var $u=Ju,ed=F,td=v,nd=ed(`Symbol`),rd=nd.keyFor,id=td(nd.prototype.valueOf),ad=nd.isRegisteredSymbol||function(e){try{return rd(id(e))!==void 0}catch{return!1}};z({target:`Symbol`,stat:!0},{isRegisteredSymbol:ad});for(var od=vt,sd=F,cd=v,ld=qe,ud=Bt,dd=sd(`Symbol`),fd=dd.isWellKnownSymbol,pd=sd(`Object`,`getOwnPropertyNames`),md=cd(dd.prototype.valueOf),hd=od(`wks`),gd=0,_d=pd(dd),vd=_d.length;gd<vd;gd++)try{var yd=_d[gd];ld(dd[yd])&&ud(yd)}catch{}var bd=function(e){if(fd&&fd(e))return!0;try{for(var t=md(e),n=0,r=pd(hd),i=r.length;n<i;n++)if(hd[r[n]]==t)return!0}catch{}return!1};z({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:bd}),co(`matcher`),co(`observable`),z({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:ad}),z({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:bd}),co(`metadataKey`),co(`patternMatch`),co(`replaceAll`);var xd=$u,Sd=r(xd),Cd=v,wd=br,Td=Li,Ed=ye,Dd=Cd(``.charAt),Od=Cd(``.charCodeAt),kd=Cd(``.slice),Ad=function(e){return function(t,n){var r=Td(Ed(t)),i=wd(n),a=r.length,o,s;return i<0||i>=a?e?``:void 0:(o=Od(r,i),o<55296||o>56319||i+1===a||(s=Od(r,i+1))<56320||s>57343?e?Dd(r,i):o:e?kd(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},jd={codeAt:Ad(!1),charAt:Ad(!0)}.charAt,Md=Li,Nd=Ko,Pd=ku,Fd=Au,Id=`String Iterator`,Ld=Nd.set,Rd=Nd.getterFor(Id);Pd(String,`String`,function(e){Ld(this,{type:Id,string:Md(e),index:0})},function(){var e=Rd(this),t=e.string,n=e.index,r;return n>=t.length?Fd(void 0,!0):(r=jd(t,n),e.index+=r.length,Fd(r,!1))});var zd=ro.f(`iterator`),Bd=zd,Vd=r(Bd);function Hd(e){"@babel/helpers - typeof";return Hd=typeof Sd==`function`&&typeof Vd==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Sd==`function`&&e.constructor===Sd&&e!==Sd.prototype?`symbol`:typeof e},Hd(e)}var Ud=r(ro.f(`toPrimitive`));function Wd(e,t){if(Hd(e)!==`object`||e===null)return e;var n=e[Ud];if(n!==void 0){var r=n.call(e,t||`default`);if(Hd(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Gd(e){var t=Wd(e,`string`);return Hd(t)===`symbol`?t:String(t)}function Kd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),mr(e,Gd(r.key),r)}}function qd(e,t,n){return t&&Kd(e.prototype,t),n&&Kd(e,n),mr(e,`prototype`,{writable:!1}),e}function Jd(e,t,n){return t=Gd(t),t in e?mr(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Yd=v,Xd=$e,Zd=M,Qd=Tt,$d=kc,ef=c,tf=Function,nf=Yd([].concat),rf=Yd([].join),af={},of=function(e,t,n){if(!Qd(af,t)){for(var r=[],i=0;i<t;i++)r[i]=`a[`+i+`]`;af[t]=tf(`C,a`,`return new C(`+rf(r,`,`)+`)`)}return af[t](e,n)},sf=ef?tf.bind:function(e){var t=Xd(this),n=t.prototype,r=$d(arguments,1),i=function(){var n=nf(r,$d(arguments));return this instanceof i?of(t,n.length,n):t.apply(e,n)};return Zd(n)&&(i.prototype=n),i},cf=z,lf=sf;cf({target:`Function`,proto:!0,forced:Function.bind!==lf},{bind:lf});var uf=o,df=N,ff=function(e,t){var n=df[e+`Prototype`],r=n&&n[t];if(r)return r;var i=uf[e],a=i&&i.prototype;return a&&a[t]},pf=ff(`Function`,`bind`),mf=De,hf=pf,gf=Function.prototype,_f=function(e){var t=e.bind;return e===gf||mf(gf,e)&&t===gf.bind?hf:t},vf=r(_f),yf=$e,bf=xt,xf=he,Sf=wr,Cf=TypeError,wf=function(e){return function(t,n,r,i){yf(n);var a=bf(t),o=xf(a),s=Sf(a),c=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(c in o){i=o[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw new Cf(`Reduce of empty array with no initial value`)}for(;e?c>=0:s>c;c+=l)c in o&&(i=n(i,o[c],c,a));return i}},Tf={left:wf(!1),right:wf(!0)},H=s,Ef=function(e,t){var n=[][e];return!!n&&H(function(){n.call(null,t||function(){return 1},1)})},Df=S(o.process)===`process`,Of=z,kf=Tf.left,Af=Ef,jf=Ie;Of({target:`Array`,proto:!0,forced:!Df&&jf>79&&jf<83||!Af(`reduce`)},{reduce:function(e){var t=arguments.length;return kf(this,e,t,t>1?arguments[1]:void 0)}});var Mf=ff(`Array`,`reduce`),Nf=De,Pf=Mf,Ff=Array.prototype,If=r(function(e){var t=e.reduce;return e===Ff||Nf(Ff,e)&&t===Ff.reduce?Pf:t}),Lf=z,Rf=ts.filter;Lf({target:`Array`,proto:!0,forced:!yi(`filter`)},{filter:function(e){return Rf(this,e,arguments.length>1?arguments[1]:void 0)}});var zf=ff(`Array`,`filter`),Bf=De,Vf=zf,Hf=Array.prototype,Uf=r(function(e){var t=e.filter;return e===Hf||Bf(Hf,e)&&t===Hf.filter?Vf:t}),Wf=z,Gf=ts.map;Wf({target:`Array`,proto:!0,forced:!yi(`map`)},{map:function(e){return Gf(this,e,arguments.length>1?arguments[1]:void 0)}});var Kf=ff(`Array`,`map`),qf=De,Jf=Kf,Yf=Array.prototype,Xf=r(function(e){var t=e.map;return e===Yf||qf(Yf,e)&&t===Yf.map?Jf:t}),Zf=gr,Qf=wr,$f=Dr,ep=An,tp=function(e,t,n,r,i,a,o,s){for(var c=i,l=0,u=o?ep(o,s):!1,d,f;l<r;)l in n&&(d=u?u(n[l],l,t):n[l],a>0&&Zf(d)?(f=Qf(d),c=tp(e,t,d,f,c,a-1)-1):($f(c+1),e[c]=d),c++),l++;return c},np=tp,rp=z,ip=np,ap=$e,op=xt,sp=wr,cp=mi;rp({target:`Array`,proto:!0},{flatMap:function(e){var t=op(this),n=sp(t),r;return ap(e),r=cp(t,0),r.length=ip(r,t,t,n,0,1,e,arguments.length>1?arguments[1]:void 0),r}});var lp=ff(`Array`,`flatMap`),up=De,dp=lp,fp=Array.prototype,pp=r(function(e){var t=e.flatMap;return e===fp||up(fp,e)&&t===fp.flatMap?dp:t});function mp(e){return new gp(e)}var hp=function(){function e(n,r,i){var a,o,s;t(this,e),Jd(this,`_listeners`,{add:vf(a=this._add).call(a,this),remove:vf(o=this._remove).call(o,this),update:vf(s=this._update).call(s,this)}),this._source=n,this._transformers=r,this._target=i}return qd(e,[{key:`all`,value:function(){return this._target.update(this._transformItems(this._source.get())),this}},{key:`start`,value:function(){return this._source.on(`add`,this._listeners.add),this._source.on(`remove`,this._listeners.remove),this._source.on(`update`,this._listeners.update),this}},{key:`stop`,value:function(){return this._source.off(`add`,this._listeners.add),this._source.off(`remove`,this._listeners.remove),this._source.off(`update`,this._listeners.update),this}},{key:`_transformItems`,value:function(e){var t;return If(t=this._transformers).call(t,function(e,t){return t(e)},e)}},{key:`_add`,value:function(e,t){t!=null&&this._target.add(this._transformItems(this._source.get(t.items)))}},{key:`_update`,value:function(e,t){t!=null&&this._target.update(this._transformItems(this._source.get(t.items)))}},{key:`_remove`,value:function(e,t){t!=null&&this._target.remove(this._transformItems(t.oldData))}}]),e}(),gp=function(){function e(n){t(this,e),Jd(this,`_transformers`,[]),this._source=n}return qd(e,[{key:`filter`,value:function(e){return this._transformers.push(function(t){return Uf(t).call(t,e)}),this}},{key:`map`,value:function(e){return this._transformers.push(function(t){return Xf(t).call(t,e)}),this}},{key:`flatMap`,value:function(e){return this._transformers.push(function(t){return pp(t).call(t,e)}),this}},{key:`to`,value:function(e){return new hp(this._source,this._transformers,e)}}]),e}(),_p=k,vp=In,yp=nt,bp=function(e,t,n){var r,i;vp(e);try{if(r=yp(e,`return`),!r){if(t===`throw`)throw n;return n}r=_p(r,e)}catch(e){i=!0,r=e}if(t===`throw`)throw n;if(i)throw r;return vp(r),n},xp=In,Sp=bp,Cp=function(e,t,n,r){try{return r?t(xp(n)[0],n[1]):t(n)}catch(t){Sp(e,`throw`,t)}},wp=Bt,Tp=yl,Ep=wp(`iterator`),Dp=Array.prototype,Op=function(e){return e!==void 0&&(Tp.Array===e||Dp[Ep]===e)},kp=Hr,Ap=nt,jp=ge,Mp=yl,Np=Bt(`iterator`),Pp=function(e){if(!jp(e))return Ap(e,Np)||Ap(e,`@@iterator`)||Mp[kp(e)]},Fp=k,Ip=$e,Lp=In,Rp=Ye,zp=Pp,Bp=TypeError,Vp=function(e,t){var n=arguments.length<2?zp(e):t;if(Ip(n))return Lp(Fp(n,e));throw new Bp(Rp(e)+` is not iterable`)},Hp=An,Up=k,Wp=xt,Gp=Cp,Kp=Op,qp=si,Jp=wr,Yp=jr,Xp=Vp,Zp=Pp,Qp=Array,$p=function(e){var t=Wp(e),n=qp(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=i!==void 0;a&&(i=Hp(i,r>2?arguments[2]:void 0));var o=Zp(t),s=0,c,l,u,d,f,p;if(o&&!(this===Qp&&Kp(o)))for(d=Xp(t,o),f=d.next,l=n?new this:[];!(u=Up(f,d)).done;s++)p=a?Gp(d,i,[u.value,s],!0):u.value,Yp(l,s,p);else for(c=Jp(t),l=n?new this(c):Qp(c);c>s;s++)p=a?i(t[s],s):t[s],Yp(l,s,p);return l.length=s,l},em=Bt(`iterator`),tm=!1;try{var nm=0,rm={next:function(){return{done:!!nm++}},return:function(){tm=!0}};rm[em]=function(){return this},Array.from(rm,function(){throw 2})}catch{}var im=function(e,t){try{if(!t&&!tm)return!1}catch{return!1}var n=!1;try{var r={};r[em]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},am=z,om=$p;am({target:`Array`,stat:!0,forced:!im(function(e){Array.from(e)})},{from:om});var sm=N.Array.from,cm=r(sm),lm=Pp,um=r(lm),dm=r(lm);z({target:`Array`,stat:!0},{isArray:gr});var fm=N.Array.isArray,pm=r(fm);function mm(e){if(pm(e))return e}var hm=O,gm=gr,_m=TypeError,vm=Object.getOwnPropertyDescriptor,ym=hm&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(gm(e)&&!vm(e,`length`).writable)throw new _m(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t},bm=z,xm=xt,Sm=wr,Cm=ym,wm=Dr;bm({target:`Array`,proto:!0,arity:1,forced:s(function(){return[].push.call({length:4294967296},1)!==4294967297})||!function(){try{Object.defineProperty([],`length`,{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=xm(this),n=Sm(t),r=arguments.length;wm(n+r);for(var i=0;i<r;i++)t[n]=arguments[i],n++;return Cm(t,n),n}});var Tm=ff(`Array`,`push`),Em=De,Dm=Tm,Om=Array.prototype,km=function(e){var t=e.push;return e===Om||Em(Om,e)&&t===Om.push?Dm:t},Am=r(km);function jm(e,t){var n=e==null?null:Sd!==void 0&&um(e)||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(Am(s).call(s,r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}var Mm=z,Nm=gr,Pm=si,Fm=M,Im=Hi,Lm=wr,Rm=A,zm=jr,Bm=Bt,Vm=yi,Hm=kc,Um=Vm(`slice`),Wm=Bm(`species`),Gm=Array,Km=Math.max;Mm({target:`Array`,proto:!0,forced:!Um},{slice:function(e,t){var n=Rm(this),r=Lm(n),i=Im(e,r),a=Im(t===void 0?r:t,r),o,s,c;if(Nm(n)&&(o=n.constructor,Pm(o)&&(o===Gm||Nm(o.prototype))?o=void 0:Fm(o)&&(o=o[Wm],o===null&&(o=void 0)),o===Gm||o===void 0))return Hm(n,i,a);for(s=new(o===void 0?Gm:o)(Km(a-i,0)),c=0;i<a;i++,c++)i in n&&zm(s,c,n[i]);return s.length=c,s}});var qm=ff(`Array`,`slice`),Jm=De,Ym=qm,Xm=Array.prototype,Zm=function(e){var t=e.slice;return e===Xm||Jm(Xm,e)&&t===Xm.slice?Ym:t},Qm=Zm,$m=r(Qm),eh=r(sm);function th(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nh(e,t){var n;if(e){if(typeof e==`string`)return th(e,t);var r=$m(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return eh(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return th(e,t)}}function rh(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ih(e,t){return mm(e)||jm(e,t)||nh(e,t)||rh()}function ah(e){if(pm(e))return th(e)}function oh(e){if(Sd!==void 0&&um(e)!=null||e[`@@iterator`]!=null)return eh(e)}function sh(){throw TypeError(`Invalid attempt to spread non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ch(e){return ah(e)||oh(e)||nh(e)||sh()}var lh=r(Ju),uh=ff(`Array`,`concat`),dh=De,fh=uh,ph=Array.prototype,mh=r(function(e){var t=e.concat;return e===ph||dh(ph,e)&&t===ph.concat?fh:t}),hh=r(Zm),gh=F,_h=v,vh=Ia,yh=Qa,bh=In,xh=_h([].concat),Sh=gh(`Reflect`,`ownKeys`)||function(e){var t=vh.f(bh(e)),n=yh.f;return n?xh(t,n(e)):t};z({target:`Reflect`,stat:!0},{ownKeys:Sh});var Ch=N.Reflect.ownKeys,wh=r(Ch),Th=r(fm),Eh=z,Dh=xt,Oh=aa;Eh({target:`Object`,stat:!0,forced:s(function(){Oh(1)})},{keys:function(e){return Oh(Dh(e))}});var kh=N.Object.keys,Ah=r(kh),jh=ts.forEach,Mh=Ef(`forEach`)?[].forEach:function(e){return jh(this,e,arguments.length>1?arguments[1]:void 0)},Nh=z,Ph=Mh;Nh({target:`Array`,proto:!0,forced:[].forEach!==Ph},{forEach:Ph});var Fh=ff(`Array`,`forEach`),Ih=Hr,Lh=Tt,Rh=De,zh=Fh,Bh=Array.prototype,Vh={DOMTokenList:!0,NodeList:!0},Hh=function(e){var t=e.forEach;return e===Bh||Rh(Bh,e)&&t===Bh.forEach||Lh(Vh,Ih(e))?zh:t},Uh=r(Hh),Wh=z,Gh=v,Kh=gr,qh=Gh([].reverse),Jh=[1,2];Wh({target:`Array`,proto:!0,forced:String(Jh)===String(Jh.reverse())},{reverse:function(){return Kh(this)&&(this.length=this.length),qh(this)}});var Yh=ff(`Array`,`reverse`),Xh=De,Zh=Yh,Qh=Array.prototype,$h=function(e){var t=e.reverse;return e===Qh||Xh(Qh,e)&&t===Qh.reverse?Zh:t},eg=r($h),tg=Ye,ng=TypeError,rg=function(e,t){if(!delete e[t])throw new ng(`Cannot delete property `+tg(t)+` of `+tg(e))},ig=z,ag=xt,og=Hi,sg=br,cg=wr,lg=ym,ug=Dr,dg=mi,fg=jr,pg=rg,mg=yi(`splice`),hg=Math.max,gg=Math.min;ig({target:`Array`,proto:!0,forced:!mg},{splice:function(e,t){var n=ag(this),r=cg(n),i=og(e,r),a=arguments.length,o,s,c,l,u,d;for(a===0?o=s=0:a===1?(o=0,s=r-i):(o=a-2,s=gg(hg(sg(t),0),r-i)),ug(r+o-s),c=dg(n,s),l=0;l<s;l++)u=i+l,u in n&&fg(c,l,n[u]);if(c.length=s,o<s){for(l=i;l<r-s;l++)u=l+s,d=l+o,u in n?n[d]=n[u]:pg(n,d);for(l=r;l>r-s+o;l--)pg(n,l-1)}else if(o>s)for(l=r-s;l>i;l--)u=l+s-1,d=l+o-1,u in n?n[d]=n[u]:pg(n,d);for(l=0;l<o;l++)n[l+i]=arguments[l+2];return lg(n,r-s+o),c}});var _g=ff(`Array`,`splice`),vg=De,yg=_g,bg=Array.prototype,xg=r(function(e){var t=e.splice;return e===bg||vg(bg,e)&&t===bg.splice?yg:t}),Sg=O,Cg=v,wg=k,Tg=s,Eg=aa,Dg=Qa,Og=oe,kg=xt,Ag=he,jg=Object.assign,Mg=Object.defineProperty,Ng=Cg([].concat),Pg=!jg||Tg(function(){if(Sg&&jg({b:1},jg(Mg({},`a`,{enumerable:!0,get:function(){Mg(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(`assign detection`),r=`abcdefghijklmnopqrst`;return e[n]=7,r.split(``).forEach(function(e){t[e]=e}),jg({},e)[n]!==7||Eg(jg({},t)).join(``)!==r})?function(e,t){for(var n=kg(e),r=arguments.length,i=1,a=Dg.f,o=Og.f;r>i;)for(var s=Ag(arguments[i++]),c=a?Ng(Eg(s),a(s)):Eg(s),l=c.length,u=0,d;l>u;)d=c[u++],(!Sg||wg(o,s,d))&&(n[d]=s[d]);return n}:jg,Fg=z,Ig=Pg;Fg({target:`Object`,stat:!0,arity:2,forced:Object.assign!==Ig},{assign:Ig});var Lg=N.Object.assign,Rg=r(Lg),zg=z,Bg=s,Vg=xt,Hg=Fl,Ug=El;zg({target:`Object`,stat:!0,forced:Bg(function(){Hg(1)}),sham:!Ug},{getPrototypeOf:function(e){return Hg(Vg(e))}});var Wg=N.Object.getPrototypeOf;z({target:`Object`,stat:!0,sham:!O},{create:Fa});var Gg=N.Object,Kg=function(e,t){return Gg.create(e,t)},qg=r(Kg),Jg=N,Yg=p;Jg.JSON||={stringify:JSON.stringify};var Xg=r(function(e,t,n){return Yg(Jg.JSON.stringify,null,arguments)}),Zg=typeof Bun==`function`&&Bun&&typeof Bun.version==`string`,Qg=TypeError,$g=function(e,t){if(e<t)throw new Qg(`Not enough arguments`);return e},e_=o,t_=p,n_=E,r_=Zg,i_=Oe,a_=kc,o_=$g,s_=e_.Function,c_=/MSIE .\./.test(i_)||r_&&(function(){var e=e_.Bun.version.split(`.`);return e.length<3||e[0]===`0`&&(e[1]<3||e[1]===`3`&&e[2]===`0`)})(),l_=function(e,t){var n=t?2:1;return c_?function(r,i){var a=o_(arguments.length,1)>n,o=n_(r)?r:s_(r),s=a?a_(arguments,n):[],c=a?function(){t_(o,this,s)}:o;return t?e(c,i):e(c)}:e},u_=z,d_=o,f_=l_(d_.setInterval,!0);u_({global:!0,bind:!0,forced:d_.setInterval!==f_},{setInterval:f_});var p_=z,m_=o,h_=l_(m_.setTimeout,!0);p_({global:!0,bind:!0,forced:m_.setTimeout!==h_},{setTimeout:h_});var g_=N.setTimeout,__=r(g_),v_={exports:{}};(function(e){function t(e){if(e)return n(e);this._callbacks=new Map}function n(e){return Object.assign(e,t.prototype),e._callbacks=new Map,e}t.prototype.on=function(e,t){let n=this._callbacks.get(e)??[];return n.push(t),this._callbacks.set(e,n),this},t.prototype.once=function(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return n.fn=t,this.on(e,n),this},t.prototype.off=function(e,t){if(e===void 0&&t===void 0)return this._callbacks.clear(),this;if(t===void 0)return this._callbacks.delete(e),this;let n=this._callbacks.get(e);if(n){for(let[e,r]of n.entries())if(r===t||r.fn===t){n.splice(e,1);break}n.length===0?this._callbacks.delete(e):this._callbacks.set(e,n)}return this},t.prototype.emit=function(e,...t){let n=this._callbacks.get(e);if(n){let e=[...n];for(let n of e)n.apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks.get(e)??[]},t.prototype.listenerCount=function(e){if(e)return this.listeners(e).length;let t=0;for(let e of this._callbacks.values())t+=e.length;return t},t.prototype.hasListeners=function(e){return this.listenerCount(e)>0},t.prototype.addEventListener=t.prototype.on,t.prototype.removeListener=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,e.exports=t})(v_);var y_=v_.exports,b_=r(y_);function x_(){return x_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x_.apply(this,arguments)}function S_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function C_(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var w_=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t},T_=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],E_=typeof document>`u`?{style:{}}:document.createElement(`div`),D_=`function`,O_=Math.round,k_=Math.abs,A_=Date.now;function j_(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<T_.length;){if(n=T_[a],r=n?n+i:t,r in e)return r;a++}}var M_=typeof window>`u`?{}:window,N_=j_(E_.style,`touchAction`),P_=N_!==void 0;function F_(){if(!P_)return!1;var e={},t=M_.CSS&&M_.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach(function(n){return e[n]=t?M_.CSS.supports(`touch-action`,n):!0}),e}var I_=`compute`,L_=`auto`,R_=`manipulation`,z_=`none`,B_=`pan-x`,V_=`pan-y`,H_=F_(),U_=/mobile|tablet|ip(ad|hone|od)|android/i,W_=`ontouchstart`in M_,G_=j_(M_,`PointerEvent`)!==void 0,K_=W_&&U_.test(navigator.userAgent),q_=`touch`,J_=`pen`,Y_=`mouse`,X_=`kinect`,Z_=25,Q_=1,$_=2,ev=4,tv=8,nv=1,rv=2,iv=4,av=8,ov=16,sv=rv|iv,cv=av|ov,lv=sv|cv,uv=[`x`,`y`],dv=[`clientX`,`clientY`];function fv(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function pv(e,t){return typeof e===D_?e.apply(t&&t[0]||void 0,t):e}function mv(e,t){return e.indexOf(t)>-1}function hv(e){if(mv(e,z_))return z_;var t=mv(e,B_),n=mv(e,V_);return t&&n?z_:t||n?t?B_:V_:mv(e,R_)?R_:L_}var gv=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===I_&&(e=this.compute()),P_&&this.manager.element.style&&H_[e]&&(this.manager.element.style[N_]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return fv(this.manager.recognizers,function(t){pv(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),hv(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented){t.preventDefault();return}var r=this.actions,i=mv(r,z_)&&!H_[z_],a=mv(r,V_)&&!H_[V_],o=mv(r,B_)&&!H_[B_];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!(o&&a)&&(i||a&&n&sv||o&&n&cv))return this.preventSrc(t)},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function _v(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function vv(e){var t=e.length;if(t===1)return{x:O_(e[0].clientX),y:O_(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:O_(n/t),y:O_(r/t)}}function yv(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:O_(e.pointers[n].clientX),clientY:O_(e.pointers[n].clientY)},n++;return{timeStamp:A_(),pointers:t,center:vv(t),deltaX:e.deltaX,deltaY:e.deltaY}}function bv(e,t,n){n||=uv;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function xv(e,t,n){n||=uv;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.atan2(i,r)*180/Math.PI}function Sv(e,t){return e===t?nv:k_(e)>=k_(t)?e<0?rv:iv:t<0?av:ov}function Cv(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===Q_||a.eventType===ev)&&(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}function wv(e,t,n){return{x:t/e||0,y:n/e||0}}function Tv(e,t){return bv(t[0],t[1],dv)/bv(e[0],e[1],dv)}function Ev(e,t){return xv(t[1],t[0],dv)+xv(e[1],e[0],dv)}function Dv(e,t){var n=e.lastInterval||t,r=t.timeStamp-n.timeStamp,i,a,o,s;if(t.eventType!==tv&&(r>Z_||n.velocity===void 0)){var c=t.deltaX-n.deltaX,l=t.deltaY-n.deltaY,u=wv(r,c,l);a=u.x,o=u.y,i=k_(u.x)>k_(u.y)?u.x:u.y,s=Sv(c,l),e.lastInterval=t}else i=n.velocity,a=n.velocityX,o=n.velocityY,s=n.direction;t.velocity=i,t.velocityX=a,t.velocityY=o,t.direction=s}function Ov(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=yv(t),i>1&&!n.firstMultiple?n.firstMultiple=yv(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=vv(r);t.timeStamp=A_(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=xv(s,c),t.distance=bv(s,c),Cv(n,t),t.offsetDirection=Sv(t.deltaX,t.deltaY);var l=wv(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=k_(l.x)>k_(l.y)?l.x:l.y,t.scale=o?Tv(o.pointers,r):1,t.rotation=o?Ev(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,Dv(n,t);var u=e.element,d=t.srcEvent,f=d.composedPath?d.composedPath()[0]:d.path?d.path[0]:d.target;_v(f,u)&&(u=f),t.target=u}function kv(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&Q_&&r-i===0,o=t&(ev|tv)&&r-i===0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,Ov(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function Av(e){return e.trim().split(/\s+/g)}function jv(e,t,n){fv(Av(t),function(t){e.addEventListener(t,n,!1)})}function U(e,t,n){fv(Av(t),function(t){e.removeEventListener(t,n,!1)})}function Mv(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var Nv=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){pv(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&jv(this.element,this.evEl,this.domHandler),this.evTarget&&jv(this.target,this.evTarget,this.domHandler),this.evWin&&jv(Mv(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&U(this.element,this.evEl,this.domHandler),this.evTarget&&U(this.target,this.evTarget,this.domHandler),this.evWin&&U(Mv(this.element),this.evWin,this.domHandler)},e}();function Pv(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var Fv={pointerdown:Q_,pointermove:$_,pointerup:ev,pointercancel:tv,pointerout:tv},Iv={2:q_,3:J_,4:Y_,5:X_},Lv=`pointerdown`,Rv=`pointermove pointerup pointercancel`;M_.MSPointerEvent&&!M_.PointerEvent&&(Lv=`MSPointerDown`,Rv=`MSPointerMove MSPointerUp MSPointerCancel`);var zv=function(e){S_(t,e);function t(){var n,r=t.prototype;return r.evEl=Lv,r.evWin=Rv,n=e.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var n=t.prototype;return n.handler=function(e){var t=this.store,n=!1,r=Fv[e.type.toLowerCase().replace(`ms`,``)],i=Iv[e.pointerType]||e.pointerType,a=i===q_,o=Pv(t,e.pointerId,`pointerId`);r&Q_&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(ev|tv)&&(n=!0),!(o<0)&&(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))},t}(Nv);function Bv(e){return Array.prototype.slice.call(e,0)}function Vv(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];Pv(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort(function(e,n){return e[t]>n[t]}):r.sort()),r}var Hv={touchstart:Q_,touchmove:$_,touchend:ev,touchcancel:tv},Uv=`touchstart touchmove touchend touchcancel`,Wv=function(e){S_(t,e);function t(){var n;return t.prototype.evTarget=Uv,n=e.apply(this,arguments)||this,n.targetIds={},n}var n=t.prototype;return n.handler=function(e){var t=Hv[e.type],n=Gv.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:q_,srcEvent:e})},t}(Nv);function Gv(e,t){var n=Bv(e.touches),r=this.targetIds;if(t&(Q_|$_)&&n.length===1)return r[n[0].identifier]=!0,[n,n];var i,a,o=Bv(e.changedTouches),s=[],c=this.target;if(a=n.filter(function(e){return _v(e.target,c)}),t===Q_)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),t&(ev|tv)&&delete r[o[i].identifier],i++;if(s.length)return[Vv(a.concat(s),`identifier`,!0),s]}var Kv={mousedown:Q_,mousemove:$_,mouseup:ev},qv=`mousedown`,Jv=`mousemove mouseup`,Yv=function(e){S_(t,e);function t(){var n,r=t.prototype;return r.evEl=qv,r.evWin=Jv,n=e.apply(this,arguments)||this,n.pressed=!1,n}var n=t.prototype;return n.handler=function(e){var t=Kv[e.type];t&Q_&&e.button===0&&(this.pressed=!0),t&$_&&e.which!==1&&(t=ev),this.pressed&&(t&ev&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Y_,srcEvent:e}))},t}(Nv),Xv=2500,Zv=25;function Qv(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},Xv)}}function $v(e,t){e&Q_?(this.primaryTouch=t.changedPointers[0].identifier,Qv.call(this,t)):e&(ev|tv)&&Qv.call(this,t)}function ey(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=Zv&&o<=Zv)return!0}return!1}var ty=function(){return function(e){S_(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.handler=function(e,t,n){var i=n.pointerType===q_,a=n.pointerType===Y_;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)$v.call(C_(C_(r)),t,n);else if(a&&ey.call(C_(C_(r)),n))return;r.callback(e,t,n)}},r.touch=new Wv(r.manager,r.handler),r.mouse=new Yv(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}var n=t.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(Nv)}();function ny(e){var t;return t=e.options.inputClass||(G_?zv:K_?Wv:W_?ty:Yv),new t(e,kv)}function ry(e,t,n){return Array.isArray(e)?(fv(e,n[t],n),!0):!1}var iy=1,ay=2,oy=4,sy=8,cy=sy,ly=16,uy=32,dy=1;function fy(){return dy++}function W(e,t){var n=t.manager;return n?n.get(e):e}function G(e){return e&ly?`cancel`:e&sy?`end`:e&oy?`move`:e&ay?`start`:``}var py=function(){function e(e){e===void 0&&(e={}),this.options=x_({enable:!0},e),this.id=fy(),this.manager=null,this.state=iy,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return w_(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(ry(e,`recognizeWith`,this))return this;var t=this.simultaneous;return e=W(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return ry(e,`dropRecognizeWith`,this)?this:(e=W(e,this),delete this.simultaneous[e.id],this)},t.requireFailure=function(e){if(ry(e,`requireFailure`,this))return this;var t=this.requireFail;return e=W(e,this),Pv(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(ry(e,`dropRequireFailure`,this))return this;e=W(e,this);var t=Pv(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<sy&&r(t.options.event+G(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=sy&&r(t.options.event+G(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=uy},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(uy|iy)))return!1;e++}return!0},t.recognize=function(e){var t=w_({},e);if(!pv(this.options.enable,[this,t])){this.reset(),this.state=uy;return}this.state&(cy|ly|uy)&&(this.state=iy),this.state=this.process(t),this.state&(ay|oy|sy|ly)&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),my=function(e){S_(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,x_({event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var n=t.prototype;return n.getTouchAction=function(){return[R_]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime<n.time;if(this.reset(),e.eventType&Q_&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==ev)return this.failTimeout();var o=this.pTime?e.timeStamp-this.pTime<n.interval:!0,s=!this.pCenter||bv(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,!s||!o?this.count=1:this.count+=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){t.state=cy,t.tryEmit()},n.interval),ay):cy}return uy},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=uy},this.options.interval),uy},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===cy&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(py),hy=function(e){S_(t,e);function t(t){return t===void 0&&(t={}),e.call(this,x_({pointers:1},t))||this}var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=t&(ay|oy),i=this.attrTest(e);return r&&(n&tv||!i)?t|ly:r||i?n&ev?t|sy:t&ay?t|oy:ay:uy},t}(py);function gy(e){return e===ov?`down`:e===av?`up`:e===rv?`left`:e===iv?`right`:``}var _y=function(e){S_(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,x_({event:`pan`,threshold:10,pointers:1,direction:lv},t))||this,n.pX=null,n.pY=null,n}var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&sv&&t.push(V_),e&cv&&t.push(B_),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&sv?(i=a===0?nv:a<0?rv:iv,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?nv:o<0?av:ov,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return hy.prototype.attrTest.call(this,e)&&(this.state&ay||!(this.state&ay)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=gy(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(hy),vy=function(e){S_(t,e);function t(t){return t===void 0&&(t={}),e.call(this,x_({event:`swipe`,threshold:10,velocity:.3,direction:sv|cv,pointers:1},t))||this}var n=t.prototype;return n.getTouchAction=function(){return _y.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n=this.options.direction,r;return n&(sv|cv)?r=t.overallVelocity:n&sv?r=t.overallVelocityX:n&cv&&(r=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&k_(r)>this.options.velocity&&t.eventType&ev},n.emit=function(e){var t=gy(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(hy),yy=function(e){S_(t,e);function t(t){return t===void 0&&(t={}),e.call(this,x_({event:`pinch`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[z_]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ay)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(hy),by=function(e){S_(t,e);function t(t){return t===void 0&&(t={}),e.call(this,x_({event:`rotate`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[z_]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ay)},t}(hy),xy=function(e){S_(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,x_({event:`press`,pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var n=t.prototype;return n.getTouchAction=function(){return[L_]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(ev|tv)&&!a)this.reset();else if(e.eventType&Q_)this.reset(),this._timer=setTimeout(function(){t.state=cy,t.tryEmit()},n.time);else if(e.eventType&ev)return cy;return uy},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===cy&&(e&&e.eventType&ev?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=A_(),this.manager.emit(this.options.event,this._input)))},t}(py),Sy={domEvents:!1,touchAction:I_,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},Cy=[[by,{enable:!1}],[yy,{enable:!1},[`rotate`]],[vy,{direction:sv}],[_y,{direction:sv},[`swipe`]],[my],[my,{event:`doubletap`,taps:2},[`tap`]],[xy]],wy=1,Ty=2;function Ey(e,t){var n=e.element;if(n.style){var r;fv(e.options.cssProps,function(i,a){r=j_(n.style,a),t?(e.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=e.oldCssProps[r]||``}),t||(e.oldCssProps={})}}function Dy(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var Oy=function(){function e(e,t){var n=this;this.options=w_({},Sy,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=ny(this),this.touchAction=new gv(this,this.options.touchAction),Ey(this,!0),fv(this.options.recognizers,function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}var t=e.prototype;return t.set=function(e){return w_(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?Ty:wy},t.recognize=function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,r=this.recognizers,i=t.curRecognizer;(!i||i&&i.state&cy)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped!==Ty&&(!i||n===i||n.canRecognizeWith(i))?n.recognize(e):n.reset(),!i&&n.state&(ay|oy|sy)&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof py)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(ry(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(ry(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=Pv(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return fv(Av(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return fv(Av(e),function(e){t?n[e]&&n[e].splice(Pv(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&Dy(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(!(!n||!n.length)){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&Ey(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),ky={touchstart:Q_,touchmove:$_,touchend:ev,touchcancel:tv},Ay=`touchstart`,jy=`touchstart touchmove touchend touchcancel`,My=function(e){S_(t,e);function t(){var n,r=t.prototype;return r.evTarget=Ay,r.evWin=jy,n=e.apply(this,arguments)||this,n.started=!1,n}var n=t.prototype;return n.handler=function(e){var t=ky[e.type];if(t===Q_&&(this.started=!0),this.started){var n=Ny.call(this,e,t);t&(ev|tv)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:q_,srcEvent:e})}},t}(Nv);function Ny(e,t){var n=Bv(e.touches),r=Bv(e.changedTouches);return t&(ev|tv)&&(n=Vv(n.concat(r),`identifier`,!0)),[n,r]}function Py(e,t,n){var r=`DEPRECATED METHOD: `+t+`
4
4
  `+n+` AT
@@ -6,7 +6,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
6
6
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function Vy(e,t){var n;if(e){if(typeof e==`string`)return Hy(e,t);var r=hh(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return cm(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hy(e,t)}}function Hy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Uy=lh(`DELETE`);function Wy(e){var t,n=[...arguments].slice(1);return Gy.apply(void 0,mh(t=[{},e]).call(t,n))}function Gy(){var e=Ky.apply(void 0,arguments);return Jy(e),e}function Ky(){var e=[...arguments];if(e.length<2)return e[0];if(e.length>2){var t;return Ky.apply(void 0,mh(t=[Gy(e[0],e[1])]).call(t,ch(hh(e).call(e,2))))}var n=e[0],r=e[1];if(n instanceof Date&&r instanceof Date)return n.setTime(r.getTime()),n;var i=By(wh(r)),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;Object.prototype.propertyIsEnumerable.call(r,o)&&(r[o]===Uy?delete n[o]:n[o]!==null&&r[o]!==null&&typeof n[o]==`object`&&typeof r[o]==`object`&&!Th(n[o])&&!Th(r[o])?n[o]=Ky(n[o],r[o]):n[o]=qy(r[o]))}}catch(e){i.e(e)}finally{i.f()}return n}function qy(e){return Th(e)?Xf(e).call(e,function(e){return qy(e)}):typeof e==`object`&&e?e instanceof Date?new Date(e.getTime()):Ky({},e):e}function Jy(e){for(var t=0,n=Ah(e);t<n.length;t++){var r=n[t];e[r]===Uy?delete e[r]:typeof e[r]==`object`&&e[r]!==null&&Jy(e[r])}}function Yy(){var e=function(){};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var Xy=typeof window<`u`?window.Hammer||zy:function(){return Yy()};function Zy(e){var t=this,n;this._cleanupQueue=[],this.active=!1,this._dom={container:e,overlay:document.createElement(`div`)},this._dom.overlay.classList.add(`vis-overlay`),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){t._dom.overlay.parentNode.removeChild(t._dom.overlay)});var r=Xy(this._dom.overlay);r.on(`tap`,vf(n=this._onTapOverlay).call(n,this)),this._cleanupQueue.push(function(){r.destroy()});var i=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];Uh(i).call(i,function(e){r.on(e,function(e){e.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(n){Qy(n.target,e)||t.deactivate()},document.body.addEventListener(`click`,this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener(`click`,t._onClick)})),this._escListener=function(e){(`key`in e?e.key===`Escape`:e.keyCode===27)&&t.deactivate()}}b_(Zy.prototype),Zy.current=null,Zy.prototype.destroy=function(){var e,t;this.deactivate();var n=By(eg(e=xg(t=this._cleanupQueue).call(t,0)).call(e)),r;try{for(n.s();!(r=n.n()).done;){var i=r.value;i()}}catch(e){n.e(e)}finally{n.f()}},Zy.prototype.activate=function(){Zy.current&&Zy.current.deactivate(),Zy.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)},Zy.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`)},Zy.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};function Qy(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var $y=si,eb=Ye,tb=TypeError,nb=function(e){if($y(e))return e;throw new tb(eb(e)+` is not a constructor`)},rb=z,ib=F,ab=p,ob=sf,sb=nb,cb=In,lb=M,ub=Fa,db=s,fb=ib(`Reflect`,`construct`),pb=Object.prototype,mb=[].push,hb=db(function(){function e(){}return!(fb(function(){},[],e)instanceof e)}),gb=!db(function(){fb(function(){})}),_b=hb||gb;rb({target:`Reflect`,stat:!0,forced:_b,sham:_b},{construct:function(e,t){sb(e),cb(t);var n=arguments.length<3?e:sb(arguments[2]);if(gb&&!hb)return fb(e,t,n);if(e===n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return ab(mb,r,t),new(ab(ob,e,r))}var i=n.prototype,a=ub(lb(i)?i:pb),o=ab(e,a,t);return lb(o)?o:a}});var vb=N.Reflect.construct,yb=r(vb),bb=N.Object.getOwnPropertySymbols,xb=r(bb),Sb={exports:{}},Cb=z,wb=s,Tb=A,Eb=D.f,Db=O;Cb({target:`Object`,stat:!0,forced:!Db||wb(function(){Eb(1)}),sham:!Db},{getOwnPropertyDescriptor:function(e,t){return Eb(Tb(e),t)}});var Ob=N.Object,kb=Sb.exports=function(e,t){return Ob.getOwnPropertyDescriptor(e,t)};Ob.getOwnPropertyDescriptor.sham&&(kb.sham=!0);var Ab=Sb.exports,jb=r(Ab),Mb=z,Nb=O,Pb=Sh,Fb=A,Ib=D,Lb=jr;Mb({target:`Object`,stat:!0,sham:!Nb},{getOwnPropertyDescriptors:function(e){for(var t=Fb(e),n=Ib.f,r=Pb(t),i={},a=0,o,s;r.length>a;)s=n(t,o=r[a++]),s!==void 0&&Lb(i,o,s);return i}});var Rb=N.Object.getOwnPropertyDescriptors,zb=r(Rb),Bb={exports:{}},Vb=z,Hb=O,Ub=Ri.f;Vb({target:`Object`,stat:!0,forced:Object.defineProperties!==Ub,sham:!Hb},{defineProperties:Ub});var Wb=N.Object,Gb=Bb.exports=function(e,t){return Wb.defineProperties(e,t)};Wb.defineProperties.sham&&(Gb.sham=!0);var Kb=Bb.exports,qb=r(Kb),Jb=r(fr);function Yb(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var Xb=Kg,Zb=r(Xb);z({target:`Object`,stat:!0},{setPrototypeOf:du});var Qb=N.Object.setPrototypeOf,$b=r(Qb),ex=r(_f);function tx(e,t){var n;return tx=$b?ex(n=$b).call(n):function(e,t){return e.__proto__=t,e},tx(e,t)}function nx(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Zb(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),mr(e,`prototype`,{writable:!1}),t&&tx(e,t)}function rx(e,t){if(t&&(Hd(t)===`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Yb(e)}var ix=Wg,ax=r(ix);function ox(e){var t;return ox=$b?ex(t=ax).call(t):function(e){return e.__proto__||ax(e)},ox(e)}var sx={exports:{}},cx={exports:{}};(function(e){var t=xd,n=Bd;function r(i){"@babel/helpers - typeof";return e.exports=r=typeof t==`function`&&typeof n==`symbol`?function(e){return typeof e}:function(e){return e&&typeof t==`function`&&e.constructor===t&&e!==t.prototype?`symbol`:typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,r(i)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(cx);var lx=cx.exports,ux=Hh,dx=Tt,fx=Sh,px=D,mx=jn,hx=function(e,t,n){for(var r=fx(t),i=mx.f,a=px.f,o=0;o<r.length;o++){var s=r[o];!dx(e,s)&&!(n&&dx(n,s))&&i(e,s,a(t,s))}},gx=M,_x=Yn,vx=function(e,t){gx(t)&&`cause`in t&&_x(e,`cause`,t.cause)},yx=v,bx=Error,xx=yx(``.replace),Sx=(function(e){return String(new bx(e).stack)})(`zxcasd`),Cx=/\n\s*at [^:]*:[^\n]*/,wx=Cx.test(Sx),Tx=function(e,t){if(wx&&typeof e==`string`&&!bx.prepareStackTrace)for(;t--;)e=xx(e,Cx,``);return e},Ex=s,Dx=le,Ox=!Ex(function(){var e=Error(`a`);return`stack`in e?(Object.defineProperty(e,`stack`,Dx(1,7)),e.stack!==7):!0}),kx=Yn,Ax=Tx,jx=Ox,Mx=Error.captureStackTrace,Nx=function(e,t,n,r){jx&&(Mx?Mx(e,t):kx(e,`stack`,Ax(n,r)))},Px=An,Fx=k,Ix=In,Lx=Ye,Rx=Op,zx=wr,Bx=De,Vx=Vp,Hx=Pp,Ux=bp,Wx=TypeError,Gx=function(e,t){this.stopped=e,this.result=t},Kx=Gx.prototype,qx=function(e,t,n){var r=n&&n.that,i=!!(n&&n.AS_ENTRIES),a=!!(n&&n.IS_RECORD),o=!!(n&&n.IS_ITERATOR),s=!!(n&&n.INTERRUPTED),c=Px(t,r),l,u,d,f,p,m,h,g=function(e){return l&&Ux(l,`normal`,e),new Gx(!0,e)},_=function(e){return i?(Ix(e),s?c(e[0],e[1],g):c(e[0],e[1])):s?c(e,g):c(e)};if(a)l=e.iterator;else if(o)l=e;else{if(u=Hx(e),!u)throw new Wx(Lx(e)+` is not iterable`);if(Rx(u)){for(d=0,f=zx(e);f>d;d++)if(p=_(e[d]),p&&Bx(Kx,p))return p;return new Gx(!1)}l=Vx(e,u)}for(m=a?e.next:l.next;!(h=Fx(m,l)).done;){try{p=_(h.value)}catch(e){Ux(l,`throw`,e)}if(typeof p==`object`&&p&&Bx(Kx,p))return p}return new Gx(!1)},Jx=Li,Yx=function(e,t){return e===void 0?arguments.length<2?``:t:Jx(e)},Xx=z,Zx=De,Qx=Fl,$x=du,eS=hx,tS=Fa,nS=Yn,rS=le,iS=vx,aS=Nx,oS=qx,sS=Yx,cS=Bt(`toStringTag`),lS=Error,uS=[].push,dS=function(e,t){var n=Zx(fS,this),r;$x?r=$x(new lS,n?Qx(this):fS):(r=n?this:tS(fS),nS(r,cS,`Error`)),t!==void 0&&nS(r,`message`,sS(t)),aS(r,dS,r.stack,1),arguments.length>2&&iS(r,arguments[2]);var i=[];return oS(e,uS,{that:i}),nS(r,`errors`,i),r};$x?$x(dS,lS):eS(dS,lS,{name:!0});var fS=dS.prototype=tS(lS.prototype,{constructor:rS(1,dS),message:rS(1,``),name:rS(1,`AggregateError`)});Xx({global:!0,constructor:!0,arity:2},{AggregateError:dS});var pS=F,mS=no,hS=Bt,gS=O,_S=hS(`species`),vS=function(e){var t=pS(e);gS&&t&&!t[_S]&&mS(t,_S,{configurable:!0,get:function(){return this}})},yS=De,bS=TypeError,xS=function(e,t){if(yS(t,e))return e;throw new bS(`Incorrect invocation`)},SS=In,CS=nb,wS=ge,TS=Bt(`species`),ES=function(e,t){var n=SS(e).constructor,r;return n===void 0||wS(r=SS(n)[TS])?t:CS(r)},DS=Oe,OS=/(?:ipad|iphone|ipod).*applewebkit/i.test(DS),kS=o,AS=p,jS=An,MS=E,NS=Tt,PS=s,FS=fa,IS=kc,LS=nn,RS=$g,zS=OS,BS=Df,VS=kS.setImmediate,HS=kS.clearImmediate,US=kS.process,K=kS.Dispatch,WS=kS.Function,GS=kS.MessageChannel,KS=kS.String,qS=0,q={},JS=`onreadystatechange`,YS,J,XS,ZS;PS(function(){YS=kS.location});var QS=function(e){if(NS(q,e)){var t=q[e];delete q[e],t()}},$S=function(e){return function(){QS(e)}},eC=function(e){QS(e.data)},tC=function(e){kS.postMessage(KS(e),YS.protocol+`//`+YS.host)};(!VS||!HS)&&(VS=function(e){RS(arguments.length,1);var t=MS(e)?e:WS(e),n=IS(arguments,1);return q[++qS]=function(){AS(t,void 0,n)},J(qS),qS},HS=function(e){delete q[e]},BS?J=function(e){US.nextTick($S(e))}:K&&K.now?J=function(e){K.now($S(e))}:GS&&!zS?(XS=new GS,ZS=XS.port2,XS.port1.onmessage=eC,J=jS(ZS.postMessage,ZS)):kS.addEventListener&&MS(kS.postMessage)&&!kS.importScripts&&YS&&YS.protocol!==`file:`&&!PS(tC)?(J=tC,kS.addEventListener(`message`,eC,!1)):J=JS in LS(`script`)?function(e){FS.appendChild(LS(`script`))[JS]=function(){FS.removeChild(this),QS(e)}}:function(e){setTimeout($S(e),0)});var nC={set:VS,clear:HS},rC=function(){this.head=null,this.tail=null};rC.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return(this.head=e.next)===null&&(this.tail=null),e.item}};var iC=rC,aC=Oe,oC=/ipad|iphone|ipod/i.test(aC)&&typeof Pebble<`u`,sC=Oe,cC=/web0s(?!.*chrome)/i.test(sC),lC=o,uC=An,dC=D.f,fC=nC.set,pC=iC,mC=OS,hC=oC,gC=cC,_C=Df,vC=lC.MutationObserver||lC.WebKitMutationObserver,yC=lC.document,bC=lC.process,xC=lC.Promise,SC=dC(lC,`queueMicrotask`),CC=SC&&SC.value,wC,TC,EC,DC,OC;if(!CC){var kC=new pC,AC=function(){var e,t;for(_C&&(e=bC.domain)&&e.exit();t=kC.get();)try{t()}catch(e){throw kC.head&&wC(),e}e&&e.enter()};!mC&&!_C&&!gC&&vC&&yC?(TC=!0,EC=yC.createTextNode(``),new vC(AC).observe(EC,{characterData:!0}),wC=function(){EC.data=TC=!TC}):!hC&&xC&&xC.resolve?(DC=xC.resolve(void 0),DC.constructor=xC,OC=uC(DC.then,DC),wC=function(){OC(AC)}):_C?wC=function(){bC.nextTick(AC)}:(fC=uC(fC,lC),wC=function(){fC(AC)}),CC=function(e){kC.head||wC(),kC.add(e)}}var jC=CC,MC=function(e,t){try{arguments.length===1?console.error(e):console.error(e,t)}catch{}},NC=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},PC=o.Promise,FC=typeof Deno==`object`&&Deno&&typeof Deno.version==`object`,IC=!FC&&!Df&&typeof window==`object`&&typeof document==`object`,LC=o,RC=PC,zC=E,BC=Tn,VC=qr,HC=Bt,UC=IC,WC=FC,GC=Ie,KC=RC&&RC.prototype,qC=HC(`species`),JC=!1,YC=zC(LC.PromiseRejectionEvent),XC={CONSTRUCTOR:BC(`Promise`,function(){var e=VC(RC),t=e!==String(RC);if(!t&&GC===66||!(KC.catch&&KC.finally))return!0;if(!GC||GC<51||!/native code/.test(e)){var n=new RC(function(e){e(1)}),r=function(e){e(function(){},function(){})},i=n.constructor={};if(i[qC]=r,JC=n.then(function(){})instanceof r,!JC)return!0}return!t&&(UC||WC)&&!YC}),REJECTION_EVENT:YC,SUBCLASSING:JC},ZC={},QC=$e,$C=TypeError,ew=function(e){var t,n;this.promise=new e(function(e,r){if(t!==void 0||n!==void 0)throw new $C(`Bad Promise constructor`);t=e,n=r}),this.resolve=QC(t),this.reject=QC(n)};ZC.f=function(e){return new ew(e)};var tw=z,nw=Df,rw=o,iw=k,aw=eo,ow=wo,sw=vS,cw=$e,lw=E,uw=M,dw=xS,fw=ES,pw=nC.set,mw=jC,hw=MC,gw=NC,_w=iC,vw=Ko,yw=PC,bw=XC,xw=ZC,Sw=`Promise`,Cw=bw.CONSTRUCTOR,ww=bw.REJECTION_EVENT;bw.SUBCLASSING;var Tw=vw.getterFor(Sw),Ew=vw.set,Dw=yw&&yw.prototype,Ow=yw,kw=Dw,Aw=rw.TypeError,jw=rw.document,Mw=rw.process,Nw=xw.f,Pw=Nw,Fw=!!(jw&&jw.createEvent&&rw.dispatchEvent),Iw=`unhandledrejection`,Lw=`rejectionhandled`,Rw=0,zw=1,Bw=2,Vw=1,Hw=2,Uw,Ww,Gw,Kw=function(e){var t;return uw(e)&&lw(t=e.then)?t:!1},qw=function(e,t){var n=t.value,r=t.state===zw,i=r?e.ok:e.fail,a=e.resolve,o=e.reject,s=e.domain,c,l,u;try{i?(r||(t.rejection===Hw&&Qw(t),t.rejection=Vw),i===!0?c=n:(s&&s.enter(),c=i(n),s&&(s.exit(),u=!0)),c===e.promise?o(new Aw(`Promise-chain cycle`)):(l=Kw(c))?iw(l,c,a,o):a(c)):o(n)}catch(e){s&&!u&&s.exit(),o(e)}},Jw=function(e,t){e.notified||(e.notified=!0,mw(function(){for(var n=e.reactions,r;r=n.get();)qw(r,e);e.notified=!1,t&&!e.rejection&&Xw(e)}))},Yw=function(e,t,n){var r,i;Fw?(r=jw.createEvent(`Event`),r.promise=t,r.reason=n,r.initEvent(e,!1,!0),rw.dispatchEvent(r)):r={promise:t,reason:n},!ww&&(i=rw[`on`+e])?i(r):e===Iw&&hw(`Unhandled promise rejection`,n)},Xw=function(e){iw(pw,rw,function(){var t=e.facade,n=e.value,r=Zw(e),i;if(r&&(i=gw(function(){nw?Mw.emit(`unhandledRejection`,n,t):Yw(Iw,t,n)}),e.rejection=nw||Zw(e)?Hw:Vw,i.error))throw i.value})},Zw=function(e){return e.rejection!==Vw&&!e.parent},Qw=function(e){iw(pw,rw,function(){var t=e.facade;nw?Mw.emit(`rejectionHandled`,t):Yw(Lw,t,e.value)})},$w=function(e,t,n){return function(r){e(t,r,n)}},eT=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=Bw,Jw(e,!0))},tT=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new Aw(`Promise can't be resolved itself`);var r=Kw(t);r?mw(function(){var n={done:!1};try{iw(r,t,$w(tT,n,e),$w(eT,n,e))}catch(t){eT(n,t,e)}}):(e.value=t,e.state=zw,Jw(e,!1))}catch(t){eT({done:!1},t,e)}}};Cw&&(Ow=function(e){dw(this,kw),cw(e),iw(Uw,this);var t=Tw(this);try{e($w(tT,t),$w(eT,t))}catch(e){eT(t,e)}},kw=Ow.prototype,Uw=function(e){Ew(this,{type:Sw,done:!1,notified:!1,parent:!1,reactions:new _w,rejection:!1,state:Rw,value:void 0})},Uw.prototype=aw(kw,`then`,function(e,t){var n=Tw(this),r=Nw(fw(this,Ow));return n.parent=!0,r.ok=lw(e)?e:!0,r.fail=lw(t)&&t,r.domain=nw?Mw.domain:void 0,n.state===Rw?n.reactions.add(r):mw(function(){qw(r,n)}),r.promise}),Ww=function(){var e=new Uw,t=Tw(e);this.promise=e,this.resolve=$w(tT,t),this.reject=$w(eT,t)},xw.f=Nw=function(e){return e===Ow||e===Gw?new Ww(e):Pw(e)}),tw({global:!0,constructor:!0,wrap:!0,forced:Cw},{Promise:Ow}),ow(Ow,Sw,!1,!0),sw(Sw);var nT=PC,rT=im,iT=XC.CONSTRUCTOR||!rT(function(e){nT.all(e).then(void 0,function(){})}),aT=z,oT=k,sT=$e,cT=ZC,lT=NC,uT=qx;aT({target:`Promise`,stat:!0,forced:iT},{all:function(e){var t=this,n=cT.f(t),r=n.resolve,i=n.reject,a=lT(function(){var n=sT(t.resolve),a=[],o=0,s=1;uT(e,function(e){var c=o++,l=!1;s++,oT(n,t,e).then(function(e){l||(l=!0,a[c]=e,--s||r(a))},i)}),--s||r(a)});return a.error&&i(a.value),n.promise}});var dT=z,fT=XC.CONSTRUCTOR,pT=PC;pT&&pT.prototype,dT({target:`Promise`,proto:!0,forced:fT,real:!0},{catch:function(e){return this.then(void 0,e)}});var mT=z,hT=k,gT=$e,_T=ZC,vT=NC,yT=qx;mT({target:`Promise`,stat:!0,forced:iT},{race:function(e){var t=this,n=_T.f(t),r=n.reject,i=vT(function(){var i=gT(t.resolve);yT(e,function(e){hT(i,t,e).then(n.resolve,r)})});return i.error&&r(i.value),n.promise}});var bT=z,xT=k,ST=ZC,CT=XC.CONSTRUCTOR;bT({target:`Promise`,stat:!0,forced:CT},{reject:function(e){var t=ST.f(this);return xT(t.reject,void 0,e),t.promise}});var wT=In,TT=M,ET=ZC,DT=function(e,t){if(wT(e),TT(t)&&t.constructor===e)return t;var n=ET.f(e),r=n.resolve;return r(t),n.promise},OT=z,kT=F,AT=lt,jT=PC,MT=XC.CONSTRUCTOR,NT=DT,PT=kT(`Promise`),FT=!MT;OT({target:`Promise`,stat:!0,forced:AT},{resolve:function(e){return NT(FT&&this===PT?jT:this,e)}});var IT=z,LT=k,RT=$e,zT=ZC,BT=NC,VT=qx;IT({target:`Promise`,stat:!0,forced:iT},{allSettled:function(e){var t=this,n=zT.f(t),r=n.resolve,i=n.reject,a=BT(function(){var n=RT(t.resolve),i=[],a=0,o=1;VT(e,function(e){var s=a++,c=!1;o++,LT(n,t,e).then(function(e){c||(c=!0,i[s]={status:`fulfilled`,value:e},--o||r(i))},function(e){c||(c=!0,i[s]={status:`rejected`,reason:e},--o||r(i))})}),--o||r(i)});return a.error&&i(a.value),n.promise}});var HT=z,UT=k,WT=$e,GT=F,KT=ZC,qT=NC,JT=qx,YT=iT,XT=`No one promise resolved`;HT({target:`Promise`,stat:!0,forced:YT},{any:function(e){var t=this,n=GT(`AggregateError`),r=KT.f(t),i=r.resolve,a=r.reject,o=qT(function(){var r=WT(t.resolve),o=[],s=0,c=1,l=!1;JT(e,function(e){var u=s++,d=!1;c++,UT(r,t,e).then(function(e){d||l||(l=!0,i(e))},function(e){d||l||(d=!0,o[u]=e,--c||a(new n(o,XT)))})}),--c||a(new n(o,XT))});return o.error&&a(o.value),r.promise}});var ZT=z,QT=PC,$T=s,eE=F,tE=E,nE=ES,rE=DT,iE=QT&&QT.prototype;ZT({target:`Promise`,proto:!0,real:!0,forced:!!QT&&$T(function(){iE.finally.call({then:function(){}},function(){})})},{finally:function(e){var t=nE(this,eE(`Promise`)),n=tE(e);return this.then(n?function(n){return rE(t,e()).then(function(){return n})}:e,n?function(n){return rE(t,e()).then(function(){throw n})}:e)}});var aE=N.Promise,oE=z,sE=ZC;oE({target:`Promise`,stat:!0},{withResolvers:function(){var e=sE.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}});var cE=aE,lE=z,uE=ZC,dE=NC;lE({target:`Promise`,stat:!0,forced:!0},{try:function(e){var t=uE.f(this),n=dE(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}});var fE=cE,pE=$h;(function(e){var t=lx.default,n=pr,r=xd,i=Xb,a=ix,o=ux,s=km,c=Qb,l=fE,u=pE,d=Qm;function f(){e.exports=f=function(){return m},e.exports.__esModule=!0,e.exports.default=e.exports;var p,m={},h=Object.prototype,g=h.hasOwnProperty,_=n||function(e,t,n){e[t]=n.value},v=typeof r==`function`?r:{},y=v.iterator||`@@iterator`,b=v.asyncIterator||`@@asyncIterator`,x=v.toStringTag||`@@toStringTag`;function S(e,t,r){return n(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{S({},``)}catch{S=function(e,t,n){return e[t]=n}}function ee(e,t,n,r){var a=i((t&&t.prototype instanceof E?t:E).prototype);return _(a,`_invoke`,{value:le(e,n,new pe(r||[]))}),a}function C(e,t,n){try{return{type:`normal`,arg:e.call(t,n)}}catch(e){return{type:`throw`,arg:e}}}m.wrap=ee;var te=`suspendedStart`,w=`suspendedYield`,ne=`executing`,re=`completed`,T={};function E(){}function D(){}function O(){}var ie={};S(ie,y,function(){return this});var ae=a,k=ae&&ae(ae(me([])));k&&k!==h&&g.call(k,y)&&(ie=k);var oe=O.prototype=E.prototype=i(ie);function se(e){var t;o(t=[`next`,`throw`,`return`]).call(t,function(t){S(e,t,function(e){return this._invoke(t,e)})})}function ce(e,n){function r(i,a,o,s){var c=C(e[i],e,a);if(c.type!==`throw`){var l=c.arg,u=l.value;return u&&t(u)==`object`&&g.call(u,`__await`)?n.resolve(u.__await).then(function(e){r(`next`,e,o,s)},function(e){r(`throw`,e,o,s)}):n.resolve(u).then(function(e){l.value=e,o(l)},function(e){return r(`throw`,e,o,s)})}s(c.arg)}var i;_(this,`_invoke`,{value:function(e,t){function a(){return new n(function(n,i){r(e,t,n,i)})}return i=i?i.then(a,a):a()}})}function le(e,t,n){var r=te;return function(i,a){if(r===ne)throw Error(`Generator is already running`);if(r===re){if(i===`throw`)throw a;return{value:p,done:!0}}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=ue(o,n);if(s){if(s===T)continue;return s}}if(n.method===`next`)n.sent=n._sent=n.arg;else if(n.method===`throw`){if(r===te)throw r=re,n.arg;n.dispatchException(n.arg)}else n.method===`return`&&n.abrupt(`return`,n.arg);r=ne;var c=C(e,t,n);if(c.type===`normal`){if(r=n.done?re:w,c.arg===T)continue;return{value:c.arg,done:n.done}}c.type===`throw`&&(r=re,n.method=`throw`,n.arg=c.arg)}}}function ue(e,t){var n=t.method,r=e.iterator[n];if(r===p)return t.delegate=null,n===`throw`&&e.iterator.return&&(t.method=`return`,t.arg=p,ue(e,t),t.method===`throw`)||n!==`return`&&(t.method=`throw`,t.arg=TypeError(`The iterator does not provide a '`+n+`' method`)),T;var i=C(r,e.iterator,t.arg);if(i.type===`throw`)return t.method=`throw`,t.arg=i.arg,t.delegate=null,T;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,t.method!==`return`&&(t.method=`next`,t.arg=p),t.delegate=null,T):a:(t.method=`throw`,t.arg=TypeError(`iterator result is not an object`),t.delegate=null,T)}function de(e){var t,n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),s(t=this.tryEntries).call(t,n)}function fe(e){var t=e.completion||{};t.type=`normal`,delete t.arg,e.completion=t}function pe(e){this.tryEntries=[{tryLoc:`root`}],o(e).call(e,de,this),this.reset(!0)}function me(e){if(e||e===``){var n=e[y];if(n)return n.call(e);if(typeof e.next==`function`)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(g.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=p,t.done=!0,t};return i.next=i}}throw TypeError(t(e)+` is not iterable`)}return D.prototype=O,_(oe,`constructor`,{value:O,configurable:!0}),_(O,`constructor`,{value:D,configurable:!0}),D.displayName=S(O,x,`GeneratorFunction`),m.isGeneratorFunction=function(e){var t=typeof e==`function`&&e.constructor;return!!t&&(t===D||(t.displayName||t.name)===`GeneratorFunction`)},m.mark=function(e){return c?c(e,O):(e.__proto__=O,S(e,x,`GeneratorFunction`)),e.prototype=i(oe),e},m.awrap=function(e){return{__await:e}},se(ce.prototype),S(ce.prototype,b,function(){return this}),m.AsyncIterator=ce,m.async=function(e,t,n,r,i){i===void 0&&(i=l);var a=new ce(ee(e,t,n,r),i);return m.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},se(oe),S(oe,x,`Generator`),S(oe,y,function(){return this}),S(oe,`toString`,function(){return`[object Generator]`}),m.keys=function(e){var t=Object(e),n=[];for(var r in t)s(n).call(n,r);return u(n).call(n),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},m.values=me,pe.prototype={constructor:pe,reset:function(e){var t;if(this.prev=0,this.next=0,this.sent=this._sent=p,this.done=!1,this.delegate=null,this.method=`next`,this.arg=p,o(t=this.tryEntries).call(t,fe),!e)for(var n in this)n.charAt(0)===`t`&&g.call(this,n)&&!isNaN(+d(n).call(n,1))&&(this[n]=p)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type===`throw`)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type=`throw`,a.arg=e,t.next=n,r&&(t.method=`next`,t.arg=p),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if(i.tryLoc===`root`)return n(`end`);if(i.tryLoc<=this.prev){var o=g.call(i,`catchLoc`),s=g.call(i,`finallyLoc`);if(o&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw Error(`try statement without catch or finally`);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,`finallyLoc`)&&this.prev<r.finallyLoc){var i=r;break}}i&&(e===`break`||e===`continue`)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method=`next`,this.next=i.finallyLoc,T):this.complete(a)},complete:function(e,t){if(e.type===`throw`)throw e.arg;return e.type===`break`||e.type===`continue`?this.next=e.arg:e.type===`return`?(this.rval=this.arg=e.arg,this.method=`return`,this.next=`end`):e.type===`normal`&&t&&(this.next=t),T},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),fe(n),T}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if(r.type===`throw`){var i=r.arg;fe(n)}return i}}throw Error(`illegal catch attempt`)},delegateYield:function(e,t,n){return this.delegate={iterator:me(e),resultName:t,nextLoc:n},this.method===`next`&&(this.arg=p),T}},m}e.exports=f,e.exports.__esModule=!0,e.exports.default=e.exports})(sx);var mE=sx.exports,hE=mE(),gE=hE;try{regeneratorRuntime=hE}catch{typeof globalThis==`object`?globalThis.regeneratorRuntime=hE:Function(`r`,`regeneratorRuntime = r`)(hE)}var _E=r(gE),vE={exports:{}},yE=s(function(){if(typeof ArrayBuffer==`function`){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,`a`,{value:8})}}),bE=s,xE=M,SE=S,CE=yE,wE=Object.isExtensible,TE=bE(function(){wE(1)})||CE?function(e){return!xE(e)||CE&&SE(e)===`ArrayBuffer`?!1:wE?wE(e):!0}:wE,EE=!s(function(){return Object.isExtensible(Object.preventExtensions({}))}),DE=z,OE=v,kE=Ji,AE=M,jE=Tt,ME=jn.f,NE=Ia,PE=za,FE=TE,IE=At,LE=EE,RE=!1,zE=IE(`meta`),BE=0,VE=function(e){ME(e,zE,{value:{objectID:`O`+ BE++,weakData:{}}})},HE=vE.exports={enable:function(){HE.enable=function(){},RE=!0;var e=NE.f,t=OE([].splice),n={};n[zE]=1,e(n).length&&(NE.f=function(n){for(var r=e(n),i=0,a=r.length;i<a;i++)if(r[i]===zE){t(r,i,1);break}return r},DE({target:`Object`,stat:!0,forced:!0},{getOwnPropertyNames:PE.f}))},fastKey:function(e,t){if(!AE(e))return typeof e==`symbol`?e:(typeof e==`string`?`S`:`P`)+e;if(!jE(e,zE)){if(!FE(e))return`F`;if(!t)return`E`;VE(e)}return e[zE].objectID},getWeakData:function(e,t){if(!jE(e,zE)){if(!FE(e))return!0;if(!t)return!1;VE(e)}return e[zE].weakData},onFreeze:function(e){return LE&&RE&&FE(e)&&!jE(e,zE)&&VE(e),e}};kE[zE]=!0;var UE=vE.exports,WE=z,GE=o,KE=UE,qE=s,JE=Yn,YE=qx,XE=xS,ZE=E,QE=M,$E=ge,eD=wo,tD=jn.f,nD=ts.forEach,rD=O,iD=Ko,aD=iD.set,oD=iD.getterFor,sD=function(e,t,n){var r=e.indexOf(`Map`)!==-1,i=e.indexOf(`Weak`)!==-1,a=r?`set`:`add`,o=GE[e],s=o&&o.prototype,c={},l;if(!rD||!ZE(o)||!(i||s.forEach&&!qE(function(){new o().entries().next()})))l=n.getConstructor(t,e,r,a),KE.enable();else{l=t(function(t,n){aD(XE(t,u),{type:e,collection:new o}),$E(n)||YE(n,t[a],{that:t,AS_ENTRIES:r})});var u=l.prototype,d=oD(e);nD([`add`,`clear`,`delete`,`forEach`,`get`,`has`,`set`,`keys`,`values`,`entries`],function(e){var t=e===`add`||e===`set`;e in s&&!(i&&e===`clear`)&&JE(u,e,function(n,r){var a=d(this).collection;if(!t&&i&&!QE(n))return e===`get`?void 0:!1;var o=a[e](n===0?0:n,r);return t?this:o})}),i||tD(u,`size`,{configurable:!0,get:function(){return d(this).collection.size}})}return eD(l,e,!1,!0),c[e]=l,WE({global:!0,forced:!0},c),i||n.setStrong(l,e,r),l},cD=eo,lD=function(e,t,n){for(var r in t)n&&n.unsafe&&e[r]?e[r]=t[r]:cD(e,r,t[r],n);return e},uD=Fa,dD=no,fD=lD,pD=An,mD=xS,hD=ge,gD=qx,_D=ku,vD=Au,yD=vS,bD=O,xD=UE.fastKey,SD=Ko,CD=SD.set,wD=SD.getterFor,TD={getConstructor:function(e,t,n,r){var i=e(function(e,i){mD(e,a),CD(e,{type:t,index:uD(null),first:void 0,last:void 0,size:0}),bD||(e.size=0),hD(i)||gD(i,e[r],{that:e,AS_ENTRIES:n})}),a=i.prototype,o=wD(t),s=function(e,t,n){var r=o(e),i=c(e,t),a,s;return i?i.value=n:(r.last=i={index:s=xD(t,!0),key:t,value:n,previous:a=r.last,next:void 0,removed:!1},r.first||=i,a&&(a.next=i),bD?r.size++:e.size++,s!==`F`&&(r.index[s]=i)),e},c=function(e,t){var n=o(e),r=xD(t),i;if(r!==`F`)return n.index[r];for(i=n.first;i;i=i.next)if(i.key===t)return i};return fD(a,{clear:function(){for(var e=this,t=o(e),n=t.index,r=t.first;r;)r.removed=!0,r.previous&&=r.previous.next=void 0,delete n[r.index],r=r.next;t.first=t.last=void 0,bD?t.size=0:e.size=0},delete:function(e){var t=this,n=o(t),r=c(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first===r&&(n.first=i),n.last===r&&(n.last=a),bD?n.size--:t.size--}return!!r},forEach:function(e){for(var t=o(this),n=pD(e,arguments.length>1?arguments[1]:void 0),r;r=r?r.next:t.first;)for(n(r.value,r.key,this);r&&r.removed;)r=r.previous},has:function(e){return!!c(this,e)}}),fD(a,n?{get:function(e){var t=c(this,e);return t&&t.value},set:function(e,t){return s(this,e===0?0:e,t)}}:{add:function(e){return s(this,e=e===0?0:e,e)}}),bD&&dD(a,`size`,{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(e,t,n){var r=t+` Iterator`,i=wD(t),a=wD(r);_D(e,t,function(e,t){CD(this,{type:r,target:e,state:i(e),kind:t,last:void 0})},function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return!e.target||!(e.last=n=n?n.next:e.state.first)?(e.target=void 0,vD(void 0,!0)):vD(t===`keys`?n.key:t===`values`?n.value:[n.key,n.value],!1)},n?`entries`:`values`,!n,!0),yD(t)}};sD(`Map`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},TD);var ED=N.Map,DD=r(ED),OD=z,kD=ts.some;OD({target:`Array`,proto:!0,forced:!Ef(`some`)},{some:function(e){return kD(this,e,arguments.length>1?arguments[1]:void 0)}});var AD=ff(`Array`,`some`),jD=De,MD=AD,ND=Array.prototype,PD=r(function(e){var t=e.some;return e===ND||jD(ND,e)&&t===ND.some?MD:t}),FD=ff(`Array`,`keys`),ID=Hr,LD=Tt,RD=De,zD=FD,BD=Array.prototype,Y={DOMTokenList:!0,NodeList:!0},X=r(function(e){var t=e.keys;return e===BD||RD(BD,e)&&t===BD.keys||LD(Y,ID(e))?zD:t}),Z=Ga,VD=Math.floor,Q=function(e,t){var n=e.length,r=VD(n/2);return n<8?HD(e,t):UD(e,Q(Z(e,0,r),t),Q(Z(e,r),t),t)},HD=function(e,t){for(var n=e.length,r=1,i,a;r<n;){for(a=r,i=e[r];a&&t(e[a-1],i)>0;)e[a]=e[--a];a!==r++&&(e[a]=i)}return e},UD=function(e,t,n,r){for(var i=t.length,a=n.length,o=0,s=0;o<i||s<a;)e[o+s]=o<i&&s<a?r(t[o],n[s])<=0?t[o++]:n[s++]:o<i?t[o++]:n[s++];return e},WD=Q,GD=Oe.match(/firefox\/(\d+)/i),KD=!!GD&&+GD[1],qD=Oe,JD=/MSIE|Trident/.test(qD),YD=Oe.match(/AppleWebKit\/(\d+)\./),$=!!YD&&+YD[1],XD=z,ZD=v,QD=$e,$D=xt,eO=wr,tO=rg,nO=Li,rO=s,iO=WD,aO=Ef,oO=KD,sO=JD,cO=Ie,lO=$,uO=[],dO=ZD(uO.sort),fO=ZD(uO.push),pO=rO(function(){uO.sort(void 0)}),mO=rO(function(){uO.sort(null)}),hO=aO(`sort`),gO=!rO(function(){if(cO)return cO<70;if(!(oO&&oO>3)){if(sO)return!0;if(lO)return lO<603;var e=``,t,n,r,i;for(t=65;t<76;t++){switch(n=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(i=0;i<47;i++)uO.push({k:n+i,v:r})}for(uO.sort(function(e,t){return t.v-e.v}),i=0;i<uO.length;i++)n=uO[i].k.charAt(0),e.charAt(e.length-1)!==n&&(e+=n);return e!==`DGBEFHACIJK`}}),_O=pO||!mO||!hO||!gO,vO=function(e){return function(t,n){return n===void 0?-1:t===void 0?1:e===void 0?nO(t)>nO(n)?1:-1:+e(t,n)||0}};XD({target:`Array`,proto:!0,forced:_O},{sort:function(e){e!==void 0&&QD(e);var t=$D(this);if(gO)return e===void 0?dO(t):dO(t,e);var n=[],r=eO(t),i,a;for(a=0;a<r;a++)a in t&&fO(n,t[a]);for(iO(n,vO(e)),i=eO(n),a=0;a<i;)t[a]=n[a++];for(;a<r;)tO(t,a++);return t}});var yO=ff(`Array`,`sort`),bO=De,xO=yO,SO=Array.prototype,CO=r(function(e){var t=e.sort;return e===SO||bO(SO,e)&&t===SO.sort?xO:t}),wO=ff(`Array`,`values`),TO=Hr,EO=Tt,DO=De,OO=wO,kO=Array.prototype,AO={DOMTokenList:!0,NodeList:!0},jO=r(function(e){var t=e.values;return e===kO||DO(kO,e)&&t===kO.values||EO(AO,TO(e))?OO:t}),MO=r(zd),NO=ff(`Array`,`entries`),PO=Hr,FO=Tt,IO=De,LO=NO,RO=Array.prototype,zO={DOMTokenList:!0,NodeList:!0},BO=r(function(e){var t=e.entries;return e===RO||IO(RO,e)&&t===RO.entries||FO(zO,PO(e))?LO:t});let VO,HO=new Uint8Array(16);function UO(){if(!VO&&(VO=typeof crypto<`u`&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!VO))throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);return VO(HO)}let WO=[];for(let e=0;e<256;++e)WO.push((e+256).toString(16).slice(1));function GO(e,t=0){return WO[e[t+0]]+WO[e[t+1]]+WO[e[t+2]]+WO[e[t+3]]+`-`+WO[e[t+4]]+WO[e[t+5]]+`-`+WO[e[t+6]]+WO[e[t+7]]+`-`+WO[e[t+8]]+WO[e[t+9]]+`-`+WO[e[t+10]]+WO[e[t+11]]+WO[e[t+12]]+WO[e[t+13]]+WO[e[t+14]]+WO[e[t+15]]}var KO={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function qO(e,t,n){if(KO.randomUUID&&!t&&!e)return KO.randomUUID();e||={};let r=e.random||(e.rng||UO)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n||=0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return GO(r)}function JO(e){return typeof e==`string`||typeof e==`number`}var YO=function(){function e(n){t(this,e),Jd(this,`_queue`,[]),Jd(this,`_timeout`,null),Jd(this,`_extended`,null),this.delay=null,this.max=1/0,this.setOptions(n)}return qd(e,[{key:`setOptions`,value:function(e){e&&e.delay!==void 0&&(this.delay=e.delay),e&&e.max!==void 0&&(this.max=e.max),this._flushIfNeeded()}},{key:`destroy`,value:function(){if(this.flush(),this._extended){for(var e=this._extended.object,t=this._extended.methods,n=0;n<t.length;n++){var r=t[n];r.original?e[r.name]=r.original:delete e[r.name]}this._extended=null}}},{key:`replace`,value:function(e,t){var n=this,r=e[t];if(!r)throw Error(`Method `+t+` undefined`);e[t]=function(){var e=[...arguments];n.queue({args:e,fn:r,context:this})}}},{key:`queue`,value:function(e){typeof e==`function`?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}},{key:`_flushIfNeeded`,value:function(){var e=this;this._queue.length>this.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay==`number`&&(this._timeout=__(function(){e.flush()},this.delay))}},{key:`flush`,value:function(){var e,t;Uh(e=xg(t=this._queue).call(t,0)).call(e,function(e){e.fn.apply(e.context||e.fn,e.args||[])})}}],[{key:`extend`,value:function(t,n){var r=new e(n);if(t.flush!==void 0)throw Error(`Target object already has a property flush`);t.flush=function(){r.flush()};var i=[{name:`flush`,original:void 0}];if(n&&n.replace)for(var a=0;a<n.replace.length;a++){var o=n.replace[a];i.push({name:o,original:t[o]}),r.replace(t,o)}return r._extended={object:t,methods:i},r}}]),e}(),XO=function(){function e(){t(this,e),Jd(this,`_subscribers`,{"*":[],add:[],remove:[],update:[]}),Jd(this,`subscribe`,e.prototype.on),Jd(this,`unsubscribe`,e.prototype.off)}return qd(e,[{key:`_trigger`,value:function(e,t,n){var r,i;if(e===`*`)throw Error(`Cannot trigger event *`);Uh(r=mh(i=[]).call(i,ch(this._subscribers[e]),ch(this._subscribers[`*`]))).call(r,function(r){r(e,t,n??null)})}},{key:`on`,value:function(e,t){typeof t==`function`&&this._subscribers[e].push(t)}},{key:`off`,value:function(e,t){var n;this._subscribers[e]=Uf(n=this._subscribers[e]).call(n,function(e){return e!==t})}}]),e}();sD(`Set`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},TD);var ZO=N.Set,QO=r(ZO),$O=r(Vp);function ek(e,t){var n=lh!==void 0&&dm(e)||e[`@@iterator`];if(!n){if(Th(e)||(n=tk(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
7
7
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function tk(e,t){var n;if(e){if(typeof e==`string`)return nk(e,t);var r=hh(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return cm(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nk(e,t)}}function nk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var rk=function(e){function n(e){t(this,n),this._pairs=e}return qd(n,[{key:e,value:_E.mark(function e(){var t,n,r,i,a;return _E.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=ek(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=ih(n.value,2),i=r[0],a=r[1],e.next=7,[i,a];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case`end`:return e.stop()}},e,this,[[1,11,14,17]])})},{key:`entries`,value:_E.mark(function e(){var t,n,r,i,a;return _E.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=ek(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=ih(n.value,2),i=r[0],a=r[1],e.next=7,[i,a];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case`end`:return e.stop()}},e,this,[[1,11,14,17]])})},{key:`keys`,value:_E.mark(function e(){var t,n,r,i;return _E.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=ek(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=ih(n.value,1),i=r[0],e.next=7,i;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case`end`:return e.stop()}},e,this,[[1,11,14,17]])})},{key:`values`,value:_E.mark(function e(){var t,n,r,i;return _E.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=ek(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return r=ih(n.value,2),i=r[1],e.next=7,i;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case`end`:return e.stop()}},e,this,[[1,11,14,17]])})},{key:`toIdArray`,value:function(){var e;return Xf(e=ch(this._pairs)).call(e,function(e){return e[0]})}},{key:`toItemArray`,value:function(){var e;return Xf(e=ch(this._pairs)).call(e,function(e){return e[1]})}},{key:`toEntryArray`,value:function(){return ch(this._pairs)}},{key:`toObjectMap`,value:function(){var e=qg(null),t=ek(this._pairs),n;try{for(t.s();!(n=t.n()).done;){var r=ih(n.value,2),i=r[0];e[i]=r[1]}}catch(e){t.e(e)}finally{t.f()}return e}},{key:`toMap`,value:function(){return new DD(this._pairs)}},{key:`toIdSet`,value:function(){return new QO(this.toIdArray())}},{key:`toItemSet`,value:function(){return new QO(this.toItemArray())}},{key:`cache`,value:function(){return new n(ch(this._pairs))}},{key:`distinct`,value:function(e){var t=new QO,n=ek(this._pairs),r;try{for(n.s();!(r=n.n()).done;){var i=ih(r.value,2),a=i[0],o=i[1];t.add(e(o,a))}}catch(e){n.e(e)}finally{n.f()}return t}},{key:`filter`,value:function(e){var t=this._pairs;return new n({[MO](){return _E.mark(function n(){var r,i,a,o,s;return _E.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:r=ek(t),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=10;break}if(a=ih(i.value,2),o=a[0],s=a[1],!e(s,o)){n.next=8;break}return n.next=8,[o,s];case 8:n.next=3;break;case 10:n.next=15;break;case 12:n.prev=12,n.t0=n.catch(1),r.e(n.t0);case 15:return n.prev=15,r.f(),n.finish(15);case 18:case`end`:return n.stop()}},n,null,[[1,12,15,18]])})()}})}},{key:`forEach`,value:function(e){var t=ek(this._pairs),n;try{for(t.s();!(n=t.n()).done;){var r=ih(n.value,2),i=r[0],a=r[1];e(a,i)}}catch(e){t.e(e)}finally{t.f()}}},{key:`map`,value:function(e){var t=this._pairs;return new n({[MO](){return _E.mark(function n(){var r,i,a,o,s;return _E.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:r=ek(t),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=9;break}return a=ih(i.value,2),o=a[0],s=a[1],n.next=7,[o,e(s,o)];case 7:n.next=3;break;case 9:n.next=14;break;case 11:n.prev=11,n.t0=n.catch(1),r.e(n.t0);case 14:return n.prev=14,r.f(),n.finish(14);case 17:case`end`:return n.stop()}},n,null,[[1,11,14,17]])})()}})}},{key:`max`,value:function(e){var t=$O(this._pairs),n=t.next();if(n.done)return null;for(var r=n.value[1],i=e(n.value[1],n.value[0]);!(n=t.next()).done;){var a=ih(n.value,2),o=a[0],s=a[1],c=e(s,o);c>i&&(i=c,r=s)}return r}},{key:`min`,value:function(e){var t=$O(this._pairs),n=t.next();if(n.done)return null;for(var r=n.value[1],i=e(n.value[1],n.value[0]);!(n=t.next()).done;){var a=ih(n.value,2),o=a[0],s=a[1],c=e(s,o);c<i&&(i=c,r=s)}return r}},{key:`reduce`,value:function(e,t){var n=ek(this._pairs),r;try{for(n.s();!(r=n.n()).done;){var i=ih(r.value,2),a=i[0],o=i[1];t=e(t,o,a)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:`sort`,value:function(e){var t=this;return new n({[MO]:function(){var n;return $O(CO(n=ch(t._pairs)).call(n,function(t,n){var r=ih(t,2),i=r[0],a=r[1],o=ih(n,2),s=o[0],c=o[1];return e(a,c,i,s)}))}})}}]),n}(MO);function ik(e,t){var n=Ah(e);if(xb){var r=xb(e);t&&(r=Uf(r).call(r,function(t){return jb(e,t).enumerable})),n.push.apply(n,r)}return n}function ak(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?Uh(n=ik(Object(i),!0)).call(n,function(t){Jd(e,t,i[t])}):zb?qb(e,zb(i)):Uh(r=ik(Object(i))).call(r,function(t){Jb(e,t,jb(i,t))})}return e}function ok(e,t){var n=lh!==void 0&&dm(e)||e[`@@iterator`];if(!n){if(Th(e)||(n=sk(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
8
8
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function sk(e,t){var n;if(e){if(typeof e==`string`)return ck(e,t);var r=hh(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return cm(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ck(e,t)}}function ck(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function lk(e){var t=uk();return function(){var n=ox(e),r;if(t){var i=ox(this).constructor;r=yb(n,arguments,i)}else r=n.apply(this,arguments);return rx(this,r)}}function uk(){if(typeof Reflect>`u`||!yb||yb.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(yb(Boolean,[],function(){})),!0}catch{return!1}}function dk(e,t){return e[t]??(e[t]=qO()),e}var fk=function(e){nx(r,e);var n=lk(r);function r(e,i){var a;return t(this,r),a=n.call(this),Jd(Yb(a),`_queue`,null),e&&!Th(e)&&(i=e,e=[]),a._options=i||{},a._data=new DD,a.length=0,a._idProp=a._options.fieldId||`id`,e&&e.length&&a.add(e),a.setOptions(i),a}return qd(r,[{key:`idProp`,get:function(){return this._idProp}},{key:`setOptions`,value:function(e){e&&e.queue!==void 0&&(e.queue===!1?this._queue&&=(this._queue.destroy(),null):(this._queue||=YO.extend(this,{replace:[`add`,`update`,`remove`]}),e.queue&&typeof e.queue==`object`&&this._queue.setOptions(e.queue)))}},{key:`add`,value:function(e,t){var n=this,r=[],i;if(Th(e)){var a=Xf(e).call(e,function(e){return e[n._idProp]});if(PD(a).call(a,function(e){return n._data.has(e)}))throw Error(`A duplicate id was found in the parameter array.`);for(var o=0,s=e.length;o<s;o++)i=this._addItem(e[o]),r.push(i)}else if(e&&typeof e==`object`)i=this._addItem(e),r.push(i);else throw Error(`Unknown dataType`);return r.length&&this._trigger(`add`,{items:r},t),r}},{key:`update`,value:function(e,t){var n=this,r=[],i=[],a=[],o=[],s=this._idProp,c=function(e){var t=e[s];if(t!=null&&n._data.has(t)){var c=e,l=Rg({},n._data.get(t)),u=n._updateItem(c);i.push(u),o.push(c),a.push(l)}else{var d=n._addItem(e);r.push(d)}};if(Th(e))for(var l=0,u=e.length;l<u;l++)e[l]&&typeof e[l]==`object`?c(e[l]):console.warn(`Ignoring input item, which is not an object at index `+l);else if(e&&typeof e==`object`)c(e);else throw Error(`Unknown dataType`);if(r.length&&this._trigger(`add`,{items:r},t),i.length){var d={items:i,oldData:a,data:o};this._trigger(`update`,d,t)}return mh(r).call(r,i)}},{key:`updateOnly`,value:function(e,t){var n,r=this;Th(e)||(e=[e]);var i=Xf(n=Xf(e).call(e,function(e){var t=r._data.get(e[r._idProp]);if(t==null)throw Error(`Updating non-existent items is not allowed.`);return{oldData:t,update:e}})).call(n,function(e){var t=e.oldData,n=e.update,i=t[r._idProp],a=Wy(t,n);return r._data.set(i,a),{id:i,oldData:t,updatedData:a}});if(i.length){var a={items:Xf(i).call(i,function(e){return e.id}),oldData:Xf(i).call(i,function(e){return e.oldData}),data:Xf(i).call(i,function(e){return e.updatedData})};return this._trigger(`update`,a,t),a.items}else return[]}},{key:`get`,value:function(e,t){var n=void 0,r=void 0,i=void 0;JO(e)?(n=e,i=t):Th(e)?(r=e,i=t):i=e;var a=i&&i.returnType===`Object`?`Object`:`Array`,o=i&&Uf(i),s=[],c=void 0,l=void 0,u=void 0;if(n!=null)c=this._data.get(n),c&&o&&!o(c)&&(c=void 0);else if(r!=null)for(var d=0,f=r.length;d<f;d++)c=this._data.get(r[d]),c!=null&&(!o||o(c))&&s.push(c);else{var p;l=ch(X(p=this._data).call(p));for(var m=0,h=l.length;m<h;m++)u=l[m],c=this._data.get(u),c!=null&&(!o||o(c))&&s.push(c)}if(i&&i.order&&n==null&&this._sort(s,i.order),i&&i.fields){var g=i.fields;if(n!=null&&c!=null)c=this._filterFields(c,g);else for(var _=0,v=s.length;_<v;_++)s[_]=this._filterFields(s[_],g)}if(a==`Object`){for(var y={},b=0,x=s.length;b<x;b++){var S=s[b],ee=S[this._idProp];y[ee]=S}return y}else if(n!=null)return c??null;else return s}},{key:`getIds`,value:function(e){var t=this._data,n=e&&Uf(e),r=e&&e.order,i=ch(X(t).call(t)),a=[];if(n)if(r){for(var o=[],s=0,c=i.length;s<c;s++){var l=i[s],u=this._data.get(l);u!=null&&n(u)&&o.push(u)}this._sort(o,r);for(var d=0,f=o.length;d<f;d++)a.push(o[d][this._idProp])}else for(var p=0,m=i.length;p<m;p++){var h=i[p],g=this._data.get(h);g!=null&&n(g)&&a.push(g[this._idProp])}else if(r){for(var _=[],v=0,y=i.length;v<y;v++){var b=i[v];_.push(t.get(b))}this._sort(_,r);for(var x=0,S=_.length;x<S;x++)a.push(_[x][this._idProp])}else for(var ee=0,C=i.length;ee<C;ee++){var te=i[ee],w=t.get(te);w!=null&&a.push(w[this._idProp])}return a}},{key:`getDataSet`,value:function(){return this}},{key:`forEach`,value:function(e,t){var n=t&&Uf(t),r=this._data,i=ch(X(r).call(r));if(t&&t.order)for(var a=this.get(t),o=0,s=a.length;o<s;o++){var c=a[o],l=c[this._idProp];e(c,l)}else for(var u=0,d=i.length;u<d;u++){var f=i[u],p=this._data.get(f);p!=null&&(!n||n(p))&&e(p,f)}}},{key:`map`,value:function(e,t){for(var n=t&&Uf(t),r=[],i=this._data,a=ch(X(i).call(i)),o=0,s=a.length;o<s;o++){var c=a[o],l=this._data.get(c);l!=null&&(!n||n(l))&&r.push(e(l,c))}return t&&t.order&&this._sort(r,t.order),r}},{key:`_filterFields`,value:function(e,t){var n;return e&&If(n=Th(t)?t:Ah(t)).call(n,function(t,n){return t[n]=e[n],t},{})}},{key:`_sort`,value:function(e,t){if(typeof t==`string`){var n=t;CO(e).call(e,function(e,t){var r=e[n],i=t[n];return r>i?1:r<i?-1:0})}else if(typeof t==`function`)CO(e).call(e,t);else throw TypeError(`Order must be a function or a string`)}},{key:`remove`,value:function(e,t){for(var n=[],r=[],i=Th(e)?e:[e],a=0,o=i.length;a<o;a++){var s=this._remove(i[a]);if(s){var c=s[this._idProp];c!=null&&(n.push(c),r.push(s))}}return n.length&&this._trigger(`remove`,{items:n,oldData:r},t),n}},{key:`_remove`,value:function(e){var t;if(JO(e)?t=e:e&&typeof e==`object`&&(t=e[this._idProp]),t!=null&&this._data.has(t)){var n=this._data.get(t)||null;return this._data.delete(t),--this.length,n}return null}},{key:`clear`,value:function(e){for(var t,n=ch(X(t=this._data).call(t)),r=[],i=0,a=n.length;i<a;i++)r.push(this._data.get(n[i]));return this._data.clear(),this.length=0,this._trigger(`remove`,{items:n,oldData:r},e),n}},{key:`max`,value:function(e){var t,n=null,r=null,i=ok(jO(t=this._data).call(t)),a;try{for(i.s();!(a=i.n()).done;){var o=a.value,s=o[e];typeof s==`number`&&(r==null||s>r)&&(n=o,r=s)}}catch(e){i.e(e)}finally{i.f()}return n||null}},{key:`min`,value:function(e){var t,n=null,r=null,i=ok(jO(t=this._data).call(t)),a;try{for(i.s();!(a=i.n()).done;){var o=a.value,s=o[e];typeof s==`number`&&(r==null||s<r)&&(n=o,r=s)}}catch(e){i.e(e)}finally{i.f()}return n||null}},{key:`distinct`,value:function(e){for(var t=this._data,n=ch(X(t).call(t)),r=[],i=0,a=0,o=n.length;a<o;a++){for(var s=n[a],c=t.get(s)[e],l=!1,u=0;u<i;u++)if(r[u]==c){l=!0;break}!l&&c!==void 0&&(r[i]=c,i++)}return r}},{key:`_addItem`,value:function(e){var t=dk(e,this._idProp),n=t[this._idProp];if(this._data.has(n))throw Error(`Cannot add item: item with id `+n+` already exists`);return this._data.set(n,t),++this.length,n}},{key:`_updateItem`,value:function(e){var t=e[this._idProp];if(t==null)throw Error(`Cannot update item: item has no id (item: `+Xg(e)+`)`);var n=this._data.get(t);if(!n)throw Error(`Cannot update item: no item with id `+t+` found`);return this._data.set(t,ak(ak({},n),e)),t}},{key:`stream`,value:function(e){if(e){var t=this._data;return new rk({[MO](){return _E.mark(function n(){var r,i,a,o;return _E.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:r=ok(e),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=11;break}if(a=i.value,o=t.get(a),o==null){n.next=9;break}return n.next=9,[a,o];case 9:n.next=3;break;case 11:n.next=16;break;case 13:n.prev=13,n.t0=n.catch(1),r.e(n.t0);case 16:return n.prev=16,r.f(),n.finish(16);case 19:case`end`:return n.stop()}},n,null,[[1,13,16,19]])})()}})}else{var n;return new rk({[MO]:vf(n=BO(this._data)).call(n,this._data)})}}}]),r}(XO);function pk(e,t){var n=lh!==void 0&&dm(e)||e[`@@iterator`];if(!n){if(Th(e)||(n=mk(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
9
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function mk(e,t){var n;if(e){if(typeof e==`string`)return hk(e,t);var r=hh(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return cm(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hk(e,t)}}function hk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gk(e){var t=_k();return function(){var n=ox(e),r;if(t){var i=ox(this).constructor;r=yb(n,arguments,i)}else r=n.apply(this,arguments);return rx(this,r)}}function _k(){if(typeof Reflect>`u`||!yb||yb.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(yb(Boolean,[],function(){})),!0}catch{return!1}}var vk=function(e){nx(r,e);var n=gk(r);function r(e,i){var a,o;return t(this,r),o=n.call(this),Jd(Yb(o),`length`,0),Jd(Yb(o),`_ids`,new QO),o._options=i||{},o._listener=vf(a=o._onEvent).call(a,Yb(o)),o.setData(e),o}return qd(r,[{key:`idProp`,get:function(){return this.getDataSet().idProp}},{key:`setData`,value:function(e){if(this._data){this._data.off&&this._data.off(`*`,this._listener);var t=this._data.getIds({filter:Uf(this._options)}),n=this._data.get(t);this._ids.clear(),this.length=0,this._trigger(`remove`,{items:t,oldData:n})}if(e!=null){this._data=e;for(var r=this._data.getIds({filter:Uf(this._options)}),i=0,a=r.length;i<a;i++){var o=r[i];this._ids.add(o)}this.length=r.length,this._trigger(`add`,{items:r})}else this._data=new fk;this._data.on&&this._data.on(`*`,this._listener)}},{key:`refresh`,value:function(){for(var e=this._data.getIds({filter:Uf(this._options)}),t=ch(this._ids),n={},r=[],i=[],a=[],o=0,s=e.length;o<s;o++){var c=e[o];n[c]=!0,this._ids.has(c)||(r.push(c),this._ids.add(c))}for(var l=0,u=t.length;l<u;l++){var d=t[l],f=this._data.get(d);f==null?console.error(`If you see this, report it please.`):n[d]||(i.push(d),a.push(f),this._ids.delete(d))}this.length+=r.length-i.length,r.length&&this._trigger(`add`,{items:r}),i.length&&this._trigger(`remove`,{items:i,oldData:a})}},{key:`get`,value:function(e,t){if(this._data==null)return null;var n=null,r;JO(e)||Th(e)?(n=e,r=t):r=e;var i=Rg({},this._options,r),a=Uf(this._options),o=r&&Uf(r);return a&&o&&(i.filter=function(e){return a(e)&&o(e)}),n==null?this._data.get(i):this._data.get(n,i)}},{key:`getIds`,value:function(e){if(this._data.length){var t=Uf(this._options),n=e==null?null:Uf(e),r=n?t?function(e){return t(e)&&n(e)}:n:t;return this._data.getIds({filter:r,order:e&&e.order})}else return[]}},{key:`forEach`,value:function(e,t){if(this._data){var n,r=Uf(this._options),i=t&&Uf(t),a=i?r?function(e){return r(e)&&i(e)}:i:r;Uh(n=this._data).call(n,e,{filter:a,order:t&&t.order})}}},{key:`map`,value:function(e,t){if(this._data){var n,r=Uf(this._options),i=t&&Uf(t),a=i?r?function(e){return r(e)&&i(e)}:i:r;return Xf(n=this._data).call(n,e,{filter:a,order:t&&t.order})}else return[]}},{key:`getDataSet`,value:function(){return this._data.getDataSet()}},{key:`stream`,value:function(e){var t;return this._data.stream(e||{[MO]:vf(t=X(this._ids)).call(t,this._ids)})}},{key:`dispose`,value:function(){var e;(e=this._data)!=null&&e.off&&this._data.off(`*`,this._listener);var t=`This data view has already been disposed of.`,n={get:function(){throw Error(t)},set:function(){throw Error(t)},configurable:!1},i=pk(wh(r.prototype)),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;Jb(this,o,n)}}catch(e){i.e(e)}finally{i.f()}}},{key:`_onEvent`,value:function(e,t,n){if(!(!t||!t.items||!this._data)){var r=t.items,i=[],a=[],o=[],s=[],c=[],l=[];switch(e){case`add`:for(var u=0,d=r.length;u<d;u++){var f=r[u];this.get(f)&&(this._ids.add(f),i.push(f))}break;case`update`:for(var p=0,m=r.length;p<m;p++){var h=r[p];this.get(h)?this._ids.has(h)?(a.push(h),c.push(t.data[p]),s.push(t.oldData[p])):(this._ids.add(h),i.push(h)):this._ids.has(h)&&(this._ids.delete(h),o.push(h),l.push(t.oldData[p]))}break;case`remove`:for(var g=0,_=r.length;g<_;g++){var v=r[g];this._ids.has(v)&&(this._ids.delete(v),o.push(v),l.push(t.oldData[g]))}break}this.length+=i.length-o.length,i.length&&this._trigger(`add`,{items:i},n),a.length&&this._trigger(`update`,{items:a,oldData:s,data:c},n),o.length&&this._trigger(`remove`,{items:o,oldData:l},n)}}}]),r}(XO);function yk(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof t.add==`function`&&typeof t.clear==`function`&&typeof t.distinct==`function`&&typeof Uh(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Xf(t)==`function`&&typeof t.max==`function`&&typeof t.min==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.remove==`function`&&typeof t.setOptions==`function`&&typeof t.stream==`function`&&typeof t.update==`function`&&typeof t.updateOnly==`function`}function bk(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof Uh(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Xf(t)==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.stream==`function`&&yk(e,t.getDataSet())}e.DELETE=Uy,e.DataSet=fk,e.DataStream=rk,e.DataView=vk,e.Queue=YO,e.createNewDataPipeFrom=mp,e.isDataSetLike=yk,e.isDataViewLike=bk}))})),ne=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e,w()):typeof define==`function`&&define.amd?define([`exports`,`vis-data/peer/umd/vis-data.js`],r):r((n=typeof globalThis<`u`?globalThis:n||self).vis=n.vis||{},n.vis)})(e,(function(e,t){var n=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var i=function(e){return e&&e.Math===Math&&e},a=i(typeof globalThis==`object`&&globalThis)||i(typeof window==`object`&&window)||i(typeof self==`object`&&self)||i(typeof n==`object`&&n)||function(){return this}()||n||Function(`return this`)(),o=function(e){try{return!!e()}catch{return!0}},s=!o((function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})),c=s,l=Function.prototype,u=l.apply,d=l.call,f=typeof Reflect==`object`&&Reflect.apply||(c?d.bind(u):function(){return d.apply(u,arguments)}),p=s,m=Function.prototype,h=m.call,g=p&&m.bind.bind(h,h),_=p?g:function(e){return function(){return h.apply(e,arguments)}},v=_,y=v({}.toString),b=v(``.slice),x=function(e){return b(y(e),8,-1)},S=x,ee=_,C=function(e){if(S(e)===`Function`)return ee(e)},te=typeof document==`object`&&document.all,w={all:te,IS_HTMLDDA:te===void 0&&te!==void 0},ne=w.all,re=w.IS_HTMLDDA?function(e){return typeof e==`function`||e===ne}:function(e){return typeof e==`function`},T={},E=!o((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})),D=s,O=Function.prototype.call,ie=D?O.bind(O):function(){return O.apply(O,arguments)},ae={},k={}.propertyIsEnumerable,oe=Object.getOwnPropertyDescriptor;ae.f=oe&&!k.call({1:2},1)?function(e){var t=oe(this,e);return!!t&&t.enumerable}:k;var se,ce,le=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ue=o,de=x,fe=Object,pe=_(``.split),me=ue((function(){return!fe(`z`).propertyIsEnumerable(0)}))?function(e){return de(e)===`String`?pe(e,``):fe(e)}:fe,he=function(e){return e==null},ge=he,_e=TypeError,ve=function(e){if(ge(e))throw new _e(`Can't call method on `+e);return e},ye=me,be=ve,xe=function(e){return ye(be(e))},A=re,Se=w.all,Ce=w.IS_HTMLDDA?function(e){return typeof e==`object`?e!==null:A(e)||e===Se}:function(e){return typeof e==`object`?e!==null:A(e)},j={},M=j,N=a,we=re,Te=function(e){return we(e)?e:void 0},Ee=function(e,t){return arguments.length<2?Te(M[e])||Te(N[e]):M[e]&&M[e][t]||N[e]&&N[e][t]},P=_({}.isPrototypeOf),F=typeof navigator<`u`&&String(navigator.userAgent)||``,De=a,Oe=F,ke=De.process,Ae=De.Deno,I=ke&&ke.versions||Ae&&Ae.version,je=I&&I.v8;je&&(ce=(se=je.split(`.`))[0]>0&&se[0]<4?1:+(se[0]+se[1])),!ce&&Oe&&(!(se=Oe.match(/Edge\/(\d+)/))||se[1]>=74)&&(se=Oe.match(/Chrome\/(\d+)/))&&(ce=+se[1]);var Me=ce,Ne=Me,Pe=o,Fe=a.String,Ie=!!Object.getOwnPropertySymbols&&!Pe((function(){var e=Symbol(`symbol detection`);return!Fe(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ne&&Ne<41})),Le=Ie&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,Re=Ee,ze=re,Be=P,Ve=Object,He=Le?function(e){return typeof e==`symbol`}:function(e){var t=Re(`Symbol`);return ze(t)&&Be(t.prototype,Ve(e))},Ue=String,We=function(e){try{return Ue(e)}catch{return`Object`}},Ge=re,Ke=We,qe=TypeError,Je=function(e){if(Ge(e))return e;throw new qe(Ke(e)+` is not a function`)},Ye=Je,Xe=he,Ze=function(e,t){var n=e[t];return Xe(n)?void 0:Ye(n)},Qe=ie,$e=re,et=Ce,tt=TypeError,nt={exports:{}},rt=a,it=Object.defineProperty,at=function(e,t){try{it(rt,e,{value:t,configurable:!0,writable:!0})}catch{rt[e]=t}return t},ot=`__core-js_shared__`,st=a[ot]||at(ot,{}),ct=st;(nt.exports=function(e,t){return ct[e]||(ct[e]=t===void 0?{}:t)})(`versions`,[]).push({version:`3.33.0`,mode:`pure`,copyright:`© 2014-2023 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE`,source:`https://github.com/zloirock/core-js`});var lt=nt.exports,ut=ve,dt=Object,ft=function(e){return dt(ut(e))},pt=ft,mt=_({}.hasOwnProperty),ht=Object.hasOwn||function(e,t){return mt(pt(e),t)},gt=_,_t=0,vt=Math.random(),yt=gt(1 .toString),bt=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+yt(++_t+vt,36)},xt=lt,St=ht,Ct=bt,wt=Ie,Tt=Le,Et=a.Symbol,Dt=xt(`wks`),Ot=Tt?Et.for||Et:Et&&Et.withoutSetter||Ct,kt=function(e){return St(Dt,e)||(Dt[e]=wt&&St(Et,e)?Et[e]:Ot(`Symbol.`+e)),Dt[e]},At=ie,jt=Ce,Mt=He,Nt=Ze,Pt=function(e,t){var n,r;if(t===`string`&&$e(n=e.toString)&&!et(r=Qe(n,e))||$e(n=e.valueOf)&&!et(r=Qe(n,e))||t!==`string`&&$e(n=e.toString)&&!et(r=Qe(n,e)))return r;throw new tt(`Can't convert object to primitive value`)},Ft=TypeError,It=kt(`toPrimitive`),Lt=function(e,t){if(!jt(e)||Mt(e))return e;var n,r=Nt(e,It);if(r){if(t===void 0&&(t=`default`),n=At(r,e,t),!jt(n)||Mt(n))return n;throw new Ft(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),Pt(e,t)},Rt=He,zt=function(e){var t=Lt(e,`string`);return Rt(t)?t:t+``},Bt=Ce,Vt=a.document,Ht=Bt(Vt)&&Bt(Vt.createElement),Ut=function(e){return Ht?Vt.createElement(e):{}},Wt=Ut,Gt=!E&&!o((function(){return Object.defineProperty(Wt(`div`),`a`,{get:function(){return 7}}).a!==7})),Kt=E,qt=ie,Jt=ae,Yt=le,Xt=xe,Zt=zt,Qt=ht,$t=Gt,en=Object.getOwnPropertyDescriptor;T.f=Kt?en:function(e,t){if(e=Xt(e),t=Zt(t),$t)try{return en(e,t)}catch{}if(Qt(e,t))return Yt(!qt(Jt.f,e,t),e[t])};var tn=o,nn=re,rn=/#|\.prototype\./,an=function(e,t){var n=sn[on(e)];return n===ln||n!==cn&&(nn(t)?tn(t):!!t)},on=an.normalize=function(e){return String(e).replace(rn,`.`).toLowerCase()},sn=an.data={},cn=an.NATIVE=`N`,ln=an.POLYFILL=`P`,un=an,dn=Je,fn=s,pn=C(C.bind),mn=function(e,t){return dn(e),t===void 0?e:fn?pn(e,t):function(){return e.apply(t,arguments)}},hn={},gn=E&&o((function(){return Object.defineProperty((function(){}),`prototype`,{value:42,writable:!1}).prototype!==42})),_n=Ce,vn=String,yn=TypeError,bn=function(e){if(_n(e))return e;throw new yn(vn(e)+` is not an object`)},xn=E,Sn=Gt,Cn=gn,wn=bn,Tn=zt,En=TypeError,Dn=Object.defineProperty,On=Object.getOwnPropertyDescriptor,kn=`enumerable`,An=`configurable`,jn=`writable`;hn.f=xn?Cn?function(e,t,n){if(wn(e),t=Tn(t),wn(n),typeof e==`function`&&t===`prototype`&&`value`in n&&jn in n&&!n[jn]){var r=On(e,t);r&&r[jn]&&(e[t]=n.value,n={configurable:An in n?n[An]:r[An],enumerable:kn in n?n[kn]:r[kn],writable:!1})}return Dn(e,t,n)}:Dn:function(e,t,n){if(wn(e),t=Tn(t),wn(n),Sn)try{return Dn(e,t,n)}catch{}if(`get`in n||`set`in n)throw new En(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e};var Mn=hn,Nn=le,Pn=E?function(e,t,n){return Mn.f(e,t,Nn(1,n))}:function(e,t,n){return e[t]=n,e},Fn=a,In=f,Ln=C,Rn=re,zn=T.f,Bn=un,Vn=j,Hn=mn,Un=Pn,Wn=ht,Gn=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return In(e,this,arguments)};return t.prototype=e.prototype,t},L=function(e,t){var n,r,i,a,o,s,c,l,u,d=e.target,f=e.global,p=e.stat,m=e.proto,h=f?Fn:p?Fn[d]:(Fn[d]||{}).prototype,g=f?Vn:Vn[d]||Un(Vn,d,{})[d],_=g.prototype;for(a in t)r=!(n=Bn(f?a:d+(p?`.`:`#`)+a,e.forced))&&h&&Wn(h,a),s=g[a],r&&(c=e.dontCallGetSet?(u=zn(h,a))&&u.value:h[a]),o=r&&c?c:t[a],r&&typeof s==typeof o||(l=e.bind&&r?Hn(o,Fn):e.wrap&&r?Gn(o):m&&Rn(o)?Ln(o):o,(e.sham||o&&o.sham||s&&s.sham)&&Un(l,`sham`,!0),Un(g,a,l),m&&(Wn(Vn,i=d+`Prototype`)||Un(Vn,i,{}),Un(Vn[i],a,o),e.real&&_&&(n||!_[a])&&Un(_,a,o)))},R=Math.ceil,Kn=Math.floor,qn=Math.trunc||function(e){var t=+e;return(t>0?Kn:R)(t)},Jn=function(e){var t=+e;return t!=t||t===0?0:qn(t)},Yn=Jn,Xn=Math.max,Zn=Math.min,Qn=function(e,t){var n=Yn(e);return n<0?Xn(n+t,0):Zn(n,t)},$n=Jn,er=Math.min,tr=function(e){return e>0?er($n(e),9007199254740991):0},nr=function(e){return tr(e.length)},rr=xe,ir=Qn,ar=nr,or=function(e){return function(t,n,r){var i,a=rr(t),o=ar(a),s=ir(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},z={includes:or(!0),indexOf:or(!1)},sr={},cr=ht,lr=xe,ur=z.indexOf,dr=sr,fr=_([].push),pr=function(e,t){var n,r=lr(e),i=0,a=[];for(n in r)!cr(dr,n)&&cr(r,n)&&fr(a,n);for(;t.length>i;)cr(r,n=t[i++])&&(~ur(a,n)||fr(a,n));return a},mr=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],hr=pr,gr=mr,_r=Object.keys||function(e){return hr(e,gr)},vr={};vr.f=Object.getOwnPropertySymbols;var yr=E,br=_,xr=ie,Sr=o,Cr=_r,wr=vr,Tr=ae,Er=ft,Dr=me,Or=Object.assign,kr=Object.defineProperty,Ar=br([].concat),jr=!Or||Sr((function(){if(yr&&Or({b:1},Or(kr({},`a`,{enumerable:!0,get:function(){kr(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(`assign detection`),r=`abcdefghijklmnopqrst`;return e[n]=7,r.split(``).forEach((function(e){t[e]=e})),Or({},e)[n]!==7||Cr(Or({},t)).join(``)!==r}))?function(e,t){for(var n=Er(e),r=arguments.length,i=1,a=wr.f,o=Tr.f;r>i;)for(var s,c=Dr(arguments[i++]),l=a?Ar(Cr(c),a(c)):Cr(c),u=l.length,d=0;u>d;)s=l[d++],yr&&!xr(o,c,s)||(n[s]=c[s]);return n}:Or;L({target:`Object`,stat:!0,arity:2,forced:Object.assign!==jr},{assign:jr});var Mr=r(j.Object.assign),Nr=_([].slice),Pr=_,Fr=Je,Ir=Ce,Lr=ht,Rr=Nr,zr=s,Br=Function,Vr=Pr([].concat),Hr=Pr([].join),Ur={},Wr=zr?Br.bind:function(e){var t=Fr(this),n=t.prototype,r=Rr(arguments,1),i=function(){var n=Vr(r,Rr(arguments));return this instanceof i?function(e,t,n){if(!Lr(Ur,t)){for(var r=[],i=0;i<t;i++)r[i]=`a[`+i+`]`;Ur[t]=Br(`C,a`,`return new C(`+Hr(r,`,`)+`)`)}return Ur[t](e,n)}(t,n.length,n):t.apply(e,n)};return Ir(n)&&(i.prototype=n),i},Gr=Wr;L({target:`Function`,proto:!0,forced:Function.bind!==Gr},{bind:Gr});var Kr=j,qr=function(e){return Kr[e+`Prototype`]},Jr=qr(`Function`).bind,Yr=P,Xr=Jr,Zr=Function.prototype,Qr=function(e){var t=e.bind;return e===Zr||Yr(Zr,e)&&t===Zr.bind?Xr:t},B=r(Qr);function $r(e,t,n,r){e.beginPath(),e.arc(t,n,r,0,2*Math.PI,!1),e.closePath()}function ei(e,t,n,r,i,a){var o=Math.PI/180;r-2*a<0&&(a=r/2),i-2*a<0&&(a=i/2),e.beginPath(),e.moveTo(t+a,n),e.lineTo(t+r-a,n),e.arc(t+r-a,n+a,a,270*o,360*o,!1),e.lineTo(t+r,n+i-a),e.arc(t+r-a,n+i-a,a,0,90*o,!1),e.lineTo(t+a,n+i),e.arc(t+a,n+i-a,a,90*o,180*o,!1),e.lineTo(t,n+a),e.arc(t+a,n+a,a,180*o,270*o,!1),e.closePath()}function ti(e,t,n,r,i){var a=.5522848,o=r/2*a,s=i/2*a,c=t+r,l=n+i,u=t+r/2,d=n+i/2;e.beginPath(),e.moveTo(t,d),e.bezierCurveTo(t,d-s,u-o,n,u,n),e.bezierCurveTo(u+o,n,c,d-s,c,d),e.bezierCurveTo(c,d+s,u+o,l,u,l),e.bezierCurveTo(u-o,l,t,d+s,t,d),e.closePath()}function ni(e,t,n,r,i){var a=1/3*i,o=.5522848,s=r/2*o,c=a/2*o,l=t+r,u=n+a,d=t+r/2,f=n+a/2,p=n+(i-a/2),m=n+i;e.beginPath(),e.moveTo(l,f),e.bezierCurveTo(l,f+c,d+s,u,d,u),e.bezierCurveTo(d-s,u,t,f+c,t,f),e.bezierCurveTo(t,f-c,d-s,n,d,n),e.bezierCurveTo(d+s,n,l,f-c,l,f),e.lineTo(l,p),e.bezierCurveTo(l,p+c,d+s,m,d,m),e.bezierCurveTo(d-s,m,t,p+c,t,p),e.lineTo(t,f)}function ri(e,t,n,r,i,a){e.beginPath(),e.moveTo(t,n);for(var o=a.length,s=r-t,c=i-n,l=c/s,u=Math.sqrt(s*s+c*c),d=0,f=!0,p=0,m=+a[0];u>=.1;)(m=+a[d++%o])>u&&(m=u),p=Math.sqrt(m*m/(1+l*l)),t+=p=s<0?-p:p,n+=l*p,!0===f?e.lineTo(t,n):e.moveTo(t,n),u-=m,f=!f}var ii={circle:$r,dashedLine:ri,database:ni,diamond:function(e,t,n,r){e.beginPath(),e.lineTo(t,n+r),e.lineTo(t+r,n),e.lineTo(t,n-r),e.lineTo(t-r,n),e.closePath()},ellipse:ti,ellipse_vis:ti,hexagon:function(e,t,n,r){e.beginPath();var i=2*Math.PI/6;e.moveTo(t+r,n);for(var a=1;a<6;a++)e.lineTo(t+r*Math.cos(i*a),n+r*Math.sin(i*a));e.closePath()},roundRect:ei,square:function(e,t,n,r){e.beginPath(),e.rect(t-r,n-r,2*r,2*r),e.closePath()},star:function(e,t,n,r){e.beginPath(),n+=.1*(r*=.82);for(var i=0;i<10;i++){var a=i%2==0?1.3*r:.5*r;e.lineTo(t+a*Math.sin(2*i*Math.PI/10),n-a*Math.cos(2*i*Math.PI/10))}e.closePath()},triangle:function(e,t,n,r){e.beginPath(),n+=.275*(r*=1.15);var i=2*r,a=i/2,o=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-a*a);e.moveTo(t,n-(s-o)),e.lineTo(t+a,n+o),e.lineTo(t-a,n+o),e.lineTo(t,n-(s-o)),e.closePath()},triangleDown:function(e,t,n,r){e.beginPath(),n-=.275*(r*=1.15);var i=2*r,a=i/2,o=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-a*a);e.moveTo(t,n+(s-o)),e.lineTo(t+a,n-o),e.lineTo(t-a,n-o),e.lineTo(t,n+(s-o)),e.closePath()}},ai={exports:{}};(function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n,r=this._callbacks[`$`+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return r.length===0&&delete this._callbacks[`$`+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}})(ai);var oi=r(ai.exports),si={};si[kt(`toStringTag`)]=`z`;var ci,li,ui,di=String(si)===`[object z]`,fi=di,pi=re,mi=x,hi=kt(`toStringTag`),gi=Object,_i=mi(function(){return arguments}())===`Arguments`,vi=fi?mi:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=function(e,t){try{return e[t]}catch{}}(t=gi(e),hi))==`string`?n:_i?mi(t):(r=mi(t))===`Object`&&pi(t.callee)?`Arguments`:r},yi=vi,bi=String,xi=function(e){if(yi(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return bi(e)},Si=_,Ci=Jn,wi=xi,Ti=ve,Ei=Si(``.charAt),Di=Si(``.charCodeAt),Oi=Si(``.slice),ki=function(e){return function(t,n){var r,i,a=wi(Ti(t)),o=Ci(n),s=a.length;return o<0||o>=s?e?``:void 0:(r=Di(a,o))<55296||r>56319||o+1===s||(i=Di(a,o+1))<56320||i>57343?e?Ei(a,o):r:e?Oi(a,o,o+2):i-56320+(r-55296<<10)+65536}},Ai={codeAt:ki(!1),charAt:ki(!0)},ji=re,Mi=a.WeakMap,Ni=ji(Mi)&&/native code/.test(String(Mi)),Pi=bt,Fi=lt(`keys`),Ii=function(e){return Fi[e]||(Fi[e]=Pi(e))},Li=Ni,Ri=a,zi=Ce,Bi=Pn,Vi=ht,Hi=st,Ui=Ii,Wi=sr,Gi=`Object already initialized`,Ki=Ri.TypeError,qi=Ri.WeakMap;if(Li||Hi.state){var Ji=Hi.state||=new qi;Ji.get=Ji.get,Ji.has=Ji.has,Ji.set=Ji.set,ci=function(e,t){if(Ji.has(e))throw new Ki(Gi);return t.facade=e,Ji.set(e,t),t},li=function(e){return Ji.get(e)||{}},ui=function(e){return Ji.has(e)}}else{var Yi=Ui(`state`);Wi[Yi]=!0,ci=function(e,t){if(Vi(e,Yi))throw new Ki(Gi);return t.facade=e,Bi(e,Yi,t),t},li=function(e){return Vi(e,Yi)?e[Yi]:{}},ui=function(e){return Vi(e,Yi)}}var Xi={set:ci,get:li,has:ui,enforce:function(e){return ui(e)?li(e):ci(e,{})},getterFor:function(e){return function(t){var n;if(!zi(t)||(n=li(t)).type!==e)throw new Ki(`Incompatible receiver, `+e+` required`);return n}}},Zi=E,Qi=ht,$i=Function.prototype,ea=Zi&&Object.getOwnPropertyDescriptor,ta=Qi($i,`name`),na={EXISTS:ta,PROPER:ta&&function(){}.name===`something`,CONFIGURABLE:ta&&(!Zi||Zi&&ea($i,`name`).configurable)},ra={},ia=E,aa=gn,oa=hn,sa=bn,ca=xe,la=_r;ra.f=ia&&!aa?Object.defineProperties:function(e,t){sa(e);for(var n,r=ca(t),i=la(t),a=i.length,o=0;a>o;)oa.f(e,n=i[o++],r[n]);return e};var ua,da=Ee(`document`,`documentElement`),fa=bn,pa=ra,ma=mr,ha=sr,ga=da,_a=Ut,va=`prototype`,ya=`script`,ba=Ii(`IE_PROTO`),xa=function(){},Sa=function(e){return`<`+ya+`>`+e+`</`+ya+`>`},Ca=function(e){e.write(Sa(``)),e.close();var t=e.parentWindow.Object;return e=null,t},wa=function(){try{ua=new ActiveXObject(`htmlfile`)}catch{}var e,t,n;wa=typeof document<`u`?document.domain&&ua?Ca(ua):(t=_a(`iframe`),n=`java`+ya+`:`,t.style.display=`none`,ga.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Sa(`document.F=Object`)),e.close(),e.F):Ca(ua);for(var r=ma.length;r--;)delete wa[va][ma[r]];return wa()};ha[ba]=!0;var Ta,Ea,Da,Oa=Object.create||function(e,t){var n;return e===null?n=wa():(xa[va]=fa(e),n=new xa,xa[va]=null,n[ba]=e),t===void 0?n:pa.f(n,t)},ka=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Aa=ht,ja=re,Ma=ft,Na=ka,Pa=Ii(`IE_PROTO`),Fa=Object,Ia=Fa.prototype,La=Na?Fa.getPrototypeOf:function(e){var t=Ma(e);if(Aa(t,Pa))return t[Pa];var n=t.constructor;return ja(n)&&t instanceof n?n.prototype:t instanceof Fa?Ia:null},Ra=Pn,za=function(e,t,n,r){return r&&r.enumerable?e[t]=n:Ra(e,t,n),e},Ba=o,Va=re,Ha=Ce,Ua=Oa,Wa=La,Ga=za,Ka=kt(`iterator`),qa=!1;[].keys&&(`next`in(Da=[].keys())?(Ea=Wa(Wa(Da)))!==Object.prototype&&(Ta=Ea):qa=!0),Va((Ta=!Ha(Ta)||Ba((function(){var e={};return Ta[Ka].call(e)!==e}))?{}:Ua(Ta))[Ka])||Ga(Ta,Ka,(function(){return this}));var Ja={IteratorPrototype:Ta,BUGGY_SAFARI_ITERATORS:qa},Ya=vi,Xa=di?{}.toString:function(){return`[object `+Ya(this)+`]`},Za=di,Qa=hn.f,$a=Pn,eo=ht,to=Xa,no=kt(`toStringTag`),ro=function(e,t,n,r){if(e){var i=n?e:e.prototype;eo(i,no)||Qa(i,no,{configurable:!0,value:t}),r&&!Za&&$a(i,`toString`,to)}},io={},ao=Ja.IteratorPrototype,oo=Oa,so=le,co=ro,lo=io,uo=function(){return this},fo=_,po=Je,mo=re,ho=String,go=TypeError,_o=function(e,t,n){try{return fo(po(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},vo=bn,yo=function(e){if(typeof e==`object`||mo(e))return e;throw new go(`Can't set `+ho(e)+` as a prototype`)},bo=Object.setPrototypeOf||(`__proto__`in{}?function(){var e,t=!1,n={};try{(e=_o(Object.prototype,`__proto__`,`set`))(n,[]),t=n instanceof Array}catch{}return function(n,r){return vo(n),yo(r),t?e(n,r):n.__proto__=r,n}}():void 0),xo=L,So=ie,Co=na,wo=function(e,t,n,r){var i=t+` Iterator`;return e.prototype=oo(ao,{next:so(+!r,n)}),co(e,i,!1,!0),lo[i]=uo,e},To=La,Eo=ro,Do=za,Oo=io,ko=Ja,Ao=Co.PROPER,jo=ko.BUGGY_SAFARI_ITERATORS,Mo=kt(`iterator`),No=`keys`,Po=`values`,Fo=`entries`,Io=function(){return this},Lo=function(e,t,n,r,i,a,o){wo(n,t,r);var s,c,l,u=function(e){if(e===i&&h)return h;if(!jo&&e&&e in p)return p[e];switch(e){case No:case Po:case Fo:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+` Iterator`,f=!1,p=e.prototype,m=p[Mo]||p[`@@iterator`]||i&&p[i],h=!jo&&m||u(i),g=t===`Array`&&p.entries||m;if(g&&(s=To(g.call(new e)))!==Object.prototype&&s.next&&(Eo(s,d,!0,!0),Oo[d]=Io),Ao&&i===Po&&m&&m.name!==Po&&(f=!0,h=function(){return So(m,this)}),i)if(c={values:u(Po),keys:a?h:u(No),entries:u(Fo)},o)for(l in c)(jo||f||!(l in p))&&Do(p,l,c[l]);else xo({target:t,proto:!0,forced:jo||f},c);return o&&p[Mo]!==h&&Do(p,Mo,h,{name:i}),Oo[t]=h,c},Ro=function(e,t){return{value:e,done:t}},zo=Ai.charAt,Bo=xi,Vo=Xi,Ho=Lo,Uo=Ro,Wo=`String Iterator`,Go=Vo.set,Ko=Vo.getterFor(Wo);Ho(String,`String`,(function(e){Go(this,{type:Wo,string:Bo(e),index:0})}),(function(){var e,t=Ko(this),n=t.string,r=t.index;return r>=n.length?Uo(void 0,!0):(e=zo(n,r),t.index+=e.length,Uo(e,!1))}));var qo=ie,Jo=bn,Yo=Ze,Xo=function(e,t,n){var r,i;Jo(e);try{if(!(r=Yo(e,`return`))){if(t===`throw`)throw n;return n}r=qo(r,e)}catch(e){i=!0,r=e}if(t===`throw`)throw n;if(i)throw r;return Jo(r),n},Zo=bn,Qo=Xo,$o=io,es=kt(`iterator`),ts=Array.prototype,ns=function(e){return e!==void 0&&($o.Array===e||ts[es]===e)},rs=re,is=st,as=_(Function.toString);rs(is.inspectSource)||(is.inspectSource=function(e){return as(e)});var os=is.inspectSource,ss=_,cs=o,ls=re,us=vi,ds=os,fs=function(){},ps=[],ms=Ee(`Reflect`,`construct`),hs=/^\s*(?:class|function)\b/,gs=ss(hs.exec),_s=!hs.test(fs),vs=function(e){if(!ls(e))return!1;try{return ms(fs,ps,e),!0}catch{return!1}},ys=function(e){if(!ls(e))return!1;switch(us(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return _s||!!gs(hs,ds(e))}catch{return!0}};ys.sham=!0;var bs=!ms||cs((function(){var e;return vs(vs.call)||!vs(Object)||!vs((function(){e=!0}))||e}))?ys:vs,xs=zt,Ss=hn,Cs=le,ws=function(e,t,n){var r=xs(t);r in e?Ss.f(e,r,Cs(0,n)):e[r]=n},Ts=vi,Es=Ze,Ds=he,Os=io,ks=kt(`iterator`),As=function(e){if(!Ds(e))return Es(e,ks)||Es(e,`@@iterator`)||Os[Ts(e)]},js=ie,Ms=Je,Ns=bn,Ps=We,Fs=As,Is=TypeError,Ls=function(e,t){var n=arguments.length<2?Fs(e):t;if(Ms(n))return Ns(js(n,e));throw new Is(Ps(e)+` is not iterable`)},Rs=mn,zs=ie,Bs=ft,Vs=function(e,t,n,r){try{return r?t(Zo(n)[0],n[1]):t(n)}catch(t){Qo(e,`throw`,t)}},Hs=ns,Us=bs,Ws=nr,Gs=ws,Ks=Ls,qs=As,Js=Array,Ys=kt(`iterator`),Xs=!1;try{var Zs=0,Qs={next:function(){return{done:!!Zs++}},return:function(){Xs=!0}};Qs[Ys]=function(){return this},Array.from(Qs,(function(){throw 2}))}catch{}L({target:`Array`,stat:!0,forced:!function(e,t){try{if(!t&&!Xs)return!1}catch{return!1}var n=!1;try{var r={};r[Ys]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n}((function(e){Array.from(e)}))},{from:function(e){var t=Bs(e),n=Us(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=i!==void 0;a&&(i=Rs(i,r>2?arguments[2]:void 0));var o,s,c,l,u,d,f=qs(t),p=0;if(!f||this===Js&&Hs(f))for(o=Ws(t),s=n?new this(o):Js(o);o>p;p++)d=a?i(t[p],p):t[p],Gs(s,p,d);else for(u=(l=Ks(t,f)).next,s=n?new this:[];!(c=zs(u,l)).done;p++)d=a?Vs(l,i,[c.value,p],!0):c.value,Gs(s,p,d);return s.length=p,s}});var $s=j.Array.from,ec=r($s),tc=xe,nc=io,rc=Xi;hn.f;var ic=Lo,ac=Ro,oc=`Array Iterator`,sc=rc.set,cc=rc.getterFor(oc);ic(Array,`Array`,(function(e,t){sc(this,{type:oc,target:tc(e),index:0,kind:t})}),(function(){var e=cc(this),t=e.target,n=e.kind,r=e.index++;if(!t||r>=t.length)return e.target=void 0,ac(void 0,!0);switch(n){case`keys`:return ac(r,!1);case`values`:return ac(t[r],!1)}return ac([r,t[r]],!1)}),`values`),nc.Arguments=nc.Array;var lc=As,uc={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},dc=a,fc=vi,pc=Pn,mc=io,hc=kt(`toStringTag`);for(var gc in uc){var _c=dc[gc],vc=_c&&_c.prototype;vc&&fc(vc)!==hc&&pc(vc,hc,gc),mc[gc]=mc.Array}var yc=lc,bc=r(yc),xc=r(yc);function V(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var Sc={exports:{}},Cc=L,wc=E,Tc=hn.f;Cc({target:`Object`,stat:!0,forced:Object.defineProperty!==Tc,sham:!wc},{defineProperty:Tc});var Ec=j.Object,Dc=Sc.exports=function(e,t,n){return Ec.defineProperty(e,t,n)};Ec.defineProperty.sham&&(Dc.sham=!0);var Oc=Sc.exports,kc=r(Oc),Ac=x,jc=Array.isArray||function(e){return Ac(e)===`Array`},Mc=TypeError,Nc=function(e){if(e>9007199254740991)throw Mc(`Maximum allowed index exceeded`);return e},Pc=jc,Fc=bs,Ic=Ce,Lc=kt(`species`),Rc=Array,zc=function(e){var t;return Pc(e)&&(t=e.constructor,(Fc(t)&&(t===Rc||Pc(t.prototype))||Ic(t)&&(t=t[Lc])===null)&&(t=void 0)),t===void 0?Rc:t},Bc=function(e,t){return new(zc(e))(t===0?0:t)},Vc=o,Hc=Me,Uc=kt(`species`),Wc=function(e){return Hc>=51||!Vc((function(){var t=[];return(t.constructor={})[Uc]=function(){return{foo:1}},t[e](Boolean).foo!==1}))},Gc=L,Kc=o,qc=jc,Jc=Ce,Yc=ft,Xc=nr,Zc=Nc,Qc=ws,$c=Bc,el=Wc,tl=Me,nl=kt(`isConcatSpreadable`),rl=tl>=51||!Kc((function(){var e=[];return e[nl]=!1,e.concat()[0]!==e})),il=function(e){if(!Jc(e))return!1;var t=e[nl];return t===void 0?qc(e):!!t};Gc({target:`Array`,proto:!0,arity:1,forced:!rl||!el(`concat`)},{concat:function(e){var t,n,r,i,a,o=Yc(this),s=$c(o,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(il(a=t===-1?o:arguments[t]))for(i=Xc(a),Zc(c+i),n=0;n<i;n++,c++)n in a&&Qc(s,c,a[n]);else Zc(c+1),Qc(s,c++,a);return s.length=c,s}});var al={},ol=pr,sl=mr.concat(`length`,`prototype`);al.f=Object.getOwnPropertyNames||function(e){return ol(e,sl)};var cl={},ll=Qn,ul=nr,dl=ws,fl=Array,pl=Math.max,ml=function(e,t,n){for(var r=ul(e),i=ll(t,r),a=ll(n===void 0?r:n,r),o=fl(pl(a-i,0)),s=0;i<a;i++,s++)dl(o,s,e[i]);return o.length=s,o},hl=x,gl=xe,_l=al.f,vl=ml,yl=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];cl.f=function(e){return yl&&hl(e)===`Window`?function(e){try{return _l(e)}catch{return vl(yl)}}(e):_l(gl(e))};var bl=hn,xl=function(e,t,n){return bl.f(e,t,n)},Sl={};Sl.f=kt;var Cl=j,wl=ht,Tl=Sl,El=hn.f,Dl=function(e){var t=Cl.Symbol||={};wl(t,e)||El(t,e,{value:Tl.f(e)})},Ol=ie,kl=Ee,Al=kt,jl=za,Ml=function(){var e=kl(`Symbol`),t=e&&e.prototype,n=t&&t.valueOf,r=Al(`toPrimitive`);t&&!t[r]&&jl(t,r,(function(e){return Ol(n,this)}),{arity:1})},Nl=mn,Pl=me,Fl=ft,Il=nr,Ll=Bc,Rl=_([].push),zl=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(c,l,u,d){for(var f,p,m=Fl(c),h=Pl(m),g=Nl(l,u),_=Il(h),v=0,y=d||Ll,b=t?y(c,_):n||o?y(c,0):void 0;_>v;v++)if((s||v in h)&&(p=g(f=h[v],v,m),e))if(t)b[v]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:Rl(b,f)}else switch(e){case 4:return!1;case 7:Rl(b,f)}return a?-1:r||i?i:b}},Bl={forEach:zl(0),map:zl(1),filter:zl(2),some:zl(3),every:zl(4),find:zl(5),findIndex:zl(6),filterReject:zl(7)},Vl=L,Hl=a,Ul=ie,Wl=_,Gl=E,Kl=Ie,ql=o,Jl=ht,Yl=P,Xl=bn,Zl=xe,Ql=zt,$l=xi,eu=le,tu=Oa,nu=_r,ru=al,iu=cl,au=vr,ou=T,su=hn,cu=ra,lu=ae,uu=za,du=xl,fu=lt,pu=sr,mu=bt,hu=kt,gu=Sl,_u=Dl,vu=Ml,yu=ro,bu=Xi,xu=Bl.forEach,Su=Ii(`hidden`),Cu=`Symbol`,wu=`prototype`,Tu=bu.set,Eu=bu.getterFor(Cu),Du=Object[wu],Ou=Hl.Symbol,ku=Ou&&Ou[wu],Au=Hl.RangeError,ju=Hl.TypeError,Mu=Hl.QObject,Nu=ou.f,Pu=su.f,Fu=iu.f,Iu=lu.f,Lu=Wl([].push),Ru=fu(`symbols`),zu=fu(`op-symbols`),Bu=fu(`wks`),Vu=!Mu||!Mu[wu]||!Mu[wu].findChild,Hu=function(e,t,n){var r=Nu(Du,t);r&&delete Du[t],Pu(e,t,n),r&&e!==Du&&Pu(Du,t,r)},Uu=Gl&&ql((function(){return tu(Pu({},`a`,{get:function(){return Pu(this,`a`,{value:7}).a}})).a!==7}))?Hu:Pu,Wu=function(e,t){var n=Ru[e]=tu(ku);return Tu(n,{type:Cu,tag:e,description:t}),Gl||(n.description=t),n},Gu=function(e,t,n){e===Du&&Gu(zu,t,n),Xl(e);var r=Ql(t);return Xl(n),Jl(Ru,r)?(n.enumerable?(Jl(e,Su)&&e[Su][r]&&(e[Su][r]=!1),n=tu(n,{enumerable:eu(0,!1)})):(Jl(e,Su)||Pu(e,Su,eu(1,{})),e[Su][r]=!0),Uu(e,r,n)):Pu(e,r,n)},Ku=function(e,t){Xl(e);var n=Zl(t);return xu(nu(n).concat(Xu(n)),(function(t){Gl&&!Ul(qu,n,t)||Gu(e,t,n[t])})),e},qu=function(e){var t=Ql(e),n=Ul(Iu,this,t);return!(this===Du&&Jl(Ru,t)&&!Jl(zu,t))&&(!(n||!Jl(this,t)||!Jl(Ru,t)||Jl(this,Su)&&this[Su][t])||n)},Ju=function(e,t){var n=Zl(e),r=Ql(t);if(n!==Du||!Jl(Ru,r)||Jl(zu,r)){var i=Nu(n,r);return!i||!Jl(Ru,r)||Jl(n,Su)&&n[Su][r]||(i.enumerable=!0),i}},Yu=function(e){var t=Fu(Zl(e)),n=[];return xu(t,(function(e){Jl(Ru,e)||Jl(pu,e)||Lu(n,e)})),n},Xu=function(e){var t=e===Du,n=Fu(t?zu:Zl(e)),r=[];return xu(n,(function(e){!Jl(Ru,e)||t&&!Jl(Du,e)||Lu(r,Ru[e])})),r};Kl||(Ou=function(){if(Yl(ku,this))throw new ju(`Symbol is not a constructor`);var e=arguments.length&&arguments[0]!==void 0?$l(arguments[0]):void 0,t=mu(e),n=function(e){this===Du&&Ul(n,zu,e),Jl(this,Su)&&Jl(this[Su],t)&&(this[Su][t]=!1);var r=eu(1,e);try{Uu(this,t,r)}catch(e){if(!(e instanceof Au))throw e;Hu(this,t,r)}};return Gl&&Vu&&Uu(Du,t,{configurable:!0,set:n}),Wu(t,e)},uu(ku=Ou[wu],`toString`,(function(){return Eu(this).tag})),uu(Ou,`withoutSetter`,(function(e){return Wu(mu(e),e)})),lu.f=qu,su.f=Gu,cu.f=Ku,ou.f=Ju,ru.f=iu.f=Yu,au.f=Xu,gu.f=function(e){return Wu(hu(e),e)},Gl&&du(ku,`description`,{configurable:!0,get:function(){return Eu(this).description}})),Vl({global:!0,constructor:!0,wrap:!0,forced:!Kl,sham:!Kl},{Symbol:Ou}),xu(nu(Bu),(function(e){_u(e)})),Vl({target:Cu,stat:!0,forced:!Kl},{useSetter:function(){Vu=!0},useSimple:function(){Vu=!1}}),Vl({target:`Object`,stat:!0,forced:!Kl,sham:!Gl},{create:function(e,t){return t===void 0?tu(e):Ku(tu(e),t)},defineProperty:Gu,defineProperties:Ku,getOwnPropertyDescriptor:Ju}),Vl({target:`Object`,stat:!0,forced:!Kl},{getOwnPropertyNames:Yu}),vu(),yu(Ou,Cu),pu[Su]=!0;var Zu=Ie&&!!Symbol.for&&!!Symbol.keyFor,Qu=L,$u=Ee,ed=ht,td=xi,nd=lt,rd=Zu,id=nd(`string-to-symbol-registry`),ad=nd(`symbol-to-string-registry`);Qu({target:`Symbol`,stat:!0,forced:!rd},{for:function(e){var t=td(e);if(ed(id,t))return id[t];var n=$u(`Symbol`)(t);return id[t]=n,ad[n]=t,n}});var od=L,sd=ht,cd=He,ld=We,ud=Zu,dd=lt(`symbol-to-string-registry`);od({target:`Symbol`,stat:!0,forced:!ud},{keyFor:function(e){if(!cd(e))throw TypeError(ld(e)+` is not a symbol`);if(sd(dd,e))return dd[e]}});var fd=jc,pd=re,md=x,hd=xi,gd=_([].push),_d=L,vd=Ee,yd=f,bd=ie,xd=_,Sd=o,Cd=re,wd=He,Td=Nr,Ed=function(e){if(pd(e))return e;if(fd(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i==`string`?gd(n,i):typeof i!=`number`&&md(i)!==`Number`&&md(i)!==`String`||gd(n,hd(i))}var a=n.length,o=!0;return function(e,t){if(o)return o=!1,t;if(fd(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Dd=Ie,Od=String,kd=vd(`JSON`,`stringify`),Ad=xd(/./.exec),jd=xd(``.charAt),Md=xd(``.charCodeAt),Nd=xd(``.replace),Pd=xd(1 .toString),Fd=/[\uD800-\uDFFF]/g,Id=/^[\uD800-\uDBFF]$/,Ld=/^[\uDC00-\uDFFF]$/,Rd=!Dd||Sd((function(){var e=vd(`Symbol`)(`stringify detection`);return kd([e])!==`[null]`||kd({a:e})!==`{}`||kd(Object(e))!==`{}`})),zd=Sd((function(){return kd(`\udf06\ud834`)!==`"\\udf06\\ud834"`||kd(`\udead`)!==`"\\udead"`})),Bd=function(e,t){var n=Td(arguments),r=Ed(t);if(Cd(r)||e!==void 0&&!wd(e))return n[1]=function(e,t){if(Cd(r)&&(t=bd(r,this,Od(e),t)),!wd(t))return t},yd(kd,null,n)},Vd=function(e,t,n){var r=jd(n,t-1),i=jd(n,t+1);return Ad(Id,e)&&!Ad(Ld,i)||Ad(Ld,e)&&!Ad(Id,r)?`\\u`+Pd(Md(e,0),16):e};kd&&_d({target:`JSON`,stat:!0,arity:3,forced:Rd||zd},{stringify:function(e,t,n){var r=Td(arguments),i=yd(Rd?Bd:kd,null,r);return zd&&typeof i==`string`?Nd(i,Fd,Vd):i}});var Hd=vr,Ud=ft;L({target:`Object`,stat:!0,forced:!Ie||o((function(){Hd.f(1)}))},{getOwnPropertySymbols:function(e){var t=Hd.f;return t?t(Ud(e)):[]}}),Dl(`asyncIterator`),Dl(`hasInstance`),Dl(`isConcatSpreadable`),Dl(`iterator`),Dl(`match`),Dl(`matchAll`),Dl(`replace`),Dl(`search`),Dl(`species`),Dl(`split`);var Wd=Ml;Dl(`toPrimitive`),Wd();var Gd=Ee,Kd=ro;Dl(`toStringTag`),Kd(Gd(`Symbol`),`Symbol`),Dl(`unscopables`),ro(a.JSON,`JSON`,!0);var qd=j.Symbol,Jd=kt,Yd=hn.f,Xd=Jd(`metadata`),Zd=Function.prototype;Zd[Xd]===void 0&&Yd(Zd,Xd,{value:null}),Dl(`asyncDispose`),Dl(`dispose`),Dl(`metadata`);var Qd=qd,$d=_,ef=Ee(`Symbol`),tf=ef.keyFor,nf=$d(ef.prototype.valueOf),rf=ef.isRegisteredSymbol||function(e){try{return tf(nf(e))!==void 0}catch{return!1}};L({target:`Symbol`,stat:!0},{isRegisteredSymbol:rf});for(var af=lt,of=Ee,sf=_,cf=He,lf=kt,uf=of(`Symbol`),df=uf.isWellKnownSymbol,ff=of(`Object`,`getOwnPropertyNames`),pf=sf(uf.prototype.valueOf),mf=af(`wks`),hf=0,gf=ff(uf),_f=gf.length;hf<_f;hf++)try{var vf=gf[hf];cf(uf[vf])&&lf(vf)}catch{}var yf=function(e){if(df&&df(e))return!0;try{for(var t=pf(e),n=0,r=ff(mf),i=r.length;n<i;n++)if(mf[r[n]]==t)return!0}catch{}return!1};L({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:yf}),Dl(`matcher`),Dl(`observable`),L({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:rf}),L({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:yf}),Dl(`metadataKey`),Dl(`patternMatch`),Dl(`replaceAll`);var bf=r(Qd),xf=r(Sl.f(`iterator`));function Sf(e){return Sf=typeof bf==`function`&&typeof xf==`symbol`?function(e){return typeof e}:function(e){return e&&typeof bf==`function`&&e.constructor===bf&&e!==bf.prototype?`symbol`:typeof e},Sf(e)}var Cf=r(Sl.f(`toPrimitive`));function wf(e){var t=function(e,t){if(Sf(e)!==`object`||e===null)return e;var n=e[Cf];if(n!==void 0){var r=n.call(e,t||`default`);if(Sf(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return Sf(t)===`symbol`?t:String(t)}function Tf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),kc(e,wf(r.key),r)}}function H(e,t,n){return t&&Tf(e.prototype,t),n&&Tf(e,n),kc(e,`prototype`,{writable:!1}),e}L({target:`Array`,stat:!0},{isArray:jc});var Ef=j.Array.isArray,Df=r(Ef),Of=E,kf=jc,Af=TypeError,jf=Object.getOwnPropertyDescriptor,Mf=Of&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(kf(e)&&!jf(e,`length`).writable)throw new Af(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t},Nf=ft,Pf=nr,Ff=Mf,If=Nc;L({target:`Array`,proto:!0,arity:1,forced:o((function(){return[].push.call({length:4294967296},1)!==4294967297}))||!function(){try{Object.defineProperty([],`length`,{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=Nf(this),n=Pf(t),r=arguments.length;If(n+r);for(var i=0;i<r;i++)t[n]=arguments[i],n++;return Ff(t,n),n}});var Lf=qr(`Array`).push,Rf=P,zf=Lf,Bf=Array.prototype,Vf=r(function(e){var t=e.push;return e===Bf||Rf(Bf,e)&&t===Bf.push?zf:t}),Hf=L,Uf=jc,Wf=bs,Gf=Ce,Kf=Qn,qf=nr,Jf=xe,Yf=ws,Xf=kt,Zf=Nr,Qf=Wc(`slice`),$f=Xf(`species`),ep=Array,tp=Math.max;Hf({target:`Array`,proto:!0,forced:!Qf},{slice:function(e,t){var n,r,i,a=Jf(this),o=qf(a),s=Kf(e,o),c=Kf(t===void 0?o:t,o);if(Uf(a)&&(n=a.constructor,(Wf(n)&&(n===ep||Uf(n.prototype))||Gf(n)&&(n=n[$f])===null)&&(n=void 0),n===ep||n===void 0))return Zf(a,s,c);for(r=new(n===void 0?ep:n)(tp(c-s,0)),i=0;s<c;s++,i++)s in a&&Yf(r,i,a[s]);return r.length=i,r}});var np=qr(`Array`).slice,rp=P,ip=np,ap=Array.prototype,op=function(e){var t=e.slice;return e===ap||rp(ap,e)&&t===ap.slice?ip:t},sp=r(op),cp=r($s);function lp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function up(e,t){var n;if(e){if(typeof e==`string`)return lp(e,t);var r=sp(n=Object.prototype.toString.call(e)).call(n,8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?cp(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lp(e,t):void 0}}function dp(e,t){return function(e){if(Df(e))return e}(e)||function(e,t){var n=e==null?null:bf!==void 0&&bc(e)||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(Vf(s).call(s,r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||up(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
9
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,s=e},f:function(){try{!a&&n.return!=null&&n.return()}finally{if(o)throw s}}}}function mk(e,t){var n;if(e){if(typeof e==`string`)return hk(e,t);var r=hh(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return cm(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hk(e,t)}}function hk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gk(e){var t=_k();return function(){var n=ox(e),r;if(t){var i=ox(this).constructor;r=yb(n,arguments,i)}else r=n.apply(this,arguments);return rx(this,r)}}function _k(){if(typeof Reflect>`u`||!yb||yb.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(yb(Boolean,[],function(){})),!0}catch{return!1}}var vk=function(e){nx(r,e);var n=gk(r);function r(e,i){var a,o;return t(this,r),o=n.call(this),Jd(Yb(o),`length`,0),Jd(Yb(o),`_ids`,new QO),o._options=i||{},o._listener=vf(a=o._onEvent).call(a,Yb(o)),o.setData(e),o}return qd(r,[{key:`idProp`,get:function(){return this.getDataSet().idProp}},{key:`setData`,value:function(e){if(this._data){this._data.off&&this._data.off(`*`,this._listener);var t=this._data.getIds({filter:Uf(this._options)}),n=this._data.get(t);this._ids.clear(),this.length=0,this._trigger(`remove`,{items:t,oldData:n})}if(e!=null){this._data=e;for(var r=this._data.getIds({filter:Uf(this._options)}),i=0,a=r.length;i<a;i++){var o=r[i];this._ids.add(o)}this.length=r.length,this._trigger(`add`,{items:r})}else this._data=new fk;this._data.on&&this._data.on(`*`,this._listener)}},{key:`refresh`,value:function(){for(var e=this._data.getIds({filter:Uf(this._options)}),t=ch(this._ids),n={},r=[],i=[],a=[],o=0,s=e.length;o<s;o++){var c=e[o];n[c]=!0,this._ids.has(c)||(r.push(c),this._ids.add(c))}for(var l=0,u=t.length;l<u;l++){var d=t[l],f=this._data.get(d);f==null?console.error(`If you see this, report it please.`):n[d]||(i.push(d),a.push(f),this._ids.delete(d))}this.length+=r.length-i.length,r.length&&this._trigger(`add`,{items:r}),i.length&&this._trigger(`remove`,{items:i,oldData:a})}},{key:`get`,value:function(e,t){if(this._data==null)return null;var n=null,r;JO(e)||Th(e)?(n=e,r=t):r=e;var i=Rg({},this._options,r),a=Uf(this._options),o=r&&Uf(r);return a&&o&&(i.filter=function(e){return a(e)&&o(e)}),n==null?this._data.get(i):this._data.get(n,i)}},{key:`getIds`,value:function(e){if(this._data.length){var t=Uf(this._options),n=e==null?null:Uf(e),r=n?t?function(e){return t(e)&&n(e)}:n:t;return this._data.getIds({filter:r,order:e&&e.order})}else return[]}},{key:`forEach`,value:function(e,t){if(this._data){var n,r=Uf(this._options),i=t&&Uf(t),a=i?r?function(e){return r(e)&&i(e)}:i:r;Uh(n=this._data).call(n,e,{filter:a,order:t&&t.order})}}},{key:`map`,value:function(e,t){if(this._data){var n,r=Uf(this._options),i=t&&Uf(t),a=i?r?function(e){return r(e)&&i(e)}:i:r;return Xf(n=this._data).call(n,e,{filter:a,order:t&&t.order})}else return[]}},{key:`getDataSet`,value:function(){return this._data.getDataSet()}},{key:`stream`,value:function(e){var t;return this._data.stream(e||{[MO]:vf(t=X(this._ids)).call(t,this._ids)})}},{key:`dispose`,value:function(){var e;(e=this._data)!=null&&e.off&&this._data.off(`*`,this._listener);var t=`This data view has already been disposed of.`,n={get:function(){throw Error(t)},set:function(){throw Error(t)},configurable:!1},i=pk(wh(r.prototype)),a;try{for(i.s();!(a=i.n()).done;){var o=a.value;Jb(this,o,n)}}catch(e){i.e(e)}finally{i.f()}}},{key:`_onEvent`,value:function(e,t,n){if(!(!t||!t.items||!this._data)){var r=t.items,i=[],a=[],o=[],s=[],c=[],l=[];switch(e){case`add`:for(var u=0,d=r.length;u<d;u++){var f=r[u];this.get(f)&&(this._ids.add(f),i.push(f))}break;case`update`:for(var p=0,m=r.length;p<m;p++){var h=r[p];this.get(h)?this._ids.has(h)?(a.push(h),c.push(t.data[p]),s.push(t.oldData[p])):(this._ids.add(h),i.push(h)):this._ids.has(h)&&(this._ids.delete(h),o.push(h),l.push(t.oldData[p]))}break;case`remove`:for(var g=0,_=r.length;g<_;g++){var v=r[g];this._ids.has(v)&&(this._ids.delete(v),o.push(v),l.push(t.oldData[g]))}break}this.length+=i.length-o.length,i.length&&this._trigger(`add`,{items:i},n),a.length&&this._trigger(`update`,{items:a,oldData:s,data:c},n),o.length&&this._trigger(`remove`,{items:o,oldData:l},n)}}}]),r}(XO);function yk(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof t.add==`function`&&typeof t.clear==`function`&&typeof t.distinct==`function`&&typeof Uh(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Xf(t)==`function`&&typeof t.max==`function`&&typeof t.min==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.remove==`function`&&typeof t.setOptions==`function`&&typeof t.stream==`function`&&typeof t.update==`function`&&typeof t.updateOnly==`function`}function bk(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof Uh(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Xf(t)==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.stream==`function`&&yk(e,t.getDataSet())}e.DELETE=Uy,e.DataSet=fk,e.DataStream=rk,e.DataView=vk,e.Queue=YO,e.createNewDataPipeFrom=mp,e.isDataSetLike=yk,e.isDataViewLike=bk}))})),ne=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e,w()):typeof define==`function`&&define.amd?define([`exports`,`vis-data/peer/umd/vis-data.js`],r):r((n=typeof globalThis<`u`?globalThis:n||self).vis=n.vis||{},n.vis)})(e,(function(e,t){var n=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var i=function(e){return e&&e.Math===Math&&e},a=i(typeof globalThis==`object`&&globalThis)||i(typeof window==`object`&&window)||i(typeof self==`object`&&self)||i(typeof n==`object`&&n)||function(){return this}()||n||Function(`return this`)(),o=function(e){try{return!!e()}catch{return!0}},s=!o((function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})),c=s,l=Function.prototype,u=l.apply,d=l.call,f=typeof Reflect==`object`&&Reflect.apply||(c?d.bind(u):function(){return d.apply(u,arguments)}),p=s,m=Function.prototype,h=m.call,g=p&&m.bind.bind(h,h),_=p?g:function(e){return function(){return h.apply(e,arguments)}},v=_,y=v({}.toString),b=v(``.slice),x=function(e){return b(y(e),8,-1)},S=x,ee=_,C=function(e){if(S(e)===`Function`)return ee(e)},te=typeof document==`object`&&document.all,w={all:te,IS_HTMLDDA:te===void 0&&te!==void 0},ne=w.all,re=w.IS_HTMLDDA?function(e){return typeof e==`function`||e===ne}:function(e){return typeof e==`function`},T={},E=!o((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})),D=s,O=Function.prototype.call,ie=D?O.bind(O):function(){return O.apply(O,arguments)},ae={},k={}.propertyIsEnumerable,oe=Object.getOwnPropertyDescriptor;ae.f=oe&&!k.call({1:2},1)?function(e){var t=oe(this,e);return!!t&&t.enumerable}:k;var se,ce,le=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ue=o,de=x,fe=Object,pe=_(``.split),me=ue((function(){return!fe(`z`).propertyIsEnumerable(0)}))?function(e){return de(e)===`String`?pe(e,``):fe(e)}:fe,he=function(e){return e==null},ge=he,_e=TypeError,ve=function(e){if(ge(e))throw new _e(`Can't call method on `+e);return e},ye=me,be=ve,xe=function(e){return ye(be(e))},A=re,Se=w.all,Ce=w.IS_HTMLDDA?function(e){return typeof e==`object`?e!==null:A(e)||e===Se}:function(e){return typeof e==`object`?e!==null:A(e)},j={},M=j,N=a,we=re,Te=function(e){return we(e)?e:void 0},Ee=function(e,t){return arguments.length<2?Te(M[e])||Te(N[e]):M[e]&&M[e][t]||N[e]&&N[e][t]},P=_({}.isPrototypeOf),F=typeof navigator<`u`&&String(navigator.userAgent)||``,De=a,Oe=F,ke=De.process,Ae=De.Deno,je=ke&&ke.versions||Ae&&Ae.version,I=je&&je.v8;I&&(ce=(se=I.split(`.`))[0]>0&&se[0]<4?1:+(se[0]+se[1])),!ce&&Oe&&(!(se=Oe.match(/Edge\/(\d+)/))||se[1]>=74)&&(se=Oe.match(/Chrome\/(\d+)/))&&(ce=+se[1]);var Me=ce,Ne=Me,Pe=o,Fe=a.String,Ie=!!Object.getOwnPropertySymbols&&!Pe((function(){var e=Symbol(`symbol detection`);return!Fe(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ne&&Ne<41})),Le=Ie&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,Re=Ee,ze=re,Be=P,Ve=Object,He=Le?function(e){return typeof e==`symbol`}:function(e){var t=Re(`Symbol`);return ze(t)&&Be(t.prototype,Ve(e))},Ue=String,We=function(e){try{return Ue(e)}catch{return`Object`}},Ge=re,Ke=We,qe=TypeError,Je=function(e){if(Ge(e))return e;throw new qe(Ke(e)+` is not a function`)},Ye=Je,Xe=he,Ze=function(e,t){var n=e[t];return Xe(n)?void 0:Ye(n)},Qe=ie,$e=re,et=Ce,tt=TypeError,nt={exports:{}},rt=a,it=Object.defineProperty,at=function(e,t){try{it(rt,e,{value:t,configurable:!0,writable:!0})}catch{rt[e]=t}return t},ot=`__core-js_shared__`,st=a[ot]||at(ot,{}),ct=st;(nt.exports=function(e,t){return ct[e]||(ct[e]=t===void 0?{}:t)})(`versions`,[]).push({version:`3.33.0`,mode:`pure`,copyright:`© 2014-2023 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE`,source:`https://github.com/zloirock/core-js`});var lt=nt.exports,ut=ve,dt=Object,ft=function(e){return dt(ut(e))},pt=ft,mt=_({}.hasOwnProperty),ht=Object.hasOwn||function(e,t){return mt(pt(e),t)},gt=_,_t=0,vt=Math.random(),yt=gt(1 .toString),bt=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+yt(++_t+vt,36)},xt=lt,St=ht,Ct=bt,wt=Ie,Tt=Le,Et=a.Symbol,Dt=xt(`wks`),Ot=Tt?Et.for||Et:Et&&Et.withoutSetter||Ct,kt=function(e){return St(Dt,e)||(Dt[e]=wt&&St(Et,e)?Et[e]:Ot(`Symbol.`+e)),Dt[e]},At=ie,jt=Ce,Mt=He,Nt=Ze,Pt=function(e,t){var n,r;if(t===`string`&&$e(n=e.toString)&&!et(r=Qe(n,e))||$e(n=e.valueOf)&&!et(r=Qe(n,e))||t!==`string`&&$e(n=e.toString)&&!et(r=Qe(n,e)))return r;throw new tt(`Can't convert object to primitive value`)},Ft=TypeError,It=kt(`toPrimitive`),Lt=function(e,t){if(!jt(e)||Mt(e))return e;var n,r=Nt(e,It);if(r){if(t===void 0&&(t=`default`),n=At(r,e,t),!jt(n)||Mt(n))return n;throw new Ft(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),Pt(e,t)},Rt=He,zt=function(e){var t=Lt(e,`string`);return Rt(t)?t:t+``},Bt=Ce,Vt=a.document,Ht=Bt(Vt)&&Bt(Vt.createElement),Ut=function(e){return Ht?Vt.createElement(e):{}},Wt=Ut,Gt=!E&&!o((function(){return Object.defineProperty(Wt(`div`),`a`,{get:function(){return 7}}).a!==7})),Kt=E,qt=ie,Jt=ae,Yt=le,Xt=xe,Zt=zt,Qt=ht,$t=Gt,en=Object.getOwnPropertyDescriptor;T.f=Kt?en:function(e,t){if(e=Xt(e),t=Zt(t),$t)try{return en(e,t)}catch{}if(Qt(e,t))return Yt(!qt(Jt.f,e,t),e[t])};var tn=o,nn=re,rn=/#|\.prototype\./,an=function(e,t){var n=sn[on(e)];return n===ln||n!==cn&&(nn(t)?tn(t):!!t)},on=an.normalize=function(e){return String(e).replace(rn,`.`).toLowerCase()},sn=an.data={},cn=an.NATIVE=`N`,ln=an.POLYFILL=`P`,un=an,dn=Je,fn=s,pn=C(C.bind),mn=function(e,t){return dn(e),t===void 0?e:fn?pn(e,t):function(){return e.apply(t,arguments)}},hn={},gn=E&&o((function(){return Object.defineProperty((function(){}),`prototype`,{value:42,writable:!1}).prototype!==42})),_n=Ce,vn=String,yn=TypeError,bn=function(e){if(_n(e))return e;throw new yn(vn(e)+` is not an object`)},xn=E,Sn=Gt,Cn=gn,wn=bn,Tn=zt,En=TypeError,Dn=Object.defineProperty,On=Object.getOwnPropertyDescriptor,kn=`enumerable`,An=`configurable`,jn=`writable`;hn.f=xn?Cn?function(e,t,n){if(wn(e),t=Tn(t),wn(n),typeof e==`function`&&t===`prototype`&&`value`in n&&jn in n&&!n[jn]){var r=On(e,t);r&&r[jn]&&(e[t]=n.value,n={configurable:An in n?n[An]:r[An],enumerable:kn in n?n[kn]:r[kn],writable:!1})}return Dn(e,t,n)}:Dn:function(e,t,n){if(wn(e),t=Tn(t),wn(n),Sn)try{return Dn(e,t,n)}catch{}if(`get`in n||`set`in n)throw new En(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e};var Mn=hn,Nn=le,Pn=E?function(e,t,n){return Mn.f(e,t,Nn(1,n))}:function(e,t,n){return e[t]=n,e},Fn=a,In=f,Ln=C,Rn=re,zn=T.f,Bn=un,Vn=j,Hn=mn,Un=Pn,Wn=ht,Gn=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return In(e,this,arguments)};return t.prototype=e.prototype,t},L=function(e,t){var n,r,i,a,o,s,c,l,u,d=e.target,f=e.global,p=e.stat,m=e.proto,h=f?Fn:p?Fn[d]:(Fn[d]||{}).prototype,g=f?Vn:Vn[d]||Un(Vn,d,{})[d],_=g.prototype;for(a in t)r=!(n=Bn(f?a:d+(p?`.`:`#`)+a,e.forced))&&h&&Wn(h,a),s=g[a],r&&(c=e.dontCallGetSet?(u=zn(h,a))&&u.value:h[a]),o=r&&c?c:t[a],r&&typeof s==typeof o||(l=e.bind&&r?Hn(o,Fn):e.wrap&&r?Gn(o):m&&Rn(o)?Ln(o):o,(e.sham||o&&o.sham||s&&s.sham)&&Un(l,`sham`,!0),Un(g,a,l),m&&(Wn(Vn,i=d+`Prototype`)||Un(Vn,i,{}),Un(Vn[i],a,o),e.real&&_&&(n||!_[a])&&Un(_,a,o)))},R=Math.ceil,Kn=Math.floor,qn=Math.trunc||function(e){var t=+e;return(t>0?Kn:R)(t)},Jn=function(e){var t=+e;return t!=t||t===0?0:qn(t)},Yn=Jn,Xn=Math.max,Zn=Math.min,Qn=function(e,t){var n=Yn(e);return n<0?Xn(n+t,0):Zn(n,t)},$n=Jn,er=Math.min,tr=function(e){return e>0?er($n(e),9007199254740991):0},nr=function(e){return tr(e.length)},rr=xe,ir=Qn,ar=nr,or=function(e){return function(t,n,r){var i,a=rr(t),o=ar(a),s=ir(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},z={includes:or(!0),indexOf:or(!1)},sr={},cr=ht,lr=xe,ur=z.indexOf,dr=sr,fr=_([].push),pr=function(e,t){var n,r=lr(e),i=0,a=[];for(n in r)!cr(dr,n)&&cr(r,n)&&fr(a,n);for(;t.length>i;)cr(r,n=t[i++])&&(~ur(a,n)||fr(a,n));return a},mr=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],hr=pr,gr=mr,_r=Object.keys||function(e){return hr(e,gr)},vr={};vr.f=Object.getOwnPropertySymbols;var yr=E,br=_,xr=ie,Sr=o,Cr=_r,wr=vr,Tr=ae,Er=ft,Dr=me,Or=Object.assign,kr=Object.defineProperty,Ar=br([].concat),jr=!Or||Sr((function(){if(yr&&Or({b:1},Or(kr({},`a`,{enumerable:!0,get:function(){kr(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(`assign detection`),r=`abcdefghijklmnopqrst`;return e[n]=7,r.split(``).forEach((function(e){t[e]=e})),Or({},e)[n]!==7||Cr(Or({},t)).join(``)!==r}))?function(e,t){for(var n=Er(e),r=arguments.length,i=1,a=wr.f,o=Tr.f;r>i;)for(var s,c=Dr(arguments[i++]),l=a?Ar(Cr(c),a(c)):Cr(c),u=l.length,d=0;u>d;)s=l[d++],yr&&!xr(o,c,s)||(n[s]=c[s]);return n}:Or;L({target:`Object`,stat:!0,arity:2,forced:Object.assign!==jr},{assign:jr});var Mr=r(j.Object.assign),Nr=_([].slice),Pr=_,Fr=Je,Ir=Ce,Lr=ht,Rr=Nr,zr=s,Br=Function,Vr=Pr([].concat),Hr=Pr([].join),Ur={},Wr=zr?Br.bind:function(e){var t=Fr(this),n=t.prototype,r=Rr(arguments,1),i=function(){var n=Vr(r,Rr(arguments));return this instanceof i?function(e,t,n){if(!Lr(Ur,t)){for(var r=[],i=0;i<t;i++)r[i]=`a[`+i+`]`;Ur[t]=Br(`C,a`,`return new C(`+Hr(r,`,`)+`)`)}return Ur[t](e,n)}(t,n.length,n):t.apply(e,n)};return Ir(n)&&(i.prototype=n),i},Gr=Wr;L({target:`Function`,proto:!0,forced:Function.bind!==Gr},{bind:Gr});var Kr=j,qr=function(e){return Kr[e+`Prototype`]},Jr=qr(`Function`).bind,Yr=P,Xr=Jr,Zr=Function.prototype,Qr=function(e){var t=e.bind;return e===Zr||Yr(Zr,e)&&t===Zr.bind?Xr:t},B=r(Qr);function $r(e,t,n,r){e.beginPath(),e.arc(t,n,r,0,2*Math.PI,!1),e.closePath()}function ei(e,t,n,r,i,a){var o=Math.PI/180;r-2*a<0&&(a=r/2),i-2*a<0&&(a=i/2),e.beginPath(),e.moveTo(t+a,n),e.lineTo(t+r-a,n),e.arc(t+r-a,n+a,a,270*o,360*o,!1),e.lineTo(t+r,n+i-a),e.arc(t+r-a,n+i-a,a,0,90*o,!1),e.lineTo(t+a,n+i),e.arc(t+a,n+i-a,a,90*o,180*o,!1),e.lineTo(t,n+a),e.arc(t+a,n+a,a,180*o,270*o,!1),e.closePath()}function ti(e,t,n,r,i){var a=.5522848,o=r/2*a,s=i/2*a,c=t+r,l=n+i,u=t+r/2,d=n+i/2;e.beginPath(),e.moveTo(t,d),e.bezierCurveTo(t,d-s,u-o,n,u,n),e.bezierCurveTo(u+o,n,c,d-s,c,d),e.bezierCurveTo(c,d+s,u+o,l,u,l),e.bezierCurveTo(u-o,l,t,d+s,t,d),e.closePath()}function ni(e,t,n,r,i){var a=1/3*i,o=.5522848,s=r/2*o,c=a/2*o,l=t+r,u=n+a,d=t+r/2,f=n+a/2,p=n+(i-a/2),m=n+i;e.beginPath(),e.moveTo(l,f),e.bezierCurveTo(l,f+c,d+s,u,d,u),e.bezierCurveTo(d-s,u,t,f+c,t,f),e.bezierCurveTo(t,f-c,d-s,n,d,n),e.bezierCurveTo(d+s,n,l,f-c,l,f),e.lineTo(l,p),e.bezierCurveTo(l,p+c,d+s,m,d,m),e.bezierCurveTo(d-s,m,t,p+c,t,p),e.lineTo(t,f)}function ri(e,t,n,r,i,a){e.beginPath(),e.moveTo(t,n);for(var o=a.length,s=r-t,c=i-n,l=c/s,u=Math.sqrt(s*s+c*c),d=0,f=!0,p=0,m=+a[0];u>=.1;)(m=+a[d++%o])>u&&(m=u),p=Math.sqrt(m*m/(1+l*l)),t+=p=s<0?-p:p,n+=l*p,!0===f?e.lineTo(t,n):e.moveTo(t,n),u-=m,f=!f}var ii={circle:$r,dashedLine:ri,database:ni,diamond:function(e,t,n,r){e.beginPath(),e.lineTo(t,n+r),e.lineTo(t+r,n),e.lineTo(t,n-r),e.lineTo(t-r,n),e.closePath()},ellipse:ti,ellipse_vis:ti,hexagon:function(e,t,n,r){e.beginPath();var i=2*Math.PI/6;e.moveTo(t+r,n);for(var a=1;a<6;a++)e.lineTo(t+r*Math.cos(i*a),n+r*Math.sin(i*a));e.closePath()},roundRect:ei,square:function(e,t,n,r){e.beginPath(),e.rect(t-r,n-r,2*r,2*r),e.closePath()},star:function(e,t,n,r){e.beginPath(),n+=.1*(r*=.82);for(var i=0;i<10;i++){var a=i%2==0?1.3*r:.5*r;e.lineTo(t+a*Math.sin(2*i*Math.PI/10),n-a*Math.cos(2*i*Math.PI/10))}e.closePath()},triangle:function(e,t,n,r){e.beginPath(),n+=.275*(r*=1.15);var i=2*r,a=i/2,o=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-a*a);e.moveTo(t,n-(s-o)),e.lineTo(t+a,n+o),e.lineTo(t-a,n+o),e.lineTo(t,n-(s-o)),e.closePath()},triangleDown:function(e,t,n,r){e.beginPath(),n-=.275*(r*=1.15);var i=2*r,a=i/2,o=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-a*a);e.moveTo(t,n+(s-o)),e.lineTo(t+a,n-o),e.lineTo(t-a,n-o),e.lineTo(t,n+(s-o)),e.closePath()}},ai={exports:{}};(function(e){function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n,r=this._callbacks[`$`+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return r.length===0&&delete this._callbacks[`$`+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}})(ai);var oi=r(ai.exports),si={};si[kt(`toStringTag`)]=`z`;var ci,li,ui,di=String(si)===`[object z]`,fi=di,pi=re,mi=x,hi=kt(`toStringTag`),gi=Object,_i=mi(function(){return arguments}())===`Arguments`,vi=fi?mi:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=function(e,t){try{return e[t]}catch{}}(t=gi(e),hi))==`string`?n:_i?mi(t):(r=mi(t))===`Object`&&pi(t.callee)?`Arguments`:r},yi=vi,bi=String,xi=function(e){if(yi(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return bi(e)},Si=_,Ci=Jn,wi=xi,Ti=ve,Ei=Si(``.charAt),Di=Si(``.charCodeAt),Oi=Si(``.slice),ki=function(e){return function(t,n){var r,i,a=wi(Ti(t)),o=Ci(n),s=a.length;return o<0||o>=s?e?``:void 0:(r=Di(a,o))<55296||r>56319||o+1===s||(i=Di(a,o+1))<56320||i>57343?e?Ei(a,o):r:e?Oi(a,o,o+2):i-56320+(r-55296<<10)+65536}},Ai={codeAt:ki(!1),charAt:ki(!0)},ji=re,Mi=a.WeakMap,Ni=ji(Mi)&&/native code/.test(String(Mi)),Pi=bt,Fi=lt(`keys`),Ii=function(e){return Fi[e]||(Fi[e]=Pi(e))},Li=Ni,Ri=a,zi=Ce,Bi=Pn,Vi=ht,Hi=st,Ui=Ii,Wi=sr,Gi=`Object already initialized`,Ki=Ri.TypeError,qi=Ri.WeakMap;if(Li||Hi.state){var Ji=Hi.state||=new qi;Ji.get=Ji.get,Ji.has=Ji.has,Ji.set=Ji.set,ci=function(e,t){if(Ji.has(e))throw new Ki(Gi);return t.facade=e,Ji.set(e,t),t},li=function(e){return Ji.get(e)||{}},ui=function(e){return Ji.has(e)}}else{var Yi=Ui(`state`);Wi[Yi]=!0,ci=function(e,t){if(Vi(e,Yi))throw new Ki(Gi);return t.facade=e,Bi(e,Yi,t),t},li=function(e){return Vi(e,Yi)?e[Yi]:{}},ui=function(e){return Vi(e,Yi)}}var Xi={set:ci,get:li,has:ui,enforce:function(e){return ui(e)?li(e):ci(e,{})},getterFor:function(e){return function(t){var n;if(!zi(t)||(n=li(t)).type!==e)throw new Ki(`Incompatible receiver, `+e+` required`);return n}}},Zi=E,Qi=ht,$i=Function.prototype,ea=Zi&&Object.getOwnPropertyDescriptor,ta=Qi($i,`name`),na={EXISTS:ta,PROPER:ta&&function(){}.name===`something`,CONFIGURABLE:ta&&(!Zi||Zi&&ea($i,`name`).configurable)},ra={},ia=E,aa=gn,oa=hn,sa=bn,ca=xe,la=_r;ra.f=ia&&!aa?Object.defineProperties:function(e,t){sa(e);for(var n,r=ca(t),i=la(t),a=i.length,o=0;a>o;)oa.f(e,n=i[o++],r[n]);return e};var ua,da=Ee(`document`,`documentElement`),fa=bn,pa=ra,ma=mr,ha=sr,ga=da,_a=Ut,va=`prototype`,ya=`script`,ba=Ii(`IE_PROTO`),xa=function(){},Sa=function(e){return`<`+ya+`>`+e+`</`+ya+`>`},Ca=function(e){e.write(Sa(``)),e.close();var t=e.parentWindow.Object;return e=null,t},wa=function(){try{ua=new ActiveXObject(`htmlfile`)}catch{}var e,t,n;wa=typeof document<`u`?document.domain&&ua?Ca(ua):(t=_a(`iframe`),n=`java`+ya+`:`,t.style.display=`none`,ga.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Sa(`document.F=Object`)),e.close(),e.F):Ca(ua);for(var r=ma.length;r--;)delete wa[va][ma[r]];return wa()};ha[ba]=!0;var Ta,Ea,Da,Oa=Object.create||function(e,t){var n;return e===null?n=wa():(xa[va]=fa(e),n=new xa,xa[va]=null,n[ba]=e),t===void 0?n:pa.f(n,t)},ka=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Aa=ht,ja=re,Ma=ft,Na=ka,Pa=Ii(`IE_PROTO`),Fa=Object,Ia=Fa.prototype,La=Na?Fa.getPrototypeOf:function(e){var t=Ma(e);if(Aa(t,Pa))return t[Pa];var n=t.constructor;return ja(n)&&t instanceof n?n.prototype:t instanceof Fa?Ia:null},Ra=Pn,za=function(e,t,n,r){return r&&r.enumerable?e[t]=n:Ra(e,t,n),e},Ba=o,Va=re,Ha=Ce,Ua=Oa,Wa=La,Ga=za,Ka=kt(`iterator`),qa=!1;[].keys&&(`next`in(Da=[].keys())?(Ea=Wa(Wa(Da)))!==Object.prototype&&(Ta=Ea):qa=!0),Va((Ta=!Ha(Ta)||Ba((function(){var e={};return Ta[Ka].call(e)!==e}))?{}:Ua(Ta))[Ka])||Ga(Ta,Ka,(function(){return this}));var Ja={IteratorPrototype:Ta,BUGGY_SAFARI_ITERATORS:qa},Ya=vi,Xa=di?{}.toString:function(){return`[object `+Ya(this)+`]`},Za=di,Qa=hn.f,$a=Pn,eo=ht,to=Xa,no=kt(`toStringTag`),ro=function(e,t,n,r){if(e){var i=n?e:e.prototype;eo(i,no)||Qa(i,no,{configurable:!0,value:t}),r&&!Za&&$a(i,`toString`,to)}},io={},ao=Ja.IteratorPrototype,oo=Oa,so=le,co=ro,lo=io,uo=function(){return this},fo=_,po=Je,mo=re,ho=String,go=TypeError,_o=function(e,t,n){try{return fo(po(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},vo=bn,yo=function(e){if(typeof e==`object`||mo(e))return e;throw new go(`Can't set `+ho(e)+` as a prototype`)},bo=Object.setPrototypeOf||(`__proto__`in{}?function(){var e,t=!1,n={};try{(e=_o(Object.prototype,`__proto__`,`set`))(n,[]),t=n instanceof Array}catch{}return function(n,r){return vo(n),yo(r),t?e(n,r):n.__proto__=r,n}}():void 0),xo=L,So=ie,Co=na,wo=function(e,t,n,r){var i=t+` Iterator`;return e.prototype=oo(ao,{next:so(+!r,n)}),co(e,i,!1,!0),lo[i]=uo,e},To=La,Eo=ro,Do=za,Oo=io,ko=Ja,Ao=Co.PROPER,jo=ko.BUGGY_SAFARI_ITERATORS,Mo=kt(`iterator`),No=`keys`,Po=`values`,Fo=`entries`,Io=function(){return this},Lo=function(e,t,n,r,i,a,o){wo(n,t,r);var s,c,l,u=function(e){if(e===i&&h)return h;if(!jo&&e&&e in p)return p[e];switch(e){case No:case Po:case Fo:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+` Iterator`,f=!1,p=e.prototype,m=p[Mo]||p[`@@iterator`]||i&&p[i],h=!jo&&m||u(i),g=t===`Array`&&p.entries||m;if(g&&(s=To(g.call(new e)))!==Object.prototype&&s.next&&(Eo(s,d,!0,!0),Oo[d]=Io),Ao&&i===Po&&m&&m.name!==Po&&(f=!0,h=function(){return So(m,this)}),i)if(c={values:u(Po),keys:a?h:u(No),entries:u(Fo)},o)for(l in c)(jo||f||!(l in p))&&Do(p,l,c[l]);else xo({target:t,proto:!0,forced:jo||f},c);return o&&p[Mo]!==h&&Do(p,Mo,h,{name:i}),Oo[t]=h,c},Ro=function(e,t){return{value:e,done:t}},zo=Ai.charAt,Bo=xi,Vo=Xi,Ho=Lo,Uo=Ro,Wo=`String Iterator`,Go=Vo.set,Ko=Vo.getterFor(Wo);Ho(String,`String`,(function(e){Go(this,{type:Wo,string:Bo(e),index:0})}),(function(){var e,t=Ko(this),n=t.string,r=t.index;return r>=n.length?Uo(void 0,!0):(e=zo(n,r),t.index+=e.length,Uo(e,!1))}));var qo=ie,Jo=bn,Yo=Ze,Xo=function(e,t,n){var r,i;Jo(e);try{if(!(r=Yo(e,`return`))){if(t===`throw`)throw n;return n}r=qo(r,e)}catch(e){i=!0,r=e}if(t===`throw`)throw n;if(i)throw r;return Jo(r),n},Zo=bn,Qo=Xo,$o=io,es=kt(`iterator`),ts=Array.prototype,ns=function(e){return e!==void 0&&($o.Array===e||ts[es]===e)},rs=re,is=st,as=_(Function.toString);rs(is.inspectSource)||(is.inspectSource=function(e){return as(e)});var os=is.inspectSource,ss=_,cs=o,ls=re,us=vi,ds=os,fs=function(){},ps=[],ms=Ee(`Reflect`,`construct`),hs=/^\s*(?:class|function)\b/,gs=ss(hs.exec),_s=!hs.test(fs),vs=function(e){if(!ls(e))return!1;try{return ms(fs,ps,e),!0}catch{return!1}},ys=function(e){if(!ls(e))return!1;switch(us(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return _s||!!gs(hs,ds(e))}catch{return!0}};ys.sham=!0;var bs=!ms||cs((function(){var e;return vs(vs.call)||!vs(Object)||!vs((function(){e=!0}))||e}))?ys:vs,xs=zt,Ss=hn,Cs=le,ws=function(e,t,n){var r=xs(t);r in e?Ss.f(e,r,Cs(0,n)):e[r]=n},Ts=vi,Es=Ze,Ds=he,Os=io,ks=kt(`iterator`),As=function(e){if(!Ds(e))return Es(e,ks)||Es(e,`@@iterator`)||Os[Ts(e)]},js=ie,Ms=Je,Ns=bn,Ps=We,Fs=As,Is=TypeError,Ls=function(e,t){var n=arguments.length<2?Fs(e):t;if(Ms(n))return Ns(js(n,e));throw new Is(Ps(e)+` is not iterable`)},Rs=mn,zs=ie,Bs=ft,Vs=function(e,t,n,r){try{return r?t(Zo(n)[0],n[1]):t(n)}catch(t){Qo(e,`throw`,t)}},Hs=ns,Us=bs,Ws=nr,Gs=ws,Ks=Ls,qs=As,Js=Array,Ys=kt(`iterator`),Xs=!1;try{var Zs=0,Qs={next:function(){return{done:!!Zs++}},return:function(){Xs=!0}};Qs[Ys]=function(){return this},Array.from(Qs,(function(){throw 2}))}catch{}L({target:`Array`,stat:!0,forced:!function(e,t){try{if(!t&&!Xs)return!1}catch{return!1}var n=!1;try{var r={};r[Ys]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n}((function(e){Array.from(e)}))},{from:function(e){var t=Bs(e),n=Us(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=i!==void 0;a&&(i=Rs(i,r>2?arguments[2]:void 0));var o,s,c,l,u,d,f=qs(t),p=0;if(!f||this===Js&&Hs(f))for(o=Ws(t),s=n?new this(o):Js(o);o>p;p++)d=a?i(t[p],p):t[p],Gs(s,p,d);else for(u=(l=Ks(t,f)).next,s=n?new this:[];!(c=zs(u,l)).done;p++)d=a?Vs(l,i,[c.value,p],!0):c.value,Gs(s,p,d);return s.length=p,s}});var $s=j.Array.from,ec=r($s),tc=xe,nc=io,rc=Xi;hn.f;var ic=Lo,ac=Ro,oc=`Array Iterator`,sc=rc.set,cc=rc.getterFor(oc);ic(Array,`Array`,(function(e,t){sc(this,{type:oc,target:tc(e),index:0,kind:t})}),(function(){var e=cc(this),t=e.target,n=e.kind,r=e.index++;if(!t||r>=t.length)return e.target=void 0,ac(void 0,!0);switch(n){case`keys`:return ac(r,!1);case`values`:return ac(t[r],!1)}return ac([r,t[r]],!1)}),`values`),nc.Arguments=nc.Array;var lc=As,uc={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},dc=a,fc=vi,pc=Pn,mc=io,hc=kt(`toStringTag`);for(var gc in uc){var _c=dc[gc],vc=_c&&_c.prototype;vc&&fc(vc)!==hc&&pc(vc,hc,gc),mc[gc]=mc.Array}var yc=lc,bc=r(yc),xc=r(yc);function V(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var Sc={exports:{}},Cc=L,wc=E,Tc=hn.f;Cc({target:`Object`,stat:!0,forced:Object.defineProperty!==Tc,sham:!wc},{defineProperty:Tc});var Ec=j.Object,Dc=Sc.exports=function(e,t,n){return Ec.defineProperty(e,t,n)};Ec.defineProperty.sham&&(Dc.sham=!0);var Oc=Sc.exports,kc=r(Oc),Ac=x,jc=Array.isArray||function(e){return Ac(e)===`Array`},Mc=TypeError,Nc=function(e){if(e>9007199254740991)throw Mc(`Maximum allowed index exceeded`);return e},Pc=jc,Fc=bs,Ic=Ce,Lc=kt(`species`),Rc=Array,zc=function(e){var t;return Pc(e)&&(t=e.constructor,(Fc(t)&&(t===Rc||Pc(t.prototype))||Ic(t)&&(t=t[Lc])===null)&&(t=void 0)),t===void 0?Rc:t},Bc=function(e,t){return new(zc(e))(t===0?0:t)},Vc=o,Hc=Me,Uc=kt(`species`),Wc=function(e){return Hc>=51||!Vc((function(){var t=[];return(t.constructor={})[Uc]=function(){return{foo:1}},t[e](Boolean).foo!==1}))},Gc=L,Kc=o,qc=jc,Jc=Ce,Yc=ft,Xc=nr,Zc=Nc,Qc=ws,$c=Bc,el=Wc,tl=Me,nl=kt(`isConcatSpreadable`),rl=tl>=51||!Kc((function(){var e=[];return e[nl]=!1,e.concat()[0]!==e})),il=function(e){if(!Jc(e))return!1;var t=e[nl];return t===void 0?qc(e):!!t};Gc({target:`Array`,proto:!0,arity:1,forced:!rl||!el(`concat`)},{concat:function(e){var t,n,r,i,a,o=Yc(this),s=$c(o,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(il(a=t===-1?o:arguments[t]))for(i=Xc(a),Zc(c+i),n=0;n<i;n++,c++)n in a&&Qc(s,c,a[n]);else Zc(c+1),Qc(s,c++,a);return s.length=c,s}});var al={},ol=pr,sl=mr.concat(`length`,`prototype`);al.f=Object.getOwnPropertyNames||function(e){return ol(e,sl)};var cl={},ll=Qn,ul=nr,dl=ws,fl=Array,pl=Math.max,ml=function(e,t,n){for(var r=ul(e),i=ll(t,r),a=ll(n===void 0?r:n,r),o=fl(pl(a-i,0)),s=0;i<a;i++,s++)dl(o,s,e[i]);return o.length=s,o},hl=x,gl=xe,_l=al.f,vl=ml,yl=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];cl.f=function(e){return yl&&hl(e)===`Window`?function(e){try{return _l(e)}catch{return vl(yl)}}(e):_l(gl(e))};var bl=hn,xl=function(e,t,n){return bl.f(e,t,n)},Sl={};Sl.f=kt;var Cl=j,wl=ht,Tl=Sl,El=hn.f,Dl=function(e){var t=Cl.Symbol||={};wl(t,e)||El(t,e,{value:Tl.f(e)})},Ol=ie,kl=Ee,Al=kt,jl=za,Ml=function(){var e=kl(`Symbol`),t=e&&e.prototype,n=t&&t.valueOf,r=Al(`toPrimitive`);t&&!t[r]&&jl(t,r,(function(e){return Ol(n,this)}),{arity:1})},Nl=mn,Pl=me,Fl=ft,Il=nr,Ll=Bc,Rl=_([].push),zl=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(c,l,u,d){for(var f,p,m=Fl(c),h=Pl(m),g=Nl(l,u),_=Il(h),v=0,y=d||Ll,b=t?y(c,_):n||o?y(c,0):void 0;_>v;v++)if((s||v in h)&&(p=g(f=h[v],v,m),e))if(t)b[v]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:Rl(b,f)}else switch(e){case 4:return!1;case 7:Rl(b,f)}return a?-1:r||i?i:b}},Bl={forEach:zl(0),map:zl(1),filter:zl(2),some:zl(3),every:zl(4),find:zl(5),findIndex:zl(6),filterReject:zl(7)},Vl=L,Hl=a,Ul=ie,Wl=_,Gl=E,Kl=Ie,ql=o,Jl=ht,Yl=P,Xl=bn,Zl=xe,Ql=zt,$l=xi,eu=le,tu=Oa,nu=_r,ru=al,iu=cl,au=vr,ou=T,su=hn,cu=ra,lu=ae,uu=za,du=xl,fu=lt,pu=sr,mu=bt,hu=kt,gu=Sl,_u=Dl,vu=Ml,yu=ro,bu=Xi,xu=Bl.forEach,Su=Ii(`hidden`),Cu=`Symbol`,wu=`prototype`,Tu=bu.set,Eu=bu.getterFor(Cu),Du=Object[wu],Ou=Hl.Symbol,ku=Ou&&Ou[wu],Au=Hl.RangeError,ju=Hl.TypeError,Mu=Hl.QObject,Nu=ou.f,Pu=su.f,Fu=iu.f,Iu=lu.f,Lu=Wl([].push),Ru=fu(`symbols`),zu=fu(`op-symbols`),Bu=fu(`wks`),Vu=!Mu||!Mu[wu]||!Mu[wu].findChild,Hu=function(e,t,n){var r=Nu(Du,t);r&&delete Du[t],Pu(e,t,n),r&&e!==Du&&Pu(Du,t,r)},Uu=Gl&&ql((function(){return tu(Pu({},`a`,{get:function(){return Pu(this,`a`,{value:7}).a}})).a!==7}))?Hu:Pu,Wu=function(e,t){var n=Ru[e]=tu(ku);return Tu(n,{type:Cu,tag:e,description:t}),Gl||(n.description=t),n},Gu=function(e,t,n){e===Du&&Gu(zu,t,n),Xl(e);var r=Ql(t);return Xl(n),Jl(Ru,r)?(n.enumerable?(Jl(e,Su)&&e[Su][r]&&(e[Su][r]=!1),n=tu(n,{enumerable:eu(0,!1)})):(Jl(e,Su)||Pu(e,Su,eu(1,{})),e[Su][r]=!0),Uu(e,r,n)):Pu(e,r,n)},Ku=function(e,t){Xl(e);var n=Zl(t);return xu(nu(n).concat(Xu(n)),(function(t){Gl&&!Ul(qu,n,t)||Gu(e,t,n[t])})),e},qu=function(e){var t=Ql(e),n=Ul(Iu,this,t);return!(this===Du&&Jl(Ru,t)&&!Jl(zu,t))&&(!(n||!Jl(this,t)||!Jl(Ru,t)||Jl(this,Su)&&this[Su][t])||n)},Ju=function(e,t){var n=Zl(e),r=Ql(t);if(n!==Du||!Jl(Ru,r)||Jl(zu,r)){var i=Nu(n,r);return!i||!Jl(Ru,r)||Jl(n,Su)&&n[Su][r]||(i.enumerable=!0),i}},Yu=function(e){var t=Fu(Zl(e)),n=[];return xu(t,(function(e){Jl(Ru,e)||Jl(pu,e)||Lu(n,e)})),n},Xu=function(e){var t=e===Du,n=Fu(t?zu:Zl(e)),r=[];return xu(n,(function(e){!Jl(Ru,e)||t&&!Jl(Du,e)||Lu(r,Ru[e])})),r};Kl||(Ou=function(){if(Yl(ku,this))throw new ju(`Symbol is not a constructor`);var e=arguments.length&&arguments[0]!==void 0?$l(arguments[0]):void 0,t=mu(e),n=function(e){this===Du&&Ul(n,zu,e),Jl(this,Su)&&Jl(this[Su],t)&&(this[Su][t]=!1);var r=eu(1,e);try{Uu(this,t,r)}catch(e){if(!(e instanceof Au))throw e;Hu(this,t,r)}};return Gl&&Vu&&Uu(Du,t,{configurable:!0,set:n}),Wu(t,e)},uu(ku=Ou[wu],`toString`,(function(){return Eu(this).tag})),uu(Ou,`withoutSetter`,(function(e){return Wu(mu(e),e)})),lu.f=qu,su.f=Gu,cu.f=Ku,ou.f=Ju,ru.f=iu.f=Yu,au.f=Xu,gu.f=function(e){return Wu(hu(e),e)},Gl&&du(ku,`description`,{configurable:!0,get:function(){return Eu(this).description}})),Vl({global:!0,constructor:!0,wrap:!0,forced:!Kl,sham:!Kl},{Symbol:Ou}),xu(nu(Bu),(function(e){_u(e)})),Vl({target:Cu,stat:!0,forced:!Kl},{useSetter:function(){Vu=!0},useSimple:function(){Vu=!1}}),Vl({target:`Object`,stat:!0,forced:!Kl,sham:!Gl},{create:function(e,t){return t===void 0?tu(e):Ku(tu(e),t)},defineProperty:Gu,defineProperties:Ku,getOwnPropertyDescriptor:Ju}),Vl({target:`Object`,stat:!0,forced:!Kl},{getOwnPropertyNames:Yu}),vu(),yu(Ou,Cu),pu[Su]=!0;var Zu=Ie&&!!Symbol.for&&!!Symbol.keyFor,Qu=L,$u=Ee,ed=ht,td=xi,nd=lt,rd=Zu,id=nd(`string-to-symbol-registry`),ad=nd(`symbol-to-string-registry`);Qu({target:`Symbol`,stat:!0,forced:!rd},{for:function(e){var t=td(e);if(ed(id,t))return id[t];var n=$u(`Symbol`)(t);return id[t]=n,ad[n]=t,n}});var od=L,sd=ht,cd=He,ld=We,ud=Zu,dd=lt(`symbol-to-string-registry`);od({target:`Symbol`,stat:!0,forced:!ud},{keyFor:function(e){if(!cd(e))throw TypeError(ld(e)+` is not a symbol`);if(sd(dd,e))return dd[e]}});var fd=jc,pd=re,md=x,hd=xi,gd=_([].push),_d=L,vd=Ee,yd=f,bd=ie,xd=_,Sd=o,Cd=re,wd=He,Td=Nr,Ed=function(e){if(pd(e))return e;if(fd(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i==`string`?gd(n,i):typeof i!=`number`&&md(i)!==`Number`&&md(i)!==`String`||gd(n,hd(i))}var a=n.length,o=!0;return function(e,t){if(o)return o=!1,t;if(fd(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},Dd=Ie,Od=String,kd=vd(`JSON`,`stringify`),Ad=xd(/./.exec),jd=xd(``.charAt),Md=xd(``.charCodeAt),Nd=xd(``.replace),Pd=xd(1 .toString),Fd=/[\uD800-\uDFFF]/g,Id=/^[\uD800-\uDBFF]$/,Ld=/^[\uDC00-\uDFFF]$/,Rd=!Dd||Sd((function(){var e=vd(`Symbol`)(`stringify detection`);return kd([e])!==`[null]`||kd({a:e})!==`{}`||kd(Object(e))!==`{}`})),zd=Sd((function(){return kd(`\udf06\ud834`)!==`"\\udf06\\ud834"`||kd(`\udead`)!==`"\\udead"`})),Bd=function(e,t){var n=Td(arguments),r=Ed(t);if(Cd(r)||e!==void 0&&!wd(e))return n[1]=function(e,t){if(Cd(r)&&(t=bd(r,this,Od(e),t)),!wd(t))return t},yd(kd,null,n)},Vd=function(e,t,n){var r=jd(n,t-1),i=jd(n,t+1);return Ad(Id,e)&&!Ad(Ld,i)||Ad(Ld,e)&&!Ad(Id,r)?`\\u`+Pd(Md(e,0),16):e};kd&&_d({target:`JSON`,stat:!0,arity:3,forced:Rd||zd},{stringify:function(e,t,n){var r=Td(arguments),i=yd(Rd?Bd:kd,null,r);return zd&&typeof i==`string`?Nd(i,Fd,Vd):i}});var Hd=vr,Ud=ft;L({target:`Object`,stat:!0,forced:!Ie||o((function(){Hd.f(1)}))},{getOwnPropertySymbols:function(e){var t=Hd.f;return t?t(Ud(e)):[]}}),Dl(`asyncIterator`),Dl(`hasInstance`),Dl(`isConcatSpreadable`),Dl(`iterator`),Dl(`match`),Dl(`matchAll`),Dl(`replace`),Dl(`search`),Dl(`species`),Dl(`split`);var Wd=Ml;Dl(`toPrimitive`),Wd();var Gd=Ee,Kd=ro;Dl(`toStringTag`),Kd(Gd(`Symbol`),`Symbol`),Dl(`unscopables`),ro(a.JSON,`JSON`,!0);var qd=j.Symbol,Jd=kt,Yd=hn.f,Xd=Jd(`metadata`),Zd=Function.prototype;Zd[Xd]===void 0&&Yd(Zd,Xd,{value:null}),Dl(`asyncDispose`),Dl(`dispose`),Dl(`metadata`);var Qd=qd,$d=_,ef=Ee(`Symbol`),tf=ef.keyFor,nf=$d(ef.prototype.valueOf),rf=ef.isRegisteredSymbol||function(e){try{return tf(nf(e))!==void 0}catch{return!1}};L({target:`Symbol`,stat:!0},{isRegisteredSymbol:rf});for(var af=lt,of=Ee,sf=_,cf=He,lf=kt,uf=of(`Symbol`),df=uf.isWellKnownSymbol,ff=of(`Object`,`getOwnPropertyNames`),pf=sf(uf.prototype.valueOf),mf=af(`wks`),hf=0,gf=ff(uf),_f=gf.length;hf<_f;hf++)try{var vf=gf[hf];cf(uf[vf])&&lf(vf)}catch{}var yf=function(e){if(df&&df(e))return!0;try{for(var t=pf(e),n=0,r=ff(mf),i=r.length;n<i;n++)if(mf[r[n]]==t)return!0}catch{}return!1};L({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:yf}),Dl(`matcher`),Dl(`observable`),L({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:rf}),L({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:yf}),Dl(`metadataKey`),Dl(`patternMatch`),Dl(`replaceAll`);var bf=r(Qd),xf=r(Sl.f(`iterator`));function Sf(e){return Sf=typeof bf==`function`&&typeof xf==`symbol`?function(e){return typeof e}:function(e){return e&&typeof bf==`function`&&e.constructor===bf&&e!==bf.prototype?`symbol`:typeof e},Sf(e)}var Cf=r(Sl.f(`toPrimitive`));function wf(e){var t=function(e,t){if(Sf(e)!==`object`||e===null)return e;var n=e[Cf];if(n!==void 0){var r=n.call(e,t||`default`);if(Sf(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return Sf(t)===`symbol`?t:String(t)}function Tf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),kc(e,wf(r.key),r)}}function H(e,t,n){return t&&Tf(e.prototype,t),n&&Tf(e,n),kc(e,`prototype`,{writable:!1}),e}L({target:`Array`,stat:!0},{isArray:jc});var Ef=j.Array.isArray,Df=r(Ef),Of=E,kf=jc,Af=TypeError,jf=Object.getOwnPropertyDescriptor,Mf=Of&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(kf(e)&&!jf(e,`length`).writable)throw new Af(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t},Nf=ft,Pf=nr,Ff=Mf,If=Nc;L({target:`Array`,proto:!0,arity:1,forced:o((function(){return[].push.call({length:4294967296},1)!==4294967297}))||!function(){try{Object.defineProperty([],`length`,{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=Nf(this),n=Pf(t),r=arguments.length;If(n+r);for(var i=0;i<r;i++)t[n]=arguments[i],n++;return Ff(t,n),n}});var Lf=qr(`Array`).push,Rf=P,zf=Lf,Bf=Array.prototype,Vf=r(function(e){var t=e.push;return e===Bf||Rf(Bf,e)&&t===Bf.push?zf:t}),Hf=L,Uf=jc,Wf=bs,Gf=Ce,Kf=Qn,qf=nr,Jf=xe,Yf=ws,Xf=kt,Zf=Nr,Qf=Wc(`slice`),$f=Xf(`species`),ep=Array,tp=Math.max;Hf({target:`Array`,proto:!0,forced:!Qf},{slice:function(e,t){var n,r,i,a=Jf(this),o=qf(a),s=Kf(e,o),c=Kf(t===void 0?o:t,o);if(Uf(a)&&(n=a.constructor,(Wf(n)&&(n===ep||Uf(n.prototype))||Gf(n)&&(n=n[$f])===null)&&(n=void 0),n===ep||n===void 0))return Zf(a,s,c);for(r=new(n===void 0?ep:n)(tp(c-s,0)),i=0;s<c;s++,i++)s in a&&Yf(r,i,a[s]);return r.length=i,r}});var np=qr(`Array`).slice,rp=P,ip=np,ap=Array.prototype,op=function(e){var t=e.slice;return e===ap||rp(ap,e)&&t===ap.slice?ip:t},sp=r(op),cp=r($s);function lp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function up(e,t){var n;if(e){if(typeof e==`string`)return lp(e,t);var r=sp(n=Object.prototype.toString.call(e)).call(n,8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?cp(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?lp(e,t):void 0}}function dp(e,t){return function(e){if(Df(e))return e}(e)||function(e,t){var n=e==null?null:bf!==void 0&&bc(e)||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(Vf(s).call(s,r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||up(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
10
10
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function fp(e){return function(e){if(Df(e))return lp(e)}(e)||function(e){if(bf!==void 0&&bc(e)!=null||e[`@@iterator`]!=null)return cp(e)}(e)||up(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
11
11
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var pp=r(qd),mp=qr(`Array`).concat,hp=P,gp=mp,_p=Array.prototype,vp=r(function(e){var t=e.concat;return e===_p||hp(_p,e)&&t===_p.concat?gp:t}),yp=r(op),bp=Ee,xp=al,Sp=vr,Cp=bn,wp=_([].concat),Tp=bp(`Reflect`,`ownKeys`)||function(e){var t=xp.f(Cp(e)),n=Sp.f;return n?wp(t,n(e)):t},Ep=r(Ef),Dp=Bl.map;L({target:`Array`,proto:!0,forced:!Wc(`map`)},{map:function(e){return Dp(this,e,arguments.length>1?arguments[1]:void 0)}});var Op=qr(`Array`).map,kp=P,Ap=Op,jp=Array.prototype,Mp=r(function(e){var t=e.map;return e===jp||kp(jp,e)&&t===jp.map?Ap:t}),Np=ft,Pp=_r;L({target:`Object`,stat:!0,forced:o((function(){Pp(1)}))},{keys:function(e){return Pp(Np(e))}});var Fp=r(j.Object.keys),Ip=L,Lp=Date,Rp=_(Lp.prototype.getTime);Ip({target:`Date`,stat:!0},{now:function(){return Rp(new Lp)}});var zp=r(j.Date.now),Bp=o,Vp=function(e,t){var n=[][e];return!!n&&Bp((function(){n.call(null,t||function(){return 1},1)}))},Hp=Bl.forEach,Up=Vp(`forEach`)?[].forEach:function(e){return Hp(this,e,arguments.length>1?arguments[1]:void 0)};L({target:`Array`,proto:!0,forced:[].forEach!==Up},{forEach:Up});var Wp=qr(`Array`).forEach,Gp=vi,Kp=ht,qp=P,Jp=Wp,Yp=Array.prototype,Xp={DOMTokenList:!0,NodeList:!0},Zp=r(function(e){var t=e.forEach;return e===Yp||qp(Yp,e)&&t===Yp.forEach||Kp(Xp,Gp(e))?Jp:t}),Qp=L,$p=jc,em=_([].reverse),tm=[1,2];Qp({target:`Array`,proto:!0,forced:String(tm)===String(tm.reverse())},{reverse:function(){return $p(this)&&(this.length=this.length),em(this)}});var nm=qr(`Array`).reverse,rm=P,im=nm,am=Array.prototype,om=r(function(e){var t=e.reverse;return e===am||rm(am,e)&&t===am.reverse?im:t}),sm=We,cm=TypeError,lm=function(e,t){if(!delete e[t])throw new cm(`Cannot delete property `+sm(t)+` of `+sm(e))},um=L,dm=ft,fm=Qn,pm=Jn,mm=nr,hm=Mf,gm=Nc,_m=Bc,vm=ws,ym=lm,bm=Wc(`splice`),xm=Math.max,Sm=Math.min;um({target:`Array`,proto:!0,forced:!bm},{splice:function(e,t){var n,r,i,a,o,s,c=dm(this),l=mm(c),u=fm(e,l),d=arguments.length;for(d===0?n=r=0:d===1?(n=0,r=l-u):(n=d-2,r=Sm(xm(pm(t),0),l-u)),gm(l+n-r),i=_m(c,r),a=0;a<r;a++)(o=u+a)in c&&vm(i,a,c[o]);if(i.length=r,n<r){for(a=u;a<l-r;a++)s=a+n,(o=a+r)in c?c[s]=c[o]:ym(c,s);for(a=l;a>l-r+n;a--)ym(c,a-1)}else if(n>r)for(a=l-r;a>u;a--)s=a+n-1,(o=a+r-1)in c?c[s]=c[o]:ym(c,s);for(a=0;a<n;a++)c[a+u]=arguments[a+2];return hm(c,l-r+n),i}});var Cm=qr(`Array`).splice,wm=P,Tm=Cm,Em=Array.prototype,Dm=r(function(e){var t=e.splice;return e===Em||wm(Em,e)&&t===Em.splice?Tm:t}),Om=z.includes;L({target:`Array`,proto:!0,forced:o((function(){return![,].includes()}))},{includes:function(e){return Om(this,e,arguments.length>1?arguments[1]:void 0)}});var km=qr(`Array`).includes,Am=Ce,jm=x,Mm=kt(`match`),Nm=function(e){var t;return Am(e)&&((t=e[Mm])===void 0?jm(e)===`RegExp`:!!t)},Pm=TypeError,Fm=kt(`match`),Im=L,Lm=function(e){if(Nm(e))throw new Pm(`The method doesn't accept regular expressions`);return e},Rm=ve,zm=xi,Bm=function(e){var t=/./;try{`/./`[e](t)}catch{try{return t[Fm]=!1,`/./`[e](t)}catch{}}return!1},Vm=_(``.indexOf);Im({target:`String`,proto:!0,forced:!Bm(`includes`)},{includes:function(e){return!!~Vm(zm(Rm(this)),zm(Lm(e)),arguments.length>1?arguments[1]:void 0)}});var Hm=qr(`String`).includes,Um=P,Wm=km,Gm=Hm,Km=Array.prototype,qm=String.prototype,Jm=r(function(e){var t=e.includes;return e===Km||Um(Km,e)&&t===Km.includes?Wm:typeof e==`string`||e===qm||Um(qm,e)&&t===qm.includes?Gm:t}),Ym=ft,Xm=La,Zm=ka;L({target:`Object`,stat:!0,forced:o((function(){Xm(1)})),sham:!Zm},{getPrototypeOf:function(e){return Xm(Ym(e))}});var Qm=j.Object.getPrototypeOf,$m=r(Qm),eh=Bl.filter;L({target:`Array`,proto:!0,forced:!Wc(`filter`)},{filter:function(e){return eh(this,e,arguments.length>1?arguments[1]:void 0)}});var th=qr(`Array`).filter,nh=P,rh=th,ih=Array.prototype,ah=r(function(e){var t=e.filter;return e===ih||nh(ih,e)&&t===ih.filter?rh:t}),oh=`
12
12
  \v\f\r \xA0               \u2028\u2029`,sh=ve,ch=xi,lh=oh,uh=_(``.replace),dh=RegExp(`^[`+lh+`]+`),fh=RegExp(`(^|[^`+lh+`])[`+lh+`]+$`),ph=function(e){return function(t){var n=ch(sh(t));return 1&e&&(n=uh(n,dh,``)),2&e&&(n=uh(n,fh,`$1`)),n}},mh={start:ph(1),end:ph(2),trim:ph(3)},hh=a,gh=o,_h=_,vh=xi,yh=mh.trim,bh=oh,xh=hh.parseInt,Sh=hh.Symbol,Ch=Sh&&Sh.iterator,wh=/^[+-]?0x/i,Th=_h(wh.exec),Eh=xh(bh+`08`)!==8||xh(bh+`0x16`)!==22||Ch&&!gh((function(){xh(Object(Ch))}))?function(e,t){var n=yh(vh(e));return xh(n,t>>>0||(Th(wh,n)?16:10))}:xh;L({global:!0,forced:parseInt!==Eh},{parseInt:Eh});var Dh=r(j.parseInt),Oh=L,kh=z.indexOf,Ah=Vp,jh=C([].indexOf),Mh=!!jh&&1/jh([1],1,-0)<0;Oh({target:`Array`,proto:!0,forced:Mh||!Ah(`indexOf`)},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return Mh?jh(this,e,t)||0:kh(this,e,t)}});var Nh=qr(`Array`).indexOf,Ph=P,Fh=Nh,Ih=Array.prototype,Lh=r(function(e){var t=e.indexOf;return e===Ih||Ph(Ih,e)&&t===Ih.indexOf?Fh:t});L({target:`Object`,stat:!0,sham:!E},{create:Oa});var Rh=j.Object,zh=function(e,t){return Rh.create(e,t)},Bh=r(zh),Vh=j,Hh=f;Vh.JSON||={stringify:JSON.stringify};var Uh=r(function(e,t,n){return Hh(Vh.JSON.stringify,null,arguments)}),Wh=typeof Bun==`function`&&Bun&&typeof Bun.version==`string`,Gh=TypeError,Kh=a,qh=f,Jh=re,Yh=Wh,Xh=F,Zh=Nr,Qh=function(e,t){if(e<t)throw new Gh(`Not enough arguments`);return e},$h=Kh.Function,eg=/MSIE .\./.test(Xh)||Yh&&function(){var e=Kh.Bun.version.split(`.`);return e.length<3||e[0]===`0`&&(e[1]<3||e[1]===`3`&&e[2]===`0`)}(),tg=function(e,t){var n=t?2:1;return eg?function(r,i){var a=Qh(arguments.length,1)>n,o=Jh(r)?r:$h(r),s=a?Zh(arguments,n):[],c=a?function(){qh(o,this,s)}:o;return t?e(c,i):e(c)}:e},ng=L,rg=a,ig=tg(rg.setInterval,!0);ng({global:!0,bind:!0,forced:rg.setInterval!==ig},{setInterval:ig});var ag=L,og=a,sg=tg(og.setTimeout,!0);ag({global:!0,bind:!0,forced:og.setTimeout!==sg},{setTimeout:sg});var cg=r(j.setTimeout),lg=ft,ug=Qn,dg=nr;L({target:`Array`,proto:!0},{fill:function(e){for(var t=lg(this),n=dg(t),r=arguments.length,i=ug(r>1?arguments[1]:void 0,n),a=r>2?arguments[2]:void 0,o=a===void 0?n:ug(a,n);o>i;)t[i++]=e;return t}});var fg,pg=qr(`Array`).fill,mg=P,hg=pg,gg=Array.prototype,_g=r(function(e){var t=e.fill;return e===gg||mg(gg,e)&&t===gg.fill?hg:t});function vg(){return vg=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vg.apply(this,arguments)}function yg(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function bg(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}fg=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t};var xg,Sg=fg,Cg=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],wg=typeof document>`u`?{style:{}}:document.createElement(`div`),Tg=Math.round,Eg=Math.abs,Dg=Date.now;function Og(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<Cg.length;){if((r=(n=Cg[a])?n+i:t)in e)return r;a++}}xg=typeof window>`u`?{}:window;var kg=Og(wg.style,`touchAction`),Ag=kg!==void 0,jg=`compute`,Mg=`auto`,Ng=`manipulation`,Pg=`none`,Fg=`pan-x`,Ig=`pan-y`,Lg=function(){if(!Ag)return!1;var e={},t=xg.CSS&&xg.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach((function(n){return e[n]=!t||xg.CSS.supports(`touch-action`,n)})),e}(),Rg=`ontouchstart`in xg,zg=Og(xg,`PointerEvent`)!==void 0,Bg=Rg&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Vg=`touch`,Hg=`mouse`,Ug=25,Wg=1,Gg=4,Kg=8,qg=1,Jg=2,Yg=4,Xg=8,Zg=16,Qg=Jg|Yg,$g=Xg|Zg,e_=Qg|$g,t_=[`x`,`y`],n_=[`clientX`,`clientY`];function r_(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function i_(e,t){return typeof e==`function`?e.apply(t&&t[0]||void 0,t):e}function a_(e,t){return e.indexOf(t)>-1}var o_=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===jg&&(e=this.compute()),Ag&&this.manager.element.style&&Lg[e]&&(this.manager.element.style[kg]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return r_(this.manager.recognizers,(function(t){i_(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(a_(e,Pg))return Pg;var t=a_(e,Fg),n=a_(e,Ig);return t&&n?Pg:t||n?t?Fg:Ig:a_(e,Ng)?Ng:Mg}(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=a_(r,Pg)&&!Lg[Pg],a=a_(r,Ig)&&!Lg[Ig],o=a_(r,Fg)&&!Lg[Fg];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!o||!a)return i||a&&n&Qg||o&&n&$g?this.preventSrc(t):void 0}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function s_(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function c_(e){var t=e.length;if(t===1)return{x:Tg(e[0].clientX),y:Tg(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:Tg(n/t),y:Tg(r/t)}}function l_(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:Tg(e.pointers[n].clientX),clientY:Tg(e.pointers[n].clientY)},n++;return{timeStamp:Dg(),pointers:t,center:c_(t),deltaX:e.deltaX,deltaY:e.deltaY}}function u_(e,t,n){n||=t_;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function d_(e,t,n){n||=t_;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}function f_(e,t){return e===t?qg:Eg(e)>=Eg(t)?e<0?Jg:Yg:t<0?Xg:Zg}function p_(e,t,n){return{x:t/e||0,y:n/e||0}}function m_(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=l_(t),i>1&&!n.firstMultiple?n.firstMultiple=l_(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=c_(r);t.timeStamp=Dg(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=d_(s,c),t.distance=u_(s,c),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};t.eventType!==Wg&&a.eventType!==Gg||(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=f_(t.deltaX,t.deltaY);var l,u,d=p_(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=d.x,t.overallVelocityY=d.y,t.overallVelocity=Eg(d.x)>Eg(d.y)?d.x:d.y,t.scale=o?(l=o.pointers,u_((u=r)[0],u[1],n_)/u_(l[0],l[1],n_)):1,t.rotation=o?function(e,t){return d_(t[1],t[0],n_)+d_(e[1],e[0],n_)}(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,i,a,o=e.lastInterval||t,s=t.timeStamp-o.timeStamp;if(t.eventType!==Kg&&(s>Ug||o.velocity===void 0)){var c=t.deltaX-o.deltaX,l=t.deltaY-o.deltaY,u=p_(s,c,l);r=u.x,i=u.y,n=Eg(u.x)>Eg(u.y)?u.x:u.y,a=f_(c,l),e.lastInterval=t}else n=o.velocity,r=o.velocityX,i=o.velocityY,a=o.direction;t.velocity=n,t.velocityX=r,t.velocityY=i,t.direction=a}(n,t);var f,p=e.element,m=t.srcEvent;s_(f=m.composedPath?m.composedPath()[0]:m.path?m.path[0]:m.target,p)&&(p=f),t.target=p}function h_(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&Wg&&r-i==0,o=t&(Gg|Kg)&&r-i==0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,m_(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function g_(e){return e.trim().split(/\s+/g)}function __(e,t,n){r_(g_(t),(function(t){e.addEventListener(t,n,!1)}))}function v_(e,t,n){r_(g_(t),(function(t){e.removeEventListener(t,n,!1)}))}function y_(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var b_=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){i_(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&__(this.element,this.evEl,this.domHandler),this.evTarget&&__(this.target,this.evTarget,this.domHandler),this.evWin&&__(y_(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&v_(this.element,this.evEl,this.domHandler),this.evTarget&&v_(this.target,this.evTarget,this.domHandler),this.evWin&&v_(y_(this.element),this.evWin,this.domHandler)},e}();function x_(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var S_={pointerdown:Wg,pointermove:2,pointerup:Gg,pointercancel:Kg,pointerout:Kg},C_={2:Vg,3:`pen`,4:Hg,5:`kinect`},w_=`pointerdown`,T_=`pointermove pointerup pointercancel`;xg.MSPointerEvent&&!xg.PointerEvent&&(w_=`MSPointerDown`,T_=`MSPointerMove MSPointerUp MSPointerCancel`);var E_=function(e){function t(){var n,r=t.prototype;return r.evEl=w_,r.evWin=T_,(n=e.apply(this,arguments)||this).store=n.manager.session.pointerEvents=[],n}return yg(t,e),t.prototype.handler=function(e){var t=this.store,n=!1,r=S_[e.type.toLowerCase().replace(`ms`,``)],i=C_[e.pointerType]||e.pointerType,a=i===Vg,o=x_(t,e.pointerId,`pointerId`);r&Wg&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(Gg|Kg)&&(n=!0),o<0||(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))},t}(b_);function D_(e){return Array.prototype.slice.call(e,0)}function O_(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];x_(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort((function(e,n){return e[t]>n[t]})):r.sort()),r}var k_={touchstart:Wg,touchmove:2,touchend:Gg,touchcancel:Kg},A_=function(e){function t(){var n;return t.prototype.evTarget=`touchstart touchmove touchend touchcancel`,(n=e.apply(this,arguments)||this).targetIds={},n}return yg(t,e),t.prototype.handler=function(e){var t=k_[e.type],n=j_.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Vg,srcEvent:e})},t}(b_);function j_(e,t){var n,r,i=D_(e.touches),a=this.targetIds;if(t&(2|Wg)&&i.length===1)return a[i[0].identifier]=!0,[i,i];var o=D_(e.changedTouches),s=[],c=this.target;if(r=i.filter((function(e){return s_(e.target,c)})),t===Wg)for(n=0;n<r.length;)a[r[n].identifier]=!0,n++;for(n=0;n<o.length;)a[o[n].identifier]&&s.push(o[n]),t&(Gg|Kg)&&delete a[o[n].identifier],n++;return s.length?[O_(r.concat(s),`identifier`,!0),s]:void 0}var M_={mousedown:Wg,mousemove:2,mouseup:Gg},N_=function(e){function t(){var n,r=t.prototype;return r.evEl=`mousedown`,r.evWin=`mousemove mouseup`,(n=e.apply(this,arguments)||this).pressed=!1,n}return yg(t,e),t.prototype.handler=function(e){var t=M_[e.type];t&Wg&&e.button===0&&(this.pressed=!0),2&t&&e.which!==1&&(t=Gg),this.pressed&&(t&Gg&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:Hg,srcEvent:e}))},t}(b_),P_=2500;function F_(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout((function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)}),P_)}}function I_(e,t){e&Wg?(this.primaryTouch=t.changedPointers[0].identifier,F_.call(this,t)):e&(Gg|Kg)&&F_.call(this,t)}function L_(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=25&&o<=25)return!0}return!1}var R_=function(){return function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handler=function(e,t,n){var i=n.pointerType===Vg,a=n.pointerType===Hg;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)I_.call(bg(bg(r)),t,n);else if(a&&L_.call(bg(bg(r)),n))return;r.callback(e,t,n)}},r.touch=new A_(r.manager,r.handler),r.mouse=new N_(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}return yg(t,e),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(b_)}();function z_(e,t,n){return!!Array.isArray(e)&&(r_(e,n[t],n),!0)}var B_=32,V_=1;function H_(e,t){var n=t.manager;return n?n.get(e):e}function U_(e){return 16&e?`cancel`:8&e?`end`:4&e?`move`:2&e?`start`:``}var W_=function(){function e(e){e===void 0&&(e={}),this.options=vg({enable:!0},e),this.id=V_++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return Sg(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(z_(e,`recognizeWith`,this))return this;var t=this.simultaneous;return t[(e=H_(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return z_(e,`dropRecognizeWith`,this)||(e=H_(e,this),delete this.simultaneous[e.id]),this},t.requireFailure=function(e){if(z_(e,`requireFailure`,this))return this;var t=this.requireFail;return x_(t,e=H_(e,this))===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(z_(e,`dropRequireFailure`,this))return this;e=H_(e,this);var t=x_(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+U_(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+U_(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=B_},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},t.recognize=function(e){var t=Sg({},e);if(!i_(this.options.enable,[this,t]))return this.reset(),void(this.state=B_);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),G_=function(e){function t(t){var n;return t===void 0&&(t={}),(n=e.call(this,vg({event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this).pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}yg(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Ng]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime<n.time;if(this.reset(),e.eventType&Wg&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==Gg)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<n.interval,s=!this.pCenter||u_(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,s&&o?this.count+=1:this.count=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.interval),2):8}return B_},n.failTimeout=function(){var e=this;return this._timer=setTimeout((function(){e.state=B_}),this.options.interval),B_},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===8&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(W_),K_=function(e){function t(t){return t===void 0&&(t={}),e.call(this,vg({pointers:1},t))||this}yg(t,e);var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=6&t,i=this.attrTest(e);return r&&(n&Kg||!i)?16|t:r||i?n&Gg?8|t:2&t?4|t:2:B_},t}(W_);function q_(e){return e===Zg?`down`:e===Xg?`up`:e===Jg?`left`:e===Yg?`right`:``}var J_=function(e){function t(t){var n;return t===void 0&&(t={}),(n=e.call(this,vg({event:`pan`,threshold:10,pointers:1,direction:e_},t))||this).pX=null,n.pY=null,n}yg(t,e);var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&Qg&&t.push(Ig),e&$g&&t.push(Fg),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&Qg?(i=a===0?qg:a<0?Jg:Yg,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?qg:o<0?Xg:Zg,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return K_.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=q_(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(K_),Y_=function(e){function t(t){return t===void 0&&(t={}),e.call(this,vg({event:`swipe`,threshold:10,velocity:.3,direction:Qg|$g,pointers:1},t))||this}yg(t,e);var n=t.prototype;return n.getTouchAction=function(){return J_.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n,r=this.options.direction;return r&(Qg|$g)?n=t.overallVelocity:r&Qg?n=t.overallVelocityX:r&$g&&(n=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&r&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Eg(n)>this.options.velocity&&t.eventType&Gg},n.emit=function(e){var t=q_(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(K_),X_=function(e){function t(t){return t===void 0&&(t={}),e.call(this,vg({event:`pinch`,threshold:0,pointers:2},t))||this}yg(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Pg]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(K_),Z_=function(e){function t(t){return t===void 0&&(t={}),e.call(this,vg({event:`rotate`,threshold:0,pointers:2},t))||this}yg(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Pg]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)},t}(K_),Q_=function(e){function t(t){var n;return t===void 0&&(t={}),(n=e.call(this,vg({event:`press`,pointers:1,time:251,threshold:9},t))||this)._timer=null,n._input=null,n}yg(t,e);var n=t.prototype;return n.getTouchAction=function(){return[Mg]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(Gg|Kg)&&!a)this.reset();else if(e.eventType&Wg)this.reset(),this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.time);else if(e.eventType&Gg)return 8;return B_},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===8&&(e&&e.eventType&Gg?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=Dg(),this.manager.emit(this.options.event,this._input)))},t}(W_),$_={domEvents:!1,touchAction:jg,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},ev=[[Z_,{enable:!1}],[X_,{enable:!1},[`rotate`]],[Y_,{direction:Qg}],[J_,{direction:Qg},[`swipe`]],[G_],[G_,{event:`doubletap`,taps:2},[`tap`]],[Q_]];function tv(e,t){var n,r=e.element;r.style&&(r_(e.options.cssProps,(function(i,a){n=Og(r.style,a),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||``})),t||(e.oldCssProps={}))}var nv=function(){function e(e,t){var n,r=this;this.options=Sg({},$_,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(zg?E_:Bg?A_:Rg?R_:N_))(n,h_),this.touchAction=new o_(this,this.options.touchAction),tv(this,!0),r_(this.options.recognizers,(function(e){var t=r.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}var t=e.prototype;return t.set=function(e){return Sg(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?2:1},t.recognize=function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var r=this.recognizers,i=t.curRecognizer;(!i||i&&8&i.state)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped===2||i&&n!==i&&!n.canRecognizeWith(i)?n.reset():n.recognize(e),!i&&14&n.state&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof W_)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(z_(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(z_(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=x_(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return r_(g_(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return r_(g_(e),(function(e){t?n[e]&&n[e].splice(x_(n[e],t),1):delete n[e]})),this},t.emit=function(e,t){this.options.domEvents&&function(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&tv(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),rv={touchstart:Wg,touchmove:2,touchend:Gg,touchcancel:Kg},iv=function(e){function t(){var n,r=t.prototype;return r.evTarget=`touchstart`,r.evWin=`touchstart touchmove touchend touchcancel`,(n=e.apply(this,arguments)||this).started=!1,n}return yg(t,e),t.prototype.handler=function(e){var t=rv[e.type];if(t===Wg&&(this.started=!0),this.started){var n=av.call(this,e,t);t&(Gg|Kg)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Vg,srcEvent:e})}},t}(b_);function av(e,t){var n=D_(e.touches),r=D_(e.changedTouches);return t&(Gg|Kg)&&(n=O_(n.concat(r),`identifier`,!0)),[n,r]}function ov(e,t,n){var r=`DEPRECATED METHOD: `+t+`
@@ -38,7 +38,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
38
38
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function vE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yE(e,t){var n,r=new mT,i=_E(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;e.has(a)||r.add(a)}}catch(e){i.e(e)}finally{i.f()}return r}var bE=function(){function e(){V(this,e),lE.set(this,new mT),uE.set(this,new mT)}return H(e,[{key:`size`,get:function(){return hE(this,uE,`f`).size}},{key:`add`,value:function(){for(var e=[...arguments],t=0,n=e;t<n.length;t++){var r=n[t];hE(this,uE,`f`).add(r)}}},{key:`delete`,value:function(){for(var e=[...arguments],t=0,n=e;t<n.length;t++){var r=n[t];hE(this,uE,`f`).delete(r)}}},{key:`clear`,value:function(){hE(this,uE,`f`).clear()}},{key:`getSelection`,value:function(){return fp(hE(this,uE,`f`))}},{key:`getChanges`,value:function(){return{added:fp(yE(hE(this,lE,`f`),hE(this,uE,`f`))),deleted:fp(yE(hE(this,uE,`f`),hE(this,lE,`f`))),previous:fp(new mT(hE(this,lE,`f`))),current:fp(new mT(hE(this,uE,`f`)))}}},{key:`commit`,value:function(){var e=this.getChanges();gE(this,lE,hE(this,uE,`f`),`f`),gE(this,uE,new mT(hE(this,lE,`f`)),`f`);var t,n=_E(e.added);try{for(n.s();!(t=n.n()).done;)t.value.select()}catch(e){n.e(e)}finally{n.f()}var r,i=_E(e.deleted);try{for(i.s();!(r=i.n()).done;)r.value.unselect()}catch(e){i.e(e)}finally{i.f()}return e}}]),e}();lE=new mE,uE=new mE;var xE=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};V(this,e),dE.set(this,new bE),fE.set(this,new bE),pE.set(this,void 0),gE(this,pE,t,`f`)}return H(e,[{key:`sizeNodes`,get:function(){return hE(this,dE,`f`).size}},{key:`sizeEdges`,get:function(){return hE(this,fE,`f`).size}},{key:`getNodes`,value:function(){return hE(this,dE,`f`).getSelection()}},{key:`getEdges`,value:function(){return hE(this,fE,`f`).getSelection()}},{key:`addNodes`,value:function(){var e;(e=hE(this,dE,`f`)).add.apply(e,arguments)}},{key:`addEdges`,value:function(){var e;(e=hE(this,fE,`f`)).add.apply(e,arguments)}},{key:`deleteNodes`,value:function(e){hE(this,dE,`f`).delete(e)}},{key:`deleteEdges`,value:function(e){hE(this,fE,`f`).delete(e)}},{key:`clear`,value:function(){hE(this,dE,`f`).clear(),hE(this,fE,`f`).clear()}},{key:`commit`,value:function(){for(var e,t,n={nodes:hE(this,dE,`f`).commit(),edges:hE(this,fE,`f`).commit()},r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=hE(this,pE,`f`)).call.apply(e,vp(t=[this,n]).call(t,i)),n}}]),e}();function SE(e,t){var n=pp!==void 0&&xc(e)||e[`@@iterator`];if(!n){if(Ep(e)||(n=function(e,t){var n;if(e){if(typeof e==`string`)return CE(e,t);var r=yp(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return ec(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return CE(e,t)}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
39
39
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function CE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}dE=new mE,fE=new mE,pE=new mE;var wE=function(){function e(t,n){var r=this;V(this,e),this.body=t,this.canvas=n,this._selectionAccumulator=new xE,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},Mr(this.options,this.defaultOptions),this.body.emitter.on(`_dataChanged`,(function(){r.updateSelection()}))}return H(e,[{key:`setOptions`,value:function(e){e!==void 0&&Dv([`multiselect`,`hoverConnectedEdges`,`selectable`,`selectConnectedEdges`],this.options,e)}},{key:`selectOnPoint`,value:function(e){var t=!1;if(!0===this.options.selectable){var n=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),n!==void 0&&(t=this.selectObject(n)),this.body.emitter.emit(`_requestRedraw`)}return t}},{key:`selectAdditionalOnPoint`,value:function(e){var t=!1;if(!0===this.options.selectable){var n=this.getNodeAt(e)||this.getEdgeAt(e);n!==void 0&&(t=!0,!0===n.isSelected()?this.deselectObject(n):this.selectObject(n),this.body.emitter.emit(`_requestRedraw`))}return t}},{key:`_initBaseEvent`,value:function(e,t){var n={};return n.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},n.event=e,n}},{key:`generateClickEvent`,value:function(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0&&arguments[4],a=this._initBaseEvent(t,n);if(!0===i)a.nodes=[],a.edges=[];else{var o=this.getSelection();a.nodes=o.nodes,a.edges=o.edges}r!==void 0&&(a.previousSelection=r),e==`click`&&(a.items=this.getClickedItems(n)),t.controlEdge!==void 0&&(a.controlEdge=t.controlEdge),this.body.emitter.emit(e,a)}},{key:`selectObject`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;if(e!==void 0){if(e instanceof LC){var n;!0===t&&(n=this._selectionAccumulator).addEdges.apply(n,fp(e.edges)),this._selectionAccumulator.addNodes(e)}else this._selectionAccumulator.addEdges(e);return!0}return!1}},{key:`deselectObject`,value:function(e){!0===e.isSelected()&&(e.selected=!1,this._removeFromSelection(e))}},{key:`_getAllNodesOverlappingWith`,value:function(e){for(var t=[],n=this.body.nodes,r=0;r<this.body.nodeIndices.length;r++){var i=this.body.nodeIndices[r];n[i].isOverlappingWith(e)&&t.push(i)}return t}},{key:`_pointerToPositionObject`,value:function(e){var t=this.canvas.DOMtoCanvas(e);return{left:t.x-1,top:t.y+1,right:t.x+1,bottom:t.y-1}}},{key:`getNodeAt`,value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=this._pointerToPositionObject(e),r=this._getAllNodesOverlappingWith(n);return r.length>0?!0===t?this.body.nodes[r[r.length-1]]:r[r.length-1]:void 0}},{key:`_getEdgesOverlappingWith`,value:function(e,t){for(var n=this.body.edges,r=0;r<this.body.edgeIndices.length;r++){var i=this.body.edgeIndices[r];n[i].isOverlappingWith(e)&&t.push(i)}}},{key:`_getAllEdgesOverlappingWith`,value:function(e){var t=[];return this._getEdgesOverlappingWith(e,t),t}},{key:`getEdgeAt`,value:function(e){for(var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=this.canvas.DOMtoCanvas(e),r=10,i=null,a=this.body.edges,o=0;o<this.body.edgeIndices.length;o++){var s=this.body.edgeIndices[o],c=a[s];if(c.connected){var l=c.from.x,u=c.from.y,d=c.to.x,f=c.to.y,p=c.edgeType.getDistanceToEdge(l,u,d,f,n.x,n.y);p<r&&(i=s,r=p)}}return i===null?void 0:!0===t?this.body.edges[i]:i}},{key:`_addToHover`,value:function(e){e instanceof LC?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}},{key:`_removeFromSelection`,value:function(e){var t;e instanceof LC?(this._selectionAccumulator.deleteNodes(e),(t=this._selectionAccumulator).deleteEdges.apply(t,fp(e.edges))):this._selectionAccumulator.deleteEdges(e)}},{key:`unselectAll`,value:function(){this._selectionAccumulator.clear()}},{key:`getSelectedNodeCount`,value:function(){return this._selectionAccumulator.sizeNodes}},{key:`getSelectedEdgeCount`,value:function(){return this._selectionAccumulator.sizeEdges}},{key:`_hoverConnectedEdges`,value:function(e){for(var t=0;t<e.edges.length;t++){var n=e.edges[t];n.hover=!0,this._addToHover(n)}}},{key:`emitBlurEvent`,value:function(e,t,n){var r=this._initBaseEvent(e,t);!0===n.hover&&(n.hover=!1,n instanceof LC?(r.node=n.id,this.body.emitter.emit(`blurNode`,r)):(r.edge=n.id,this.body.emitter.emit(`blurEdge`,r)))}},{key:`emitHoverEvent`,value:function(e,t,n){var r=this._initBaseEvent(e,t),i=!1;return!1===n.hover&&(n.hover=!0,this._addToHover(n),i=!0,n instanceof LC?(r.node=n.id,this.body.emitter.emit(`hoverNode`,r)):(r.edge=n.id,this.body.emitter.emit(`hoverEdge`,r))),i}},{key:`hoverObject`,value:function(e,t){var n=this.getNodeAt(t);n===void 0&&(n=this.getEdgeAt(t));var r=!1;for(var i in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,i)&&(n===void 0||n instanceof LC&&n.id!=i||n instanceof Pw)&&(this.emitBlurEvent(e,t,this.hoverObj.nodes[i]),delete this.hoverObj.nodes[i],r=!0);for(var a in this.hoverObj.edges)Object.prototype.hasOwnProperty.call(this.hoverObj.edges,a)&&(!0===r?(this.hoverObj.edges[a].hover=!1,delete this.hoverObj.edges[a]):(n===void 0||n instanceof Pw&&n.id!=a||n instanceof LC&&!n.hover)&&(this.emitBlurEvent(e,t,this.hoverObj.edges[a]),delete this.hoverObj.edges[a],r=!0));if(n!==void 0){var o=Fp(this.hoverObj.edges).length,s=Fp(this.hoverObj.nodes).length;(r||n instanceof Pw&&o===0&&s===0||n instanceof LC&&o===0&&s===0)&&(r=this.emitHoverEvent(e,t,n)),n instanceof LC&&!0===this.options.hoverConnectedEdges&&this._hoverConnectedEdges(n)}!0===r&&this.body.emitter.emit(`_requestRedraw`)}},{key:`commitWithoutEmitting`,value:function(){this._selectionAccumulator.commit()}},{key:`commitAndEmit`,value:function(e,t){var n=!1,r=this._selectionAccumulator.commit(),i={nodes:r.nodes.previous,edges:r.edges.previous};r.edges.deleted.length>0&&(this.generateClickEvent(`deselectEdge`,t,e,i),n=!0),r.nodes.deleted.length>0&&(this.generateClickEvent(`deselectNode`,t,e,i),n=!0),r.nodes.added.length>0&&(this.generateClickEvent(`selectNode`,t,e),n=!0),r.edges.added.length>0&&(this.generateClickEvent(`selectEdge`,t,e),n=!0),!0===n&&this.generateClickEvent(`select`,t,e)}},{key:`getSelection`,value:function(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}},{key:`getSelectedNodes`,value:function(){return this._selectionAccumulator.getNodes()}},{key:`getSelectedEdges`,value:function(){return this._selectionAccumulator.getEdges()}},{key:`getSelectedNodeIds`,value:function(){var e;return Mp(e=this._selectionAccumulator.getNodes()).call(e,(function(e){return e.id}))}},{key:`getSelectedEdgeIds`,value:function(){var e;return Mp(e=this._selectionAccumulator.getEdges()).call(e,(function(e){return e.id}))}},{key:`setSelection`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw TypeError(`Selection must be an object with nodes and/or edges properties`);if((t.unselectAll||t.unselectAll===void 0)&&this.unselectAll(),e.nodes){var n,r=SE(e.nodes);try{for(r.s();!(n=r.n()).done;){var i=n.value,a=this.body.nodes[i];if(!a)throw RangeError(`Node with id "`+i+`" not found`);this.selectObject(a,t.highlightEdges)}}catch(e){r.e(e)}finally{r.f()}}if(e.edges){var o,s=SE(e.edges);try{for(s.s();!(o=s.n()).done;){var c=o.value,l=this.body.edges[c];if(!l)throw RangeError(`Edge with id "`+c+`" not found`);this.selectObject(l)}}catch(e){s.e(e)}finally{s.f()}}this.body.emitter.emit(`_requestRedraw`),this._selectionAccumulator.commit()}},{key:`selectNodes`,value:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];if(!e||e.length===void 0)throw`Selection must be an array with ids`;this.setSelection({nodes:e},{highlightEdges:t})}},{key:`selectEdges`,value:function(e){if(!e||e.length===void 0)throw`Selection must be an array with ids`;this.setSelection({edges:e})}},{key:`updateSelection`,value:function(){for(var e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(var t in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,t.id)||this._selectionAccumulator.deleteEdges(t)}},{key:`getClickedItems`,value:function(e){for(var t=this.canvas.DOMtoCanvas(e),n=[],r=this.body.nodeIndices,i=this.body.nodes,a=r.length-1;a>=0;a--){var o=i[r[a]].getItemsOnPoint(t);n.push.apply(n,o)}for(var s=this.body.edgeIndices,c=this.body.edges,l=s.length-1;l>=0;l--){var u=c[s[l]].getItemsOnPoint(t);n.push.apply(n,u)}return n}}]),e}(),TE=ml,EE=Math.floor,DE=function(e,t){var n=e.length,r=EE(n/2);return n<8?OE(e,t):kE(e,DE(TE(e,0,r),t),DE(TE(e,r),t),t)},OE=function(e,t){for(var n,r,i=e.length,a=1;a<i;){for(r=a,n=e[a];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==a++&&(e[r]=n)}return e},kE=function(e,t,n,r){for(var i=t.length,a=n.length,o=0,s=0;o<i||s<a;)e[o+s]=o<i&&s<a?r(t[o],n[s])<=0?t[o++]:n[s++]:o<i?t[o++]:n[s++];return e},AE=DE,jE=F.match(/firefox\/(\d+)/i),ME=!!jE&&+jE[1],NE=/MSIE|Trident/.test(F),PE=F.match(/AppleWebKit\/(\d+)\./),FE=!!PE&&+PE[1],IE=L,LE=_,RE=Je,zE=ft,BE=nr,VE=lm,HE=xi,UE=o,WE=AE,GE=Vp,KE=ME,qE=NE,JE=Me,YE=FE,XE=[],ZE=LE(XE.sort),QE=LE(XE.push),$E=UE((function(){XE.sort(void 0)})),eD=UE((function(){XE.sort(null)})),tD=GE(`sort`),nD=!UE((function(){if(JE)return JE<70;if(!(KE&&KE>3)){if(qE)return!0;if(YE)return YE<603;var e,t,n,r,i=``;for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)XE.push({k:t+r,v:n})}for(XE.sort((function(e,t){return t.v-e.v})),r=0;r<XE.length;r++)t=XE[r].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return i!==`DGBEFHACIJK`}}));IE({target:`Array`,proto:!0,forced:$E||!eD||!tD||!nD},{sort:function(e){e!==void 0&&RE(e);var t=zE(this);if(nD)return e===void 0?ZE(t):ZE(t,e);var n,r,i=[],a=BE(t);for(r=0;r<a;r++)r in t&&QE(i,t[r]);for(WE(i,function(e){return function(t,n){return n===void 0?-1:t===void 0?1:e===void 0?HE(t)>HE(n)?1:-1:+e(t,n)||0}}(e)),n=BE(i),r=0;r<n;)t[r]=i[r++];for(;r<a;)VE(t,r++);return t}});var rD=qr(`Array`).sort,iD=P,aD=rD,oD=Array.prototype,sD=r(function(e){var t=e.sort;return e===oD||iD(oD,e)&&t===oD.sort?aD:t}),cD=Je,lD=ft,uD=me,dD=nr,fD=TypeError,pD=function(e){return function(t,n,r,i){cD(n);var a=lD(t),o=uD(a),s=dD(a),c=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(c in o){i=o[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw new fD(`Reduce of empty array with no initial value`)}for(;e?c>=0:s>c;c+=l)c in o&&(i=n(i,o[c],c,a));return i}},mD={left:pD(!1),right:pD(!0)},hD=x(a.process)===`process`,gD=mD.left;L({target:`Array`,proto:!0,forced:!hD&&Me>79&&Me<83||!Vp(`reduce`)},{reduce:function(e){var t=arguments.length;return gD(this,e,t,t>1?arguments[1]:void 0)}});var _D=qr(`Array`).reduce,vD=P,yD=_D,bD=Array.prototype,xD=r(function(e){var t=e.reduce;return e===bD||vD(bD,e)&&t===bD.reduce?yD:t});function SD(e){var t=function(){if(typeof Reflect>`u`||!K||K.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(K(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=J(e);if(t){var i=J(this).constructor;n=K(r,arguments,i)}else n=r.apply(this,arguments);return JS(this,n)}}var CD=function(){function e(){V(this,e)}return H(e,[{key:`abstract`,value:function(){throw Error(`Can't instantiate abstract class!`)}},{key:`fake_use`,value:function(){}},{key:`curveType`,value:function(){return this.abstract()}},{key:`getPosition`,value:function(e){return this.fake_use(e),this.abstract()}},{key:`setPosition`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,t,n),this.abstract()}},{key:`getTreeSize`,value:function(e){return this.fake_use(e),this.abstract()}},{key:`sort`,value:function(e){this.fake_use(e),this.abstract()}},{key:`fix`,value:function(e,t){this.fake_use(e,t),this.abstract()}},{key:`shift`,value:function(e,t){this.fake_use(e,t),this.abstract()}}]),e}(),wD=function(e){q(n,e);var t=SD(n);function n(e){var r;return V(this,n),(r=t.call(this)).layout=e,r}return H(n,[{key:`curveType`,value:function(){return`horizontal`}},{key:`getPosition`,value:function(e){return e.x}},{key:`setPosition`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;n!==void 0&&this.layout.hierarchical.addToOrdering(e,n),e.x=t}},{key:`getTreeSize`,value:function(e){var t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_x,max:t.max_x}}},{key:`sort`,value:function(e){sD(e).call(e,(function(e,t){return e.x-t.x}))}},{key:`fix`,value:function(e,t){e.y=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.y=!0}},{key:`shift`,value:function(e,t){this.layout.body.nodes[e].x+=t}}]),n}(CD),TD=function(e){q(n,e);var t=SD(n);function n(e){var r;return V(this,n),(r=t.call(this)).layout=e,r}return H(n,[{key:`curveType`,value:function(){return`vertical`}},{key:`getPosition`,value:function(e){return e.y}},{key:`setPosition`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;n!==void 0&&this.layout.hierarchical.addToOrdering(e,n),e.y=t}},{key:`getTreeSize`,value:function(e){var t=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:t.min_y,max:t.max_y}}},{key:`sort`,value:function(e){sD(e).call(e,(function(e,t){return e.y-t.y}))}},{key:`fix`,value:function(e,t){e.x=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.x=!0}},{key:`shift`,value:function(e,t){this.layout.body.nodes[e].y+=t}}]),n}(CD),ED=Bl.every;L({target:`Array`,proto:!0,forced:!Vp(`every`)},{every:function(e){return ED(this,e,arguments.length>1?arguments[1]:void 0)}});var DD=qr(`Array`).every,OD=P,kD=DD,AD=Array.prototype,jD=r(function(e){var t=e.every;return e===AD||OD(AD,e)&&t===AD.every?kD:t});function MD(e,t){var n=pp!==void 0&&xc(e)||e[`@@iterator`];if(!n){if(Ep(e)||(n=function(e,t){var n;if(e){if(typeof e==`string`)return ND(e,t);var r=yp(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return ec(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ND(e,t)}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
40
40
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function ND(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function PD(e,t){var n=new mT;return Zp(e).call(e,(function(e){var t;Zp(t=e.edges).call(t,(function(e){e.connected&&n.add(e)}))})),Zp(n).call(n,(function(e){var n=e.from.id,r=e.to.id;t[n]??(t[n]=0),(t[r]==null||t[n]>=t[r])&&(t[r]=t[n]+1)})),t}function FD(e,t,n,r){var i,a,o=Bh(null),s=xD(i=fp(bS(r).call(r))).call(i,(function(e,t){return e+1+t.edges.length}),0),c=n+`Id`,l=n===`to`?1:-1,u=MD(r);try{var d,f=function(){var i=dp(a.value,2),u=i[0],d=i[1];if(!r.has(u)||!e(d))return 0;o[u]=0;for(var f,p,m=[d],h=0,g=function(){var e,i;if(!r.has(u))return 0;var a=o[f.id]+l;if(Zp(e=ah(i=f.edges).call(i,(function(e){return e.connected&&e.to!==e.from&&e[n]!==f&&r.has(e.toId)&&r.has(e.fromId)}))).call(e,(function(e){var r=e[c],i=o[r];(i==null||t(a,i))&&(o[r]=a,m.push(e[n]))})),h>s)return{v:{v:PD(r,o)}};++h};f=m.pop();)if((p=g())!==0&&p)return p.v};for(u.s();!(a=u.n()).done;)if((d=f())!==0&&d)return d.v}catch(e){u.e(e)}finally{u.f()}return o}var ID=function(){function e(){V(this,e),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return H(e,[{key:`addRelation`,value:function(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)}},{key:`checkIfTree`,value:function(){for(var e in this.parentReference)if(this.parentReference[e].length>1)return void(this.isTree=!1);this.isTree=!0}},{key:`numTrees`,value:function(){return this.treeIndex+1}},{key:`setTreeIndex`,value:function(e,t){t!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}},{key:`ensureLevel`,value:function(e){this.levels[e]===void 0&&(this.levels[e]=0)}},{key:`getMaxLevel`,value:function(e){var t=this,n={};return function e(r){if(n[r]!==void 0)return n[r];var i=t.levels[r];if(t.childrenReference[r]){var a=t.childrenReference[r];if(a.length>0)for(var o=0;o<a.length;o++)i=Math.max(i,e(a[o]))}return n[r]=i,i}(e)}},{key:`levelDownstream`,value:function(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)}},{key:`setMinLevelToZero`,value:function(e){var t=1e9;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.levels[n]!==void 0&&(t=Math.min(this.levels[n],t));for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.levels[r]!==void 0&&(this.levels[r]-=t)}},{key:`getTreeSize`,value:function(e,t){var n=1e9,r=-1e9,i=1e9,a=-1e9;for(var o in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,o)&&this.trees[o]===t){var s=e[o];n=Math.min(s.x,n),r=Math.max(s.x,r),i=Math.min(s.y,i),a=Math.max(s.y,a)}return{min_x:n,max_x:r,min_y:i,max_y:a}}},{key:`hasSameParent`,value:function(e,t){var n=this.parentReference[e.id],r=this.parentReference[t.id];if(n===void 0||r===void 0)return!1;for(var i=0;i<n.length;i++)for(var a=0;a<r.length;a++)if(n[i]==r[a])return!0;return!1}},{key:`inSameSubNetwork`,value:function(e,t){return this.trees[e.id]===this.trees[t.id]}},{key:`getLevels`,value:function(){return Fp(this.distributionOrdering)}},{key:`addToOrdering`,value:function(e,t){this.distributionOrdering[t]===void 0&&(this.distributionOrdering[t]=[]);var n=!1,r=this.distributionOrdering[t];for(var i in r)if(r[i]===e){n=!0;break}n||(this.distributionOrdering[t].push(e),this.distributionIndex[e.id]=this.distributionOrdering[t].length-1)}}]),e}(),LD=function(){function e(t){V(this,e),this.body=t,this._resetRNG(Math.random()+`:`+zp()),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`}},Mr(this.options,this.defaultOptions),this.bindEventListeners()}return H(e,[{key:`bindEventListeners`,value:function(){var e=this;this.body.emitter.on(`_dataChanged`,(function(){e.setupHierarchicalLayout()})),this.body.emitter.on(`_dataLoaded`,(function(){e.layoutNetwork()})),this.body.emitter.on(`_resetHierarchicalLayout`,(function(){e.setupHierarchicalLayout()})),this.body.emitter.on(`_adjustEdgesForHierarchicalLayout`,(function(){if(!0===e.options.hierarchical.enabled){var t=e.direction.curveType();e.body.emitter.emit(`_forceDisableDynamicCurves`,t,!1)}}))}},{key:`setOptions`,value:function(e,t){if(e!==void 0){var n=this.options.hierarchical,r=n.enabled;if(Dv([`randomSeed`,`improvedLayout`,`clusterThreshold`],this.options,e),Hv(this.options,e,`hierarchical`),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),!0===n.enabled)return!0===r&&this.body.emitter.emit(`refresh`,!0),n.direction===`RL`||n.direction===`DU`?n.levelSeparation>0&&(n.levelSeparation*=-1):n.levelSeparation<0&&(n.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit(`_resetHierarchicalLayout`),this.adaptAllOptionsForHierarchicalLayout(t);if(!0===r)return this.body.emitter.emit(`refresh`),kv(t,this.optionsBackup)}return t}},{key:`_resetRNG`,value:function(e){this.initialRandomSeed=e,this._rng=hv(this.initialRandomSeed)}},{key:`adaptAllOptionsForHierarchicalLayout`,value:function(e){if(!0===this.options.hierarchical.enabled){var t=this.optionsBackup.physics;e.physics===void 0||!0===e.physics?(e.physics={enabled:t.enabled===void 0||t.enabled,solver:`hierarchicalRepulsion`},t.enabled=t.enabled===void 0||t.enabled,t.solver=t.solver||`barnesHut`):Sf(e.physics)===`object`?(t.enabled=e.physics.enabled===void 0||e.physics.enabled,t.solver=e.physics.solver||`barnesHut`,e.physics.solver=`hierarchicalRepulsion`):!1!==e.physics&&(t.solver=`barnesHut`,e.physics={solver:`hierarchicalRepulsion`});var n=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:`dynamic`}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:`dynamic`}},e.edges.smooth=!1;else if(typeof e.edges.smooth==`boolean`)this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:n};else{var r=e.edges.smooth;r.type!==void 0&&r.type!==`dynamic`&&(n=r.type),this.optionsBackup.edges={smooth:{enabled:r.enabled===void 0||r.enabled,type:r.type===void 0?`dynamic`:r.type,roundness:r.roundness===void 0?.5:r.roundness,forceDirection:r.forceDirection!==void 0&&r.forceDirection}},e.edges.smooth={enabled:r.enabled===void 0||r.enabled,type:n,roundness:r.roundness===void 0?.5:r.roundness,forceDirection:r.forceDirection!==void 0&&r.forceDirection}}this.body.emitter.emit(`_forceDisableDynamicCurves`,n)}return e}},{key:`positionInitially`,value:function(e){if(!0!==this.options.hierarchical.enabled){this._resetRNG(this.initialRandomSeed);for(var t=e.length+50,n=0;n<e.length;n++){var r=e[n],i=2*Math.PI*this._rng();r.x===void 0&&(r.x=t*Math.cos(i)),r.y===void 0&&(r.y=t*Math.sin(i))}}}},{key:`layoutNetwork`,value:function(){if(!0!==this.options.hierarchical.enabled&&!0===this.options.improvedLayout){for(var e=this.body.nodeIndices,t=0,n=0;n<e.length;n++)!0===this.body.nodes[e[n]].predefinedPosition&&(t+=1);if(t<.5*e.length){var r=0,i=this.options.clusterThreshold,a={clusterNodeProperties:{shape:`ellipse`,label:``,group:``,font:{multi:!1}},clusterEdgeProperties:{label:``,font:{multi:!1},smooth:{enabled:!1}}};if(e.length>i){for(var o=e.length;e.length>i&&r<=10;){r+=1;var s=e.length;if(r%3==0?this.body.modules.clustering.clusterBridges(a):this.body.modules.clustering.clusterOutliers(a),s==e.length&&r%3!=0)return this._declusterAll(),this.body.emitter.emit(`_layoutFailed`),void console.info(`This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.`)}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*o)})}r>10&&console.info(`The clustering didn't succeed within the amount of interations allowed, progressing with partial result.`),this.body.modules.kamadaKawai.solve(e,this.body.edgeIndices,!0),this._shiftToCenter();for(var c=0;c<e.length;c++){var l=this.body.nodes[e[c]];!1===l.predefinedPosition&&(l.x+=70*(.5-this._rng()),l.y+=70*(.5-this._rng()))}this._declusterAll(),this.body.emitter.emit(`_repositionBezierNodes`)}}}},{key:`_shiftToCenter`,value:function(){for(var e=$w.getRangeCore(this.body.nodes,this.body.nodeIndices),t=$w.findCenter(e),n=0;n<this.body.nodeIndices.length;n++){var r=this.body.nodes[this.body.nodeIndices[n]];r.x-=t.x,r.y-=t.y}}},{key:`_declusterAll`,value:function(){for(var e=!0;!0===e;){e=!1;for(var t=0;t<this.body.nodeIndices.length;t++)!0===this.body.nodes[this.body.nodeIndices[t]].isCluster&&(e=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[t],{},!1));!0===e&&this.body.emitter.emit(`_dataChanged`)}}},{key:`getSeed`,value:function(){return this.initialRandomSeed}},{key:`setupHierarchicalLayout`,value:function(){if(!0===this.options.hierarchical.enabled&&this.body.nodeIndices.length>0){var e,t,n=!1,r=!1;for(t in this.lastNodeOnLevel={},this.hierarchical=new ID,this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&((e=this.body.nodes[t]).options.level===void 0?r=!0:(n=!0,this.hierarchical.levels[t]=e.options.level));if(!0===r&&!0===n)throw Error(`To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.`);if(!0===r){var i=this.options.hierarchical.sortMethod;i===`hubsize`?this._determineLevelsByHubsize():i===`directed`?this._determineLevelsDirected():i===`custom`&&this._determineLevelsCustomCallback()}for(var a in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,a)&&this.hierarchical.ensureLevel(a);var o=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(o),this._condenseHierarchy(),this._shiftToCenter()}}},{key:`_condenseHierarchy`,value:function(){var e=this,t=!1,n={},r=function(t,n){var r=e.hierarchical.trees;for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&r[i]===t&&e.direction.shift(i,n)},i=function(){for(var t=[],n=0;n<e.hierarchical.numTrees();n++)t.push(e.direction.getTreeSize(n));return t},a=function t(n,r){if(!r[n.id]&&(r[n.id]=!0,e.hierarchical.childrenReference[n.id])){var i=e.hierarchical.childrenReference[n.id];if(i.length>0)for(var a=0;a<i.length;a++)t(e.body.nodes[i[a]],r)}},o=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,r=1e9,i=1e9,a=1e9,o=-1e9;for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s)){var c=e.body.nodes[s],l=e.hierarchical.levels[c.id],u=e.direction.getPosition(c),d=dp(e._getSpaceAroundNode(c,t),2),f=d[0],p=d[1];r=Math.min(f,r),i=Math.min(p,i),l<=n&&(a=Math.min(u,a),o=Math.max(u,o))}return[a,o,r,i]},s=function(t,n,r){for(var i=e.hierarchical,a=0;a<n.length;a++){var o=n[a],s=i.distributionOrdering[o];if(s.length>1)for(var c=0;c<s.length-1;c++){var l=s[c],u=s[c+1];i.hasSameParent(l,u)&&i.inSameSubNetwork(l,u)&&t(l,u,r)}}},c=function(n,r){var i=arguments.length>2&&arguments[2]!==void 0&&arguments[2],s=e.direction.getPosition(n),c=e.direction.getPosition(r),l=Math.abs(c-s),u=e.options.hierarchical.nodeSpacing;if(l>u){var d={},f={};a(n,d),a(r,f);var p=function(t,n){var r=e.hierarchical.getMaxLevel(t.id),i=e.hierarchical.getMaxLevel(n.id);return Math.min(r,i)}(n,r),m=o(d,p),h=o(f,p),g=m[1],_=h[0],v=h[2];if(Math.abs(g-_)>u){var y=g-_+u;y<-v+u&&(y=-v+u),y<0&&(e._shiftBlock(r.id,y),t=!0,!0===i&&e._centerParent(r))}}},l=function(r,i){for(var s=i.id,c=i.edges,l=e.hierarchical.levels[i.id],u=e.options.hierarchical.levelSeparation*e.options.hierarchical.levelSeparation,d={},f=[],p=0;p<c.length;p++){var m=c[p];if(m.toId!=m.fromId){var h=m.toId==s?m.from:m.to;d[c[p].id]=h,e.hierarchical.levels[h.id]<l&&f.push(m)}}var g=function(t,n){for(var r=0,i=0;i<n.length;i++)if(d[n[i].id]!==void 0){var a=e.direction.getPosition(d[n[i].id])-t;r+=a/Math.sqrt(a*a+u)}return r},_=function(t,n){for(var r=0,i=0;i<n.length;i++)if(d[n[i].id]!==void 0){var a=e.direction.getPosition(d[n[i].id])-t;r-=u*(a*a+u)**-1.5}return r},v=function(t,n){for(var r=e.direction.getPosition(i),a={},o=0;o<t;o++){var s=g(r,n),c=_(r,n);if(a[r-=Math.max(-40,Math.min(40,Math.round(s/c)))]!==void 0)break;a[r]=o}return r},y=v(r,f);(function(r){var s=e.direction.getPosition(i);if(n[i.id]===void 0){var c={};a(i,c),n[i.id]=c}var l=o(n[i.id]),u=l[2],d=l[3],f=r-s,p=0;f>0?p=Math.min(f,d-e.options.hierarchical.nodeSpacing):f<0&&(p=-Math.min(-f,u-e.options.hierarchical.nodeSpacing)),p!=0&&(e._shiftBlock(i.id,p),t=!0)})(y),function(n){var r=e.direction.getPosition(i),a=dp(e._getSpaceAroundNode(i),2),o=a[0],s=a[1],c=n-r,l=r;c>0?l=Math.min(r+(s-e.options.hierarchical.nodeSpacing),n):c<0&&(l=Math.max(r-(o-e.options.hierarchical.nodeSpacing),n)),l!==r&&(e.direction.setPosition(i,l),t=!0)}(y=v(r,c))};!0===this.options.hierarchical.blockShifting&&(function(n){var r=e.hierarchical.getLevels();r=om(r).call(r);for(var i=0;i<n&&(t=!1,s(c,r,!0),!0===t);i++);}(5),function(){for(var t in e.body.nodes)Object.prototype.hasOwnProperty.call(e.body.nodes,t)&&e._centerParent(e.body.nodes[t])}()),!0===this.options.hierarchical.edgeMinimization&&function(n){var r=e.hierarchical.getLevels();r=om(r).call(r);for(var i=0;i<n;i++){t=!1;for(var a=0;a<r.length;a++)for(var o=r[a],s=e.hierarchical.distributionOrdering[o],c=0;c<s.length;c++)l(1e3,s[c]);if(!0!==t)break}}(20),!0===this.options.hierarchical.parentCentralization&&function(){var t=e.hierarchical.getLevels();t=om(t).call(t);for(var n=0;n<t.length;n++)for(var r=t[n],i=e.hierarchical.distributionOrdering[r],a=0;a<i.length;a++)e._centerParent(i[a])}(),function(){for(var t=i(),n=0,a=0;a<t.length-1;a++)n+=t[a].max-t[a+1].min+e.options.hierarchical.treeSpacing,r(a+1,n)}()}},{key:`_getSpaceAroundNode`,value:function(e,t){var n=!0;t===void 0&&(n=!1);var r=this.hierarchical.levels[e.id];if(r!==void 0){var i=this.hierarchical.distributionIndex[e.id],a=this.direction.getPosition(e),o=this.hierarchical.distributionOrdering[r],s=1e9,c=1e9;if(i!==0){var l=o[i-1];(!0===n&&t[l.id]===void 0||!1===n)&&(s=a-this.direction.getPosition(l))}if(i!=o.length-1){var u=o[i+1];if(!0===n&&t[u.id]===void 0||!1===n){var d=this.direction.getPosition(u);c=Math.min(c,d-a)}}return[s,c]}return[0,0]}},{key:`_centerParent`,value:function(e){if(this.hierarchical.parentReference[e.id])for(var t=this.hierarchical.parentReference[e.id],n=0;n<t.length;n++){var r=t[n],i=this.body.nodes[r],a=this.hierarchical.childrenReference[r];if(a!==void 0){var o=this._getCenterPosition(a),s=this.direction.getPosition(i),c=dp(this._getSpaceAroundNode(i),2),l=c[0],u=c[1],d=s-o;(d<0&&Math.abs(d)<u-this.options.hierarchical.nodeSpacing||d>0&&Math.abs(d)<l-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(i,o)}}}},{key:`_placeNodesByHierarchy`,value:function(e){for(var t in this.positionedNodes={},e)if(Object.prototype.hasOwnProperty.call(e,t)){var n,r=Fp(e[t]);r=this._indexArrayToNodes(r),sD(n=this.direction).call(n,r);for(var i=0,a=0;a<r.length;a++){var o=r[a];if(this.positionedNodes[o.id]===void 0){var s=this.options.hierarchical.nodeSpacing,c=s*i;i>0&&(c=this.direction.getPosition(r[a-1])+s),this.direction.setPosition(o,c,t),this._validatePositionAndContinue(o,t,c),i++}}}}},{key:`_placeBranchNodes`,value:function(e,t){var n,r=this.hierarchical.childrenReference[e];if(r!==void 0){for(var i=[],a=0;a<r.length;a++)i.push(this.body.nodes[r[a]]);sD(n=this.direction).call(n,i);for(var o=0;o<i.length;o++){var s=i[o],c=this.hierarchical.levels[s.id];if(!(c>t&&this.positionedNodes[s.id]===void 0))return;var l=this.options.hierarchical.nodeSpacing,u=void 0;u=o===0?this.direction.getPosition(this.body.nodes[e]):this.direction.getPosition(i[o-1])+l,this.direction.setPosition(s,u,c),this._validatePositionAndContinue(s,c,u)}var d=this._getCenterPosition(i);this.direction.setPosition(this.body.nodes[e],d,t)}}},{key:`_validatePositionAndContinue`,value:function(e,t,n){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[t]!==void 0){var r=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]);if(n-r<this.options.hierarchical.nodeSpacing){var i=r+this.options.hierarchical.nodeSpacing-n,a=this._findCommonParent(this.lastNodeOnLevel[t],e.id);this._shiftBlock(a.withChild,i)}}this.lastNodeOnLevel[t]=e.id,this.positionedNodes[e.id]=!0,this._placeBranchNodes(e.id,t)}}},{key:`_indexArrayToNodes`,value:function(e){for(var t=[],n=0;n<e.length;n++)t.push(this.body.nodes[e[n]]);return t}},{key:`_getDistribution`,value:function(){var e,t,n={};for(e in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,e)){t=this.body.nodes[e];var r=this.hierarchical.levels[e]===void 0?0:this.hierarchical.levels[e];this.direction.fix(t,r),n[r]===void 0&&(n[r]={}),n[r][e]=t}return n}},{key:`_getActiveEdges`,value:function(e){var t=this,n=[];return U(e.edges,(function(e){var r;Lh(r=t.body.edgeIndices).call(r,e.id)!==-1&&n.push(e)})),n}},{key:`_getHubSizes`,value:function(){var e=this,t={};U(this.body.nodeIndices,(function(n){var r=e.body.nodes[n],i=e._getActiveEdges(r).length;t[i]=!0}));var n=[];return U(t,(function(e){n.push(Number(e))})),sD(n).call(n,(function(e,t){return t-e})),n}},{key:`_determineLevelsByHubsize`,value:function(){for(var e=this,t=function(t,n){e.hierarchical.levelDownstream(t,n)},n=this._getHubSizes(),r=function(){var r=n[i];if(r===0)return 1;U(e.body.nodeIndices,(function(n){var i=e.body.nodes[n];r===e._getActiveEdges(i).length&&e._crawlNetwork(t,n)}))},i=0;i<n.length&&!r();++i);}},{key:`_determineLevelsCustomCallback`,value:function(){var e=this;this._crawlNetwork((function(t,n,r){var i=e.hierarchical.levels[t.id];i===void 0&&(i=e.hierarchical.levels[t.id]=1e5);var a=($w.cloneOptions(t,`node`),$w.cloneOptions(n,`node`),void $w.cloneOptions(r,`edge`));e.hierarchical.levels[n.id]=i+a})),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:`_determineLevelsDirected`,value:function(){var e,t=this,n=xD(e=this.body.nodeIndices).call(e,(function(e,n){return e.set(n,t.body.nodes[n]),e}),new dx);this.options.hierarchical.shakeTowards===`roots`?this.hierarchical.levels=function(e){return FD((function(t){var n,r;return jD(n=ah(r=t.edges).call(r,(function(t){return e.has(t.toId)}))).call(n,(function(e){return e.from===t}))}),(function(e,t){return t<e}),`to`,e)}(n):this.hierarchical.levels=function(e){return FD((function(t){var n,r;return jD(n=ah(r=t.edges).call(r,(function(t){return e.has(t.toId)}))).call(n,(function(e){return e.to===t}))}),(function(e,t){return t>e}),`from`,e)}(n),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:`_generateMap`,value:function(){var e=this;this._crawlNetwork((function(t,n){e.hierarchical.levels[n.id]>e.hierarchical.levels[t.id]&&e.hierarchical.addRelation(t.id,n.id)})),this.hierarchical.checkIfTree()}},{key:`_crawlNetwork`,value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},n=arguments.length>1?arguments[1]:void 0,r={},i=function n(i,a){if(r[i.id]===void 0){var o;e.hierarchical.setTreeIndex(i,a),r[i.id]=!0;for(var s=e._getActiveEdges(i),c=0;c<s.length;c++){var l=s[c];!0===l.connected&&(o=l.toId==i.id?l.from:l.to,i.id!=o.id&&(t(i,o,l),n(o,a)))}}};if(n===void 0)for(var a=0,o=0;o<this.body.nodeIndices.length;o++){var s=this.body.nodeIndices[o];r[s]===void 0&&(i(this.body.nodes[s],a),a+=1)}else{var c=this.body.nodes[n];if(c===void 0)return void console.error(`Node not found:`,n);i(c)}}},{key:`_shiftBlock`,value:function(e,t){var n=this,r={};(function e(i){if(!r[i]){r[i]=!0,n.direction.shift(i,t);var a=n.hierarchical.childrenReference[i];if(a!==void 0)for(var o=0;o<a.length;o++)e(a[o])}})(e)}},{key:`_findCommonParent`,value:function(e,t){var n=this,r={};return function e(t,r){var i=n.hierarchical.parentReference[r];if(i!==void 0)for(var a=0;a<i.length;a++){var o=i[a];t[o]=!0,e(t,o)}}(r,e),function e(t,r){var i=n.hierarchical.parentReference[r];if(i!==void 0)for(var a=0;a<i.length;a++){var o=i[a];if(t[o]!==void 0)return{foundParent:o,withChild:r};var s=e(t,o);if(s.foundParent!==null)return s}return{foundParent:null,withChild:r}}(r,t)}},{key:`setDirectionStrategy`,value:function(){this.direction=this.options.hierarchical.direction===`UD`||this.options.hierarchical.direction===`DU`?new wD(this):new TD(this)}},{key:`_getCenterPosition`,value:function(e){for(var t=1e9,n=-1e9,r=0;r<e.length;r++){var i=void 0;if(e[r].id!==void 0)i=e[r];else{var a=e[r];i=this.body.nodes[a]}var o=this.direction.getPosition(i);t=Math.min(t,o),n=Math.max(n,o)}return .5*(t+n)}}]),e}();function RD(e,t){var n=pp!==void 0&&xc(e)||e[`@@iterator`];if(!n){if(Ep(e)||(n=function(e,t){var n;if(e){if(typeof e==`string`)return zD(e,t);var r=yp(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return ec(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zD(e,t)}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
41
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function zD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var BD=function(){function e(t,n,r,i){var a,o,s=this;V(this,e),this.body=t,this.canvas=n,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}},Mr(this.options,this.defaultOptions),this.body.emitter.on(`destroy`,(function(){s._clean()})),this.body.emitter.on(`_dataChanged`,B(a=this._restore).call(a,this)),this.body.emitter.on(`_resetData`,B(o=this._restore).call(o,this))}return H(e,[{key:`_restore`,value:function(){!1!==this.inMode&&(!0===this.options.initiallyActive?this.enableEditMode():this.disableEditMode())}},{key:`setOptions`,value:function(e,t,n){t!==void 0&&(t.locale===void 0?this.options.locale=n.locale:this.options.locale=t.locale,t.locales===void 0?this.options.locales=n.locales:this.options.locales=t.locales),e!==void 0&&(typeof e==`boolean`?this.options.enabled=e:(this.options.enabled=!0,kv(this.options,e)),!0===this.options.initiallyActive&&(this.editMode=!0),this._setup())}},{key:`toggleEditMode`,value:function(){!0===this.editMode?this.disableEditMode():this.enableEditMode()}},{key:`enableEditMode`,value:function(){this.editMode=!0,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display=`block`,this.closeDiv.style.display=`block`,this.editModeDiv.style.display=`none`,this.showManipulatorToolbar())}},{key:`disableEditMode`,value:function(){this.editMode=!1,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display=`none`,this.closeDiv.style.display=`none`,this.editModeDiv.style.display=`block`,this._createEditButton())}},{key:`showManipulatorToolbar`,value:function(){if(this._clean(),this.manipulationDOM={},!0===this.guiEnabled){var e,t;this.editMode=!0,this.manipulationDiv.style.display=`block`,this.closeDiv.style.display=`block`;var n=this.selectionHandler.getSelectedNodeCount(),r=this.selectionHandler.getSelectedEdgeCount(),i=n+r,a=this.options.locales[this.options.locale],o=!1;!1!==this.options.addNode&&(this._createAddNodeButton(a),o=!0),!1!==this.options.addEdge&&(!0===o?this._createSeperator(1):o=!0,this._createAddEdgeButton(a)),n===1&&typeof this.options.editNode==`function`?(!0===o?this._createSeperator(2):o=!0,this._createEditNodeButton(a)):r===1&&n===0&&!1!==this.options.editEdge&&(!0===o?this._createSeperator(3):o=!0,this._createEditEdgeButton(a)),i!==0&&(n>0&&!1!==this.options.deleteNode||n===0&&!1!==this.options.deleteEdge)&&(!0===o&&this._createSeperator(4),this._createDeleteButton(a)),this._bindElementEvents(this.closeDiv,B(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent(`select`,B(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit(`_redraw`)}},{key:`addNodeMode`,value:function(){var e;if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode=`addNode`,!0===this.guiEnabled){var t,n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,B(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent(`click`,B(e=this._performAddNode).call(e,this))}},{key:`editNode`,value:function(){var e=this;!0!==this.editMode&&this.enableEditMode(),this._clean();var t=this.selectionHandler.getSelectedNodes()[0];if(t!==void 0){if(this.inMode=`editNode`,typeof this.options.editNode!=`function`)throw Error(`No function has been configured to handle the editing of nodes.`);if(!0!==t.isCluster){var n=kv({},t.options,!1);if(n.x=t.x,n.y=t.y,this.options.editNode.length!==2)throw Error(`The function for edit does not support two arguments (data, callback)`);this.options.editNode(n,(function(t){t!=null&&e.inMode===`editNode`&&e.body.data.nodes.getDataSet().update(t),e.showManipulatorToolbar()}))}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:`addEdgeMode`,value:function(){var e,t,n,r,i;if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode=`addEdge`,!0===this.guiEnabled){var a,o=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(o),this._createSeperator(),this._createDescription(o.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,B(a=this.toggleEditMode).call(a,this))}this._temporaryBindUI(`onTouch`,B(e=this._handleConnect).call(e,this)),this._temporaryBindUI(`onDragEnd`,B(t=this._finishConnect).call(t,this)),this._temporaryBindUI(`onDrag`,B(n=this._dragControlNode).call(n,this)),this._temporaryBindUI(`onRelease`,B(r=this._finishConnect).call(r,this)),this._temporaryBindUI(`onDragStart`,B(i=this._dragStartEdge).call(i,this)),this._temporaryBindUI(`onHold`,(function(){}))}},{key:`editEdgeMode`,value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode=`editEdge`,Sf(this.options.editEdge)!==`object`||typeof this.options.editEdge.editWithoutDrag!=`function`||(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId===void 0)){if(!0===this.guiEnabled){var e,t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,B(e=this.toggleEditMode).call(e,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var n,r,i,a,o=this.body.edges[this.edgeBeingEditedId],s=this._getNewTargetNode(o.from.x,o.from.y),c=this._getNewTargetNode(o.to.x,o.to.y);this.temporaryIds.nodes.push(s.id),this.temporaryIds.nodes.push(c.id),this.body.nodes[s.id]=s,this.body.nodeIndices.push(s.id),this.body.nodes[c.id]=c,this.body.nodeIndices.push(c.id),this._temporaryBindUI(`onTouch`,B(n=this._controlNodeTouch).call(n,this)),this._temporaryBindUI(`onTap`,(function(){})),this._temporaryBindUI(`onHold`,(function(){})),this._temporaryBindUI(`onDragStart`,B(r=this._controlNodeDragStart).call(r,this)),this._temporaryBindUI(`onDrag`,B(i=this._controlNodeDrag).call(i,this)),this._temporaryBindUI(`onDragEnd`,B(a=this._controlNodeDragEnd).call(a,this)),this._temporaryBindUI(`onMouseMove`,(function(){})),this._temporaryBindEvent(`beforeDrawing`,(function(e){var t=o.edgeType.findBorderPositions(e);!1===s.selected&&(s.x=t.from.x,s.y=t.from.y),!1===c.selected&&(c.x=t.to.x,c.y=t.to.y)})),this.body.emitter.emit(`_redraw`)}else this.showManipulatorToolbar()}else{var l=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(l.from.id,l.to.id)}}},{key:`deleteSelected`,value:function(){var e=this;!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode=`delete`;var t=this.selectionHandler.getSelectedNodeIds(),n=this.selectionHandler.getSelectedEdgeIds(),r=void 0;if(t.length>0){for(var i=0;i<t.length;i++)if(!0===this.body.nodes[t[i]].isCluster)return void alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);typeof this.options.deleteNode==`function`&&(r=this.options.deleteNode)}else n.length>0&&typeof this.options.deleteEdge==`function`&&(r=this.options.deleteEdge);if(typeof r==`function`){var a={nodes:t,edges:n};if(r.length!==2)throw Error(`The function for delete does not support two arguments (data, callback)`);r(a,(function(t){t!=null&&e.inMode===`delete`?(e.body.data.edges.getDataSet().remove(t.edges),e.body.data.nodes.getDataSet().remove(t.nodes),e.body.emitter.emit(`startSimulation`),e.showManipulatorToolbar()):(e.body.emitter.emit(`startSimulation`),e.showManipulatorToolbar())}))}else this.body.data.edges.getDataSet().remove(n),this.body.data.nodes.getDataSet().remove(t),this.body.emitter.emit(`startSimulation`),this.showManipulatorToolbar()}},{key:`_setup`,value:function(){!0===this.options.enabled?(this.guiEnabled=!0,this._createWrappers(),!1===this.editMode?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:`_createWrappers`,value:function(){(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement(`div`),this.manipulationDiv.className=`vis-manipulation`,!0===this.editMode?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`,!0===this.editMode?this.editModeDiv.style.display=`none`:this.editModeDiv.style.display=`block`,this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0)&&(this.closeDiv=document.createElement(`button`),this.closeDiv.className=`vis-close`,this.closeDiv.setAttribute(`aria-label`,this.options.locales[this.options.locale]?.close??this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}},{key:`_getNewTargetNode`,value:function(e,t){var n=kv({},this.options.controlNodeStyle);n.id=`targetNode`+Qw(),n.hidden=!1,n.physics=!1,n.x=e,n.y=t;var r=this.body.functions.createNode(n);return r.shape.boundingBox={left:e,right:e,top:t,bottom:t},r}},{key:`_createEditButton`,value:function(){var e;this._clean(),this.manipulationDOM={},Sv(this.editModeDiv);var t=this.options.locales[this.options.locale],n=this._createButton(`editMode`,`vis-edit vis-edit-mode`,t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(n),this._bindElementEvents(n,B(e=this.toggleEditMode).call(e,this))}},{key:`_clean`,value:function(){this.inMode=!1,!0===this.guiEnabled&&(Sv(this.editModeDiv),Sv(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit(`restorePhysics`)}},{key:`_cleanupDOMEventListeners`,value:function(){var e,t,n=RD(Dm(e=this._domEventListenerCleanupQueue).call(e,0));try{for(n.s();!(t=n.n()).done;)(0,t.value)()}catch(e){n.e(e)}finally{n.f()}}},{key:`_removeManipulationDOM`,value:function(){this._clean(),Sv(this.manipulationDiv),Sv(this.editModeDiv),Sv(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}},{key:`_createSeperator`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM[`seperatorLineDiv`+e]=document.createElement(`div`),this.manipulationDOM[`seperatorLineDiv`+e].className=`vis-separator-line`,this.manipulationDiv.appendChild(this.manipulationDOM[`seperatorLineDiv`+e])}},{key:`_createAddNodeButton`,value:function(e){var t,n=this._createButton(`addNode`,`vis-add`,e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.addNodeMode).call(t,this))}},{key:`_createAddEdgeButton`,value:function(e){var t,n=this._createButton(`addEdge`,`vis-connect`,e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.addEdgeMode).call(t,this))}},{key:`_createEditNodeButton`,value:function(e){var t,n=this._createButton(`editNode`,`vis-edit`,e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.editNode).call(t,this))}},{key:`_createEditEdgeButton`,value:function(e){var t,n=this._createButton(`editEdge`,`vis-edit`,e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.editEdgeMode).call(t,this))}},{key:`_createDeleteButton`,value:function(e){var t,n=this.options.rtl?`vis-delete-rtl`:`vis-delete`,r=this._createButton(`delete`,n,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,B(t=this.deleteSelected).call(t,this))}},{key:`_createBackButton`,value:function(e){var t,n=this._createButton(`back`,`vis-back`,e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.showManipulatorToolbar).call(t,this))}},{key:`_createButton`,value:function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`vis-label`;return this.manipulationDOM[e+`Div`]=document.createElement(`button`),this.manipulationDOM[e+`Div`].className=`vis-button `+t,this.manipulationDOM[e+`Label`]=document.createElement(`div`),this.manipulationDOM[e+`Label`].className=r,this.manipulationDOM[e+`Label`].innerText=n,this.manipulationDOM[e+`Div`].appendChild(this.manipulationDOM[e+`Label`]),this.manipulationDOM[e+`Div`]}},{key:`_createDescription`,value:function(e){this.manipulationDOM.descriptionLabel=document.createElement(`div`),this.manipulationDOM.descriptionLabel.className=`vis-none`,this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}},{key:`_temporaryBindEvent`,value:function(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}},{key:`_temporaryBindUI`,value:function(e,t){if(this.body.eventListeners[e]===void 0)throw Error(`This UI function does not exist. Typo? You tried: `+e+` possible are: `+Uh(Fp(this.body.eventListeners)));this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t}},{key:`_unbindTemporaryUIs`,value:function(){for(var e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}},{key:`_unbindTemporaryEvents`,value:function(){for(var e=0;e<this.temporaryEventFunctions.length;e++){var t=this.temporaryEventFunctions[e].event,n=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(t,n)}this.temporaryEventFunctions=[]}},{key:`_bindElementEvents`,value:function(e,t){var n=new ny(e,{});aT(n,t),this._domEventListenerCleanupQueue.push((function(){n.destroy()}));var r=function(e){var n=e.keyCode,r=e.key;r!==`Enter`&&r!==` `&&n!==13&&n!==32||t()};e.addEventListener(`keyup`,r,!1),this._domEventListenerCleanupQueue.push((function(){e.removeEventListener(`keyup`,r,!1)}))}},{key:`_cleanupTemporaryNodesAndEdges`,value:function(){for(var e=0;e<this.temporaryIds.edges.length;e++){var t;this.body.edges[this.temporaryIds.edges[e]].disconnect(),delete this.body.edges[this.temporaryIds.edges[e]];var n,r=Lh(t=this.body.edgeIndices).call(t,this.temporaryIds.edges[e]);r!==-1&&Dm(n=this.body.edgeIndices).call(n,r,1)}for(var i=0;i<this.temporaryIds.nodes.length;i++){var a;delete this.body.nodes[this.temporaryIds.nodes[i]];var o,s=Lh(a=this.body.nodeIndices).call(a,this.temporaryIds.nodes[i]);s!==-1&&Dm(o=this.body.nodeIndices).call(o,s,1)}this.temporaryIds={nodes:[],edges:[]}}},{key:`_controlNodeTouch`,value:function(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Mr({},this.body.view.translation)}},{key:`_controlNodeDragStart`,value:function(){var e=this.lastTouch,t=this.selectionHandler._pointerToPositionObject(e),n=this.body.nodes[this.temporaryIds.nodes[0]],r=this.body.nodes[this.temporaryIds.nodes[1]],i=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;var a=n.isOverlappingWith(t),o=r.isOverlappingWith(t);!0===a?(this.selectedControlNode=n,i.edgeType.from=n):!0===o&&(this.selectedControlNode=r,i.edgeType.to=r),this.selectedControlNode!==void 0&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit(`_redraw`)}},{key:`_controlNodeDrag`,value:function(e){this.body.emitter.emit(`disablePhysics`);var t=this.body.functions.getPointer(e.center),n=this.canvas.DOMtoCanvas(t);this.selectedControlNode===void 0?this.interactionHandler.onDrag(e):(this.selectedControlNode.x=n.x,this.selectedControlNode.y=n.y),this.body.emitter.emit(`_redraw`)}},{key:`_controlNodeDragEnd`,value:function(e){var t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),r=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode!==void 0){this.selectionHandler.unselectAll();for(var i=this.selectionHandler._getAllNodesOverlappingWith(n),a=void 0,o=i.length-1;o>=0;o--)if(i[o]!==this.selectedControlNode.id){a=this.body.nodes[i[o]];break}if(a!==void 0&&this.selectedControlNode!==void 0)if(!0===a.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var s=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===s.id?this._performEditEdge(a.id,r.to.id):this._performEditEdge(r.from.id,a.id)}else r.updateEdgeType(),this.body.emitter.emit(`restorePhysics`);this.body.emitter.emit(`_redraw`)}}},{key:`_handleConnect`,value:function(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Mr({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var t=this.lastTouch,n=this.selectionHandler.getNodeAt(t);if(n!==void 0)if(!0===n.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var r=this._getNewTargetNode(n.x,n.y);this.body.nodes[r.id]=r,this.body.nodeIndices.push(r.id);var i=this.body.functions.createEdge({id:`connectionEdge`+Qw(),from:n.id,to:r.id,physics:!1,smooth:{enabled:!0,type:`continuous`,roundness:.5}});this.body.edges[i.id]=i,this.body.edgeIndices.push(i.id),this.temporaryIds.nodes.push(r.id),this.temporaryIds.edges.push(i.id)}this.touchTime=new Date().valueOf()}}},{key:`_dragControlNode`,value:function(e){var t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),r=void 0;this.temporaryIds.edges[0]!==void 0&&(r=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var i=this.selectionHandler._getAllNodesOverlappingWith(n),a=void 0,o=i.length-1;o>=0;o--){var s;if(Lh(s=this.temporaryIds.nodes).call(s,i[o])===-1){a=this.body.nodes[i[o]];break}}if(e.controlEdge={from:r,to:a?a.id:void 0},this.selectionHandler.generateClickEvent(`controlNodeDragging`,e,t),this.temporaryIds.nodes[0]!==void 0){var c=this.body.nodes[this.temporaryIds.nodes[0]];c.x=this.canvas._XconvertDOMtoCanvas(t.x),c.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit(`_redraw`)}else this.interactionHandler.onDrag(e)}},{key:`_finishConnect`,value:function(e){var t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),r=void 0;this.temporaryIds.edges[0]!==void 0&&(r=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var i=this.selectionHandler._getAllNodesOverlappingWith(n),a=void 0,o=i.length-1;o>=0;o--){var s;if(Lh(s=this.temporaryIds.nodes).call(s,i[o])===-1){a=this.body.nodes[i[o]];break}}this._cleanupTemporaryNodesAndEdges(),a!==void 0&&(!0===a.isCluster?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[r]!==void 0&&this.body.nodes[a.id]!==void 0&&this._performAddEdge(r,a.id)),e.controlEdge={from:r,to:a?a.id:void 0},this.selectionHandler.generateClickEvent(`controlNodeDragEnd`,e,t),this.body.emitter.emit(`_redraw`)}},{key:`_dragStartEdge`,value:function(e){var t=this.lastTouch;this.selectionHandler.generateClickEvent(`dragStart`,e,t,void 0,!0)}},{key:`_performAddNode`,value:function(e){var t=this,n={id:Qw(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:`new`};if(typeof this.options.addNode==`function`){if(this.options.addNode.length!==2)throw this.showManipulatorToolbar(),Error(`The function for add does not support two arguments (data,callback)`);this.options.addNode(n,(function(e){e!=null&&t.inMode===`addNode`&&t.body.data.nodes.getDataSet().add(e),t.showManipulatorToolbar()}))}else this.body.data.nodes.getDataSet().add(n),this.showManipulatorToolbar()}},{key:`_performAddEdge`,value:function(e,t){var n=this,r={from:e,to:t};if(typeof this.options.addEdge==`function`){if(this.options.addEdge.length!==2)throw Error(`The function for connect does not support two arguments (data,callback)`);this.options.addEdge(r,(function(e){e!=null&&n.inMode===`addEdge`&&(n.body.data.edges.getDataSet().add(e),n.selectionHandler.unselectAll(),n.showManipulatorToolbar())}))}else this.body.data.edges.getDataSet().add(r),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:`_performEditEdge`,value:function(e,t){var n=this,r={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label},i=this.options.editEdge;if(Sf(i)===`object`&&(i=i.editWithoutDrag),typeof i==`function`){if(i.length!==2)throw Error(`The function for edit does not support two arguments (data, callback)`);i(r,(function(e){e==null||n.inMode!==`editEdge`?(n.body.edges[r.id].updateEdgeType(),n.body.emitter.emit(`_redraw`),n.showManipulatorToolbar()):(n.body.data.edges.getDataSet().update(e),n.selectionHandler.unselectAll(),n.showManipulatorToolbar())}))}else this.body.data.edges.getDataSet().update(r),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),e}(),Y=`string`,X=`boolean`,Z=`number`,VD=`array`,Q=`object`,HD=[`arrow`,`bar`,`box`,`circle`,`crow`,`curve`,`diamond`,`image`,`inv_curve`,`inv_triangle`,`triangle`,`vee`],UD={borderWidth:{number:Z},borderWidthSelected:{number:Z,undefined:`undefined`},brokenImage:{string:Y,undefined:`undefined`},chosen:{label:{boolean:X,function:`function`},node:{boolean:X,function:`function`},__type__:{object:Q,boolean:X}},color:{border:{string:Y},background:{string:Y},highlight:{border:{string:Y},background:{string:Y},__type__:{object:Q,string:Y}},hover:{border:{string:Y},background:{string:Y},__type__:{object:Q,string:Y}},__type__:{object:Q,string:Y}},opacity:{number:Z,undefined:`undefined`},fixed:{x:{boolean:X},y:{boolean:X},__type__:{object:Q,boolean:X}},font:{align:{string:Y},color:{string:Y},size:{number:Z},face:{string:Y},background:{string:Y},strokeWidth:{number:Z},strokeColor:{string:Y},vadjust:{number:Z},multi:{boolean:X,string:Y},bold:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},boldital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},ital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},mono:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},__type__:{object:Q,string:Y}},group:{string:Y,number:Z,undefined:`undefined`},heightConstraint:{minimum:{number:Z},valign:{string:Y},__type__:{object:Q,boolean:X,number:Z}},hidden:{boolean:X},icon:{face:{string:Y},code:{string:Y},size:{number:Z},color:{string:Y},weight:{string:Y,number:Z},__type__:{object:Q}},id:{string:Y,number:Z},image:{selected:{string:Y,undefined:`undefined`},unselected:{string:Y,undefined:`undefined`},__type__:{object:Q,string:Y}},imagePadding:{top:{number:Z},right:{number:Z},bottom:{number:Z},left:{number:Z},__type__:{object:Q,number:Z}},label:{string:Y,undefined:`undefined`},labelHighlightBold:{boolean:X},level:{number:Z,undefined:`undefined`},margin:{top:{number:Z},right:{number:Z},bottom:{number:Z},left:{number:Z},__type__:{object:Q,number:Z}},mass:{number:Z},physics:{boolean:X},scaling:{min:{number:Z},max:{number:Z},label:{enabled:{boolean:X},min:{number:Z},max:{number:Z},maxVisible:{number:Z},drawThreshold:{number:Z},__type__:{object:Q,boolean:X}},customScalingFunction:{function:`function`},__type__:{object:Q}},shadow:{enabled:{boolean:X},color:{string:Y},size:{number:Z},x:{number:Z},y:{number:Z},__type__:{object:Q,boolean:X}},shape:{string:[`custom`,`ellipse`,`circle`,`database`,`box`,`text`,`image`,`circularImage`,`diamond`,`dot`,`star`,`triangle`,`triangleDown`,`square`,`icon`,`hexagon`]},ctxRenderer:{function:`function`},shapeProperties:{borderDashes:{boolean:X,array:VD},borderRadius:{number:Z},interpolation:{boolean:X},useImageSize:{boolean:X},useBorderWithImage:{boolean:X},coordinateOrigin:{string:[`center`,`top-left`]},__type__:{object:Q}},size:{number:Z},title:{string:Y,dom:`dom`,undefined:`undefined`},value:{number:Z,undefined:`undefined`},widthConstraint:{minimum:{number:Z},maximum:{number:Z},__type__:{object:Q,boolean:X,number:Z}},x:{number:Z},y:{number:Z},__type__:{object:Q}},WD={configure:{enabled:{boolean:X},filter:{boolean:X,string:Y,array:VD,function:`function`},container:{dom:`dom`},showButton:{boolean:X},__type__:{object:Q,boolean:X,string:Y,array:VD,function:`function`}},edges:{arrows:{to:{enabled:{boolean:X},scaleFactor:{number:Z},type:{string:HD},imageHeight:{number:Z},imageWidth:{number:Z},src:{string:Y},__type__:{object:Q,boolean:X}},middle:{enabled:{boolean:X},scaleFactor:{number:Z},type:{string:HD},imageWidth:{number:Z},imageHeight:{number:Z},src:{string:Y},__type__:{object:Q,boolean:X}},from:{enabled:{boolean:X},scaleFactor:{number:Z},type:{string:HD},imageWidth:{number:Z},imageHeight:{number:Z},src:{string:Y},__type__:{object:Q,boolean:X}},__type__:{string:[`from`,`to`,`middle`],object:Q}},endPointOffset:{from:{number:Z},to:{number:Z},__type__:{object:Q,number:Z}},arrowStrikethrough:{boolean:X},background:{enabled:{boolean:X},color:{string:Y},size:{number:Z},dashes:{boolean:X,array:VD},__type__:{object:Q,boolean:X}},chosen:{label:{boolean:X,function:`function`},edge:{boolean:X,function:`function`},__type__:{object:Q,boolean:X}},color:{color:{string:Y},highlight:{string:Y},hover:{string:Y},inherit:{string:[`from`,`to`,`both`],boolean:X},opacity:{number:Z},__type__:{object:Q,string:Y}},dashes:{boolean:X,array:VD},font:{color:{string:Y},size:{number:Z},face:{string:Y},background:{string:Y},strokeWidth:{number:Z},strokeColor:{string:Y},align:{string:[`horizontal`,`top`,`middle`,`bottom`]},vadjust:{number:Z},multi:{boolean:X,string:Y},bold:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},boldital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},ital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},mono:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},__type__:{object:Q,string:Y}},hidden:{boolean:X},hoverWidth:{function:`function`,number:Z},label:{string:Y,undefined:`undefined`},labelHighlightBold:{boolean:X},length:{number:Z,undefined:`undefined`},physics:{boolean:X},scaling:{min:{number:Z},max:{number:Z},label:{enabled:{boolean:X},min:{number:Z},max:{number:Z},maxVisible:{number:Z},drawThreshold:{number:Z},__type__:{object:Q,boolean:X}},customScalingFunction:{function:`function`},__type__:{object:Q}},selectionWidth:{function:`function`,number:Z},selfReferenceSize:{number:Z},selfReference:{size:{number:Z},angle:{number:Z},renderBehindTheNode:{boolean:X},__type__:{object:Q}},shadow:{enabled:{boolean:X},color:{string:Y},size:{number:Z},x:{number:Z},y:{number:Z},__type__:{object:Q,boolean:X}},smooth:{enabled:{boolean:X},type:{string:[`dynamic`,`continuous`,`discrete`,`diagonalCross`,`straightCross`,`horizontal`,`vertical`,`curvedCW`,`curvedCCW`,`cubicBezier`]},roundness:{number:Z},forceDirection:{string:[`horizontal`,`vertical`,`none`],boolean:X},__type__:{object:Q,boolean:X}},title:{string:Y,undefined:`undefined`},width:{number:Z},widthConstraint:{maximum:{number:Z},__type__:{object:Q,boolean:X,number:Z}},value:{number:Z,undefined:`undefined`},__type__:{object:Q}},groups:{useDefaultGroups:{boolean:X},__any__:UD,__type__:{object:Q}},interaction:{dragNodes:{boolean:X},dragView:{boolean:X},hideEdgesOnDrag:{boolean:X},hideEdgesOnZoom:{boolean:X},hideNodesOnDrag:{boolean:X},hover:{boolean:X},keyboard:{enabled:{boolean:X},speed:{x:{number:Z},y:{number:Z},zoom:{number:Z},__type__:{object:Q}},bindToWindow:{boolean:X},autoFocus:{boolean:X},__type__:{object:Q,boolean:X}},multiselect:{boolean:X},navigationButtons:{boolean:X},selectable:{boolean:X},selectConnectedEdges:{boolean:X},hoverConnectedEdges:{boolean:X},tooltipDelay:{number:Z},zoomView:{boolean:X},zoomSpeed:{number:Z},__type__:{object:Q}},layout:{randomSeed:{undefined:`undefined`,number:Z,string:Y},improvedLayout:{boolean:X},clusterThreshold:{number:Z},hierarchical:{enabled:{boolean:X},levelSeparation:{number:Z},nodeSpacing:{number:Z},treeSpacing:{number:Z},blockShifting:{boolean:X},edgeMinimization:{boolean:X},parentCentralization:{boolean:X},direction:{string:[`UD`,`DU`,`LR`,`RL`]},sortMethod:{string:[`hubsize`,`directed`]},shakeTowards:{string:[`leaves`,`roots`]},__type__:{object:Q,boolean:X}},__type__:{object:Q}},manipulation:{enabled:{boolean:X},initiallyActive:{boolean:X},addNode:{boolean:X,function:`function`},addEdge:{boolean:X,function:`function`},editNode:{function:`function`},editEdge:{editWithoutDrag:{function:`function`},__type__:{object:Q,boolean:X,function:`function`}},deleteNode:{boolean:X,function:`function`},deleteEdge:{boolean:X,function:`function`},controlNodeStyle:UD,__type__:{object:Q,boolean:X}},nodes:UD,physics:{enabled:{boolean:X},barnesHut:{theta:{number:Z},gravitationalConstant:{number:Z},centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},damping:{number:Z},avoidOverlap:{number:Z},__type__:{object:Q}},forceAtlas2Based:{theta:{number:Z},gravitationalConstant:{number:Z},centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},damping:{number:Z},avoidOverlap:{number:Z},__type__:{object:Q}},repulsion:{centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},nodeDistance:{number:Z},damping:{number:Z},__type__:{object:Q}},hierarchicalRepulsion:{centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},nodeDistance:{number:Z},damping:{number:Z},avoidOverlap:{number:Z},__type__:{object:Q}},maxVelocity:{number:Z},minVelocity:{number:Z},solver:{string:[`barnesHut`,`repulsion`,`hierarchicalRepulsion`,`forceAtlas2Based`]},stabilization:{enabled:{boolean:X},iterations:{number:Z},updateInterval:{number:Z},onlyDynamicEdges:{boolean:X},fit:{boolean:X},__type__:{object:Q,boolean:X}},timestep:{number:Z},adaptiveTimestep:{boolean:X},wind:{x:{number:Z},y:{number:Z},__type__:{object:Q}},__type__:{object:Q,boolean:X}},autoResize:{boolean:X},clickToUse:{boolean:X},locale:{string:Y},locales:{__any__:{any:`any`},__type__:{object:Q}},height:{string:Y},width:{string:Y},__type__:{object:Q}},GD={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]}}},KD=function(e,t,n){var r;return!(!Jm(e).call(e,`physics`)||!Jm(r=GD.physics.solver).call(r,t)||n.physics.solver===t||t===`wind`)},qD=Object.freeze({__proto__:null,allOptions:WD,configuratorHideOption:KD,configureOptions:GD}),JD=function(){function e(){V(this,e)}return H(e,[{key:`getDistances`,value:function(e,t,n){for(var r={},i=e.edges,a=0;a<t.length;a++){var o={};r[t[a]]=o;for(var s=0;s<t.length;s++)o[t[s]]=a==s?0:1e9}for(var c=0;c<n.length;c++){var l=i[n[c]];!0===l.connected&&r[l.fromId]!==void 0&&r[l.toId]!==void 0&&(r[l.fromId][l.toId]=1,r[l.toId][l.fromId]=1)}for(var u=t.length,d=0;d<u;d++)for(var f=t[d],p=r[f],m=0;m<u-1;m++)for(var h=t[m],g=r[h],_=m+1;_<u;_++){var v=t[_],y=r[v],b=Math.min(g[v],g[f]+p[v]);g[v]=b,y[h]=b}return r}}]),e}(),YD=function(){function e(t,n,r){V(this,e),this.body=t,this.springLength=n,this.springConstant=r,this.distanceSolver=new JD}return H(e,[{key:`setOptions`,value:function(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}},{key:`solve`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(r),this._createK_matrix(r),this._createE_matrix();for(var i=0,a=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),o=1e9,s=0,c=0,l=0,u=0,d=0;o>.01&&i<a;){i+=1;var f=dp(this._getHighestEnergyNode(n),4);for(s=f[0],o=f[1],c=f[2],l=f[3],u=o,d=0;u>1&&d<5;){d+=1,this._moveNode(s,c,l);var p=dp(this._getEnergy(s),3);u=p[0],c=p[1],l=p[2]}}}},{key:`_getHighestEnergyNode`,value:function(e){for(var t=this.body.nodeIndices,n=this.body.nodes,r=0,i=t[0],a=0,o=0,s=0;s<t.length;s++){var c=t[s];if(!0!==n[c].predefinedPosition||!0===n[c].isCluster&&!0===e||!0!==n[c].options.fixed.x||!0!==n[c].options.fixed.y){var l=dp(this._getEnergy(c),3),u=l[0],d=l[1],f=l[2];r<u&&(r=u,i=c,a=d,o=f)}}return[i,r,a,o]}},{key:`_getEnergy`,value:function(e){var t=dp(this.E_sums[e],2),n=t[0],r=t[1];return[Math.sqrt(n**2+r**2),n,r]}},{key:`_moveNode`,value:function(e,t,n){for(var r=this.body.nodeIndices,i=this.body.nodes,a=0,o=0,s=0,c=i[e].x,l=i[e].y,u=this.K_matrix[e],d=this.L_matrix[e],f=0;f<r.length;f++){var p=r[f];if(p!==e){var m=i[p].x,h=i[p].y,g=u[p],_=d[p],v=1/((c-m)**2+(l-h)**2)**1.5;a+=g*(1-_*(l-h)**2*v),o+=g*(_*(c-m)*(l-h)*v),s+=g*(1-_*(c-m)**2*v)}}var y=(t/a+n/o)/(o/a-s/o),b=-(o*y+t)/a;i[e].x+=b,i[e].y+=y,this._updateE_matrix(e)}},{key:`_createL_matrix`,value:function(e){var t=this.body.nodeIndices,n=this.springLength;this.L_matrix=[];for(var r=0;r<t.length;r++){this.L_matrix[t[r]]={};for(var i=0;i<t.length;i++)this.L_matrix[t[r]][t[i]]=n*e[t[r]][t[i]]}}},{key:`_createK_matrix`,value:function(e){var t=this.body.nodeIndices,n=this.springConstant;this.K_matrix=[];for(var r=0;r<t.length;r++){this.K_matrix[t[r]]={};for(var i=0;i<t.length;i++)this.K_matrix[t[r]][t[i]]=n*e[t[r]][t[i]]**-2}}},{key:`_createE_matrix`,value:function(){var e=this.body.nodeIndices,t=this.body.nodes;this.E_matrix={},this.E_sums={};for(var n=0;n<e.length;n++)this.E_matrix[e[n]]=[];for(var r=0;r<e.length;r++){for(var i=e[r],a=t[i].x,o=t[i].y,s=0,c=0,l=r;l<e.length;l++){var u=e[l];if(u!==i){var d=t[u].x,f=t[u].y,p=1/Math.sqrt((a-d)**2+(o-f)**2);this.E_matrix[i][l]=[this.K_matrix[i][u]*(a-d-this.L_matrix[i][u]*(a-d)*p),this.K_matrix[i][u]*(o-f-this.L_matrix[i][u]*(o-f)*p)],this.E_matrix[u][r]=this.E_matrix[i][l],s+=this.E_matrix[i][l][0],c+=this.E_matrix[i][l][1]}}this.E_sums[i]=[s,c]}}},{key:`_updateE_matrix`,value:function(e){for(var t=this.body.nodeIndices,n=this.body.nodes,r=this.E_matrix[e],i=this.K_matrix[e],a=this.L_matrix[e],o=n[e].x,s=n[e].y,c=0,l=0,u=0;u<t.length;u++){var d=t[u];if(d!==e){var f=r[u],p=f[0],m=f[1],h=n[d].x,g=n[d].y,_=1/Math.sqrt((o-h)**2+(s-g)**2),v=i[d]*(o-h-a[d]*(o-h)*_),y=i[d]*(s-g-a[d]*(s-g)*_);r[u]=[v,y],c+=v,l+=y;var b=this.E_sums[d];b[0]+=v-p,b[1]+=y-m}}this.E_sums[e]=[c,l]}}]),e}();function $(e,t,n){var r,i,a,o,s=this;if(!(this instanceof $))throw SyntaxError(`Constructor must be called with the new operator`);this.options={},this.defaultOptions={locale:`en`,locales:Iy,clickToUse:!1},Mr(this.options,this.defaultOptions),this.body={container:e,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:B(r=this.on).call(r,this),off:B(i=this.off).call(i,this),emit:B(a=this.emit).call(a,this),once:B(o=this.once).call(o,this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}},selectionBox:{show:!1,position:{start:{x:0,y:0},end:{x:0,y:0}}}},this.bindEventListeners(),this.images=new Ry((function(){return s.body.emitter.emit(`_requestRedraw`)})),this.groups=new fx,this.canvas=new sT(this.body),this.selectionHandler=new wE(this.body,this.canvas),this.interactionHandler=new pT(this.body,this.canvas,this.selectionHandler),this.view=new cT(this.body,this.canvas),this.renderer=new rT(this.body,this.canvas),this.physics=new Kw(this.body),this.layoutEngine=new LD(this.body),this.clustering=new nT(this.body),this.manipulation=new BD(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new BC(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new Fw(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new YD(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(n),this.setData(t)}oi($.prototype),$.prototype.setOptions=function(e){var t=this;if(e===null&&(e=void 0),e!==void 0){if(!0===ay.validate(e,WD)&&console.error(`%cErrors have been found in the supplied options object.`,iy),Dv([`locale`,`locales`,`clickToUse`],this.options,e),e.locale!==void 0&&(e.locale=function(e,t){try{var n=dp(t.split(/[-_ /]/,2),2),r=n[0],i=n[1],a=r==null?null:r.toLowerCase(),o=i==null?null:i.toUpperCase();if(a&&o){var s,c=a+`-`+o;if(Object.prototype.hasOwnProperty.call(e,c))return c;console.warn(vp(s=`Unknown variant ${o} of language `).call(s,a,`.`))}if(a){var l=a;if(Object.prototype.hasOwnProperty.call(e,l))return l;console.warn(`Unknown language ${a}`)}return console.warn(`Unknown locale ${t}, falling back to English.`),`en`}catch(e){return console.error(e),console.warn(`Unexpected error while normalizing locale ${t}, falling back to English.`),`en`}}(e.locales||this.options.locales,e.locale)),e=this.layoutEngine.setOptions(e.layout,e),this.canvas.setOptions(e),this.groups.setOptions(e.groups),this.nodesHandler.setOptions(e.nodes),this.edgesHandler.setOptions(e.edges),this.physics.setOptions(e.physics),this.manipulation.setOptions(e.manipulation,e,this.options),this.interactionHandler.setOptions(e.interaction),this.renderer.setOptions(e.interaction),this.selectionHandler.setOptions(e.interaction),e.groups!==void 0&&this.body.emitter.emit(`refreshNodes`),`configure`in e&&(this.configurator||=new ty(this,this.body.container,GD,this.canvas.pixelRatio,KD),this.configurator.setOptions(e.configure)),this.configurator&&!0===this.configurator.options.enabled){var n={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};kv(n.nodes,this.nodesHandler.options),kv(n.edges,this.edgesHandler.options),kv(n.layout,this.layoutEngine.options),kv(n.interaction,this.selectionHandler.options),kv(n.interaction,this.renderer.options),kv(n.interaction,this.interactionHandler.options),kv(n.manipulation,this.manipulation.options),kv(n.physics,this.physics.options),kv(n.global,this.canvas.options),kv(n.global,this.options),this.configurator.setModuleOptions(n)}e.clickToUse===void 0?this.body.emitter.emit(`activate`):!0===e.clickToUse?this.activator===void 0&&(this.activator=new ey(this.canvas.frame),this.activator.on(`change`,(function(){t.body.emitter.emit(`activate`)}))):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit(`activate`)),this.canvas.setSize(),this.body.emitter.emit(`startSimulation`)}},$.prototype._updateVisibleIndices=function(){var e=this.body.nodes,t=this.body.edges;for(var n in this.body.nodeIndices=[],this.body.edgeIndices=[],e)Object.prototype.hasOwnProperty.call(e,n)&&(this.clustering._isClusteredNode(n)||!1!==e[n].options.hidden||this.body.nodeIndices.push(e[n].id));for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r],a=e[i.fromId],o=e[i.toId],s=a!==void 0&&o!==void 0;!this.clustering._isClusteredEdge(r)&&!1===i.options.hidden&&s&&!1===a.options.hidden&&!1===o.options.hidden&&this.body.edgeIndices.push(i.id)}},$.prototype.bindEventListeners=function(){var e=this;this.body.emitter.on(`_dataChanged`,(function(){e.edgesHandler._updateState(),e.body.emitter.emit(`_dataUpdated`)})),this.body.emitter.on(`_dataUpdated`,(function(){e.clustering._updateState(),e._updateVisibleIndices(),e._updateValueRange(e.body.nodes),e._updateValueRange(e.body.edges),e.body.emitter.emit(`startSimulation`),e.body.emitter.emit(`_requestRedraw`)}))},$.prototype.setData=function(e){if(this.body.emitter.emit(`resetPhysics`),this.body.emitter.emit(`_resetData`),this.selectionHandler.unselectAll(),e&&e.dot&&(e.nodes||e.edges))throw SyntaxError(`Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.`);if(this.setOptions(e&&e.options),e&&e.dot){console.warn(`The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);`);var t=My(e.dot);this.setData(t)}else if(e&&e.gephi){console.warn(`The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);`);var n=Py(e.gephi);this.setData(n)}else this.nodesHandler.setData(e&&e.nodes,!0),this.edgesHandler.setData(e&&e.edges,!0),this.body.emitter.emit(`_dataChanged`),this.body.emitter.emit(`_dataLoaded`),this.body.emitter.emit(`initPhysics`)},$.prototype.destroy=function(){for(var e in 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,this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&delete this.body.nodes[e];for(var t in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,t)&&delete this.body.edges[t];Sv(this.body.container)},$.prototype._updateValueRange=function(e){var t,n=void 0,r=void 0,i=0;for(t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var a=e[t].getValue();a!==void 0&&(n=n===void 0?a:Math.min(a,n),r=r===void 0?a:Math.max(a,r),i+=a)}if(n!==void 0&&r!==void 0)for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&e[t].setValueRange(n,r,i)},$.prototype.isActive=function(){return!this.activator||this.activator.active},$.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)},$.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)},$.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)},$.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)},$.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)},$.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)},$.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)},$.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)},$.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)},$.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)},$.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)},$.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)},$.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)},$.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)},$.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)},$.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)},$.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)},$.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)},$.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)},$.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)},$.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)},$.prototype.editNodeMode=function(){return console.warn(`Deprecated: Please use editNode instead of editNodeMode.`),this.manipulation.editNode.apply(this.manipulation,arguments)},$.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)},$.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)},$.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)},$.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)},$.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)},$.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)},$.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)},$.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)},$.prototype.getConnectedNodes=function(e){return this.body.nodes[e]===void 0?this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments):this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments)},$.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)},$.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)},$.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)},$.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)},$.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)},$.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)},$.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)},$.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)},$.prototype.getNodeAt=function(){var e=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return e!==void 0&&e.id!==void 0?e.id:e},$.prototype.getEdgeAt=function(){var e=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return e!==void 0&&e.id!==void 0?e.id:e},$.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)},$.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)},$.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()},$.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)},$.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)},$.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)},$.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)},$.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)},$.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)},$.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)},$.prototype.getOptionsFromConfigurator=function(){var e={};return this.configurator&&(e=this.configurator.getOptions.apply(this.configurator)),e};var XD=My;e.Network=$,e.NetworkImages=Ry,e.networkDOTParser=Ny,e.networkGephiParser=Fy,e.networkOptions=qD,e.parseDOTNetwork=XD,e.parseGephiNetwork=Py}))})),re=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):r((n=typeof globalThis<`u`?globalThis:n||self).vis=n.vis||{})})(e,(function(e){function t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var n=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var i={exports:{}},a=function(e){return e&&e.Math===Math&&e},o=a(typeof globalThis==`object`&&globalThis)||a(typeof window==`object`&&window)||a(typeof self==`object`&&self)||a(typeof n==`object`&&n)||function(){return this}()||n||Function(`return this`)(),s=function(e){try{return!!e()}catch{return!0}},c=!s((function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})),l=c,u=Function.prototype,d=u.apply,f=u.call,p=typeof Reflect==`object`&&Reflect.apply||(l?f.bind(d):function(){return f.apply(d,arguments)}),m=c,h=Function.prototype,g=h.call,_=m&&h.bind.bind(g,g),v=m?_:function(e){return function(){return g.apply(e,arguments)}},y=v,b=y({}.toString),x=y(``.slice),S=function(e){return x(b(e),8,-1)},ee=S,C=v,te=function(e){if(ee(e)===`Function`)return C(e)},w=typeof document==`object`&&document.all,ne={all:w,IS_HTMLDDA:w===void 0&&w!==void 0},re=ne.all,T=ne.IS_HTMLDDA?function(e){return typeof e==`function`||e===re}:function(e){return typeof e==`function`},E={},D=!s((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})),O=c,ie=Function.prototype.call,ae=O?ie.bind(ie):function(){return ie.apply(ie,arguments)},k={},oe={}.propertyIsEnumerable,se=Object.getOwnPropertyDescriptor;k.f=se&&!oe.call({1:2},1)?function(e){var t=se(this,e);return!!t&&t.enumerable}:oe;var ce,le,ue=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},de=s,fe=S,pe=Object,me=v(``.split),he=de((function(){return!pe(`z`).propertyIsEnumerable(0)}))?function(e){return fe(e)===`String`?me(e,``):pe(e)}:pe,ge=function(e){return e==null},_e=ge,ve=TypeError,ye=function(e){if(_e(e))throw new ve(`Can't call method on `+e);return e},be=he,xe=ye,A=function(e){return be(xe(e))},Se=T,Ce=ne.all,j=ne.IS_HTMLDDA?function(e){return typeof e==`object`?e!==null:Se(e)||e===Ce}:function(e){return typeof e==`object`?e!==null:Se(e)},M={},N=M,we=o,Te=T,Ee=function(e){return Te(e)?e:void 0},P=function(e,t){return arguments.length<2?Ee(N[e])||Ee(we[e]):N[e]&&N[e][t]||we[e]&&we[e][t]},F=v({}.isPrototypeOf),De=typeof navigator<`u`&&String(navigator.userAgent)||``,Oe=o,ke=De,Ae=Oe.process,I=Oe.Deno,je=Ae&&Ae.versions||I&&I.version,Me=je&&je.v8;Me&&(le=(ce=Me.split(`.`))[0]>0&&ce[0]<4?1:+(ce[0]+ce[1])),!le&&ke&&(!(ce=ke.match(/Edge\/(\d+)/))||ce[1]>=74)&&(ce=ke.match(/Chrome\/(\d+)/))&&(le=+ce[1]);var Ne=le,Pe=Ne,Fe=s,Ie=o.String,Le=!!Object.getOwnPropertySymbols&&!Fe((function(){var e=Symbol(`symbol detection`);return!Ie(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Pe&&Pe<41})),Re=Le&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,ze=P,Be=T,Ve=F,He=Object,Ue=Re?function(e){return typeof e==`symbol`}:function(e){var t=ze(`Symbol`);return Be(t)&&Ve(t.prototype,He(e))},We=String,Ge=function(e){try{return We(e)}catch{return`Object`}},Ke=T,qe=Ge,Je=TypeError,Ye=function(e){if(Ke(e))return e;throw new Je(qe(e)+` is not a function`)},Xe=Ye,Ze=ge,Qe=function(e,t){var n=e[t];return Ze(n)?void 0:Xe(n)},$e=ae,et=T,tt=j,nt=TypeError,rt={exports:{}},it=o,at=Object.defineProperty,ot=function(e,t){try{at(it,e,{value:t,configurable:!0,writable:!0})}catch{it[e]=t}return t},st=`__core-js_shared__`,ct=o[st]||ot(st,{}),lt=ct;(rt.exports=function(e,t){return lt[e]||(lt[e]=t===void 0?{}:t)})(`versions`,[]).push({version:`3.33.2`,mode:`pure`,copyright:`© 2014-2023 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE`,source:`https://github.com/zloirock/core-js`});var ut=rt.exports,dt=ye,ft=Object,pt=function(e){return ft(dt(e))},mt=pt,ht=v({}.hasOwnProperty),gt=Object.hasOwn||function(e,t){return ht(mt(e),t)},_t=v,vt=0,yt=Math.random(),bt=_t(1 .toString),xt=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+bt(++vt+yt,36)},St=ut,Ct=gt,wt=xt,Tt=Le,Et=Re,Dt=o.Symbol,Ot=St(`wks`),kt=Et?Dt.for||Dt:Dt&&Dt.withoutSetter||wt,At=function(e){return Ct(Ot,e)||(Ot[e]=Tt&&Ct(Dt,e)?Dt[e]:kt(`Symbol.`+e)),Ot[e]},jt=ae,Mt=j,Nt=Ue,Pt=Qe,Ft=function(e,t){var n,r;if(t===`string`&&et(n=e.toString)&&!tt(r=$e(n,e))||et(n=e.valueOf)&&!tt(r=$e(n,e))||t!==`string`&&et(n=e.toString)&&!tt(r=$e(n,e)))return r;throw new nt(`Can't convert object to primitive value`)},It=TypeError,Lt=At(`toPrimitive`),Rt=function(e,t){if(!Mt(e)||Nt(e))return e;var n,r=Pt(e,Lt);if(r){if(t===void 0&&(t=`default`),n=jt(r,e,t),!Mt(n)||Nt(n))return n;throw new It(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),Ft(e,t)},zt=Ue,Bt=function(e){var t=Rt(e,`string`);return zt(t)?t:t+``},Vt=j,Ht=o.document,Ut=Vt(Ht)&&Vt(Ht.createElement),Wt=function(e){return Ut?Ht.createElement(e):{}},Gt=Wt,Kt=!D&&!s((function(){return Object.defineProperty(Gt(`div`),`a`,{get:function(){return 7}}).a!==7})),qt=D,Jt=ae,Yt=k,Xt=ue,Zt=A,Qt=Bt,$t=gt,en=Kt,tn=Object.getOwnPropertyDescriptor;E.f=qt?tn:function(e,t){if(e=Zt(e),t=Qt(t),en)try{return tn(e,t)}catch{}if($t(e,t))return Xt(!Jt(Yt.f,e,t),e[t])};var nn=s,rn=T,an=/#|\.prototype\./,on=function(e,t){var n=cn[sn(e)];return n===un||n!==ln&&(rn(t)?nn(t):!!t)},sn=on.normalize=function(e){return String(e).replace(an,`.`).toLowerCase()},cn=on.data={},ln=on.NATIVE=`N`,un=on.POLYFILL=`P`,dn=on,fn=Ye,pn=c,mn=te(te.bind),hn=function(e,t){return fn(e),t===void 0?e:pn?mn(e,t):function(){return e.apply(t,arguments)}},gn={},_n=D&&s((function(){return Object.defineProperty((function(){}),`prototype`,{value:42,writable:!1}).prototype!==42})),vn=j,yn=String,bn=TypeError,xn=function(e){if(vn(e))return e;throw new bn(yn(e)+` is not an object`)},Sn=D,Cn=Kt,wn=_n,Tn=xn,En=Bt,Dn=TypeError,On=Object.defineProperty,kn=Object.getOwnPropertyDescriptor,An=`enumerable`,jn=`configurable`,Mn=`writable`;gn.f=Sn?wn?function(e,t,n){if(Tn(e),t=En(t),Tn(n),typeof e==`function`&&t===`prototype`&&`value`in n&&Mn in n&&!n[Mn]){var r=kn(e,t);r&&r[Mn]&&(e[t]=n.value,n={configurable:jn in n?n[jn]:r[jn],enumerable:An in n?n[An]:r[An],writable:!1})}return On(e,t,n)}:On:function(e,t,n){if(Tn(e),t=En(t),Tn(n),Cn)try{return On(e,t,n)}catch{}if(`get`in n||`set`in n)throw new Dn(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e};var Nn=gn,Pn=ue,Fn=D?function(e,t,n){return Nn.f(e,t,Pn(1,n))}:function(e,t,n){return e[t]=n,e},In=o,Ln=p,Rn=te,zn=T,Bn=E.f,Vn=dn,Hn=M,Un=hn,Wn=Fn,Gn=gt,L=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return Ln(e,this,arguments)};return t.prototype=e.prototype,t},R=function(e,t){var n,r,i,a,o,s,c,l,u,d=e.target,f=e.global,p=e.stat,m=e.proto,h=f?In:p?In[d]:(In[d]||{}).prototype,g=f?Hn:Hn[d]||Wn(Hn,d,{})[d],_=g.prototype;for(a in t)r=!(n=Vn(f?a:d+(p?`.`:`#`)+a,e.forced))&&h&&Gn(h,a),s=g[a],r&&(c=e.dontCallGetSet?(u=Bn(h,a))&&u.value:h[a]),o=r&&c?c:t[a],r&&typeof s==typeof o||(l=e.bind&&r?Un(o,In):e.wrap&&r?L(o):m&&zn(o)?Rn(o):o,(e.sham||o&&o.sham||s&&s.sham)&&Wn(l,`sham`,!0),Wn(g,a,l),m&&(Gn(Hn,i=d+`Prototype`)||Wn(Hn,i,{}),Wn(Hn[i],a,o),e.real&&_&&(n||!_[a])&&Wn(_,a,o)))},Kn=R,qn=D,Jn=gn.f;Kn({target:`Object`,stat:!0,forced:Object.defineProperty!==Jn,sham:!qn},{defineProperty:Jn});var Yn=M.Object,Xn=i.exports=function(e,t,n){return Yn.defineProperty(e,t,n)};Yn.defineProperty.sham&&(Xn.sham=!0);var Zn=i.exports,Qn=Zn,$n=r(Qn),er=S,tr=Array.isArray||function(e){return er(e)===`Array`},nr=Math.ceil,rr=Math.floor,ir=Math.trunc||function(e){var t=+e;return(t>0?rr:nr)(t)},ar=function(e){var t=+e;return t!=t||t===0?0:ir(t)},or=ar,z=Math.min,sr=function(e){return e>0?z(or(e),9007199254740991):0},cr=function(e){return sr(e.length)},lr=TypeError,ur=function(e){if(e>9007199254740991)throw lr(`Maximum allowed index exceeded`);return e},dr=Bt,fr=gn,pr=ue,mr=function(e,t,n){var r=dr(t);r in e?fr.f(e,r,pr(0,n)):e[r]=n},hr={};hr[At(`toStringTag`)]=`z`;var gr=String(hr)===`[object z]`,_r=gr,vr=T,yr=S,br=At(`toStringTag`),xr=Object,Sr=yr(function(){return arguments}())===`Arguments`,Cr=_r?yr:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=function(e,t){try{return e[t]}catch{}}(t=xr(e),br))==`string`?n:Sr?yr(t):(r=yr(t))===`Object`&&vr(t.callee)?`Arguments`:r},wr=T,Tr=ct,Er=v(Function.toString);wr(Tr.inspectSource)||(Tr.inspectSource=function(e){return Er(e)});var Dr=Tr.inspectSource,Or=v,kr=s,Ar=T,jr=Cr,Mr=Dr,Nr=function(){},Pr=[],Fr=P(`Reflect`,`construct`),Ir=/^\s*(?:class|function)\b/,Lr=Or(Ir.exec),Rr=!Ir.test(Nr),zr=function(e){if(!Ar(e))return!1;try{return Fr(Nr,Pr,e),!0}catch{return!1}},Br=function(e){if(!Ar(e))return!1;switch(jr(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return Rr||!!Lr(Ir,Mr(e))}catch{return!0}};Br.sham=!0;var Vr=!Fr||kr((function(){var e;return zr(zr.call)||!zr(Object)||!zr((function(){e=!0}))||e}))?Br:zr,Hr=tr,Ur=Vr,Wr=j,Gr=At(`species`),Kr=Array,qr=function(e){var t;return Hr(e)&&(t=e.constructor,(Ur(t)&&(t===Kr||Hr(t.prototype))||Wr(t)&&(t=t[Gr])===null)&&(t=void 0)),t===void 0?Kr:t},Jr=function(e,t){return new(qr(e))(t===0?0:t)},Yr=s,Xr=Ne,Zr=At(`species`),Qr=function(e){return Xr>=51||!Yr((function(){var t=[];return(t.constructor={})[Zr]=function(){return{foo:1}},t[e](Boolean).foo!==1}))},B=R,$r=s,ei=tr,ti=j,ni=pt,ri=cr,ii=ur,ai=mr,oi=Jr,si=Qr,ci=Ne,li=At(`isConcatSpreadable`),ui=ci>=51||!$r((function(){var e=[];return e[li]=!1,e.concat()[0]!==e})),di=function(e){if(!ti(e))return!1;var t=e[li];return t===void 0?ei(e):!!t};B({target:`Array`,proto:!0,arity:1,forced:!ui||!si(`concat`)},{concat:function(e){var t,n,r,i,a,o=ni(this),s=oi(o,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(di(a=t===-1?o:arguments[t]))for(i=ri(a),ii(c+i),n=0;n<i;n++,c++)n in a&&ai(s,c,a[n]);else ii(c+1),ai(s,c++,a);return s.length=c,s}});var fi=Cr,pi=String,mi=function(e){if(fi(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return pi(e)},hi={},gi=ar,_i=Math.max,vi=Math.min,yi=function(e,t){var n=gi(e);return n<0?_i(n+t,0):vi(n,t)},bi=A,xi=yi,Si=cr,Ci=function(e){return function(t,n,r){var i,a=bi(t),o=Si(a),s=xi(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},wi={includes:Ci(!0),indexOf:Ci(!1)},Ti={},Ei=gt,Di=A,Oi=wi.indexOf,ki=Ti,Ai=v([].push),ji=function(e,t){var n,r=Di(e),i=0,a=[];for(n in r)!Ei(ki,n)&&Ei(r,n)&&Ai(a,n);for(;t.length>i;)Ei(r,n=t[i++])&&(~Oi(a,n)||Ai(a,n));return a},Mi=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],Ni=ji,Pi=Mi,Fi=Object.keys||function(e){return Ni(e,Pi)},Ii=D,Li=_n,Ri=gn,zi=xn,Bi=A,Vi=Fi;hi.f=Ii&&!Li?Object.defineProperties:function(e,t){zi(e);for(var n,r=Bi(t),i=Vi(t),a=i.length,o=0;a>o;)Ri.f(e,n=i[o++],r[n]);return e};var Hi,Ui=P(`document`,`documentElement`),Wi=xt,Gi=ut(`keys`),Ki=function(e){return Gi[e]||(Gi[e]=Wi(e))},qi=xn,Ji=hi,Yi=Mi,Xi=Ti,Zi=Ui,Qi=Wt,$i=`prototype`,ea=`script`,ta=Ki(`IE_PROTO`),na=function(){},ra=function(e){return`<`+ea+`>`+e+`</`+ea+`>`},ia=function(e){e.write(ra(``)),e.close();var t=e.parentWindow.Object;return e=null,t},aa=function(){try{Hi=new ActiveXObject(`htmlfile`)}catch{}var e,t,n;aa=typeof document<`u`?document.domain&&Hi?ia(Hi):(t=Qi(`iframe`),n=`java`+ea+`:`,t.style.display=`none`,Zi.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(ra(`document.F=Object`)),e.close(),e.F):ia(Hi);for(var r=Yi.length;r--;)delete aa[$i][Yi[r]];return aa()};Xi[ta]=!0;var oa=Object.create||function(e,t){var n;return e===null?n=aa():(na[$i]=qi(e),n=new na,na[$i]=null,n[ta]=e),t===void 0?n:Ji.f(n,t)},sa={},ca=ji,la=Mi.concat(`length`,`prototype`);sa.f=Object.getOwnPropertyNames||function(e){return ca(e,la)};var ua={},da=yi,fa=cr,pa=mr,ma=Array,ha=Math.max,ga=function(e,t,n){for(var r=fa(e),i=da(t,r),a=da(n===void 0?r:n,r),o=ma(ha(a-i,0)),s=0;i<a;i++,s++)pa(o,s,e[i]);return o.length=s,o},_a=S,va=A,ya=sa.f,ba=ga,xa=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];ua.f=function(e){return xa&&_a(e)===`Window`?function(e){try{return ya(e)}catch{return ba(xa)}}(e):ya(va(e))};var Sa={};Sa.f=Object.getOwnPropertySymbols;var Ca=Fn,wa=function(e,t,n,r){return r&&r.enumerable?e[t]=n:Ca(e,t,n),e},Ta=gn,Ea=function(e,t,n){return Ta.f(e,t,n)},Da={};Da.f=At;var Oa,ka,Aa,ja=M,Ma=gt,Na=Da,Pa=gn.f,Fa=function(e){var t=ja.Symbol||={};Ma(t,e)||Pa(t,e,{value:Na.f(e)})},Ia=ae,La=P,Ra=At,za=wa,Ba=function(){var e=La(`Symbol`),t=e&&e.prototype,n=t&&t.valueOf,r=Ra(`toPrimitive`);t&&!t[r]&&za(t,r,(function(e){return Ia(n,this)}),{arity:1})},Va=Cr,Ha=gr?{}.toString:function(){return`[object `+Va(this)+`]`},Ua=gr,Wa=gn.f,Ga=Fn,Ka=gt,qa=Ha,Ja=At(`toStringTag`),Ya=function(e,t,n,r){if(e){var i=n?e:e.prototype;Ka(i,Ja)||Wa(i,Ja,{configurable:!0,value:t}),r&&!Ua&&Ga(i,`toString`,qa)}},Xa=T,Za=o.WeakMap,Qa=Xa(Za)&&/native code/.test(String(Za)),$a=o,eo=j,to=Fn,no=gt,ro=ct,io=Ki,ao=Ti,oo=`Object already initialized`,so=$a.TypeError,co=$a.WeakMap;if(Qa||ro.state){var lo=ro.state||=new co;lo.get=lo.get,lo.has=lo.has,lo.set=lo.set,Oa=function(e,t){if(lo.has(e))throw new so(oo);return t.facade=e,lo.set(e,t),t},ka=function(e){return lo.get(e)||{}},Aa=function(e){return lo.has(e)}}else{var uo=io(`state`);ao[uo]=!0,Oa=function(e,t){if(no(e,uo))throw new so(oo);return t.facade=e,to(e,uo,t),t},ka=function(e){return no(e,uo)?e[uo]:{}},Aa=function(e){return no(e,uo)}}var fo={set:Oa,get:ka,has:Aa,enforce:function(e){return Aa(e)?ka(e):Oa(e,{})},getterFor:function(e){return function(t){var n;if(!eo(t)||(n=ka(t)).type!==e)throw new so(`Incompatible receiver, `+e+` required`);return n}}},po=hn,mo=he,ho=pt,go=cr,_o=Jr,vo=v([].push),yo=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(c,l,u,d){for(var f,p,m=ho(c),h=mo(m),g=po(l,u),_=go(h),v=0,y=d||_o,b=t?y(c,_):n||o?y(c,0):void 0;_>v;v++)if((s||v in h)&&(p=g(f=h[v],v,m),e))if(t)b[v]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:vo(b,f)}else switch(e){case 4:return!1;case 7:vo(b,f)}return a?-1:r||i?i:b}},bo={forEach:yo(0),map:yo(1),filter:yo(2),some:yo(3),every:yo(4),find:yo(5),findIndex:yo(6),filterReject:yo(7)},xo=R,So=o,Co=ae,wo=v,To=D,Eo=Le,Do=s,Oo=gt,ko=F,Ao=xn,jo=A,Mo=Bt,No=mi,Po=ue,Fo=oa,Io=Fi,Lo=sa,Ro=ua,zo=Sa,Bo=E,Vo=gn,Ho=hi,Uo=k,Wo=wa,Go=Ea,Ko=ut,qo=Ti,Jo=xt,Yo=At,Xo=Da,Zo=Fa,Qo=Ba,$o=Ya,es=fo,ts=bo.forEach,ns=Ki(`hidden`),rs=`Symbol`,is=`prototype`,as=es.set,os=es.getterFor(rs),ss=Object[is],cs=So.Symbol,ls=cs&&cs[is],us=So.RangeError,ds=So.TypeError,fs=So.QObject,ps=Bo.f,ms=Vo.f,hs=Ro.f,gs=Uo.f,_s=wo([].push),vs=Ko(`symbols`),ys=Ko(`op-symbols`),bs=Ko(`wks`),xs=!fs||!fs[is]||!fs[is].findChild,Ss=function(e,t,n){var r=ps(ss,t);r&&delete ss[t],ms(e,t,n),r&&e!==ss&&ms(ss,t,r)},Cs=To&&Do((function(){return Fo(ms({},`a`,{get:function(){return ms(this,`a`,{value:7}).a}})).a!==7}))?Ss:ms,ws=function(e,t){var n=vs[e]=Fo(ls);return as(n,{type:rs,tag:e,description:t}),To||(n.description=t),n},Ts=function(e,t,n){e===ss&&Ts(ys,t,n),Ao(e);var r=Mo(t);return Ao(n),Oo(vs,r)?(n.enumerable?(Oo(e,ns)&&e[ns][r]&&(e[ns][r]=!1),n=Fo(n,{enumerable:Po(0,!1)})):(Oo(e,ns)||ms(e,ns,Po(1,{})),e[ns][r]=!0),Cs(e,r,n)):ms(e,r,n)},Es=function(e,t){Ao(e);var n=jo(t);return ts(Io(n).concat(As(n)),(function(t){To&&!Co(Ds,n,t)||Ts(e,t,n[t])})),e},Ds=function(e){var t=Mo(e),n=Co(gs,this,t);return!(this===ss&&Oo(vs,t)&&!Oo(ys,t))&&(!(n||!Oo(this,t)||!Oo(vs,t)||Oo(this,ns)&&this[ns][t])||n)},Os=function(e,t){var n=jo(e),r=Mo(t);if(n!==ss||!Oo(vs,r)||Oo(ys,r)){var i=ps(n,r);return!i||!Oo(vs,r)||Oo(n,ns)&&n[ns][r]||(i.enumerable=!0),i}},ks=function(e){var t=hs(jo(e)),n=[];return ts(t,(function(e){Oo(vs,e)||Oo(qo,e)||_s(n,e)})),n},As=function(e){var t=e===ss,n=hs(t?ys:jo(e)),r=[];return ts(n,(function(e){!Oo(vs,e)||t&&!Oo(ss,e)||_s(r,vs[e])})),r};Eo||(cs=function(){if(ko(ls,this))throw new ds(`Symbol is not a constructor`);var e=arguments.length&&arguments[0]!==void 0?No(arguments[0]):void 0,t=Jo(e),n=function(e){var r=this===void 0?So:this;r===ss&&Co(n,ys,e),Oo(r,ns)&&Oo(r[ns],t)&&(r[ns][t]=!1);var i=Po(1,e);try{Cs(r,t,i)}catch(e){if(!(e instanceof us))throw e;Ss(r,t,i)}};return To&&xs&&Cs(ss,t,{configurable:!0,set:n}),ws(t,e)},Wo(ls=cs[is],`toString`,(function(){return os(this).tag})),Wo(cs,`withoutSetter`,(function(e){return ws(Jo(e),e)})),Uo.f=Ds,Vo.f=Ts,Ho.f=Es,Bo.f=Os,Lo.f=Ro.f=ks,zo.f=As,Xo.f=function(e){return ws(Yo(e),e)},To&&Go(ls,`description`,{configurable:!0,get:function(){return os(this).description}})),xo({global:!0,constructor:!0,wrap:!0,forced:!Eo,sham:!Eo},{Symbol:cs}),ts(Io(bs),(function(e){Zo(e)})),xo({target:rs,stat:!0,forced:!Eo},{useSetter:function(){xs=!0},useSimple:function(){xs=!1}}),xo({target:`Object`,stat:!0,forced:!Eo,sham:!To},{create:function(e,t){return t===void 0?Fo(e):Es(Fo(e),t)},defineProperty:Ts,defineProperties:Es,getOwnPropertyDescriptor:Os}),xo({target:`Object`,stat:!0,forced:!Eo},{getOwnPropertyNames:ks}),Qo(),$o(cs,rs),qo[ns]=!0;var js=Le&&!!Symbol.for&&!!Symbol.keyFor,Ms=R,Ns=P,Ps=gt,Fs=mi,Is=ut,Ls=js,Rs=Is(`string-to-symbol-registry`),zs=Is(`symbol-to-string-registry`);Ms({target:`Symbol`,stat:!0,forced:!Ls},{for:function(e){var t=Fs(e);if(Ps(Rs,t))return Rs[t];var n=Ns(`Symbol`)(t);return Rs[t]=n,zs[n]=t,n}});var Bs=R,Vs=gt,Hs=Ue,Us=Ge,Ws=js,Gs=ut(`symbol-to-string-registry`);Bs({target:`Symbol`,stat:!0,forced:!Ws},{keyFor:function(e){if(!Hs(e))throw TypeError(Us(e)+` is not a symbol`);if(Vs(Gs,e))return Gs[e]}});var Ks=v([].slice),qs=tr,Js=T,Ys=S,Xs=mi,Zs=v([].push),Qs=R,$s=P,ec=p,tc=ae,nc=v,rc=s,ic=T,ac=Ue,oc=Ks,sc=function(e){if(Js(e))return e;if(qs(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i==`string`?Zs(n,i):typeof i!=`number`&&Ys(i)!==`Number`&&Ys(i)!==`String`||Zs(n,Xs(i))}var a=n.length,o=!0;return function(e,t){if(o)return o=!1,t;if(qs(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},cc=Le,lc=String,uc=$s(`JSON`,`stringify`),dc=nc(/./.exec),fc=nc(``.charAt),pc=nc(``.charCodeAt),mc=nc(``.replace),hc=nc(1 .toString),gc=/[\uD800-\uDFFF]/g,_c=/^[\uD800-\uDBFF]$/,vc=/^[\uDC00-\uDFFF]$/,yc=!cc||rc((function(){var e=$s(`Symbol`)(`stringify detection`);return uc([e])!==`[null]`||uc({a:e})!==`{}`||uc(Object(e))!==`{}`})),bc=rc((function(){return uc(`\udf06\ud834`)!==`"\\udf06\\ud834"`||uc(`\udead`)!==`"\\udead"`})),xc=function(e,t){var n=oc(arguments),r=sc(t);if(ic(r)||e!==void 0&&!ac(e))return n[1]=function(e,t){if(ic(r)&&(t=tc(r,this,lc(e),t)),!ac(t))return t},ec(uc,null,n)},V=function(e,t,n){var r=fc(n,t-1),i=fc(n,t+1);return dc(_c,e)&&!dc(vc,i)||dc(vc,e)&&!dc(_c,r)?`\\u`+hc(pc(e,0),16):e};uc&&Qs({target:`JSON`,stat:!0,arity:3,forced:yc||bc},{stringify:function(e,t,n){var r=oc(arguments),i=ec(yc?xc:uc,null,r);return bc&&typeof i==`string`?mc(i,gc,V):i}});var Sc=Sa,Cc=pt;R({target:`Object`,stat:!0,forced:!Le||s((function(){Sc.f(1)}))},{getOwnPropertySymbols:function(e){var t=Sc.f;return t?t(Cc(e)):[]}}),Fa(`asyncIterator`),Fa(`hasInstance`),Fa(`isConcatSpreadable`),Fa(`iterator`),Fa(`match`),Fa(`matchAll`),Fa(`replace`),Fa(`search`),Fa(`species`),Fa(`split`);var wc=Ba;Fa(`toPrimitive`),wc();var Tc=P,Ec=Ya;Fa(`toStringTag`),Ec(Tc(`Symbol`),`Symbol`),Fa(`unscopables`),Ya(o.JSON,`JSON`,!0);var Dc,Oc,kc,Ac=M.Symbol,jc={},Mc=D,Nc=gt,Pc=Function.prototype,Fc=Mc&&Object.getOwnPropertyDescriptor,Ic=Nc(Pc,`name`),Lc={EXISTS:Ic,PROPER:Ic&&function(){}.name===`something`,CONFIGURABLE:Ic&&(!Mc||Mc&&Fc(Pc,`name`).configurable)},Rc=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),zc=gt,Bc=T,Vc=pt,Hc=Rc,Uc=Ki(`IE_PROTO`),Wc=Object,Gc=Wc.prototype,Kc=Hc?Wc.getPrototypeOf:function(e){var t=Vc(e);if(zc(t,Uc))return t[Uc];var n=t.constructor;return Bc(n)&&t instanceof n?n.prototype:t instanceof Wc?Gc:null},qc=s,Jc=T,Yc=j,Xc=oa,Zc=Kc,Qc=wa,$c=At(`iterator`),el=!1;[].keys&&(`next`in(kc=[].keys())?(Oc=Zc(Zc(kc)))!==Object.prototype&&(Dc=Oc):el=!0),Jc((Dc=!Yc(Dc)||qc((function(){var e={};return Dc[$c].call(e)!==e}))?{}:Xc(Dc))[$c])||Qc(Dc,$c,(function(){return this}));var tl={IteratorPrototype:Dc,BUGGY_SAFARI_ITERATORS:el},nl=tl.IteratorPrototype,rl=oa,il=ue,al=Ya,ol=jc,sl=function(){return this},cl=v,ll=Ye,ul=T,dl=String,fl=TypeError,pl=function(e,t,n){try{return cl(ll(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},ml=xn,hl=function(e){if(typeof e==`object`||ul(e))return e;throw new fl(`Can't set `+dl(e)+` as a prototype`)},gl=Object.setPrototypeOf||(`__proto__`in{}?function(){var e,t=!1,n={};try{(e=pl(Object.prototype,`__proto__`,`set`))(n,[]),t=n instanceof Array}catch{}return function(n,r){return ml(n),hl(r),t?e(n,r):n.__proto__=r,n}}():void 0),_l=R,vl=ae,yl=Lc,bl=function(e,t,n,r){var i=t+` Iterator`;return e.prototype=rl(nl,{next:il(+!r,n)}),al(e,i,!1,!0),ol[i]=sl,e},xl=Kc,Sl=Ya,Cl=wa,wl=jc,Tl=tl,El=yl.PROPER,Dl=Tl.BUGGY_SAFARI_ITERATORS,Ol=At(`iterator`),kl=`keys`,Al=`values`,jl=`entries`,Ml=function(){return this},Nl=function(e,t,n,r,i,a,o){bl(n,t,r);var s,c,l,u=function(e){if(e===i&&h)return h;if(!Dl&&e&&e in p)return p[e];switch(e){case kl:case Al:case jl:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+` Iterator`,f=!1,p=e.prototype,m=p[Ol]||p[`@@iterator`]||i&&p[i],h=!Dl&&m||u(i),g=t===`Array`&&p.entries||m;if(g&&(s=xl(g.call(new e)))!==Object.prototype&&s.next&&(Sl(s,d,!0,!0),wl[d]=Ml),El&&i===Al&&m&&m.name!==Al&&(f=!0,h=function(){return vl(m,this)}),i)if(c={values:u(Al),keys:a?h:u(kl),entries:u(jl)},o)for(l in c)(Dl||f||!(l in p))&&Cl(p,l,c[l]);else _l({target:t,proto:!0,forced:Dl||f},c);return o&&p[Ol]!==h&&Cl(p,Ol,h,{name:i}),wl[t]=h,c},Pl=function(e,t){return{value:e,done:t}},Fl=A,Il=jc,Ll=fo;gn.f;var Rl=Nl,zl=Pl,Bl=`Array Iterator`,Vl=Ll.set,Hl=Ll.getterFor(Bl);Rl(Array,`Array`,(function(e,t){Vl(this,{type:Bl,target:Fl(e),index:0,kind:t})}),(function(){var e=Hl(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,zl(void 0,!0);switch(e.kind){case`keys`:return zl(n,!1);case`values`:return zl(t[n],!1)}return zl([n,t[n]],!1)}),`values`),Il.Arguments=Il.Array;var Ul={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},Wl=o,Gl=Cr,Kl=Fn,ql=jc,Jl=At(`toStringTag`);for(var Yl in Ul){var Xl=Wl[Yl],Zl=Xl&&Xl.prototype;Zl&&Gl(Zl)!==Jl&&Kl(Zl,Jl,Yl),ql[Yl]=ql.Array}var Ql=Ac,$l=At,eu=gn.f,tu=$l(`metadata`),nu=Function.prototype;nu[tu]===void 0&&eu(nu,tu,{value:null}),Fa(`asyncDispose`),Fa(`dispose`),Fa(`metadata`);var ru=Ql,iu=v,au=P(`Symbol`),ou=au.keyFor,su=iu(au.prototype.valueOf),cu=au.isRegisteredSymbol||function(e){try{return ou(su(e))!==void 0}catch{return!1}};R({target:`Symbol`,stat:!0},{isRegisteredSymbol:cu});for(var lu=ut,uu=P,du=v,fu=Ue,pu=At,mu=uu(`Symbol`),hu=mu.isWellKnownSymbol,gu=uu(`Object`,`getOwnPropertyNames`),_u=du(mu.prototype.valueOf),vu=lu(`wks`),yu=0,bu=gu(mu),xu=bu.length;yu<xu;yu++)try{var Su=bu[yu];fu(mu[Su])&&pu(Su)}catch{}var Cu=function(e){if(hu&&hu(e))return!0;try{for(var t=_u(e),n=0,r=gu(vu),i=r.length;n<i;n++)if(vu[r[n]]==t)return!0}catch{}return!1};R({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:Cu}),Fa(`matcher`),Fa(`observable`),R({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:cu}),R({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:Cu}),Fa(`metadataKey`),Fa(`patternMatch`),Fa(`replaceAll`);var wu=ru,Tu=r(wu),Eu=v,Du=ar,Ou=mi,ku=ye,Au=Eu(``.charAt),ju=Eu(``.charCodeAt),Mu=Eu(``.slice),Nu=function(e){return function(t,n){var r,i,a=Ou(ku(t)),o=Du(n),s=a.length;return o<0||o>=s?e?``:void 0:(r=ju(a,o))<55296||r>56319||o+1===s||(i=ju(a,o+1))<56320||i>57343?e?Au(a,o):r:e?Mu(a,o,o+2):i-56320+(r-55296<<10)+65536}},Pu={codeAt:Nu(!1),charAt:Nu(!0)}.charAt,Fu=mi,Iu=fo,Lu=Nl,Ru=Pl,zu=`String Iterator`,Bu=Iu.set,Vu=Iu.getterFor(zu);Lu(String,`String`,(function(e){Bu(this,{type:zu,string:Fu(e),index:0})}),(function(){var e,t=Vu(this),n=t.string,r=t.index;return r>=n.length?Ru(void 0,!0):(e=Pu(n,r),t.index+=e.length,Ru(e,!1))}));var Hu=Da.f(`iterator`),Uu=Hu,Wu=r(Uu);function Gu(e){return Gu=typeof Tu==`function`&&typeof Wu==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Tu==`function`&&e.constructor===Tu&&e!==Tu.prototype?`symbol`:typeof e},Gu(e)}var Ku=r(Da.f(`toPrimitive`));function qu(e){var t=function(e,t){if(Gu(e)!==`object`||e===null)return e;var n=e[Ku];if(n!==void 0){var r=n.call(e,t||`default`);if(Gu(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return Gu(t)===`symbol`?t:String(t)}function Ju(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),$n(e,qu(r.key),r)}}function Yu(e,t,n){return t&&Ju(e.prototype,t),n&&Ju(e,n),$n(e,`prototype`,{writable:!1}),e}function Xu(e,t,n){return(t=qu(t))in e?$n(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zu=v,Qu=Ye,$u=j,ed=gt,td=Ks,nd=c,rd=Function,id=Zu([].concat),ad=Zu([].join),od={},sd=nd?rd.bind:function(e){var t=Qu(this),n=t.prototype,r=td(arguments,1),i=function(){var n=id(r,td(arguments));return this instanceof i?function(e,t,n){if(!ed(od,t)){for(var r=[],i=0;i<t;i++)r[i]=`a[`+i+`]`;od[t]=rd(`C,a`,`return new C(`+ad(r,`,`)+`)`)}return od[t](e,n)}(t,n.length,n):t.apply(e,n)};return $u(n)&&(i.prototype=n),i},cd=sd;R({target:`Function`,proto:!0,forced:Function.bind!==cd},{bind:cd});var ld=o,ud=M,dd=function(e,t){var n=ud[e+`Prototype`],r=n&&n[t];if(r)return r;var i=ld[e],a=i&&i.prototype;return a&&a[t]},fd=dd(`Function`,`bind`),pd=F,md=fd,hd=Function.prototype,gd=function(e){var t=e.bind;return e===hd||pd(hd,e)&&t===hd.bind?md:t},_d=r(gd),vd=Ye,yd=pt,bd=he,xd=cr,Sd=TypeError,Cd=function(e){return function(t,n,r,i){vd(n);var a=yd(t),o=bd(a),s=xd(a),c=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(c in o){i=o[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw new Sd(`Reduce of empty array with no initial value`)}for(;e?c>=0:s>c;c+=l)c in o&&(i=n(i,o[c],c,a));return i}},wd={left:Cd(!1),right:Cd(!0)},Td=s,Ed=function(e,t){var n=[][e];return!!n&&Td((function(){n.call(null,t||function(){return 1},1)}))},Dd=S(o.process)===`process`,Od=wd.left;R({target:`Array`,proto:!0,forced:!Dd&&Ne>79&&Ne<83||!Ed(`reduce`)},{reduce:function(e){var t=arguments.length;return Od(this,e,t,t>1?arguments[1]:void 0)}});var kd=dd(`Array`,`reduce`),Ad=F,jd=kd,Md=Array.prototype,Nd=r((function(e){var t=e.reduce;return e===Md||Ad(Md,e)&&t===Md.reduce?jd:t})),Pd=bo.filter;R({target:`Array`,proto:!0,forced:!Qr(`filter`)},{filter:function(e){return Pd(this,e,arguments.length>1?arguments[1]:void 0)}});var Fd=dd(`Array`,`filter`),Id=F,Ld=Fd,Rd=Array.prototype,zd=r((function(e){var t=e.filter;return e===Rd||Id(Rd,e)&&t===Rd.filter?Ld:t})),Bd=bo.map;R({target:`Array`,proto:!0,forced:!Qr(`map`)},{map:function(e){return Bd(this,e,arguments.length>1?arguments[1]:void 0)}});var Vd=dd(`Array`,`map`),Hd=F,Ud=Vd,Wd=Array.prototype,Gd=r((function(e){var t=e.map;return e===Wd||Hd(Wd,e)&&t===Wd.map?Ud:t})),Kd=tr,qd=cr,Jd=ur,Yd=hn,Xd=function(e,t,n,r,i,a,o,s){for(var c,l,u=i,d=0,f=!!o&&Yd(o,s);d<r;)d in n&&(c=f?f(n[d],d,t):n[d],a>0&&Kd(c)?(l=qd(c),u=Xd(e,t,c,l,u,a-1)-1):(Jd(u+1),e[u]=c),u++),d++;return u},Zd=Xd,Qd=Ye,$d=pt,ef=cr,tf=Jr;R({target:`Array`,proto:!0},{flatMap:function(e){var t,n=$d(this),r=ef(n);return Qd(e),(t=tf(n,0)).length=Zd(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var nf=dd(`Array`,`flatMap`),rf=F,af=nf,of=Array.prototype,sf=r((function(e){var t=e.flatMap;return e===of||rf(of,e)&&t===of.flatMap?af:t})),cf=function(){function e(n,r,i){var a,o,s;t(this,e),Xu(this,`_listeners`,{add:_d(a=this._add).call(a,this),remove:_d(o=this._remove).call(o,this),update:_d(s=this._update).call(s,this)}),this._source=n,this._transformers=r,this._target=i}return Yu(e,[{key:`all`,value:function(){return this._target.update(this._transformItems(this._source.get())),this}},{key:`start`,value:function(){return this._source.on(`add`,this._listeners.add),this._source.on(`remove`,this._listeners.remove),this._source.on(`update`,this._listeners.update),this}},{key:`stop`,value:function(){return this._source.off(`add`,this._listeners.add),this._source.off(`remove`,this._listeners.remove),this._source.off(`update`,this._listeners.update),this}},{key:`_transformItems`,value:function(e){var t;return Nd(t=this._transformers).call(t,(function(e,t){return t(e)}),e)}},{key:`_add`,value:function(e,t){t!=null&&this._target.add(this._transformItems(this._source.get(t.items)))}},{key:`_update`,value:function(e,t){t!=null&&this._target.update(this._transformItems(this._source.get(t.items)))}},{key:`_remove`,value:function(e,t){t!=null&&this._target.remove(this._transformItems(t.oldData))}}]),e}(),lf=function(){function e(n){t(this,e),Xu(this,`_transformers`,[]),this._source=n}return Yu(e,[{key:`filter`,value:function(e){return this._transformers.push((function(t){return zd(t).call(t,e)})),this}},{key:`map`,value:function(e){return this._transformers.push((function(t){return Gd(t).call(t,e)})),this}},{key:`flatMap`,value:function(e){return this._transformers.push((function(t){return sf(t).call(t,e)})),this}},{key:`to`,value:function(e){return new cf(this._source,this._transformers,e)}}]),e}(),uf=ae,df=xn,ff=Qe,pf=function(e,t,n){var r,i;df(e);try{if(!(r=ff(e,`return`))){if(t===`throw`)throw n;return n}r=uf(r,e)}catch(e){i=!0,r=e}if(t===`throw`)throw n;if(i)throw r;return df(r),n},mf=xn,hf=pf,gf=jc,_f=At(`iterator`),vf=Array.prototype,yf=function(e){return e!==void 0&&(gf.Array===e||vf[_f]===e)},bf=Cr,xf=Qe,Sf=ge,Cf=jc,wf=At(`iterator`),Tf=function(e){if(!Sf(e))return xf(e,wf)||xf(e,`@@iterator`)||Cf[bf(e)]},H=ae,Ef=Ye,Df=xn,Of=Ge,kf=Tf,Af=TypeError,jf=function(e,t){var n=arguments.length<2?kf(e):t;if(Ef(n))return Df(H(n,e));throw new Af(Of(e)+` is not iterable`)},Mf=hn,Nf=ae,Pf=pt,Ff=function(e,t,n,r){try{return r?t(mf(n)[0],n[1]):t(n)}catch(t){hf(e,`throw`,t)}},If=yf,Lf=Vr,Rf=cr,zf=mr,Bf=jf,Vf=Tf,Hf=Array,Uf=At(`iterator`),Wf=!1;try{var Gf=0,Kf={next:function(){return{done:!!Gf++}},return:function(){Wf=!0}};Kf[Uf]=function(){return this},Array.from(Kf,(function(){throw 2}))}catch{}var qf=function(e,t){try{if(!t&&!Wf)return!1}catch{return!1}var n=!1;try{var r={};r[Uf]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n};R({target:`Array`,stat:!0,forced:!qf((function(e){Array.from(e)}))},{from:function(e){var t=Pf(e),n=Lf(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=i!==void 0;a&&(i=Mf(i,r>2?arguments[2]:void 0));var o,s,c,l,u,d,f=Vf(t),p=0;if(!f||this===Hf&&If(f))for(o=Rf(t),s=n?new this(o):Hf(o);o>p;p++)d=a?i(t[p],p):t[p],zf(s,p,d);else for(u=(l=Bf(t,f)).next,s=n?new this:[];!(c=Nf(u,l)).done;p++)d=a?Ff(l,i,[c.value,p],!0):c.value,zf(s,p,d);return s.length=p,s}});var Jf=M.Array.from,Yf=r(Jf),Xf=Tf,Zf=r(Xf),Qf=r(Xf);R({target:`Array`,stat:!0},{isArray:tr});var $f=M.Array.isArray,ep=r($f),tp=D,np=tr,rp=TypeError,ip=Object.getOwnPropertyDescriptor,ap=tp&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(np(e)&&!ip(e,`length`).writable)throw new rp(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t},op=pt,sp=cr,cp=ap,lp=ur;R({target:`Array`,proto:!0,arity:1,forced:s((function(){return[].push.call({length:4294967296},1)!==4294967297}))||!function(){try{Object.defineProperty([],`length`,{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=op(this),n=sp(t),r=arguments.length;lp(n+r);for(var i=0;i<r;i++)t[n]=arguments[i],n++;return cp(t,n),n}});var up=dd(`Array`,`push`),dp=F,fp=up,pp=Array.prototype,mp=function(e){var t=e.push;return e===pp||dp(pp,e)&&t===pp.push?fp:t},hp=r(mp),gp=R,_p=tr,vp=Vr,yp=j,bp=yi,xp=cr,Sp=A,Cp=mr,wp=At,Tp=Ks,Ep=Qr(`slice`),Dp=wp(`species`),Op=Array,kp=Math.max;gp({target:`Array`,proto:!0,forced:!Ep},{slice:function(e,t){var n,r,i,a=Sp(this),o=xp(a),s=bp(e,o),c=bp(t===void 0?o:t,o);if(_p(a)&&(n=a.constructor,(vp(n)&&(n===Op||_p(n.prototype))||yp(n)&&(n=n[Dp])===null)&&(n=void 0),n===Op||n===void 0))return Tp(a,s,c);for(r=new(n===void 0?Op:n)(kp(c-s,0)),i=0;s<c;s++,i++)s in a&&Cp(r,i,a[s]);return r.length=i,r}});var Ap=dd(`Array`,`slice`),jp=F,Mp=Ap,Np=Array.prototype,Pp=function(e){var t=e.slice;return e===Np||jp(Np,e)&&t===Np.slice?Mp:t},Fp=Pp,Ip=r(Fp),Lp=r(Jf);function Rp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function zp(e,t){var n;if(e){if(typeof e==`string`)return Rp(e,t);var r=Ip(n=Object.prototype.toString.call(e)).call(n,8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Lp(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rp(e,t):void 0}}function Bp(e,t){return function(e){if(ep(e))return e}(e)||function(e,t){var n=e==null?null:Tu!==void 0&&Zf(e)||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(hp(s).call(s,r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||zp(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
41
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function zD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var BD=function(){function e(t,n,r,i){var a,o,s=this;V(this,e),this.body=t,this.canvas=n,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}},Mr(this.options,this.defaultOptions),this.body.emitter.on(`destroy`,(function(){s._clean()})),this.body.emitter.on(`_dataChanged`,B(a=this._restore).call(a,this)),this.body.emitter.on(`_resetData`,B(o=this._restore).call(o,this))}return H(e,[{key:`_restore`,value:function(){!1!==this.inMode&&(!0===this.options.initiallyActive?this.enableEditMode():this.disableEditMode())}},{key:`setOptions`,value:function(e,t,n){t!==void 0&&(t.locale===void 0?this.options.locale=n.locale:this.options.locale=t.locale,t.locales===void 0?this.options.locales=n.locales:this.options.locales=t.locales),e!==void 0&&(typeof e==`boolean`?this.options.enabled=e:(this.options.enabled=!0,kv(this.options,e)),!0===this.options.initiallyActive&&(this.editMode=!0),this._setup())}},{key:`toggleEditMode`,value:function(){!0===this.editMode?this.disableEditMode():this.enableEditMode()}},{key:`enableEditMode`,value:function(){this.editMode=!0,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display=`block`,this.closeDiv.style.display=`block`,this.editModeDiv.style.display=`none`,this.showManipulatorToolbar())}},{key:`disableEditMode`,value:function(){this.editMode=!1,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display=`none`,this.closeDiv.style.display=`none`,this.editModeDiv.style.display=`block`,this._createEditButton())}},{key:`showManipulatorToolbar`,value:function(){if(this._clean(),this.manipulationDOM={},!0===this.guiEnabled){var e,t;this.editMode=!0,this.manipulationDiv.style.display=`block`,this.closeDiv.style.display=`block`;var n=this.selectionHandler.getSelectedNodeCount(),r=this.selectionHandler.getSelectedEdgeCount(),i=n+r,a=this.options.locales[this.options.locale],o=!1;!1!==this.options.addNode&&(this._createAddNodeButton(a),o=!0),!1!==this.options.addEdge&&(!0===o?this._createSeperator(1):o=!0,this._createAddEdgeButton(a)),n===1&&typeof this.options.editNode==`function`?(!0===o?this._createSeperator(2):o=!0,this._createEditNodeButton(a)):r===1&&n===0&&!1!==this.options.editEdge&&(!0===o?this._createSeperator(3):o=!0,this._createEditEdgeButton(a)),i!==0&&(n>0&&!1!==this.options.deleteNode||n===0&&!1!==this.options.deleteEdge)&&(!0===o&&this._createSeperator(4),this._createDeleteButton(a)),this._bindElementEvents(this.closeDiv,B(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent(`select`,B(t=this.showManipulatorToolbar).call(t,this))}this.body.emitter.emit(`_redraw`)}},{key:`addNodeMode`,value:function(){var e;if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode=`addNode`,!0===this.guiEnabled){var t,n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,B(t=this.toggleEditMode).call(t,this))}this._temporaryBindEvent(`click`,B(e=this._performAddNode).call(e,this))}},{key:`editNode`,value:function(){var e=this;!0!==this.editMode&&this.enableEditMode(),this._clean();var t=this.selectionHandler.getSelectedNodes()[0];if(t!==void 0){if(this.inMode=`editNode`,typeof this.options.editNode!=`function`)throw Error(`No function has been configured to handle the editing of nodes.`);if(!0!==t.isCluster){var n=kv({},t.options,!1);if(n.x=t.x,n.y=t.y,this.options.editNode.length!==2)throw Error(`The function for edit does not support two arguments (data, callback)`);this.options.editNode(n,(function(t){t!=null&&e.inMode===`editNode`&&e.body.data.nodes.getDataSet().update(t),e.showManipulatorToolbar()}))}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:`addEdgeMode`,value:function(){var e,t,n,r,i;if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode=`addEdge`,!0===this.guiEnabled){var a,o=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(o),this._createSeperator(),this._createDescription(o.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,B(a=this.toggleEditMode).call(a,this))}this._temporaryBindUI(`onTouch`,B(e=this._handleConnect).call(e,this)),this._temporaryBindUI(`onDragEnd`,B(t=this._finishConnect).call(t,this)),this._temporaryBindUI(`onDrag`,B(n=this._dragControlNode).call(n,this)),this._temporaryBindUI(`onRelease`,B(r=this._finishConnect).call(r,this)),this._temporaryBindUI(`onDragStart`,B(i=this._dragStartEdge).call(i,this)),this._temporaryBindUI(`onHold`,(function(){}))}},{key:`editEdgeMode`,value:function(){if(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode=`editEdge`,Sf(this.options.editEdge)!==`object`||typeof this.options.editEdge.editWithoutDrag!=`function`||(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId===void 0)){if(!0===this.guiEnabled){var e,t=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(t),this._createSeperator(),this._createDescription(t.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,B(e=this.toggleEditMode).call(e,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var n,r,i,a,o=this.body.edges[this.edgeBeingEditedId],s=this._getNewTargetNode(o.from.x,o.from.y),c=this._getNewTargetNode(o.to.x,o.to.y);this.temporaryIds.nodes.push(s.id),this.temporaryIds.nodes.push(c.id),this.body.nodes[s.id]=s,this.body.nodeIndices.push(s.id),this.body.nodes[c.id]=c,this.body.nodeIndices.push(c.id),this._temporaryBindUI(`onTouch`,B(n=this._controlNodeTouch).call(n,this)),this._temporaryBindUI(`onTap`,(function(){})),this._temporaryBindUI(`onHold`,(function(){})),this._temporaryBindUI(`onDragStart`,B(r=this._controlNodeDragStart).call(r,this)),this._temporaryBindUI(`onDrag`,B(i=this._controlNodeDrag).call(i,this)),this._temporaryBindUI(`onDragEnd`,B(a=this._controlNodeDragEnd).call(a,this)),this._temporaryBindUI(`onMouseMove`,(function(){})),this._temporaryBindEvent(`beforeDrawing`,(function(e){var t=o.edgeType.findBorderPositions(e);!1===s.selected&&(s.x=t.from.x,s.y=t.from.y),!1===c.selected&&(c.x=t.to.x,c.y=t.to.y)})),this.body.emitter.emit(`_redraw`)}else this.showManipulatorToolbar()}else{var l=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(l.from.id,l.to.id)}}},{key:`deleteSelected`,value:function(){var e=this;!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode=`delete`;var t=this.selectionHandler.getSelectedNodeIds(),n=this.selectionHandler.getSelectedEdgeIds(),r=void 0;if(t.length>0){for(var i=0;i<t.length;i++)if(!0===this.body.nodes[t[i]].isCluster)return void alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);typeof this.options.deleteNode==`function`&&(r=this.options.deleteNode)}else n.length>0&&typeof this.options.deleteEdge==`function`&&(r=this.options.deleteEdge);if(typeof r==`function`){var a={nodes:t,edges:n};if(r.length!==2)throw Error(`The function for delete does not support two arguments (data, callback)`);r(a,(function(t){t!=null&&e.inMode===`delete`?(e.body.data.edges.getDataSet().remove(t.edges),e.body.data.nodes.getDataSet().remove(t.nodes),e.body.emitter.emit(`startSimulation`),e.showManipulatorToolbar()):(e.body.emitter.emit(`startSimulation`),e.showManipulatorToolbar())}))}else this.body.data.edges.getDataSet().remove(n),this.body.data.nodes.getDataSet().remove(t),this.body.emitter.emit(`startSimulation`),this.showManipulatorToolbar()}},{key:`_setup`,value:function(){!0===this.options.enabled?(this.guiEnabled=!0,this._createWrappers(),!1===this.editMode?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:`_createWrappers`,value:function(){(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement(`div`),this.manipulationDiv.className=`vis-manipulation`,!0===this.editMode?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`,!0===this.editMode?this.editModeDiv.style.display=`none`:this.editModeDiv.style.display=`block`,this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0)&&(this.closeDiv=document.createElement(`button`),this.closeDiv.className=`vis-close`,this.closeDiv.setAttribute(`aria-label`,this.options.locales[this.options.locale]?.close??this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}},{key:`_getNewTargetNode`,value:function(e,t){var n=kv({},this.options.controlNodeStyle);n.id=`targetNode`+Qw(),n.hidden=!1,n.physics=!1,n.x=e,n.y=t;var r=this.body.functions.createNode(n);return r.shape.boundingBox={left:e,right:e,top:t,bottom:t},r}},{key:`_createEditButton`,value:function(){var e;this._clean(),this.manipulationDOM={},Sv(this.editModeDiv);var t=this.options.locales[this.options.locale],n=this._createButton(`editMode`,`vis-edit vis-edit-mode`,t.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(n),this._bindElementEvents(n,B(e=this.toggleEditMode).call(e,this))}},{key:`_clean`,value:function(){this.inMode=!1,!0===this.guiEnabled&&(Sv(this.editModeDiv),Sv(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit(`restorePhysics`)}},{key:`_cleanupDOMEventListeners`,value:function(){var e,t,n=RD(Dm(e=this._domEventListenerCleanupQueue).call(e,0));try{for(n.s();!(t=n.n()).done;)(0,t.value)()}catch(e){n.e(e)}finally{n.f()}}},{key:`_removeManipulationDOM`,value:function(){this._clean(),Sv(this.manipulationDiv),Sv(this.editModeDiv),Sv(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}},{key:`_createSeperator`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM[`seperatorLineDiv`+e]=document.createElement(`div`),this.manipulationDOM[`seperatorLineDiv`+e].className=`vis-separator-line`,this.manipulationDiv.appendChild(this.manipulationDOM[`seperatorLineDiv`+e])}},{key:`_createAddNodeButton`,value:function(e){var t,n=this._createButton(`addNode`,`vis-add`,e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.addNodeMode).call(t,this))}},{key:`_createAddEdgeButton`,value:function(e){var t,n=this._createButton(`addEdge`,`vis-connect`,e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.addEdgeMode).call(t,this))}},{key:`_createEditNodeButton`,value:function(e){var t,n=this._createButton(`editNode`,`vis-edit`,e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.editNode).call(t,this))}},{key:`_createEditEdgeButton`,value:function(e){var t,n=this._createButton(`editEdge`,`vis-edit`,e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.editEdgeMode).call(t,this))}},{key:`_createDeleteButton`,value:function(e){var t,n=this.options.rtl?`vis-delete-rtl`:`vis-delete`,r=this._createButton(`delete`,n,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(r),this._bindElementEvents(r,B(t=this.deleteSelected).call(t,this))}},{key:`_createBackButton`,value:function(e){var t,n=this._createButton(`back`,`vis-back`,e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,B(t=this.showManipulatorToolbar).call(t,this))}},{key:`_createButton`,value:function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`vis-label`;return this.manipulationDOM[e+`Div`]=document.createElement(`button`),this.manipulationDOM[e+`Div`].className=`vis-button `+t,this.manipulationDOM[e+`Label`]=document.createElement(`div`),this.manipulationDOM[e+`Label`].className=r,this.manipulationDOM[e+`Label`].innerText=n,this.manipulationDOM[e+`Div`].appendChild(this.manipulationDOM[e+`Label`]),this.manipulationDOM[e+`Div`]}},{key:`_createDescription`,value:function(e){this.manipulationDOM.descriptionLabel=document.createElement(`div`),this.manipulationDOM.descriptionLabel.className=`vis-none`,this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}},{key:`_temporaryBindEvent`,value:function(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}},{key:`_temporaryBindUI`,value:function(e,t){if(this.body.eventListeners[e]===void 0)throw Error(`This UI function does not exist. Typo? You tried: `+e+` possible are: `+Uh(Fp(this.body.eventListeners)));this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t}},{key:`_unbindTemporaryUIs`,value:function(){for(var e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}},{key:`_unbindTemporaryEvents`,value:function(){for(var e=0;e<this.temporaryEventFunctions.length;e++){var t=this.temporaryEventFunctions[e].event,n=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(t,n)}this.temporaryEventFunctions=[]}},{key:`_bindElementEvents`,value:function(e,t){var n=new ny(e,{});aT(n,t),this._domEventListenerCleanupQueue.push((function(){n.destroy()}));var r=function(e){var n=e.keyCode,r=e.key;r!==`Enter`&&r!==` `&&n!==13&&n!==32||t()};e.addEventListener(`keyup`,r,!1),this._domEventListenerCleanupQueue.push((function(){e.removeEventListener(`keyup`,r,!1)}))}},{key:`_cleanupTemporaryNodesAndEdges`,value:function(){for(var e=0;e<this.temporaryIds.edges.length;e++){var t;this.body.edges[this.temporaryIds.edges[e]].disconnect(),delete this.body.edges[this.temporaryIds.edges[e]];var n,r=Lh(t=this.body.edgeIndices).call(t,this.temporaryIds.edges[e]);r!==-1&&Dm(n=this.body.edgeIndices).call(n,r,1)}for(var i=0;i<this.temporaryIds.nodes.length;i++){var a;delete this.body.nodes[this.temporaryIds.nodes[i]];var o,s=Lh(a=this.body.nodeIndices).call(a,this.temporaryIds.nodes[i]);s!==-1&&Dm(o=this.body.nodeIndices).call(o,s,1)}this.temporaryIds={nodes:[],edges:[]}}},{key:`_controlNodeTouch`,value:function(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Mr({},this.body.view.translation)}},{key:`_controlNodeDragStart`,value:function(){var e=this.lastTouch,t=this.selectionHandler._pointerToPositionObject(e),n=this.body.nodes[this.temporaryIds.nodes[0]],r=this.body.nodes[this.temporaryIds.nodes[1]],i=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;var a=n.isOverlappingWith(t),o=r.isOverlappingWith(t);!0===a?(this.selectedControlNode=n,i.edgeType.from=n):!0===o&&(this.selectedControlNode=r,i.edgeType.to=r),this.selectedControlNode!==void 0&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit(`_redraw`)}},{key:`_controlNodeDrag`,value:function(e){this.body.emitter.emit(`disablePhysics`);var t=this.body.functions.getPointer(e.center),n=this.canvas.DOMtoCanvas(t);this.selectedControlNode===void 0?this.interactionHandler.onDrag(e):(this.selectedControlNode.x=n.x,this.selectedControlNode.y=n.y),this.body.emitter.emit(`_redraw`)}},{key:`_controlNodeDragEnd`,value:function(e){var t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),r=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode!==void 0){this.selectionHandler.unselectAll();for(var i=this.selectionHandler._getAllNodesOverlappingWith(n),a=void 0,o=i.length-1;o>=0;o--)if(i[o]!==this.selectedControlNode.id){a=this.body.nodes[i[o]];break}if(a!==void 0&&this.selectedControlNode!==void 0)if(!0===a.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var s=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===s.id?this._performEditEdge(a.id,r.to.id):this._performEditEdge(r.from.id,a.id)}else r.updateEdgeType(),this.body.emitter.emit(`restorePhysics`);this.body.emitter.emit(`_redraw`)}}},{key:`_handleConnect`,value:function(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Mr({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;var t=this.lastTouch,n=this.selectionHandler.getNodeAt(t);if(n!==void 0)if(!0===n.isCluster)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{var r=this._getNewTargetNode(n.x,n.y);this.body.nodes[r.id]=r,this.body.nodeIndices.push(r.id);var i=this.body.functions.createEdge({id:`connectionEdge`+Qw(),from:n.id,to:r.id,physics:!1,smooth:{enabled:!0,type:`continuous`,roundness:.5}});this.body.edges[i.id]=i,this.body.edgeIndices.push(i.id),this.temporaryIds.nodes.push(r.id),this.temporaryIds.edges.push(i.id)}this.touchTime=new Date().valueOf()}}},{key:`_dragControlNode`,value:function(e){var t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),r=void 0;this.temporaryIds.edges[0]!==void 0&&(r=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var i=this.selectionHandler._getAllNodesOverlappingWith(n),a=void 0,o=i.length-1;o>=0;o--){var s;if(Lh(s=this.temporaryIds.nodes).call(s,i[o])===-1){a=this.body.nodes[i[o]];break}}if(e.controlEdge={from:r,to:a?a.id:void 0},this.selectionHandler.generateClickEvent(`controlNodeDragging`,e,t),this.temporaryIds.nodes[0]!==void 0){var c=this.body.nodes[this.temporaryIds.nodes[0]];c.x=this.canvas._XconvertDOMtoCanvas(t.x),c.y=this.canvas._YconvertDOMtoCanvas(t.y),this.body.emitter.emit(`_redraw`)}else this.interactionHandler.onDrag(e)}},{key:`_finishConnect`,value:function(e){var t=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(t),r=void 0;this.temporaryIds.edges[0]!==void 0&&(r=this.body.edges[this.temporaryIds.edges[0]].fromId);for(var i=this.selectionHandler._getAllNodesOverlappingWith(n),a=void 0,o=i.length-1;o>=0;o--){var s;if(Lh(s=this.temporaryIds.nodes).call(s,i[o])===-1){a=this.body.nodes[i[o]];break}}this._cleanupTemporaryNodesAndEdges(),a!==void 0&&(!0===a.isCluster?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[r]!==void 0&&this.body.nodes[a.id]!==void 0&&this._performAddEdge(r,a.id)),e.controlEdge={from:r,to:a?a.id:void 0},this.selectionHandler.generateClickEvent(`controlNodeDragEnd`,e,t),this.body.emitter.emit(`_redraw`)}},{key:`_dragStartEdge`,value:function(e){var t=this.lastTouch;this.selectionHandler.generateClickEvent(`dragStart`,e,t,void 0,!0)}},{key:`_performAddNode`,value:function(e){var t=this,n={id:Qw(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:`new`};if(typeof this.options.addNode==`function`){if(this.options.addNode.length!==2)throw this.showManipulatorToolbar(),Error(`The function for add does not support two arguments (data,callback)`);this.options.addNode(n,(function(e){e!=null&&t.inMode===`addNode`&&t.body.data.nodes.getDataSet().add(e),t.showManipulatorToolbar()}))}else this.body.data.nodes.getDataSet().add(n),this.showManipulatorToolbar()}},{key:`_performAddEdge`,value:function(e,t){var n=this,r={from:e,to:t};if(typeof this.options.addEdge==`function`){if(this.options.addEdge.length!==2)throw Error(`The function for connect does not support two arguments (data,callback)`);this.options.addEdge(r,(function(e){e!=null&&n.inMode===`addEdge`&&(n.body.data.edges.getDataSet().add(e),n.selectionHandler.unselectAll(),n.showManipulatorToolbar())}))}else this.body.data.edges.getDataSet().add(r),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:`_performEditEdge`,value:function(e,t){var n=this,r={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label},i=this.options.editEdge;if(Sf(i)===`object`&&(i=i.editWithoutDrag),typeof i==`function`){if(i.length!==2)throw Error(`The function for edit does not support two arguments (data, callback)`);i(r,(function(e){e==null||n.inMode!==`editEdge`?(n.body.edges[r.id].updateEdgeType(),n.body.emitter.emit(`_redraw`),n.showManipulatorToolbar()):(n.body.data.edges.getDataSet().update(e),n.selectionHandler.unselectAll(),n.showManipulatorToolbar())}))}else this.body.data.edges.getDataSet().update(r),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),e}(),Y=`string`,X=`boolean`,Z=`number`,VD=`array`,Q=`object`,HD=[`arrow`,`bar`,`box`,`circle`,`crow`,`curve`,`diamond`,`image`,`inv_curve`,`inv_triangle`,`triangle`,`vee`],UD={borderWidth:{number:Z},borderWidthSelected:{number:Z,undefined:`undefined`},brokenImage:{string:Y,undefined:`undefined`},chosen:{label:{boolean:X,function:`function`},node:{boolean:X,function:`function`},__type__:{object:Q,boolean:X}},color:{border:{string:Y},background:{string:Y},highlight:{border:{string:Y},background:{string:Y},__type__:{object:Q,string:Y}},hover:{border:{string:Y},background:{string:Y},__type__:{object:Q,string:Y}},__type__:{object:Q,string:Y}},opacity:{number:Z,undefined:`undefined`},fixed:{x:{boolean:X},y:{boolean:X},__type__:{object:Q,boolean:X}},font:{align:{string:Y},color:{string:Y},size:{number:Z},face:{string:Y},background:{string:Y},strokeWidth:{number:Z},strokeColor:{string:Y},vadjust:{number:Z},multi:{boolean:X,string:Y},bold:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},boldital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},ital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},mono:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},__type__:{object:Q,string:Y}},group:{string:Y,number:Z,undefined:`undefined`},heightConstraint:{minimum:{number:Z},valign:{string:Y},__type__:{object:Q,boolean:X,number:Z}},hidden:{boolean:X},icon:{face:{string:Y},code:{string:Y},size:{number:Z},color:{string:Y},weight:{string:Y,number:Z},__type__:{object:Q}},id:{string:Y,number:Z},image:{selected:{string:Y,undefined:`undefined`},unselected:{string:Y,undefined:`undefined`},__type__:{object:Q,string:Y}},imagePadding:{top:{number:Z},right:{number:Z},bottom:{number:Z},left:{number:Z},__type__:{object:Q,number:Z}},label:{string:Y,undefined:`undefined`},labelHighlightBold:{boolean:X},level:{number:Z,undefined:`undefined`},margin:{top:{number:Z},right:{number:Z},bottom:{number:Z},left:{number:Z},__type__:{object:Q,number:Z}},mass:{number:Z},physics:{boolean:X},scaling:{min:{number:Z},max:{number:Z},label:{enabled:{boolean:X},min:{number:Z},max:{number:Z},maxVisible:{number:Z},drawThreshold:{number:Z},__type__:{object:Q,boolean:X}},customScalingFunction:{function:`function`},__type__:{object:Q}},shadow:{enabled:{boolean:X},color:{string:Y},size:{number:Z},x:{number:Z},y:{number:Z},__type__:{object:Q,boolean:X}},shape:{string:[`custom`,`ellipse`,`circle`,`database`,`box`,`text`,`image`,`circularImage`,`diamond`,`dot`,`star`,`triangle`,`triangleDown`,`square`,`icon`,`hexagon`]},ctxRenderer:{function:`function`},shapeProperties:{borderDashes:{boolean:X,array:VD},borderRadius:{number:Z},interpolation:{boolean:X},useImageSize:{boolean:X},useBorderWithImage:{boolean:X},coordinateOrigin:{string:[`center`,`top-left`]},__type__:{object:Q}},size:{number:Z},title:{string:Y,dom:`dom`,undefined:`undefined`},value:{number:Z,undefined:`undefined`},widthConstraint:{minimum:{number:Z},maximum:{number:Z},__type__:{object:Q,boolean:X,number:Z}},x:{number:Z},y:{number:Z},__type__:{object:Q}},WD={configure:{enabled:{boolean:X},filter:{boolean:X,string:Y,array:VD,function:`function`},container:{dom:`dom`},showButton:{boolean:X},__type__:{object:Q,boolean:X,string:Y,array:VD,function:`function`}},edges:{arrows:{to:{enabled:{boolean:X},scaleFactor:{number:Z},type:{string:HD},imageHeight:{number:Z},imageWidth:{number:Z},src:{string:Y},__type__:{object:Q,boolean:X}},middle:{enabled:{boolean:X},scaleFactor:{number:Z},type:{string:HD},imageWidth:{number:Z},imageHeight:{number:Z},src:{string:Y},__type__:{object:Q,boolean:X}},from:{enabled:{boolean:X},scaleFactor:{number:Z},type:{string:HD},imageWidth:{number:Z},imageHeight:{number:Z},src:{string:Y},__type__:{object:Q,boolean:X}},__type__:{string:[`from`,`to`,`middle`],object:Q}},endPointOffset:{from:{number:Z},to:{number:Z},__type__:{object:Q,number:Z}},arrowStrikethrough:{boolean:X},background:{enabled:{boolean:X},color:{string:Y},size:{number:Z},dashes:{boolean:X,array:VD},__type__:{object:Q,boolean:X}},chosen:{label:{boolean:X,function:`function`},edge:{boolean:X,function:`function`},__type__:{object:Q,boolean:X}},color:{color:{string:Y},highlight:{string:Y},hover:{string:Y},inherit:{string:[`from`,`to`,`both`],boolean:X},opacity:{number:Z},__type__:{object:Q,string:Y}},dashes:{boolean:X,array:VD},font:{color:{string:Y},size:{number:Z},face:{string:Y},background:{string:Y},strokeWidth:{number:Z},strokeColor:{string:Y},align:{string:[`horizontal`,`top`,`middle`,`bottom`]},vadjust:{number:Z},multi:{boolean:X,string:Y},bold:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},boldital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},ital:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},mono:{color:{string:Y},size:{number:Z},face:{string:Y},mod:{string:Y},vadjust:{number:Z},__type__:{object:Q,string:Y}},__type__:{object:Q,string:Y}},hidden:{boolean:X},hoverWidth:{function:`function`,number:Z},label:{string:Y,undefined:`undefined`},labelHighlightBold:{boolean:X},length:{number:Z,undefined:`undefined`},physics:{boolean:X},scaling:{min:{number:Z},max:{number:Z},label:{enabled:{boolean:X},min:{number:Z},max:{number:Z},maxVisible:{number:Z},drawThreshold:{number:Z},__type__:{object:Q,boolean:X}},customScalingFunction:{function:`function`},__type__:{object:Q}},selectionWidth:{function:`function`,number:Z},selfReferenceSize:{number:Z},selfReference:{size:{number:Z},angle:{number:Z},renderBehindTheNode:{boolean:X},__type__:{object:Q}},shadow:{enabled:{boolean:X},color:{string:Y},size:{number:Z},x:{number:Z},y:{number:Z},__type__:{object:Q,boolean:X}},smooth:{enabled:{boolean:X},type:{string:[`dynamic`,`continuous`,`discrete`,`diagonalCross`,`straightCross`,`horizontal`,`vertical`,`curvedCW`,`curvedCCW`,`cubicBezier`]},roundness:{number:Z},forceDirection:{string:[`horizontal`,`vertical`,`none`],boolean:X},__type__:{object:Q,boolean:X}},title:{string:Y,undefined:`undefined`},width:{number:Z},widthConstraint:{maximum:{number:Z},__type__:{object:Q,boolean:X,number:Z}},value:{number:Z,undefined:`undefined`},__type__:{object:Q}},groups:{useDefaultGroups:{boolean:X},__any__:UD,__type__:{object:Q}},interaction:{dragNodes:{boolean:X},dragView:{boolean:X},hideEdgesOnDrag:{boolean:X},hideEdgesOnZoom:{boolean:X},hideNodesOnDrag:{boolean:X},hover:{boolean:X},keyboard:{enabled:{boolean:X},speed:{x:{number:Z},y:{number:Z},zoom:{number:Z},__type__:{object:Q}},bindToWindow:{boolean:X},autoFocus:{boolean:X},__type__:{object:Q,boolean:X}},multiselect:{boolean:X},navigationButtons:{boolean:X},selectable:{boolean:X},selectConnectedEdges:{boolean:X},hoverConnectedEdges:{boolean:X},tooltipDelay:{number:Z},zoomView:{boolean:X},zoomSpeed:{number:Z},__type__:{object:Q}},layout:{randomSeed:{undefined:`undefined`,number:Z,string:Y},improvedLayout:{boolean:X},clusterThreshold:{number:Z},hierarchical:{enabled:{boolean:X},levelSeparation:{number:Z},nodeSpacing:{number:Z},treeSpacing:{number:Z},blockShifting:{boolean:X},edgeMinimization:{boolean:X},parentCentralization:{boolean:X},direction:{string:[`UD`,`DU`,`LR`,`RL`]},sortMethod:{string:[`hubsize`,`directed`]},shakeTowards:{string:[`leaves`,`roots`]},__type__:{object:Q,boolean:X}},__type__:{object:Q}},manipulation:{enabled:{boolean:X},initiallyActive:{boolean:X},addNode:{boolean:X,function:`function`},addEdge:{boolean:X,function:`function`},editNode:{function:`function`},editEdge:{editWithoutDrag:{function:`function`},__type__:{object:Q,boolean:X,function:`function`}},deleteNode:{boolean:X,function:`function`},deleteEdge:{boolean:X,function:`function`},controlNodeStyle:UD,__type__:{object:Q,boolean:X}},nodes:UD,physics:{enabled:{boolean:X},barnesHut:{theta:{number:Z},gravitationalConstant:{number:Z},centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},damping:{number:Z},avoidOverlap:{number:Z},__type__:{object:Q}},forceAtlas2Based:{theta:{number:Z},gravitationalConstant:{number:Z},centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},damping:{number:Z},avoidOverlap:{number:Z},__type__:{object:Q}},repulsion:{centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},nodeDistance:{number:Z},damping:{number:Z},__type__:{object:Q}},hierarchicalRepulsion:{centralGravity:{number:Z},springLength:{number:Z},springConstant:{number:Z},nodeDistance:{number:Z},damping:{number:Z},avoidOverlap:{number:Z},__type__:{object:Q}},maxVelocity:{number:Z},minVelocity:{number:Z},solver:{string:[`barnesHut`,`repulsion`,`hierarchicalRepulsion`,`forceAtlas2Based`]},stabilization:{enabled:{boolean:X},iterations:{number:Z},updateInterval:{number:Z},onlyDynamicEdges:{boolean:X},fit:{boolean:X},__type__:{object:Q,boolean:X}},timestep:{number:Z},adaptiveTimestep:{boolean:X},wind:{x:{number:Z},y:{number:Z},__type__:{object:Q}},__type__:{object:Q,boolean:X}},autoResize:{boolean:X},clickToUse:{boolean:X},locale:{string:Y},locales:{__any__:{any:`any`},__type__:{object:Q}},height:{string:Y},width:{string:Y},__type__:{object:Q}},GD={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]}}},KD=function(e,t,n){var r;return!(!Jm(e).call(e,`physics`)||!Jm(r=GD.physics.solver).call(r,t)||n.physics.solver===t||t===`wind`)},qD=Object.freeze({__proto__:null,allOptions:WD,configuratorHideOption:KD,configureOptions:GD}),JD=function(){function e(){V(this,e)}return H(e,[{key:`getDistances`,value:function(e,t,n){for(var r={},i=e.edges,a=0;a<t.length;a++){var o={};r[t[a]]=o;for(var s=0;s<t.length;s++)o[t[s]]=a==s?0:1e9}for(var c=0;c<n.length;c++){var l=i[n[c]];!0===l.connected&&r[l.fromId]!==void 0&&r[l.toId]!==void 0&&(r[l.fromId][l.toId]=1,r[l.toId][l.fromId]=1)}for(var u=t.length,d=0;d<u;d++)for(var f=t[d],p=r[f],m=0;m<u-1;m++)for(var h=t[m],g=r[h],_=m+1;_<u;_++){var v=t[_],y=r[v],b=Math.min(g[v],g[f]+p[v]);g[v]=b,y[h]=b}return r}}]),e}(),YD=function(){function e(t,n,r){V(this,e),this.body=t,this.springLength=n,this.springConstant=r,this.distanceSolver=new JD}return H(e,[{key:`setOptions`,value:function(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}},{key:`solve`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=this.distanceSolver.getDistances(this.body,e,t);this._createL_matrix(r),this._createK_matrix(r),this._createE_matrix();for(var i=0,a=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),o=1e9,s=0,c=0,l=0,u=0,d=0;o>.01&&i<a;){i+=1;var f=dp(this._getHighestEnergyNode(n),4);for(s=f[0],o=f[1],c=f[2],l=f[3],u=o,d=0;u>1&&d<5;){d+=1,this._moveNode(s,c,l);var p=dp(this._getEnergy(s),3);u=p[0],c=p[1],l=p[2]}}}},{key:`_getHighestEnergyNode`,value:function(e){for(var t=this.body.nodeIndices,n=this.body.nodes,r=0,i=t[0],a=0,o=0,s=0;s<t.length;s++){var c=t[s];if(!0!==n[c].predefinedPosition||!0===n[c].isCluster&&!0===e||!0!==n[c].options.fixed.x||!0!==n[c].options.fixed.y){var l=dp(this._getEnergy(c),3),u=l[0],d=l[1],f=l[2];r<u&&(r=u,i=c,a=d,o=f)}}return[i,r,a,o]}},{key:`_getEnergy`,value:function(e){var t=dp(this.E_sums[e],2),n=t[0],r=t[1];return[Math.sqrt(n**2+r**2),n,r]}},{key:`_moveNode`,value:function(e,t,n){for(var r=this.body.nodeIndices,i=this.body.nodes,a=0,o=0,s=0,c=i[e].x,l=i[e].y,u=this.K_matrix[e],d=this.L_matrix[e],f=0;f<r.length;f++){var p=r[f];if(p!==e){var m=i[p].x,h=i[p].y,g=u[p],_=d[p],v=1/((c-m)**2+(l-h)**2)**1.5;a+=g*(1-_*(l-h)**2*v),o+=g*(_*(c-m)*(l-h)*v),s+=g*(1-_*(c-m)**2*v)}}var y=(t/a+n/o)/(o/a-s/o),b=-(o*y+t)/a;i[e].x+=b,i[e].y+=y,this._updateE_matrix(e)}},{key:`_createL_matrix`,value:function(e){var t=this.body.nodeIndices,n=this.springLength;this.L_matrix=[];for(var r=0;r<t.length;r++){this.L_matrix[t[r]]={};for(var i=0;i<t.length;i++)this.L_matrix[t[r]][t[i]]=n*e[t[r]][t[i]]}}},{key:`_createK_matrix`,value:function(e){var t=this.body.nodeIndices,n=this.springConstant;this.K_matrix=[];for(var r=0;r<t.length;r++){this.K_matrix[t[r]]={};for(var i=0;i<t.length;i++)this.K_matrix[t[r]][t[i]]=n*e[t[r]][t[i]]**-2}}},{key:`_createE_matrix`,value:function(){var e=this.body.nodeIndices,t=this.body.nodes;this.E_matrix={},this.E_sums={};for(var n=0;n<e.length;n++)this.E_matrix[e[n]]=[];for(var r=0;r<e.length;r++){for(var i=e[r],a=t[i].x,o=t[i].y,s=0,c=0,l=r;l<e.length;l++){var u=e[l];if(u!==i){var d=t[u].x,f=t[u].y,p=1/Math.sqrt((a-d)**2+(o-f)**2);this.E_matrix[i][l]=[this.K_matrix[i][u]*(a-d-this.L_matrix[i][u]*(a-d)*p),this.K_matrix[i][u]*(o-f-this.L_matrix[i][u]*(o-f)*p)],this.E_matrix[u][r]=this.E_matrix[i][l],s+=this.E_matrix[i][l][0],c+=this.E_matrix[i][l][1]}}this.E_sums[i]=[s,c]}}},{key:`_updateE_matrix`,value:function(e){for(var t=this.body.nodeIndices,n=this.body.nodes,r=this.E_matrix[e],i=this.K_matrix[e],a=this.L_matrix[e],o=n[e].x,s=n[e].y,c=0,l=0,u=0;u<t.length;u++){var d=t[u];if(d!==e){var f=r[u],p=f[0],m=f[1],h=n[d].x,g=n[d].y,_=1/Math.sqrt((o-h)**2+(s-g)**2),v=i[d]*(o-h-a[d]*(o-h)*_),y=i[d]*(s-g-a[d]*(s-g)*_);r[u]=[v,y],c+=v,l+=y;var b=this.E_sums[d];b[0]+=v-p,b[1]+=y-m}}this.E_sums[e]=[c,l]}}]),e}();function $(e,t,n){var r,i,a,o,s=this;if(!(this instanceof $))throw SyntaxError(`Constructor must be called with the new operator`);this.options={},this.defaultOptions={locale:`en`,locales:Iy,clickToUse:!1},Mr(this.options,this.defaultOptions),this.body={container:e,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:B(r=this.on).call(r,this),off:B(i=this.off).call(i,this),emit:B(a=this.emit).call(a,this),once:B(o=this.once).call(o,this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}},selectionBox:{show:!1,position:{start:{x:0,y:0},end:{x:0,y:0}}}},this.bindEventListeners(),this.images=new Ry((function(){return s.body.emitter.emit(`_requestRedraw`)})),this.groups=new fx,this.canvas=new sT(this.body),this.selectionHandler=new wE(this.body,this.canvas),this.interactionHandler=new pT(this.body,this.canvas,this.selectionHandler),this.view=new cT(this.body,this.canvas),this.renderer=new rT(this.body,this.canvas),this.physics=new Kw(this.body),this.layoutEngine=new LD(this.body),this.clustering=new nT(this.body),this.manipulation=new BD(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new BC(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new Fw(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new YD(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(n),this.setData(t)}oi($.prototype),$.prototype.setOptions=function(e){var t=this;if(e===null&&(e=void 0),e!==void 0){if(!0===ay.validate(e,WD)&&console.error(`%cErrors have been found in the supplied options object.`,iy),Dv([`locale`,`locales`,`clickToUse`],this.options,e),e.locale!==void 0&&(e.locale=function(e,t){try{var n=dp(t.split(/[-_ /]/,2),2),r=n[0],i=n[1],a=r==null?null:r.toLowerCase(),o=i==null?null:i.toUpperCase();if(a&&o){var s,c=a+`-`+o;if(Object.prototype.hasOwnProperty.call(e,c))return c;console.warn(vp(s=`Unknown variant ${o} of language `).call(s,a,`.`))}if(a){var l=a;if(Object.prototype.hasOwnProperty.call(e,l))return l;console.warn(`Unknown language ${a}`)}return console.warn(`Unknown locale ${t}, falling back to English.`),`en`}catch(e){return console.error(e),console.warn(`Unexpected error while normalizing locale ${t}, falling back to English.`),`en`}}(e.locales||this.options.locales,e.locale)),e=this.layoutEngine.setOptions(e.layout,e),this.canvas.setOptions(e),this.groups.setOptions(e.groups),this.nodesHandler.setOptions(e.nodes),this.edgesHandler.setOptions(e.edges),this.physics.setOptions(e.physics),this.manipulation.setOptions(e.manipulation,e,this.options),this.interactionHandler.setOptions(e.interaction),this.renderer.setOptions(e.interaction),this.selectionHandler.setOptions(e.interaction),e.groups!==void 0&&this.body.emitter.emit(`refreshNodes`),`configure`in e&&(this.configurator||=new ty(this,this.body.container,GD,this.canvas.pixelRatio,KD),this.configurator.setOptions(e.configure)),this.configurator&&!0===this.configurator.options.enabled){var n={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};kv(n.nodes,this.nodesHandler.options),kv(n.edges,this.edgesHandler.options),kv(n.layout,this.layoutEngine.options),kv(n.interaction,this.selectionHandler.options),kv(n.interaction,this.renderer.options),kv(n.interaction,this.interactionHandler.options),kv(n.manipulation,this.manipulation.options),kv(n.physics,this.physics.options),kv(n.global,this.canvas.options),kv(n.global,this.options),this.configurator.setModuleOptions(n)}e.clickToUse===void 0?this.body.emitter.emit(`activate`):!0===e.clickToUse?this.activator===void 0&&(this.activator=new ey(this.canvas.frame),this.activator.on(`change`,(function(){t.body.emitter.emit(`activate`)}))):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit(`activate`)),this.canvas.setSize(),this.body.emitter.emit(`startSimulation`)}},$.prototype._updateVisibleIndices=function(){var e=this.body.nodes,t=this.body.edges;for(var n in this.body.nodeIndices=[],this.body.edgeIndices=[],e)Object.prototype.hasOwnProperty.call(e,n)&&(this.clustering._isClusteredNode(n)||!1!==e[n].options.hidden||this.body.nodeIndices.push(e[n].id));for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r],a=e[i.fromId],o=e[i.toId],s=a!==void 0&&o!==void 0;!this.clustering._isClusteredEdge(r)&&!1===i.options.hidden&&s&&!1===a.options.hidden&&!1===o.options.hidden&&this.body.edgeIndices.push(i.id)}},$.prototype.bindEventListeners=function(){var e=this;this.body.emitter.on(`_dataChanged`,(function(){e.edgesHandler._updateState(),e.body.emitter.emit(`_dataUpdated`)})),this.body.emitter.on(`_dataUpdated`,(function(){e.clustering._updateState(),e._updateVisibleIndices(),e._updateValueRange(e.body.nodes),e._updateValueRange(e.body.edges),e.body.emitter.emit(`startSimulation`),e.body.emitter.emit(`_requestRedraw`)}))},$.prototype.setData=function(e){if(this.body.emitter.emit(`resetPhysics`),this.body.emitter.emit(`_resetData`),this.selectionHandler.unselectAll(),e&&e.dot&&(e.nodes||e.edges))throw SyntaxError(`Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.`);if(this.setOptions(e&&e.options),e&&e.dot){console.warn(`The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);`);var t=My(e.dot);this.setData(t)}else if(e&&e.gephi){console.warn(`The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);`);var n=Py(e.gephi);this.setData(n)}else this.nodesHandler.setData(e&&e.nodes,!0),this.edgesHandler.setData(e&&e.edges,!0),this.body.emitter.emit(`_dataChanged`),this.body.emitter.emit(`_dataLoaded`),this.body.emitter.emit(`initPhysics`)},$.prototype.destroy=function(){for(var e in 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,this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&delete this.body.nodes[e];for(var t in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,t)&&delete this.body.edges[t];Sv(this.body.container)},$.prototype._updateValueRange=function(e){var t,n=void 0,r=void 0,i=0;for(t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var a=e[t].getValue();a!==void 0&&(n=n===void 0?a:Math.min(a,n),r=r===void 0?a:Math.max(a,r),i+=a)}if(n!==void 0&&r!==void 0)for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&e[t].setValueRange(n,r,i)},$.prototype.isActive=function(){return!this.activator||this.activator.active},$.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)},$.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)},$.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)},$.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)},$.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)},$.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)},$.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)},$.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)},$.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)},$.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)},$.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)},$.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)},$.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)},$.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)},$.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)},$.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)},$.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)},$.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)},$.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)},$.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)},$.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)},$.prototype.editNodeMode=function(){return console.warn(`Deprecated: Please use editNode instead of editNodeMode.`),this.manipulation.editNode.apply(this.manipulation,arguments)},$.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)},$.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)},$.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)},$.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)},$.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)},$.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)},$.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)},$.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)},$.prototype.getConnectedNodes=function(e){return this.body.nodes[e]===void 0?this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments):this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments)},$.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)},$.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)},$.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)},$.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)},$.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)},$.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)},$.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)},$.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)},$.prototype.getNodeAt=function(){var e=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return e!==void 0&&e.id!==void 0?e.id:e},$.prototype.getEdgeAt=function(){var e=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return e!==void 0&&e.id!==void 0?e.id:e},$.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)},$.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)},$.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()},$.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)},$.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)},$.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)},$.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)},$.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)},$.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)},$.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)},$.prototype.getOptionsFromConfigurator=function(){var e={};return this.configurator&&(e=this.configurator.getOptions.apply(this.configurator)),e};var XD=My;e.Network=$,e.NetworkImages=Ry,e.networkDOTParser=Ny,e.networkGephiParser=Fy,e.networkOptions=qD,e.parseDOTNetwork=XD,e.parseGephiNetwork=Py}))})),re=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):r((n=typeof globalThis<`u`?globalThis:n||self).vis=n.vis||{})})(e,(function(e){function t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var n=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var i={exports:{}},a=function(e){return e&&e.Math===Math&&e},o=a(typeof globalThis==`object`&&globalThis)||a(typeof window==`object`&&window)||a(typeof self==`object`&&self)||a(typeof n==`object`&&n)||function(){return this}()||n||Function(`return this`)(),s=function(e){try{return!!e()}catch{return!0}},c=!s((function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})),l=c,u=Function.prototype,d=u.apply,f=u.call,p=typeof Reflect==`object`&&Reflect.apply||(l?f.bind(d):function(){return f.apply(d,arguments)}),m=c,h=Function.prototype,g=h.call,_=m&&h.bind.bind(g,g),v=m?_:function(e){return function(){return g.apply(e,arguments)}},y=v,b=y({}.toString),x=y(``.slice),S=function(e){return x(b(e),8,-1)},ee=S,C=v,te=function(e){if(ee(e)===`Function`)return C(e)},w=typeof document==`object`&&document.all,ne={all:w,IS_HTMLDDA:w===void 0&&w!==void 0},re=ne.all,T=ne.IS_HTMLDDA?function(e){return typeof e==`function`||e===re}:function(e){return typeof e==`function`},E={},D=!s((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})),O=c,ie=Function.prototype.call,ae=O?ie.bind(ie):function(){return ie.apply(ie,arguments)},k={},oe={}.propertyIsEnumerable,se=Object.getOwnPropertyDescriptor;k.f=se&&!oe.call({1:2},1)?function(e){var t=se(this,e);return!!t&&t.enumerable}:oe;var ce,le,ue=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},de=s,fe=S,pe=Object,me=v(``.split),he=de((function(){return!pe(`z`).propertyIsEnumerable(0)}))?function(e){return fe(e)===`String`?me(e,``):pe(e)}:pe,ge=function(e){return e==null},_e=ge,ve=TypeError,ye=function(e){if(_e(e))throw new ve(`Can't call method on `+e);return e},be=he,xe=ye,A=function(e){return be(xe(e))},Se=T,Ce=ne.all,j=ne.IS_HTMLDDA?function(e){return typeof e==`object`?e!==null:Se(e)||e===Ce}:function(e){return typeof e==`object`?e!==null:Se(e)},M={},N=M,we=o,Te=T,Ee=function(e){return Te(e)?e:void 0},P=function(e,t){return arguments.length<2?Ee(N[e])||Ee(we[e]):N[e]&&N[e][t]||we[e]&&we[e][t]},F=v({}.isPrototypeOf),De=typeof navigator<`u`&&String(navigator.userAgent)||``,Oe=o,ke=De,Ae=Oe.process,je=Oe.Deno,I=Ae&&Ae.versions||je&&je.version,Me=I&&I.v8;Me&&(le=(ce=Me.split(`.`))[0]>0&&ce[0]<4?1:+(ce[0]+ce[1])),!le&&ke&&(!(ce=ke.match(/Edge\/(\d+)/))||ce[1]>=74)&&(ce=ke.match(/Chrome\/(\d+)/))&&(le=+ce[1]);var Ne=le,Pe=Ne,Fe=s,Ie=o.String,Le=!!Object.getOwnPropertySymbols&&!Fe((function(){var e=Symbol(`symbol detection`);return!Ie(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Pe&&Pe<41})),Re=Le&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,ze=P,Be=T,Ve=F,He=Object,Ue=Re?function(e){return typeof e==`symbol`}:function(e){var t=ze(`Symbol`);return Be(t)&&Ve(t.prototype,He(e))},We=String,Ge=function(e){try{return We(e)}catch{return`Object`}},Ke=T,qe=Ge,Je=TypeError,Ye=function(e){if(Ke(e))return e;throw new Je(qe(e)+` is not a function`)},Xe=Ye,Ze=ge,Qe=function(e,t){var n=e[t];return Ze(n)?void 0:Xe(n)},$e=ae,et=T,tt=j,nt=TypeError,rt={exports:{}},it=o,at=Object.defineProperty,ot=function(e,t){try{at(it,e,{value:t,configurable:!0,writable:!0})}catch{it[e]=t}return t},st=`__core-js_shared__`,ct=o[st]||ot(st,{}),lt=ct;(rt.exports=function(e,t){return lt[e]||(lt[e]=t===void 0?{}:t)})(`versions`,[]).push({version:`3.33.2`,mode:`pure`,copyright:`© 2014-2023 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE`,source:`https://github.com/zloirock/core-js`});var ut=rt.exports,dt=ye,ft=Object,pt=function(e){return ft(dt(e))},mt=pt,ht=v({}.hasOwnProperty),gt=Object.hasOwn||function(e,t){return ht(mt(e),t)},_t=v,vt=0,yt=Math.random(),bt=_t(1 .toString),xt=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+bt(++vt+yt,36)},St=ut,Ct=gt,wt=xt,Tt=Le,Et=Re,Dt=o.Symbol,Ot=St(`wks`),kt=Et?Dt.for||Dt:Dt&&Dt.withoutSetter||wt,At=function(e){return Ct(Ot,e)||(Ot[e]=Tt&&Ct(Dt,e)?Dt[e]:kt(`Symbol.`+e)),Ot[e]},jt=ae,Mt=j,Nt=Ue,Pt=Qe,Ft=function(e,t){var n,r;if(t===`string`&&et(n=e.toString)&&!tt(r=$e(n,e))||et(n=e.valueOf)&&!tt(r=$e(n,e))||t!==`string`&&et(n=e.toString)&&!tt(r=$e(n,e)))return r;throw new nt(`Can't convert object to primitive value`)},It=TypeError,Lt=At(`toPrimitive`),Rt=function(e,t){if(!Mt(e)||Nt(e))return e;var n,r=Pt(e,Lt);if(r){if(t===void 0&&(t=`default`),n=jt(r,e,t),!Mt(n)||Nt(n))return n;throw new It(`Can't convert object to primitive value`)}return t===void 0&&(t=`number`),Ft(e,t)},zt=Ue,Bt=function(e){var t=Rt(e,`string`);return zt(t)?t:t+``},Vt=j,Ht=o.document,Ut=Vt(Ht)&&Vt(Ht.createElement),Wt=function(e){return Ut?Ht.createElement(e):{}},Gt=Wt,Kt=!D&&!s((function(){return Object.defineProperty(Gt(`div`),`a`,{get:function(){return 7}}).a!==7})),qt=D,Jt=ae,Yt=k,Xt=ue,Zt=A,Qt=Bt,$t=gt,en=Kt,tn=Object.getOwnPropertyDescriptor;E.f=qt?tn:function(e,t){if(e=Zt(e),t=Qt(t),en)try{return tn(e,t)}catch{}if($t(e,t))return Xt(!Jt(Yt.f,e,t),e[t])};var nn=s,rn=T,an=/#|\.prototype\./,on=function(e,t){var n=cn[sn(e)];return n===un||n!==ln&&(rn(t)?nn(t):!!t)},sn=on.normalize=function(e){return String(e).replace(an,`.`).toLowerCase()},cn=on.data={},ln=on.NATIVE=`N`,un=on.POLYFILL=`P`,dn=on,fn=Ye,pn=c,mn=te(te.bind),hn=function(e,t){return fn(e),t===void 0?e:pn?mn(e,t):function(){return e.apply(t,arguments)}},gn={},_n=D&&s((function(){return Object.defineProperty((function(){}),`prototype`,{value:42,writable:!1}).prototype!==42})),vn=j,yn=String,bn=TypeError,xn=function(e){if(vn(e))return e;throw new bn(yn(e)+` is not an object`)},Sn=D,Cn=Kt,wn=_n,Tn=xn,En=Bt,Dn=TypeError,On=Object.defineProperty,kn=Object.getOwnPropertyDescriptor,An=`enumerable`,jn=`configurable`,Mn=`writable`;gn.f=Sn?wn?function(e,t,n){if(Tn(e),t=En(t),Tn(n),typeof e==`function`&&t===`prototype`&&`value`in n&&Mn in n&&!n[Mn]){var r=kn(e,t);r&&r[Mn]&&(e[t]=n.value,n={configurable:jn in n?n[jn]:r[jn],enumerable:An in n?n[An]:r[An],writable:!1})}return On(e,t,n)}:On:function(e,t,n){if(Tn(e),t=En(t),Tn(n),Cn)try{return On(e,t,n)}catch{}if(`get`in n||`set`in n)throw new Dn(`Accessors not supported`);return`value`in n&&(e[t]=n.value),e};var Nn=gn,Pn=ue,Fn=D?function(e,t,n){return Nn.f(e,t,Pn(1,n))}:function(e,t,n){return e[t]=n,e},In=o,Ln=p,Rn=te,zn=T,Bn=E.f,Vn=dn,Hn=M,Un=hn,Wn=Fn,Gn=gt,L=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return Ln(e,this,arguments)};return t.prototype=e.prototype,t},R=function(e,t){var n,r,i,a,o,s,c,l,u,d=e.target,f=e.global,p=e.stat,m=e.proto,h=f?In:p?In[d]:(In[d]||{}).prototype,g=f?Hn:Hn[d]||Wn(Hn,d,{})[d],_=g.prototype;for(a in t)r=!(n=Vn(f?a:d+(p?`.`:`#`)+a,e.forced))&&h&&Gn(h,a),s=g[a],r&&(c=e.dontCallGetSet?(u=Bn(h,a))&&u.value:h[a]),o=r&&c?c:t[a],r&&typeof s==typeof o||(l=e.bind&&r?Un(o,In):e.wrap&&r?L(o):m&&zn(o)?Rn(o):o,(e.sham||o&&o.sham||s&&s.sham)&&Wn(l,`sham`,!0),Wn(g,a,l),m&&(Gn(Hn,i=d+`Prototype`)||Wn(Hn,i,{}),Wn(Hn[i],a,o),e.real&&_&&(n||!_[a])&&Wn(_,a,o)))},Kn=R,qn=D,Jn=gn.f;Kn({target:`Object`,stat:!0,forced:Object.defineProperty!==Jn,sham:!qn},{defineProperty:Jn});var Yn=M.Object,Xn=i.exports=function(e,t,n){return Yn.defineProperty(e,t,n)};Yn.defineProperty.sham&&(Xn.sham=!0);var Zn=i.exports,Qn=Zn,$n=r(Qn),er=S,tr=Array.isArray||function(e){return er(e)===`Array`},nr=Math.ceil,rr=Math.floor,ir=Math.trunc||function(e){var t=+e;return(t>0?rr:nr)(t)},ar=function(e){var t=+e;return t!=t||t===0?0:ir(t)},or=ar,z=Math.min,sr=function(e){return e>0?z(or(e),9007199254740991):0},cr=function(e){return sr(e.length)},lr=TypeError,ur=function(e){if(e>9007199254740991)throw lr(`Maximum allowed index exceeded`);return e},dr=Bt,fr=gn,pr=ue,mr=function(e,t,n){var r=dr(t);r in e?fr.f(e,r,pr(0,n)):e[r]=n},hr={};hr[At(`toStringTag`)]=`z`;var gr=String(hr)===`[object z]`,_r=gr,vr=T,yr=S,br=At(`toStringTag`),xr=Object,Sr=yr(function(){return arguments}())===`Arguments`,Cr=_r?yr:function(e){var t,n,r;return e===void 0?`Undefined`:e===null?`Null`:typeof(n=function(e,t){try{return e[t]}catch{}}(t=xr(e),br))==`string`?n:Sr?yr(t):(r=yr(t))===`Object`&&vr(t.callee)?`Arguments`:r},wr=T,Tr=ct,Er=v(Function.toString);wr(Tr.inspectSource)||(Tr.inspectSource=function(e){return Er(e)});var Dr=Tr.inspectSource,Or=v,kr=s,Ar=T,jr=Cr,Mr=Dr,Nr=function(){},Pr=[],Fr=P(`Reflect`,`construct`),Ir=/^\s*(?:class|function)\b/,Lr=Or(Ir.exec),Rr=!Ir.test(Nr),zr=function(e){if(!Ar(e))return!1;try{return Fr(Nr,Pr,e),!0}catch{return!1}},Br=function(e){if(!Ar(e))return!1;switch(jr(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return Rr||!!Lr(Ir,Mr(e))}catch{return!0}};Br.sham=!0;var Vr=!Fr||kr((function(){var e;return zr(zr.call)||!zr(Object)||!zr((function(){e=!0}))||e}))?Br:zr,Hr=tr,Ur=Vr,Wr=j,Gr=At(`species`),Kr=Array,qr=function(e){var t;return Hr(e)&&(t=e.constructor,(Ur(t)&&(t===Kr||Hr(t.prototype))||Wr(t)&&(t=t[Gr])===null)&&(t=void 0)),t===void 0?Kr:t},Jr=function(e,t){return new(qr(e))(t===0?0:t)},Yr=s,Xr=Ne,Zr=At(`species`),Qr=function(e){return Xr>=51||!Yr((function(){var t=[];return(t.constructor={})[Zr]=function(){return{foo:1}},t[e](Boolean).foo!==1}))},B=R,$r=s,ei=tr,ti=j,ni=pt,ri=cr,ii=ur,ai=mr,oi=Jr,si=Qr,ci=Ne,li=At(`isConcatSpreadable`),ui=ci>=51||!$r((function(){var e=[];return e[li]=!1,e.concat()[0]!==e})),di=function(e){if(!ti(e))return!1;var t=e[li];return t===void 0?ei(e):!!t};B({target:`Array`,proto:!0,arity:1,forced:!ui||!si(`concat`)},{concat:function(e){var t,n,r,i,a,o=ni(this),s=oi(o,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(di(a=t===-1?o:arguments[t]))for(i=ri(a),ii(c+i),n=0;n<i;n++,c++)n in a&&ai(s,c,a[n]);else ii(c+1),ai(s,c++,a);return s.length=c,s}});var fi=Cr,pi=String,mi=function(e){if(fi(e)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return pi(e)},hi={},gi=ar,_i=Math.max,vi=Math.min,yi=function(e,t){var n=gi(e);return n<0?_i(n+t,0):vi(n,t)},bi=A,xi=yi,Si=cr,Ci=function(e){return function(t,n,r){var i,a=bi(t),o=Si(a),s=xi(r,o);if(e&&n!=n){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},wi={includes:Ci(!0),indexOf:Ci(!1)},Ti={},Ei=gt,Di=A,Oi=wi.indexOf,ki=Ti,Ai=v([].push),ji=function(e,t){var n,r=Di(e),i=0,a=[];for(n in r)!Ei(ki,n)&&Ei(r,n)&&Ai(a,n);for(;t.length>i;)Ei(r,n=t[i++])&&(~Oi(a,n)||Ai(a,n));return a},Mi=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],Ni=ji,Pi=Mi,Fi=Object.keys||function(e){return Ni(e,Pi)},Ii=D,Li=_n,Ri=gn,zi=xn,Bi=A,Vi=Fi;hi.f=Ii&&!Li?Object.defineProperties:function(e,t){zi(e);for(var n,r=Bi(t),i=Vi(t),a=i.length,o=0;a>o;)Ri.f(e,n=i[o++],r[n]);return e};var Hi,Ui=P(`document`,`documentElement`),Wi=xt,Gi=ut(`keys`),Ki=function(e){return Gi[e]||(Gi[e]=Wi(e))},qi=xn,Ji=hi,Yi=Mi,Xi=Ti,Zi=Ui,Qi=Wt,$i=`prototype`,ea=`script`,ta=Ki(`IE_PROTO`),na=function(){},ra=function(e){return`<`+ea+`>`+e+`</`+ea+`>`},ia=function(e){e.write(ra(``)),e.close();var t=e.parentWindow.Object;return e=null,t},aa=function(){try{Hi=new ActiveXObject(`htmlfile`)}catch{}var e,t,n;aa=typeof document<`u`?document.domain&&Hi?ia(Hi):(t=Qi(`iframe`),n=`java`+ea+`:`,t.style.display=`none`,Zi.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(ra(`document.F=Object`)),e.close(),e.F):ia(Hi);for(var r=Yi.length;r--;)delete aa[$i][Yi[r]];return aa()};Xi[ta]=!0;var oa=Object.create||function(e,t){var n;return e===null?n=aa():(na[$i]=qi(e),n=new na,na[$i]=null,n[ta]=e),t===void 0?n:Ji.f(n,t)},sa={},ca=ji,la=Mi.concat(`length`,`prototype`);sa.f=Object.getOwnPropertyNames||function(e){return ca(e,la)};var ua={},da=yi,fa=cr,pa=mr,ma=Array,ha=Math.max,ga=function(e,t,n){for(var r=fa(e),i=da(t,r),a=da(n===void 0?r:n,r),o=ma(ha(a-i,0)),s=0;i<a;i++,s++)pa(o,s,e[i]);return o.length=s,o},_a=S,va=A,ya=sa.f,ba=ga,xa=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];ua.f=function(e){return xa&&_a(e)===`Window`?function(e){try{return ya(e)}catch{return ba(xa)}}(e):ya(va(e))};var Sa={};Sa.f=Object.getOwnPropertySymbols;var Ca=Fn,wa=function(e,t,n,r){return r&&r.enumerable?e[t]=n:Ca(e,t,n),e},Ta=gn,Ea=function(e,t,n){return Ta.f(e,t,n)},Da={};Da.f=At;var Oa,ka,Aa,ja=M,Ma=gt,Na=Da,Pa=gn.f,Fa=function(e){var t=ja.Symbol||={};Ma(t,e)||Pa(t,e,{value:Na.f(e)})},Ia=ae,La=P,Ra=At,za=wa,Ba=function(){var e=La(`Symbol`),t=e&&e.prototype,n=t&&t.valueOf,r=Ra(`toPrimitive`);t&&!t[r]&&za(t,r,(function(e){return Ia(n,this)}),{arity:1})},Va=Cr,Ha=gr?{}.toString:function(){return`[object `+Va(this)+`]`},Ua=gr,Wa=gn.f,Ga=Fn,Ka=gt,qa=Ha,Ja=At(`toStringTag`),Ya=function(e,t,n,r){if(e){var i=n?e:e.prototype;Ka(i,Ja)||Wa(i,Ja,{configurable:!0,value:t}),r&&!Ua&&Ga(i,`toString`,qa)}},Xa=T,Za=o.WeakMap,Qa=Xa(Za)&&/native code/.test(String(Za)),$a=o,eo=j,to=Fn,no=gt,ro=ct,io=Ki,ao=Ti,oo=`Object already initialized`,so=$a.TypeError,co=$a.WeakMap;if(Qa||ro.state){var lo=ro.state||=new co;lo.get=lo.get,lo.has=lo.has,lo.set=lo.set,Oa=function(e,t){if(lo.has(e))throw new so(oo);return t.facade=e,lo.set(e,t),t},ka=function(e){return lo.get(e)||{}},Aa=function(e){return lo.has(e)}}else{var uo=io(`state`);ao[uo]=!0,Oa=function(e,t){if(no(e,uo))throw new so(oo);return t.facade=e,to(e,uo,t),t},ka=function(e){return no(e,uo)?e[uo]:{}},Aa=function(e){return no(e,uo)}}var fo={set:Oa,get:ka,has:Aa,enforce:function(e){return Aa(e)?ka(e):Oa(e,{})},getterFor:function(e){return function(t){var n;if(!eo(t)||(n=ka(t)).type!==e)throw new so(`Incompatible receiver, `+e+` required`);return n}}},po=hn,mo=he,ho=pt,go=cr,_o=Jr,vo=v([].push),yo=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(c,l,u,d){for(var f,p,m=ho(c),h=mo(m),g=po(l,u),_=go(h),v=0,y=d||_o,b=t?y(c,_):n||o?y(c,0):void 0;_>v;v++)if((s||v in h)&&(p=g(f=h[v],v,m),e))if(t)b[v]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:vo(b,f)}else switch(e){case 4:return!1;case 7:vo(b,f)}return a?-1:r||i?i:b}},bo={forEach:yo(0),map:yo(1),filter:yo(2),some:yo(3),every:yo(4),find:yo(5),findIndex:yo(6),filterReject:yo(7)},xo=R,So=o,Co=ae,wo=v,To=D,Eo=Le,Do=s,Oo=gt,ko=F,Ao=xn,jo=A,Mo=Bt,No=mi,Po=ue,Fo=oa,Io=Fi,Lo=sa,Ro=ua,zo=Sa,Bo=E,Vo=gn,Ho=hi,Uo=k,Wo=wa,Go=Ea,Ko=ut,qo=Ti,Jo=xt,Yo=At,Xo=Da,Zo=Fa,Qo=Ba,$o=Ya,es=fo,ts=bo.forEach,ns=Ki(`hidden`),rs=`Symbol`,is=`prototype`,as=es.set,os=es.getterFor(rs),ss=Object[is],cs=So.Symbol,ls=cs&&cs[is],us=So.RangeError,ds=So.TypeError,fs=So.QObject,ps=Bo.f,ms=Vo.f,hs=Ro.f,gs=Uo.f,_s=wo([].push),vs=Ko(`symbols`),ys=Ko(`op-symbols`),bs=Ko(`wks`),xs=!fs||!fs[is]||!fs[is].findChild,Ss=function(e,t,n){var r=ps(ss,t);r&&delete ss[t],ms(e,t,n),r&&e!==ss&&ms(ss,t,r)},Cs=To&&Do((function(){return Fo(ms({},`a`,{get:function(){return ms(this,`a`,{value:7}).a}})).a!==7}))?Ss:ms,ws=function(e,t){var n=vs[e]=Fo(ls);return as(n,{type:rs,tag:e,description:t}),To||(n.description=t),n},Ts=function(e,t,n){e===ss&&Ts(ys,t,n),Ao(e);var r=Mo(t);return Ao(n),Oo(vs,r)?(n.enumerable?(Oo(e,ns)&&e[ns][r]&&(e[ns][r]=!1),n=Fo(n,{enumerable:Po(0,!1)})):(Oo(e,ns)||ms(e,ns,Po(1,{})),e[ns][r]=!0),Cs(e,r,n)):ms(e,r,n)},Es=function(e,t){Ao(e);var n=jo(t);return ts(Io(n).concat(As(n)),(function(t){To&&!Co(Ds,n,t)||Ts(e,t,n[t])})),e},Ds=function(e){var t=Mo(e),n=Co(gs,this,t);return!(this===ss&&Oo(vs,t)&&!Oo(ys,t))&&(!(n||!Oo(this,t)||!Oo(vs,t)||Oo(this,ns)&&this[ns][t])||n)},Os=function(e,t){var n=jo(e),r=Mo(t);if(n!==ss||!Oo(vs,r)||Oo(ys,r)){var i=ps(n,r);return!i||!Oo(vs,r)||Oo(n,ns)&&n[ns][r]||(i.enumerable=!0),i}},ks=function(e){var t=hs(jo(e)),n=[];return ts(t,(function(e){Oo(vs,e)||Oo(qo,e)||_s(n,e)})),n},As=function(e){var t=e===ss,n=hs(t?ys:jo(e)),r=[];return ts(n,(function(e){!Oo(vs,e)||t&&!Oo(ss,e)||_s(r,vs[e])})),r};Eo||(cs=function(){if(ko(ls,this))throw new ds(`Symbol is not a constructor`);var e=arguments.length&&arguments[0]!==void 0?No(arguments[0]):void 0,t=Jo(e),n=function(e){var r=this===void 0?So:this;r===ss&&Co(n,ys,e),Oo(r,ns)&&Oo(r[ns],t)&&(r[ns][t]=!1);var i=Po(1,e);try{Cs(r,t,i)}catch(e){if(!(e instanceof us))throw e;Ss(r,t,i)}};return To&&xs&&Cs(ss,t,{configurable:!0,set:n}),ws(t,e)},Wo(ls=cs[is],`toString`,(function(){return os(this).tag})),Wo(cs,`withoutSetter`,(function(e){return ws(Jo(e),e)})),Uo.f=Ds,Vo.f=Ts,Ho.f=Es,Bo.f=Os,Lo.f=Ro.f=ks,zo.f=As,Xo.f=function(e){return ws(Yo(e),e)},To&&Go(ls,`description`,{configurable:!0,get:function(){return os(this).description}})),xo({global:!0,constructor:!0,wrap:!0,forced:!Eo,sham:!Eo},{Symbol:cs}),ts(Io(bs),(function(e){Zo(e)})),xo({target:rs,stat:!0,forced:!Eo},{useSetter:function(){xs=!0},useSimple:function(){xs=!1}}),xo({target:`Object`,stat:!0,forced:!Eo,sham:!To},{create:function(e,t){return t===void 0?Fo(e):Es(Fo(e),t)},defineProperty:Ts,defineProperties:Es,getOwnPropertyDescriptor:Os}),xo({target:`Object`,stat:!0,forced:!Eo},{getOwnPropertyNames:ks}),Qo(),$o(cs,rs),qo[ns]=!0;var js=Le&&!!Symbol.for&&!!Symbol.keyFor,Ms=R,Ns=P,Ps=gt,Fs=mi,Is=ut,Ls=js,Rs=Is(`string-to-symbol-registry`),zs=Is(`symbol-to-string-registry`);Ms({target:`Symbol`,stat:!0,forced:!Ls},{for:function(e){var t=Fs(e);if(Ps(Rs,t))return Rs[t];var n=Ns(`Symbol`)(t);return Rs[t]=n,zs[n]=t,n}});var Bs=R,Vs=gt,Hs=Ue,Us=Ge,Ws=js,Gs=ut(`symbol-to-string-registry`);Bs({target:`Symbol`,stat:!0,forced:!Ws},{keyFor:function(e){if(!Hs(e))throw TypeError(Us(e)+` is not a symbol`);if(Vs(Gs,e))return Gs[e]}});var Ks=v([].slice),qs=tr,Js=T,Ys=S,Xs=mi,Zs=v([].push),Qs=R,$s=P,ec=p,tc=ae,nc=v,rc=s,ic=T,ac=Ue,oc=Ks,sc=function(e){if(Js(e))return e;if(qs(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i==`string`?Zs(n,i):typeof i!=`number`&&Ys(i)!==`Number`&&Ys(i)!==`String`||Zs(n,Xs(i))}var a=n.length,o=!0;return function(e,t){if(o)return o=!1,t;if(qs(this))return t;for(var r=0;r<a;r++)if(n[r]===e)return t}}},cc=Le,lc=String,uc=$s(`JSON`,`stringify`),dc=nc(/./.exec),fc=nc(``.charAt),pc=nc(``.charCodeAt),mc=nc(``.replace),hc=nc(1 .toString),gc=/[\uD800-\uDFFF]/g,_c=/^[\uD800-\uDBFF]$/,vc=/^[\uDC00-\uDFFF]$/,yc=!cc||rc((function(){var e=$s(`Symbol`)(`stringify detection`);return uc([e])!==`[null]`||uc({a:e})!==`{}`||uc(Object(e))!==`{}`})),bc=rc((function(){return uc(`\udf06\ud834`)!==`"\\udf06\\ud834"`||uc(`\udead`)!==`"\\udead"`})),xc=function(e,t){var n=oc(arguments),r=sc(t);if(ic(r)||e!==void 0&&!ac(e))return n[1]=function(e,t){if(ic(r)&&(t=tc(r,this,lc(e),t)),!ac(t))return t},ec(uc,null,n)},V=function(e,t,n){var r=fc(n,t-1),i=fc(n,t+1);return dc(_c,e)&&!dc(vc,i)||dc(vc,e)&&!dc(_c,r)?`\\u`+hc(pc(e,0),16):e};uc&&Qs({target:`JSON`,stat:!0,arity:3,forced:yc||bc},{stringify:function(e,t,n){var r=oc(arguments),i=ec(yc?xc:uc,null,r);return bc&&typeof i==`string`?mc(i,gc,V):i}});var Sc=Sa,Cc=pt;R({target:`Object`,stat:!0,forced:!Le||s((function(){Sc.f(1)}))},{getOwnPropertySymbols:function(e){var t=Sc.f;return t?t(Cc(e)):[]}}),Fa(`asyncIterator`),Fa(`hasInstance`),Fa(`isConcatSpreadable`),Fa(`iterator`),Fa(`match`),Fa(`matchAll`),Fa(`replace`),Fa(`search`),Fa(`species`),Fa(`split`);var wc=Ba;Fa(`toPrimitive`),wc();var Tc=P,Ec=Ya;Fa(`toStringTag`),Ec(Tc(`Symbol`),`Symbol`),Fa(`unscopables`),Ya(o.JSON,`JSON`,!0);var Dc,Oc,kc,Ac=M.Symbol,jc={},Mc=D,Nc=gt,Pc=Function.prototype,Fc=Mc&&Object.getOwnPropertyDescriptor,Ic=Nc(Pc,`name`),Lc={EXISTS:Ic,PROPER:Ic&&function(){}.name===`something`,CONFIGURABLE:Ic&&(!Mc||Mc&&Fc(Pc,`name`).configurable)},Rc=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),zc=gt,Bc=T,Vc=pt,Hc=Rc,Uc=Ki(`IE_PROTO`),Wc=Object,Gc=Wc.prototype,Kc=Hc?Wc.getPrototypeOf:function(e){var t=Vc(e);if(zc(t,Uc))return t[Uc];var n=t.constructor;return Bc(n)&&t instanceof n?n.prototype:t instanceof Wc?Gc:null},qc=s,Jc=T,Yc=j,Xc=oa,Zc=Kc,Qc=wa,$c=At(`iterator`),el=!1;[].keys&&(`next`in(kc=[].keys())?(Oc=Zc(Zc(kc)))!==Object.prototype&&(Dc=Oc):el=!0),Jc((Dc=!Yc(Dc)||qc((function(){var e={};return Dc[$c].call(e)!==e}))?{}:Xc(Dc))[$c])||Qc(Dc,$c,(function(){return this}));var tl={IteratorPrototype:Dc,BUGGY_SAFARI_ITERATORS:el},nl=tl.IteratorPrototype,rl=oa,il=ue,al=Ya,ol=jc,sl=function(){return this},cl=v,ll=Ye,ul=T,dl=String,fl=TypeError,pl=function(e,t,n){try{return cl(ll(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},ml=xn,hl=function(e){if(typeof e==`object`||ul(e))return e;throw new fl(`Can't set `+dl(e)+` as a prototype`)},gl=Object.setPrototypeOf||(`__proto__`in{}?function(){var e,t=!1,n={};try{(e=pl(Object.prototype,`__proto__`,`set`))(n,[]),t=n instanceof Array}catch{}return function(n,r){return ml(n),hl(r),t?e(n,r):n.__proto__=r,n}}():void 0),_l=R,vl=ae,yl=Lc,bl=function(e,t,n,r){var i=t+` Iterator`;return e.prototype=rl(nl,{next:il(+!r,n)}),al(e,i,!1,!0),ol[i]=sl,e},xl=Kc,Sl=Ya,Cl=wa,wl=jc,Tl=tl,El=yl.PROPER,Dl=Tl.BUGGY_SAFARI_ITERATORS,Ol=At(`iterator`),kl=`keys`,Al=`values`,jl=`entries`,Ml=function(){return this},Nl=function(e,t,n,r,i,a,o){bl(n,t,r);var s,c,l,u=function(e){if(e===i&&h)return h;if(!Dl&&e&&e in p)return p[e];switch(e){case kl:case Al:case jl:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+` Iterator`,f=!1,p=e.prototype,m=p[Ol]||p[`@@iterator`]||i&&p[i],h=!Dl&&m||u(i),g=t===`Array`&&p.entries||m;if(g&&(s=xl(g.call(new e)))!==Object.prototype&&s.next&&(Sl(s,d,!0,!0),wl[d]=Ml),El&&i===Al&&m&&m.name!==Al&&(f=!0,h=function(){return vl(m,this)}),i)if(c={values:u(Al),keys:a?h:u(kl),entries:u(jl)},o)for(l in c)(Dl||f||!(l in p))&&Cl(p,l,c[l]);else _l({target:t,proto:!0,forced:Dl||f},c);return o&&p[Ol]!==h&&Cl(p,Ol,h,{name:i}),wl[t]=h,c},Pl=function(e,t){return{value:e,done:t}},Fl=A,Il=jc,Ll=fo;gn.f;var Rl=Nl,zl=Pl,Bl=`Array Iterator`,Vl=Ll.set,Hl=Ll.getterFor(Bl);Rl(Array,`Array`,(function(e,t){Vl(this,{type:Bl,target:Fl(e),index:0,kind:t})}),(function(){var e=Hl(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,zl(void 0,!0);switch(e.kind){case`keys`:return zl(n,!1);case`values`:return zl(t[n],!1)}return zl([n,t[n]],!1)}),`values`),Il.Arguments=Il.Array;var Ul={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},Wl=o,Gl=Cr,Kl=Fn,ql=jc,Jl=At(`toStringTag`);for(var Yl in Ul){var Xl=Wl[Yl],Zl=Xl&&Xl.prototype;Zl&&Gl(Zl)!==Jl&&Kl(Zl,Jl,Yl),ql[Yl]=ql.Array}var Ql=Ac,$l=At,eu=gn.f,tu=$l(`metadata`),nu=Function.prototype;nu[tu]===void 0&&eu(nu,tu,{value:null}),Fa(`asyncDispose`),Fa(`dispose`),Fa(`metadata`);var ru=Ql,iu=v,au=P(`Symbol`),ou=au.keyFor,su=iu(au.prototype.valueOf),cu=au.isRegisteredSymbol||function(e){try{return ou(su(e))!==void 0}catch{return!1}};R({target:`Symbol`,stat:!0},{isRegisteredSymbol:cu});for(var lu=ut,uu=P,du=v,fu=Ue,pu=At,mu=uu(`Symbol`),hu=mu.isWellKnownSymbol,gu=uu(`Object`,`getOwnPropertyNames`),_u=du(mu.prototype.valueOf),vu=lu(`wks`),yu=0,bu=gu(mu),xu=bu.length;yu<xu;yu++)try{var Su=bu[yu];fu(mu[Su])&&pu(Su)}catch{}var Cu=function(e){if(hu&&hu(e))return!0;try{for(var t=_u(e),n=0,r=gu(vu),i=r.length;n<i;n++)if(vu[r[n]]==t)return!0}catch{}return!1};R({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:Cu}),Fa(`matcher`),Fa(`observable`),R({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:cu}),R({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:Cu}),Fa(`metadataKey`),Fa(`patternMatch`),Fa(`replaceAll`);var wu=ru,Tu=r(wu),Eu=v,Du=ar,Ou=mi,ku=ye,Au=Eu(``.charAt),ju=Eu(``.charCodeAt),Mu=Eu(``.slice),Nu=function(e){return function(t,n){var r,i,a=Ou(ku(t)),o=Du(n),s=a.length;return o<0||o>=s?e?``:void 0:(r=ju(a,o))<55296||r>56319||o+1===s||(i=ju(a,o+1))<56320||i>57343?e?Au(a,o):r:e?Mu(a,o,o+2):i-56320+(r-55296<<10)+65536}},Pu={codeAt:Nu(!1),charAt:Nu(!0)}.charAt,Fu=mi,Iu=fo,Lu=Nl,Ru=Pl,zu=`String Iterator`,Bu=Iu.set,Vu=Iu.getterFor(zu);Lu(String,`String`,(function(e){Bu(this,{type:zu,string:Fu(e),index:0})}),(function(){var e,t=Vu(this),n=t.string,r=t.index;return r>=n.length?Ru(void 0,!0):(e=Pu(n,r),t.index+=e.length,Ru(e,!1))}));var Hu=Da.f(`iterator`),Uu=Hu,Wu=r(Uu);function Gu(e){return Gu=typeof Tu==`function`&&typeof Wu==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Tu==`function`&&e.constructor===Tu&&e!==Tu.prototype?`symbol`:typeof e},Gu(e)}var Ku=r(Da.f(`toPrimitive`));function qu(e){var t=function(e,t){if(Gu(e)!==`object`||e===null)return e;var n=e[Ku];if(n!==void 0){var r=n.call(e,t||`default`);if(Gu(r)!==`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return Gu(t)===`symbol`?t:String(t)}function Ju(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),$n(e,qu(r.key),r)}}function Yu(e,t,n){return t&&Ju(e.prototype,t),n&&Ju(e,n),$n(e,`prototype`,{writable:!1}),e}function Xu(e,t,n){return(t=qu(t))in e?$n(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zu=v,Qu=Ye,$u=j,ed=gt,td=Ks,nd=c,rd=Function,id=Zu([].concat),ad=Zu([].join),od={},sd=nd?rd.bind:function(e){var t=Qu(this),n=t.prototype,r=td(arguments,1),i=function(){var n=id(r,td(arguments));return this instanceof i?function(e,t,n){if(!ed(od,t)){for(var r=[],i=0;i<t;i++)r[i]=`a[`+i+`]`;od[t]=rd(`C,a`,`return new C(`+ad(r,`,`)+`)`)}return od[t](e,n)}(t,n.length,n):t.apply(e,n)};return $u(n)&&(i.prototype=n),i},cd=sd;R({target:`Function`,proto:!0,forced:Function.bind!==cd},{bind:cd});var ld=o,ud=M,dd=function(e,t){var n=ud[e+`Prototype`],r=n&&n[t];if(r)return r;var i=ld[e],a=i&&i.prototype;return a&&a[t]},fd=dd(`Function`,`bind`),pd=F,md=fd,hd=Function.prototype,gd=function(e){var t=e.bind;return e===hd||pd(hd,e)&&t===hd.bind?md:t},_d=r(gd),vd=Ye,yd=pt,bd=he,xd=cr,Sd=TypeError,Cd=function(e){return function(t,n,r,i){vd(n);var a=yd(t),o=bd(a),s=xd(a),c=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(c in o){i=o[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw new Sd(`Reduce of empty array with no initial value`)}for(;e?c>=0:s>c;c+=l)c in o&&(i=n(i,o[c],c,a));return i}},wd={left:Cd(!1),right:Cd(!0)},Td=s,Ed=function(e,t){var n=[][e];return!!n&&Td((function(){n.call(null,t||function(){return 1},1)}))},Dd=S(o.process)===`process`,Od=wd.left;R({target:`Array`,proto:!0,forced:!Dd&&Ne>79&&Ne<83||!Ed(`reduce`)},{reduce:function(e){var t=arguments.length;return Od(this,e,t,t>1?arguments[1]:void 0)}});var kd=dd(`Array`,`reduce`),Ad=F,jd=kd,Md=Array.prototype,Nd=r((function(e){var t=e.reduce;return e===Md||Ad(Md,e)&&t===Md.reduce?jd:t})),Pd=bo.filter;R({target:`Array`,proto:!0,forced:!Qr(`filter`)},{filter:function(e){return Pd(this,e,arguments.length>1?arguments[1]:void 0)}});var Fd=dd(`Array`,`filter`),Id=F,Ld=Fd,Rd=Array.prototype,zd=r((function(e){var t=e.filter;return e===Rd||Id(Rd,e)&&t===Rd.filter?Ld:t})),Bd=bo.map;R({target:`Array`,proto:!0,forced:!Qr(`map`)},{map:function(e){return Bd(this,e,arguments.length>1?arguments[1]:void 0)}});var Vd=dd(`Array`,`map`),Hd=F,Ud=Vd,Wd=Array.prototype,Gd=r((function(e){var t=e.map;return e===Wd||Hd(Wd,e)&&t===Wd.map?Ud:t})),Kd=tr,qd=cr,Jd=ur,Yd=hn,Xd=function(e,t,n,r,i,a,o,s){for(var c,l,u=i,d=0,f=!!o&&Yd(o,s);d<r;)d in n&&(c=f?f(n[d],d,t):n[d],a>0&&Kd(c)?(l=qd(c),u=Xd(e,t,c,l,u,a-1)-1):(Jd(u+1),e[u]=c),u++),d++;return u},Zd=Xd,Qd=Ye,$d=pt,ef=cr,tf=Jr;R({target:`Array`,proto:!0},{flatMap:function(e){var t,n=$d(this),r=ef(n);return Qd(e),(t=tf(n,0)).length=Zd(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var nf=dd(`Array`,`flatMap`),rf=F,af=nf,of=Array.prototype,sf=r((function(e){var t=e.flatMap;return e===of||rf(of,e)&&t===of.flatMap?af:t})),cf=function(){function e(n,r,i){var a,o,s;t(this,e),Xu(this,`_listeners`,{add:_d(a=this._add).call(a,this),remove:_d(o=this._remove).call(o,this),update:_d(s=this._update).call(s,this)}),this._source=n,this._transformers=r,this._target=i}return Yu(e,[{key:`all`,value:function(){return this._target.update(this._transformItems(this._source.get())),this}},{key:`start`,value:function(){return this._source.on(`add`,this._listeners.add),this._source.on(`remove`,this._listeners.remove),this._source.on(`update`,this._listeners.update),this}},{key:`stop`,value:function(){return this._source.off(`add`,this._listeners.add),this._source.off(`remove`,this._listeners.remove),this._source.off(`update`,this._listeners.update),this}},{key:`_transformItems`,value:function(e){var t;return Nd(t=this._transformers).call(t,(function(e,t){return t(e)}),e)}},{key:`_add`,value:function(e,t){t!=null&&this._target.add(this._transformItems(this._source.get(t.items)))}},{key:`_update`,value:function(e,t){t!=null&&this._target.update(this._transformItems(this._source.get(t.items)))}},{key:`_remove`,value:function(e,t){t!=null&&this._target.remove(this._transformItems(t.oldData))}}]),e}(),lf=function(){function e(n){t(this,e),Xu(this,`_transformers`,[]),this._source=n}return Yu(e,[{key:`filter`,value:function(e){return this._transformers.push((function(t){return zd(t).call(t,e)})),this}},{key:`map`,value:function(e){return this._transformers.push((function(t){return Gd(t).call(t,e)})),this}},{key:`flatMap`,value:function(e){return this._transformers.push((function(t){return sf(t).call(t,e)})),this}},{key:`to`,value:function(e){return new cf(this._source,this._transformers,e)}}]),e}(),uf=ae,df=xn,ff=Qe,pf=function(e,t,n){var r,i;df(e);try{if(!(r=ff(e,`return`))){if(t===`throw`)throw n;return n}r=uf(r,e)}catch(e){i=!0,r=e}if(t===`throw`)throw n;if(i)throw r;return df(r),n},mf=xn,hf=pf,gf=jc,_f=At(`iterator`),vf=Array.prototype,yf=function(e){return e!==void 0&&(gf.Array===e||vf[_f]===e)},bf=Cr,xf=Qe,Sf=ge,Cf=jc,wf=At(`iterator`),Tf=function(e){if(!Sf(e))return xf(e,wf)||xf(e,`@@iterator`)||Cf[bf(e)]},H=ae,Ef=Ye,Df=xn,Of=Ge,kf=Tf,Af=TypeError,jf=function(e,t){var n=arguments.length<2?kf(e):t;if(Ef(n))return Df(H(n,e));throw new Af(Of(e)+` is not iterable`)},Mf=hn,Nf=ae,Pf=pt,Ff=function(e,t,n,r){try{return r?t(mf(n)[0],n[1]):t(n)}catch(t){hf(e,`throw`,t)}},If=yf,Lf=Vr,Rf=cr,zf=mr,Bf=jf,Vf=Tf,Hf=Array,Uf=At(`iterator`),Wf=!1;try{var Gf=0,Kf={next:function(){return{done:!!Gf++}},return:function(){Wf=!0}};Kf[Uf]=function(){return this},Array.from(Kf,(function(){throw 2}))}catch{}var qf=function(e,t){try{if(!t&&!Wf)return!1}catch{return!1}var n=!1;try{var r={};r[Uf]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n};R({target:`Array`,stat:!0,forced:!qf((function(e){Array.from(e)}))},{from:function(e){var t=Pf(e),n=Lf(this),r=arguments.length,i=r>1?arguments[1]:void 0,a=i!==void 0;a&&(i=Mf(i,r>2?arguments[2]:void 0));var o,s,c,l,u,d,f=Vf(t),p=0;if(!f||this===Hf&&If(f))for(o=Rf(t),s=n?new this(o):Hf(o);o>p;p++)d=a?i(t[p],p):t[p],zf(s,p,d);else for(u=(l=Bf(t,f)).next,s=n?new this:[];!(c=Nf(u,l)).done;p++)d=a?Ff(l,i,[c.value,p],!0):c.value,zf(s,p,d);return s.length=p,s}});var Jf=M.Array.from,Yf=r(Jf),Xf=Tf,Zf=r(Xf),Qf=r(Xf);R({target:`Array`,stat:!0},{isArray:tr});var $f=M.Array.isArray,ep=r($f),tp=D,np=tr,rp=TypeError,ip=Object.getOwnPropertyDescriptor,ap=tp&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(np(e)&&!ip(e,`length`).writable)throw new rp(`Cannot set read only .length`);return e.length=t}:function(e,t){return e.length=t},op=pt,sp=cr,cp=ap,lp=ur;R({target:`Array`,proto:!0,arity:1,forced:s((function(){return[].push.call({length:4294967296},1)!==4294967297}))||!function(){try{Object.defineProperty([],`length`,{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=op(this),n=sp(t),r=arguments.length;lp(n+r);for(var i=0;i<r;i++)t[n]=arguments[i],n++;return cp(t,n),n}});var up=dd(`Array`,`push`),dp=F,fp=up,pp=Array.prototype,mp=function(e){var t=e.push;return e===pp||dp(pp,e)&&t===pp.push?fp:t},hp=r(mp),gp=R,_p=tr,vp=Vr,yp=j,bp=yi,xp=cr,Sp=A,Cp=mr,wp=At,Tp=Ks,Ep=Qr(`slice`),Dp=wp(`species`),Op=Array,kp=Math.max;gp({target:`Array`,proto:!0,forced:!Ep},{slice:function(e,t){var n,r,i,a=Sp(this),o=xp(a),s=bp(e,o),c=bp(t===void 0?o:t,o);if(_p(a)&&(n=a.constructor,(vp(n)&&(n===Op||_p(n.prototype))||yp(n)&&(n=n[Dp])===null)&&(n=void 0),n===Op||n===void 0))return Tp(a,s,c);for(r=new(n===void 0?Op:n)(kp(c-s,0)),i=0;s<c;s++,i++)s in a&&Cp(r,i,a[s]);return r.length=i,r}});var Ap=dd(`Array`,`slice`),jp=F,Mp=Ap,Np=Array.prototype,Pp=function(e){var t=e.slice;return e===Np||jp(Np,e)&&t===Np.slice?Mp:t},Fp=Pp,Ip=r(Fp),Lp=r(Jf);function Rp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function zp(e,t){var n;if(e){if(typeof e==`string`)return Rp(e,t);var r=Ip(n=Object.prototype.toString.call(e)).call(n,8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?Lp(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rp(e,t):void 0}}function Bp(e,t){return function(e){if(ep(e))return e}(e)||function(e,t){var n=e==null?null:Tu!==void 0&&Zf(e)||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(hp(s).call(s,r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||zp(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
42
42
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Vp(e){return function(e){if(ep(e))return Rp(e)}(e)||function(e){if(Tu!==void 0&&Zf(e)!=null||e[`@@iterator`]!=null)return Lp(e)}(e)||zp(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
43
43
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}var Hp=r(Ql),Up=dd(`Array`,`concat`),Wp=F,Gp=Up,Kp=Array.prototype,qp=r((function(e){var t=e.concat;return e===Kp||Wp(Kp,e)&&t===Kp.concat?Gp:t})),Jp=r(Pp),Yp=P,Xp=sa,Zp=Sa,Qp=xn,$p=v([].concat),em=Yp(`Reflect`,`ownKeys`)||function(e){var t=Xp.f(Qp(e)),n=Zp.f;return n?$p(t,n(e)):t};R({target:`Reflect`,stat:!0},{ownKeys:em});var tm=r(M.Reflect.ownKeys),nm=r($f),rm=pt,im=Fi;R({target:`Object`,stat:!0,forced:s((function(){im(1)}))},{keys:function(e){return im(rm(e))}});var am=r(M.Object.keys),om=bo.forEach,sm=Ed(`forEach`)?[].forEach:function(e){return om(this,e,arguments.length>1?arguments[1]:void 0)};R({target:`Array`,proto:!0,forced:[].forEach!==sm},{forEach:sm});var cm=dd(`Array`,`forEach`),lm=Cr,um=gt,dm=F,fm=cm,pm=Array.prototype,mm={DOMTokenList:!0,NodeList:!0},hm=function(e){var t=e.forEach;return e===pm||dm(pm,e)&&t===pm.forEach||um(mm,lm(e))?fm:t},gm=r(hm),_m=R,vm=tr,ym=v([].reverse),bm=[1,2];_m({target:`Array`,proto:!0,forced:String(bm)===String(bm.reverse())},{reverse:function(){return vm(this)&&(this.length=this.length),ym(this)}});var xm=dd(`Array`,`reverse`),Sm=F,Cm=xm,wm=Array.prototype,Tm=function(e){var t=e.reverse;return e===wm||Sm(wm,e)&&t===wm.reverse?Cm:t},Em=r(Tm),Dm=Ge,Om=TypeError,km=function(e,t){if(!delete e[t])throw new Om(`Cannot delete property `+Dm(t)+` of `+Dm(e))},Am=R,jm=pt,Mm=yi,Nm=ar,Pm=cr,Fm=ap,Im=ur,Lm=Jr,Rm=mr,zm=km,Bm=Qr(`splice`),Vm=Math.max,Hm=Math.min;Am({target:`Array`,proto:!0,forced:!Bm},{splice:function(e,t){var n,r,i,a,o,s,c=jm(this),l=Pm(c),u=Mm(e,l),d=arguments.length;for(d===0?n=r=0:d===1?(n=0,r=l-u):(n=d-2,r=Hm(Vm(Nm(t),0),l-u)),Im(l+n-r),i=Lm(c,r),a=0;a<r;a++)(o=u+a)in c&&Rm(i,a,c[o]);if(i.length=r,n<r){for(a=u;a<l-r;a++)s=a+n,(o=a+r)in c?c[s]=c[o]:zm(c,s);for(a=l;a>l-r+n;a--)zm(c,a-1)}else if(n>r)for(a=l-r;a>u;a--)s=a+n-1,(o=a+r-1)in c?c[s]=c[o]:zm(c,s);for(a=0;a<n;a++)c[a+u]=arguments[a+2];return Fm(c,l-r+n),i}});var Um=dd(`Array`,`splice`),Wm=F,Gm=Um,Km=Array.prototype,qm=r((function(e){var t=e.splice;return e===Km||Wm(Km,e)&&t===Km.splice?Gm:t})),Jm=D,Ym=v,Xm=ae,Zm=s,Qm=Fi,$m=Sa,eh=k,th=pt,nh=he,rh=Object.assign,ih=Object.defineProperty,ah=Ym([].concat),oh=!rh||Zm((function(){if(Jm&&rh({b:1},rh(ih({},`a`,{enumerable:!0,get:function(){ih(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},n=Symbol(`assign detection`),r=`abcdefghijklmnopqrst`;return e[n]=7,r.split(``).forEach((function(e){t[e]=e})),rh({},e)[n]!==7||Qm(rh({},t)).join(``)!==r}))?function(e,t){for(var n=th(e),r=arguments.length,i=1,a=$m.f,o=eh.f;r>i;)for(var s,c=nh(arguments[i++]),l=a?ah(Qm(c),a(c)):Qm(c),u=l.length,d=0;u>d;)s=l[d++],Jm&&!Xm(o,c,s)||(n[s]=c[s]);return n}:rh;R({target:`Object`,stat:!0,arity:2,forced:Object.assign!==oh},{assign:oh});var sh=r(M.Object.assign),ch=pt,lh=Kc,uh=Rc;R({target:`Object`,stat:!0,forced:s((function(){lh(1)})),sham:!uh},{getPrototypeOf:function(e){return lh(ch(e))}});var dh=M.Object.getPrototypeOf;R({target:`Object`,stat:!0,sham:!D},{create:oa});var fh=M.Object,ph=function(e,t){return fh.create(e,t)},mh=r(ph),hh=M,gh=p;hh.JSON||={stringify:JSON.stringify};var _h=r(function(e,t,n){return gh(hh.JSON.stringify,null,arguments)}),vh=typeof Bun==`function`&&Bun&&typeof Bun.version==`string`,yh=TypeError,bh=function(e,t){if(e<t)throw new yh(`Not enough arguments`);return e},xh=o,Sh=p,Ch=T,wh=vh,Th=De,Eh=Ks,Dh=bh,Oh=xh.Function,kh=/MSIE .\./.test(Th)||wh&&function(){var e=xh.Bun.version.split(`.`);return e.length<3||e[0]===`0`&&(e[1]<3||e[1]===`3`&&e[2]===`0`)}(),Ah=function(e,t){var n=t?2:1;return kh?function(r,i){var a=Dh(arguments.length,1)>n,o=Ch(r)?r:Oh(r),s=a?Eh(arguments,n):[],c=a?function(){Sh(o,this,s)}:o;return t?e(c,i):e(c)}:e},jh=R,Mh=o,Nh=Ah(Mh.setInterval,!0);jh({global:!0,bind:!0,forced:Mh.setInterval!==Nh},{setInterval:Nh});var Ph=R,Fh=o,Ih=Ah(Fh.setTimeout,!0);Ph({global:!0,bind:!0,forced:Fh.setTimeout!==Ih},{setTimeout:Ih});var Lh=r(M.setTimeout),Rh={exports:{}};(function(e){function t(e){if(e)return function(e){return Object.assign(e,t.prototype),e._callbacks=new Map,e}(e);this._callbacks=new Map}t.prototype.on=function(e,t){let n=this._callbacks.get(e)??[];return n.push(t),this._callbacks.set(e,n),this},t.prototype.once=function(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return n.fn=t,this.on(e,n),this},t.prototype.off=function(e,t){if(e===void 0&&t===void 0)return this._callbacks.clear(),this;if(t===void 0)return this._callbacks.delete(e),this;let n=this._callbacks.get(e);if(n){for(let[e,r]of n.entries())if(r===t||r.fn===t){n.splice(e,1);break}n.length===0?this._callbacks.delete(e):this._callbacks.set(e,n)}return this},t.prototype.emit=function(e,...t){let n=this._callbacks.get(e);if(n){let e=[...n];for(let n of e)n.apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks.get(e)??[]},t.prototype.listenerCount=function(e){if(e)return this.listeners(e).length;let t=0;for(let e of this._callbacks.values())t+=e.length;return t},t.prototype.hasListeners=function(e){return this.listenerCount(e)>0},t.prototype.addEventListener=t.prototype.on,t.prototype.removeListener=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,e.exports=t})(Rh);var zh,Bh=r(Rh.exports);function Vh(){return Vh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vh.apply(this,arguments)}function Hh(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Uh(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}zh=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t};var Wh,Gh=zh,Kh=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],qh=typeof document>`u`?{style:{}}:document.createElement(`div`),Jh=Math.round,Yh=Math.abs,Xh=Date.now;function Zh(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<Kh.length;){if((r=(n=Kh[a])?n+i:t)in e)return r;a++}}Wh=typeof window>`u`?{}:window;var Qh=Zh(qh.style,`touchAction`),$h=Qh!==void 0,eg=`compute`,tg=`auto`,ng=`manipulation`,rg=`none`,ig=`pan-x`,ag=`pan-y`,og=function(){if(!$h)return!1;var e={},t=Wh.CSS&&Wh.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach((function(n){return e[n]=!t||Wh.CSS.supports(`touch-action`,n)})),e}(),sg=`ontouchstart`in Wh,cg=Zh(Wh,`PointerEvent`)!==void 0,lg=sg&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),ug=`touch`,dg=`mouse`,fg=25,pg=1,mg=4,hg=8,gg=1,_g=2,vg=4,yg=8,bg=16,xg=_g|vg,Sg=yg|bg,Cg=xg|Sg,wg=[`x`,`y`],Tg=[`clientX`,`clientY`];function Eg(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function Dg(e,t){return typeof e==`function`?e.apply(t&&t[0]||void 0,t):e}function Og(e,t){return e.indexOf(t)>-1}var kg=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===eg&&(e=this.compute()),$h&&this.manager.element.style&&og[e]&&(this.manager.element.style[Qh]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return Eg(this.manager.recognizers,(function(t){Dg(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(Og(e,rg))return rg;var t=Og(e,ig),n=Og(e,ag);return t&&n?rg:t||n?t?ig:ag:Og(e,ng)?ng:tg}(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=Og(r,rg)&&!og[rg],a=Og(r,ag)&&!og[ag],o=Og(r,ig)&&!og[ig];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!o||!a)return i||a&&n&xg||o&&n&Sg?this.preventSrc(t):void 0}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function Ag(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function jg(e){var t=e.length;if(t===1)return{x:Jh(e[0].clientX),y:Jh(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:Jh(n/t),y:Jh(r/t)}}function Mg(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:Jh(e.pointers[n].clientX),clientY:Jh(e.pointers[n].clientY)},n++;return{timeStamp:Xh(),pointers:t,center:jg(t),deltaX:e.deltaX,deltaY:e.deltaY}}function Ng(e,t,n){n||=wg;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function Pg(e,t,n){n||=wg;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}function Fg(e,t){return e===t?gg:Yh(e)>=Yh(t)?e<0?_g:vg:t<0?yg:bg}function Ig(e,t,n){return{x:t/e||0,y:n/e||0}}function Lg(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=Mg(t),i>1&&!n.firstMultiple?n.firstMultiple=Mg(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=jg(r);t.timeStamp=Xh(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=Pg(s,c),t.distance=Ng(s,c),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};t.eventType!==pg&&a.eventType!==mg||(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=Fg(t.deltaX,t.deltaY);var l,u,d=Ig(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=d.x,t.overallVelocityY=d.y,t.overallVelocity=Yh(d.x)>Yh(d.y)?d.x:d.y,t.scale=o?(l=o.pointers,Ng((u=r)[0],u[1],Tg)/Ng(l[0],l[1],Tg)):1,t.rotation=o?function(e,t){return Pg(t[1],t[0],Tg)+Pg(e[1],e[0],Tg)}(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,i,a,o=e.lastInterval||t,s=t.timeStamp-o.timeStamp;if(t.eventType!==hg&&(s>fg||o.velocity===void 0)){var c=t.deltaX-o.deltaX,l=t.deltaY-o.deltaY,u=Ig(s,c,l);r=u.x,i=u.y,n=Yh(u.x)>Yh(u.y)?u.x:u.y,a=Fg(c,l),e.lastInterval=t}else n=o.velocity,r=o.velocityX,i=o.velocityY,a=o.direction;t.velocity=n,t.velocityX=r,t.velocityY=i,t.direction=a}(n,t);var f,p=e.element,m=t.srcEvent;Ag(f=m.composedPath?m.composedPath()[0]:m.path?m.path[0]:m.target,p)&&(p=f),t.target=p}function Rg(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&pg&&r-i==0,o=t&(mg|hg)&&r-i==0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,Lg(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function zg(e){return e.trim().split(/\s+/g)}function Bg(e,t,n){Eg(zg(t),(function(t){e.addEventListener(t,n,!1)}))}function Vg(e,t,n){Eg(zg(t),(function(t){e.removeEventListener(t,n,!1)}))}function Hg(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var Ug=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){Dg(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&Bg(this.element,this.evEl,this.domHandler),this.evTarget&&Bg(this.target,this.evTarget,this.domHandler),this.evWin&&Bg(Hg(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&Vg(this.element,this.evEl,this.domHandler),this.evTarget&&Vg(this.target,this.evTarget,this.domHandler),this.evWin&&Vg(Hg(this.element),this.evWin,this.domHandler)},e}();function Wg(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var Gg={pointerdown:pg,pointermove:2,pointerup:mg,pointercancel:hg,pointerout:hg},Kg={2:ug,3:`pen`,4:dg,5:`kinect`},qg=`pointerdown`,Jg=`pointermove pointerup pointercancel`;Wh.MSPointerEvent&&!Wh.PointerEvent&&(qg=`MSPointerDown`,Jg=`MSPointerMove MSPointerUp MSPointerCancel`);var Yg=function(e){function t(){var n,r=t.prototype;return r.evEl=qg,r.evWin=Jg,(n=e.apply(this,arguments)||this).store=n.manager.session.pointerEvents=[],n}return Hh(t,e),t.prototype.handler=function(e){var t=this.store,n=!1,r=Gg[e.type.toLowerCase().replace(`ms`,``)],i=Kg[e.pointerType]||e.pointerType,a=i===ug,o=Wg(t,e.pointerId,`pointerId`);r&pg&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(mg|hg)&&(n=!0),o<0||(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))},t}(Ug);function Xg(e){return Array.prototype.slice.call(e,0)}function Zg(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];Wg(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort((function(e,n){return e[t]>n[t]})):r.sort()),r}var Qg={touchstart:pg,touchmove:2,touchend:mg,touchcancel:hg},$g=function(e){function t(){var n;return t.prototype.evTarget=`touchstart touchmove touchend touchcancel`,(n=e.apply(this,arguments)||this).targetIds={},n}return Hh(t,e),t.prototype.handler=function(e){var t=Qg[e.type],n=e_.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:ug,srcEvent:e})},t}(Ug);function e_(e,t){var n,r,i=Xg(e.touches),a=this.targetIds;if(t&(2|pg)&&i.length===1)return a[i[0].identifier]=!0,[i,i];var o=Xg(e.changedTouches),s=[],c=this.target;if(r=i.filter((function(e){return Ag(e.target,c)})),t===pg)for(n=0;n<r.length;)a[r[n].identifier]=!0,n++;for(n=0;n<o.length;)a[o[n].identifier]&&s.push(o[n]),t&(mg|hg)&&delete a[o[n].identifier],n++;return s.length?[Zg(r.concat(s),`identifier`,!0),s]:void 0}var t_={mousedown:pg,mousemove:2,mouseup:mg},n_=function(e){function t(){var n,r=t.prototype;return r.evEl=`mousedown`,r.evWin=`mousemove mouseup`,(n=e.apply(this,arguments)||this).pressed=!1,n}return Hh(t,e),t.prototype.handler=function(e){var t=t_[e.type];t&pg&&e.button===0&&(this.pressed=!0),2&t&&e.which!==1&&(t=mg),this.pressed&&(t&mg&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:dg,srcEvent:e}))},t}(Ug),r_=2500;function i_(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout((function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)}),r_)}}function a_(e,t){e&pg?(this.primaryTouch=t.changedPointers[0].identifier,i_.call(this,t)):e&(mg|hg)&&i_.call(this,t)}function o_(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=25&&o<=25)return!0}return!1}var s_=function(){return function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).handler=function(e,t,n){var i=n.pointerType===ug,a=n.pointerType===dg;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)a_.call(Uh(Uh(r)),t,n);else if(a&&o_.call(Uh(Uh(r)),n))return;r.callback(e,t,n)}},r.touch=new $g(r.manager,r.handler),r.mouse=new n_(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}return Hh(t,e),t.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(Ug)}();function c_(e,t,n){return!!Array.isArray(e)&&(Eg(e,n[t],n),!0)}var l_=32,u_=1;function d_(e,t){var n=t.manager;return n?n.get(e):e}function f_(e){return 16&e?`cancel`:8&e?`end`:4&e?`move`:2&e?`start`:``}var p_=function(){function e(e){e===void 0&&(e={}),this.options=Vh({enable:!0},e),this.id=u_++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return Gh(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(c_(e,`recognizeWith`,this))return this;var t=this.simultaneous;return t[(e=d_(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return c_(e,`dropRecognizeWith`,this)||(e=d_(e,this),delete this.simultaneous[e.id]),this},t.requireFailure=function(e){if(c_(e,`requireFailure`,this))return this;var t=this.requireFail;return Wg(t,e=d_(e,this))===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(c_(e,`dropRequireFailure`,this))return this;e=d_(e,this);var t=Wg(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+f_(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+f_(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=l_},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},t.recognize=function(e){var t=Gh({},e);if(!Dg(this.options.enable,[this,t]))return this.reset(),void(this.state=l_);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),m_=function(e){function t(t){var n;return t===void 0&&(t={}),(n=e.call(this,Vh({event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this).pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}Hh(t,e);var n=t.prototype;return n.getTouchAction=function(){return[ng]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime<n.time;if(this.reset(),e.eventType&pg&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==mg)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<n.interval,s=!this.pCenter||Ng(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,s&&o?this.count+=1:this.count=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.interval),2):8}return l_},n.failTimeout=function(){var e=this;return this._timer=setTimeout((function(){e.state=l_}),this.options.interval),l_},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===8&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(p_),h_=function(e){function t(t){return t===void 0&&(t={}),e.call(this,Vh({pointers:1},t))||this}Hh(t,e);var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=6&t,i=this.attrTest(e);return r&&(n&hg||!i)?16|t:r||i?n&mg?8|t:2&t?4|t:2:l_},t}(p_);function g_(e){return e===bg?`down`:e===yg?`up`:e===_g?`left`:e===vg?`right`:``}var __=function(e){function t(t){var n;return t===void 0&&(t={}),(n=e.call(this,Vh({event:`pan`,threshold:10,pointers:1,direction:Cg},t))||this).pX=null,n.pY=null,n}Hh(t,e);var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&xg&&t.push(ag),e&Sg&&t.push(ig),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&xg?(i=a===0?gg:a<0?_g:vg,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?gg:o<0?yg:bg,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return h_.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=g_(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(h_),v_=function(e){function t(t){return t===void 0&&(t={}),e.call(this,Vh({event:`swipe`,threshold:10,velocity:.3,direction:xg|Sg,pointers:1},t))||this}Hh(t,e);var n=t.prototype;return n.getTouchAction=function(){return __.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n,r=this.options.direction;return r&(xg|Sg)?n=t.overallVelocity:r&xg?n=t.overallVelocityX:r&Sg&&(n=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&r&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&Yh(n)>this.options.velocity&&t.eventType&mg},n.emit=function(e){var t=g_(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(h_),y_=function(e){function t(t){return t===void 0&&(t={}),e.call(this,Vh({event:`pinch`,threshold:0,pointers:2},t))||this}Hh(t,e);var n=t.prototype;return n.getTouchAction=function(){return[rg]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(h_),b_=function(e){function t(t){return t===void 0&&(t={}),e.call(this,Vh({event:`rotate`,threshold:0,pointers:2},t))||this}Hh(t,e);var n=t.prototype;return n.getTouchAction=function(){return[rg]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)},t}(h_),x_=function(e){function t(t){var n;return t===void 0&&(t={}),(n=e.call(this,Vh({event:`press`,pointers:1,time:251,threshold:9},t))||this)._timer=null,n._input=null,n}Hh(t,e);var n=t.prototype;return n.getTouchAction=function(){return[tg]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(mg|hg)&&!a)this.reset();else if(e.eventType&pg)this.reset(),this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.time);else if(e.eventType&mg)return 8;return l_},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===8&&(e&&e.eventType&mg?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=Xh(),this.manager.emit(this.options.event,this._input)))},t}(p_),S_={domEvents:!1,touchAction:eg,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},C_=[[b_,{enable:!1}],[y_,{enable:!1},[`rotate`]],[v_,{direction:xg}],[__,{direction:xg},[`swipe`]],[m_],[m_,{event:`doubletap`,taps:2},[`tap`]],[x_]];function w_(e,t){var n,r=e.element;r.style&&(Eg(e.options.cssProps,(function(i,a){n=Zh(r.style,a),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||``})),t||(e.oldCssProps={}))}var T_=function(){function e(e,t){var n,r=this;this.options=Gh({},S_,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(cg?Yg:lg?$g:sg?s_:n_))(n,Rg),this.touchAction=new kg(this,this.options.touchAction),w_(this,!0),Eg(this.options.recognizers,(function(e){var t=r.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}var t=e.prototype;return t.set=function(e){return Gh(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?2:1},t.recognize=function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var r=this.recognizers,i=t.curRecognizer;(!i||i&&8&i.state)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped===2||i&&n!==i&&!n.canRecognizeWith(i)?n.reset():n.recognize(e),!i&&14&n.state&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof p_)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(c_(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(c_(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=Wg(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return Eg(zg(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return Eg(zg(e),(function(e){t?n[e]&&n[e].splice(Wg(n[e],t),1):delete n[e]})),this},t.emit=function(e,t){this.options.domEvents&&function(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&w_(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),E_={touchstart:pg,touchmove:2,touchend:mg,touchcancel:hg},D_=function(e){function t(){var n,r=t.prototype;return r.evTarget=`touchstart`,r.evWin=`touchstart touchmove touchend touchcancel`,(n=e.apply(this,arguments)||this).started=!1,n}return Hh(t,e),t.prototype.handler=function(e){var t=E_[e.type];if(t===pg&&(this.started=!0),this.started){var n=O_.call(this,e,t);t&(mg|hg)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:ug,srcEvent:e})}},t}(Ug);function O_(e,t){var n=Xg(e.touches),r=Xg(e.changedTouches);return t&(mg|hg)&&(n=Zg(n.concat(r),`identifier`,!0)),[n,r]}function k_(e,t,n){var r=`DEPRECATED METHOD: `+t+`
44
44
  `+n+` AT
@@ -48,4 +48,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
48
48
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function tE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nE(e){var t=function(){if(typeof Reflect>`u`||!cv||cv.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(cv(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Hv(e);if(t){var i=Hv(this).constructor;n=cv(r,arguments,i)}else n=r.apply(this,arguments);return zv(this,n)}}var rE=function(e){Rv(r,e);var n=nE(r);function r(e,i){var a;return t(this,r),Xu(U(a=n.call(this)),`_queue`,null),e&&!nm(e)&&(i=e,e=[]),a._options=i||{},a._data=new Cw,a.length=0,a._idProp=a._options.fieldId||`id`,e&&e.length&&a.add(e),a.setOptions(i),a}return Yu(r,[{key:`idProp`,get:function(){return this._idProp}},{key:`setOptions`,value:function(e){e&&e.queue!==void 0&&(!1===e.queue?this._queue&&=(this._queue.destroy(),null):(this._queue||=GT.extend(this,{replace:[`add`,`update`,`remove`]}),e.queue&&typeof e.queue==`object`&&this._queue.setOptions(e.queue)))}},{key:`add`,value:function(e,t){var n,r=this,i=[];if(nm(e)){var a=Gd(e).call(e,(function(e){return e[r._idProp]}));if(kw(a).call(a,(function(e){return r._data.has(e)})))throw Error(`A duplicate id was found in the parameter array.`);for(var o=0,s=e.length;o<s;o++)n=this._addItem(e[o]),i.push(n)}else{if(!e||typeof e!=`object`)throw Error(`Unknown dataType`);n=this._addItem(e),i.push(n)}return i.length&&this._trigger(`add`,{items:i},t),i}},{key:`update`,value:function(e,t){var n=this,r=[],i=[],a=[],o=[],s=this._idProp,c=function(e){var t=e[s];if(t!=null&&n._data.has(t)){var c=e,l=sh({},n._data.get(t)),u=n._updateItem(c);i.push(u),o.push(c),a.push(l)}else{var d=n._addItem(e);r.push(d)}};if(nm(e))for(var l=0,u=e.length;l<u;l++)e[l]&&typeof e[l]==`object`?c(e[l]):console.warn(`Ignoring input item, which is not an object at index `+l);else{if(!e||typeof e!=`object`)throw Error(`Unknown dataType`);c(e)}if(r.length&&this._trigger(`add`,{items:r},t),i.length){var d={items:i,oldData:a,data:o};this._trigger(`update`,d,t)}return qp(r).call(r,i)}},{key:`updateOnly`,value:function(e,t){var n,r=this;nm(e)||(e=[e]);var i=Gd(n=Gd(e).call(e,(function(e){var t=r._data.get(e[r._idProp]);if(t==null)throw Error(`Updating non-existent items is not allowed.`);return{oldData:t,update:e}}))).call(n,(function(e){var t=e.oldData,n=e.update,i=t[r._idProp],a=function(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return R_.apply(void 0,qp(t=[{},e]).call(t,r))}(t,n);return r._data.set(i,a),{id:i,oldData:t,updatedData:a}}));if(i.length){var a={items:Gd(i).call(i,(function(e){return e.id})),oldData:Gd(i).call(i,(function(e){return e.oldData})),data:Gd(i).call(i,(function(e){return e.updatedData}))};return this._trigger(`update`,a,t),a.items}return[]}},{key:`get`,value:function(e,t){var n=void 0,r=void 0,i=void 0;WT(e)?(n=e,i=t):nm(e)?(r=e,i=t):i=e;var a=i&&i.returnType===`Object`?`Object`:`Array`,o=i&&zd(i),s=[],c=void 0,l=void 0,u=void 0;if(n!=null)(c=this._data.get(n))&&o&&!o(c)&&(c=void 0);else if(r!=null)for(var d=0,f=r.length;d<f;d++)(c=this._data.get(r[d]))==null||o&&!o(c)||s.push(c);else for(var p,m=0,h=(l=Vp(Lw(p=this._data).call(p))).length;m<h;m++)u=l[m],(c=this._data.get(u))==null||o&&!o(c)||s.push(c);if(i&&i.order&&n==null&&this._sort(s,i.order),i&&i.fields){var g=i.fields;if(n!=null&&c!=null)c=this._filterFields(c,g);else for(var _=0,v=s.length;_<v;_++)s[_]=this._filterFields(s[_],g)}if(a==`Object`){for(var y={},b=0,x=s.length;b<x;b++){var S=s[b];y[S[this._idProp]]=S}return y}return n==null?s:c??null}},{key:`getIds`,value:function(e){var t=this._data,n=e&&zd(e),r=e&&e.order,i=Vp(Lw(t).call(t)),a=[];if(n)if(r){for(var o=[],s=0,c=i.length;s<c;s++){var l=i[s],u=this._data.get(l);u!=null&&n(u)&&o.push(u)}this._sort(o,r);for(var d=0,f=o.length;d<f;d++)a.push(o[d][this._idProp])}else for(var p=0,m=i.length;p<m;p++){var h=i[p],g=this._data.get(h);g!=null&&n(g)&&a.push(g[this._idProp])}else if(r){for(var _=[],v=0,y=i.length;v<y;v++){var b=i[v];_.push(t.get(b))}this._sort(_,r);for(var x=0,S=_.length;x<S;x++)a.push(_[x][this._idProp])}else for(var ee=0,C=i.length;ee<C;ee++){var te=i[ee],w=t.get(te);w!=null&&a.push(w[this._idProp])}return a}},{key:`getDataSet`,value:function(){return this}},{key:`forEach`,value:function(e,t){var n=t&&zd(t),r=this._data,i=Vp(Lw(r).call(r));if(t&&t.order)for(var a=this.get(t),o=0,s=a.length;o<s;o++){var c=a[o];e(c,c[this._idProp])}else for(var l=0,u=i.length;l<u;l++){var d=i[l],f=this._data.get(d);f==null||n&&!n(f)||e(f,d)}}},{key:`map`,value:function(e,t){for(var n=t&&zd(t),r=[],i=this._data,a=Vp(Lw(i).call(i)),o=0,s=a.length;o<s;o++){var c=a[o],l=this._data.get(c);l==null||n&&!n(l)||r.push(e(l,c))}return t&&t.order&&this._sort(r,t.order),r}},{key:`_filterFields`,value:function(e,t){var n;return e&&Nd(n=nm(t)?t:am(t)).call(n,(function(t,n){return t[n]=e[n],t}),{})}},{key:`_sort`,value:function(e,t){if(typeof t==`string`){var n=t;bT(e).call(e,(function(e,t){var r=e[n],i=t[n];return r>i?1:r<i?-1:0}))}else{if(typeof t!=`function`)throw TypeError(`Order must be a function or a string`);bT(e).call(e,t)}}},{key:`remove`,value:function(e,t){for(var n=[],r=[],i=nm(e)?e:[e],a=0,o=i.length;a<o;a++){var s=this._remove(i[a]);if(s){var c=s[this._idProp];c!=null&&(n.push(c),r.push(s))}}return n.length&&this._trigger(`remove`,{items:n,oldData:r},t),n}},{key:`_remove`,value:function(e){var t;if(WT(e)?t=e:e&&typeof e==`object`&&(t=e[this._idProp]),t!=null&&this._data.has(t)){var n=this._data.get(t)||null;return this._data.delete(t),--this.length,n}return null}},{key:`clear`,value:function(e){for(var t,n=Vp(Lw(t=this._data).call(t)),r=[],i=0,a=n.length;i<a;i++)r.push(this._data.get(n[i]));return this._data.clear(),this.length=0,this._trigger(`remove`,{items:n,oldData:r},e),n}},{key:`max`,value:function(e){var t,n,r=null,i=null,a=eE(OT(t=this._data).call(t));try{for(a.s();!(n=a.n()).done;){var o=n.value,s=o[e];typeof s==`number`&&(i==null||s>i)&&(r=o,i=s)}}catch(e){a.e(e)}finally{a.f()}return r||null}},{key:`min`,value:function(e){var t,n,r=null,i=null,a=eE(OT(t=this._data).call(t));try{for(a.s();!(n=a.n()).done;){var o=n.value,s=o[e];typeof s==`number`&&(i==null||s<i)&&(r=o,i=s)}}catch(e){a.e(e)}finally{a.f()}return r||null}},{key:`distinct`,value:function(e){for(var t=this._data,n=Vp(Lw(t).call(t)),r=[],i=0,a=0,o=n.length;a<o;a++){for(var s=n[a],c=t.get(s)[e],l=!1,u=0;u<i;u++)if(r[u]==c){l=!0;break}l||c===void 0||(r[i]=c,i++)}return r}},{key:`_addItem`,value:function(e){var t=function(e,t){return e[t]??(e[t]=UT()),e}(e,this._idProp),n=t[this._idProp];if(this._data.has(n))throw Error(`Cannot add item: item with id `+n+` already exists`);return this._data.set(n,t),++this.length,n}},{key:`_updateItem`,value:function(e){var t=e[this._idProp];if(t==null)throw Error(`Cannot update item: item has no id (item: `+_h(e)+`)`);var n=this._data.get(t);if(!n)throw Error(`Cannot update item: no item with id `+t+` found`);return this._data.set(t,$T($T({},n),e)),t}},{key:`stream`,value:function(e){if(e){var t=this._data;return new ZT({[kT]:()=>vC.mark((function n(){var r,i,a,o;return vC.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=eE(e),n.prev=1,r.s();case 3:if((i=r.n()).done){n.next=11;break}if(a=i.value,(o=t.get(a))==null){n.next=9;break}return n.next=9,[a,o];case 9:n.next=3;break;case 11:n.next=16;break;case 13:n.prev=13,n.t0=n.catch(1),r.e(n.t0);case 16:return n.prev=16,r.f(),n.finish(16);case 19:case`end`:return n.stop()}}),n,null,[[1,13,16,19]])}))()})}var n;return new ZT({[kT]:_d(n=LT(this._data)).call(n,this._data)})}}]),r}(KT);function iE(e,t){var n=Hp!==void 0&&Qf(e)||e[`@@iterator`];if(!n){if(nm(e)||(n=function(e,t){var n;if(e){if(typeof e==`string`)return aE(e,t);var r=Jp(n=Object.prototype.toString.call(e)).call(n,8,-1);if(r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`)return Yf(e);if(r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return aE(e,t)}}(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
49
49
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function aE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oE(e){var t=function(){if(typeof Reflect>`u`||!cv||cv.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Boolean.prototype.valueOf.call(cv(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Hv(e);if(t){var i=Hv(this).constructor;n=cv(r,arguments,i)}else n=r.apply(this,arguments);return zv(this,n)}}var sE=function(e){Rv(r,e);var n=oE(r);function r(e,i){var a,o;return t(this,r),Xu(U(o=n.call(this)),`length`,0),Xu(U(o),`_ids`,new qT),o._options=i||{},o._listener=_d(a=o._onEvent).call(a,U(o)),o.setData(e),o}return Yu(r,[{key:`idProp`,get:function(){return this.getDataSet().idProp}},{key:`setData`,value:function(e){if(this._data){this._data.off&&this._data.off(`*`,this._listener);var t=this._data.getIds({filter:zd(this._options)}),n=this._data.get(t);this._ids.clear(),this.length=0,this._trigger(`remove`,{items:t,oldData:n})}if(e!=null){this._data=e;for(var r=this._data.getIds({filter:zd(this._options)}),i=0,a=r.length;i<a;i++){var o=r[i];this._ids.add(o)}this.length=r.length,this._trigger(`add`,{items:r})}else this._data=new rE;this._data.on&&this._data.on(`*`,this._listener)}},{key:`refresh`,value:function(){for(var e=this._data.getIds({filter:zd(this._options)}),t=Vp(this._ids),n={},r=[],i=[],a=[],o=0,s=e.length;o<s;o++){var c=e[o];n[c]=!0,this._ids.has(c)||(r.push(c),this._ids.add(c))}for(var l=0,u=t.length;l<u;l++){var d=t[l],f=this._data.get(d);f==null?console.error(`If you see this, report it please.`):n[d]||(i.push(d),a.push(f),this._ids.delete(d))}this.length+=r.length-i.length,r.length&&this._trigger(`add`,{items:r}),i.length&&this._trigger(`remove`,{items:i,oldData:a})}},{key:`get`,value:function(e,t){if(this._data==null)return null;var n,r=null;WT(e)||nm(e)?(r=e,n=t):n=e;var i=sh({},this._options,n),a=zd(this._options),o=n&&zd(n);return a&&o&&(i.filter=function(e){return a(e)&&o(e)}),r==null?this._data.get(i):this._data.get(r,i)}},{key:`getIds`,value:function(e){if(this._data.length){var t,n=zd(this._options),r=e==null?null:zd(e);return t=r?n?function(e){return n(e)&&r(e)}:r:n,this._data.getIds({filter:t,order:e&&e.order})}return[]}},{key:`forEach`,value:function(e,t){if(this._data){var n,r,i=zd(this._options),a=t&&zd(t);r=a?i?function(e){return i(e)&&a(e)}:a:i,gm(n=this._data).call(n,e,{filter:r,order:t&&t.order})}}},{key:`map`,value:function(e,t){if(this._data){var n,r,i=zd(this._options),a=t&&zd(t);return r=a?i?function(e){return i(e)&&a(e)}:a:i,Gd(n=this._data).call(n,e,{filter:r,order:t&&t.order})}return[]}},{key:`getDataSet`,value:function(){return this._data.getDataSet()}},{key:`stream`,value:function(e){var t;return this._data.stream(e||{[kT]:_d(t=Lw(this._ids)).call(t,this._ids)})}},{key:`dispose`,value:function(){var e;(e=this._data)!=null&&e.off&&this._data.off(`*`,this._listener);var t,n=`This data view has already been disposed of.`,i={get:function(){throw Error(n)},set:function(){throw Error(n)},configurable:!1},a=iE(tm(r.prototype));try{for(a.s();!(t=a.n()).done;){var o=t.value;jv(this,o,i)}}catch(e){a.e(e)}finally{a.f()}}},{key:`_onEvent`,value:function(e,t,n){if(t&&t.items&&this._data){var r=t.items,i=[],a=[],o=[],s=[],c=[],l=[];switch(e){case`add`:for(var u=0,d=r.length;u<d;u++){var f=r[u];this.get(f)&&(this._ids.add(f),i.push(f))}break;case`update`:for(var p=0,m=r.length;p<m;p++){var h=r[p];this.get(h)?this._ids.has(h)?(a.push(h),c.push(t.data[p]),s.push(t.oldData[p])):(this._ids.add(h),i.push(h)):this._ids.has(h)&&(this._ids.delete(h),o.push(h),l.push(t.oldData[p]))}break;case`remove`:for(var g=0,_=r.length;g<_;g++){var v=r[g];this._ids.has(v)&&(this._ids.delete(v),o.push(v),l.push(t.oldData[g]))}}this.length+=i.length-o.length,i.length&&this._trigger(`add`,{items:i},n),a.length&&this._trigger(`update`,{items:a,oldData:s,data:c},n),o.length&&this._trigger(`remove`,{items:o,oldData:l},n)}}}]),r}(KT);function cE(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof t.add==`function`&&typeof t.clear==`function`&&typeof t.distinct==`function`&&typeof gm(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Gd(t)==`function`&&typeof t.max==`function`&&typeof t.min==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.remove==`function`&&typeof t.setOptions==`function`&&typeof t.stream==`function`&&typeof t.update==`function`&&typeof t.updateOnly==`function`}e.DELETE=L_,e.DataSet=rE,e.DataStream=ZT,e.DataView=sE,e.Queue=GT,e.createNewDataPipeFrom=function(e){return new lf(e)},e.isDataSetLike=cE,e.isDataViewLike=function(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof gm(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Gd(t)==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.stream==`function`&&cE(e,t.getDataSet())}}))}))(),T=ne(),E=i(),D=e(l(),1);function O(e){let t=new URLSearchParams(e),n=t.get(`nodeId`);if(n)return{kind:`focus`,nodeId:n,nodeLabel:t.get(`label`)};let r=t.get(`label`);return r?{kind:`labels`,labels:[r]}:null}function ie(e){return!e.inNeighbourhood&&!e.searchActive&&e.selectedLabelsCount===0&&e.topLevelTotal!==null&&e.nodeCount>0}function ae(e,t){let n=t===1?`node`:`nodes`;return`Showing ${e.toLocaleString()} of ${t.toLocaleString()} top-level ${n}`}function k(e,t){let n=`/api/admin/graph-subgraph`,r=t.includeAgentActions?`&includeAgentActions=1`:``;if(e.kind===`neighbourhood`){let i=t.search&&t.search.q?`&q=${encodeURIComponent(t.search.q)}&limit=${t.search.limit}`:``;return`${n}?mode=neighbourhood&elementId=${encodeURIComponent(e.rootElementId)}${r}${i}`}let i=e.includeTrashed?`&includeTrashed=1`:``;return e.selectedLabels.length===0?`${n}?mode=default&topLevel=1${i}${r}`:`${n}?mode=default&labels=${encodeURIComponent(e.selectedLabels.join(`,`))}${i}${r}${t.channel&&t.channel.length>0?`&channel=${encodeURIComponent(t.channel.join(`,`))}`:``}${t.messageSublabel&&t.messageSublabel.length>0?`&messageSublabel=${encodeURIComponent(t.messageSublabel.join(`,`))}`:``}`}function oe(e,t){return e.length<10?[...e,t]:[e[0],...e.slice(e.length-8),t]}function se(e){return e.length<=1?e:e.slice(0,-1)}function ce(e){return[e]}function le(e){let t=e[e.length-1];return t.kind===`filter`?`f:${[...t.selectedLabels].sort().join(`,`)}:${t.includeTrashed?1:0}:${t.includeAgentActions?1:0}`:`n:${t.rootElementId}`}function ue(e){let t=e[0];if(t.kind!==`filter`)throw Error(`view-stack invariant: root must be filter view`);return t}var de=`admin-sessions`;function fe(){if(typeof window>`u`)return null;if(typeof BroadcastChannel>`u`)return console.warn(`[admin-sessions/broadcast] unsupported — manual refresh only`),null;try{return new BroadcastChannel(de)}catch(e){return console.warn(`[admin-sessions/broadcast] ctor failed: ${e instanceof Error?e.message:String(e)} — manual refresh only`),null}}function pe(e){let t=fe();if(t)try{let n={type:`mutated`,reason:e};t.postMessage(n)}catch(e){console.warn(`[admin-sessions/broadcast] postMessage failed: ${e instanceof Error?e.message:String(e)}`)}finally{try{t.close()}catch{}}}function me(e){return e.trashed===!0?`skip-trashed`:`pivot`}function he(e,t,n,r){let i=[],a=[];for(let o of e){let e=t.get(o.nodeId);if(!e)continue;a.push(o.nodeId);let{colour:s}=n(e.labels),c=e.trashed?`${s}40`:s;i.push({id:o.nodeId,borderWidth:3,color:{background:c,border:r}})}return{updates:i,inWindow:a}}function ge(e,t){let n=t.length>0?new Set(t):null,r=new Map,i=new Set,a=[];for(let t of e)n&&!t.labels.some(e=>n.has(e))||r.set(t.nodeId,{id:t.nodeId,labels:t.labels,properties:t.properties});for(let t of e)if(r.has(t.nodeId))for(let e of t.related){if(n&&!e.labels.some(e=>n.has(e)))continue;r.has(e.nodeId)||r.set(e.nodeId,{id:e.nodeId,labels:e.labels,properties:e.properties});let[o,s]=e.direction===`outgoing`?[t.nodeId,e.nodeId]:[e.nodeId,t.nodeId],c=`${o}|${s}|${e.relationship}`;i.has(c)||(i.add(c),a.push({id:c,from:o,to:s,type:e.relationship}))}return{nodes:[...r.values()],edges:a}}var _e=2e3;function ve(e){let t=typeof e==`number`?e:Number(e);return!Number.isFinite(t)||t<=0?100:Math.min(Math.max(Math.floor(t),1),_e)}function ye(e,t,n,r){let i=encodeURIComponent(t.join(`,`));return`/api/admin/graph-search?q=${encodeURIComponent(e)}&labels=${i}&limit=${n}${r?`&threshold=0`:``}`}var be=x(),xe=new Set([`Conversation`,`AdminConversation`,`PublicConversation`]),A=/^(\d{4}-\d{2}-\d{2})T/,Se=24;function Ce(e){let t=e.match(A);return t?t[1]:null}function j(e,t){if(e.length===0)return``;let n=e.split(/\s+/).filter(e=>e.length>0);if(n.length===0)return``;if(n.length===1){let e=n[0];return e.length<=Se?e:e.slice(0,Se-1)+`…`}let r=[],i=0;for(;r.length<t&&i<n.length;){let e=``;for(;i<n.length;){let t=e.length===0?n[i]:`${e} ${n[i]}`;if(t.length<=Se)e=t,i++;else break}e.length===0&&(e=n[i].slice(0,Se-1)+`…`,i++),r.push(e)}if(i<n.length&&r.length>0){let e=n.slice(i).join(` `),t=r.length-1;r[t]=(r[t].length===0?e:`${r[t]} ${e}`).slice(0,Se-1)+`…`}return r.join(`
50
50
  `)}function M(e){return j(e,2)}function N(e,t){let n=e.labels[0];if(!n||!xe.has(n)||t<.7)return(0,be.pickShortLabel)(e);let r=M((0,be.pickDisplayName)(e));if(t<1.3)return r;let i=e.properties,a=typeof i.createdAt==`string`?i.createdAt:``,o=typeof i.messageCount==`number`?i.messageCount:null;if(a.length===0||o===null)return r;let s=Ce(a);return s===null?r:`${r}\n${s} · ${o} msgs`}var we=new Set([`Person`,`Organization`,`Concept`]),Te=80;function Ee(e,t){let n=(0,be.pickDisplayName)(e);if(t<1.3)return j(n,3);let r=n.length<=24?n:n.slice(0,23)+`…`,i=e.properties.compiledTruth;if(typeof i!=`string`||i.length===0)return j((0,be.pickDisplayName)(e),3);let a=j(i.length>Te?i.slice(0,Te-1)+`…`:i,2);return a.length===0?r:`${r}\n${a}`}function P(e,t){if(t<.7)return(0,be.pickShortLabel)(e);let n=e.labels[0];return n&&xe.has(n)?N(e,t):n&&we.has(n)?Ee(e,t):j((0,be.pickDisplayName)(e),3)}function F(e){let t=e.properties,n=typeof t.createdAt==`string`?t.createdAt:``,r=typeof t.updatedAt==`string`?t.updatedAt:``,i=e.labels.join(` · `);return[(0,be.pickDisplayName)(e),i,`id: ${e.id}`,n?`createdAt: ${n}`:``,r?`updatedAt: ${r}`:``].filter(e=>e.length>0).join(`
51
- `)}var De={solver:`barnesHut`,barnesHut:{gravitationalConstant:-2e3,centralGravity:.4,springLength:170,springConstant:.04},stabilization:{iterations:200}},Oe=220,ke=3;function Ae(e){if(!(e.nodes.length<=5))return{physics:De,nodePositions:new Map};let t=new Map,n=(ke-1)*Oe/2,r=(Math.ceil(e.nodes.length/ke)-1)*Oe/2;for(let i=0;i<e.nodes.length;i++){let a=i%ke,o=Math.floor(i/ke);t.set(e.nodes[i].id,{x:a*Oe-n,y:o*Oe-r})}return{physics:!1,nodePositions:t}}var I=f();function je(e){return e<.7?`compact`:e<1.3?`wrapped`:`detailed`}var Me=150,Ne=`#FBBF24`;function Pe(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}var Fe=`maxy-graph-search-limit-v1`,Ie=250,Le=1200;function Re(){let[e,t]=(0,D.useState)(null),[r,i]=(0,D.useState)(!1),[a,o]=(0,D.useState)(void 0),[s,c]=(0,D.useState)(null),[l,f]=(0,D.useState)(void 0),[p,m]=(0,D.useState)(null),[h,v]=(0,D.useState)(null),y=(0,D.useMemo)(()=>typeof window>`u`?null:O(window.location.search),[]),b=(0,D.useMemo)(()=>y?.kind===`focus`?{nodeId:y.nodeId,nodeLabel:y.nodeLabel}:null,[y]),x=(0,D.useMemo)(()=>y?.kind===`labels`?y.labels:null,[y]);(0,D.useEffect)(()=>{b&&Ue(`deep-link`,{nodeId:b.nodeId.length>16?b.nodeId.slice(0,16)+`…`:b.nodeId,label:b.nodeLabel??``})},[b]),(0,D.useEffect)(()=>{!x||x.length===0||Ue(`label-seed`,{label:x[0]})},[x]),(0,D.useEffect)(()=>{let e=!1,n=null;try{n=sessionStorage.getItem(`maxy-admin-session-key`)}catch{}if(!n){t(null),i(!0);return}return fetch(`/api/admin/session?session_key=${encodeURIComponent(n)}`).then(async r=>{if(!e){if(r.status===401){try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`;return}if(r.ok)try{let e=await r.json();typeof e.businessName==`string`&&o(e.businessName),e.sessionId!==void 0&&c(e.sessionId??null),v(e.role??null),f(e.userName===void 0?null:e.userName),m(e.avatar??null)}catch{}t(n),i(!0)}}).catch(()=>{e||(t(n),i(!0))}),()=>{e=!0}},[]);let S=(0,D.useCallback)(()=>{try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`},[]),[ee,C]=(0,D.useState)(!1),te=(0,D.useCallback)(async()=>{C(!0);try{let e=await _();if(e){try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`}return e}finally{C(!1)}},[]);return r?e?(0,I.jsx)(d,{cacheKey:e,surface:`graph`,onSessionExpired:({code:e,path:t})=>{console.warn(`[admin-auth] outcome=session-expired-redirect code=${e} path=${t} surface=graph`);try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`},children:(0,I.jsx)(g,{cacheKey:e,businessName:a,sessionId:s,onLogout:S,onDisconnect:te,disconnecting:ee,userName:l,userAvatar:p,role:h,children:(0,I.jsxs)(`div`,{className:`data-page graph-page`,children:[(0,I.jsx)(`header`,{className:`data-header`,children:(0,I.jsxs)(`h1`,{className:`data-title`,children:[(0,I.jsx)(n,{size:18}),` Graph`]})}),(0,I.jsx)(`main`,{className:`graph-main`,children:(0,I.jsx)(ze,{cacheKey:e,initialFocus:b,initialLabels:x})})]})})}):(0,I.jsxs)(`div`,{className:`data-page`,children:[(0,I.jsx)(`header`,{className:`data-header`,children:(0,I.jsxs)(`h1`,{className:`data-title`,children:[(0,I.jsx)(n,{size:18}),` Graph`]})}),(0,I.jsxs)(`div`,{className:`data-empty`,children:[(0,I.jsx)(`p`,{children:`You are not signed in.`}),(0,I.jsxs)(`p`,{children:[`Open the `,(0,I.jsx)(`a`,{href:`/`,className:`data-link`,children:`main admin page`}),` and log in, then return here.`]})]})]}):(0,I.jsx)(`div`,{className:`data-page`,children:(0,I.jsxs)(`div`,{className:`data-loading`,children:[(0,I.jsx)(u,{size:18,className:`spin`}),` Loading…`]})})}function ze({cacheKey:e,initialFocus:t=null,initialLabels:n=null}){let{adminFetch:i,cacheKey:l,sessionRefetchNonce:d}=c({initialCacheKey:e,surface:`graph`}),f=(0,D.useRef)(null),p=(0,D.useRef)(null),g=(0,D.useRef)(null),_=(0,D.useRef)(null),v=(0,D.useRef)(new Map),x=(0,D.useRef)([]),w=(0,D.useRef)(null),ne=(0,D.useRef)(null),E=(0,D.useRef)(null),O=(0,D.useRef)([]),de=(0,D.useRef)(null),fe=(0,D.useRef)(null),_e=(0,D.useRef)(null),be=(0,D.useRef)(null),[xe,A]=(0,D.useState)([{kind:`filter`,selectedLabels:[],includeTrashed:!1,includeAgentActions:!1}]);(0,D.useEffect)(()=>{t?.nodeId&&A(e=>{let n=e[e.length-1];return n.kind===`neighbourhood`&&n.rootElementId===t.nodeId?e:[e[0],{kind:`neighbourhood`,rootElementId:t.nodeId,rootLabel:t.nodeLabel}]})},[t?.nodeId,t?.nodeLabel]);let Se=n&&n.length>0?[...n].sort().join(`,`):null;(0,D.useEffect)(()=>{Se&&(At.current=!0,A([{kind:`filter`,selectedLabels:Se.split(`,`),includeTrashed:!1,includeAgentActions:!1}]))},[Se]);let[Ce,j]=(0,D.useState)(!1),[M,N]=(0,D.useState)(null),[we,Te]=(0,D.useState)(null),[Ee,De]=(0,D.useState)(0),[Oe,ke]=(0,D.useState)(null),[Re,ze]=(0,D.useState)(null),[We,Ge]=(0,D.useState)(!1),[Ke,qe]=(0,D.useState)(!1),[Je,Ye]=(0,D.useState)(null),[Xe,Ze]=(0,D.useState)(``),[Qe,$e]=(0,D.useState)(``),[et,tt]=(0,D.useState)(null),[nt,rt]=(0,D.useState)(null),[it,at]=(0,D.useState)(()=>{if(typeof window>`u`)return 100;let e=window.localStorage.getItem(Fe);return e?ve(e):100}),[ot,st]=(0,D.useState)(it),[ct,lt]=(0,D.useState)(`hybrid`),[ut,dt]=(0,D.useState)(0),[ft,pt]=(0,D.useState)(!1),[mt,ht]=(0,D.useState)(0),[gt,_t]=(0,D.useState)(0),[vt,yt]=(0,D.useState)([]),[bt,xt]=(0,D.useState)({labels:[],includeTrashed:!1}),[St,Ct]=(0,D.useState)(!1),[wt,Tt]=(0,D.useState)([]),[Et,Dt]=(0,D.useState)([]),[Ot,kt]=(0,D.useState)(!1),At=(0,D.useRef)(!1),jt=(0,D.useRef)(null),Mt=(0,D.useMemo)(()=>{let e=new Set;for(let t of v.current.values()){let n=(0,b.pickDisplayLabel)(t.labels);n&&e.add(n)}return[...e].sort()},[Ee]);(0,D.useEffect)(()=>{let e=!1,t=i(`/api/admin/graph-labels-in-graph`).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-labels-in-graph`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}return{labels:[]}}),n=i(`/api/admin/graph-default-view`).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-default-view`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}return{labels:[],includeTrashed:!1}});return Promise.all([t,n]).then(([t,n])=>{if(!e&&(yt(t.labels),xt(n),!At.current)){At.current=!0;let e=new Set(t.labels.map(e=>e.label)),r=n.labels.filter(t=>e.has(t));(r.length>0||n.includeTrashed)&&A(e=>[{kind:`filter`,selectedLabels:r,includeTrashed:n.includeTrashed,includeAgentActions:!1},...e.slice(1)])}}),()=>{e=!0}},[l,d,i]);let Nt=xe[0].kind===`filter`?xe[0].includeAgentActions:!1;(0,D.useEffect)(()=>{if(!At.current)return;let e=!1;return i(`/api/admin/graph-labels-in-graph?includeAgentActions=${Nt?`1`:`0`}`).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()}).then(t=>{e||yt(t.labels)}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-labels-in-graph-refetch`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}}),()=>{e=!0}},[l,d,Nt,gt,i]),(0,D.useEffect)(()=>{if(!St)return;let e=e=>{jt.current&&(jt.current.contains(e.target)||Ct(!1))},t=e=>{e.key===`Escape`&&Ct(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[St]);let Pt=(0,D.useCallback)(()=>{if(g.current)try{g.current.clear()}catch{}if(_.current)try{_.current.clear()}catch{}},[]),Ft=(0,D.useCallback)((e,t)=>{Ye(null),i(`/api/admin/graph-delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e,by:`graph-drag-trash`})}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);ze(null);try{p.current?.unselectAll()}catch{}A(e=>[ue(e)]),ht(e=>e+1),pe(`graph-trash`)}).catch(n=>{let r=n instanceof Error?n.message:String(n);Ye(`Failed to delete: ${r}`),qe(!0),window.setTimeout(()=>qe(!1),Le);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-drag-delete`,elementId:e,label:t,msg:r}),keepalive:!0}).catch(()=>{})}catch{}})},[i]),It=(0,D.useCallback)(e=>{Ye(null);let t=e.length;Promise.allSettled(e.map(e=>i(`/api/admin/graph-delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e,by:`graph-drag-trash`})}).then(async t=>{let n=await t.json().catch(()=>({error:`HTTP ${t.status}`}));if(!t.ok)throw Error(n.error??`HTTP ${t.status}`);return e}))).then(e=>{let n=e.filter(e=>e.status===`rejected`);ze(null);try{p.current?.unselectAll()}catch{}if(A(e=>[ue(e)]),ht(e=>e+1),pe(`graph-trash`),n.length>0){let e=t-n.length;Ye(e===0?`Failed to delete ${t} node${t===1?``:`s`}.`:`Deleted ${e} of ${t}; ${n.length} failed.`),qe(!0),window.setTimeout(()=>qe(!1),Le);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-drag-delete-batch`,total:t,failed:n.length}),keepalive:!0}).catch(()=>{})}catch{}}})},[i]),Lt=xe[xe.length-1],Rt=(0,D.useMemo)(()=>le(xe),[xe]),zt=(0,D.useRef)(Rt);(0,D.useEffect)(()=>{zt.current=Rt},[Rt]);let Bt=(0,D.useRef)(xe);(0,D.useEffect)(()=>{Bt.current=xe},[xe]),(0,D.useEffect)(()=>{if(Qe){w.current?.abort(),w.current=null;return}let e=window.setTimeout(()=>{w.current?.abort();let e=new AbortController;w.current=e,j(!0),N(null),Te(null),i(k(Lt,{includeAgentActions:ue(xe).includeAgentActions,search:null,channel:wt,messageSublabel:Et}),{signal:e.signal}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(e.status===413)throw new Ve(t);if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);return t}).then(t=>{e.signal.aborted||(v.current=new Map(t.nodes.map(e=>[e.id,e])),De(t.nodes.length),ke(typeof t.total==`number`?t.total:null),Vt(t.nodes,t.edges))}).catch(t=>{if(!e.signal.aborted){if(t instanceof Ve){Te(t.body),De(0),v.current=new Map,Pt();return}N(t instanceof Error?t.message:String(t))}}).finally(()=>{e.signal.aborted||j(!1)})},Ie);return()=>{window.clearTimeout(e)}},[l,Rt,mt,d,Qe,ot,wt,Et]),(0,D.useEffect)(()=>()=>{w.current?.abort(),p.current?.destroy(),p.current=null,be.current!==null&&(clearTimeout(be.current),be.current=null)},[]);let Vt=(0,D.useCallback)((e,t)=>{if(!f.current)return;x.current=t;let n=new Set([`Message`,`UserMessage`,`AssistantMessage`]),r=e=>e.labels.some(e=>n.has(e)),i=new Map,a=e.filter(r);if(a.length>0){let e=new Set(a.map(e=>e.id)),n=new Map,r=new Set;for(let i of t)i.type===`NEXT`&&e.has(i.from)&&e.has(i.to)&&(n.set(i.from,i.to),r.add(i.to));let o=[],s=new Set;for(let e of a){if(r.has(e.id))continue;let t=e.id;for(;t&&!s.has(t);)s.add(t),o.push(t),t=n.get(t)}for(let e of a)s.has(e.id)||(o.push(e.id),s.add(e.id));let c=f.current?.clientWidth??1200,l=Math.max(c-160,300),u=Math.max(Math.floor(l/150),2);o.forEach((e,t)=>{let n=t%u,r=Math.floor(t/u);i.set(e,{x:n*150,y:r*90})})}let o=e.map(e=>{let t=e.labels[0]??`Unknown`,n=(0,b.resolveNodeColour)(e.labels);n.displayLabel;let r=n.colour;n.driftCandidates;let a=i.get(e.id),o=a?{x:a.x,y:a.y,physics:!1}:{};return e.trashed?{id:e.id,label:P(e,1),title:F(e),color:{background:`${r}40`,border:r},borderWidth:2,shapeProperties:{borderDashes:[6,4]},group:t,...o}:{id:e.id,label:P(e,1),title:F(e),color:r,group:t,...o}}),s=new Set(o.map(e=>e.id)),c=t.filter(e=>e.type!==`PART_OF`||s.has(e.from)&&s.has(e.to)).map(e=>({id:e.id,from:e.from,to:e.to,label:e.type})),l=Ae({nodes:e,edges:t});g.current=new re.DataSet(l.nodePositions.size>0?o.map(e=>{if(e.x!==void 0||e.y!==void 0)return e;let t=l.nodePositions.get(e.id);return t?{...e,x:t.x,y:t.y,physics:!1}:e}):o),_.current=new re.DataSet(c);let u={autoResize:!0,layout:{improvedLayout:!1,randomSeed:Pe(zt.current)},physics:l.physics===!1?!1:{solver:l.physics.solver,barnesHut:l.physics.barnesHut,stabilization:l.physics.stabilization},nodes:{shape:`dot`,size:18,font:{color:`#1F2937`,size:12,face:`DM Sans, sans-serif`},scaling:{label:{enabled:!0,min:12,max:30,drawThreshold:0}},borderWidth:0,chosen:{node:e=>{e.size=20,e.borderWidth=3,e.borderColor=`#0F172A`,e.shadow=!0,e.shadowColor=`rgba(15, 23, 42, 0.55)`,e.shadowSize=8,e.shadowX=0,e.shadowY=0},label:e=>{e.size=14}}},edges:{arrows:{to:{enabled:!0,scaleFactor:.4}},color:{color:`#CBD5E1`,highlight:`#475569`},font:{color:`#64748B`,size:9,face:`DM Sans, sans-serif`,align:`middle`,strokeWidth:0},smooth:{enabled:!0,type:`continuous`,roundness:.4},width:1,chosen:{edge:!0,label:!1}},interaction:{hover:!0,tooltipDelay:150,multiselect:!0}};try{p.current?.destroy(),be.current!==null&&(clearTimeout(be.current),be.current=null),_e.current=null;let e=new T.Network(f.current,{nodes:g.current,edges:_.current},u);p.current=e,e.on(`zoom`,()=>{be.current!==null&&clearTimeout(be.current),be.current=setTimeout(()=>{be.current=null;let e=p.current,t=g.current;if(!e||!t)return;let n;try{n=e.getScale()}catch{return}let r=je(n);if(r===_e.current)return;_e.current=r;let i=[];for(let e of v.current.values()){if(!e.labels[0])continue;let{colour:t}=(0,b.resolveNodeColour)(e.labels),r=e.trashed?{background:`${t}40`,border:t}:t;i.push({id:e.id,label:P(e,n),color:r})}i.length>0&&t.update(i),console.error(`[graph-page] zoom-tier scale=${n.toFixed(3)} tier=${r} nodes=${i.length}`)},Me)}),e.on(`click`,e=>{let t=e.nodes[0];if(!t)return;let n=v.current.get(t);if(!n)return;if(me(n)===`skip-trashed`){ze(n);return}let r=Bt.current[Bt.current.length-1];if(r.kind===`neighbourhood`&&r.rootElementId===t){ze(e=>e?.id===t?null:n);return}ze(null);let i={kind:`neighbourhood`,rootElementId:t,rootLabel:n.labels[0]??null};A(e=>{let n=oe(e,i),r=n.length-1;return n.length>e.length&&Ue(`nav-push`,{depth:r,kind:i.kind,rootElementId:t}),n.length===10&&e.length===10&&Ue(`view-stack-cap-hit`,{depth:10,rootElementId:t}),n})}),e.on(`deselectNode`,()=>{ze(null)});let t=e=>{let t=f.current,n=ne.current;if(!t||!n)return!1;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=r.left+e.x,o=r.top+e.y;return a>=i.left&&a<=i.right&&o>=i.top&&o<=i.bottom},n=f.current?.parentElement??null;e.on(`dragStart`,e=>{if(e.nodes.length===0){E.current=null,O.current=[];return}O.current=[...e.nodes],E.current=e.nodes[0],n?.classList.add(`graph-dragging`)}),e.on(`dragging`,e=>{if(O.current.length===0)return;let n=t(e.pointer.DOM);Ge(e=>e===n?e:n)}),e.on(`dragEnd`,e=>{let r=O.current;if(O.current=[],E.current=null,Ge(!1),n?.classList.remove(`graph-dragging`),r.length!==0&&t(e.pointer.DOM))if(r.length===1){let e=v.current.get(r[0])?.labels[0]??`Unknown`;Ft(r[0],e)}else It(r)})}catch(e){let t=e instanceof Error?e.message:String(e);N(`Visualisation failed to load: ${t}`);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-render`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}}},[]);(0,D.useEffect)(()=>{let e=f.current;if(!e)return;let t=t=>{let n=fe.current,r=de.current,i=e.parentElement;if(!n||!r||!i)return;let a=i.getBoundingClientRect(),o=Math.min(n.clientX,t.clientX)-a.left,s=Math.min(n.clientY,t.clientY)-a.top,c=Math.max(n.clientX,t.clientX)-a.left,l=Math.max(n.clientY,t.clientY)-a.top;r.style.left=`${o}px`,r.style.top=`${s}px`,r.style.width=`${c-o}px`,r.style.height=`${l-s}px`},n=r=>{document.removeEventListener(`mousemove`,t,!0),document.removeEventListener(`mouseup`,n,!0);let i=fe.current;fe.current=null;let a=de.current;a&&(a.style.display=`none`);let o=p.current;if(!i||!o)return;let s=e.getBoundingClientRect(),c=i.clientX-s.left,l=i.clientY-s.top,u=r.clientX-s.left,d=r.clientY-s.top,f=Math.min(c,u),m=Math.min(l,d),h=Math.max(c,u),g=Math.max(l,d);if(h-f<3&&g-m<3)return;let _=o.getPositions(),v=[];for(let[e,t]of Object.entries(_)){let n=o.canvasToDOM(t);n.x>=f&&n.x<=h&&n.y>=m&&n.y<=g&&v.push(e)}try{o.selectNodes(v,!1)}catch{}},r=r=>{if(!r.shiftKey||r.button!==0)return;let i=p.current,a=e.parentElement;if(!i||!a)return;let o=e.getBoundingClientRect(),s={x:r.clientX-o.left,y:r.clientY-o.top};if(i.getNodeAt(s))return;r.preventDefault(),r.stopImmediatePropagation(),fe.current={clientX:r.clientX,clientY:r.clientY};let c=de.current,l=a.getBoundingClientRect();c&&(c.style.display=`block`,c.style.left=`${r.clientX-l.left}px`,c.style.top=`${r.clientY-l.top}px`,c.style.width=`0px`,c.style.height=`0px`),document.addEventListener(`mousemove`,t,!0),document.addEventListener(`mouseup`,n,!0)};return e.addEventListener(`mousedown`,r,!0),()=>{e.removeEventListener(`mousedown`,r,!0),document.removeEventListener(`mousemove`,t,!0),document.removeEventListener(`mouseup`,n,!0)}},[]),(0,D.useEffect)(()=>{let e=Xe.trim();if(!e){$e(``),tt(null),rt(null),lt(`hybrid`),dt(0),pt(!1),p.current?.unselectAll();return}pt(!1);let t=setTimeout(()=>$e(e),300);return()=>clearTimeout(t)},[Xe]),(0,D.useEffect)(()=>{let e=setTimeout(()=>{let e=ve(it);st(e);try{window.localStorage.setItem(Fe,String(e))}catch{}},200);return()=>clearTimeout(e)},[it]);let Ht=(0,D.useCallback)(e=>{let t=p.current,n=g.current;if(!t||!n)return;let{updates:r,inWindow:i}=he(e,v.current,b.resolveNodeColour,Ne);r.length>0&&(n.update(r),t.fit({nodes:i,animation:{duration:400,easingFunction:`easeInOutQuad`}}))},[]),Ut=ue(xe);(0,D.useEffect)(()=>{if(!Qe)return;let e=!1;return rt(null),i(ye(Qe,Ut.selectedLabels,ot,ft)).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);return t}).then(t=>{if(e)return;tt(t.results);let n=t.mode===`bm25`?`bm25`:`hybrid`;if(lt(n),dt(typeof t.suppressed==`number`?t.suppressed:0),n===`bm25`)try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-page`,msg:`[graph-page] search-result-degraded mode=bm25 query="${Qe}"`}),keepalive:!0}).catch(()=>{})}catch{}let{nodes:r,edges:i}=ge(t.results,Ut.selectedLabels);v.current=new Map(r.map(e=>[e.id,e])),De(r.length),Te(null),Vt(r,i),Ht(t.results),console.info(`[graph-page] search-applied view=${Lt.kind} q="${Qe}" labels=${Ut.selectedLabels.join(`|`)} hits=${r.length}`)}).catch(t=>{e||rt(t instanceof Error?t.message:String(t))}),()=>{e=!0}},[Qe,ot,l,d,i,Ht,Lt.kind,Ut.selectedLabels,Vt,ft]);let Wt=(0,D.useCallback)(e=>{A(t=>{let n=ue(t),r=new Set(n.selectedLabels);return r.has(e)?r.delete(e):r.add(e),ce({kind:`filter`,selectedLabels:[...r].sort(),includeTrashed:n.includeTrashed,includeAgentActions:n.includeAgentActions})})},[]),Gt=(0,D.useCallback)(()=>{A(e=>{let t=ue(e);return ce({...t,includeTrashed:!t.includeTrashed})})},[]),Kt=(0,D.useCallback)(()=>{A(e=>{let t=ue(e);return ce({...t,includeAgentActions:!t.includeAgentActions})})},[]),qt=(0,D.useCallback)(()=>{Ze(``),$e(``),tt(null),rt(null),lt(`hybrid`),dt(0),pt(!1);try{p.current?.unselectAll()}catch{}},[]),Jt=(0,D.useCallback)(()=>{A(()=>ce({kind:`filter`,selectedLabels:[],includeTrashed:!1,includeAgentActions:!1}))},[]),Yt=(0,D.useCallback)(()=>{ze(null);try{p.current?.unselectAll()}catch{}A(e=>{let t=se(e);return t!==e&&Ue(`nav-pop`,{depth:t.length-1}),t})},[]),Xt=(0,D.useCallback)(()=>{ze(null);try{p.current?.unselectAll()}catch{}A(e=>e.length<=1?e:(Ue(`nav-home`,{depth:0,popped:e.length-1}),[ue(e)]))},[]),Zt=(0,D.useCallback)(()=>{let e=ue(xe),t={labels:[...e.selectedLabels].sort(),includeTrashed:e.includeTrashed};kt(!0),i(`/api/admin/graph-default-view`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(t)}).then(async e=>{if(!e.ok){let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));throw Error(t.error??`HTTP ${e.status}`)}xt(t)}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-default-view-save`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}}).finally(()=>kt(!1))},[i,xe]),Qt=(0,D.useCallback)(()=>{ze(null);try{p.current?.unselectAll()}catch{}ht(e=>e+1),pe(`graph-restore`)},[]),$t=(0,D.useCallback)(()=>{ze(null);try{p.current?.unselectAll()}catch{}A(e=>[ue(e)]),ht(e=>e+1),pe(`graph-trash`)},[]),en=(0,D.useCallback)(()=>{ht(e=>e+1),_t(e=>e+1)},[]),tn=Lt.kind===`neighbourhood`,nn=ue(xe),rn=nn.selectedLabels,an=nn.includeTrashed,on=nn.includeAgentActions,sn=wt.join(`,`),cn=Et.join(`,`),ln=rn.includes(`AdminConversation`)||rn.includes(`PublicConversation`);(0,D.useEffect)(()=>{ln&&console.info(`[graph-filter] subfacet-render channel=[${sn}] sublabel=[${cn}]`)},[sn,cn,ln]);let un=(0,D.useMemo)(()=>{if(an!==bt.includeTrashed||rn.length!==bt.labels.length)return!0;for(let e=0;e<rn.length;e++)if(rn[e]!==bt.labels[e])return!0;return!1},[an,rn,bt]);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`graph-toolbar`,children:[xe.length>1&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`button`,{type:`button`,className:`graph-home-to-filter graph-home-desktop`,onClick:Xt,title:`Clear breadcrumb — return to filter root`,children:[(0,I.jsx)(C,{size:12}),` Home`]}),(0,I.jsx)(`button`,{type:`button`,className:`graph-home-to-filter graph-home-mobile`,onClick:Xt,"aria-label":`Home`,title:`Clear breadcrumb — return to filter root`,children:(0,I.jsx)(C,{size:14})}),(0,I.jsx)(`button`,{type:`button`,className:`graph-back-to-filter graph-back-desktop`,onClick:Yt,children:`← Back`}),(0,I.jsx)(`button`,{type:`button`,className:`graph-back-to-filter graph-back-mobile`,onClick:Yt,"aria-label":`Back`,children:(0,I.jsx)(a,{size:16})})]}),(0,I.jsxs)(`div`,{className:`data-search-input graph-search-input`,children:[(0,I.jsx)(y,{size:14}),(0,I.jsx)(`input`,{type:`text`,placeholder:`Search nodes…`,value:Xe,onChange:e=>Ze(e.target.value),autoComplete:`off`,spellCheck:!1}),Qe&&!et&&!nt&&(0,I.jsx)(u,{size:14,className:`spin`}),Xe.length>0&&(0,I.jsx)(`button`,{type:`button`,className:`graph-search-clear`,onClick:qt,"aria-label":`Clear search`,title:`Clear search`,children:(0,I.jsx)(s,{size:14})})]}),Qe&&(0,I.jsxs)(`div`,{className:`graph-search-limit`,title:`Show top ${it} matches (1-2000)`,children:[(0,I.jsx)(`label`,{htmlFor:`graph-search-limit-input`,className:`graph-search-limit-label`,children:`Top`}),(0,I.jsx)(`button`,{type:`button`,className:`graph-search-limit-step`,onClick:()=>at(ve(it-1)),disabled:it<=1,"aria-label":`Decrement search limit`,title:`Decrement`,children:(0,I.jsx)(te,{size:12})}),(0,I.jsx)(`input`,{id:`graph-search-limit-input`,type:`number`,min:1,max:2e3,step:1,value:it,onChange:e=>at(ve(e.target.value)),className:`graph-search-limit-number`,"aria-label":`Maximum search results to render`}),(0,I.jsx)(`button`,{type:`button`,className:`graph-search-limit-step`,onClick:()=>at(ve(it+1)),disabled:it>=2e3,"aria-label":`Increment search limit`,title:`Increment`,children:(0,I.jsx)(m,{size:12})}),(0,I.jsx)(`input`,{id:`graph-search-limit-slider`,type:`range`,min:1,max:2e3,step:1,value:it,onChange:e=>at(ve(e.target.value)),"aria-label":`Maximum search results to render (drag for ballpark)`})]}),(0,I.jsx)(`button`,{type:`button`,className:`graph-refresh-button`,onClick:en,disabled:Ce,"aria-label":`Refresh graph`,title:`Refresh graph`,children:(0,I.jsx)(o,{size:14,className:Ce?`spin`:void 0})}),!tn&&(0,I.jsxs)(`div`,{className:`graph-filter-wrap`,ref:jt,children:[(0,I.jsxs)(`button`,{type:`button`,className:`graph-filter-toggle${St?` is-open`:``}${rn.length>0||an||on?` has-selection`:``}`,onClick:()=>Ct(e=>!e),"aria-haspopup":`true`,"aria-expanded":St,"aria-label":`Filter node types`,children:[(0,I.jsx)(h,{size:14}),(0,I.jsx)(`span`,{children:`Filter`}),rn.length>0&&(0,I.jsx)(`span`,{className:`graph-filter-count`,children:rn.length})]}),St&&(0,I.jsxs)(`div`,{className:`graph-filter-popover`,role:`dialog`,"aria-label":`Node type filter`,children:[(0,I.jsxs)(`div`,{className:`graph-filter-popover-header`,children:[(0,I.jsxs)(`button`,{type:`button`,className:`graph-toggle-trashed${an?` active`:``}`,onClick:Gt,"aria-pressed":an,title:`Show trashed nodes — restored with Restore button on each node`,children:[(0,I.jsx)(ee,{size:14}),` Show trashed`]}),(rn.length>0||an||on)&&(0,I.jsx)(`button`,{type:`button`,className:`graph-filter-clear`,onClick:Jt,"aria-label":`Clear filter selection`,title:`Clear filter selection`,children:(0,I.jsx)(s,{size:14})})]}),(0,I.jsx)(`div`,{className:`graph-toggle-agent-actions`,title:`Hide ToolCall, StepResult, WorkflowStep, WorkflowRun — agent-execution telemetry. Flip on for audit/debug.`,children:(0,I.jsx)(S,{checked:on,onChange:Kt,label:`Include agent actions`})}),vt.length===0&&(0,I.jsx)(`p`,{className:`graph-filter-popover-empty`,children:`No node types in your graph yet.`}),(0,I.jsx)(`div`,{className:`graph-filter-rows`,role:`group`,"aria-label":`Node type filter`,children:vt.map(({label:e,nodeCount:t})=>{let n=rn.includes(e),r=(0,b.colourForLabel)(e);return(0,I.jsxs)(`button`,{type:`button`,className:`graph-filter-row${n?` active`:``}`,onClick:()=>Wt(e),"aria-pressed":n,children:[(0,I.jsx)(`span`,{className:`graph-filter-row-swatch`,style:{backgroundColor:r}}),(0,I.jsx)(`span`,{className:`graph-filter-row-label`,children:e}),(0,I.jsx)(`span`,{className:`graph-filter-row-count`,children:t})]},e)})}),(rn.includes(`AdminConversation`)||rn.includes(`PublicConversation`))&&(0,I.jsxs)(`div`,{className:`graph-filter-subfacets`,children:[(0,I.jsxs)(`div`,{className:`graph-filter-subfacet-group`,role:`group`,"aria-label":`Conversation channel`,children:[(0,I.jsx)(`span`,{className:`graph-filter-subfacet-label`,children:`Channel`}),[`webchat`,`whatsapp`].map(e=>{let t=wt.includes(e);return(0,I.jsx)(`button`,{type:`button`,className:`graph-filter-subfacet-chip${t?` active`:``}`,onClick:()=>{Tt(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},"aria-pressed":t,children:e===`webchat`?`Web`:`WhatsApp`},e)})]}),(0,I.jsxs)(`div`,{className:`graph-filter-subfacet-group`,role:`group`,"aria-label":`Message sublabel`,children:[(0,I.jsx)(`span`,{className:`graph-filter-subfacet-label`,children:`Message`}),[`UserMessage`,`AssistantMessage`,`WhatsAppMessage`].map(e=>{let t=Et.includes(e);return(0,I.jsx)(`button`,{type:`button`,className:`graph-filter-subfacet-chip${t?` active`:``}`,onClick:()=>{Dt(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},"aria-pressed":t,children:e===`UserMessage`?`User`:e===`AssistantMessage`?`Assistant`:`WhatsApp`},e)})]})]}),(0,I.jsx)(`div`,{className:`graph-filter-popover-footer`,children:(0,I.jsx)(`button`,{type:`button`,className:`graph-filter-set-default`,onClick:Zt,disabled:!un||Ot,children:Ot?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(u,{size:12,className:`spin`}),` Saving…`]}):`Set default view`})})]})]}),(0,I.jsx)(`div`,{className:`graph-meta`,children:ie({inNeighbourhood:tn,searchActive:!!Qe,selectedLabelsCount:rn.length,topLevelTotal:Oe,nodeCount:Ee})?(0,I.jsx)(`span`,{className:`graph-meta-count`,children:ae(Ee,Oe)}):Ee>0&&(0,I.jsxs)(`span`,{className:`graph-meta-count`,children:[Ee,` node`,Ee===1?``:`s`]})})]}),xe.length>1&&(0,I.jsx)(He,{viewStack:xe}),Qe&&ct===`bm25`&&!nt&&(0,I.jsx)(`div`,{className:`graph-error-banner graph-search-degraded`,role:`status`,children:`Vector ranking unavailable — showing keyword-only results.`}),nt&&(0,I.jsxs)(`div`,{className:`data-error graph-error-banner`,children:[`Search unavailable: `,nt]}),Qe&&ut>0&&!ft&&!nt&&(0,I.jsxs)(`button`,{type:`button`,className:`graph-search-suppressed`,onClick:()=>pt(!0),children:[ut,` low-confidence match`,ut===1?``:`es`,` hidden — show all`]}),Qe&&ft&&!nt&&(0,I.jsx)(`button`,{type:`button`,className:`graph-search-suppressed`,onClick:()=>pt(!1),children:`Showing all matches — hide low-confidence`}),et&&et.length===0&&!nt&&(0,I.jsx)(`div`,{className:`graph-search-status`,children:`No matches in your graph.`}),(0,I.jsxs)(`div`,{className:`graph-canvas-wrap`,children:[Ce&&(0,I.jsxs)(`div`,{className:`graph-canvas-overlay`,children:[(0,I.jsx)(u,{size:20,className:`spin`}),` Loading your graph…`]}),M&&!Ce&&(0,I.jsxs)(`div`,{className:`graph-canvas-overlay graph-canvas-error`,children:[(0,I.jsx)(`p`,{children:M}),(0,I.jsx)(`button`,{type:`button`,className:`data-btn`,onClick:()=>{N(null),ht(e=>e+1)},children:`Retry`})]}),we&&!Ce&&(0,I.jsxs)(`div`,{className:`graph-canvas-overlay graph-canvas-error`,children:[(0,I.jsxs)(`p`,{children:[`Refine your filter — `,(0,I.jsx)(`strong`,{children:we.matched}),` matches exceed the 2000 cap.`]}),(0,I.jsx)(`p`,{className:`graph-canvas-hint`,children:`Pick a more specific label combination, or narrow your brand's data.`})]}),!Ce&&!M&&!we&&Ee===0&&!tn&&rn.length===0&&(0,I.jsxs)(`div`,{className:`graph-canvas-overlay`,children:[(0,I.jsx)(h,{size:20}),(0,I.jsx)(`p`,{children:`No nodes in your graph yet.`})]}),!Ce&&!M&&!we&&Ee===0&&!tn&&rn.length>0&&(0,I.jsx)(`div`,{className:`graph-canvas-overlay`,children:(0,I.jsxs)(`p`,{children:[`No `,rn.join(`, `),` nodes in your graph yet.`]})}),(0,I.jsx)(`div`,{ref:f,className:`graph-canvas`}),(0,I.jsx)(`div`,{ref:de,className:`graph-marquee`,"aria-hidden":`true`}),Ee>0&&(0,I.jsx)(`div`,{ref:ne,className:`graph-trash-drop-zone${We?` is-hover`:``}${Ke?` is-error`:``}`,"aria-hidden":`true`,children:(0,I.jsx)(r,{size:18})}),Je&&(0,I.jsxs)(`div`,{className:`graph-drag-error-banner`,role:`alert`,children:[(0,I.jsx)(`span`,{children:Je}),(0,I.jsx)(`button`,{type:`button`,className:`graph-drag-error-dismiss`,onClick:()=>Ye(null),"aria-label":`Dismiss`,children:(0,I.jsx)(s,{size:14})})]})]}),Re&&(0,I.jsx)(Be,{node:Re,edges:x.current,nodesById:v.current,adminFetch:i,onClose:()=>{ze(null);try{p.current?.unselectAll()}catch{}},onRestored:Qt,onTrashed:$t}),Ee>0&&Mt.length>0&&(0,I.jsx)(`div`,{className:`graph-legend`,children:Mt.map(e=>(0,I.jsxs)(`div`,{className:`graph-legend-item`,children:[(0,I.jsx)(`span`,{className:`graph-legend-swatch`,style:{backgroundColor:(0,b.colourForLabel)(e)}}),(0,I.jsx)(`span`,{children:e})]},e))})]})}function Be({node:e,edges:t,nodesById:n,adminFetch:i,onClose:a,onRestored:o,onTrashed:c}){let l=Object.entries(e.properties).filter(([,e])=>e!=null),d=t.filter(t=>t.from===e.id||t.to===e.id),[f,p]=(0,D.useState)(!1),[m,h]=(0,D.useState)(null),[g,_]=(0,D.useState)(!1),[y,b]=(0,D.useState)(null);(0,D.useEffect)(()=>{p(!1),h(null),_(!1),b(null)},[e.id]);let x=(0,D.useCallback)(()=>{p(!0),h(null),i(`/api/admin/graph-restore`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e.id})}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);o()}).catch(e=>{h(e instanceof Error?e.message:String(e)),p(!1)})},[e.id,o,i]),S=(0,D.useCallback)(()=>{_(!0),b(null),i(`/api/admin/graph-delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e.id,by:`graph-side-panel-trash`})}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);c()}).catch(e=>{b(e instanceof Error?e.message:String(e)),_(!1)})},[e.id,c,i]);return(0,I.jsxs)(`aside`,{className:`graph-side-panel${e.trashed?` graph-side-panel-trashed`:``}`,children:[(0,I.jsxs)(`header`,{className:`graph-side-header`,children:[(0,I.jsx)(`div`,{children:(()=>{if(e.labels.some(e=>xe.has(e))){let t=(0,be.pickDisplayName)(e),n=e.properties.createdAt,r=typeof n==`string`?n:``,i=r?(0,be.formatRunTimestamp)(r):null,a=e.labels.join(` · `)+(e.trashed?` · Trashed`:``)+` · ${e.id}`;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`h2`,{className:`graph-side-name`,title:t,children:t}),i&&(0,I.jsx)(`div`,{className:`graph-side-created`,children:i}),(0,I.jsx)(`div`,{className:`graph-side-meta`,children:a})]})}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`graph-side-labels`,children:[e.labels.join(` · `),e.trashed?` · Trashed`:``]}),(0,I.jsx)(`div`,{className:`graph-side-id`,children:e.id})]})})()}),(0,I.jsx)(`button`,{type:`button`,className:`graph-side-close`,onClick:a,"aria-label":`Close`,children:(0,I.jsx)(s,{size:14})})]}),e.trashed&&(0,I.jsxs)(`dl`,{className:`graph-side-props graph-side-trash-meta`,children:[(0,I.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,I.jsx)(`dt`,{children:`trashedAt`}),(0,I.jsx)(`dd`,{children:Ge(e.properties.trashedAt)})]}),(0,I.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,I.jsx)(`dt`,{children:`trashedBy`}),(0,I.jsx)(`dd`,{children:Ge(e.properties.trashedBy)})]})]}),(0,I.jsxs)(`dl`,{className:`graph-side-props`,children:[l.length===0&&(0,I.jsx)(`div`,{className:`graph-side-empty`,children:`No properties.`}),l.map(([e,t])=>(0,I.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,I.jsx)(`dt`,{children:e}),(0,I.jsx)(`dd`,{children:Ge(t)})]},e))]}),d.length>0&&(0,I.jsxs)(`section`,{className:`graph-side-edges`,children:[(0,I.jsxs)(`h3`,{className:`graph-side-edges-heading`,children:[`Connections (`,d.length,`)`]}),d.map(t=>{let r=t.from===e.id,i=r?t.to:t.from,a=n.get(i),o=a?(0,be.pickShortLabel)(a):i,s=r?`→`:`←`,c=Object.entries(t.properties??{}).filter(([,e])=>e!=null&&e!==``);return(0,I.jsxs)(`div`,{className:`graph-side-edge`,children:[(0,I.jsxs)(`div`,{className:`graph-side-edge-header`,children:[(0,I.jsx)(`span`,{className:`graph-side-edge-type`,children:t.type}),(0,I.jsx)(`span`,{className:`graph-side-edge-arrow`,children:s}),(0,I.jsx)(`span`,{className:`graph-side-edge-other`,title:o,children:o})]}),c.length>0&&(0,I.jsx)(`dl`,{className:`graph-side-edge-props`,children:c.map(([e,t])=>(0,I.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,I.jsx)(`dt`,{children:e}),(0,I.jsx)(`dd`,{children:Ge(t)})]},e))})]},t.id)})]}),e.trashed&&(0,I.jsxs)(`footer`,{className:`graph-side-footer`,children:[!f&&!m&&(0,I.jsxs)(`button`,{type:`button`,className:`graph-side-restore`,onClick:x,children:[(0,I.jsx)(v,{size:14}),` Restore`]}),f&&(0,I.jsx)(`div`,{className:`graph-delete-confirm`,children:(0,I.jsxs)(`p`,{children:[(0,I.jsx)(u,{size:14,className:`spin`}),` Restoring…`]})}),m&&(0,I.jsxs)(`div`,{className:`graph-delete-confirm graph-delete-confirm-error`,children:[(0,I.jsxs)(`p`,{children:[`Restore failed: `,m]}),(0,I.jsxs)(`div`,{className:`graph-delete-confirm-buttons`,children:[(0,I.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-cancel`,onClick:()=>{h(null)},children:`Close`}),(0,I.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-do`,onClick:x,children:`Retry`})]})]})]}),!e.trashed&&(0,I.jsxs)(`footer`,{className:`graph-side-footer`,children:[!g&&!y&&(0,I.jsxs)(`button`,{type:`button`,className:`graph-side-trash`,onClick:S,children:[(0,I.jsx)(r,{size:14}),` Trash`]}),g&&(0,I.jsx)(`div`,{className:`graph-delete-confirm`,children:(0,I.jsxs)(`p`,{children:[(0,I.jsx)(u,{size:14,className:`spin`}),` Trashing…`]})}),y&&(0,I.jsxs)(`div`,{className:`graph-delete-confirm graph-delete-confirm-error`,children:[(0,I.jsxs)(`p`,{children:[`Trash failed: `,y]}),(0,I.jsxs)(`div`,{className:`graph-delete-confirm-buttons`,children:[(0,I.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-cancel`,onClick:()=>{b(null)},children:`Close`}),(0,I.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-do`,onClick:S,children:`Retry`})]})]})]})]})}var Ve=class extends Error{body;constructor(e){super(e.error),this.body=e}};function He({viewStack:e}){let t=e.map(e=>e.kind===`filter`?`Filter`:e.rootLabel??`Node`);return(0,I.jsx)(`div`,{className:`graph-breadcrumb`,role:`navigation`,"aria-label":`Graph navigation breadcrumb`,children:t.map((e,n)=>(0,I.jsxs)(`span`,{className:`graph-breadcrumb-item`,children:[n>0&&(0,I.jsx)(`span`,{className:`graph-breadcrumb-separator`,"aria-hidden":`true`,children:`›`}),(0,I.jsx)(`span`,{className:`graph-breadcrumb-label${n===t.length-1?` is-current`:``}`,children:e})]},n))})}function Ue(e,t){let n=`[graph-page] ${e} ${Object.entries(t).map(([e,t])=>`${e}=${String(t)}`).join(` `)}`;try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-nav`,msg:n}),keepalive:!0}).catch(()=>{})}catch{}}function We(e){let t=t=>{let n=e[t];if(n&&typeof n==`object`&&`low`in n){let e=n.low;return typeof e==`number`?e:null}return null},n=t(`year`),r=t(`month`),i=t(`day`);if(n===null||r===null||i===null)return null;let a=`${String(n).padStart(4,`0`)}-${String(r).padStart(2,`0`)}-${String(i).padStart(2,`0`)}`;if(!(`hour`in e))return a;let o=t(`hour`),s=t(`minute`),c=t(`second`);return o===null||s===null||c===null?a:`${a} ${String(o).padStart(2,`0`)}:${String(s).padStart(2,`0`)}:${String(c).padStart(2,`0`)}`}function Ge(e){if(e==null)return``;if(Array.isArray(e))return e.length>8?`[${e.length} items]`:e.map(String).join(`, `);if(typeof e==`object`){if(`year`in e&&`month`in e&&`day`in e&&typeof e.year==`object`){let t=We(e);if(t)return t}return JSON.stringify(e)}return String(e)}(0,E.createRoot)(document.getElementById(`root`)).render((0,I.jsx)(Re,{}));
51
+ `)}var De={solver:`barnesHut`,barnesHut:{gravitationalConstant:-2e3,centralGravity:.4,springLength:170,springConstant:.04},stabilization:{iterations:1e3}},Oe=220,ke=3;function Ae(e){if(!(e.nodes.length<=5))return{physics:De,nodePositions:new Map};let t=new Map,n=(ke-1)*Oe/2,r=(Math.ceil(e.nodes.length/ke)-1)*Oe/2;for(let i=0;i<e.nodes.length;i++){let a=i%ke,o=Math.floor(i/ke);t.set(e.nodes[i].id,{x:a*Oe-n,y:o*Oe-r})}return{physics:!1,nodePositions:t}}function je(e,t){e.once(`stabilizationIterationsDone`,()=>{if(e.setOptions({physics:!1}),t.dev){let n=e.physics?.stabilizationIterations??`?`,r=e.physics?.stabilized===!0;(t.log??(e=>console.error(e)))(`[graph-page] stabilization-done iterations=${n} minVelocityReached=${r} physics=frozen`)}})}var I=f();function Me(e){return e<.7?`compact`:e<1.3?`wrapped`:`detailed`}var Ne=150,Pe=`#FBBF24`;function Fe(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}var Ie=`maxy-graph-search-limit-v1`,Le=250,Re=1200;function ze(){let[e,t]=(0,D.useState)(null),[r,i]=(0,D.useState)(!1),[a,o]=(0,D.useState)(void 0),[s,c]=(0,D.useState)(null),[l,f]=(0,D.useState)(void 0),[p,m]=(0,D.useState)(null),[h,v]=(0,D.useState)(null),y=(0,D.useMemo)(()=>typeof window>`u`?null:O(window.location.search),[]),b=(0,D.useMemo)(()=>y?.kind===`focus`?{nodeId:y.nodeId,nodeLabel:y.nodeLabel}:null,[y]),x=(0,D.useMemo)(()=>y?.kind===`labels`?y.labels:null,[y]);(0,D.useEffect)(()=>{b&&We(`deep-link`,{nodeId:b.nodeId.length>16?b.nodeId.slice(0,16)+`…`:b.nodeId,label:b.nodeLabel??``})},[b]),(0,D.useEffect)(()=>{!x||x.length===0||We(`label-seed`,{label:x[0]})},[x]),(0,D.useEffect)(()=>{let e=!1,n=null;try{n=sessionStorage.getItem(`maxy-admin-session-key`)}catch{}if(!n){t(null),i(!0);return}return fetch(`/api/admin/session?session_key=${encodeURIComponent(n)}`).then(async r=>{if(!e){if(r.status===401){try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`;return}if(r.ok)try{let e=await r.json();typeof e.businessName==`string`&&o(e.businessName),e.sessionId!==void 0&&c(e.sessionId??null),v(e.role??null),f(e.userName===void 0?null:e.userName),m(e.avatar??null)}catch{}t(n),i(!0)}}).catch(()=>{e||(t(n),i(!0))}),()=>{e=!0}},[]);let S=(0,D.useCallback)(()=>{try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`},[]),[ee,C]=(0,D.useState)(!1),te=(0,D.useCallback)(async()=>{C(!0);try{let e=await _();if(e){try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`}return e}finally{C(!1)}},[]);return r?e?(0,I.jsx)(d,{cacheKey:e,surface:`graph`,onSessionExpired:({code:e,path:t})=>{console.warn(`[admin-auth] outcome=session-expired-redirect code=${e} path=${t} surface=graph`);try{sessionStorage.removeItem(`maxy-admin-session-key`)}catch{}window.location.href=`/`},children:(0,I.jsx)(g,{cacheKey:e,businessName:a,sessionId:s,onLogout:S,onDisconnect:te,disconnecting:ee,userName:l,userAvatar:p,role:h,children:(0,I.jsxs)(`div`,{className:`data-page graph-page`,children:[(0,I.jsx)(`header`,{className:`data-header`,children:(0,I.jsxs)(`h1`,{className:`data-title`,children:[(0,I.jsx)(n,{size:18}),` Graph`]})}),(0,I.jsx)(`main`,{className:`graph-main`,children:(0,I.jsx)(Be,{cacheKey:e,initialFocus:b,initialLabels:x})})]})})}):(0,I.jsxs)(`div`,{className:`data-page`,children:[(0,I.jsx)(`header`,{className:`data-header`,children:(0,I.jsxs)(`h1`,{className:`data-title`,children:[(0,I.jsx)(n,{size:18}),` Graph`]})}),(0,I.jsxs)(`div`,{className:`data-empty`,children:[(0,I.jsx)(`p`,{children:`You are not signed in.`}),(0,I.jsxs)(`p`,{children:[`Open the `,(0,I.jsx)(`a`,{href:`/`,className:`data-link`,children:`main admin page`}),` and log in, then return here.`]})]})]}):(0,I.jsx)(`div`,{className:`data-page`,children:(0,I.jsxs)(`div`,{className:`data-loading`,children:[(0,I.jsx)(u,{size:18,className:`spin`}),` Loading…`]})})}function Be({cacheKey:e,initialFocus:t=null,initialLabels:n=null}){let{adminFetch:i,cacheKey:l,sessionRefetchNonce:d}=c({initialCacheKey:e,surface:`graph`}),f=(0,D.useRef)(null),p=(0,D.useRef)(null),g=(0,D.useRef)(null),_=(0,D.useRef)(null),v=(0,D.useRef)(new Map),x=(0,D.useRef)([]),w=(0,D.useRef)(null),ne=(0,D.useRef)(null),E=(0,D.useRef)(null),O=(0,D.useRef)([]),de=(0,D.useRef)(null),fe=(0,D.useRef)(null),_e=(0,D.useRef)(null),be=(0,D.useRef)(null),[xe,A]=(0,D.useState)([{kind:`filter`,selectedLabels:[],includeTrashed:!1,includeAgentActions:!1}]);(0,D.useEffect)(()=>{t?.nodeId&&A(e=>{let n=e[e.length-1];return n.kind===`neighbourhood`&&n.rootElementId===t.nodeId?e:[e[0],{kind:`neighbourhood`,rootElementId:t.nodeId,rootLabel:t.nodeLabel}]})},[t?.nodeId,t?.nodeLabel]);let Se=n&&n.length>0?[...n].sort().join(`,`):null;(0,D.useEffect)(()=>{Se&&(jt.current=!0,A([{kind:`filter`,selectedLabels:Se.split(`,`),includeTrashed:!1,includeAgentActions:!1}]))},[Se]);let[Ce,j]=(0,D.useState)(!1),[M,N]=(0,D.useState)(null),[we,Te]=(0,D.useState)(null),[Ee,De]=(0,D.useState)(0),[Oe,ke]=(0,D.useState)(null),[ze,Be]=(0,D.useState)(null),[Ge,Ke]=(0,D.useState)(!1),[qe,Je]=(0,D.useState)(!1),[Ye,Xe]=(0,D.useState)(null),[Ze,Qe]=(0,D.useState)(``),[$e,et]=(0,D.useState)(``),[tt,nt]=(0,D.useState)(null),[rt,it]=(0,D.useState)(null),[at,ot]=(0,D.useState)(()=>{if(typeof window>`u`)return 100;let e=window.localStorage.getItem(Ie);return e?ve(e):100}),[st,ct]=(0,D.useState)(at),[lt,ut]=(0,D.useState)(`hybrid`),[dt,ft]=(0,D.useState)(0),[pt,mt]=(0,D.useState)(!1),[ht,gt]=(0,D.useState)(0),[_t,vt]=(0,D.useState)(0),[yt,bt]=(0,D.useState)([]),[xt,St]=(0,D.useState)({labels:[],includeTrashed:!1}),[Ct,wt]=(0,D.useState)(!1),[Tt,Et]=(0,D.useState)([]),[Dt,Ot]=(0,D.useState)([]),[kt,At]=(0,D.useState)(!1),jt=(0,D.useRef)(!1),Mt=(0,D.useRef)(null),Nt=(0,D.useMemo)(()=>{let e=new Set;for(let t of v.current.values()){let n=(0,b.pickDisplayLabel)(t.labels);n&&e.add(n)}return[...e].sort()},[Ee]);(0,D.useEffect)(()=>{let e=!1,t=i(`/api/admin/graph-labels-in-graph`).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-labels-in-graph`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}return{labels:[]}}),n=i(`/api/admin/graph-default-view`).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-default-view`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}return{labels:[],includeTrashed:!1}});return Promise.all([t,n]).then(([t,n])=>{if(!e&&(bt(t.labels),St(n),!jt.current)){jt.current=!0;let e=new Set(t.labels.map(e=>e.label)),r=n.labels.filter(t=>e.has(t));(r.length>0||n.includeTrashed)&&A(e=>[{kind:`filter`,selectedLabels:r,includeTrashed:n.includeTrashed,includeAgentActions:!1},...e.slice(1)])}}),()=>{e=!0}},[l,d,i]);let Pt=xe[0].kind===`filter`?xe[0].includeAgentActions:!1;(0,D.useEffect)(()=>{if(!jt.current)return;let e=!1;return i(`/api/admin/graph-labels-in-graph?includeAgentActions=${Pt?`1`:`0`}`).then(async e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return await e.json()}).then(t=>{e||bt(t.labels)}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-labels-in-graph-refetch`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}}),()=>{e=!0}},[l,d,Pt,_t,i]),(0,D.useEffect)(()=>{if(!Ct)return;let e=e=>{Mt.current&&(Mt.current.contains(e.target)||wt(!1))},t=e=>{e.key===`Escape`&&wt(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[Ct]);let Ft=(0,D.useCallback)(()=>{if(g.current)try{g.current.clear()}catch{}if(_.current)try{_.current.clear()}catch{}},[]),It=(0,D.useCallback)((e,t)=>{Xe(null),i(`/api/admin/graph-delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e,by:`graph-drag-trash`})}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);Be(null);try{p.current?.unselectAll()}catch{}A(e=>[ue(e)]),gt(e=>e+1),pe(`graph-trash`)}).catch(n=>{let r=n instanceof Error?n.message:String(n);Xe(`Failed to delete: ${r}`),Je(!0),window.setTimeout(()=>Je(!1),Re);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-drag-delete`,elementId:e,label:t,msg:r}),keepalive:!0}).catch(()=>{})}catch{}})},[i]),Lt=(0,D.useCallback)(e=>{Xe(null);let t=e.length;Promise.allSettled(e.map(e=>i(`/api/admin/graph-delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e,by:`graph-drag-trash`})}).then(async t=>{let n=await t.json().catch(()=>({error:`HTTP ${t.status}`}));if(!t.ok)throw Error(n.error??`HTTP ${t.status}`);return e}))).then(e=>{let n=e.filter(e=>e.status===`rejected`);Be(null);try{p.current?.unselectAll()}catch{}if(A(e=>[ue(e)]),gt(e=>e+1),pe(`graph-trash`),n.length>0){let e=t-n.length;Xe(e===0?`Failed to delete ${t} node${t===1?``:`s`}.`:`Deleted ${e} of ${t}; ${n.length} failed.`),Je(!0),window.setTimeout(()=>Je(!1),Re);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-drag-delete-batch`,total:t,failed:n.length}),keepalive:!0}).catch(()=>{})}catch{}}})},[i]),Rt=xe[xe.length-1],zt=(0,D.useMemo)(()=>le(xe),[xe]),Bt=(0,D.useRef)(zt);(0,D.useEffect)(()=>{Bt.current=zt},[zt]);let Vt=(0,D.useRef)(xe);(0,D.useEffect)(()=>{Vt.current=xe},[xe]),(0,D.useEffect)(()=>{if($e){w.current?.abort(),w.current=null;return}let e=window.setTimeout(()=>{w.current?.abort();let e=new AbortController;w.current=e,j(!0),N(null),Te(null),i(k(Rt,{includeAgentActions:ue(xe).includeAgentActions,search:null,channel:Tt,messageSublabel:Dt}),{signal:e.signal}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(e.status===413)throw new He(t);if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);return t}).then(t=>{e.signal.aborted||(v.current=new Map(t.nodes.map(e=>[e.id,e])),De(t.nodes.length),ke(typeof t.total==`number`?t.total:null),Ht(t.nodes,t.edges))}).catch(t=>{if(!e.signal.aborted){if(t instanceof He){Te(t.body),De(0),v.current=new Map,Ft();return}N(t instanceof Error?t.message:String(t))}}).finally(()=>{e.signal.aborted||j(!1)})},Le);return()=>{window.clearTimeout(e)}},[l,zt,ht,d,$e,st,Tt,Dt]),(0,D.useEffect)(()=>()=>{w.current?.abort(),p.current?.destroy(),p.current=null,be.current!==null&&(clearTimeout(be.current),be.current=null)},[]);let Ht=(0,D.useCallback)((e,t)=>{if(!f.current)return;x.current=t;let n=new Set([`Message`,`UserMessage`,`AssistantMessage`]),r=e=>e.labels.some(e=>n.has(e)),i=new Map,a=e.filter(r);if(a.length>0){let e=new Set(a.map(e=>e.id)),n=new Map,r=new Set;for(let i of t)i.type===`NEXT`&&e.has(i.from)&&e.has(i.to)&&(n.set(i.from,i.to),r.add(i.to));let o=[],s=new Set;for(let e of a){if(r.has(e.id))continue;let t=e.id;for(;t&&!s.has(t);)s.add(t),o.push(t),t=n.get(t)}for(let e of a)s.has(e.id)||(o.push(e.id),s.add(e.id));let c=f.current?.clientWidth??1200,l=Math.max(c-160,300),u=Math.max(Math.floor(l/150),2);o.forEach((e,t)=>{let n=t%u,r=Math.floor(t/u);i.set(e,{x:n*150,y:r*90})})}let o=e.map(e=>{let t=e.labels[0]??`Unknown`,n=(0,b.resolveNodeColour)(e.labels);n.displayLabel;let r=n.colour;n.driftCandidates;let a=i.get(e.id),o=a?{x:a.x,y:a.y,physics:!1}:{};return e.trashed?{id:e.id,label:P(e,1),title:F(e),color:{background:`${r}40`,border:r},borderWidth:2,shapeProperties:{borderDashes:[6,4]},group:t,...o}:{id:e.id,label:P(e,1),title:F(e),color:r,group:t,...o}}),s=new Set(o.map(e=>e.id)),c=t.filter(e=>e.type!==`PART_OF`||s.has(e.from)&&s.has(e.to)).map(e=>({id:e.id,from:e.from,to:e.to,label:e.type})),l=Ae({nodes:e,edges:t});g.current=new re.DataSet(l.nodePositions.size>0?o.map(e=>{if(e.x!==void 0||e.y!==void 0)return e;let t=l.nodePositions.get(e.id);return t?{...e,x:t.x,y:t.y,physics:!1}:e}):o),_.current=new re.DataSet(c);let u={autoResize:!0,layout:{improvedLayout:!1,randomSeed:Fe(Bt.current)},physics:l.physics===!1?!1:{solver:l.physics.solver,barnesHut:l.physics.barnesHut,stabilization:l.physics.stabilization},nodes:{shape:`dot`,size:18,font:{color:`#1F2937`,size:12,face:`DM Sans, sans-serif`},scaling:{label:{enabled:!0,min:12,max:30,drawThreshold:0}},borderWidth:0,chosen:{node:e=>{e.size=20,e.borderWidth=3,e.borderColor=`#0F172A`,e.shadow=!0,e.shadowColor=`rgba(15, 23, 42, 0.55)`,e.shadowSize=8,e.shadowX=0,e.shadowY=0},label:e=>{e.size=14}}},edges:{arrows:{to:{enabled:!0,scaleFactor:.4}},color:{color:`#CBD5E1`,highlight:`#475569`},font:{color:`#64748B`,size:9,face:`DM Sans, sans-serif`,align:`middle`,strokeWidth:0},smooth:{enabled:!0,type:`continuous`,roundness:.4},width:1,chosen:{edge:!0,label:!1}},interaction:{hover:!0,tooltipDelay:150,multiselect:!0}};try{p.current?.destroy(),be.current!==null&&(clearTimeout(be.current),be.current=null),_e.current=null;let e=new T.Network(f.current,{nodes:g.current,edges:_.current},u);p.current=e,l.physics!==!1&&je(e,{dev:!1}),e.on(`zoom`,()=>{be.current!==null&&clearTimeout(be.current),be.current=setTimeout(()=>{be.current=null;let e=p.current,t=g.current;if(!e||!t)return;let n;try{n=e.getScale()}catch{return}let r=Me(n);if(r===_e.current)return;_e.current=r;let i=[];for(let e of v.current.values()){if(!e.labels[0])continue;let{colour:t}=(0,b.resolveNodeColour)(e.labels),r=e.trashed?{background:`${t}40`,border:t}:t;i.push({id:e.id,label:P(e,n),color:r})}i.length>0&&t.update(i),console.error(`[graph-page] zoom-tier scale=${n.toFixed(3)} tier=${r} nodes=${i.length}`)},Ne)}),e.on(`click`,e=>{let t=e.nodes[0];if(!t)return;let n=v.current.get(t);if(!n)return;if(me(n)===`skip-trashed`){Be(n);return}let r=Vt.current[Vt.current.length-1];if(r.kind===`neighbourhood`&&r.rootElementId===t){Be(e=>e?.id===t?null:n);return}Be(null);let i={kind:`neighbourhood`,rootElementId:t,rootLabel:n.labels[0]??null};A(e=>{let n=oe(e,i),r=n.length-1;return n.length>e.length&&We(`nav-push`,{depth:r,kind:i.kind,rootElementId:t}),n.length===10&&e.length===10&&We(`view-stack-cap-hit`,{depth:10,rootElementId:t}),n})}),e.on(`deselectNode`,()=>{Be(null)});let t=e=>{let t=f.current,n=ne.current;if(!t||!n)return!1;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=r.left+e.x,o=r.top+e.y;return a>=i.left&&a<=i.right&&o>=i.top&&o<=i.bottom},n=f.current?.parentElement??null;e.on(`dragStart`,e=>{if(e.nodes.length===0){E.current=null,O.current=[];return}O.current=[...e.nodes],E.current=e.nodes[0],n?.classList.add(`graph-dragging`)}),e.on(`dragging`,e=>{if(O.current.length===0)return;let n=t(e.pointer.DOM);Ke(e=>e===n?e:n)}),e.on(`dragEnd`,e=>{let r=O.current;if(O.current=[],E.current=null,Ke(!1),n?.classList.remove(`graph-dragging`),r.length!==0&&t(e.pointer.DOM))if(r.length===1){let e=v.current.get(r[0])?.labels[0]??`Unknown`;It(r[0],e)}else Lt(r)})}catch(e){let t=e instanceof Error?e.message:String(e);N(`Visualisation failed to load: ${t}`);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-render`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}}},[]);(0,D.useEffect)(()=>{let e=f.current;if(!e)return;let t=t=>{let n=fe.current,r=de.current,i=e.parentElement;if(!n||!r||!i)return;let a=i.getBoundingClientRect(),o=Math.min(n.clientX,t.clientX)-a.left,s=Math.min(n.clientY,t.clientY)-a.top,c=Math.max(n.clientX,t.clientX)-a.left,l=Math.max(n.clientY,t.clientY)-a.top;r.style.left=`${o}px`,r.style.top=`${s}px`,r.style.width=`${c-o}px`,r.style.height=`${l-s}px`},n=r=>{document.removeEventListener(`mousemove`,t,!0),document.removeEventListener(`mouseup`,n,!0);let i=fe.current;fe.current=null;let a=de.current;a&&(a.style.display=`none`);let o=p.current;if(!i||!o)return;let s=e.getBoundingClientRect(),c=i.clientX-s.left,l=i.clientY-s.top,u=r.clientX-s.left,d=r.clientY-s.top,f=Math.min(c,u),m=Math.min(l,d),h=Math.max(c,u),g=Math.max(l,d);if(h-f<3&&g-m<3)return;let _=o.getPositions(),v=[];for(let[e,t]of Object.entries(_)){let n=o.canvasToDOM(t);n.x>=f&&n.x<=h&&n.y>=m&&n.y<=g&&v.push(e)}try{o.selectNodes(v,!1)}catch{}},r=r=>{if(!r.shiftKey||r.button!==0)return;let i=p.current,a=e.parentElement;if(!i||!a)return;let o=e.getBoundingClientRect(),s={x:r.clientX-o.left,y:r.clientY-o.top};if(i.getNodeAt(s))return;r.preventDefault(),r.stopImmediatePropagation(),fe.current={clientX:r.clientX,clientY:r.clientY};let c=de.current,l=a.getBoundingClientRect();c&&(c.style.display=`block`,c.style.left=`${r.clientX-l.left}px`,c.style.top=`${r.clientY-l.top}px`,c.style.width=`0px`,c.style.height=`0px`),document.addEventListener(`mousemove`,t,!0),document.addEventListener(`mouseup`,n,!0)};return e.addEventListener(`mousedown`,r,!0),()=>{e.removeEventListener(`mousedown`,r,!0),document.removeEventListener(`mousemove`,t,!0),document.removeEventListener(`mouseup`,n,!0)}},[]),(0,D.useEffect)(()=>{let e=Ze.trim();if(!e){et(``),nt(null),it(null),ut(`hybrid`),ft(0),mt(!1),p.current?.unselectAll();return}mt(!1);let t=setTimeout(()=>et(e),300);return()=>clearTimeout(t)},[Ze]),(0,D.useEffect)(()=>{let e=setTimeout(()=>{let e=ve(at);ct(e);try{window.localStorage.setItem(Ie,String(e))}catch{}},200);return()=>clearTimeout(e)},[at]);let Ut=(0,D.useCallback)(e=>{let t=p.current,n=g.current;if(!t||!n)return;let{updates:r,inWindow:i}=he(e,v.current,b.resolveNodeColour,Pe);r.length>0&&(n.update(r),t.fit({nodes:i,animation:{duration:400,easingFunction:`easeInOutQuad`}}))},[]),Wt=ue(xe);(0,D.useEffect)(()=>{if(!$e)return;let e=!1;return it(null),i(ye($e,Wt.selectedLabels,st,pt)).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);return t}).then(t=>{if(e)return;nt(t.results);let n=t.mode===`bm25`?`bm25`:`hybrid`;if(ut(n),ft(typeof t.suppressed==`number`?t.suppressed:0),n===`bm25`)try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-page`,msg:`[graph-page] search-result-degraded mode=bm25 query="${$e}"`}),keepalive:!0}).catch(()=>{})}catch{}let{nodes:r,edges:i}=ge(t.results,Wt.selectedLabels);v.current=new Map(r.map(e=>[e.id,e])),De(r.length),Te(null),Ht(r,i),Ut(t.results),console.info(`[graph-page] search-applied view=${Rt.kind} q="${$e}" labels=${Wt.selectedLabels.join(`|`)} hits=${r.length}`)}).catch(t=>{e||it(t instanceof Error?t.message:String(t))}),()=>{e=!0}},[$e,st,l,d,i,Ut,Rt.kind,Wt.selectedLabels,Ht,pt]);let Gt=(0,D.useCallback)(e=>{A(t=>{let n=ue(t),r=new Set(n.selectedLabels);return r.has(e)?r.delete(e):r.add(e),ce({kind:`filter`,selectedLabels:[...r].sort(),includeTrashed:n.includeTrashed,includeAgentActions:n.includeAgentActions})})},[]),Kt=(0,D.useCallback)(()=>{A(e=>{let t=ue(e);return ce({...t,includeTrashed:!t.includeTrashed})})},[]),qt=(0,D.useCallback)(()=>{A(e=>{let t=ue(e);return ce({...t,includeAgentActions:!t.includeAgentActions})})},[]),Jt=(0,D.useCallback)(()=>{Qe(``),et(``),nt(null),it(null),ut(`hybrid`),ft(0),mt(!1);try{p.current?.unselectAll()}catch{}},[]),Yt=(0,D.useCallback)(()=>{A(()=>ce({kind:`filter`,selectedLabels:[],includeTrashed:!1,includeAgentActions:!1}))},[]),Xt=(0,D.useCallback)(()=>{Be(null);try{p.current?.unselectAll()}catch{}A(e=>{let t=se(e);return t!==e&&We(`nav-pop`,{depth:t.length-1}),t})},[]),Zt=(0,D.useCallback)(()=>{Be(null);try{p.current?.unselectAll()}catch{}A(e=>e.length<=1?e:(We(`nav-home`,{depth:0,popped:e.length-1}),[ue(e)]))},[]),Qt=(0,D.useCallback)(()=>{let e=ue(xe),t={labels:[...e.selectedLabels].sort(),includeTrashed:e.includeTrashed};At(!0),i(`/api/admin/graph-default-view`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(t)}).then(async e=>{if(!e.ok){let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));throw Error(t.error??`HTTP ${e.status}`)}St(t)}).catch(e=>{let t=e instanceof Error?e.message:String(e);try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-default-view-save`,msg:t}),keepalive:!0}).catch(()=>{})}catch{}}).finally(()=>At(!1))},[i,xe]),$t=(0,D.useCallback)(()=>{Be(null);try{p.current?.unselectAll()}catch{}gt(e=>e+1),pe(`graph-restore`)},[]),en=(0,D.useCallback)(()=>{Be(null);try{p.current?.unselectAll()}catch{}A(e=>[ue(e)]),gt(e=>e+1),pe(`graph-trash`)},[]),tn=(0,D.useCallback)(()=>{gt(e=>e+1),vt(e=>e+1)},[]),nn=Rt.kind===`neighbourhood`,rn=ue(xe),an=rn.selectedLabels,on=rn.includeTrashed,sn=rn.includeAgentActions,cn=Tt.join(`,`),ln=Dt.join(`,`),un=an.includes(`AdminConversation`)||an.includes(`PublicConversation`);(0,D.useEffect)(()=>{un&&console.info(`[graph-filter] subfacet-render channel=[${cn}] sublabel=[${ln}]`)},[cn,ln,un]);let dn=(0,D.useMemo)(()=>{if(on!==xt.includeTrashed||an.length!==xt.labels.length)return!0;for(let e=0;e<an.length;e++)if(an[e]!==xt.labels[e])return!0;return!1},[on,an,xt]);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`graph-toolbar`,children:[xe.length>1&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`button`,{type:`button`,className:`graph-home-to-filter graph-home-desktop`,onClick:Zt,title:`Clear breadcrumb — return to filter root`,children:[(0,I.jsx)(C,{size:12}),` Home`]}),(0,I.jsx)(`button`,{type:`button`,className:`graph-home-to-filter graph-home-mobile`,onClick:Zt,"aria-label":`Home`,title:`Clear breadcrumb — return to filter root`,children:(0,I.jsx)(C,{size:14})}),(0,I.jsx)(`button`,{type:`button`,className:`graph-back-to-filter graph-back-desktop`,onClick:Xt,children:`← Back`}),(0,I.jsx)(`button`,{type:`button`,className:`graph-back-to-filter graph-back-mobile`,onClick:Xt,"aria-label":`Back`,children:(0,I.jsx)(a,{size:16})})]}),(0,I.jsxs)(`div`,{className:`data-search-input graph-search-input`,children:[(0,I.jsx)(y,{size:14}),(0,I.jsx)(`input`,{type:`text`,placeholder:`Search nodes…`,value:Ze,onChange:e=>Qe(e.target.value),autoComplete:`off`,spellCheck:!1}),$e&&!tt&&!rt&&(0,I.jsx)(u,{size:14,className:`spin`}),Ze.length>0&&(0,I.jsx)(`button`,{type:`button`,className:`graph-search-clear`,onClick:Jt,"aria-label":`Clear search`,title:`Clear search`,children:(0,I.jsx)(s,{size:14})})]}),$e&&(0,I.jsxs)(`div`,{className:`graph-search-limit`,title:`Show top ${at} matches (1-2000)`,children:[(0,I.jsx)(`label`,{htmlFor:`graph-search-limit-input`,className:`graph-search-limit-label`,children:`Top`}),(0,I.jsx)(`button`,{type:`button`,className:`graph-search-limit-step`,onClick:()=>ot(ve(at-1)),disabled:at<=1,"aria-label":`Decrement search limit`,title:`Decrement`,children:(0,I.jsx)(te,{size:12})}),(0,I.jsx)(`input`,{id:`graph-search-limit-input`,type:`number`,min:1,max:2e3,step:1,value:at,onChange:e=>ot(ve(e.target.value)),className:`graph-search-limit-number`,"aria-label":`Maximum search results to render`}),(0,I.jsx)(`button`,{type:`button`,className:`graph-search-limit-step`,onClick:()=>ot(ve(at+1)),disabled:at>=2e3,"aria-label":`Increment search limit`,title:`Increment`,children:(0,I.jsx)(m,{size:12})}),(0,I.jsx)(`input`,{id:`graph-search-limit-slider`,type:`range`,min:1,max:2e3,step:1,value:at,onChange:e=>ot(ve(e.target.value)),"aria-label":`Maximum search results to render (drag for ballpark)`})]}),(0,I.jsx)(`button`,{type:`button`,className:`graph-refresh-button`,onClick:tn,disabled:Ce,"aria-label":`Refresh graph`,title:`Refresh graph`,children:(0,I.jsx)(o,{size:14,className:Ce?`spin`:void 0})}),!nn&&(0,I.jsxs)(`div`,{className:`graph-filter-wrap`,ref:Mt,children:[(0,I.jsxs)(`button`,{type:`button`,className:`graph-filter-toggle${Ct?` is-open`:``}${an.length>0||on||sn?` has-selection`:``}`,onClick:()=>wt(e=>!e),"aria-haspopup":`true`,"aria-expanded":Ct,"aria-label":`Filter node types`,children:[(0,I.jsx)(h,{size:14}),(0,I.jsx)(`span`,{children:`Filter`}),an.length>0&&(0,I.jsx)(`span`,{className:`graph-filter-count`,children:an.length})]}),Ct&&(0,I.jsxs)(`div`,{className:`graph-filter-popover`,role:`dialog`,"aria-label":`Node type filter`,children:[(0,I.jsxs)(`div`,{className:`graph-filter-popover-header`,children:[(0,I.jsxs)(`button`,{type:`button`,className:`graph-toggle-trashed${on?` active`:``}`,onClick:Kt,"aria-pressed":on,title:`Show trashed nodes — restored with Restore button on each node`,children:[(0,I.jsx)(ee,{size:14}),` Show trashed`]}),(an.length>0||on||sn)&&(0,I.jsx)(`button`,{type:`button`,className:`graph-filter-clear`,onClick:Yt,"aria-label":`Clear filter selection`,title:`Clear filter selection`,children:(0,I.jsx)(s,{size:14})})]}),(0,I.jsx)(`div`,{className:`graph-toggle-agent-actions`,title:`Hide ToolCall, StepResult, WorkflowStep, WorkflowRun — agent-execution telemetry. Flip on for audit/debug.`,children:(0,I.jsx)(S,{checked:sn,onChange:qt,label:`Include agent actions`})}),yt.length===0&&(0,I.jsx)(`p`,{className:`graph-filter-popover-empty`,children:`No node types in your graph yet.`}),(0,I.jsx)(`div`,{className:`graph-filter-rows`,role:`group`,"aria-label":`Node type filter`,children:yt.map(({label:e,nodeCount:t})=>{let n=an.includes(e),r=(0,b.colourForLabel)(e);return(0,I.jsxs)(`button`,{type:`button`,className:`graph-filter-row${n?` active`:``}`,onClick:()=>Gt(e),"aria-pressed":n,children:[(0,I.jsx)(`span`,{className:`graph-filter-row-swatch`,style:{backgroundColor:r}}),(0,I.jsx)(`span`,{className:`graph-filter-row-label`,children:e}),(0,I.jsx)(`span`,{className:`graph-filter-row-count`,children:t})]},e)})}),(an.includes(`AdminConversation`)||an.includes(`PublicConversation`))&&(0,I.jsxs)(`div`,{className:`graph-filter-subfacets`,children:[(0,I.jsxs)(`div`,{className:`graph-filter-subfacet-group`,role:`group`,"aria-label":`Conversation channel`,children:[(0,I.jsx)(`span`,{className:`graph-filter-subfacet-label`,children:`Channel`}),[`webchat`,`whatsapp`].map(e=>{let t=Tt.includes(e);return(0,I.jsx)(`button`,{type:`button`,className:`graph-filter-subfacet-chip${t?` active`:``}`,onClick:()=>{Et(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},"aria-pressed":t,children:e===`webchat`?`Web`:`WhatsApp`},e)})]}),(0,I.jsxs)(`div`,{className:`graph-filter-subfacet-group`,role:`group`,"aria-label":`Message sublabel`,children:[(0,I.jsx)(`span`,{className:`graph-filter-subfacet-label`,children:`Message`}),[`UserMessage`,`AssistantMessage`,`WhatsAppMessage`].map(e=>{let t=Dt.includes(e);return(0,I.jsx)(`button`,{type:`button`,className:`graph-filter-subfacet-chip${t?` active`:``}`,onClick:()=>{Ot(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},"aria-pressed":t,children:e===`UserMessage`?`User`:e===`AssistantMessage`?`Assistant`:`WhatsApp`},e)})]})]}),(0,I.jsx)(`div`,{className:`graph-filter-popover-footer`,children:(0,I.jsx)(`button`,{type:`button`,className:`graph-filter-set-default`,onClick:Qt,disabled:!dn||kt,children:kt?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(u,{size:12,className:`spin`}),` Saving…`]}):`Set default view`})})]})]}),(0,I.jsx)(`div`,{className:`graph-meta`,children:ie({inNeighbourhood:nn,searchActive:!!$e,selectedLabelsCount:an.length,topLevelTotal:Oe,nodeCount:Ee})?(0,I.jsx)(`span`,{className:`graph-meta-count`,children:ae(Ee,Oe)}):Ee>0&&(0,I.jsxs)(`span`,{className:`graph-meta-count`,children:[Ee,` node`,Ee===1?``:`s`]})})]}),xe.length>1&&(0,I.jsx)(Ue,{viewStack:xe}),$e&&lt===`bm25`&&!rt&&(0,I.jsx)(`div`,{className:`graph-error-banner graph-search-degraded`,role:`status`,children:`Vector ranking unavailable — showing keyword-only results.`}),rt&&(0,I.jsxs)(`div`,{className:`data-error graph-error-banner`,children:[`Search unavailable: `,rt]}),$e&&dt>0&&!pt&&!rt&&(0,I.jsxs)(`button`,{type:`button`,className:`graph-search-suppressed`,onClick:()=>mt(!0),children:[dt,` low-confidence match`,dt===1?``:`es`,` hidden — show all`]}),$e&&pt&&!rt&&(0,I.jsx)(`button`,{type:`button`,className:`graph-search-suppressed`,onClick:()=>mt(!1),children:`Showing all matches — hide low-confidence`}),tt&&tt.length===0&&!rt&&(0,I.jsx)(`div`,{className:`graph-search-status`,children:`No matches in your graph.`}),(0,I.jsxs)(`div`,{className:`graph-canvas-wrap`,children:[Ce&&(0,I.jsxs)(`div`,{className:`graph-canvas-overlay`,children:[(0,I.jsx)(u,{size:20,className:`spin`}),` Loading your graph…`]}),M&&!Ce&&(0,I.jsxs)(`div`,{className:`graph-canvas-overlay graph-canvas-error`,children:[(0,I.jsx)(`p`,{children:M}),(0,I.jsx)(`button`,{type:`button`,className:`data-btn`,onClick:()=>{N(null),gt(e=>e+1)},children:`Retry`})]}),we&&!Ce&&(0,I.jsxs)(`div`,{className:`graph-canvas-overlay graph-canvas-error`,children:[(0,I.jsxs)(`p`,{children:[`Refine your filter — `,(0,I.jsx)(`strong`,{children:we.matched}),` matches exceed the 2000 cap.`]}),(0,I.jsx)(`p`,{className:`graph-canvas-hint`,children:`Pick a more specific label combination, or narrow your brand's data.`})]}),!Ce&&!M&&!we&&Ee===0&&!nn&&an.length===0&&(0,I.jsxs)(`div`,{className:`graph-canvas-overlay`,children:[(0,I.jsx)(h,{size:20}),(0,I.jsx)(`p`,{children:`No nodes in your graph yet.`})]}),!Ce&&!M&&!we&&Ee===0&&!nn&&an.length>0&&(0,I.jsx)(`div`,{className:`graph-canvas-overlay`,children:(0,I.jsxs)(`p`,{children:[`No `,an.join(`, `),` nodes in your graph yet.`]})}),(0,I.jsx)(`div`,{ref:f,className:`graph-canvas`}),(0,I.jsx)(`div`,{ref:de,className:`graph-marquee`,"aria-hidden":`true`}),Ee>0&&(0,I.jsx)(`div`,{ref:ne,className:`graph-trash-drop-zone${Ge?` is-hover`:``}${qe?` is-error`:``}`,"aria-hidden":`true`,children:(0,I.jsx)(r,{size:18})}),Ye&&(0,I.jsxs)(`div`,{className:`graph-drag-error-banner`,role:`alert`,children:[(0,I.jsx)(`span`,{children:Ye}),(0,I.jsx)(`button`,{type:`button`,className:`graph-drag-error-dismiss`,onClick:()=>Xe(null),"aria-label":`Dismiss`,children:(0,I.jsx)(s,{size:14})})]})]}),ze&&(0,I.jsx)(Ve,{node:ze,edges:x.current,nodesById:v.current,adminFetch:i,onClose:()=>{Be(null);try{p.current?.unselectAll()}catch{}},onRestored:$t,onTrashed:en}),Ee>0&&Nt.length>0&&(0,I.jsx)(`div`,{className:`graph-legend`,children:Nt.map(e=>(0,I.jsxs)(`div`,{className:`graph-legend-item`,children:[(0,I.jsx)(`span`,{className:`graph-legend-swatch`,style:{backgroundColor:(0,b.colourForLabel)(e)}}),(0,I.jsx)(`span`,{children:e})]},e))})]})}function Ve({node:e,edges:t,nodesById:n,adminFetch:i,onClose:a,onRestored:o,onTrashed:c}){let l=Object.entries(e.properties).filter(([,e])=>e!=null),d=t.filter(t=>t.from===e.id||t.to===e.id),[f,p]=(0,D.useState)(!1),[m,h]=(0,D.useState)(null),[g,_]=(0,D.useState)(!1),[y,b]=(0,D.useState)(null);(0,D.useEffect)(()=>{p(!1),h(null),_(!1),b(null)},[e.id]);let x=(0,D.useCallback)(()=>{p(!0),h(null),i(`/api/admin/graph-restore`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e.id})}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);o()}).catch(e=>{h(e instanceof Error?e.message:String(e)),p(!1)})},[e.id,o,i]),S=(0,D.useCallback)(()=>{_(!0),b(null),i(`/api/admin/graph-delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({elementId:e.id,by:`graph-side-panel-trash`})}).then(async e=>{let t=await e.json().catch(()=>({error:`HTTP ${e.status}`}));if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);c()}).catch(e=>{b(e instanceof Error?e.message:String(e)),_(!1)})},[e.id,c,i]);return(0,I.jsxs)(`aside`,{className:`graph-side-panel${e.trashed?` graph-side-panel-trashed`:``}`,children:[(0,I.jsxs)(`header`,{className:`graph-side-header`,children:[(0,I.jsx)(`div`,{children:(()=>{if(e.labels.some(e=>xe.has(e))){let t=(0,be.pickDisplayName)(e),n=e.properties.createdAt,r=typeof n==`string`?n:``,i=r?(0,be.formatRunTimestamp)(r):null,a=e.labels.join(` · `)+(e.trashed?` · Trashed`:``)+` · ${e.id}`;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`h2`,{className:`graph-side-name`,title:t,children:t}),i&&(0,I.jsx)(`div`,{className:`graph-side-created`,children:i}),(0,I.jsx)(`div`,{className:`graph-side-meta`,children:a})]})}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`graph-side-labels`,children:[e.labels.join(` · `),e.trashed?` · Trashed`:``]}),(0,I.jsx)(`div`,{className:`graph-side-id`,children:e.id})]})})()}),(0,I.jsx)(`button`,{type:`button`,className:`graph-side-close`,onClick:a,"aria-label":`Close`,children:(0,I.jsx)(s,{size:14})})]}),e.trashed&&(0,I.jsxs)(`dl`,{className:`graph-side-props graph-side-trash-meta`,children:[(0,I.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,I.jsx)(`dt`,{children:`trashedAt`}),(0,I.jsx)(`dd`,{children:Ke(e.properties.trashedAt)})]}),(0,I.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,I.jsx)(`dt`,{children:`trashedBy`}),(0,I.jsx)(`dd`,{children:Ke(e.properties.trashedBy)})]})]}),(0,I.jsxs)(`dl`,{className:`graph-side-props`,children:[l.length===0&&(0,I.jsx)(`div`,{className:`graph-side-empty`,children:`No properties.`}),l.map(([e,t])=>(0,I.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,I.jsx)(`dt`,{children:e}),(0,I.jsx)(`dd`,{children:Ke(t)})]},e))]}),d.length>0&&(0,I.jsxs)(`section`,{className:`graph-side-edges`,children:[(0,I.jsxs)(`h3`,{className:`graph-side-edges-heading`,children:[`Connections (`,d.length,`)`]}),d.map(t=>{let r=t.from===e.id,i=r?t.to:t.from,a=n.get(i),o=a?(0,be.pickShortLabel)(a):i,s=r?`→`:`←`,c=Object.entries(t.properties??{}).filter(([,e])=>e!=null&&e!==``);return(0,I.jsxs)(`div`,{className:`graph-side-edge`,children:[(0,I.jsxs)(`div`,{className:`graph-side-edge-header`,children:[(0,I.jsx)(`span`,{className:`graph-side-edge-type`,children:t.type}),(0,I.jsx)(`span`,{className:`graph-side-edge-arrow`,children:s}),(0,I.jsx)(`span`,{className:`graph-side-edge-other`,title:o,children:o})]}),c.length>0&&(0,I.jsx)(`dl`,{className:`graph-side-edge-props`,children:c.map(([e,t])=>(0,I.jsxs)(`div`,{className:`graph-side-prop`,children:[(0,I.jsx)(`dt`,{children:e}),(0,I.jsx)(`dd`,{children:Ke(t)})]},e))})]},t.id)})]}),e.trashed&&(0,I.jsxs)(`footer`,{className:`graph-side-footer`,children:[!f&&!m&&(0,I.jsxs)(`button`,{type:`button`,className:`graph-side-restore`,onClick:x,children:[(0,I.jsx)(v,{size:14}),` Restore`]}),f&&(0,I.jsx)(`div`,{className:`graph-delete-confirm`,children:(0,I.jsxs)(`p`,{children:[(0,I.jsx)(u,{size:14,className:`spin`}),` Restoring…`]})}),m&&(0,I.jsxs)(`div`,{className:`graph-delete-confirm graph-delete-confirm-error`,children:[(0,I.jsxs)(`p`,{children:[`Restore failed: `,m]}),(0,I.jsxs)(`div`,{className:`graph-delete-confirm-buttons`,children:[(0,I.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-cancel`,onClick:()=>{h(null)},children:`Close`}),(0,I.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-do`,onClick:x,children:`Retry`})]})]})]}),!e.trashed&&(0,I.jsxs)(`footer`,{className:`graph-side-footer`,children:[!g&&!y&&(0,I.jsxs)(`button`,{type:`button`,className:`graph-side-trash`,onClick:S,children:[(0,I.jsx)(r,{size:14}),` Trash`]}),g&&(0,I.jsx)(`div`,{className:`graph-delete-confirm`,children:(0,I.jsxs)(`p`,{children:[(0,I.jsx)(u,{size:14,className:`spin`}),` Trashing…`]})}),y&&(0,I.jsxs)(`div`,{className:`graph-delete-confirm graph-delete-confirm-error`,children:[(0,I.jsxs)(`p`,{children:[`Trash failed: `,y]}),(0,I.jsxs)(`div`,{className:`graph-delete-confirm-buttons`,children:[(0,I.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-cancel`,onClick:()=>{b(null)},children:`Close`}),(0,I.jsx)(`button`,{type:`button`,className:`graph-delete-confirm-do`,onClick:S,children:`Retry`})]})]})]})]})}var He=class extends Error{body;constructor(e){super(e.error),this.body=e}};function Ue({viewStack:e}){let t=e.map(e=>e.kind===`filter`?`Filter`:e.rootLabel??`Node`);return(0,I.jsx)(`div`,{className:`graph-breadcrumb`,role:`navigation`,"aria-label":`Graph navigation breadcrumb`,children:t.map((e,n)=>(0,I.jsxs)(`span`,{className:`graph-breadcrumb-item`,children:[n>0&&(0,I.jsx)(`span`,{className:`graph-breadcrumb-separator`,"aria-hidden":`true`,children:`›`}),(0,I.jsx)(`span`,{className:`graph-breadcrumb-label${n===t.length-1?` is-current`:``}`,children:e})]},n))})}function We(e,t){let n=`[graph-page] ${e} ${Object.entries(t).map(([e,t])=>`${e}=${String(t)}`).join(` `)}`;try{fetch(`/api/_client-error`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({kind:`graph-nav`,msg:n}),keepalive:!0}).catch(()=>{})}catch{}}function Ge(e){let t=t=>{let n=e[t];if(n&&typeof n==`object`&&`low`in n){let e=n.low;return typeof e==`number`?e:null}return null},n=t(`year`),r=t(`month`),i=t(`day`);if(n===null||r===null||i===null)return null;let a=`${String(n).padStart(4,`0`)}-${String(r).padStart(2,`0`)}-${String(i).padStart(2,`0`)}`;if(!(`hour`in e))return a;let o=t(`hour`),s=t(`minute`),c=t(`second`);return o===null||s===null||c===null?a:`${a} ${String(o).padStart(2,`0`)}:${String(s).padStart(2,`0`)}:${String(c).padStart(2,`0`)}`}function Ke(e){if(e==null)return``;if(Array.isArray(e))return e.length>8?`[${e.length} items]`:e.map(String).join(`, `);if(typeof e==`object`){if(`year`in e&&`month`in e&&`day`in e&&typeof e.year==`object`){let t=Ge(e);if(t)return t}return JSON.stringify(e)}return String(e)}(0,E.createRoot)(document.getElementById(`root`)).render((0,I.jsx)(ze,{}));