@pie-players/pie-section-player 0.3.74 → 0.3.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +249 -134
- package/dist/browser/assets/{evaluation-worker-DkU_wGh3.js → evaluation-worker-CORp9m0K.js} +39245 -38027
- package/dist/browser/chunks/PUA-tLuTiQ7--f2b27953.js +1 -1
- package/dist/browser/chunks/accents-BTUYmhn9-cafeb96e.js +1 -1
- package/dist/browser/chunks/accents-b-i-CngHZsLL-e0eb98fd.js +1 -1
- package/dist/browser/chunks/arabic-BzEHMVZD-30ac1ade.js +1 -1
- package/dist/browser/chunks/arrows-VjxlU-jv-2e17c192.js +1 -1
- package/dist/browser/chunks/braille-BeWC_Ruq-a3bb8ef9.js +1 -1
- package/dist/browser/chunks/braille-d-Dk6J96GO-d832bfbf.js +1 -1
- package/dist/browser/chunks/browser-a3c32178.js +17 -16
- package/dist/browser/chunks/calculator-element-271c142f.js +7 -3
- package/dist/browser/chunks/calligraphic-Cew9cU3x-04cf0735.js +1 -1
- package/dist/browser/chunks/catalog-context-46d3e50e.js +1 -0
- package/dist/browser/chunks/catalog-owner-d602f784.js +1 -0
- package/dist/browser/chunks/cherokee-Cny3FYho-4da7d2f3.js +1 -1
- package/dist/browser/chunks/cyrillic-CfCDulXU-5550df0b.js +1 -1
- package/dist/browser/chunks/cyrillic-ss-lU7bNGG9-12eb0188.js +1 -1
- package/dist/browser/chunks/devanagari-CDIz2h-r-18c38725.js +1 -1
- package/dist/browser/chunks/dist-41b39e7f.js +1 -1
- package/dist/browser/chunks/dist-59132a53.js +1 -1
- package/dist/browser/chunks/dist-60d7afef.js +1 -1
- package/dist/browser/chunks/dist-ca9b9622.js +1 -1
- package/dist/browser/chunks/double-struck-BpJEQk8y-500ce8dd.js +1 -1
- package/dist/browser/chunks/fraktur-rLEq9DEH-44cc14d8.js +1 -1
- package/dist/browser/chunks/greek-BlraJTyL-90ce8924.js +1 -1
- package/dist/browser/chunks/greek-ss-D-EN2PK0-91610739.js +1 -1
- package/dist/browser/chunks/hebrew-GiQZeybp-b583f555.js +1 -1
- package/dist/browser/chunks/latin-b-BhEnC7R2-d13e06ff.js +1 -1
- package/dist/browser/chunks/latin-bi-DqiIKv3U-1dec8705.js +1 -1
- package/dist/browser/chunks/latin-i-B1xtwaE1-21637466.js +1 -1
- package/dist/browser/chunks/latin-xfWFlLkD-5bcea5cf.js +1 -1
- package/dist/browser/chunks/logger-8b07fb72.js +1 -1
- package/dist/browser/chunks/marrows-DD1NgMQi-15b63755.js +1 -1
- package/dist/browser/chunks/math-DpWn1mbG-38eeb914.js +1 -1
- package/dist/browser/chunks/math-rendering-ready-9a0fd90a.js +1 -1
- package/dist/browser/chunks/{mathjax-D2JHb_R_-64780dc5.js → mathjax-BKrHE4xs-3ca05bf6.js} +41 -41
- package/dist/browser/chunks/monospace-D116QD2a-98d484fd.js +1 -1
- package/dist/browser/chunks/monospace-ex-DcXpouKS-456b403c.js +1 -1
- package/dist/browser/chunks/monospace-l-Ct5wkMDs-f34a4a9e.js +1 -1
- package/dist/browser/chunks/mshapes-DCp86WSX-c0055952.js +1 -1
- package/dist/browser/chunks/nl-NL-364d61b9.js +1 -1
- package/dist/browser/chunks/nl-NL-8b7e6d4b.js +1 -1
- package/dist/browser/chunks/phonetics-BwOCw2Y9-d2e3af59.js +1 -1
- package/dist/browser/chunks/phonetics-ss-CRtMn02f-579b6135.js +1 -1
- package/dist/browser/chunks/pie-api-client-687c319a.js +1 -1
- package/dist/browser/chunks/provider-4c704118.js +1 -1
- package/dist/browser/chunks/{runtime-C7H1jS4E-64772f5e.js → runtime-wcU7KOFU-ac86d7b8.js} +401 -278
- package/dist/browser/chunks/sans-serif-BYPZKlE9-2efdbcd9.js +1 -1
- package/dist/browser/chunks/sans-serif-b-B0kRKiC--b5530dce.js +1 -1
- package/dist/browser/chunks/sans-serif-bi-DXWul6mu-5370dba4.js +1 -1
- package/dist/browser/chunks/sans-serif-ex-Boux1kMP-aa178f31.js +1 -1
- package/dist/browser/chunks/sans-serif-i-676RFaSO-2db54474.js +1 -1
- package/dist/browser/chunks/sans-serif-r-DrN9xdZt-0fc72eea.js +1 -1
- package/dist/browser/chunks/script-0ohehnXc-526904f4.js +1 -1
- package/dist/browser/chunks/shapes-BG47NodJ-d59b0eca.js +1 -1
- package/dist/browser/chunks/{sre-engine-wf9s43gg-f09289c5.js → sre-0162a7a9.js} +18 -18
- package/dist/browser/chunks/sre-engine-ace23548.js +1 -0
- package/dist/browser/chunks/sre-engine-jd8cc08x-42d270e5.js +1 -0
- package/dist/browser/chunks/sre-locales-112320af.js +1 -0
- package/dist/browser/chunks/symbols-BqnUxf_t-83087e87.js +1 -1
- package/dist/browser/chunks/symbols-b-i-eg9k5hmF-9c461ac2.js +1 -1
- package/dist/browser/chunks/tool-annotation-toolbar-997438b4.js +7 -6
- package/dist/browser/chunks/tool-answer-eliminator-35483abd.js +4 -4
- package/dist/browser/chunks/tool-color-scheme-b7de5cdf.js +2 -2
- package/dist/browser/chunks/tool-dictionary-cecff3b4.js +1 -1
- package/dist/browser/chunks/tool-graph-cb0338e8.js +4 -4
- package/dist/browser/chunks/tool-host-contract-b93b482c.js +1 -1
- package/dist/browser/chunks/tool-instance-id-2a92deb0.js +1 -0
- package/dist/browser/chunks/tool-line-reader-f8ef3c6a.js +2 -2
- package/dist/browser/chunks/tool-periodic-table-43b133b8.js +1 -1
- package/dist/browser/chunks/tool-picture-dictionary-33721e91.js +1 -1
- package/dist/browser/chunks/tool-protractor-23f77028.js +6 -6
- package/dist/browser/chunks/tool-ruler-1d9a03a6.js +6 -6
- package/dist/browser/chunks/tool-tts-inline-98c2ce7a.js +7 -7
- package/dist/browser/chunks/tts-runtime-config-a7ab1ad4.js +194 -0
- package/dist/browser/chunks/variants-2LRNhOUP-966fc49d.js +1 -1
- package/dist/browser/pie-section-player.js +199 -85
- package/dist/chunks/nl-NL-364d61b9.js +1 -24
- package/dist/chunks/{sre-engine-wf9s43gg-f09289c5.js → sre-engine-jd8cc08x-42d270e5.js} +1 -1
- package/dist/components/shared/composition.d.ts +3 -1
- package/dist/components/shared/framework-error-latch.d.ts +32 -0
- package/dist/components/shared/host-element.d.ts +10 -0
- package/dist/components/shared/kernel-host-default-body.d.ts +14 -0
- package/dist/components/shared/layout-host-methods.d.ts +12 -27
- package/dist/components/shared/missing-tool-providers.d.ts +8 -8
- package/dist/components/shared/section-player-backend-delivery.d.ts +1 -1
- package/dist/components/shared/section-player-card-context.d.ts +5 -1
- package/dist/components/shared/section-player-host-runtime.d.ts +32 -19
- package/dist/components/shared/section-player-layout-context.d.ts +77 -0
- package/dist/components/shared/section-player-own-event.d.ts +10 -0
- package/dist/components/shared/section-player-runtime-callbacks.d.ts +1 -1
- package/dist/components/shared/section-player-shell-layout.svelte.d.ts +3 -11
- package/dist/components/shared/section-player-view-state.d.ts +6 -1
- package/dist/components/shared/toolkit-ready-wait.d.ts +16 -0
- package/dist/contracts/host-hooks.d.ts +0 -7
- package/dist/contracts/runtime-host-contract.d.ts +0 -5
- package/dist/controllers/SectionController.d.ts +1 -0
- package/dist/controllers/types.d.ts +8 -1
- package/dist/item-section/index.d.ts +22 -0
- package/dist/item-section/index.js +37 -0
- package/dist/pie-section-player.d.ts +4 -6
- package/dist/pie-section-player.js +19437 -19877
- package/dist/policies/index.d.ts +1 -19
- package/dist/policies/index.js +6 -14
- package/dist/policies/types.d.ts +0 -4
- package/package.json +13 -53
- package/dist/browser/chunks/custom-element-define-2a92deb0.js +0 -1
- package/dist/browser/chunks/nds-icon-button-d602f784.js +0 -194
- package/dist/browser/chunks/pie-tool-calculator-cortex-0626bc24.js +0 -9
- package/dist/browser/chunks/pie-tool-calculator-geogebra-561236cb.js +0 -9
- package/dist/components/item-shell-element.d.ts +0 -1
- package/dist/components/shared/shell-registration.d.ts +0 -55
- package/dist/contracts/layout-contract.d.ts +0 -17
- package/dist/contracts/layout-contract.js +0 -0
- package/dist/contracts/layout-parity-metadata.d.ts +0 -4
- package/dist/contracts/layout-parity-metadata.js +0 -87
- package/dist/contracts/public-events.d.ts +0 -92
- package/dist/contracts/public-events.js +0 -12
- package/dist/policies/guards.d.ts +0 -2
- /package/dist/browser/chunks/{ItemToolBar-wr2myaah-2ce4b643.js → ItemToolBar-jx38w99s-58defccc.js} +0 -0
- /package/dist/chunks/{ItemToolBar-wr2myaah-1287ba31.js → ItemToolBar-jx38w99s-1287ba31.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{g as kl,n as xl}from"./tool-host-contract-b93b482c.js";import{i as Ml}from"./provider-4c704118.js";if(typeof window<"u"){var Nr,Ar;((Nr=(Ar=window).__svelte??(Ar.__svelte={})).v??(Nr.v=new Set)).add("5")}var Me={},Q=Symbol("uninitialized"),ui=Array.isArray,Sl=Array.prototype.indexOf,tr=Array.prototype.includes,Cn=Array.from,mn=Object.keys,Je=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,Wl=Object.getOwnPropertyDescriptors,El=Object.prototype,Pl=Array.prototype,fi=Object.getPrototypeOf,Hr=Object.isExtensible,jl=()=>{};function Cl(t){for(var e=0;e<t.length;e++)t[e]()}function ci(){var t,e;return{promise:new Promise((n,r)=>{t=n,e=r}),resolve:t,reject:e}}function Ge(t){"@babel/helpers - typeof";return Ge=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ge(t)}function Il(t,e){if(Ge(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Ge(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ll(t){var e=Il(t,"string");return Ge(e)=="symbol"?e:e+""}function H(t,e,n){return(e=Ll(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var pt=1024,Mt=2048,pe=4096,gr=8192,zl=16384,mr=32768,Rr=1<<25,wr=65536,je=1<<19,Tl=1<<20,Re=1<<25,Fr=1<<21,Ol=1<<22,wn=1<<23,Fe=Symbol("$state"),hi=Symbol("component"),vi=Symbol("legacy props"),Dl=Symbol(""),er=Symbol("attributes"),nr=Symbol("class"),rr=Symbol("style"),dn=Symbol("text"),Be=Symbol("form reset"),Ye=new class extends Error{constructor(...t){super(...t),H(this,"name","StaleReactionError"),H(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Nl=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Al(){console.warn("https://svelte.dev/e/derived_inert")}function In(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function Hl(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var L=!1;function Vt(t){L=t}var T;function it(t){if(t===null)throw In(),Me;return T=t}function Ln(){return it(Nt(T))}function ht(t){if(L){if(Nt(T)!==null)throw In(),Me;T=t}}function Rl(t=1){if(L){for(var e=t,n=T;e--;)n=Nt(n);T=n}}function yn(t=!0){for(var e=0,n=T;;){if(n.nodeType===8){var r=n.data;if(r==="]"){if(e===0)return n;e-=1}else(r==="["||r==="[!"||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(e+=1)}var i=Nt(n);t&&n.remove(),n=i}}function di(t){if(!t||t.nodeType!==8)throw In(),Me;return t.data}function pi(t){return t===this.v}function Fl(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function gi(t){return!Fl(t,this.v)}function Bl(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Vl(t,e,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function ql(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Jl(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Gl(t){throw new Error("https://svelte.dev/e/effect_orphan")}function Ql(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Xl(){throw new Error("https://svelte.dev/e/hydration_failed")}function Zl(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Kl(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Yl(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ul(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function to(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var Ce=!1,zn=!1,V=null;function Se(t){V=t}function mi(t,e=!1,n){V={p:V,i:!1,c:null,e:null,s:t,x:null,r:j,l:zn&&!e?{s:null,u:null,$:[]}:null}}function wi(t){var e=V,n=e.e;if(n!==null){e.e=null;for(var r of n)Ri(r)}return t!==void 0&&(e.x=t),e.i=!0,V=e.p,yr(t)}function yr(t={}){return Je(t,hi,{value:!0}),t}function Ue(){return!zn||V!==null&&V.l===null}var ae=[];function yi(){var t=ae;ae=[],Cl(t)}function Ot(t){if(ae.length===0&&!Ve){var e=ae;queueMicrotask(()=>{e===ae&&yi()})}ae.push(t)}function eo(){for(;ae.length>0;)yi()}var no=~(Mt|pe|pt);function q(t,e){t.f=t.f&no|e}function _r(t){(t.f&512)!==0||t.deps===null?q(t,pt):q(t,pe)}function _i(t,e,n){(t.f&2048)!==0?e.add(t):t.f&4096&&n.add(t),q(t,pt)}var Br=!1;function bi(){Br||(Br=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e[Be]?.()})},{capture:!0}))}function Ie(t){var e=I,n=j;mt(null),Dt(null);try{return t()}finally{mt(e),Dt(n)}}function ro(t,e,n,r=n){t.addEventListener(e,()=>Ie(n));const i=t[Be];i?t[Be]=()=>{i(),r(!0)}:t[Be]=()=>r(!0),bi()}function io(t,e,n,r){const i=Ue()?Qe:br;var l=t.filter(p=>!p.settled),o=e.map(i);if(n.length===0&&l.length===0){r(o);return}var a=j,u=lo(),f=l.length===1?l[0].promise:l.length>1?Promise.all(l.map(p=>p.promise)):null;function h(p){if((a.f&16384)===0){u();try{r([...o,...p])}catch(m){Tt(m,a)}_n()}}var d=$i();if(n.length===0){f.then(()=>h([])).finally(d);return}function v(){Promise.all(n.map(p=>oo(p))).then(h).catch(p=>Tt(p,a)).finally(d)}f?f.then(()=>{u(),v(),_n()}):v()}function lo(){var t=j,e=I,n=V,r=x;return function(i=!0){Dt(t),mt(e),Se(n),i&&!(t.f&16384)&&(r?.activate(),r?.apply())}}function _n(t=!0){Dt(null),mt(null),Se(null),t&&x?.deactivate()}function $i(){var t=j,e=t.b,n=x,r=!!e?.is_rendered();return e?.update_pending_count(1,n),n.increment(r,t),()=>{e?.update_pending_count(-1,n),n.decrement(r,t)}}function Qe(t){var e=2|Mt;return j!==null&&(j.f|=je),{ctx:V,deps:null,effects:null,equals:pi,f:e,fn:t,reactions:null,rv:0,v:Q,wv:0,parent:j,ac:null}}var Ne=Symbol("obsolete");function oo(t,e,n){let r=j;r===null&&Bl();var i=void 0,l=de(Q),o=!I,a=new Set;return ko(()=>{var u=j,f=ci();i=f.promise;try{Promise.resolve(t()).then(f.resolve,p=>{p!==Ye&&f.reject(p)}).finally(_n)}catch(p){f.reject(p),_n()}var h=x;if(o){if((u.f&32768)!==0)var d=$i();if(r.b?.is_rendered())h.async_deriveds.get(u)?.reject(Ne);else for(const p of a.values())p.reject(Ne);a.add(f),h.async_deriveds.set(u,f)}const v=(p,m=void 0)=>{d?.(),a.delete(f),m!==Ne&&(h.activate(),m?(l.f|=wn,Ee(l,m)):(l.f&8388608&&(l.f^=wn),Ee(l,p)),h.deactivate())};f.promise.then(v,p=>v(null,p||"unknown"))}),Hi(()=>{for(const u of a)u.reject(Ne)}),new Promise(u=>{function f(h){function d(){h===i?u(l):f(i)}h.then(d,d)}f(i)})}function ee(t){const e=Qe(t);return Gi(e),e}function br(t){const e=Qe(t);return e.equals=gi,e}function so(t){var e=t.effects;if(e!==null){t.effects=null;for(var n=0;n<e.length;n+=1)nt(e[n])}}function $r(t){var e,n=j,r=t.parent;if(!Gt&&r!==null&&t.v!==Q&&(r.f&24576)!==0)return Al(),t.v;Dt(r);try{so(t),e=Ki(t)}finally{Dt(n)}return e}function ki(t){var e=$r(t);if(!t.equals(e)&&(t.wv=Xi(),(!x?.is_fork||t.deps===null)&&(x!==null?(x.capture(t,e,!0),bn?.capture(t,e,!0)):t.v=e,t.deps===null))){q(t,pt);return}Gt||(et!==null?(Sr()||x?.is_fork)&&et.set(t,e):_r(t))}function ao(t){if(t.effects!==null)for(const e of t.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac!==null&&Ie(()=>{e.ac.abort(Ye),e.ac=null}),e.fn!==null&&(e.teardown=jl),Ze(e,0),Er(e))}function xi(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&e.fn!==null&&Pe(e)}function Mi(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function kr(t,e){Mi(t,e),e.add(t)}function k(t,e,n){Mi(t,e),e.set(t,n)}function E(t,e,n){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}function b(t,e,n){return t.set(E(t,e),n),n}function s(t,e){return t.get(E(t,e))}var Si,ir=null,ye=null,x=null,bn=null,et=null,lr=null,Ve=!1,An=!1,Xe=null,$n=null,Wi=0,uo=1,or=new WeakMap,ce=new WeakMap,ke=new WeakMap,kn=new WeakMap,on=new WeakMap,_e=new WeakMap,oe=new WeakMap,Ae=new WeakMap,It=new WeakMap,Vr=new WeakMap,We=new WeakMap,qt=new WeakMap,Zt=new WeakMap,Hn=new WeakMap,sn=new WeakMap,G=new WeakSet,ge=class Ei{constructor(){kr(this,G),H(this,"id",uo++),k(this,or,!1),H(this,"linked",!0),k(this,ce,null),k(this,ke,null),H(this,"async_deriveds",new Map),H(this,"current",new Map),H(this,"previous",new Map),k(this,kn,new Set),k(this,on,new Set),k(this,_e,0),k(this,oe,new Map),k(this,Ae,null),k(this,It,[]),k(this,Vr,[]),k(this,We,new Set),k(this,qt,new Set),k(this,Zt,new Map),k(this,Hn,new Set),H(this,"is_fork",!1),k(this,sn,!1),ye===null?ir=ye=this:(b(ke,ye,this),b(ce,this,ye)),ye=this}skip_effect(e){s(Zt,this).has(e)||s(Zt,this).set(e,{d:[],m:[]}),s(Hn,this).delete(e)}unskip_effect(e,n=r=>this.schedule(r)){var r=s(Zt,this).get(e);if(r){s(Zt,this).delete(e);for(var i of r.d)q(i,Mt),n(i);for(i of r.m)q(i,pe),n(i)}s(Hn,this).add(e)}capture(e,n,r=!1){e.v!==Q&&!this.previous.has(e)&&this.previous.set(e,e.v),!(e.f&8388608)&&(this.current.set(e,[n,r]),et?.set(e,n)),this.is_fork||(e.v=n)}activate(){x=this}deactivate(){x=null,et=null}flush(){try{An=!0,x=this,E(G,this,xn).call(this)}finally{Wi=0,lr=null,Xe=null,$n=null,An=!1,x=null,et=null,zt.clear()}}discard(){for(const e of s(on,this))e(this);s(on,this).clear();for(const e of this.async_deriveds.values())e.reject(Ne);E(G,this,Mn).call(this),s(Ae,this)?.resolve()}register_created_effect(e){s(Vr,this).push(e)}increment(e,n){if(b(_e,this,s(_e,this)+1),e){let r=s(oe,this).get(n)??0;s(oe,this).set(n,r+1)}}decrement(e,n){if(b(_e,this,s(_e,this)-1),e){let r=s(oe,this).get(n)??0;r===1?s(oe,this).delete(n):s(oe,this).set(n,r-1)}s(sn,this)||(b(sn,this,!0),Ot(()=>{b(sn,this,!1),this.linked&&this.flush()}))}transfer_effects(e,n){for(const r of e)s(We,this).add(r);for(const r of n)s(qt,this).add(r);e.clear(),n.clear()}oncommit(e){s(kn,this).add(e)}ondiscard(e){s(on,this).add(e)}settled(){return(s(Ae,this)??b(Ae,this,ci())).promise}static ensure(){if(x===null){const e=x=new Ei;!An&&!Ve&&Ot(()=>{s(or,e)||e.flush()})}return x}apply(){if(!Ce||!this.is_fork&&s(ce,this)===null&&s(ke,this)===null){et=null;return}et=new Map;for(const[n,[r]]of this.current)et.set(n,r);for(let n=ir;n!==null;n=s(ke,n))if(!(n===this||n.is_fork)){var e=!1;if(n.id<this.id){for(const[r,[,i]]of n.current)if(!i&&this.current.has(r)){e=!0;break}}if(!e)for(const[r,i]of n.previous)et.has(r)||et.set(r,i)}}schedule(e){if(lr=e,e.b?.is_pending&&(e.f&16777228)!==0&&(e.f&32768)===0){e.b.defer_effect(e);return}s(It,this).push(e)}};Si=ge;function qr(){if(this.is_fork)return!0;for(const n of s(oe,this).keys()){for(var t=n,e=!1;t.parent!==null;){if(s(Zt,this).has(t)){e=!0;break}t=t.parent}if(!e)return!0}return!1}function fo(){var t=[];for(const i of s(It,this))if(!((i.f&16384)!==0||(i.f&6144)===0)){for(var e=i,n=!1;e.parent!==null;){e=e.parent;var r=e.f;if((r&96)!==0){if((r&1024)===0){n=!0;break}e.f^=pt}}n||t.push(e)}return b(It,this,[]),t}function xn(){b(or,this,!0);for(const o of s(We,this))s(qt,this).delete(o),q(o,Mt),this.schedule(o);for(const o of s(qt,this))q(o,pe),this.schedule(o);this.apply();for(var t=Xe=[],e=[],n=$n=[];s(It,this).length>0;){Wi++>1e3&&(E(G,this,Mn).call(this),po());for(const o of E(G,this,fo).call(this))try{E(G,this,co).call(this,o,t,e)}catch(a){throw Ci(o),E(G,this,qr).call(this)||this.discard(),a}}if(x=null,n.length>0){var r=Si.ensure();for(const o of n)r.schedule(o)}if(Xe=null,$n=null,E(G,this,qr).call(this)){E(G,this,an).call(this,e),E(G,this,an).call(this,t);for(const[o,a]of s(Zt,this))ji(o,a);n.length>0&&E(G,x,xn).call(x);return}const i=E(G,this,ho).call(this);if(i){E(G,this,an).call(this,e),E(G,this,an).call(this,t),E(G,i,vo).call(i,this);return}s(We,this).clear(),s(qt,this).clear();for(const o of s(kn,this))o(this);s(kn,this).clear(),bn=this,Jr(e),Jr(t),bn=null,s(Ae,this)?.resolve();var l=x;if(s(_e,this)===0&&(s(It,this).length===0||l!==null)&&E(G,this,Mn).call(this),s(It,this).length>0)if(l!==null){for(const o of s(It,this))s(It,l).push(o);b(It,this,[])}else l=this;l!==null&&(zt.clear(),E(G,l,xn).call(l))}function co(t,e,n){t.f^=pt;for(var r=t.first;r!==null;){var i=r.f,l=(i&96)!==0;if(!(l&&(i&1024)!==0||(i&8192)!==0||s(Zt,this).has(r))&&r.fn!==null){l?r.f^=pt:(i&4)!==0?e.push(r):Ce&&(i&16777224)!==0?n.push(r):tn(r)&&(i&16&&s(qt,this).add(r),Pe(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var a=r.next;if(a!==null){r=a;break}r=r.parent}}}function ho(){for(var t=s(ce,this);t!==null;){if(!t.is_fork){for(const[e,[,n]]of this.current)if(t.current.has(e)&&!n)return t}t=s(ce,t)}return null}function vo(t){for(const[n,r]of t.current)!this.previous.has(n)&&t.previous.has(n)&&this.previous.set(n,t.previous.get(n)),this.current.set(n,r);for(const[n,r]of t.async_deriveds){const i=this.async_deriveds.get(n);i&&r.promise.then(i.resolve).catch(i.reject)}t.async_deriveds.clear(),this.transfer_effects(s(We,t),s(qt,t));const e=n=>{var r=n.reactions;if(r!==null&&!((n.f&2)!==0&&(n.f&6144)===0))for(const o of r){var i=o.f;if((i&2)!==0)e(o);else{var l=o;i&4194320&&!this.async_deriveds.has(l)&&(s(qt,this).delete(l),q(l,Mt),this.schedule(l))}}};for(const n of this.current.keys())e(n);this.oncommit(()=>t.discard()),E(G,t,Mn).call(t),x=this,E(G,this,xn).call(this)}function an(t){for(var e=0;e<t.length;e+=1)_i(t[e],s(We,this),s(qt,this))}function Mn(){if(this.linked){var t=s(ce,this),e=s(ke,this);t===null?ir=e:b(ke,t,e),e===null?ye=t:b(ce,e,t),this.linked=!1}}function Sn(t){var e=Ve;Ve=!0;try{var n;for(t&&(x!==null&&!x.is_fork&&x.flush(),n=t());;){if(eo(),x===null)return n;x.flush()}}finally{Ve=e}}function po(){try{Ql()}catch(t){Tt(t,lr)}}var Ct=null;function Jr(t){var e=t.length;if(e!==0){for(var n=0;n<e;){var r=t[n++];if((r.f&24576)===0&&tn(r)&&(Ct=new Set,Pe(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Vi(r),Ct?.size>0)){zt.clear();for(const i of Ct){if((i.f&24576)!==0)continue;const l=[i];let o=i.parent;for(;o!==null;)Ct.has(o)&&(Ct.delete(o),l.push(o)),o=o.parent;for(let a=l.length-1;a>=0;a--){const u=l[a];!(u.f&24576)&&Pe(u)}}Ct.clear()}}Ct=null}}function Pi(t){x.schedule(t)}function ji(t,e){if(!((t.f&32)!==0&&(t.f&1024)!==0)){(t.f&2048)!==0?e.d.push(t):t.f&4096&&e.m.push(t),q(t,pt);for(var n=t.first;n!==null;)ji(n,e),n=n.next}}function Ci(t){q(t,pt);for(var e=t.first;e!==null;)Ci(e),e=e.next}var Wn=new Set,zt=new Map,Ii=!1;function de(t,e){return{f:0,v:t,reactions:null,equals:pi,rv:0,wv:0}}function F(t,e){const n=de(t,e);return Gi(n),n}function Li(t,e=!1,n=!0){const r=de(t);if(e||(r.equals=gi),zn&&n&&V!==null&&V.l!==null){var i;((i=V.l).s??(i.s=[])).push(r)}return r}function M(t,e,n=!1){return I!==null&&(!_t||I.f&131072)&&Ue()&&I.f&4325394&&($t===null||!$t.has(t))&&Ul(),Ee(t,n?Kt(e):e,$n)}var se=null,sr=0;function Ee(t,e,n=null){if(!t.equals(e)){Gt?zt.set(t,e):zt.has(t)||zt.set(t,t.v);var r=ge.ensure();if(r.capture(t,e),(t.f&2)!==0){const i=t;t.f&2048&&$r(i),et===null&&_r(i)}t.wv=Xi(),se=null,sr=0,zi(t,Mt,n),se=null,Ue()&&j!==null&&j.f&1024&&!(j.f&96)&&(vt===null?Wo([t]):vt.push(t)),!r.is_fork&&Wn.size>0&&!Ii&&go()}return e}function go(){Ii=!1;for(const t of Wn){t.f&1024&&q(t,pe);let e;try{e=tn(t)}catch{e=!0}e&&Pe(t)}Wn.clear()}function mo(t,e=1){var n=c(t),r=e===1?n++:n--;return M(t,n),r}function qe(t){M(t,t.v+1)}function zi(t,e,n){var r=t.reactions;if(r!==null){var i=Ue(),l=r.length;if(sr+=l,sr>1e5&&se===null&&(se=new Set),se!==null){if(se.has(t))return;se.add(t)}for(var o=0;o<l;o++){var a=r[o],u=a.f;if(!(!i&&a===j)){var f=(u&Mt)===0;if(f&&q(a,e),(u&131072)!==0)Wn.add(a);else if((u&2)!==0){var h=a;et?.delete(h),zi(h,pe,n)}else if(f){var d=a;u&16&&Ct!==null&&Ct.add(d),n!==null?n.push(d):Pi(d)}}}}}function Kt(t){if(typeof t!="object"||t===null||Fe in t||hi in t)return t;const e=fi(t);if(e!==El&&e!==Pl)return t;var n=new Map,r=ui(t),i=F(0),l=null,o=he,a=u=>{if(he===o)return u();var f=I,h=he;mt(null),Kr(o);var d=u();return mt(f),Kr(h),d};return r&&n.set("length",F(t.length,l)),new Proxy(t,{defineProperty(u,f,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&Kl();var d=n.get(f);return d===void 0?a(()=>{var v=F(h.value,l);return n.set(f,v),v}):M(d,h.value,!0),!0},deleteProperty(u,f){var h=n.get(f);if(h===void 0){if(f in u){const d=a(()=>F(Q,l));n.set(f,d),qe(i)}}else M(h,Q),qe(i);return!0},get(u,f,h){if(f===Fe)return t;var d=n.get(f),v=f in u;if(d===void 0&&(!v||fe(u,f)?.writable)&&(d=a(()=>F(Kt(v?u[f]:Q),l)),n.set(f,d)),d!==void 0){var p=c(d);return p===Q?void 0:p}return Reflect.get(u,f,h)},getOwnPropertyDescriptor(u,f){this.has?.(u,f);var h=Reflect.getOwnPropertyDescriptor(u,f),d=n.get(f);if(d!==void 0){var v=c(d);if(v===Q)return;if(h&&"value"in h)h.value=v;else return{enumerable:!0,configurable:!0,value:v,writable:!0}}return h},has(u,f){if(f===Fe)return!0;var h=n.get(f),d=h!==void 0&&h.v!==Q||Reflect.has(u,f);return(h!==void 0||j!==null&&(!d||fe(u,f)?.writable))&&(h===void 0&&(h=a(()=>F(d?Kt(u[f]):Q,l)),n.set(f,h)),c(h)===Q)?!1:d},set(u,f,h,d){var v=n.get(f),p=f in u;if(r&&f==="length")for(var m=h;m<v.v;m+=1){var S=n.get(m+"");S!==void 0?M(S,Q):m in u&&(S=a(()=>F(Q,l)),n.set(m+"",S))}if(v===void 0)(!p||fe(u,f)?.writable)&&(v=a(()=>F(void 0,l)),M(v,Kt(h)),n.set(f,v));else{p=v.v!==Q;var g=a(()=>Kt(h));M(v,g)}var _=Reflect.getOwnPropertyDescriptor(u,f);if(_?.set&&_.set.call(d,h),!p){if(r&&typeof f=="string"){var R=n.get("length"),N=Number(f);Number.isInteger(N)&&N>=R.v&&M(R,N+1)}qe(i)}return!0},ownKeys(u){c(i);var f=Reflect.ownKeys(u).filter(v=>{var p=n.get(v);return p===void 0||p.v!==Q});for(var[h,d]of n)d.v!==Q&&!(h in u)&&f.push(h);return f},setPrototypeOf(){Yl()}})}var Gr,Ti,Oi,Di;function ar(){if(Gr===void 0){Gr=window,Ti=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;Oi=fe(e,"firstChild").get,Di=fe(e,"nextSibling").get,Hr(t)&&(t[nr]=void 0,t[er]=null,t[rr]=void 0,t.__e=void 0),Hr(n)&&(n[dn]=void 0)}}function dt(t=""){return document.createTextNode(t)}function at(t){return Oi.call(t)}function Nt(t){return Di.call(t)}function Bt(t,e){if(!L)return at(t);var n=at(T);if(n===null)n=T.appendChild(dt());else if(e&&n.nodeType!==3){var r=dt();return n?.before(r),it(r),r}return e&&Mr(n),it(n),n}function Rn(t,e=!1){if(!L){var n=at(t);return n instanceof Comment&&n.data===""?Nt(n):n}if(e){if(T?.nodeType!==3){var r=dt();return T?.before(r),it(r),r}Mr(T)}return T}function Qr(t,e=!1){if(!L)return at(t);var n=Bt(t,e);return ht(t),n}function Pt(t,e=1,n=!1){let r=L?T:t;for(var i;e--;)i=r,r=Nt(r);if(!L)return r;if(n){if(r?.nodeType!==3){var l=dt();return r===null?i?.after(l):r.before(l),it(l),l}Mr(r)}return it(r),r}function Ni(t){t.textContent=""}function Ai(){return!Ce||Ct!==null?!1:(j.f&mr)!==0}function xr(t,e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?n?document.createElement(t,{is:n}):document.createElement(t):n?document.createElementNS(e,t,{is:n}):document.createElementNS(e,t)}function Mr(t){if(t.nodeValue.length<65536)return;let e=t.nextSibling;for(;e!==null&&e.nodeType===3;)e.remove(),t.nodeValue+=e.nodeValue,e=t.nextSibling}function wo(t){var e=j;if(e===null)return I.f|=wn,t;if((e.f&32768)===0&&(e.f&4)===0)throw t;Tt(t,e)}function Tt(t,e){if(!(e!==null&&(e.f&16384)!==0)){for(;e!==null;){if((e.f&128)!==0&&(e.f&33570816)===0){if((e.f&32768)===0)throw t;try{e.b.error(t);return}catch(n){t=n}}e=e.parent}throw t}}function yo(t){j===null&&(I===null&&Gl(t),Jl()),Gt&&ql(t)}function _o(t,e){var n=e.last;n===null?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}function At(t,e){var n=j;n!==null&&n.f&8192&&(t|=gr);var r={ctx:V,deps:null,nodes:null,f:t|Mt|512,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};x?.register_created_effect(r);var i=r;if((t&4)!==0)Xe!==null?Xe.push(r):ge.ensure().schedule(r);else if(e!==null){try{Pe(r)}catch(o){throw nt(r),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,t&16&&t&65536&&i!==null&&(i.f|=wr))}if(i!==null&&(i.parent=n,n!==null&&_o(i,n),I!==null&&(I.f&2)!==0&&(t&64)===0)){var l=I;(l.effects??(l.effects=[])).push(i)}return r}function Sr(){return I!==null&&!_t}function Hi(t){const e=At(8,null);return q(e,pt),e.teardown=t,e}function Xr(t){yo("$effect");var e=j.f;if(!I&&(e&32)!==0&&V!==null&&!V.i){var n=V;(n.e??(n.e=[])).push(t)}else return Ri(t)}function Ri(t){return At(4|Tl,t)}function bo(t){ge.ensure();const e=At(64|je,t);return()=>{nt(e)}}function $o(t){ge.ensure();const e=At(64|je,t);return(n={})=>new Promise(r=>{n.outro?me(e,()=>{nt(e),r(void 0)}):(nt(e),r(void 0))})}function Fi(t){return At(4,t)}function ko(t){return At(Ol|je,t)}function Tn(t,e=0){return At(8|e,t)}function Rt(t,e=[],n=[],r=[]){io(r,e,n,i=>{At(8,()=>{t(...i.map(c))})})}function Wr(t,e=0){return At(16|e,t)}function gt(t){return At(32|je,t)}function Bi(t){var e=t.teardown;if(e!==null){const n=Gt,r=I;Zr(!0),mt(null);try{e.call(null)}catch(i){Tt(i,t.parent)}finally{Zr(n),mt(r)}}}function Er(t,e=!1){var n=t.first;for(t.first=t.last=null;n!==null;){const i=n.ac;i!==null&&Ie(()=>{i.abort(Ye)});var r=n.next;(n.f&64)!==0?n.parent=null:nt(n,e),n=r}}function xo(t){for(var e=t.first;e!==null;){var n=e.next;!(e.f&32)&&nt(e),e=n}}function nt(t,e=!0){var n=!1;(e||t.f&262144)&&t.nodes!==null&&t.nodes.end!==null&&(Mo(t.nodes.start,t.nodes.end),n=!0),t.f|=Rr,Er(t,e&&!n),Ze(t,0);var r=t.nodes&&t.nodes.t;if(r!==null)for(const l of r)l.stop();Bi(t),t.f^=Rr,t.f|=zl;var i=t.parent;i!==null&&i.first!==null&&Vi(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function Mo(t,e){for(;t!==null;){var n=t===e?null:Nt(t);t.remove(),t=n}}function Vi(t){var e=t.parent,n=t.prev,r=t.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function me(t,e,n=!0){var r=[];t.f|=256,qi(t,r,!0);var i=()=>{n&&nt(t),e&&e()},l=r.length;if(l>0){var o=()=>--l||i();for(var a of r)a.out(o)}else i()}function qi(t,e,n){if((t.f&8192)===0){t.f^=gr;var r=t.nodes&&t.nodes.t;if(r!==null)for(const a of r)(a.is_global||n)&&e.push(a);for(var i=t.first;i!==null;){var l=i.next;if((i.f&64)===0){var o=(i.f&65536)!==0||(i.f&32)!==0&&(t.f&16)!==0;qi(i,e,o?n:!1)}i=l}}}function En(t){t.f&=-257,Ji(t,!0)}function Ji(t,e){if((t.f&256)===0&&(t.f&8192)!==0){t.f^=gr,!(t.f&1024)&&(q(t,Mt),ge.ensure().schedule(t));for(var n=t.first;n!==null;){var r=n.next,i=(n.f&65536)!==0||(n.f&32)!==0;Ji(n,i?e:!1),n=r}var l=t.nodes&&t.nodes.t;if(l!==null)for(const o of l)(o.is_global||e)&&o.in()}}function Pr(t,e){if(t.nodes)for(var n=t.nodes.start,r=t.nodes.end;n!==null;){var i=n===r?null:Nt(n);e.append(n),n=i}}var So=null,pn=!1,Gt=!1;function Zr(t){Gt=t}var I=null,_t=!1;function mt(t){I=t}var j=null;function Dt(t){j=t}var $t=null;function Gi(t){I!==null&&(I.f&2097152||I.f&2)&&($t??($t=new Set)).add(t)}var rt=null,st=0,vt=null;function Wo(t){vt=t}var Qi=1,ue=0,he=ue;function Kr(t){he=t}function Xi(){return++Qi}function tn(t){var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){for(var n=t.deps,r=n.length,i=0;i<r;i++){var l=n[i];if(tn(l)&&ki(l),l.wv>t.wv)return!0}e&512&&et===null&&q(t,pt)}return!1}function Zi(t,e,n=!0){var r=t.reactions;if(r!==null&&!(!Ce&&$t!==null&&$t.has(t)))for(var i=0;i<r.length;i++){var l=r[i];(l.f&2)!==0?Zi(l,e,!1):e===l&&(n?q(l,Mt):l.f&1024&&q(l,pe),Pi(l))}}function Ki(t){var e=rt,n=st,r=vt,i=I,l=$t,o=V,a=_t,u=he,f=t.f;rt=null,st=0,vt=null,I=(f&96)===0?t:null,$t=null,Se(t.ctx),_t=!1,he=++ue,t.ac!==null&&(Ie(()=>{t.ac.abort(Ye)}),t.ac=null);try{t.f|=Fr;var h=t.fn,d=h();t.f|=mr;var v=Yr(t);if(Ue()&&vt!==null&&!_t&&v!==null&&(t.f&6146)===0)for(var p=0;p<vt.length;p++)Zi(vt[p],t);if(i!==null&&i!==t){if(ue++,i.deps!==null)for(let m=0;m<n;m+=1)i.deps[m].rv=ue;if(e!==null)for(const m of e)m.rv=ue;vt!==null&&(r===null?r=vt:r.push(...vt))}return t.f&8388608&&(t.f^=wn),d}catch(m){return Yr(t),wo(m)}finally{t.f^=Fr,rt=e,st=n,vt=r,I=i,$t=l,Se(o),_t=a,he=u}}function Yr(t){var e=t.deps,n=x?.is_fork;if(rt!==null){var r;if(n||Ze(t,st),e!==null&&st>0)for(e.length=st+rt.length,r=0;r<rt.length;r++)e[st+r]=rt[r];else t.deps=e=rt;if(Sr()&&(t.f&512)!==0)for(r=st;r<e.length;r++){var i;((i=e[r]).reactions??(i.reactions=[])).push(t)}}else!n&&e!==null&&st<e.length&&(Ze(t,st),e.length=st);return e}function Eo(t,e){let n=e.reactions;if(n!==null){var r=Sl.call(n,t);if(r!==-1){var i=n.length-1;i===0?n=e.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(e.f&2)!==0&&(rt===null||!tr.call(rt,e))){var l=e;l.f&512&&(l.f^=512),l.v!==Q&&_r(l),l.ac!==null&&Ie(()=>{l.ac.abort(Ye),l.ac=null,q(l,Mt)}),ao(l),Ze(l,0)}}function Ze(t,e){var n=t.deps;if(n!==null)for(var r=e;r<n.length;r++)Eo(t,n[r])}function Pe(t){var e=t.f;if((e&16384)===0){q(t,pt);var n=j,r=pn;j=t,pn=(e&96)===0;try{(e&16777232)!==0?xo(t):Er(t),Bi(t);var i=Ki(t);t.teardown=typeof i=="function"?i:null,t.wv=Qi}finally{pn=r,j=n}}}async function Po(){if(Ce)return new Promise(t=>{requestAnimationFrame(()=>t()),setTimeout(()=>t())});await Promise.resolve(),Sn()}function c(t){var e=(t.f&2)!==0;if(So?.add(t),I!==null&&!_t&&!(j!==null&&(j.f&16384)!==0)&&($t===null||!$t.has(t))){var n=I.deps;if((I.f&2097152)!==0)t.rv<ue&&(t.rv=ue,rt===null&&n!==null&&n[st]===t?st++:rt===null?rt=[t]:rt.push(t));else{var r;(r=I).deps??(r.deps=[]),tr.call(I.deps,t)||I.deps.push(t);var i=t.reactions;i===null?t.reactions=[I]:tr.call(i,I)||i.push(I)}}if(Gt&&zt.has(t))return zt.get(t);if(e){var l=t;if(Gt){var o=l.v;return(!(l.f&1024)&&l.reactions!==null||Ui(l))&&(o=$r(l)),zt.set(l,o),o}var a=(l.f&512)===0&&!_t&&I!==null&&(pn||(I.f&512)!==0),u=(l.f&mr)===0;tn(l)&&(a&&(l.f|=512),ki(l)),a&&!u&&(xi(l),Yi(l))}if(et?.has(t))return et.get(t);if((t.f&8388608)!==0)throw t.v;return t.v}function Yi(t){if(t.f|=512,t.deps!==null)for(const e of t.deps)(e.reactions??(e.reactions=[])).push(t),e.f&2&&!(e.f&512)&&(xi(e),Yi(e))}function Ui(t){if(t.v===Q)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(zt.has(e)||(e.f&2)!==0&&Ui(e))return!0;return!1}function On(t){var e=_t;try{return _t=!0,t()}finally{_t=e}}var xe=Symbol("events"),tl=new Set,ur=new Set;function jo(t,e,n,r={}){function i(l){if(r.capture||fr.call(e,l),!l.cancelBubble)return Ie(()=>n?.call(this,l))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?(i.__removed=!1,Ot(()=>{i.__removed||e.addEventListener(t,i,r)})):e.addEventListener(t,i,r),i}function Co(t,e,n,r,i){var l={capture:r,passive:i},o=jo(t,e,n,l);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Hi(()=>{o.__removed=!0,e.removeEventListener(t,o,l)})}function ne(t,e,n){(e[xe]??(e[xe]={}))[t]=n}function Io(t){for(var e=0;e<t.length;e++)tl.add(t[e]);for(var n of ur)n(t)}var Fn=null,Bn=!1;function fr(t){var e=this,n=e.ownerDocument,r=t.type,i=t.composedPath?.()||[],l=i[0]||t.target;Fn=t,Bn||(Bn=!0,setTimeout(()=>{Bn=!1,Fn=null}));var o=0,a=Fn===t&&t[xe];if(a){var u=i.indexOf(a);if(u!==-1&&(e===document||e===window)){t[xe]=e;return}var f=i.indexOf(e);if(f===-1)return;u<=f&&(o=u)}if(l=i[o]||t.target,l!==e){Je(t,"currentTarget",{configurable:!0,get(){return l||n}});var h=I,d=j;mt(null),Dt(null);try{for(var v,p=[];l!==null&&l!==e;){try{var m=l[xe]?.[r];m!=null&&(!l.disabled||t.target===l)&&m.call(l,t)}catch(S){v?p.push(S):v=S}if(t.cancelBubble)break;o++,l=o<i.length?i[o]:null}if(v){for(let S of p)queueMicrotask(()=>{throw S});throw v}}finally{t[xe]=e,delete t.currentTarget,mt(h),Dt(d)}}}var Lo=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function zo(t){return Lo?.createHTML(t)??t}function el(t){var e=xr("template");return e.innerHTML=zo(t.replaceAll("<!>","<!---->")),e.content}function Jt(t,e){var n=j;n.nodes===null&&(n.nodes={start:t,end:e,a:null,t:null})}function nl(t,e){var n=(e&1)!==0,r=(e&2)!==0,i,l=!t.startsWith("<!>");return()=>{if(L)return Jt(T,null),T;i===void 0&&(i=el(l?t:"<!>"+t),n||(i=at(i)));var o=r||Ti?document.importNode(i,!0):i.cloneNode(!0);if(n){var a=at(o),u=o.lastChild;Jt(a,u)}else Jt(o,o);return o}}function To(t,e,n="svg"){var r=!t.startsWith("<!>"),i=(e&1)!==0,l=`<${n}>${r?t:"<!>"+t}</${n}>`,o;return()=>{if(L)return Jt(T,null),T;if(!o){var a=at(el(l));if(i)for(o=document.createDocumentFragment();at(a);)o.appendChild(at(a));else o=at(a)}var u=o.cloneNode(!0);if(i){var f=at(u),h=u.lastChild;Jt(f,h)}else Jt(u,u);return u}}function St(t,e){return To(t,e,"svg")}function Vn(){if(L)return Jt(T,null),T;var t=document.createDocumentFragment(),e=document.createComment(""),n=dt();return t.append(e,n),Jt(e,n),t}function Z(t,e){if(L){var n=j;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=T),Ln();return}t!==null&&t.before(e)}var Oo=["touchstart","touchmove"];function Do(t){return Oo.includes(t)}function No(t){let e=0,n=de(0),r;return()=>{Sr()&&(c(n),Tn(()=>(e===0&&(r=On(()=>t(()=>qe(n)))),e+=1,()=>{Ot(()=>{e-=1,e===0&&(r?.(),r=void 0,qe(n))})})))}}var Ao=wr|je;function Ho(t,e,n,r){new Ro(t,e,n,r)}var kt=new WeakMap,cr=new WeakMap,Lt=new WeakMap,Ke=new WeakMap,ut=new WeakMap,xt=new WeakMap,ft=new WeakMap,bt=new WeakMap,Yt=new WeakMap,be=new WeakMap,ve=new WeakMap,un=new WeakMap,hr=new WeakMap,vr=new WeakMap,re=new WeakMap,Ur=new WeakMap,X=new WeakSet,Ro=class{constructor(t,e,n,r){kr(this,X),H(this,"parent",void 0),H(this,"is_pending",!1),H(this,"transform_error",void 0),k(this,kt,void 0),k(this,cr,L?T:null),k(this,Lt,void 0),k(this,Ke,void 0),k(this,ut,void 0),k(this,xt,null),k(this,ft,null),k(this,bt,null),k(this,Yt,null),k(this,be,0),k(this,ve,0),k(this,un,!1),k(this,hr,new Set),k(this,vr,new Set),k(this,re,null),k(this,Ur,No(()=>(b(re,this,de(s(be,this))),()=>{b(re,this,null)}))),b(kt,this,t),b(Lt,this,e),b(Ke,this,i=>{var l=j;l.b=this,l.f|=128,n(i)}),this.parent=j.b,this.transform_error=r??this.parent?.transform_error??(i=>i),b(ut,this,Wr(()=>{if(L){const i=s(cr,this);Ln();const l=i.data==="[!";if(i.data.startsWith("[?")){const o=JSON.parse(i.data.slice(2));E(X,this,Bo).call(this,o)}else l?E(X,this,Vo).call(this):E(X,this,Fo).call(this)}else E(X,this,il).call(this)},Ao)),L&&b(kt,this,T)}defer_effect(t){_i(t,s(hr,this),s(vr,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!s(Lt,this).pending}update_pending_count(t,e){E(X,this,ll).call(this,t,e),b(be,this,s(be,this)+t),s(re,this)&&!s(un,this)&&(b(un,this,!0),Ot(()=>{b(un,this,!1),s(re,this)&&Ee(s(re,this),s(be,this))}))}get_effect_pending(){return s(Ur,this).call(this),c(s(re,this))}error(t){if(!s(Lt,this).onerror&&!s(Lt,this).failed)throw t;x?.is_fork?(s(xt,this)&&x.skip_effect(s(xt,this)),s(ft,this)&&x.skip_effect(s(ft,this)),s(bt,this)&&x.skip_effect(s(bt,this)),x.oncommit(()=>{E(X,this,ti).call(this,t)})):E(X,this,ti).call(this,t)}};function Fo(){try{b(xt,this,gt(()=>s(Ke,this).call(this,s(kt,this))))}catch(t){this.error(t)}}function Bo(t){const e=s(Lt,this).failed,{reset:n,invoke_onerror:r}=E(X,this,rl).call(this,t);Ot(r),e&&b(bt,this,gt(()=>{e(s(kt,this),()=>t,()=>n)}))}function rl(t){var e=!1,n=!1;const r=()=>{if(e){Hl();return}e=!0,n&&to(),s(bt,this)!==null&&me(s(bt,this),()=>{b(bt,this,null)}),E(X,this,jr).call(this,()=>{E(X,this,il).call(this)})};return{reset:r,invoke_onerror:()=>{try{n=!0,s(Lt,this).onerror?.(t,r),n=!1}catch(i){Tt(i,s(ut,this)&&s(ut,this).parent)}}}}function Vo(){const t=s(Lt,this).pending;t&&(this.is_pending=!0,b(ft,this,gt(()=>t(s(kt,this)))),Ot(()=>{var e=b(Yt,this,document.createDocumentFragment()),n=dt(),r=!1;if(e.append(n),b(xt,this,E(X,this,jr).call(this,()=>{try{return gt(()=>s(Ke,this).call(this,n))}catch(i){try{this.error(i),r=!0}catch(l){Tt(l,s(ut,this).parent)}return null}})),s(xt,this)===null){b(Yt,this,null),r&&E(X,this,Pn).call(this,x);return}s(ve,this)===0&&(s(kt,this).before(e),b(Yt,this,null),me(s(ft,this),()=>{b(ft,this,null)}),E(X,this,Pn).call(this,x))}))}function il(){try{if(this.is_pending=this.has_pending_snippet(),b(ve,this,0),b(be,this,0),b(xt,this,gt(()=>{s(Ke,this).call(this,s(kt,this))})),s(ve,this)>0){var t=b(Yt,this,document.createDocumentFragment());Pr(s(xt,this),t);const e=s(Lt,this).pending;b(ft,this,gt(()=>e(s(kt,this))))}else E(X,this,Pn).call(this,x)}catch(e){this.error(e)}}function Pn(t){this.is_pending=!1,t.transfer_effects(s(hr,this),s(vr,this))}function jr(t){var e=j,n=I,r=V;Dt(s(ut,this)),mt(s(ut,this)),Se(s(ut,this).ctx);try{return ge.ensure(),t()}finally{Dt(e),mt(n),Se(r)}}function ll(t,e){if(!this.has_pending_snippet()){if(this.parent){var n;E(X,n=this.parent,ll).call(n,t,e)}return}b(ve,this,s(ve,this)+t),s(ve,this)===0&&(E(X,this,Pn).call(this,e),s(ft,this)&&me(s(ft,this),()=>{b(ft,this,null)}),s(Yt,this)&&(s(kt,this).before(s(Yt,this)),b(Yt,this,null)))}function ti(t){s(xt,this)&&(nt(s(xt,this)),b(xt,this,null)),s(ft,this)&&(nt(s(ft,this)),b(ft,this,null)),s(bt,this)&&(nt(s(bt,this)),b(bt,this,null)),L&&(it(s(cr,this)),Rl(),it(yn()));let e=s(Lt,this).failed;const n=r=>{const{reset:i,invoke_onerror:l}=E(X,this,rl).call(this,r);l(),e&&b(bt,this,E(X,this,jr).call(this,()=>{try{return gt(()=>{var o=j;o.b=this,o.f|=128,e(s(kt,this),()=>r,()=>i)})}catch(o){return Tt(o,s(ut,this).parent),null}}))};Ot(()=>{var r;try{r=this.transform_error(t)}catch(i){Tt(i,s(ut,this)&&s(ut,this).parent);return}r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(n,i=>Tt(i,s(ut,this)&&s(ut,this).parent)):n(r)})}function ei(t,e){var n=e==null?"":typeof e=="object"?`${e}`:e;n!==(t[dn]??(t[dn]=t.nodeValue))&&(t[dn]=n,t.nodeValue=`${n}`)}function ol(t,e){return sl(t,e)}function qo(t,e){ar(),e.intro=e.intro??!1;const n=e.target,r=L,i=T;try{for(var l=at(n);l&&(l.nodeType!==8||l.data!=="[");)l=Nt(l);if(!l)throw Me;Vt(!0),it(l);const o=sl(t,{...e,anchor:l});return Vt(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
|
|
2
|
-
`).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==Me&&console.warn("Failed to hydrate: ",o),e.recover===!1&&Xl(),
|
|
3
|
-
\r\f \v\uFEFF`];function Yo(t,e,n){var r=t==null?"":""+t;if(e&&(r=r?r+" "+e:e),n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var l=i.length,o=0;(o=r.indexOf(i,o))>=0;){var a=o+l;(o===0||ri.includes(r[o-1]))&&(a===r.length||ri.includes(r[a]))?r=(o===0?"":r.substring(0,o))+r.substring(a+1):o=a}}return r===""?null:r}function ii(t,e=!1){var n=e?" !important;":";",r="";for(var i of Object.keys(t)){var l=t[i];l!=null&&l!==""&&(r+=" "+i+": "+l+n)}return r}function Gn(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Uo(t,e){if(e){var n="",r,i;if(Array.isArray(e)?(r=e[0],i=e[1]):r=e,t){t=String(t).replaceAll(/\/\*.*?\*\//g,"").trim();var l=!1,o=0,a=!1,u=[];r&&u.push(...Object.keys(r).map(Gn)),i&&u.push(...Object.keys(i).map(Gn));var f=0,h=-1;const S=t.length;for(var d=0;d<S;d++){var v=t[d];if(a?v==="/"&&t[d-1]==="*"&&(a=!1):l?l===v&&(l=!1):v==="/"&&t[d+1]==="*"?a=!0:v==='"'||v==="'"?l=v:v==="("?o++:v===")"&&o--,!a&&l===!1&&o===0){if(v===":"&&h===-1)h=d;else if(v===";"||d===S-1){if(h!==-1){var p=Gn(t.substring(f,h).trim());if(!u.includes(p)){v!==";"&&d++;var m=t.substring(f,d).trim();n+=" "+m+";"}}f=d+1,h=-1}}}}return r&&(n+=ii(r)),i&&(n+=ii(i,!0)),n=n.trim(),n===""?null:n}return t==null?null:String(t)}function li(t,e,n,r,i,l){var o=t[nr];if(L||o!==n||o===void 0){var a=Yo(n,r,l);(!L||a!==t.getAttribute("class"))&&(a==null?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a)),t[nr]=n}else if(l&&i!==l)for(var u in l){var f=!!l[u];(i==null||f!==!!i[u])&&t.classList.toggle(u,f)}return l}function Qn(t,e={},n,r){for(var i in n){var l=n[i];e[i]!==l&&(n[i]==null?t.style.removeProperty(i):t.style.setProperty(i,l,r))}}function ts(t,e,n,r){var i=t[rr];if(L||i!==e){var l=Uo(e,r);(!L||l!==t.getAttribute("style"))&&(l==null?t.removeAttribute("style"):t.style.cssText=l),t[rr]=e}else r&&(Array.isArray(r)?(Qn(t,n?.[0],r[0]),Qn(t,n?.[1],r[1],"important")):Qn(t,n,r));return r}var es=Symbol("is custom element"),ns=Symbol("is html"),rs=Nl?"link":"LINK";function is(t){if(L){var e=!1,n=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var r=t.value;z(t,"value",null),t.value=r}if(t.hasAttribute("checked")){var i=t.checked;z(t,"checked",null),t.checked=i}}};t[Be]=n,Ot(n),bi()}}function z(t,e,n,r){var i=ls(t);L&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName===rs)||i[e]!==(i[e]=n)&&(e==="loading"&&(t[Dl]=n),n==null?t.removeAttribute(e):typeof n!="string"&&os(t).has(e)?t[e]=n:t.setAttribute(e,n))}function ls(t){return t[er]??(t[er]={[es]:t.nodeName.includes("-"),[ns]:t.namespaceURI==="http://www.w3.org/1999/xhtml"})}var oi=new Map;function os(t){var e=t.getAttribute("is")||t.nodeName,n=oi.get(e);if(n)return n;oi.set(e,n=new Set);for(var r,i=t,l=Element.prototype;l!==i;){r=Wl(i);for(var o in r)r[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&n.add(o);i=fi(i)}return n}function ss(t,e,n=e){var r=new WeakSet;ro(t,"input",async i=>{var l=i?t.defaultValue:t.value;if(l=Xn(t)?Zn(l):l,n(l),x!==null&&r.add(x),await Po(),l!==(l=e())){var o=t.selectionStart,a=t.selectionEnd,u=t.value.length;if(t.value=l??"",a!==null){var f=t.value.length;o===a&&a===u&&f>u?(t.selectionStart=f,t.selectionEnd=f):(t.selectionStart=o,t.selectionEnd=Math.min(a,f))}}}),(L&&t.defaultValue!==t.value||On(e)==null&&t.value)&&(n(Xn(t)?Zn(t.value):t.value),x!==null&&r.add(x)),Tn(()=>{var i=e();if(t===document.activeElement){var l=Ce?bn:x;if(r.has(l))return}Xn(t)&&i===Zn(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}function Xn(t){var e=t.type;return e==="number"||e==="range"}function Zn(t){return t===""?null:+t}var al,$e=new WeakMap,jn=new WeakMap,Kn=new WeakMap,si=new WeakSet,ul=class{constructor(t){kr(this,si),k(this,$e,new WeakMap),k(this,jn,void 0),k(this,Kn,void 0),b(Kn,this,t)}observe(t,e){var n=s($e,this).get(t)||new Set;return n.add(e),s($e,this).set(t,n),E(si,this,as).call(this).observe(t,s(Kn,this)),()=>{var r=s($e,this).get(t);r.delete(e),r.size===0&&(s($e,this).delete(t),s(jn,this).unobserve(t))}}};al=ul;function as(){return s(jn,this)??b(jn,this,new ResizeObserver(t=>{for(var e of t){al.entries.set(e.target,e);for(var n of s($e,this).get(e.target)||[])n(e)}}))}H(ul,"entries",new WeakMap);function Yn(t,e){return t===e||t?.[Fe]===e}function Un(t=yr(),e,n,r){var i=V.r,l=j;return Fi(()=>{var o,a;return Tn(()=>{o=a,a=r?.()||[],On(()=>{Yn(n(...a),t)||(e(t,...a),o&&Yn(n(...o),t)&&e(null,...o))})}),()=>{let u=l;for(;u!==i&&u.parent!==null&&u.parent.f&33554432;)u=u.parent;const f=()=>{a&&Yn(n(...a),t)&&e(null,...a)},h=u.teardown;u.teardown=()=>{f(),h?.()}}}),t}var vn=!1;function us(t){var e=vn;try{return vn=!1,[t(),vn]}finally{vn=e}}function ai(t,e,n,r){var i=!zn||(n&2)!==0,l=(n&8)!==0,o=(n&16)!==0,a=r,u=!0,f=void 0,h=()=>o&&i?(f??(f=Qe(r)),c(f)):(u&&(u=!1,a=o?On(r):r),a);let d;if(l){var v=Fe in t||vi in t;d=fe(t,e)?.set??(v&&e in t?C=>t[e]=C:void 0)}var p,m=!1;l?[p,m]=us(()=>t[e]):p=t[e],p===void 0&&r!==void 0&&(p=h(),d&&(i&&Zl(e),d(p)));var S;if(i?S=()=>{var C=t[e];return C===void 0?h():(u=!0,C)}:S=()=>{var C=t[e];return C!==void 0&&(a=void 0),C===void 0?a:C},i&&(n&4)===0)return S;if(d){var g=t.$$legacy;return(function(C,K){return arguments.length>0?((!i||!K||g||m)&&d(K?S():C),C):S()})}var _=!1,R=((n&1)!==0?Qe:br)(()=>(_=!1,S()));l&&c(R);var N=j;return(function(C,K){if(arguments.length>0){const Y=K?c(R):i&&l?Kt(C):C;return M(R,Y),_=!0,a!==void 0&&(a=Y),C}return Gt&&_||(N.f&16384)!==0?R.v:c(R)})}function fs(t){return new cs(t)}var le=new WeakMap,jt=new WeakMap,cs=class{constructor(t){k(this,le,void 0),k(this,jt,void 0);var e=new Map,n=(i,l)=>{var o=Li(l,!1,!1);return e.set(i,o),o};const r=new Proxy({...t.props||{},$$events:{}},{get(i,l){return c(e.get(l)??n(l,Reflect.get(i,l)))},has(i,l){return l===vi?!0:(c(e.get(l)??n(l,Reflect.get(i,l))),Reflect.has(i,l))},set(i,l,o){return M(e.get(l)??n(l,o),o),Reflect.set(i,l,o)}});b(jt,this,(t.hydrate?qo:ol)(t.component,{target:t.target,anchor:t.anchor,props:r,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),(!t?.props?.$$host||t.sync===!1)&&Sn(),b(le,this,r.$$events);for(const i of Object.keys(s(jt,this)))i==="$set"||i==="$destroy"||i==="$on"||Je(this,i,{get(){return s(jt,this)[i]},set(l){s(jt,this)[i]=l},enumerable:!0});s(jt,this).$set=i=>{Object.assign(r,i)},s(jt,this).$destroy=()=>{Jo(s(jt,this))}}$set(t){s(jt,this).$set(t)}$on(t,e){s(le,this)[t]=s(le,this)[t]||[];const n=(...r)=>e.call(this,...r);return s(le,this)[t].push(n),()=>{s(le,this)[t]=s(le,this)[t].filter(r=>r!==n)}}$destroy(){s(jt,this).$destroy()}},fl;typeof HTMLElement=="function"&&(fl=class extends HTMLElement{constructor(t,e,n){super(),H(this,"$$ctor",void 0),H(this,"$$s",void 0),H(this,"$$c",void 0),H(this,"$$cn",!1),H(this,"$$d",{}),H(this,"$$r",!1),H(this,"$$p_d",{}),H(this,"$$l",{}),H(this,"$$l_u",new Map),H(this,"$$me",void 0),H(this,"$$shadowRoot",null),this.$$ctor=t,this.$$s=e,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(t,e,n){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const r=this.$$c.$on(t,e);this.$$l_u.set(e,r)}super.addEventListener(t,e,n)}removeEventListener(t,e,n){if(super.removeEventListener(t,e,n),this.$$c){const r=this.$$l_u.get(e);r&&(r(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(r){return i=>{const l=xr("slot");r!=="default"&&(l.name=r),Z(i,l)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},n=hs(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=t(r),e.default=!0):e[r]=t(r));for(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=gn(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=fs({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=bo(()=>{Tn(()=>{this.$$r=!0;for(const r of mn(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=gn(r,this.$$d[r],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,i)}this.$$r=!1})});for(const r in this.$$l)for(const i of this.$$l[r]){const l=this.$$c.$on(r,i);this.$$l_u.set(i,l)}this.$$l={}}}attributeChangedCallback(t,e,n){this.$$r||(t=this.$$g_p(t),this.$$d[t]=gn(t,n,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return mn(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function gn(t,e,n,r){const i=n[t]?.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!r||!n[t])return e;if(r==="toAttribute")switch(i){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function hs(t){const e={};return t.childNodes.forEach(n=>{e[n.slot||"default"]=!0}),e}function vs(t,e,n,r,i,l){let o=class extends fl{constructor(){super(t,n,i),this.$$p_d=e}static get observedAttributes(){return mn(e).map(a=>(e[a].attribute||a).toLowerCase())}};return mn(e).forEach(a=>{Je(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(u){u=gn(a,u,e),this.$$d[a]=u;var f=this.$$c;f&&(fe(f,a)?.get?f[a]=u:f.$set({[a]:u}))}})}),r.forEach(a=>{Je(o.prototype,a,{get(){return this.$$c?.[a]}})}),l&&(o=l(o)),t.element=o,o}var ds=St('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path></svg>'),ps=St('<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'),gs=St('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>'),ms=St('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>'),ws=nl('<button type="button"><span class="pie-tool-graph__tool-icon svelte-v3lao1" aria-hidden="true"><!></span> <span class="pie-tool-graph__tool-label svelte-v3lao1"> </span></button>'),ys=St('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-v3lao1"></line>'),_s=St('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-v3lao1"></line>'),bs=St('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-v3lao1"></line>'),$s=St('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-v3lao1"></line>'),ks=St('<line class="pie-tool-graph__user-line svelte-v3lao1"></line>'),xs=St('<circle r="2" role="button" tabindex="0"></circle>'),Ms=St('<line class="pie-tool-graph__temp-line svelte-v3lao1"></line>'),Ss=nl('<div class="pie-tool-graph svelte-v3lao1" role="dialog" tabindex="-1"><div class="pie-tool-graph__toolbar svelte-v3lao1"><div class="pie-tool-graph__tool-buttons svelte-v3lao1"></div> <div class="pie-tool-graph__transparency-control svelte-v3lao1"><label for="grid-opacity" class="svelte-v3lao1"> </label> <input type="range" id="grid-opacity" min="0" max="1" step="0.1" class="svelte-v3lao1"/></div></div> <div class="pie-tool-graph__canvas-wrapper svelte-v3lao1" role="img" tabindex="0"><svg class="pie-tool-graph__canvas svelte-v3lao1" preserveAspectRatio="xMinYMin meet" aria-hidden="true"><g class="pie-tool-graph__grid-lines" aria-hidden="true"><!><!><!><!></g><g class="pie-tool-graph__lines"></g><g class="pie-tool-graph__points"></g><!></svg></div></div>'),Ws={hash:"svelte-v3lao1",code:`.pie-tool-graph.svelte-v3lao1 {position:relative;background:var(--pie-background, #fff);color:var(--pie-text, #111827);width:100%;height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column;}
|
|
1
|
+
import{m as kl,r as xl}from"./tool-host-contract-b93b482c.js";import{i as Ml}from"./provider-4c704118.js";if(typeof window<"u"){var Nn,An;((Nn=(An=window).__svelte??(An.__svelte={})).v??(Nn.v=new Set)).add("5")}var Me={},Q=Symbol("uninitialized"),ui=Array.isArray,Sl=Array.prototype.indexOf,Ur=Array.prototype.includes,jr=Array.from,gr=Object.keys,Je=Object.defineProperty,fe=Object.getOwnPropertyDescriptor,Wl=Object.getOwnPropertyDescriptors,El=Object.prototype,Pl=Array.prototype,fi=Object.getPrototypeOf,Hn=Object.isExtensible,jl=()=>{};function Cl(t){for(var e=0;e<t.length;e++)t[e]()}function ci(){var t,e;return{promise:new Promise((r,n)=>{t=r,e=n}),resolve:t,reject:e}}function Ge(t){"@babel/helpers - typeof";return Ge=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ge(t)}function Il(t,e){if(Ge(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Ge(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ll(t){var e=Il(t,"string");return Ge(e)=="symbol"?e:e+""}function H(t,e,r){return(e=Ll(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var pt=1024,Mt=2048,pe=4096,gn=8192,zl=16384,mn=32768,Rn=1<<25,wn=65536,je=1<<19,Tl=1<<20,Re=1<<25,Fn=1<<21,Ol=1<<22,mr=1<<23,Fe=Symbol("$state"),hi=Symbol("component"),vi=Symbol("legacy props"),Dl=Symbol(""),tn=Symbol("attributes"),en=Symbol("class"),rn=Symbol("style"),vr=Symbol("text"),Be=Symbol("form reset"),Ye=new class extends Error{constructor(...t){super(...t),H(this,"name","StaleReactionError"),H(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Nl=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Al(){console.warn("https://svelte.dev/e/derived_inert")}function Cr(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function Hl(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var L=!1;function Vt(t){L=t}var T;function it(t){if(t===null)throw Cr(),Me;return T=t}function Ir(){return it(Nt(T))}function ht(t){if(L){if(Nt(T)!==null)throw Cr(),Me;T=t}}function Rl(t=1){if(L){for(var e=t,r=T;e--;)r=Nt(r);T=r}}function wr(t=!0){for(var e=0,r=T;;){if(r.nodeType===8){var n=r.data;if(n==="]"){if(e===0)return r;e-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(e+=1)}var i=Nt(r);t&&r.remove(),r=i}}function di(t){if(!t||t.nodeType!==8)throw Cr(),Me;return t.data}function pi(t){return t===this.v}function Fl(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function gi(t){return!Fl(t,this.v)}function Bl(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Vl(t,e,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function ql(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Jl(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Gl(t){throw new Error("https://svelte.dev/e/effect_orphan")}function Ql(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Xl(){throw new Error("https://svelte.dev/e/hydration_failed")}function Zl(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function Kl(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Yl(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ul(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function to(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var Ce=!1,Lr=!1,V=null;function Se(t){V=t}function mi(t,e=!1,r){V={p:V,i:!1,c:null,e:null,s:t,x:null,r:j,l:Lr&&!e?{s:null,u:null,$:[]}:null}}function wi(t){var e=V,r=e.e;if(r!==null){e.e=null;for(var n of r)Ri(n)}return t!==void 0&&(e.x=t),e.i=!0,V=e.p,yn(t)}function yn(t={}){return Je(t,hi,{value:!0}),t}function Ue(){return!Lr||V!==null&&V.l===null}var ae=[];function yi(){var t=ae;ae=[],Cl(t)}function Ot(t){if(ae.length===0&&!Ve){var e=ae;queueMicrotask(()=>{e===ae&&yi()})}ae.push(t)}function eo(){for(;ae.length>0;)yi()}var ro=~(Mt|pe|pt);function q(t,e){t.f=t.f&ro|e}function _n(t){(t.f&512)!==0||t.deps===null?q(t,pt):q(t,pe)}function _i(t,e,r){(t.f&2048)!==0?e.add(t):t.f&4096&&r.add(t),q(t,pt)}var Bn=!1;function bi(){Bn||(Bn=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e[Be]?.()})},{capture:!0}))}function Ie(t){var e=I,r=j;mt(null),Dt(null);try{return t()}finally{mt(e),Dt(r)}}function no(t,e,r,n=r){t.addEventListener(e,()=>Ie(r));const i=t[Be];i?t[Be]=()=>{i(),n(!0)}:t[Be]=()=>n(!0),bi()}function io(t,e,r,n){const i=Ue()?Qe:bn;var l=t.filter(p=>!p.settled),o=e.map(i);if(r.length===0&&l.length===0){n(o);return}var a=j,u=lo(),f=l.length===1?l[0].promise:l.length>1?Promise.all(l.map(p=>p.promise)):null;function h(p){if((a.f&16384)===0){u();try{n([...o,...p])}catch(m){Tt(m,a)}yr()}}var d=$i();if(r.length===0){f.then(()=>h([])).finally(d);return}function v(){Promise.all(r.map(p=>oo(p))).then(h).catch(p=>Tt(p,a)).finally(d)}f?f.then(()=>{u(),v(),yr()}):v()}function lo(){var t=j,e=I,r=V,n=x;return function(i=!0){Dt(t),mt(e),Se(r),i&&!(t.f&16384)&&(n?.activate(),n?.apply())}}function yr(t=!0){Dt(null),mt(null),Se(null),t&&x?.deactivate()}function $i(){var t=j,e=t.b,r=x,n=!!e?.is_rendered();return e?.update_pending_count(1,r),r.increment(n,t),()=>{e?.update_pending_count(-1,r),r.decrement(n,t)}}function Qe(t){var e=2|Mt;return j!==null&&(j.f|=je),{ctx:V,deps:null,effects:null,equals:pi,f:e,fn:t,reactions:null,rv:0,v:Q,wv:0,parent:j,ac:null}}var Ne=Symbol("obsolete");function oo(t,e,r){let n=j;n===null&&Bl();var i=void 0,l=de(Q),o=!I,a=new Set;return ko(()=>{var u=j,f=ci();i=f.promise;try{Promise.resolve(t()).then(f.resolve,p=>{p!==Ye&&f.reject(p)}).finally(yr)}catch(p){f.reject(p),yr()}var h=x;if(o){if((u.f&32768)!==0)var d=$i();if(n.b?.is_rendered())h.async_deriveds.get(u)?.reject(Ne);else for(const p of a.values())p.reject(Ne);a.add(f),h.async_deriveds.set(u,f)}const v=(p,m=void 0)=>{d?.(),a.delete(f),m!==Ne&&(h.activate(),m?(l.f|=mr,Ee(l,m)):(l.f&8388608&&(l.f^=mr),Ee(l,p)),h.deactivate())};f.promise.then(v,p=>v(null,p||"unknown"))}),Hi(()=>{for(const u of a)u.reject(Ne)}),new Promise(u=>{function f(h){function d(){h===i?u(l):f(i)}h.then(d,d)}f(i)})}function ee(t){const e=Qe(t);return Gi(e),e}function bn(t){const e=Qe(t);return e.equals=gi,e}function so(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)rt(e[r])}}function $n(t){var e,r=j,n=t.parent;if(!Gt&&n!==null&&t.v!==Q&&(n.f&24576)!==0)return Al(),t.v;Dt(n);try{so(t),e=Ki(t)}finally{Dt(r)}return e}function ki(t){var e=$n(t);if(!t.equals(e)&&(t.wv=Xi(),(!x?.is_fork||t.deps===null)&&(x!==null?(x.capture(t,e,!0),_r?.capture(t,e,!0)):t.v=e,t.deps===null))){q(t,pt);return}Gt||(et!==null?(Sn()||x?.is_fork)&&et.set(t,e):_n(t))}function ao(t){if(t.effects!==null)for(const e of t.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac!==null&&Ie(()=>{e.ac.abort(Ye),e.ac=null}),e.fn!==null&&(e.teardown=jl),Ze(e,0),En(e))}function xi(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&e.fn!==null&&Pe(e)}function Mi(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function kn(t,e){Mi(t,e),e.add(t)}function k(t,e,r){Mi(t,e),e.set(t,r)}function E(t,e,r){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:r;throw new TypeError("Private element is not present on this object")}function b(t,e,r){return t.set(E(t,e),r),r}function s(t,e){return t.get(E(t,e))}var Si,nn=null,ye=null,x=null,_r=null,et=null,ln=null,Ve=!1,Nr=!1,Xe=null,br=null,Wi=0,uo=1,on=new WeakMap,ce=new WeakMap,ke=new WeakMap,$r=new WeakMap,lr=new WeakMap,_e=new WeakMap,oe=new WeakMap,Ae=new WeakMap,It=new WeakMap,Vn=new WeakMap,We=new WeakMap,qt=new WeakMap,Zt=new WeakMap,Ar=new WeakMap,or=new WeakMap,G=new WeakSet,ge=class Ei{constructor(){kn(this,G),H(this,"id",uo++),k(this,on,!1),H(this,"linked",!0),k(this,ce,null),k(this,ke,null),H(this,"async_deriveds",new Map),H(this,"current",new Map),H(this,"previous",new Map),k(this,$r,new Set),k(this,lr,new Set),k(this,_e,0),k(this,oe,new Map),k(this,Ae,null),k(this,It,[]),k(this,Vn,[]),k(this,We,new Set),k(this,qt,new Set),k(this,Zt,new Map),k(this,Ar,new Set),H(this,"is_fork",!1),k(this,or,!1),ye===null?nn=ye=this:(b(ke,ye,this),b(ce,this,ye)),ye=this}skip_effect(e){s(Zt,this).has(e)||s(Zt,this).set(e,{d:[],m:[]}),s(Ar,this).delete(e)}unskip_effect(e,r=n=>this.schedule(n)){var n=s(Zt,this).get(e);if(n){s(Zt,this).delete(e);for(var i of n.d)q(i,Mt),r(i);for(i of n.m)q(i,pe),r(i)}s(Ar,this).add(e)}capture(e,r,n=!1){e.v!==Q&&!this.previous.has(e)&&this.previous.set(e,e.v),!(e.f&8388608)&&(this.current.set(e,[r,n]),et?.set(e,r)),this.is_fork||(e.v=r)}activate(){x=this}deactivate(){x=null,et=null}flush(){try{Nr=!0,x=this,E(G,this,kr).call(this)}finally{Wi=0,ln=null,Xe=null,br=null,Nr=!1,x=null,et=null,zt.clear()}}discard(){for(const e of s(lr,this))e(this);s(lr,this).clear();for(const e of this.async_deriveds.values())e.reject(Ne);E(G,this,xr).call(this),s(Ae,this)?.resolve()}register_created_effect(e){s(Vn,this).push(e)}increment(e,r){if(b(_e,this,s(_e,this)+1),e){let n=s(oe,this).get(r)??0;s(oe,this).set(r,n+1)}}decrement(e,r){if(b(_e,this,s(_e,this)-1),e){let n=s(oe,this).get(r)??0;n===1?s(oe,this).delete(r):s(oe,this).set(r,n-1)}s(or,this)||(b(or,this,!0),Ot(()=>{b(or,this,!1),this.linked&&this.flush()}))}transfer_effects(e,r){for(const n of e)s(We,this).add(n);for(const n of r)s(qt,this).add(n);e.clear(),r.clear()}oncommit(e){s($r,this).add(e)}ondiscard(e){s(lr,this).add(e)}settled(){return(s(Ae,this)??b(Ae,this,ci())).promise}static ensure(){if(x===null){const e=x=new Ei;!Nr&&!Ve&&Ot(()=>{s(on,e)||e.flush()})}return x}apply(){if(!Ce||!this.is_fork&&s(ce,this)===null&&s(ke,this)===null){et=null;return}et=new Map;for(const[r,[n]]of this.current)et.set(r,n);for(let r=nn;r!==null;r=s(ke,r))if(!(r===this||r.is_fork)){var e=!1;if(r.id<this.id){for(const[n,[,i]]of r.current)if(!i&&this.current.has(n)){e=!0;break}}if(!e)for(const[n,i]of r.previous)et.has(n)||et.set(n,i)}}schedule(e){if(ln=e,e.b?.is_pending&&(e.f&16777228)!==0&&(e.f&32768)===0){e.b.defer_effect(e);return}s(It,this).push(e)}};Si=ge;function qn(){if(this.is_fork)return!0;for(const r of s(oe,this).keys()){for(var t=r,e=!1;t.parent!==null;){if(s(Zt,this).has(t)){e=!0;break}t=t.parent}if(!e)return!0}return!1}function fo(){var t=[];for(const i of s(It,this))if(!((i.f&16384)!==0||(i.f&6144)===0)){for(var e=i,r=!1;e.parent!==null;){e=e.parent;var n=e.f;if((n&96)!==0){if((n&1024)===0){r=!0;break}e.f^=pt}}r||t.push(e)}return b(It,this,[]),t}function kr(){b(on,this,!0);for(const o of s(We,this))s(qt,this).delete(o),q(o,Mt),this.schedule(o);for(const o of s(qt,this))q(o,pe),this.schedule(o);this.apply();for(var t=Xe=[],e=[],r=br=[];s(It,this).length>0;){Wi++>1e3&&(E(G,this,xr).call(this),po());for(const o of E(G,this,fo).call(this))try{E(G,this,co).call(this,o,t,e)}catch(a){throw Ci(o),E(G,this,qn).call(this)||this.discard(),a}}if(x=null,r.length>0){var n=Si.ensure();for(const o of r)n.schedule(o)}if(Xe=null,br=null,E(G,this,qn).call(this)){E(G,this,sr).call(this,e),E(G,this,sr).call(this,t);for(const[o,a]of s(Zt,this))ji(o,a);r.length>0&&E(G,x,kr).call(x);return}const i=E(G,this,ho).call(this);if(i){E(G,this,sr).call(this,e),E(G,this,sr).call(this,t),E(G,i,vo).call(i,this);return}s(We,this).clear(),s(qt,this).clear();for(const o of s($r,this))o(this);s($r,this).clear(),_r=this,Jn(e),Jn(t),_r=null,s(Ae,this)?.resolve();var l=x;if(s(_e,this)===0&&(s(It,this).length===0||l!==null)&&E(G,this,xr).call(this),s(It,this).length>0)if(l!==null){for(const o of s(It,this))s(It,l).push(o);b(It,this,[])}else l=this;l!==null&&(zt.clear(),E(G,l,kr).call(l))}function co(t,e,r){t.f^=pt;for(var n=t.first;n!==null;){var i=n.f,l=(i&96)!==0;if(!(l&&(i&1024)!==0||(i&8192)!==0||s(Zt,this).has(n))&&n.fn!==null){l?n.f^=pt:(i&4)!==0?e.push(n):Ce&&(i&16777224)!==0?r.push(n):tr(n)&&(i&16&&s(qt,this).add(n),Pe(n));var o=n.first;if(o!==null){n=o;continue}}for(;n!==null;){var a=n.next;if(a!==null){n=a;break}n=n.parent}}}function ho(){for(var t=s(ce,this);t!==null;){if(!t.is_fork){for(const[e,[,r]]of this.current)if(t.current.has(e)&&!r)return t}t=s(ce,t)}return null}function vo(t){for(const[r,n]of t.current)!this.previous.has(r)&&t.previous.has(r)&&this.previous.set(r,t.previous.get(r)),this.current.set(r,n);for(const[r,n]of t.async_deriveds){const i=this.async_deriveds.get(r);i&&n.promise.then(i.resolve).catch(i.reject)}t.async_deriveds.clear(),this.transfer_effects(s(We,t),s(qt,t));const e=r=>{var n=r.reactions;if(n!==null&&!((r.f&2)!==0&&(r.f&6144)===0))for(const o of n){var i=o.f;if((i&2)!==0)e(o);else{var l=o;i&4194320&&!this.async_deriveds.has(l)&&(s(qt,this).delete(l),q(l,Mt),this.schedule(l))}}};for(const r of this.current.keys())e(r);this.oncommit(()=>t.discard()),E(G,t,xr).call(t),x=this,E(G,this,kr).call(this)}function sr(t){for(var e=0;e<t.length;e+=1)_i(t[e],s(We,this),s(qt,this))}function xr(){if(this.linked){var t=s(ce,this),e=s(ke,this);t===null?nn=e:b(ke,t,e),e===null?ye=t:b(ce,e,t),this.linked=!1}}function Mr(t){var e=Ve;Ve=!0;try{var r;for(t&&(x!==null&&!x.is_fork&&x.flush(),r=t());;){if(eo(),x===null)return r;x.flush()}}finally{Ve=e}}function po(){try{Ql()}catch(t){Tt(t,ln)}}var Ct=null;function Jn(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&24576)===0&&tr(n)&&(Ct=new Set,Pe(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&Vi(n),Ct?.size>0)){zt.clear();for(const i of Ct){if((i.f&24576)!==0)continue;const l=[i];let o=i.parent;for(;o!==null;)Ct.has(o)&&(Ct.delete(o),l.push(o)),o=o.parent;for(let a=l.length-1;a>=0;a--){const u=l[a];!(u.f&24576)&&Pe(u)}}Ct.clear()}}Ct=null}}function Pi(t){x.schedule(t)}function ji(t,e){if(!((t.f&32)!==0&&(t.f&1024)!==0)){(t.f&2048)!==0?e.d.push(t):t.f&4096&&e.m.push(t),q(t,pt);for(var r=t.first;r!==null;)ji(r,e),r=r.next}}function Ci(t){q(t,pt);for(var e=t.first;e!==null;)Ci(e),e=e.next}var Sr=new Set,zt=new Map,Ii=!1;function de(t,e){return{f:0,v:t,reactions:null,equals:pi,rv:0,wv:0}}function F(t,e){const r=de(t,e);return Gi(r),r}function Li(t,e=!1,r=!0){const n=de(t);if(e||(n.equals=gi),Lr&&r&&V!==null&&V.l!==null){var i;((i=V.l).s??(i.s=[])).push(n)}return n}function M(t,e,r=!1){return I!==null&&(!_t||I.f&131072)&&Ue()&&I.f&4325394&&($t===null||!$t.has(t))&&Ul(),Ee(t,r?Kt(e):e,br)}var se=null,sn=0;function Ee(t,e,r=null){if(!t.equals(e)){Gt?zt.set(t,e):zt.has(t)||zt.set(t,t.v);var n=ge.ensure();if(n.capture(t,e),(t.f&2)!==0){const i=t;t.f&2048&&$n(i),et===null&&_n(i)}t.wv=Xi(),se=null,sn=0,zi(t,Mt,r),se=null,Ue()&&j!==null&&j.f&1024&&!(j.f&96)&&(vt===null?Wo([t]):vt.push(t)),!n.is_fork&&Sr.size>0&&!Ii&&go()}return e}function go(){Ii=!1;for(const t of Sr){t.f&1024&&q(t,pe);let e;try{e=tr(t)}catch{e=!0}e&&Pe(t)}Sr.clear()}function mo(t,e=1){var r=c(t),n=e===1?r++:r--;return M(t,r),n}function qe(t){M(t,t.v+1)}function zi(t,e,r){var n=t.reactions;if(n!==null){var i=Ue(),l=n.length;if(sn+=l,sn>1e5&&se===null&&(se=new Set),se!==null){if(se.has(t))return;se.add(t)}for(var o=0;o<l;o++){var a=n[o],u=a.f;if(!(!i&&a===j)){var f=(u&Mt)===0;if(f&&q(a,e),(u&131072)!==0)Sr.add(a);else if((u&2)!==0){var h=a;et?.delete(h),zi(h,pe,r)}else if(f){var d=a;u&16&&Ct!==null&&Ct.add(d),r!==null?r.push(d):Pi(d)}}}}}function Kt(t){if(typeof t!="object"||t===null||Fe in t||hi in t)return t;const e=fi(t);if(e!==El&&e!==Pl)return t;var r=new Map,n=ui(t),i=F(0),l=null,o=he,a=u=>{if(he===o)return u();var f=I,h=he;mt(null),Kn(o);var d=u();return mt(f),Kn(h),d};return n&&r.set("length",F(t.length,l)),new Proxy(t,{defineProperty(u,f,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&Kl();var d=r.get(f);return d===void 0?a(()=>{var v=F(h.value,l);return r.set(f,v),v}):M(d,h.value,!0),!0},deleteProperty(u,f){var h=r.get(f);if(h===void 0){if(f in u){const d=a(()=>F(Q,l));r.set(f,d),qe(i)}}else M(h,Q),qe(i);return!0},get(u,f,h){if(f===Fe)return t;var d=r.get(f),v=f in u;if(d===void 0&&(!v||fe(u,f)?.writable)&&(d=a(()=>F(Kt(v?u[f]:Q),l)),r.set(f,d)),d!==void 0){var p=c(d);return p===Q?void 0:p}return Reflect.get(u,f,h)},getOwnPropertyDescriptor(u,f){this.has?.(u,f);var h=Reflect.getOwnPropertyDescriptor(u,f),d=r.get(f);if(d!==void 0){var v=c(d);if(v===Q)return;if(h&&"value"in h)h.value=v;else return{enumerable:!0,configurable:!0,value:v,writable:!0}}return h},has(u,f){if(f===Fe)return!0;var h=r.get(f),d=h!==void 0&&h.v!==Q||Reflect.has(u,f);return(h!==void 0||j!==null&&(!d||fe(u,f)?.writable))&&(h===void 0&&(h=a(()=>F(d?Kt(u[f]):Q,l)),r.set(f,h)),c(h)===Q)?!1:d},set(u,f,h,d){var v=r.get(f),p=f in u;if(n&&f==="length")for(var m=h;m<v.v;m+=1){var S=r.get(m+"");S!==void 0?M(S,Q):m in u&&(S=a(()=>F(Q,l)),r.set(m+"",S))}if(v===void 0)(!p||fe(u,f)?.writable)&&(v=a(()=>F(void 0,l)),M(v,Kt(h)),r.set(f,v));else{p=v.v!==Q;var g=a(()=>Kt(h));M(v,g)}var _=Reflect.getOwnPropertyDescriptor(u,f);if(_?.set&&_.set.call(d,h),!p){if(n&&typeof f=="string"){var R=r.get("length"),N=Number(f);Number.isInteger(N)&&N>=R.v&&M(R,N+1)}qe(i)}return!0},ownKeys(u){c(i);var f=Reflect.ownKeys(u).filter(v=>{var p=r.get(v);return p===void 0||p.v!==Q});for(var[h,d]of r)d.v!==Q&&!(h in u)&&f.push(h);return f},setPrototypeOf(){Yl()}})}var Gn,Ti,Oi,Di;function an(){if(Gn===void 0){Gn=window,Ti=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;Oi=fe(e,"firstChild").get,Di=fe(e,"nextSibling").get,Hn(t)&&(t[en]=void 0,t[tn]=null,t[rn]=void 0,t.__e=void 0),Hn(r)&&(r[vr]=void 0)}}function dt(t=""){return document.createTextNode(t)}function at(t){return Oi.call(t)}function Nt(t){return Di.call(t)}function Bt(t,e){if(!L)return at(t);var r=at(T);if(r===null)r=T.appendChild(dt());else if(e&&r.nodeType!==3){var n=dt();return r?.before(n),it(n),n}return e&&Mn(r),it(r),r}function Hr(t,e=!1){if(!L){var r=at(t);return r instanceof Comment&&r.data===""?Nt(r):r}if(e){if(T?.nodeType!==3){var n=dt();return T?.before(n),it(n),n}Mn(T)}return T}function Qn(t,e=!1){if(!L)return at(t);var r=Bt(t,e);return ht(t),r}function Pt(t,e=1,r=!1){let n=L?T:t;for(var i;e--;)i=n,n=Nt(n);if(!L)return n;if(r){if(n?.nodeType!==3){var l=dt();return n===null?i?.after(l):n.before(l),it(l),l}Mn(n)}return it(n),n}function Ni(t){t.textContent=""}function Ai(){return!Ce||Ct!==null?!1:(j.f&mn)!==0}function xn(t,e,r){return e==null||e==="http://www.w3.org/1999/xhtml"?r?document.createElement(t,{is:r}):document.createElement(t):r?document.createElementNS(e,t,{is:r}):document.createElementNS(e,t)}function Mn(t){if(t.nodeValue.length<65536)return;let e=t.nextSibling;for(;e!==null&&e.nodeType===3;)e.remove(),t.nodeValue+=e.nodeValue,e=t.nextSibling}function wo(t){var e=j;if(e===null)return I.f|=mr,t;if((e.f&32768)===0&&(e.f&4)===0)throw t;Tt(t,e)}function Tt(t,e){if(!(e!==null&&(e.f&16384)!==0)){for(;e!==null;){if((e.f&128)!==0&&(e.f&33570816)===0){if((e.f&32768)===0)throw t;try{e.b.error(t);return}catch(r){t=r}}e=e.parent}throw t}}function yo(t){j===null&&(I===null&&Gl(t),Jl()),Gt&&ql(t)}function _o(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function At(t,e){var r=j;r!==null&&r.f&8192&&(t|=gn);var n={ctx:V,deps:null,nodes:null,f:t|Mt|512,first:null,fn:e,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};x?.register_created_effect(n);var i=n;if((t&4)!==0)Xe!==null?Xe.push(n):ge.ensure().schedule(n);else if(e!==null){try{Pe(n)}catch(o){throw rt(n),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,t&16&&t&65536&&i!==null&&(i.f|=wn))}if(i!==null&&(i.parent=r,r!==null&&_o(i,r),I!==null&&(I.f&2)!==0&&(t&64)===0)){var l=I;(l.effects??(l.effects=[])).push(i)}return n}function Sn(){return I!==null&&!_t}function Hi(t){const e=At(8,null);return q(e,pt),e.teardown=t,e}function Xn(t){yo("$effect");var e=j.f;if(!I&&(e&32)!==0&&V!==null&&!V.i){var r=V;(r.e??(r.e=[])).push(t)}else return Ri(t)}function Ri(t){return At(4|Tl,t)}function bo(t){ge.ensure();const e=At(64|je,t);return()=>{rt(e)}}function $o(t){ge.ensure();const e=At(64|je,t);return(r={})=>new Promise(n=>{r.outro?me(e,()=>{rt(e),n(void 0)}):(rt(e),n(void 0))})}function Fi(t){return At(4,t)}function ko(t){return At(Ol|je,t)}function zr(t,e=0){return At(8|e,t)}function Rt(t,e=[],r=[],n=[]){io(n,e,r,i=>{At(8,()=>{t(...i.map(c))})})}function Wn(t,e=0){return At(16|e,t)}function gt(t){return At(32|je,t)}function Bi(t){var e=t.teardown;if(e!==null){const r=Gt,n=I;Zn(!0),mt(null);try{e.call(null)}catch(i){Tt(i,t.parent)}finally{Zn(r),mt(n)}}}function En(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&Ie(()=>{i.abort(Ye)});var n=r.next;(r.f&64)!==0?r.parent=null:rt(r,e),r=n}}function xo(t){for(var e=t.first;e!==null;){var r=e.next;!(e.f&32)&&rt(e),e=r}}function rt(t,e=!0){var r=!1;(e||t.f&262144)&&t.nodes!==null&&t.nodes.end!==null&&(Mo(t.nodes.start,t.nodes.end),r=!0),t.f|=Rn,En(t,e&&!r),Ze(t,0);var n=t.nodes&&t.nodes.t;if(n!==null)for(const l of n)l.stop();Bi(t),t.f^=Rn,t.f|=zl;var i=t.parent;i!==null&&i.first!==null&&Vi(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function Mo(t,e){for(;t!==null;){var r=t===e?null:Nt(t);t.remove(),t=r}}function Vi(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function me(t,e,r=!0){var n=[];t.f|=256,qi(t,n,!0);var i=()=>{r&&rt(t),e&&e()},l=n.length;if(l>0){var o=()=>--l||i();for(var a of n)a.out(o)}else i()}function qi(t,e,r){if((t.f&8192)===0){t.f^=gn;var n=t.nodes&&t.nodes.t;if(n!==null)for(const a of n)(a.is_global||r)&&e.push(a);for(var i=t.first;i!==null;){var l=i.next;if((i.f&64)===0){var o=(i.f&65536)!==0||(i.f&32)!==0&&(t.f&16)!==0;qi(i,e,o?r:!1)}i=l}}}function Wr(t){t.f&=-257,Ji(t,!0)}function Ji(t,e){if((t.f&256)===0&&(t.f&8192)!==0){t.f^=gn,!(t.f&1024)&&(q(t,Mt),ge.ensure().schedule(t));for(var r=t.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;Ji(r,i?e:!1),r=n}var l=t.nodes&&t.nodes.t;if(l!==null)for(const o of l)(o.is_global||e)&&o.in()}}function Pn(t,e){if(t.nodes)for(var r=t.nodes.start,n=t.nodes.end;r!==null;){var i=r===n?null:Nt(r);e.append(r),r=i}}var So=null,dr=!1,Gt=!1;function Zn(t){Gt=t}var I=null,_t=!1;function mt(t){I=t}var j=null;function Dt(t){j=t}var $t=null;function Gi(t){I!==null&&(I.f&2097152||I.f&2)&&($t??($t=new Set)).add(t)}var nt=null,st=0,vt=null;function Wo(t){vt=t}var Qi=1,ue=0,he=ue;function Kn(t){he=t}function Xi(){return++Qi}function tr(t){var e=t.f;if((e&2048)!==0)return!0;if((e&4096)!==0){for(var r=t.deps,n=r.length,i=0;i<n;i++){var l=r[i];if(tr(l)&&ki(l),l.wv>t.wv)return!0}e&512&&et===null&&q(t,pt)}return!1}function Zi(t,e,r=!0){var n=t.reactions;if(n!==null&&!(!Ce&&$t!==null&&$t.has(t)))for(var i=0;i<n.length;i++){var l=n[i];(l.f&2)!==0?Zi(l,e,!1):e===l&&(r?q(l,Mt):l.f&1024&&q(l,pe),Pi(l))}}function Ki(t){var e=nt,r=st,n=vt,i=I,l=$t,o=V,a=_t,u=he,f=t.f;nt=null,st=0,vt=null,I=(f&96)===0?t:null,$t=null,Se(t.ctx),_t=!1,he=++ue,t.ac!==null&&(Ie(()=>{t.ac.abort(Ye)}),t.ac=null);try{t.f|=Fn;var h=t.fn,d=h();t.f|=mn;var v=Yn(t);if(Ue()&&vt!==null&&!_t&&v!==null&&(t.f&6146)===0)for(var p=0;p<vt.length;p++)Zi(vt[p],t);if(i!==null&&i!==t){if(ue++,i.deps!==null)for(let m=0;m<r;m+=1)i.deps[m].rv=ue;if(e!==null)for(const m of e)m.rv=ue;vt!==null&&(n===null?n=vt:n.push(...vt))}return t.f&8388608&&(t.f^=mr),d}catch(m){return Yn(t),wo(m)}finally{t.f^=Fn,nt=e,st=r,vt=n,I=i,$t=l,Se(o),_t=a,he=u}}function Yn(t){var e=t.deps,r=x?.is_fork;if(nt!==null){var n;if(r||Ze(t,st),e!==null&&st>0)for(e.length=st+nt.length,n=0;n<nt.length;n++)e[st+n]=nt[n];else t.deps=e=nt;if(Sn()&&(t.f&512)!==0)for(n=st;n<e.length;n++){var i;((i=e[n]).reactions??(i.reactions=[])).push(t)}}else!r&&e!==null&&st<e.length&&(Ze(t,st),e.length=st);return e}function Eo(t,e){let r=e.reactions;if(r!==null){var n=Sl.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(e.f&2)!==0&&(nt===null||!Ur.call(nt,e))){var l=e;l.f&512&&(l.f^=512),l.v!==Q&&_n(l),l.ac!==null&&Ie(()=>{l.ac.abort(Ye),l.ac=null,q(l,Mt)}),ao(l),Ze(l,0)}}function Ze(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Eo(t,r[n])}function Pe(t){var e=t.f;if((e&16384)===0){q(t,pt);var r=j,n=dr;j=t,dr=(e&96)===0;try{(e&16777232)!==0?xo(t):En(t),Bi(t);var i=Ki(t);t.teardown=typeof i=="function"?i:null,t.wv=Qi}finally{dr=n,j=r}}}async function Po(){if(Ce)return new Promise(t=>{requestAnimationFrame(()=>t()),setTimeout(()=>t())});await Promise.resolve(),Mr()}function c(t){var e=(t.f&2)!==0;if(So?.add(t),I!==null&&!_t&&!(j!==null&&(j.f&16384)!==0)&&($t===null||!$t.has(t))){var r=I.deps;if((I.f&2097152)!==0)t.rv<ue&&(t.rv=ue,nt===null&&r!==null&&r[st]===t?st++:nt===null?nt=[t]:nt.push(t));else{var n;(n=I).deps??(n.deps=[]),Ur.call(I.deps,t)||I.deps.push(t);var i=t.reactions;i===null?t.reactions=[I]:Ur.call(i,I)||i.push(I)}}if(Gt&&zt.has(t))return zt.get(t);if(e){var l=t;if(Gt){var o=l.v;return(!(l.f&1024)&&l.reactions!==null||Ui(l))&&(o=$n(l)),zt.set(l,o),o}var a=(l.f&512)===0&&!_t&&I!==null&&(dr||(I.f&512)!==0),u=(l.f&mn)===0;tr(l)&&(a&&(l.f|=512),ki(l)),a&&!u&&(xi(l),Yi(l))}if(et?.has(t))return et.get(t);if((t.f&8388608)!==0)throw t.v;return t.v}function Yi(t){if(t.f|=512,t.deps!==null)for(const e of t.deps)(e.reactions??(e.reactions=[])).push(t),e.f&2&&!(e.f&512)&&(xi(e),Yi(e))}function Ui(t){if(t.v===Q)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(zt.has(e)||(e.f&2)!==0&&Ui(e))return!0;return!1}function Tr(t){var e=_t;try{return _t=!0,t()}finally{_t=e}}var xe=Symbol("events"),tl=new Set,un=new Set;function jo(t,e,r,n={}){function i(l){if(n.capture||fn.call(e,l),!l.cancelBubble)return Ie(()=>r?.call(this,l))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?(i.__removed=!1,Ot(()=>{i.__removed||e.addEventListener(t,i,n)})):e.addEventListener(t,i,n),i}function Co(t,e,r,n,i){var l={capture:n,passive:i},o=jo(t,e,r,l);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Hi(()=>{o.__removed=!0,e.removeEventListener(t,o,l)})}function re(t,e,r){(e[xe]??(e[xe]={}))[t]=r}function Io(t){for(var e=0;e<t.length;e++)tl.add(t[e]);for(var r of un)r(t)}var Rr=null,Fr=!1;function fn(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],l=i[0]||t.target;Rr=t,Fr||(Fr=!0,setTimeout(()=>{Fr=!1,Rr=null}));var o=0,a=Rr===t&&t[xe];if(a){var u=i.indexOf(a);if(u!==-1&&(e===document||e===window)){t[xe]=e;return}var f=i.indexOf(e);if(f===-1)return;u<=f&&(o=u)}if(l=i[o]||t.target,l!==e){Je(t,"currentTarget",{configurable:!0,get(){return l||r}});var h=I,d=j;mt(null),Dt(null);try{for(var v,p=[];l!==null&&l!==e;){try{var m=l[xe]?.[n];m!=null&&(!l.disabled||t.target===l)&&m.call(l,t)}catch(S){v?p.push(S):v=S}if(t.cancelBubble)break;o++,l=o<i.length?i[o]:null}if(v){for(let S of p)queueMicrotask(()=>{throw S});throw v}}finally{t[xe]=e,delete t.currentTarget,mt(h),Dt(d)}}}var Lo=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function zo(t){return Lo?.createHTML(t)??t}function el(t){var e=xn("template");return e.innerHTML=zo(t.replaceAll("<!>","<!---->")),e.content}function Jt(t,e){var r=j;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function rl(t,e){var r=(e&1)!==0,n=(e&2)!==0,i,l=!t.startsWith("<!>");return()=>{if(L)return Jt(T,null),T;i===void 0&&(i=el(l?t:"<!>"+t),r||(i=at(i)));var o=n||Ti?document.importNode(i,!0):i.cloneNode(!0);if(r){var a=at(o),u=o.lastChild;Jt(a,u)}else Jt(o,o);return o}}function To(t,e,r="svg"){var n=!t.startsWith("<!>"),i=(e&1)!==0,l=`<${r}>${n?t:"<!>"+t}</${r}>`,o;return()=>{if(L)return Jt(T,null),T;if(!o){var a=at(el(l));if(i)for(o=document.createDocumentFragment();at(a);)o.appendChild(at(a));else o=at(a)}var u=o.cloneNode(!0);if(i){var f=at(u),h=u.lastChild;Jt(f,h)}else Jt(u,u);return u}}function St(t,e){return To(t,e,"svg")}function Br(){if(L)return Jt(T,null),T;var t=document.createDocumentFragment(),e=document.createComment(""),r=dt();return t.append(e,r),Jt(e,r),t}function Z(t,e){if(L){var r=j;(!(r.f&32768)||r.nodes.end===null)&&(r.nodes.end=T),Ir();return}t!==null&&t.before(e)}var Oo=["touchstart","touchmove"];function Do(t){return Oo.includes(t)}function No(t){let e=0,r=de(0),n;return()=>{Sn()&&(c(r),zr(()=>(e===0&&(n=Tr(()=>t(()=>qe(r)))),e+=1,()=>{Ot(()=>{e-=1,e===0&&(n?.(),n=void 0,qe(r))})})))}}var Ao=wn|je;function Ho(t,e,r,n){new Ro(t,e,r,n)}var kt=new WeakMap,cn=new WeakMap,Lt=new WeakMap,Ke=new WeakMap,ut=new WeakMap,xt=new WeakMap,ft=new WeakMap,bt=new WeakMap,Yt=new WeakMap,be=new WeakMap,ve=new WeakMap,ar=new WeakMap,hn=new WeakMap,vn=new WeakMap,ne=new WeakMap,Un=new WeakMap,X=new WeakSet,Ro=class{constructor(t,e,r,n){kn(this,X),H(this,"parent",void 0),H(this,"is_pending",!1),H(this,"transform_error",void 0),k(this,kt,void 0),k(this,cn,L?T:null),k(this,Lt,void 0),k(this,Ke,void 0),k(this,ut,void 0),k(this,xt,null),k(this,ft,null),k(this,bt,null),k(this,Yt,null),k(this,be,0),k(this,ve,0),k(this,ar,!1),k(this,hn,new Set),k(this,vn,new Set),k(this,ne,null),k(this,Un,No(()=>(b(ne,this,de(s(be,this))),()=>{b(ne,this,null)}))),b(kt,this,t),b(Lt,this,e),b(Ke,this,i=>{var l=j;l.b=this,l.f|=128,r(i)}),this.parent=j.b,this.transform_error=n??this.parent?.transform_error??(i=>i),b(ut,this,Wn(()=>{if(L){const i=s(cn,this);Ir();const l=i.data==="[!";if(i.data.startsWith("[?")){const o=JSON.parse(i.data.slice(2));E(X,this,Bo).call(this,o)}else l?E(X,this,Vo).call(this):E(X,this,Fo).call(this)}else E(X,this,il).call(this)},Ao)),L&&b(kt,this,T)}defer_effect(t){_i(t,s(hn,this),s(vn,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!s(Lt,this).pending}update_pending_count(t,e){E(X,this,ll).call(this,t,e),b(be,this,s(be,this)+t),s(ne,this)&&!s(ar,this)&&(b(ar,this,!0),Ot(()=>{b(ar,this,!1),s(ne,this)&&Ee(s(ne,this),s(be,this))}))}get_effect_pending(){return s(Un,this).call(this),c(s(ne,this))}error(t){if(!s(Lt,this).onerror&&!s(Lt,this).failed)throw t;x?.is_fork?(s(xt,this)&&x.skip_effect(s(xt,this)),s(ft,this)&&x.skip_effect(s(ft,this)),s(bt,this)&&x.skip_effect(s(bt,this)),x.oncommit(()=>{E(X,this,ti).call(this,t)})):E(X,this,ti).call(this,t)}};function Fo(){try{b(xt,this,gt(()=>s(Ke,this).call(this,s(kt,this))))}catch(t){this.error(t)}}function Bo(t){const e=s(Lt,this).failed,{reset:r,invoke_onerror:n}=E(X,this,nl).call(this,t);Ot(n),e&&b(bt,this,gt(()=>{e(s(kt,this),()=>t,()=>r)}))}function nl(t){var e=!1,r=!1;const n=()=>{if(e){Hl();return}e=!0,r&&to(),s(bt,this)!==null&&me(s(bt,this),()=>{b(bt,this,null)}),E(X,this,jn).call(this,()=>{E(X,this,il).call(this)})};return{reset:n,invoke_onerror:()=>{try{r=!0,s(Lt,this).onerror?.(t,n),r=!1}catch(i){Tt(i,s(ut,this)&&s(ut,this).parent)}}}}function Vo(){const t=s(Lt,this).pending;t&&(this.is_pending=!0,b(ft,this,gt(()=>t(s(kt,this)))),Ot(()=>{var e=b(Yt,this,document.createDocumentFragment()),r=dt(),n=!1;if(e.append(r),b(xt,this,E(X,this,jn).call(this,()=>{try{return gt(()=>s(Ke,this).call(this,r))}catch(i){try{this.error(i),n=!0}catch(l){Tt(l,s(ut,this).parent)}return null}})),s(xt,this)===null){b(Yt,this,null),n&&E(X,this,Er).call(this,x);return}s(ve,this)===0&&(s(kt,this).before(e),b(Yt,this,null),me(s(ft,this),()=>{b(ft,this,null)}),E(X,this,Er).call(this,x))}))}function il(){try{if(this.is_pending=this.has_pending_snippet(),b(ve,this,0),b(be,this,0),b(xt,this,gt(()=>{s(Ke,this).call(this,s(kt,this))})),s(ve,this)>0){var t=b(Yt,this,document.createDocumentFragment());Pn(s(xt,this),t);const e=s(Lt,this).pending;b(ft,this,gt(()=>e(s(kt,this))))}else E(X,this,Er).call(this,x)}catch(e){this.error(e)}}function Er(t){this.is_pending=!1,t.transfer_effects(s(hn,this),s(vn,this))}function jn(t){var e=j,r=I,n=V;Dt(s(ut,this)),mt(s(ut,this)),Se(s(ut,this).ctx);try{return ge.ensure(),t()}finally{Dt(e),mt(r),Se(n)}}function ll(t,e){if(!this.has_pending_snippet()){if(this.parent){var r;E(X,r=this.parent,ll).call(r,t,e)}return}b(ve,this,s(ve,this)+t),s(ve,this)===0&&(E(X,this,Er).call(this,e),s(ft,this)&&me(s(ft,this),()=>{b(ft,this,null)}),s(Yt,this)&&(s(kt,this).before(s(Yt,this)),b(Yt,this,null)))}function ti(t){s(xt,this)&&(rt(s(xt,this)),b(xt,this,null)),s(ft,this)&&(rt(s(ft,this)),b(ft,this,null)),s(bt,this)&&(rt(s(bt,this)),b(bt,this,null)),L&&(it(s(cn,this)),Rl(),it(wr()));let e=s(Lt,this).failed;const r=n=>{const{reset:i,invoke_onerror:l}=E(X,this,nl).call(this,n);l(),e&&b(bt,this,E(X,this,jn).call(this,()=>{try{return gt(()=>{var o=j;o.b=this,o.f|=128,e(s(kt,this),()=>n,()=>i)})}catch(o){return Tt(o,s(ut,this).parent),null}}))};Ot(()=>{var n;try{n=this.transform_error(t)}catch(i){Tt(i,s(ut,this)&&s(ut,this).parent);return}n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(r,i=>Tt(i,s(ut,this)&&s(ut,this).parent)):r(n)})}function ei(t,e){var r=e==null?"":typeof e=="object"?`${e}`:e;r!==(t[vr]??(t[vr]=t.nodeValue))&&(t[vr]=r,t.nodeValue=`${r}`)}function ol(t,e){return sl(t,e)}function qo(t,e){an(),e.intro=e.intro??!1;const r=e.target,n=L,i=T;try{for(var l=at(r);l&&(l.nodeType!==8||l.data!=="[");)l=Nt(l);if(!l)throw Me;Vt(!0),it(l);const o=sl(t,{...e,anchor:l});return Vt(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
|
|
2
|
+
`).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==Me&&console.warn("Failed to hydrate: ",o),e.recover===!1&&Xl(),an(),Ni(r),Vt(!1),ol(t,e)}finally{Vt(n),it(i)}}var ur=new Map;function sl(t,{target:e,anchor:r,props:n={},events:i,context:l,intro:o=!0,transformError:a}){an();var u=void 0,f=$o(()=>{var h=r??e.appendChild(dt());Ho(h,{pending:()=>{}},p=>{mi({});var m=V;if(l&&(m.c=l),i&&(n.$$events=i),L&&Jt(p,null),u=t(p,n)||yn(),L&&(j.nodes.end=T,T===null||T.nodeType!==8||T.data!=="]"))throw Cr(),Me;wi()},a);var d=new Set,v=p=>{for(var m=0;m<p.length;m++){var S=p[m];if(!d.has(S)){d.add(S);var g=Do(S);for(const N of[e,document]){var _=ur.get(N);_===void 0&&(_=new Map,ur.set(N,_));var R=_.get(S);R===void 0?(N.addEventListener(S,fn,{passive:g}),_.set(S,1)):_.set(S,R+1)}}}};return v(jr(tl)),un.add(v),()=>{for(var p of d)for(const g of[e,document]){var m=ur.get(g),S=m.get(p);--S==0?(g.removeEventListener(p,fn),m.delete(p),m.size===0&&ur.delete(g)):m.set(p,S)}un.delete(v),h!==r&&h.parentNode?.removeChild(h)}});return dn.set(u,f),u}var dn=new WeakMap;function Jo(t,e){const r=dn.get(t);return r?(dn.delete(t),r(e)):Promise.resolve()}var Ft=new WeakMap,Qt=new WeakMap,yt=new WeakMap,Te=new WeakMap,Vr=new WeakMap,qr=new WeakMap,ri=new WeakMap,Go=class{constructor(t,e=!0){H(this,"anchor",void 0),k(this,Ft,new Map),k(this,Qt,new Map),k(this,yt,new Map),k(this,Te,new Set),k(this,Vr,!0),k(this,qr,r=>{if(s(Ft,this).has(r)){var n=s(Ft,this).get(r),i=s(Qt,this).get(n);if(i)Wr(i),s(Te,this).delete(n);else{var l=s(yt,this).get(n);l&&(Wr(l.effect),s(Qt,this).set(n,l.effect),s(yt,this).delete(n),l.fragment.lastChild.remove(),this.anchor.before(l.fragment),i=l.effect)}for(const[o,a]of s(Ft,this)){if(s(Ft,this).delete(o),o===r)break;const u=s(yt,this).get(a);u&&(rt(u.effect),s(yt,this).delete(a))}for(const[o,a]of s(Qt,this)){if(o===n||s(Te,this).has(o))continue;const u=()=>{if(Array.from(s(Ft,this).values()).includes(o)){var f=document.createDocumentFragment();Pn(a,f),f.append(dt()),s(yt,this).set(o,{effect:a,fragment:f})}else rt(a);s(Te,this).delete(o),s(Qt,this).delete(o)};s(Vr,this)||!i?(s(Te,this).add(o),me(a,u,!1)):u()}}}),k(this,ri,r=>{s(Ft,this).delete(r);const n=Array.from(s(Ft,this).values());for(const[i,l]of s(yt,this))n.includes(i)||(rt(l.effect),s(yt,this).delete(i))}),this.anchor=t,b(Vr,this,e)}ensure(t,e){var r=x,n=Ai();if(e&&!s(Qt,this).has(t)&&!s(yt,this).has(t))if(n){var i=document.createDocumentFragment(),l=dt();i.append(l),s(yt,this).set(t,{effect:gt(()=>e(l)),fragment:i})}else s(Qt,this).set(t,gt(()=>e(this.anchor)));if(s(Ft,this).set(r,t),n){for(const[o,a]of s(Qt,this))o===t?r.unskip_effect(a):r.skip_effect(a);for(const[o,a]of s(yt,this))o===t?r.unskip_effect(a.effect):r.skip_effect(a.effect);r.oncommit(s(qr,this)),r.ondiscard(s(ri,this))}else L&&(this.anchor=T),s(qr,this).call(this,r)}};function Oe(t,e,r=!1){var n;L&&(n=T,Ir());var i=new Go(t),l=r?wn:0;function o(a,u){if(L){var f=di(n);if(a!==parseInt(f.substring(1))){var h=wr();it(h),i.anchor=h,Vt(!1),i.ensure(a,u),Vt(!0);return}}i.ensure(a,u)}Wn(()=>{var a=!1;e((u,f=0)=>{a=!0,o(f,u)}),a||o(-1,null)},l)}function fr(t,e){return e}function Qo(t,e,r){for(var n=[],i=e.length,l,o=e.length,a=0;a<i;a++){let d=e[a];me(d,()=>{if(l){if(l.pending.delete(d),l.done.add(d),l.pending.size===0){var v=t.outrogroups;pn(t,jr(l.done)),v.delete(l),v.size===0&&(t.outrogroups=null)}}else o-=1},!1)}if(o===0){var u=n.length===0&&r!==null&&t.pending.size===0;if(u){var f=r,h=f.parentNode;Ni(h),h.append(f),t.items.clear()}pn(t,e,!u)}else l={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(l)}function pn(t,e,r=!0){var n;if(t.pending.size>0){n=new Set;for(const o of t.pending.values())for(const a of o)n.add(t.items.get(a).e)}for(var i=0;i<e.length;i++){var l=e[i];n?.has(l)?(l.f|=Re,Pn(l,document.createDocumentFragment())):rt(e[i],r)}}var cr;function ie(t,e,r,n,i,l=null){var o=t,a=new Map;if((e&4)!==0){var u=t;o=L?it(at(u)):u.appendChild(dt())}L&&Ir();var f=null,h=bn(()=>{var _=r();return ui(_)?_:_==null?[]:jr(_)}),d,v=new Map,p=!0;function m(_){!(g.effect.f&16384)&&(g.pending.delete(_),g.fallback=f,Xo(g,d,o,e,n),f!==null&&(d.length===0?(f.f&33554432)===0?Wr(f):(f.f^=Re,He(f,null,o)):me(f,()=>{f=null})))}function S(_){g.pending.delete(_)}var g={effect:Wn(()=>{d=c(h);var _=d.length;let R=!1;L&&di(o)==="[!"!=(_===0)&&(o=wr(),it(o),Vt(!1),R=!0);for(var N=new Set,C=x,K=Ai(),Y=0;Y<_;Y+=1){L&&T.nodeType===8&&T.data==="]"&&(o=T,R=!0,Vt(!1));var D=d[Y],Wt=n(D,Y),U=p?null:a.get(Wt);U?(U.v&&Ee(U.v,D),U.i&&Ee(U.i,Y),K&&C.unskip_effect(U.e)):(U=Zo(a,p?o:cr??(cr=dt()),D,Wt,Y,i,e,r),p||(U.e.f|=Re),a.set(Wt,U)),N.add(Wt)}if(_===0&&l&&!f&&(p?f=gt(()=>l(o)):(f=gt(()=>l(cr??(cr=dt()))),f.f|=Re)),_>N.size&&Vl("","",""),L&&_>0&&it(wr()),!p)if(v.set(C,N),K){for(const[lt,er]of a)N.has(lt)||C.skip_effect(er.e);C.oncommit(m),C.ondiscard(S)}else m(C);R&&Vt(!0),c(h)}),flags:e,items:a,pending:v,outrogroups:null,fallback:f};p=!1,L&&(o=T)}function De(t){for(;t!==null&&(t.f&32)===0;)t=t.next;return t}function Xo(t,e,r,n,i){var l=(n&8)!==0,o=e.length,a=t.items,u=De(t.effect.first),f,h=null,d,v=[],p=[],m,S,g,_;if(l)for(_=0;_<o;_+=1)m=e[_],S=i(m,_),g=a.get(S).e,!(g.f&33554432)&&(g.nodes?.a?.measure(),(d??(d=new Set)).add(g));for(_=0;_<o;_+=1){if(m=e[_],S=i(m,_),g=a.get(S).e,t.outrogroups!==null)for(const lt of t.outrogroups)lt.pending.delete(g),lt.done.delete(g);if(g.f&8192&&(Wr(g),l&&(g.nodes?.a?.unfix(),(d??(d=new Set)).delete(g))),(g.f&33554432)!==0)if(g.f^=Re,g===u)He(g,null,r);else{var R=h?h.next:u;g===t.effect.last&&(t.effect.last=g.prev),g.prev&&(g.prev.next=g.next),g.next&&(g.next.prev=g.prev),Xt(t,h,g),Xt(t,g,R),He(g,R,r),h=g,v=[],p=[],u=De(h.next);continue}if(g!==u){if(f!==void 0&&f.has(g)){if(v.length<p.length){var N=p[0],C;h=N.prev;var K=v[0],Y=v[v.length-1];for(C=0;C<v.length;C+=1)He(v[C],N,r);for(C=0;C<p.length;C+=1)f.delete(p[C]);Xt(t,K.prev,Y.next),Xt(t,h,K),Xt(t,Y,N),u=N,h=Y,_-=1,v=[],p=[]}else f.delete(g),He(g,u,r),Xt(t,g.prev,g.next),Xt(t,g,h===null?t.effect.first:h.next),Xt(t,h,g),h=g;continue}for(v=[],p=[];u!==null&&u!==g;)(f??(f=new Set)).add(u),p.push(u),u=De(u.next);if(u===null)continue}!(g.f&33554432)&&v.push(g),h=g,u=De(g.next)}if(t.outrogroups!==null){for(const lt of t.outrogroups)lt.pending.size===0&&(pn(t,jr(lt.done)),t.outrogroups?.delete(lt));t.outrogroups.size===0&&(t.outrogroups=null)}if(u!==null||f!==void 0){var D=[];if(f!==void 0)for(g of f)!(g.f&8192)&&D.push(g);for(;u!==null;)!(u.f&8192)&&u!==t.fallback&&D.push(u),u=De(u.next);var Wt=D.length;if(Wt>0){var U=(n&4)!==0&&o===0?r:null;if(l){for(_=0;_<Wt;_+=1)D[_].nodes?.a?.measure();for(_=0;_<Wt;_+=1)D[_].nodes?.a?.fix()}Qo(t,D,U)}}l&&Ot(()=>{if(d!==void 0)for(g of d)g.nodes?.a?.apply()})}function Zo(t,e,r,n,i,l,o,a){var u=(o&1)!==0?(o&16)===0?Li(r,!1,!1):de(r):null,f=(o&2)!==0?de(i):null;return{v:u,i:f,e:gt(()=>(l(e,u??r,f??i,a),()=>{t.delete(n)}))}}function He(t,e,r){if(t.nodes)for(var n=t.nodes.start,i=t.nodes.end,l=e&&(e.f&33554432)===0?e.nodes.start:r;n!==null;){var o=Nt(n);if(l.before(n),n===i)return;n=o}}function Xt(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function Ko(t,e){Fi(()=>{t=j?.parent?.nodes?.start??t;var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const i=xn("style");i.id=e.hash,i.textContent=e.code,n.appendChild(i)}})}var ni=[...`
|
|
3
|
+
\r\f \v\uFEFF`];function Yo(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var i of Object.keys(r))if(r[i])n=n?n+" "+i:i;else if(n.length)for(var l=i.length,o=0;(o=n.indexOf(i,o))>=0;){var a=o+l;(o===0||ni.includes(n[o-1]))&&(a===n.length||ni.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function ii(t,e=!1){var r=e?" !important;":";",n="";for(var i of Object.keys(t)){var l=t[i];l!=null&&l!==""&&(n+=" "+i+": "+l+r)}return n}function Jr(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Uo(t,e){if(e){var r="",n,i;if(Array.isArray(e)?(n=e[0],i=e[1]):n=e,t){t=String(t).replaceAll(/\/\*.*?\*\//g,"").trim();var l=!1,o=0,a=!1,u=[];n&&u.push(...Object.keys(n).map(Jr)),i&&u.push(...Object.keys(i).map(Jr));var f=0,h=-1;const S=t.length;for(var d=0;d<S;d++){var v=t[d];if(a?v==="/"&&t[d-1]==="*"&&(a=!1):l?l===v&&(l=!1):v==="/"&&t[d+1]==="*"?a=!0:v==='"'||v==="'"?l=v:v==="("?o++:v===")"&&o--,!a&&l===!1&&o===0){if(v===":"&&h===-1)h=d;else if(v===";"||d===S-1){if(h!==-1){var p=Jr(t.substring(f,h).trim());if(!u.includes(p)){v!==";"&&d++;var m=t.substring(f,d).trim();r+=" "+m+";"}}f=d+1,h=-1}}}}return n&&(r+=ii(n)),i&&(r+=ii(i,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function li(t,e,r,n,i,l){var o=t[en];if(L||o!==r||o===void 0){var a=Yo(r,n,l);(!L||a!==t.getAttribute("class"))&&(a==null?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a)),t[en]=r}else if(l&&i!==l)for(var u in l){var f=!!l[u];(i==null||f!==!!i[u])&&t.classList.toggle(u,f)}return l}function Gr(t,e={},r,n){for(var i in r){var l=r[i];e[i]!==l&&(r[i]==null?t.style.removeProperty(i):t.style.setProperty(i,l,n))}}function ts(t,e,r,n){var i=t[rn];if(L||i!==e){var l=Uo(e,n);(!L||l!==t.getAttribute("style"))&&(l==null?t.removeAttribute("style"):t.style.cssText=l),t[rn]=e}else n&&(Array.isArray(n)?(Gr(t,r?.[0],n[0]),Gr(t,r?.[1],n[1],"important")):Gr(t,r,n));return n}var es=Symbol("is custom element"),rs=Symbol("is html"),ns=Nl?"link":"LINK";function is(t){if(L){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;z(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var i=t.checked;z(t,"checked",null),t.checked=i}}};t[Be]=r,Ot(r),bi()}}function z(t,e,r,n){var i=ls(t);L&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName===ns)||i[e]!==(i[e]=r)&&(e==="loading"&&(t[Dl]=r),r==null?t.removeAttribute(e):typeof r!="string"&&os(t).has(e)?t[e]=r:t.setAttribute(e,r))}function ls(t){return t[tn]??(t[tn]={[es]:t.nodeName.includes("-"),[rs]:t.namespaceURI==="http://www.w3.org/1999/xhtml"})}var oi=new Map;function os(t){var e=t.getAttribute("is")||t.nodeName,r=oi.get(e);if(r)return r;oi.set(e,r=new Set);for(var n,i=t,l=Element.prototype;l!==i;){n=Wl(i);for(var o in n)n[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&r.add(o);i=fi(i)}return r}function ss(t,e,r=e){var n=new WeakSet;no(t,"input",async i=>{var l=i?t.defaultValue:t.value;if(l=Qr(t)?Xr(l):l,r(l),x!==null&&n.add(x),await Po(),l!==(l=e())){var o=t.selectionStart,a=t.selectionEnd,u=t.value.length;if(t.value=l??"",a!==null){var f=t.value.length;o===a&&a===u&&f>u?(t.selectionStart=f,t.selectionEnd=f):(t.selectionStart=o,t.selectionEnd=Math.min(a,f))}}}),(L&&t.defaultValue!==t.value||Tr(e)==null&&t.value)&&(r(Qr(t)?Xr(t.value):t.value),x!==null&&n.add(x)),zr(()=>{var i=e();if(t===document.activeElement){var l=Ce?_r:x;if(n.has(l))return}Qr(t)&&i===Xr(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}function Qr(t){var e=t.type;return e==="number"||e==="range"}function Xr(t){return t===""?null:+t}var al,$e=new WeakMap,Pr=new WeakMap,Zr=new WeakMap,si=new WeakSet,ul=class{constructor(t){kn(this,si),k(this,$e,new WeakMap),k(this,Pr,void 0),k(this,Zr,void 0),b(Zr,this,t)}observe(t,e){var r=s($e,this).get(t)||new Set;return r.add(e),s($e,this).set(t,r),E(si,this,as).call(this).observe(t,s(Zr,this)),()=>{var n=s($e,this).get(t);n.delete(e),n.size===0&&(s($e,this).delete(t),s(Pr,this).unobserve(t))}}};al=ul;function as(){return s(Pr,this)??b(Pr,this,new ResizeObserver(t=>{for(var e of t){al.entries.set(e.target,e);for(var r of s($e,this).get(e.target)||[])r(e)}}))}H(ul,"entries",new WeakMap);function Kr(t,e){return t===e||t?.[Fe]===e}function Yr(t=yn(),e,r,n){var i=V.r,l=j;return Fi(()=>{var o,a;return zr(()=>{o=a,a=n?.()||[],Tr(()=>{Kr(r(...a),t)||(e(t,...a),o&&Kr(r(...o),t)&&e(null,...o))})}),()=>{let u=l;for(;u!==i&&u.parent!==null&&u.parent.f&33554432;)u=u.parent;const f=()=>{a&&Kr(r(...a),t)&&e(null,...a)},h=u.teardown;u.teardown=()=>{f(),h?.()}}}),t}var hr=!1;function us(t){var e=hr;try{return hr=!1,[t(),hr]}finally{hr=e}}function ai(t,e,r,n){var i=!Lr||(r&2)!==0,l=(r&8)!==0,o=(r&16)!==0,a=n,u=!0,f=void 0,h=()=>o&&i?(f??(f=Qe(n)),c(f)):(u&&(u=!1,a=o?Tr(n):n),a);let d;if(l){var v=Fe in t||vi in t;d=fe(t,e)?.set??(v&&e in t?C=>t[e]=C:void 0)}var p,m=!1;l?[p,m]=us(()=>t[e]):p=t[e],p===void 0&&n!==void 0&&(p=h(),d&&(i&&Zl(e),d(p)));var S;if(i?S=()=>{var C=t[e];return C===void 0?h():(u=!0,C)}:S=()=>{var C=t[e];return C!==void 0&&(a=void 0),C===void 0?a:C},i&&(r&4)===0)return S;if(d){var g=t.$$legacy;return(function(C,K){return arguments.length>0?((!i||!K||g||m)&&d(K?S():C),C):S()})}var _=!1,R=((r&1)!==0?Qe:bn)(()=>(_=!1,S()));l&&c(R);var N=j;return(function(C,K){if(arguments.length>0){const Y=K?c(R):i&&l?Kt(C):C;return M(R,Y),_=!0,a!==void 0&&(a=Y),C}return Gt&&_||(N.f&16384)!==0?R.v:c(R)})}function fs(t){return new cs(t)}var le=new WeakMap,jt=new WeakMap,cs=class{constructor(t){k(this,le,void 0),k(this,jt,void 0);var e=new Map,r=(i,l)=>{var o=Li(l,!1,!1);return e.set(i,o),o};const n=new Proxy({...t.props||{},$$events:{}},{get(i,l){return c(e.get(l)??r(l,Reflect.get(i,l)))},has(i,l){return l===vi?!0:(c(e.get(l)??r(l,Reflect.get(i,l))),Reflect.has(i,l))},set(i,l,o){return M(e.get(l)??r(l,o),o),Reflect.set(i,l,o)}});b(jt,this,(t.hydrate?qo:ol)(t.component,{target:t.target,anchor:t.anchor,props:n,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),(!t?.props?.$$host||t.sync===!1)&&Mr(),b(le,this,n.$$events);for(const i of Object.keys(s(jt,this)))i==="$set"||i==="$destroy"||i==="$on"||Je(this,i,{get(){return s(jt,this)[i]},set(l){s(jt,this)[i]=l},enumerable:!0});s(jt,this).$set=i=>{Object.assign(n,i)},s(jt,this).$destroy=()=>{Jo(s(jt,this))}}$set(t){s(jt,this).$set(t)}$on(t,e){s(le,this)[t]=s(le,this)[t]||[];const r=(...n)=>e.call(this,...n);return s(le,this)[t].push(r),()=>{s(le,this)[t]=s(le,this)[t].filter(n=>n!==r)}}$destroy(){s(jt,this).$destroy()}},fl;typeof HTMLElement=="function"&&(fl=class extends HTMLElement{constructor(t,e,r){super(),H(this,"$$ctor",void 0),H(this,"$$s",void 0),H(this,"$$c",void 0),H(this,"$$cn",!1),H(this,"$$d",{}),H(this,"$$r",!1),H(this,"$$p_d",{}),H(this,"$$l",{}),H(this,"$$l_u",new Map),H(this,"$$me",void 0),H(this,"$$shadowRoot",null),this.$$ctor=t,this.$$s=e,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(t,e,r){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(e),this.$$c){const n=this.$$c.$on(t,e);this.$$l_u.set(e,n)}super.addEventListener(t,e,r)}removeEventListener(t,e,r){if(super.removeEventListener(t,e,r),this.$$c){const n=this.$$l_u.get(e);n&&(n(),this.$$l_u.delete(e))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let t=function(n){return i=>{const l=xn("slot");n!=="default"&&(l.name=n),Z(i,l)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=hs(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=t(n),e.default=!0):e[n]=t(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=pr(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=fs({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=bo(()=>{zr(()=>{this.$$r=!0;for(const n of gr(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=pr(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const l=this.$$c.$on(n,i);this.$$l_u.set(i,l)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=pr(t,r,this.$$p_d,"toProp"),this.$$c?.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(t){return gr(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function pr(t,e,r,n){const i=r[t]?.type;if(e=i==="Boolean"&&typeof e!="boolean"?e!=null:e,!n||!r[t])return e;if(n==="toAttribute")switch(i){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(i){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function hs(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function vs(t,e,r,n,i,l){let o=class extends fl{constructor(){super(t,r,i),this.$$p_d=e}static get observedAttributes(){return gr(e).map(a=>(e[a].attribute||a).toLowerCase())}};return gr(e).forEach(a=>{Je(o.prototype,a,{get(){return this.$$c&&a in this.$$c?this.$$c[a]:this.$$d[a]},set(u){u=pr(a,u,e),this.$$d[a]=u;var f=this.$$c;f&&(fe(f,a)?.get?f[a]=u:f.$set({[a]:u}))}})}),n.forEach(a=>{Je(o.prototype,a,{get(){return this.$$c?.[a]}})}),l&&(o=l(o)),t.element=o,o}var ds=St('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path></svg>'),ps=St('<svg viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'),gs=St('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>'),ms=St('<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>'),ws=rl('<button type="button"><span class="pie-tool-graph__tool-icon svelte-v3lao1" aria-hidden="true"><!></span> <span class="pie-tool-graph__tool-label svelte-v3lao1"> </span></button>'),ys=St('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-v3lao1"></line>'),_s=St('<line x1="0" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-v3lao1"></line>'),bs=St('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--minor svelte-v3lao1"></line>'),$s=St('<line y1="0" y2="100" class="pie-tool-graph__grid-line pie-tool-graph__grid-line--major svelte-v3lao1"></line>'),ks=St('<line class="pie-tool-graph__user-line svelte-v3lao1"></line>'),xs=St('<circle r="2" role="button" tabindex="0"></circle>'),Ms=St('<line class="pie-tool-graph__temp-line svelte-v3lao1"></line>'),Ss=rl('<div class="pie-tool-graph svelte-v3lao1" role="dialog" tabindex="-1"><div class="pie-tool-graph__toolbar svelte-v3lao1"><div class="pie-tool-graph__tool-buttons svelte-v3lao1"></div> <div class="pie-tool-graph__transparency-control svelte-v3lao1"><label for="grid-opacity" class="svelte-v3lao1"> </label> <input type="range" id="grid-opacity" min="0" max="1" step="0.1" class="svelte-v3lao1"/></div></div> <div class="pie-tool-graph__canvas-wrapper svelte-v3lao1" role="img" tabindex="0"><svg class="pie-tool-graph__canvas svelte-v3lao1" preserveAspectRatio="xMinYMin meet" aria-hidden="true"><g class="pie-tool-graph__grid-lines" aria-hidden="true"><!><!><!><!></g><g class="pie-tool-graph__lines"></g><g class="pie-tool-graph__points"></g><!></svg></div></div>'),Ws={hash:"svelte-v3lao1",code:`.pie-tool-graph.svelte-v3lao1 {position:relative;background:var(--pie-background, #fff);color:var(--pie-text, #111827);width:100%;height:100%;min-height:0;overflow:hidden;display:flex;flex-direction:column;}
|
|
4
4
|
|
|
5
5
|
/* Toolbar (matching production implementation: lighter teal) */.pie-tool-graph__toolbar.svelte-v3lao1 {padding:8px;background:var(--pie-primary-light, #5a7fa3); /* Lighter teal-like color */display:flex;gap:16px;align-items:center;flex-wrap:wrap;}.pie-tool-graph__tool-buttons.svelte-v3lao1 {display:flex;gap:4px;flex:1;}.pie-tool-graph__tool-button.svelte-v3lao1 {flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 12px;background:color-mix(in srgb, var(--pie-white, #fff) 20%, transparent);border:2px solid transparent;border-radius:4px;cursor:pointer;color:var(--pie-white, #fff);font-size:12px;transition:all 0.2s;}.pie-tool-graph__tool-button.svelte-v3lao1:hover {background:color-mix(in srgb, var(--pie-white, #fff) 30%, transparent);}.pie-tool-graph__tool-button.pie-tool-graph__tool-button--active.svelte-v3lao1 {background:var(--pie-background, #fff);color:var(--pie-primary-dark, #2c3e50);border-color:var(--pie-primary-dark, #2c3e50);}.pie-tool-graph__tool-icon.svelte-v3lao1 {width:20px;height:20px;display:flex;align-items:center;justify-content:center;}.pie-tool-graph__tool-label.svelte-v3lao1 {font-size:11px;font-weight:500;}.pie-tool-graph__transparency-control.svelte-v3lao1 {display:flex;align-items:center;gap:8px;color:var(--pie-white, #fff);font-size:12px;padding-left:8px;}.pie-tool-graph__transparency-control.svelte-v3lao1 label:where(.svelte-v3lao1) {font-weight:500;}.pie-tool-graph__transparency-control.svelte-v3lao1 input[type='range']:where(.svelte-v3lao1) {width:100px;cursor:pointer;}
|
|
6
6
|
|
|
@@ -8,4 +8,4 @@ import{g as kl,n as xl}from"./tool-host-contract-b93b482c.js";import{i as Ml}fro
|
|
|
8
8
|
|
|
9
9
|
/* Grid lines (matching production implementation: dark gray) */.pie-tool-graph__grid-line.svelte-v3lao1 {stroke:var(--pie-border-dark, #666);vector-effect:non-scaling-stroke;}.pie-tool-graph__grid-line--major.svelte-v3lao1 {stroke:var(--pie-border-dark, #333);stroke-width:0.75;}.pie-tool-graph__grid-line--minor.svelte-v3lao1 {stroke:var(--pie-border-light, #ccc);stroke-width:0.5;}
|
|
10
10
|
|
|
11
|
-
/* User drawing styles */.pie-tool-graph__user-point.svelte-v3lao1 {cursor:pointer;fill:var(--pie-primary, #3f51b5);stroke:var(--pie-primary-dark, #2c3e50);stroke-width:0.5;vector-effect:non-scaling-stroke;}.pie-tool-graph__user-point.pie-tool-graph__user-point--highlight.svelte-v3lao1 {fill:var(--pie-missing, #ffc107);stroke:var(--pie-missing-icon, #ff9800);}.pie-tool-graph__user-line.svelte-v3lao1 {stroke:var(--pie-text, #333);stroke-linecap:round;stroke-width:1;vector-effect:non-scaling-stroke;}.pie-tool-graph__temp-line.svelte-v3lao1 {pointer-events:none;stroke:var(--pie-correct, #4caf50);stroke-dasharray:2, 2;stroke-width:0.75;vector-effect:non-scaling-stroke;}`};function Es(t,e){mi(e,!0),Ko(t,Ws);let
|
|
11
|
+
/* User drawing styles */.pie-tool-graph__user-point.svelte-v3lao1 {cursor:pointer;fill:var(--pie-primary, #3f51b5);stroke:var(--pie-primary-dark, #2c3e50);stroke-width:0.5;vector-effect:non-scaling-stroke;}.pie-tool-graph__user-point.pie-tool-graph__user-point--highlight.svelte-v3lao1 {fill:var(--pie-missing, #ffc107);stroke:var(--pie-missing-icon, #ff9800);}.pie-tool-graph__user-line.svelte-v3lao1 {stroke:var(--pie-text, #333);stroke-linecap:round;stroke-width:1;vector-effect:non-scaling-stroke;}.pie-tool-graph__temp-line.svelte-v3lao1 {pointer-events:none;stroke:var(--pie-correct, #4caf50);stroke-dasharray:2, 2;stroke-width:0.75;vector-effect:non-scaling-stroke;}`};function Es(t,e){mi(e,!0),Ko(t,Ws);let r=ai(e,"visible",7,!1),n=ai(e,"toolId",7,"graph"),i=F(void 0),l=F(void 0),o=F(void 0),a=F("selector"),u=F(Kt([])),f=F(Kt([])),h=F(1),d=F(1),v=F(null),p=F(null),m=F(null);const S=5,g=5,_=100/S,R=_/g;let N=F(0),C=F(0),K=ee(()=>{if(c(C)<=0||c(N)<=0)return 100;const y=c(C)/100,w=c(N)/y;return Math.max(100,w)}),Y=F(null);const D=ee(()=>Ml(c(Y))),Wt=ee(()=>[{name:"selector",icon:"selector",label:c(D).t("tools.graph.modeSelector"),title:c(D).t("tools.graph.modeSelectorHint")},{name:"point",icon:"point",label:c(D).t("tools.graph.modePoint"),title:c(D).t("tools.graph.modePointHint")},{name:"line",icon:"line",label:c(D).t("tools.graph.modeLine"),title:c(D).t("tools.graph.modeLineHint")},{name:"delete",icon:"delete",label:c(D).t("tools.graph.modeDelete"),title:c(D).t("tools.graph.modeDeleteHint")}]);Xn(()=>{if(c(l))return xl(c(l),y=>{M(Y,y,!0)})});function U(){return mo(h)}function lt(y){if(y!==null)return c(u).find(w=>w.id===y)}function er(y){if(!c(o))return null;const w=c(o).createSVGPoint();w.x=y.clientX,w.y=y.clientY;const A=c(o).getScreenCTM();if(!A)return null;try{const O=w.matrixTransform(A.inverse());return O.y=Math.max(0,Math.min(100,O.y)),O.x=Math.max(0,Math.min(c(K),O.x)),{x:O.x,y:O.y}}catch(O){return console.error("Error transforming point:",O),null}}function Cn(y,w=5){const A=w*w;let O=null,tt=1/0;for(const B of c(u)){const nr=B.x-y.x,we=B.y-y.y,Et=nr*nr+we*we;Et<tt&&Et<A&&(tt=Et,O=B)}return O}function cl(y){return y===c(v)||y===c(p)}function hl(y){if(c(a)==="delete"){M(u,c(u).filter(w=>w.id!==y),!0),M(f,c(f).filter(w=>w.p1Id!==y&&w.p2Id!==y),!0);return}if(c(a)==="line"){if(c(v)===null){M(v,y,!0);return}c(v)!==y&&(c(f).some(w=>w.p1Id===c(v)&&w.p2Id===y||w.p1Id===y&&w.p2Id===c(v))||M(f,[...c(f),{id:U(),p1Id:c(v),p2Id:y}],!0)),M(v,null),M(m,null)}}let rr=ee(()=>{const y={majorVertical:[],majorHorizontal:[],minorVertical:[],minorHorizontal:[]},w=c(K);for(let O=0;O<=S;O++){const tt=O*_;if(y.majorHorizontal.push(tt),O<S)for(let B=1;B<g;B++)y.minorHorizontal.push(tt+B*R)}let A=0;for(;A<=w;){if(y.majorVertical.push(A),A<w)for(let O=1;O<g;O++){const tt=A+O*R;if(tt<=w)y.minorVertical.push(tt);else break}A+=_}return y});function vl(y){M(a,y,!0),M(v,null),M(p,null),M(m,null)}function In(y){const w=er(y);if(!w)return;const A=Cn(w,R);switch(c(a)){case"point":M(u,[...c(u),{id:U(),x:w.x,y:w.y}],!0);break;case"line":const O=A??{id:U(),x:w.x,y:w.y};A||M(u,[...c(u),O],!0),c(v)===null?M(v,O.id,!0):(c(v)!==O.id&&(c(f).some(B=>B.p1Id===c(v)&&B.p2Id===O.id||B.p1Id===O.id&&B.p2Id===c(v))||M(f,[...c(f),{id:U(),p1Id:c(v),p2Id:O.id}],!0)),M(v,null),M(m,null));break;case"delete":const tt=Cn(w,2);tt&&(M(u,c(u).filter(B=>B.id!==tt.id),!0),M(f,c(f).filter(B=>B.p1Id!==tt.id&&B.p2Id!==tt.id),!0));break;case"selector":M(v,null),M(m,null)}}function dl(y,w){c(a)==="selector"&&(M(p,y,!0),w.target.setPointerCapture(w.pointerId))}function pl(y){const w=er(y);if(w&&(M(m,w,!0),c(p)!==null&&c(a)==="selector")){const A=lt(c(p));A&&(A.x=w.x,A.y=w.y,M(u,c(u),!0))}}function Ln(y){c(p)!==null&&(y.target?.hasPointerCapture(y.pointerId)&&y.target.releasePointerCapture(y.pointerId),M(p,null)),(c(a)!=="line"||c(v)===null)&&M(m,null)}let Le=null;Xn(()=>{if(c(i))return Le||(Le=new ResizeObserver(y=>{const{width:w,height:A}=y[0].contentRect;(Math.abs(c(N)-w)>.1||Math.abs(c(C)-A)>.1)&&(M(N,w,!0),M(C,A,!0))})),Le.observe(c(i)),()=>{Le&&Le.disconnect()}});var gl={get visible(){return r()},set visible(y=!1){r(y),Mr()},get toolId(){return n()},set toolId(y="graph"){n(y),Mr()}},zn=Br(),ml=Hr(zn),wl=y=>{var w=Ss(),A=Bt(w),O=Bt(A);ie(O,21,()=>c(Wt),P=>P.name,(P,W)=>{var $=ws();let ot;var J=Bt($),wt=Bt(J),Ht=ct=>{Z(ct,ds())},ze=ct=>{Z(ct,ps())},te=ct=>{Z(ct,gs())},bl=ct=>{Z(ct,ms())};Oe(wt,ct=>{c(W).name==="selector"?ct(Ht):c(W).name==="point"?ct(ze,1):c(W).name==="line"?ct(te,2):c(W).name==="delete"&&ct(bl,3)}),ht(J);var $l=Qn(Pt(J,2),!0);ht($),Rt(()=>{ot=li($,1,"pie-tool-graph__tool-button svelte-v3lao1",null,ot,{"pie-tool-graph__tool-button--active":c(a)===c(W).name}),z($,"title",c(W).title),z($,"aria-label",c(W).title),z($,"aria-pressed",c(a)===c(W).name),ei($l,c(W).label)}),re("click",$,()=>vl(c(W).name)),Z(P,$)}),ht(O);var tt=Pt(O,2),B=Bt(tt),nr=Qn(B,!0),we=Pt(B,2);is(we),ht(tt),ht(A);var Et=Pt(A,2),Ut=Bt(Et),ir=Bt(Ut),Tn=Bt(ir);ie(Tn,17,()=>c(rr).minorHorizontal,fr,(P,W)=>{var $=ys();Rt(()=>{z($,"y1",c(W)),z($,"x2",c(K)),z($,"y2",c(W))}),Z(P,$)});var On=Pt(Tn);ie(On,17,()=>c(rr).majorHorizontal,fr,(P,W)=>{var $=_s();Rt(()=>{z($,"y1",c(W)),z($,"x2",c(K)),z($,"y2",c(W))}),Z(P,$)});var Dn=Pt(On);ie(Dn,17,()=>c(rr).minorVertical,fr,(P,W)=>{var $=bs();Rt(()=>{z($,"x1",c(W)),z($,"x2",c(W))}),Z(P,$)}),ie(Pt(Dn),17,()=>c(rr).majorVertical,fr,(P,W)=>{var $=$s();Rt(()=>{z($,"x1",c(W)),z($,"x2",c(W))}),Z(P,$)}),ht(ir);var Or=Pt(ir);ie(Or,21,()=>c(f),P=>P.id,(P,W)=>{const $=ee(()=>lt(c(W).p1Id)),ot=ee(()=>lt(c(W).p2Id));var J=Br(),wt=Hr(J),Ht=ze=>{var te=ks();Rt(()=>{z(te,"x1",c($).x),z(te,"y1",c($).y),z(te,"x2",c(ot).x),z(te,"y2",c(ot).y)}),Z(ze,te)};Oe(wt,ze=>{c($)&&c(ot)&&ze(Ht)}),Z(P,J)}),ht(Or);var Dr=Pt(Or);ie(Dr,21,()=>c(u),P=>P.id,(P,W)=>{var $=xs();let ot;Rt((J,wt)=>{z($,"cx",c(W).x),z($,"cy",c(W).y),ot=li($,0,"pie-tool-graph__user-point svelte-v3lao1",null,ot,{"pie-tool-graph__user-point--highlight":J}),z($,"data-id",c(W).id),z($,"aria-label",wt)},[()=>cl(c(W).id),()=>c(D).t("tools.graph.pointA11y",{id:c(W).id})]),re("pointerdown",$,J=>{J.stopPropagation(),dl(c(W).id,J)}),re("keydown",$,J=>{(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),hl(c(W).id))}),Z(P,$)}),ht(Dr);var yl=Pt(Dr),_l=P=>{const W=ee(()=>lt(c(v)));var $=Br(),ot=Hr($),J=wt=>{var Ht=Ms();Rt(()=>{z(Ht,"x1",c(W).x),z(Ht,"y1",c(W).y),z(Ht,"x2",c(m).x),z(Ht,"y2",c(m).y)}),Z(wt,Ht)};Oe(ot,wt=>{c(W)&&wt(J)}),Z(P,$)};Oe(yl,P=>{c(v)&&c(m)&&P(_l)}),ht(Ut),Yr(Ut,P=>M(o,P),()=>c(o)),ht(Et),Yr(Et,P=>M(i,P),()=>c(i)),ht(w),Yr(w,P=>M(l,P),()=>c(l)),Rt((P,W,$,ot,J,wt)=>{z(w,"lang",P),z(w,"dir",W),z(w,"aria-label",$),z(w,"data-tool-id",n()),ei(nr,ot),z(we,"aria-label",J),z(Et,"aria-label",wt),z(Ut,"viewBox",`0 0 ${c(K)??""} 100`),ts(ir,`opacity: ${c(d)??""}`),w.dir=w.dir},[()=>c(D).getLocale(),()=>c(D).getDirection?.()??"ltr",()=>c(D).t("tools.graph.toolA11y"),()=>c(D).t("tools.graph.grid"),()=>c(D).t("tools.graph.gridOpacityA11y"),()=>c(D).t("tools.graph.canvasA11y")]),ss(we,()=>c(d),P=>M(d,P)),re("click",Et,In),re("keydown",Et,P=>{(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),In(P))}),re("pointermove",Ut,pl),re("pointerup",Ut,Ln),Co("pointerleave",Ut,Ln),Z(y,w)};return Oe(ml,y=>{r()&&y(wl)}),Z(t,zn),wi(gl)}Io(["click","keydown","pointermove","pointerup","pointerdown"]);Ps("pie-tool-graph",vs(Es,{visible:{attribute:"visible",type:"Boolean"},toolId:{attribute:"tool-id",type:"String"}},[],[],{mode:"open"},kl));function Ps(t,e){customElements.get(t)||customElements.define(t,e)}export{Es as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as
|
|
1
|
+
import{t as i}from"./defineProperty-a20a667d.js";function x(n,t=!1){if(typeof n=="boolean")return n;if(n==null)return t;const e=String(n).trim().toLowerCase();return e===""?t:["false","0","off","no"].includes(e)?!1:["true","1","on","yes"].includes(e)?!0:!!e}function C(n){return n!==null&&x(n,!0)}var p=(n,t)=>{const e=n.$$p_d;return e?Object.entries(e).some(([s,o])=>o.type==="Boolean"&&(o.attribute??s.toLowerCase())===t):!1};function V(n){const t=n.prototype.attributeChangedCallback;return class extends n{attributeChangedCallback(e,s,o){const r=o!==null&&p(this,e)&&!C(o)?null:o;t?.call(this,e,s,r)}}}function b(n,t,e){const s=t.ownerDocument?.defaultView?.Event??Event;return Object.assign(new s(n,{bubbles:!0,composed:!0}),e)}var h=new WeakSet,d=new WeakSet,v=(n,t)=>typeof t=="object"&&t!==null&&n.has(t),l=class{constructor(t,e,s,o){const r=b("context-request",e,{context:t,contextTarget:e,callback:s,subscribe:o??!1});return h.add(r),r}static[Symbol.hasInstance](t){return v(h,t)}},P=class{constructor(t,e){const s=b("context-provider",e,{context:t,contextTarget:e});return d.add(s),s}static[Symbol.hasInstance](t){return v(d,t)}},m=n=>{const t=[];for(const e of n)e.requestorRef.deref()&&e.callbackRef.deref()&&t.push(e);return t},R=class{constructor(n){i(this,"host",void 0),i(this,"pendingByContext",new Map),i(this,"attached",!1),i(this,"onContextRequest",t=>{if(t.cancelBubble)return;const e=t;if(e.subscribe!==!0||typeof e.callback!="function"||e.context===void 0)return;const s=e.contextTarget??t.composedPath?.()[0];if(!s)return;let o=this.pendingByContext.get(e.context);o||(o={callbacks:new WeakMap,requests:[]},this.pendingByContext.set(e.context,o));const r=e.callback;let c=o.callbacks.get(s);c||(c=new WeakSet,o.callbacks.set(s,c)),!c.has(r)&&(c.add(r),o.requests.push({requestorRef:new WeakRef(s),callbackRef:new WeakRef(r)}),o.requests=m(o.requests))}),i(this,"onContextProvider",t=>{const e=t.context;if(e===void 0)return;const s=this.pendingByContext.get(e);if(!(!s||s.requests.length===0)){this.pendingByContext.delete(e);for(const o of s.requests){const r=o.requestorRef.deref(),c=o.callbackRef.deref();!r||!c||r.dispatchEvent(new l(e,r,c,!0))}}}),this.host=n}attach(){this.attached||(this.attached=!0,this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onContextProvider))}detach(){this.attached&&(this.attached=!1,this.host.removeEventListener("context-request",this.onContextRequest),this.host.removeEventListener("context-provider",this.onContextProvider),this.pendingByContext.clear())}},f=Symbol.for("pie.context.documentRoot");function k(n){if(!n)return;const t=n;if(t[f])return;const e=n.documentElement;if(!e)return;const s=new R(e);s.attach(),t[f]=s}var q=class{constructor(n,t){i(this,"host",void 0),i(this,"context",void 0),i(this,"subscribe",void 0),i(this,"onValue",void 0),i(this,"isConnected",!1),i(this,"isDisconnected",!1),i(this,"unsubscribe",void 0),i(this,"currentValue",void 0),i(this,"handleValue",(e,s)=>{if(this.isDisconnected){s?.();return}s!==this.unsubscribe&&(this.unsubscribe?.(),this.unsubscribe=s),!this.subscribe&&this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0),this.currentValue=e,this.onValue?.(e)}),this.host=n,this.context=t.context,this.subscribe=t.subscribe??!0,this.onValue=t.onValue}connect(){this.isConnected||(this.isConnected=!0,this.isDisconnected=!1,this.subscribe&&k(this.host.ownerDocument),this.requestValue())}disconnect(){this.isConnected&&(this.isConnected=!1,this.isDisconnected=!0,this.unsubscribe?.(),this.unsubscribe=void 0)}get value(){return this.currentValue}requestValue(){this.host.dispatchEvent(new l(this.context,this.host,this.handleValue,this.subscribe))}},O=(n,t)=>{let e;return n.dispatchEvent(new l(t,n,s=>{e=s},!1)),e},u=(n,t,e)=>{const s=new q(n,{context:t,subscribe:!0,onValue:e});s.connect();const o=r=>{r.context===t&&s.requestValue()};return n.addEventListener("context-provider",o),()=>{n.removeEventListener("context-provider",o),s.disconnect()}},a=n=>n,E=a(Symbol.for("pie.assessmentToolkit.runtimeContext")),y=a(Symbol.for("pie.assessmentToolkit.hostRuntimeContext")),g=a(Symbol.for("pie.assessmentToolkit.shellContext")),S=a(Symbol.for("pie.assessmentToolkit.regionScopeContext")),T={bubbles:!0,composed:!0,cancelable:!1};function w(n,t,e={}){return new CustomEvent(n,{detail:t,...T,...e})}function W(n,t,e,s={}){return n.dispatchEvent(w(t,e,s))}function _(n,t){return u(n,E,t)}function I(n,t){return u(n,g,t)}function N(n,t){return u(n,S,t)}function j(n,t){return u(n,y,t)}function A(n,t){let e=null;function s(){e?.coordinator.unregisterTool(e.toolId),e=null}return{sync(o,r){!o||!r||e?.coordinator===o&&e.toolId===r||(s(),o.registerTool(r,n,void 0,t),e={coordinator:o,toolId:r})},release:s}}export{A as a,g as c,O as d,P as f,x as h,I as i,a as l,V as m,N as n,W as o,l as p,_ as r,S as s,j as t,u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var m=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),c=/^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/,i={delivery:"",author:"-config",print:"-print"},d=(e,r="custom element tag")=>{if(!e||typeof e!="string")throw new Error(`Invalid ${r}: expected a non-empty string`);const t=e.trim();if(!t)throw new Error(`Invalid ${r}: tag is empty`);if(t!==t.toLowerCase())throw new Error(`Invalid ${r} "${t}": custom element names must be lowercase`);if(!t.includes("-"))throw new Error(`Invalid ${r} "${t}": custom element names must include a hyphen`);if(m.has(t))throw new Error(`Invalid ${r} "${t}": this name is reserved by the HTML spec`);if(!c.test(t))throw new Error(`Invalid ${r} "${t}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);return t},w=(e,r,t)=>`${e}${t??(i[r]!==void 0?i[r]:"")}`,u=e=>typeof DOMException<"u"&&e instanceof DOMException?e.name==="NotSupportedError"||e.code===DOMException.NOT_SUPPORTED_ERR:(typeof e=="object"&&e!==null&&"name"in e?String(e.name):"")==="NotSupportedError",f=(e,r,t="custom element tag",a={})=>{const o=d(e,t);if(customElements.get(o))return{outcome:"already-defined",tagName:o};try{return customElements.define(o,r),{outcome:"defined",tagName:o}}catch(n){if(!u(n))return{outcome:"error",tagName:o,error:n};if(customElements.get(o))return{outcome:"already-defined",tagName:o};if(!a.allowWrappedFallback)return{outcome:"error",tagName:o,error:n};try{return customElements.define(o,class extends r{}),{outcome:"defined-wrapped",tagName:o}}catch(l){return{outcome:"wrapped-error",tagName:o,error:l}}}},g=(e,r,t="custom element tag")=>{const a=f(e,r,t);if(a.outcome==="error"||a.outcome==="wrapped-error")throw a.error;return{status:a.outcome==="already-defined"?"already-defined":"defined",tagName:a.tagName}},p=["assessment","section","item","passage","rubric"],E=new Set(p);function s(e){return E.has(e)}function v(e,r,t){const a=e.trim(),o=t.trim();if(!a||!o)throw new Error("Tool instance ids require non-empty tool and scope ids");if(!s(r))throw new Error(`Unknown tool scope level '${r}'. Register custom levels with registerToolScopeLevel().`);return`${a}:${r}:${o}`}function h(e){const r=e.split(":");if(r.length!==3)return null;const[t,a,o]=r;return!t||!o||!s(a)?null:{baseToolId:t,scopeLevel:a,scopeId:o}}export{d as a,w as i,h as n,g as r,v as t};
|