@pie-players/pie-section-player 0.3.75 → 1.0.0-beta.1
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 +845 -964
- package/custom-elements.json +3922 -0
- package/dist/browser/assets/{evaluation-worker-CORp9m0K.js → evaluation-worker-0xRDVTJx.js} +82215 -73234
- package/dist/browser/chunks/ToolCoordinator-0a6c4088.js +1 -0
- package/dist/browser/chunks/attribute-coercion-b93b482c.js +1 -0
- package/dist/browser/chunks/calculator-element-271c142f.js +8 -9
- package/dist/browser/chunks/catalog-context-46d3e50e.js +1 -1
- package/dist/browser/chunks/classPrivateFieldGet2-338e0179.js +1 -1
- package/dist/browser/chunks/classPrivateMethodInitSpec-563cd0a5.js +1 -0
- package/dist/browser/chunks/custom-element-define-2a92deb0.js +1 -0
- package/dist/browser/chunks/dist-41b39e7f.js +1 -1
- package/dist/browser/chunks/dist-ca9b9622.js +1 -1
- package/dist/browser/chunks/focus-trap-44913bf3.js +1 -1
- package/dist/browser/chunks/math-rendering-ready-9a0fd90a.js +1 -1
- package/dist/browser/chunks/mathjax-BKrHE4xs-3ca05bf6.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/pie-api-client-687c319a.js +1 -1
- package/dist/browser/chunks/provider-4c704118.js +1 -1
- package/dist/browser/chunks/runtime-YFqnU6ic-d5c0cb49.js +8605 -0
- package/dist/browser/chunks/{src-BcptuNS5-ed25d7fd.js → src-D_1goyPT-8cca0246.js} +81 -82
- package/dist/browser/chunks/{sre-engine-jd8cc08x-42d270e5.js → sre-engine-bj997w4b-891a4cbe.js} +1 -1
- package/dist/browser/chunks/term-lookup-632cf6b1.js +1 -0
- package/dist/browser/chunks/tool-annotation-toolbar-997438b4.js +5 -5
- package/dist/browser/chunks/tool-answer-eliminator-35483abd.js +6 -6
- package/dist/browser/chunks/tool-color-scheme-b7de5cdf.js +5 -5
- package/dist/browser/chunks/tool-dictionary-cecff3b4.js +3 -3
- package/dist/browser/chunks/tool-graph-cb0338e8.js +6 -6
- package/dist/browser/chunks/tool-host-contract-fae1c415.js +1 -0
- package/dist/browser/chunks/tool-instance-id-76ac45e2.js +1 -0
- package/dist/browser/chunks/tool-line-reader-f8ef3c6a.js +3 -3
- package/dist/browser/chunks/tool-periodic-table-43b133b8.js +13 -16
- package/dist/browser/chunks/tool-picture-dictionary-33721e91.js +3 -3
- package/dist/browser/chunks/tool-protractor-23f77028.js +6 -6
- package/dist/browser/chunks/tool-ruler-1d9a03a6.js +12 -9
- package/dist/browser/chunks/tool-tts-inline-98c2ce7a.js +24 -30
- package/dist/browser/chunks/toolbar-registration-helpers-a7ab1ad4.js +194 -0
- package/dist/browser/chunks/versioned-tag-54a76be9.js +1 -1
- package/dist/browser/pie-section-player.js +66 -65
- package/dist/chunks/nl-NL-364d61b9.js +34 -6
- package/dist/chunks/{sre-engine-jd8cc08x-42d270e5.js → sre-engine-bj997w4b-891a4cbe.js} +1 -1
- package/dist/component-definitions.d.ts +0 -2
- package/dist/components/shared/card-media-region.d.ts +3 -4
- package/dist/components/shared/framework-error-latch.d.ts +4 -2
- package/dist/components/shared/missing-tool-providers.d.ts +0 -6
- package/dist/components/shared/player-preload.d.ts +4 -9
- package/dist/components/shared/section-player-card-context.d.ts +0 -3
- package/dist/components/shared/section-player-host-runtime.d.ts +0 -2
- package/dist/components/shared/section-player-view-state.d.ts +0 -1
- package/dist/controllers/SectionController.d.ts +20 -6
- package/dist/pie-section-player.js +11279 -11191
- package/package.json +11 -9
- package/dist/browser/chunks/ToolCoordinator-cc2dc319.js +0 -1
- package/dist/browser/chunks/runtime-wcU7KOFU-ac86d7b8.js +0 -8536
- package/dist/browser/chunks/tool-host-contract-b93b482c.js +0 -1
- package/dist/browser/chunks/tool-instance-id-2a92deb0.js +0 -1
- package/dist/browser/chunks/tts-runtime-config-a7ab1ad4.js +0 -194
- /package/dist/browser/chunks/{ItemToolBar-jx38w99s-58defccc.js → ItemToolBar-66hcwmfw-3bcb82a3.js} +0 -0
- /package/dist/chunks/{ItemToolBar-jx38w99s-1287ba31.js → ItemToolBar-66hcwmfw-1287ba31.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
if(typeof window<"u"){var un,cn;((un=(cn=window).__svelte??(cn.__svelte={})).v??(un.v=new Set)).add("5")}var le={},R=Symbol("uninitialized"),An=Array.isArray,Hi=Array.prototype.indexOf,Tr=Array.prototype.includes,hr=Array.from,Ye=Object.keys,Le=Object.defineProperty,Jt=Object.getOwnPropertyDescriptor,Ji=Object.getOwnPropertyDescriptors,Bi=Object.prototype,Ki=Array.prototype,Pn=Object.getPrototypeOf,fn=Object.isExtensible,Ui=()=>{};function Gi(t){for(var e=0;e<t.length;e++)t[e]()}function Nn(){var t,e;return{promise:new Promise((r,n)=>{t=r,e=n}),resolve:t,reject:e}}function je(t){"@babel/helpers - typeof";return je=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},je(t)}function Xi(t,e){if(je(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(je(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Zi(t){var e=Xi(t,"string");return je(e)=="symbol"?e:e+""}function T(t,e,r){return(e=Zi(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var et=1024,ht=2048,Xt=4096,Hr=8192,Qi=16384,Jr=32768,hn=1<<25,Br=65536,ve=1<<19,Yi=1<<20,We=1<<25,vn=1<<21,to=1<<22,tr=1<<23,Ge=Symbol("$state"),On=Symbol("component"),Rn=Symbol("legacy props"),eo=Symbol(""),Lr=Symbol("attributes"),ro=Symbol("class"),no=Symbol("style"),Xe=Symbol("text"),Ee=Symbol("form reset"),Ce=new class extends Error{constructor(...t){super(...t),T(this,"name","StaleReactionError"),T(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},io=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function oo(){console.warn("https://svelte.dev/e/derived_inert")}function vr(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function so(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var q=!1;function Wt(t){q=t}var E;function J(t){if(t===null)throw vr(),le;return E=t}function dr(){return J(_t(E))}function Ct(t){if(q){if(_t(E)!==null)throw vr(),le;E=t}}function ao(t=1){if(q){for(var e=t,r=E;e--;)r=_t(r);E=r}}function er(t=!0){for(var e=0,r=E;;){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=_t(r);t&&r.remove(),r=i}}function Cn(t){if(!t||t.nodeType!==8)throw vr(),le;return t.data}function Dn(t){return t===this.v}function lo(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function In(t){return!lo(t,this.v)}function uo(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function co(t,e,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function fo(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ho(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function vo(t){throw new Error("https://svelte.dev/e/effect_orphan")}function po(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function go(){throw new Error("https://svelte.dev/e/hydration_failed")}function mo(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function yo(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function wo(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function bo(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function $o(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var de=!1,pr=!1,D=null;function ue(t){D=t}function zn(t,e=!1,r){D={p:D,i:!1,c:null,e:null,s:t,x:null,r:S,l:pr&&!e?{s:null,u:null,$:[]}:null}}function Fn(t){var e=D,r=e.e;if(r!==null){e.e=null;for(var n of r)hi(n)}return t!==void 0&&(e.x=t),e.i=!0,D=e.p,Vn(t)}function Vn(t={}){return Le(t,On,{value:!0}),t}function De(){return!pr||D!==null&&D.l===null}var Ft=[];function Hn(){var t=Ft;Ft=[],Gi(t)}function bt(t){if(Ft.length===0&&!qe){var e=Ft;queueMicrotask(()=>{e===Ft&&Hn()})}Ft.push(t)}function _o(){for(;Ft.length>0;)Hn()}var ko=~(ht|Xt|et);function P(t,e){t.f=t.f&ko|e}function Kr(t){(t.f&512)!==0||t.deps===null?P(t,et):P(t,Xt)}function Jn(t,e,r){(t.f&2048)!==0?e.add(t):t.f&4096&&r.add(t),P(t,et)}var dn=!1;function Bn(){dn||(dn=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e[Ee]?.()})},{capture:!0}))}function pe(t){var e=M,r=S;nt(null),$t(null);try{return t()}finally{nt(e),$t(r)}}function So(t,e,r,n=r){t.addEventListener(e,()=>pe(r));const i=t[Ee];i?t[Ee]=()=>{i(),n(!0)}:t[Ee]=()=>n(!0),Bn()}function xo(t,e,r,n){const i=De()?Ae:Ur;var o=t.filter(h=>!h.settled),a=e.map(i);if(r.length===0&&o.length===0){n(a);return}var l=S,c=Mo(),u=o.length===1?o[0].promise:o.length>1?Promise.all(o.map(h=>h.promise)):null;function f(h){if((l.f&16384)===0){c();try{n([...a,...h])}catch(w){wt(w,l)}rr()}}var v=Kn();if(r.length===0){u.then(()=>f([])).finally(v);return}function d(){Promise.all(r.map(h=>Wo(h))).then(f).catch(h=>wt(h,l)).finally(v)}u?u.then(()=>{c(),d(),rr()}):d()}function Mo(){var t=S,e=M,r=D,n=$;return function(i=!0){$t(t),nt(e),ue(r),i&&!(t.f&16384)&&(n?.activate(),n?.apply())}}function rr(t=!0){$t(null),nt(null),ue(null),t&&$?.deactivate()}function Kn(){var t=S,e=t.b,r=$,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 Ae(t){var e=2|ht;return S!==null&&(S.f|=ve),{ctx:D,deps:null,effects:null,equals:Dn,f:e,fn:t,reactions:null,rv:0,v:R,wv:0,parent:S,ac:null}}var Se=Symbol("obsolete");function Wo(t,e,r){let n=S;n===null&&uo();var i=void 0,o=Gt(R),a=!M,l=new Set;return Ho(()=>{var c=S,u=Nn();i=u.promise;try{Promise.resolve(t()).then(u.resolve,h=>{h!==Ce&&u.reject(h)}).finally(rr)}catch(h){u.reject(h),rr()}var f=$;if(a){if((c.f&32768)!==0)var v=Kn();if(n.b?.is_rendered())f.async_deriveds.get(c)?.reject(Se);else for(const h of l.values())h.reject(Se);l.add(u),f.async_deriveds.set(c,u)}const d=(h,w=void 0)=>{v?.(),l.delete(u),w!==Se&&(f.activate(),w?(o.f|=tr,fe(o,w)):(o.f&8388608&&(o.f^=tr),fe(o,h)),f.deactivate())};u.promise.then(d,h=>d(null,h||"unknown"))}),fi(()=>{for(const c of l)c.reject(Se)}),new Promise(c=>{function u(f){function v(){f===i?c(o):u(i)}f.then(v,v)}u(i)})}function pn(t){const e=Ae(t);return mi(e),e}function Ur(t){const e=Ae(t);return e.equals=In,e}function Eo(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)F(e[r])}}function Gr(t){var e,r=S,n=t.parent;if(!qt&&n!==null&&t.v!==R&&(n.f&24576)!==0)return oo(),t.v;$t(n);try{Eo(t),e=$i(t)}finally{$t(r)}return e}function Un(t){var e=Gr(t);if(!t.equals(e)&&(t.wv=wi(),(!$?.is_fork||t.deps===null)&&($!==null?($.capture(t,e,!0),nr?.capture(t,e,!0)):t.v=e,t.deps===null))){P(t,et);return}qt||(z!==null?(Yr()||$?.is_fork)&&z.set(t,e):Kr(t))}function qo(t){if(t.effects!==null)for(const e of t.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac!==null&&pe(()=>{e.ac.abort(Ce),e.ac=null}),e.fn!==null&&(e.teardown=Ui),Ne(e,0),rn(e))}function Gn(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&e.fn!==null&&he(e)}function Xn(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xr(t,e){Xn(t,e),e.add(t)}function b(t,e,r){Xn(t,e),e.set(t,r)}function k(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 g(t,e,r){return t.set(k(t,e),r),r}function s(t,e){return t.get(k(t,e))}var Zn,jr=null,ee=null,$=null,nr=null,z=null,Ar=null,qe=!1,yr=!1,Pe=null,ir=null,Qn=0,To=1,Pr=new WeakMap,Bt=new WeakMap,se=new WeakMap,or=new WeakMap,ze=new WeakMap,re=new WeakMap,Dt=new WeakMap,xe=new WeakMap,gt=new WeakMap,gn=new WeakMap,ce=new WeakMap,Et=new WeakMap,jt=new WeakMap,wr=new WeakMap,Fe=new WeakMap,O=new WeakSet,Zt=class Yn{constructor(){Xr(this,O),T(this,"id",To++),b(this,Pr,!1),T(this,"linked",!0),b(this,Bt,null),b(this,se,null),T(this,"async_deriveds",new Map),T(this,"current",new Map),T(this,"previous",new Map),b(this,or,new Set),b(this,ze,new Set),b(this,re,0),b(this,Dt,new Map),b(this,xe,null),b(this,gt,[]),b(this,gn,[]),b(this,ce,new Set),b(this,Et,new Set),b(this,jt,new Map),b(this,wr,new Set),T(this,"is_fork",!1),b(this,Fe,!1),ee===null?jr=ee=this:(g(se,ee,this),g(Bt,this,ee)),ee=this}skip_effect(e){s(jt,this).has(e)||s(jt,this).set(e,{d:[],m:[]}),s(wr,this).delete(e)}unskip_effect(e,r=n=>this.schedule(n)){var n=s(jt,this).get(e);if(n){s(jt,this).delete(e);for(var i of n.d)P(i,ht),r(i);for(i of n.m)P(i,Xt),r(i)}s(wr,this).add(e)}capture(e,r,n=!1){e.v!==R&&!this.previous.has(e)&&this.previous.set(e,e.v),!(e.f&8388608)&&(this.current.set(e,[r,n]),z?.set(e,r)),this.is_fork||(e.v=r)}activate(){$=this}deactivate(){$=null,z=null}flush(){try{yr=!0,$=this,k(O,this,sr).call(this)}finally{Qn=0,Ar=null,Pe=null,ir=null,yr=!1,$=null,z=null,yt.clear()}}discard(){for(const e of s(ze,this))e(this);s(ze,this).clear();for(const e of this.async_deriveds.values())e.reject(Se);k(O,this,ar).call(this),s(xe,this)?.resolve()}register_created_effect(e){s(gn,this).push(e)}increment(e,r){if(g(re,this,s(re,this)+1),e){let n=s(Dt,this).get(r)??0;s(Dt,this).set(r,n+1)}}decrement(e,r){if(g(re,this,s(re,this)-1),e){let n=s(Dt,this).get(r)??0;n===1?s(Dt,this).delete(r):s(Dt,this).set(r,n-1)}s(Fe,this)||(g(Fe,this,!0),bt(()=>{g(Fe,this,!1),this.linked&&this.flush()}))}transfer_effects(e,r){for(const n of e)s(ce,this).add(n);for(const n of r)s(Et,this).add(n);e.clear(),r.clear()}oncommit(e){s(or,this).add(e)}ondiscard(e){s(ze,this).add(e)}settled(){return(s(xe,this)??g(xe,this,Nn())).promise}static ensure(){if($===null){const e=$=new Yn;!yr&&!qe&&bt(()=>{s(Pr,e)||e.flush()})}return $}apply(){if(!de||!this.is_fork&&s(Bt,this)===null&&s(se,this)===null){z=null;return}z=new Map;for(const[r,[n]]of this.current)z.set(r,n);for(let r=jr;r!==null;r=s(se,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)z.has(n)||z.set(n,i)}}schedule(e){if(Ar=e,e.b?.is_pending&&(e.f&16777228)!==0&&(e.f&32768)===0){e.b.defer_effect(e);return}s(gt,this).push(e)}};Zn=Zt;function mn(){if(this.is_fork)return!0;for(const r of s(Dt,this).keys()){for(var t=r,e=!1;t.parent!==null;){if(s(jt,this).has(t)){e=!0;break}t=t.parent}if(!e)return!0}return!1}function Lo(){var t=[];for(const i of s(gt,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^=et}}r||t.push(e)}return g(gt,this,[]),t}function sr(){g(Pr,this,!0);for(const a of s(ce,this))s(Et,this).delete(a),P(a,ht),this.schedule(a);for(const a of s(Et,this))P(a,Xt),this.schedule(a);this.apply();for(var t=Pe=[],e=[],r=ir=[];s(gt,this).length>0;){Qn++>1e3&&(k(O,this,ar).call(this),No());for(const a of k(O,this,Lo).call(this))try{k(O,this,jo).call(this,a,t,e)}catch(l){throw ri(a),k(O,this,mn).call(this)||this.discard(),l}}if($=null,r.length>0){var n=Zn.ensure();for(const a of r)n.schedule(a)}if(Pe=null,ir=null,k(O,this,mn).call(this)){k(O,this,Ve).call(this,e),k(O,this,Ve).call(this,t);for(const[a,l]of s(jt,this))ei(a,l);r.length>0&&k(O,$,sr).call($);return}const i=k(O,this,Ao).call(this);if(i){k(O,this,Ve).call(this,e),k(O,this,Ve).call(this,t),k(O,i,Po).call(i,this);return}s(ce,this).clear(),s(Et,this).clear();for(const a of s(or,this))a(this);s(or,this).clear(),nr=this,yn(e),yn(t),nr=null,s(xe,this)?.resolve();var o=$;if(s(re,this)===0&&(s(gt,this).length===0||o!==null)&&k(O,this,ar).call(this),s(gt,this).length>0)if(o!==null){for(const a of s(gt,this))s(gt,o).push(a);g(gt,this,[])}else o=this;o!==null&&(yt.clear(),k(O,o,sr).call(o))}function jo(t,e,r){t.f^=et;for(var n=t.first;n!==null;){var i=n.f,o=(i&96)!==0;if(!(o&&(i&1024)!==0||(i&8192)!==0||s(jt,this).has(n))&&n.fn!==null){o?n.f^=et:(i&4)!==0?e.push(n):de&&(i&16777224)!==0?r.push(n):Ie(n)&&(i&16&&s(Et,this).add(n),he(n));var a=n.first;if(a!==null){n=a;continue}}for(;n!==null;){var l=n.next;if(l!==null){n=l;break}n=n.parent}}}function Ao(){for(var t=s(Bt,this);t!==null;){if(!t.is_fork){for(const[e,[,r]]of this.current)if(t.current.has(e)&&!r)return t}t=s(Bt,t)}return null}function Po(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(ce,t),s(Et,t));const e=r=>{var n=r.reactions;if(n!==null&&!((r.f&2)!==0&&(r.f&6144)===0))for(const a of n){var i=a.f;if((i&2)!==0)e(a);else{var o=a;i&4194320&&!this.async_deriveds.has(o)&&(s(Et,this).delete(o),P(o,ht),this.schedule(o))}}};for(const r of this.current.keys())e(r);this.oncommit(()=>t.discard()),k(O,t,ar).call(t),$=this,k(O,this,sr).call(this)}function Ve(t){for(var e=0;e<t.length;e+=1)Jn(t[e],s(ce,this),s(Et,this))}function ar(){if(this.linked){var t=s(Bt,this),e=s(se,this);t===null?jr=e:g(se,t,e),e===null?ee=t:g(Bt,e,t),this.linked=!1}}function st(t){var e=qe;qe=!0;try{var r;for(t&&($!==null&&!$.is_fork&&$.flush(),r=t());;){if(_o(),$===null)return r;$.flush()}}finally{qe=e}}function No(){try{po()}catch(t){wt(t,Ar)}}var pt=null;function yn(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&24576)===0&&Ie(n)&&(pt=new Set,he(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&di(n),pt?.size>0)){yt.clear();for(const i of pt){if((i.f&24576)!==0)continue;const o=[i];let a=i.parent;for(;a!==null;)pt.has(a)&&(pt.delete(a),o.push(a)),a=a.parent;for(let l=o.length-1;l>=0;l--){const c=o[l];!(c.f&24576)&&he(c)}}pt.clear()}}pt=null}}function ti(t){$.schedule(t)}function ei(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),P(t,et);for(var r=t.first;r!==null;)ei(r,e),r=r.next}}function ri(t){P(t,et);for(var e=t.first;e!==null;)ri(e),e=e.next}var lr=new Set,yt=new Map,ni=!1;function Gt(t,e){return{f:0,v:t,reactions:null,equals:Dn,rv:0,wv:0}}function dt(t,e){const r=Gt(t,e);return mi(r),r}function ii(t,e=!1,r=!0){const n=Gt(t);if(e||(n.equals=In),pr&&r&&D!==null&&D.l!==null){var i;((i=D.l).s??(i.s=[])).push(n)}return n}function Y(t,e,r=!1){return M!==null&&(!at||M.f&131072)&&De()&&M.f&4325394&&(ut===null||!ut.has(t))&&bo(),fe(t,r?Vt(e):e,ir)}var It=null,Nr=0;function fe(t,e,r=null){if(!t.equals(e)){qt?yt.set(t,e):yt.has(t)||yt.set(t,t.v);var n=Zt.ensure();if(n.capture(t,e),(t.f&2)!==0){const i=t;t.f&2048&&Gr(i),z===null&&Kr(i)}t.wv=wi(),It=null,Nr=0,oi(t,ht,r),It=null,De()&&S!==null&&S.f&1024&&!(S.f&96)&&(Q===null?Uo([t]):Q.push(t)),!n.is_fork&&lr.size>0&&!ni&&Oo()}return e}function Oo(){ni=!1;for(const t of lr){t.f&1024&&P(t,Xt);let e;try{e=Ie(t)}catch{e=!0}e&&he(t)}lr.clear()}function Te(t){Y(t,t.v+1)}function oi(t,e,r){var n=t.reactions;if(n!==null){var i=De(),o=n.length;if(Nr+=o,Nr>1e5&&It===null&&(It=new Set),It!==null){if(It.has(t))return;It.add(t)}for(var a=0;a<o;a++){var l=n[a],c=l.f;if(!(!i&&l===S)){var u=(c&ht)===0;if(u&&P(l,e),(c&131072)!==0)lr.add(l);else if((c&2)!==0){var f=l;z?.delete(f),oi(f,Xt,r)}else if(u){var v=l;c&16&&pt!==null&&pt.add(v),r!==null?r.push(v):ti(v)}}}}}function Vt(t){if(typeof t!="object"||t===null||Ge in t||On in t)return t;const e=Pn(t);if(e!==Bi&&e!==Ki)return t;var r=new Map,n=An(t),i=dt(0),o=null,a=Kt,l=c=>{if(Kt===a)return c();var u=M,f=Kt;nt(null),_n(a);var v=c();return nt(u),_n(f),v};return n&&r.set("length",dt(t.length,o)),new Proxy(t,{defineProperty(c,u,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&yo();var v=r.get(u);return v===void 0?l(()=>{var d=dt(f.value,o);return r.set(u,d),d}):Y(v,f.value,!0),!0},deleteProperty(c,u){var f=r.get(u);if(f===void 0){if(u in c){const v=l(()=>dt(R,o));r.set(u,v),Te(i)}}else Y(f,R),Te(i);return!0},get(c,u,f){if(u===Ge)return t;var v=r.get(u),d=u in c;if(v===void 0&&(!d||Jt(c,u)?.writable)&&(v=l(()=>dt(Vt(d?c[u]:R),o)),r.set(u,v)),v!==void 0){var h=_(v);return h===R?void 0:h}return Reflect.get(c,u,f)},getOwnPropertyDescriptor(c,u){this.has?.(c,u);var f=Reflect.getOwnPropertyDescriptor(c,u),v=r.get(u);if(v!==void 0){var d=_(v);if(d===R)return;if(f&&"value"in f)f.value=d;else return{enumerable:!0,configurable:!0,value:d,writable:!0}}return f},has(c,u){if(u===Ge)return!0;var f=r.get(u),v=f!==void 0&&f.v!==R||Reflect.has(c,u);return(f!==void 0||S!==null&&(!v||Jt(c,u)?.writable))&&(f===void 0&&(f=l(()=>dt(v?Vt(c[u]):R,o)),r.set(u,f)),_(f)===R)?!1:v},set(c,u,f,v){var d=r.get(u),h=u in c;if(n&&u==="length")for(var w=f;w<d.v;w+=1){var x=r.get(w+"");x!==void 0?Y(x,R):w in c&&(x=l(()=>dt(R,o)),r.set(w+"",x))}if(d===void 0)(!h||Jt(c,u)?.writable)&&(d=l(()=>dt(void 0,o)),Y(d,Vt(f)),r.set(u,d));else{h=d.v!==R;var p=l(()=>Vt(f));Y(d,p)}var m=Reflect.getOwnPropertyDescriptor(c,u);if(m?.set&&m.set.call(v,f),!h){if(n&&typeof u=="string"){var A=r.get("length"),L=Number(u);Number.isInteger(L)&&L>=A.v&&Y(A,L+1)}Te(i)}return!0},ownKeys(c){_(i);var u=Reflect.ownKeys(c).filter(d=>{var h=r.get(d);return h===void 0||h.v!==R});for(var[f,v]of r)v.v!==R&&!(f in c)&&u.push(f);return u},setPrototypeOf(){wo()}})}var wn,si,ai,li;function Or(){if(wn===void 0){wn=window,si=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;ai=Jt(e,"firstChild").get,li=Jt(e,"nextSibling").get,fn(t)&&(t[ro]=void 0,t[Lr]=null,t[no]=void 0,t.__e=void 0),fn(r)&&(r[Xe]=void 0)}}function tt(t=""){return document.createTextNode(t)}function Pt(t){return ai.call(t)}function _t(t){return li.call(t)}function ne(t,e){if(!q)return Pt(t);var r=Pt(E);if(r===null)r=E.appendChild(tt());else if(e&&r.nodeType!==3){var n=tt();return r?.before(n),J(n),n}return e&&Qr(r),J(r),r}function Ro(t,e=!1){if(!q){var r=Pt(t);return r instanceof Comment&&r.data===""?_t(r):r}if(e){if(E?.nodeType!==3){var n=tt();return E?.before(n),J(n),n}Qr(E)}return E}function ye(t,e=!1){if(!q)return Pt(t);var r=ne(t,e);return Ct(t),r}function we(t,e=1,r=!1){let n=q?E:t;for(var i;e--;)i=n,n=_t(n);if(!q)return n;if(r){if(n?.nodeType!==3){var o=tt();return n===null?i?.after(o):n.before(o),J(o),o}Qr(n)}return J(n),n}function ui(t){t.textContent=""}function ci(){return!de||pt!==null?!1:(S.f&Jr)!==0}function Zr(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 Qr(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 Co(t){var e=S;if(e===null)return M.f|=tr,t;if((e.f&32768)===0&&(e.f&4)===0)throw t;wt(t,e)}function wt(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 Do(t){S===null&&(M===null&&vo(t),ho()),qt&&fo(t)}function Io(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function kt(t,e){var r=S;r!==null&&r.f&8192&&(t|=Hr);var n={ctx:D,deps:null,nodes:null,f:t|ht|512,first:null,fn:e,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};$?.register_created_effect(n);var i=n;if((t&4)!==0)Pe!==null?Pe.push(n):Zt.ensure().schedule(n);else if(e!==null){try{he(n)}catch(a){throw F(n),a}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|=Br))}if(i!==null&&(i.parent=r,r!==null&&Io(i,r),M!==null&&(M.f&2)!==0&&(t&64)===0)){var o=M;(o.effects??(o.effects=[])).push(i)}return n}function Yr(){return M!==null&&!at}function fi(t){const e=kt(8,null);return P(e,et),e.teardown=t,e}function bn(t){Do("$effect");var e=S.f;if(!M&&(e&32)!==0&&D!==null&&!D.i){var r=D;(r.e??(r.e=[])).push(t)}else return hi(t)}function hi(t){return kt(4|Yi,t)}function zo(t){Zt.ensure();const e=kt(64|ve,t);return()=>{F(e)}}function Fo(t){Zt.ensure();const e=kt(64|ve,t);return(r={})=>new Promise(n=>{r.outro?Qt(e,()=>{F(e),n(void 0)}):(F(e),n(void 0))})}function Vo(t){return kt(4,t)}function Ho(t){return kt(to|ve,t)}function tn(t,e=0){return kt(8|e,t)}function te(t,e=[],r=[],n=[]){xo(n,e,r,i=>{kt(8,()=>{t(...i.map(_))})})}function en(t,e=0){return kt(16|e,t)}function rt(t){return kt(32|ve,t)}function vi(t){var e=t.teardown;if(e!==null){const r=qt,n=M;$n(!0),nt(null);try{e.call(null)}catch(i){wt(i,t.parent)}finally{$n(r),nt(n)}}}function rn(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&pe(()=>{i.abort(Ce)});var n=r.next;(r.f&64)!==0?r.parent=null:F(r,e),r=n}}function Jo(t){for(var e=t.first;e!==null;){var r=e.next;!(e.f&32)&&F(e),e=r}}function F(t,e=!0){var r=!1;(e||t.f&262144)&&t.nodes!==null&&t.nodes.end!==null&&(Bo(t.nodes.start,t.nodes.end),r=!0),t.f|=hn,rn(t,e&&!r),Ne(t,0);var n=t.nodes&&t.nodes.t;if(n!==null)for(const o of n)o.stop();vi(t),t.f^=hn,t.f|=Qi;var i=t.parent;i!==null&&i.first!==null&&di(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function Bo(t,e){for(;t!==null;){var r=t===e?null:_t(t);t.remove(),t=r}}function di(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 Qt(t,e,r=!0){var n=[];t.f|=256,pi(t,n,!0);var i=()=>{r&&F(t),e&&e()},o=n.length;if(o>0){var a=()=>--o||i();for(var l of n)l.out(a)}else i()}function pi(t,e,r){if((t.f&8192)===0){t.f^=Hr;var n=t.nodes&&t.nodes.t;if(n!==null)for(const l of n)(l.is_global||r)&&e.push(l);for(var i=t.first;i!==null;){var o=i.next;if((i.f&64)===0){var a=(i.f&65536)!==0||(i.f&32)!==0&&(t.f&16)!==0;pi(i,e,a?r:!1)}i=o}}}function ur(t){t.f&=-257,gi(t,!0)}function gi(t,e){if((t.f&256)===0&&(t.f&8192)!==0){t.f^=Hr,!(t.f&1024)&&(P(t,ht),Zt.ensure().schedule(t));for(var r=t.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;gi(r,i?e:!1),r=n}var o=t.nodes&&t.nodes.t;if(o!==null)for(const a of o)(a.is_global||e)&&a.in()}}function nn(t,e){if(t.nodes)for(var r=t.nodes.start,n=t.nodes.end;r!==null;){var i=r===n?null:_t(r);e.append(r),r=i}}var Ko=null,Ze=!1,qt=!1;function $n(t){qt=t}var M=null,at=!1;function nt(t){M=t}var S=null;function $t(t){S=t}var ut=null;function mi(t){M!==null&&(M.f&2097152||M.f&2)&&(ut??(ut=new Set)).add(t)}var H=null,K=0,Q=null;function Uo(t){Q=t}var yi=1,Ht=0,Kt=Ht;function _n(t){Kt=t}function wi(){return++yi}function Ie(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 o=r[i];if(Ie(o)&&Un(o),o.wv>t.wv)return!0}e&512&&z===null&&P(t,et)}return!1}function bi(t,e,r=!0){var n=t.reactions;if(n!==null&&!(!de&&ut!==null&&ut.has(t)))for(var i=0;i<n.length;i++){var o=n[i];(o.f&2)!==0?bi(o,e,!1):e===o&&(r?P(o,ht):o.f&1024&&P(o,Xt),ti(o))}}function $i(t){var e=H,r=K,n=Q,i=M,o=ut,a=D,l=at,c=Kt,u=t.f;H=null,K=0,Q=null,M=(u&96)===0?t:null,ut=null,ue(t.ctx),at=!1,Kt=++Ht,t.ac!==null&&(pe(()=>{t.ac.abort(Ce)}),t.ac=null);try{t.f|=vn;var f=t.fn,v=f();t.f|=Jr;var d=kn(t);if(De()&&Q!==null&&!at&&d!==null&&(t.f&6146)===0)for(var h=0;h<Q.length;h++)bi(Q[h],t);if(i!==null&&i!==t){if(Ht++,i.deps!==null)for(let w=0;w<r;w+=1)i.deps[w].rv=Ht;if(e!==null)for(const w of e)w.rv=Ht;Q!==null&&(n===null?n=Q:n.push(...Q))}return t.f&8388608&&(t.f^=tr),v}catch(w){return kn(t),Co(w)}finally{t.f^=vn,H=e,K=r,Q=n,M=i,ut=o,ue(a),at=l,Kt=c}}function kn(t){var e=t.deps,r=$?.is_fork;if(H!==null){var n;if(r||Ne(t,K),e!==null&&K>0)for(e.length=K+H.length,n=0;n<H.length;n++)e[K+n]=H[n];else t.deps=e=H;if(Yr()&&(t.f&512)!==0)for(n=K;n<e.length;n++){var i;((i=e[n]).reactions??(i.reactions=[])).push(t)}}else!r&&e!==null&&K<e.length&&(Ne(t,K),e.length=K);return e}function Go(t,e){let r=e.reactions;if(r!==null){var n=Hi.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&&(H===null||!Tr.call(H,e))){var o=e;o.f&512&&(o.f^=512),o.v!==R&&Kr(o),o.ac!==null&&pe(()=>{o.ac.abort(Ce),o.ac=null,P(o,ht)}),qo(o),Ne(o,0)}}function Ne(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Go(t,r[n])}function he(t){var e=t.f;if((e&16384)===0){P(t,et);var r=S,n=Ze;S=t,Ze=(e&96)===0;try{(e&16777232)!==0?Jo(t):rn(t),vi(t);var i=$i(t);t.teardown=typeof i=="function"?i:null,t.wv=yi}finally{Ze=n,S=r}}}async function Xo(){if(de)return new Promise(t=>{requestAnimationFrame(()=>t()),setTimeout(()=>t())});await Promise.resolve(),st()}function _(t){var e=(t.f&2)!==0;if(Ko?.add(t),M!==null&&!at&&!(S!==null&&(S.f&16384)!==0)&&(ut===null||!ut.has(t))){var r=M.deps;if((M.f&2097152)!==0)t.rv<Ht&&(t.rv=Ht,H===null&&r!==null&&r[K]===t?K++:H===null?H=[t]:H.push(t));else{var n;(n=M).deps??(n.deps=[]),Tr.call(M.deps,t)||M.deps.push(t);var i=t.reactions;i===null?t.reactions=[M]:Tr.call(i,M)||i.push(M)}}if(qt&&yt.has(t))return yt.get(t);if(e){var o=t;if(qt){var a=o.v;return(!(o.f&1024)&&o.reactions!==null||ki(o))&&(a=Gr(o)),yt.set(o,a),a}var l=(o.f&512)===0&&!at&&M!==null&&(Ze||(M.f&512)!==0),c=(o.f&Jr)===0;Ie(o)&&(l&&(o.f|=512),Un(o)),l&&!c&&(Gn(o),_i(o))}if(z?.has(t))return z.get(t);if((t.f&8388608)!==0)throw t.v;return t.v}function _i(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)&&(Gn(e),_i(e))}function ki(t){if(t.v===R)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(yt.has(e)||(e.f&2)!==0&&ki(e))return!0;return!1}function Oe(t){var e=at;try{return at=!0,t()}finally{at=e}}var He=Symbol("events"),Zo=new Set,Sn=new Set;function Qo(t,e,r,n={}){function i(o){if(n.capture||Rr.call(e,o),!o.cancelBubble)return pe(()=>r?.call(this,o))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?(i.__removed=!1,bt(()=>{i.__removed||e.addEventListener(t,i,n)})):e.addEventListener(t,i,n),i}function Yo(t,e,r,n,i){var o={capture:n,passive:i},a=Qo(t,e,r,o);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&fi(()=>{a.__removed=!0,e.removeEventListener(t,a,o)})}var br=null,$r=!1;function Rr(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],o=i[0]||t.target;br=t,$r||($r=!0,setTimeout(()=>{$r=!1,br=null}));var a=0,l=br===t&&t[He];if(l){var c=i.indexOf(l);if(c!==-1&&(e===document||e===window)){t[He]=e;return}var u=i.indexOf(e);if(u===-1)return;c<=u&&(a=c)}if(o=i[a]||t.target,o!==e){Le(t,"currentTarget",{configurable:!0,get(){return o||r}});var f=M,v=S;nt(null),$t(null);try{for(var d,h=[];o!==null&&o!==e;){try{var w=o[He]?.[n];w!=null&&(!o.disabled||t.target===o)&&w.call(o,t)}catch(x){d?h.push(x):d=x}if(t.cancelBubble)break;a++,o=a<i.length?i[a]:null}if(d){for(let x of h)queueMicrotask(()=>{throw x});throw d}}finally{t[He]=e,delete t.currentTarget,nt(f),$t(v)}}}var ts=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function es(t){return ts?.createHTML(t)??t}function rs(t){var e=Zr("template");return e.innerHTML=es(t.replaceAll("<!>","<!---->")),e.content}function ae(t,e){var r=S;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function Nt(t,e){var r=(e&1)!==0,n=(e&2)!==0,i,o=!t.startsWith("<!>");return()=>{if(q)return ae(E,null),E;i===void 0&&(i=rs(o?t:"<!>"+t),r||(i=Pt(i)));var a=n||si?document.importNode(i,!0):i.cloneNode(!0);if(r){var l=Pt(a),c=a.lastChild;ae(l,c)}else ae(a,a);return a}}function ns(){if(q)return ae(E,null),E;var t=document.createDocumentFragment(),e=document.createComment(""),r=tt();return t.append(e,r),ae(e,r),t}function ot(t,e){if(q){var r=S;(!(r.f&32768)||r.nodes.end===null)&&(r.nodes.end=E),dr();return}t!==null&&t.before(e)}var is=["touchstart","touchmove"];function os(t){return is.includes(t)}function ss(t){let e=0,r=Gt(0),n;return()=>{Yr()&&(_(r),tn(()=>(e===0&&(n=Oe(()=>t(()=>Te(r)))),e+=1,()=>{bt(()=>{e-=1,e===0&&(n?.(),n=void 0,Te(r))})})))}}var as=Br|ve;function ls(t,e,r,n){new us(t,e,r,n)}var ct=new WeakMap,Cr=new WeakMap,mt=new WeakMap,Re=new WeakMap,U=new WeakMap,ft=new WeakMap,G=new WeakMap,lt=new WeakMap,At=new WeakMap,ie=new WeakMap,Ut=new WeakMap,Je=new WeakMap,Dr=new WeakMap,Ir=new WeakMap,Ot=new WeakMap,xn=new WeakMap,C=new WeakSet,us=class{constructor(t,e,r,n){Xr(this,C),T(this,"parent",void 0),T(this,"is_pending",!1),T(this,"transform_error",void 0),b(this,ct,void 0),b(this,Cr,q?E:null),b(this,mt,void 0),b(this,Re,void 0),b(this,U,void 0),b(this,ft,null),b(this,G,null),b(this,lt,null),b(this,At,null),b(this,ie,0),b(this,Ut,0),b(this,Je,!1),b(this,Dr,new Set),b(this,Ir,new Set),b(this,Ot,null),b(this,xn,ss(()=>(g(Ot,this,Gt(s(ie,this))),()=>{g(Ot,this,null)}))),g(ct,this,t),g(mt,this,e),g(Re,this,i=>{var o=S;o.b=this,o.f|=128,r(i)}),this.parent=S.b,this.transform_error=n??this.parent?.transform_error??(i=>i),g(U,this,en(()=>{if(q){const i=s(Cr,this);dr();const o=i.data==="[!";if(i.data.startsWith("[?")){const a=JSON.parse(i.data.slice(2));k(C,this,fs).call(this,a)}else o?k(C,this,hs).call(this):k(C,this,cs).call(this)}else k(C,this,xi).call(this)},as)),q&&g(ct,this,E)}defer_effect(t){Jn(t,s(Dr,this),s(Ir,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!s(mt,this).pending}update_pending_count(t,e){k(C,this,Mi).call(this,t,e),g(ie,this,s(ie,this)+t),s(Ot,this)&&!s(Je,this)&&(g(Je,this,!0),bt(()=>{g(Je,this,!1),s(Ot,this)&&fe(s(Ot,this),s(ie,this))}))}get_effect_pending(){return s(xn,this).call(this),_(s(Ot,this))}error(t){if(!s(mt,this).onerror&&!s(mt,this).failed)throw t;$?.is_fork?(s(ft,this)&&$.skip_effect(s(ft,this)),s(G,this)&&$.skip_effect(s(G,this)),s(lt,this)&&$.skip_effect(s(lt,this)),$.oncommit(()=>{k(C,this,Mn).call(this,t)})):k(C,this,Mn).call(this,t)}};function cs(){try{g(ft,this,rt(()=>s(Re,this).call(this,s(ct,this))))}catch(t){this.error(t)}}function fs(t){const e=s(mt,this).failed,{reset:r,invoke_onerror:n}=k(C,this,Si).call(this,t);bt(n),e&&g(lt,this,rt(()=>{e(s(ct,this),()=>t,()=>r)}))}function Si(t){var e=!1,r=!1;const n=()=>{if(e){so();return}e=!0,r&&$o(),s(lt,this)!==null&&Qt(s(lt,this),()=>{g(lt,this,null)}),k(C,this,on).call(this,()=>{k(C,this,xi).call(this)})};return{reset:n,invoke_onerror:()=>{try{r=!0,s(mt,this).onerror?.(t,n),r=!1}catch(i){wt(i,s(U,this)&&s(U,this).parent)}}}}function hs(){const t=s(mt,this).pending;t&&(this.is_pending=!0,g(G,this,rt(()=>t(s(ct,this)))),bt(()=>{var e=g(At,this,document.createDocumentFragment()),r=tt(),n=!1;if(e.append(r),g(ft,this,k(C,this,on).call(this,()=>{try{return rt(()=>s(Re,this).call(this,r))}catch(i){try{this.error(i),n=!0}catch(o){wt(o,s(U,this).parent)}return null}})),s(ft,this)===null){g(At,this,null),n&&k(C,this,cr).call(this,$);return}s(Ut,this)===0&&(s(ct,this).before(e),g(At,this,null),Qt(s(G,this),()=>{g(G,this,null)}),k(C,this,cr).call(this,$))}))}function xi(){try{if(this.is_pending=this.has_pending_snippet(),g(Ut,this,0),g(ie,this,0),g(ft,this,rt(()=>{s(Re,this).call(this,s(ct,this))})),s(Ut,this)>0){var t=g(At,this,document.createDocumentFragment());nn(s(ft,this),t);const e=s(mt,this).pending;g(G,this,rt(()=>e(s(ct,this))))}else k(C,this,cr).call(this,$)}catch(e){this.error(e)}}function cr(t){this.is_pending=!1,t.transfer_effects(s(Dr,this),s(Ir,this))}function on(t){var e=S,r=M,n=D;$t(s(U,this)),nt(s(U,this)),ue(s(U,this).ctx);try{return Zt.ensure(),t()}finally{$t(e),nt(r),ue(n)}}function Mi(t,e){if(!this.has_pending_snippet()){if(this.parent){var r;k(C,r=this.parent,Mi).call(r,t,e)}return}g(Ut,this,s(Ut,this)+t),s(Ut,this)===0&&(k(C,this,cr).call(this,e),s(G,this)&&Qt(s(G,this),()=>{g(G,this,null)}),s(At,this)&&(s(ct,this).before(s(At,this)),g(At,this,null)))}function Mn(t){s(ft,this)&&(F(s(ft,this)),g(ft,this,null)),s(G,this)&&(F(s(G,this)),g(G,this,null)),s(lt,this)&&(F(s(lt,this)),g(lt,this,null)),q&&(J(s(Cr,this)),ao(),J(er()));let e=s(mt,this).failed;const r=n=>{const{reset:i,invoke_onerror:o}=k(C,this,Si).call(this,n);o(),e&&g(lt,this,k(C,this,on).call(this,()=>{try{return rt(()=>{var a=S;a.b=this,a.f|=128,e(s(ct,this),()=>n,()=>i)})}catch(a){return wt(a,s(U,this).parent),null}}))};bt(()=>{var n;try{n=this.transform_error(t)}catch(i){wt(i,s(U,this)&&s(U,this).parent);return}n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(r,i=>wt(i,s(U,this)&&s(U,this).parent)):r(n)})}function be(t,e){var r=e==null?"":typeof e=="object"?`${e}`:e;r!==(t[Xe]??(t[Xe]=t.nodeValue))&&(t[Xe]=r,t.nodeValue=`${r}`)}function Wi(t,e){return Ei(t,e)}function vs(t,e){Or(),e.intro=e.intro??!1;const r=e.target,n=q,i=E;try{for(var o=Pt(r);o&&(o.nodeType!==8||o.data!=="[");)o=_t(o);if(!o)throw le;Wt(!0),J(o);const a=Ei(t,{...e,anchor:o});return Wt(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
2
|
-
`).some(l=>l.startsWith("https://svelte.dev/e/")))throw a;return a!==le&&console.warn("Failed to hydrate: ",a),e.recover===!1&&go(),Or(),ui(r),Wt(!1),Wi(t,e)}finally{Wt(n),J(i)}}var Be=new Map;function Ei(t,{target:e,anchor:r,props:n={},events:i,context:o,intro:a=!0,transformError:l}){Or();var c=void 0,u=Fo(()=>{var f=r??e.appendChild(tt());ls(f,{pending:()=>{}},h=>{zn({});var w=D;if(o&&(w.c=o),i&&(n.$$events=i),q&&ae(h,null),c=t(h,n)||Vn(),q&&(S.nodes.end=E,E===null||E.nodeType!==8||E.data!=="]"))throw vr(),le;Fn()},l);var v=new Set,d=h=>{for(var w=0;w<h.length;w++){var x=h[w];if(!v.has(x)){v.add(x);var p=os(x);for(const L of[e,document]){var m=Be.get(L);m===void 0&&(m=new Map,Be.set(L,m));var A=m.get(x);A===void 0?(L.addEventListener(x,Rr,{passive:p}),m.set(x,1)):m.set(x,A+1)}}}};return d(hr(Zo)),Sn.add(d),()=>{for(var h of v)for(const p of[e,document]){var w=Be.get(p),x=w.get(h);--x==0?(p.removeEventListener(h,Rr),w.delete(h),w.size===0&&Be.delete(p)):w.set(h,x)}Sn.delete(d),f!==r&&f.parentNode?.removeChild(f)}});return zr.set(c,u),c}var zr=new WeakMap;function ds(t,e){const r=zr.get(t);return r?(zr.delete(t),r(e)):Promise.resolve()}var xt=new WeakMap,Tt=new WeakMap,it=new WeakMap,$e=new WeakMap,_r=new WeakMap,kr=new WeakMap,Wn=new WeakMap,ps=class{constructor(t,e=!0){T(this,"anchor",void 0),b(this,xt,new Map),b(this,Tt,new Map),b(this,it,new Map),b(this,$e,new Set),b(this,_r,!0),b(this,kr,r=>{if(s(xt,this).has(r)){var n=s(xt,this).get(r),i=s(Tt,this).get(n);if(i)ur(i),s($e,this).delete(n);else{var o=s(it,this).get(n);o&&(ur(o.effect),s(Tt,this).set(n,o.effect),s(it,this).delete(n),o.fragment.lastChild.remove(),this.anchor.before(o.fragment),i=o.effect)}for(const[a,l]of s(xt,this)){if(s(xt,this).delete(a),a===r)break;const c=s(it,this).get(l);c&&(F(c.effect),s(it,this).delete(l))}for(const[a,l]of s(Tt,this)){if(a===n||s($e,this).has(a))continue;const c=()=>{if(Array.from(s(xt,this).values()).includes(a)){var u=document.createDocumentFragment();nn(l,u),u.append(tt()),s(it,this).set(a,{effect:l,fragment:u})}else F(l);s($e,this).delete(a),s(Tt,this).delete(a)};s(_r,this)||!i?(s($e,this).add(a),Qt(l,c,!1)):c()}}}),b(this,Wn,r=>{s(xt,this).delete(r);const n=Array.from(s(xt,this).values());for(const[i,o]of s(it,this))n.includes(i)||(F(o.effect),s(it,this).delete(i))}),this.anchor=t,g(_r,this,e)}ensure(t,e){var r=$,n=ci();if(e&&!s(Tt,this).has(t)&&!s(it,this).has(t))if(n){var i=document.createDocumentFragment(),o=tt();i.append(o),s(it,this).set(t,{effect:rt(()=>e(o)),fragment:i})}else s(Tt,this).set(t,rt(()=>e(this.anchor)));if(s(xt,this).set(r,t),n){for(const[a,l]of s(Tt,this))a===t?r.unskip_effect(l):r.skip_effect(l);for(const[a,l]of s(it,this))a===t?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(s(kr,this)),r.ondiscard(s(Wn,this))}else q&&(this.anchor=E),s(kr,this).call(this,r)}};function Sr(t,e,r=!1){var n;q&&(n=E,dr());var i=new ps(t),o=r?Br:0;function a(l,c){if(q){var u=Cn(n);if(l!==parseInt(u.substring(1))){var f=er();J(f),i.anchor=f,Wt(!1),i.ensure(l,c),Wt(!0);return}}i.ensure(l,c)}en(()=>{var l=!1;e((c,u=0)=>{l=!0,a(u,c)}),l||a(-1,null)},o)}function gs(t,e,r){for(var n=[],i=e.length,o,a=e.length,l=0;l<i;l++){let v=e[l];Qt(v,()=>{if(o){if(o.pending.delete(v),o.done.add(v),o.pending.size===0){var d=t.outrogroups;Fr(t,hr(o.done)),d.delete(o),d.size===0&&(t.outrogroups=null)}}else a-=1},!1)}if(a===0){var c=n.length===0&&r!==null&&t.pending.size===0;if(c){var u=r,f=u.parentNode;ui(f),f.append(u),t.items.clear()}Fr(t,e,!c)}else o={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(o)}function Fr(t,e,r=!0){var n;if(t.pending.size>0){n=new Set;for(const a of t.pending.values())for(const l of a)n.add(t.items.get(l).e)}for(var i=0;i<e.length;i++){var o=e[i];n?.has(o)?(o.f|=We,nn(o,document.createDocumentFragment())):F(e[i],r)}}var Ke;function ms(t,e,r,n,i,o=null){var a=t,l=new Map;if((e&4)!==0){var c=t;a=q?J(Pt(c)):c.appendChild(tt())}q&&dr();var u=null,f=Ur(()=>{var m=r();return An(m)?m:m==null?[]:hr(m)}),v,d=new Map,h=!0;function w(m){!(p.effect.f&16384)&&(p.pending.delete(m),p.fallback=u,ys(p,v,a,e,n),u!==null&&(v.length===0?(u.f&33554432)===0?ur(u):(u.f^=We,Me(u,null,a)):Qt(u,()=>{u=null})))}function x(m){p.pending.delete(m)}var p={effect:en(()=>{v=_(f);var m=v.length;let A=!1;q&&Cn(a)==="[!"!=(m===0)&&(a=er(),J(a),Wt(!1),A=!0);for(var L=new Set,W=$,X=ci(),y=0;y<m;y+=1){q&&E.nodeType===8&&E.data==="]"&&(a=E,A=!0,Wt(!1));var N=v[y],I=n(N,y),V=h?null:l.get(I);V?(V.v&&fe(V.v,N),V.i&&fe(V.i,y),X&&W.unskip_effect(V.e)):(V=ws(l,h?a:Ke??(Ke=tt()),N,I,y,i,e,r),h||(V.e.f|=We),l.set(I,V)),L.add(I)}if(m===0&&o&&!u&&(h?u=rt(()=>o(a)):(u=rt(()=>o(Ke??(Ke=tt()))),u.f|=We)),m>L.size&&co("","",""),q&&m>0&&J(er()),!h)if(d.set(W,L),X){for(const[B,gr]of l)L.has(B)||W.skip_effect(gr.e);W.oncommit(w),W.ondiscard(x)}else w(W);A&&Wt(!0),_(f)}),flags:e,items:l,pending:d,outrogroups:null,fallback:u};h=!1,q&&(a=E)}function _e(t){for(;t!==null&&(t.f&32)===0;)t=t.next;return t}function ys(t,e,r,n,i){var o=(n&8)!==0,a=e.length,l=t.items,c=_e(t.effect.first),u,f=null,v,d=[],h=[],w,x,p,m;if(o)for(m=0;m<a;m+=1)w=e[m],x=i(w,m),p=l.get(x).e,!(p.f&33554432)&&(p.nodes?.a?.measure(),(v??(v=new Set)).add(p));for(m=0;m<a;m+=1){if(w=e[m],x=i(w,m),p=l.get(x).e,t.outrogroups!==null)for(const B of t.outrogroups)B.pending.delete(p),B.done.delete(p);if(p.f&8192&&(ur(p),o&&(p.nodes?.a?.unfix(),(v??(v=new Set)).delete(p))),(p.f&33554432)!==0)if(p.f^=We,p===c)Me(p,null,r);else{var A=f?f.next:c;p===t.effect.last&&(t.effect.last=p.prev),p.prev&&(p.prev.next=p.next),p.next&&(p.next.prev=p.prev),Lt(t,f,p),Lt(t,p,A),Me(p,A,r),f=p,d=[],h=[],c=_e(f.next);continue}if(p!==c){if(u!==void 0&&u.has(p)){if(d.length<h.length){var L=h[0],W;f=L.prev;var X=d[0],y=d[d.length-1];for(W=0;W<d.length;W+=1)Me(d[W],L,r);for(W=0;W<h.length;W+=1)u.delete(h[W]);Lt(t,X.prev,y.next),Lt(t,f,X),Lt(t,y,L),c=L,f=y,m-=1,d=[],h=[]}else u.delete(p),Me(p,c,r),Lt(t,p.prev,p.next),Lt(t,p,f===null?t.effect.first:f.next),Lt(t,f,p),f=p;continue}for(d=[],h=[];c!==null&&c!==p;)(u??(u=new Set)).add(c),h.push(c),c=_e(c.next);if(c===null)continue}!(p.f&33554432)&&d.push(p),f=p,c=_e(p.next)}if(t.outrogroups!==null){for(const B of t.outrogroups)B.pending.size===0&&(Fr(t,hr(B.done)),t.outrogroups?.delete(B));t.outrogroups.size===0&&(t.outrogroups=null)}if(c!==null||u!==void 0){var N=[];if(u!==void 0)for(p of u)!(p.f&8192)&&N.push(p);for(;c!==null;)!(c.f&8192)&&c!==t.fallback&&N.push(c),c=_e(c.next);var I=N.length;if(I>0){var V=(n&4)!==0&&a===0?r:null;if(o){for(m=0;m<I;m+=1)N[m].nodes?.a?.measure();for(m=0;m<I;m+=1)N[m].nodes?.a?.fix()}gs(t,N,V)}}o&&bt(()=>{if(v!==void 0)for(p of v)p.nodes?.a?.apply()})}function ws(t,e,r,n,i,o,a,l){var c=(a&1)!==0?(a&16)===0?ii(r,!1,!1):Gt(r):null,u=(a&2)!==0?Gt(i):null;return{v:c,i:u,e:rt(()=>(o(e,c??r,u??i,l),()=>{t.delete(n)}))}}function Me(t,e,r){if(t.nodes)for(var n=t.nodes.start,i=t.nodes.end,o=e&&(e.f&33554432)===0?e.nodes.start:r;n!==null;){var a=_t(n);if(o.before(n),n===i)return;n=a}}function Lt(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function bs(t,e){Vo(()=>{t=S?.parent?.nodes?.start??t;var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const i=Zr("style");i.id=e.hash,i.textContent=e.code,n.appendChild(i)}})}var $s=Symbol("is custom element"),_s=Symbol("is html"),ks=io?"link":"LINK";function Ss(t){if(q){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;zt(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var i=t.checked;zt(t,"checked",null),t.checked=i}}};t[Ee]=r,bt(r),Bn()}}function zt(t,e,r,n){var i=xs(t);q&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName===ks)||i[e]!==(i[e]=r)&&(e==="loading"&&(t[eo]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Ms(t).has(e)?t[e]=r:t.setAttribute(e,r))}function xs(t){return t[Lr]??(t[Lr]={[$s]:t.nodeName.includes("-"),[_s]:t.namespaceURI==="http://www.w3.org/1999/xhtml"})}var En=new Map;function Ms(t){var e=t.getAttribute("is")||t.nodeName,r=En.get(e);if(r)return r;En.set(e,r=new Set);for(var n,i=t,o=Element.prototype;o!==i;){n=Ji(i);for(var a in n)n[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.add(a);i=Pn(i)}return r}function Ws(t,e,r=e){var n=new WeakSet;So(t,"input",async i=>{var o=i?t.defaultValue:t.value;if(o=xr(t)?Mr(o):o,r(o),$!==null&&n.add($),await Xo(),o!==(o=e())){var a=t.selectionStart,l=t.selectionEnd,c=t.value.length;if(t.value=o??"",l!==null){var u=t.value.length;a===l&&l===c&&u>c?(t.selectionStart=u,t.selectionEnd=u):(t.selectionStart=a,t.selectionEnd=Math.min(l,u))}}}),(q&&t.defaultValue!==t.value||Oe(e)==null&&t.value)&&(r(xr(t)?Mr(t.value):t.value),$!==null&&n.add($)),tn(()=>{var i=e();if(t===document.activeElement){var o=de?nr:$;if(n.has(o))return}xr(t)&&i===Mr(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}function xr(t){var e=t.type;return e==="number"||e==="range"}function Mr(t){return t===""?null:+t}var qi,oe=new WeakMap,fr=new WeakMap,Wr=new WeakMap,qn=new WeakSet,Ti=class{constructor(t){Xr(this,qn),b(this,oe,new WeakMap),b(this,fr,void 0),b(this,Wr,void 0),g(Wr,this,t)}observe(t,e){var r=s(oe,this).get(t)||new Set;return r.add(e),s(oe,this).set(t,r),k(qn,this,Es).call(this).observe(t,s(Wr,this)),()=>{var n=s(oe,this).get(t);n.delete(e),n.size===0&&(s(oe,this).delete(t),s(fr,this).unobserve(t))}}};qi=Ti;function Es(){return s(fr,this)??g(fr,this,new ResizeObserver(t=>{for(var e of t){qi.entries.set(e.target,e);for(var r of s(oe,this).get(e.target)||[])r(e)}}))}T(Ti,"entries",new WeakMap);var Ue=!1;function qs(t){var e=Ue;try{return Ue=!1,[t(),Ue]}finally{Ue=e}}function Mt(t,e,r,n){var i=!pr||(r&2)!==0,o=(r&8)!==0,a=(r&16)!==0,l=n,c=!0,u=void 0,f=()=>a&&i?(u??(u=Ae(n)),_(u)):(c&&(c=!1,l=a?Oe(n):n),l);let v;if(o){var d=Ge in t||Rn in t;v=Jt(t,e)?.set??(d&&e in t?W=>t[e]=W:void 0)}var h,w=!1;o?[h,w]=qs(()=>t[e]):h=t[e],h===void 0&&n!==void 0&&(h=f(),v&&(i&&mo(e),v(h)));var x;if(i?x=()=>{var W=t[e];return W===void 0?f():(c=!0,W)}:x=()=>{var W=t[e];return W!==void 0&&(l=void 0),W===void 0?l:W},i&&(r&4)===0)return x;if(v){var p=t.$$legacy;return(function(W,X){return arguments.length>0?((!i||!X||p||w)&&v(X?x():W),W):x()})}var m=!1,A=((r&1)!==0?Ae:Ur)(()=>(m=!1,x()));o&&_(A);var L=S;return(function(W,X){if(arguments.length>0){const y=X?_(A):i&&o?Vt(W):W;return Y(A,y),m=!0,l!==void 0&&(l=y),W}return qt&&m||(L.f&16384)!==0?A.v:_(A)})}function Ts(t){return new Ls(t)}var Rt=new WeakMap,vt=new WeakMap,Ls=class{constructor(t){b(this,Rt,void 0),b(this,vt,void 0);var e=new Map,r=(i,o)=>{var a=ii(o,!1,!1);return e.set(i,a),a};const n=new Proxy({...t.props||{},$$events:{}},{get(i,o){return _(e.get(o)??r(o,Reflect.get(i,o)))},has(i,o){return o===Rn?!0:(_(e.get(o)??r(o,Reflect.get(i,o))),Reflect.has(i,o))},set(i,o,a){return Y(e.get(o)??r(o,a),a),Reflect.set(i,o,a)}});g(vt,this,(t.hydrate?vs:Wi)(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)&&st(),g(Rt,this,n.$$events);for(const i of Object.keys(s(vt,this)))i==="$set"||i==="$destroy"||i==="$on"||Le(this,i,{get(){return s(vt,this)[i]},set(o){s(vt,this)[i]=o},enumerable:!0});s(vt,this).$set=i=>{Object.assign(n,i)},s(vt,this).$destroy=()=>{ds(s(vt,this))}}$set(t){s(vt,this).$set(t)}$on(t,e){s(Rt,this)[t]=s(Rt,this)[t]||[];const r=(...n)=>e.call(this,...n);return s(Rt,this)[t].push(r),()=>{s(Rt,this)[t]=s(Rt,this)[t].filter(n=>n!==r)}}$destroy(){s(vt,this).$destroy()}},Li;typeof HTMLElement=="function"&&(Li=class extends HTMLElement{constructor(t,e,r){super(),T(this,"$$ctor",void 0),T(this,"$$s",void 0),T(this,"$$c",void 0),T(this,"$$cn",!1),T(this,"$$d",{}),T(this,"$$r",!1),T(this,"$$p_d",{}),T(this,"$$l",{}),T(this,"$$l_u",new Map),T(this,"$$me",void 0),T(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 o=Zr("slot");n!=="default"&&(o.name=n),ot(i,o)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=js(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]=Qe(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=Ts({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=zo(()=>{tn(()=>{this.$$r=!0;for(const n of Ye(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Qe(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 o=this.$$c.$on(n,i);this.$$l_u.set(i,o)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Qe(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 Ye(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Qe(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 js(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function As(t,e,r,n,i,o){let a=class extends Li{constructor(){super(t,r,i),this.$$p_d=e}static get observedAttributes(){return Ye(e).map(l=>(e[l].attribute||l).toLowerCase())}};return Ye(e).forEach(l=>{Le(a.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(c){c=Qe(l,c,e),this.$$d[l]=c;var u=this.$$c;u&&(Jt(u,l)?.get?u[l]=c:u.$set({[l]:c}))}})}),n.forEach(l=>{Le(a.prototype,l,{get(){return this.$$c?.[l]}})}),o&&(a=o(a)),t.element=a,a}function Ps(t,e=!1){if(typeof t=="boolean")return t;if(t==null)return e;const r=String(t).trim().toLowerCase();return r===""?e:["false","0","off","no"].includes(r)?!1:["true","1","on","yes"].includes(r)?!0:!!r}function Ns(t){return t!==null&&Ps(t,!0)}var Os=(t,e)=>{const r=t.$$p_d;return r?Object.entries(r).some(([n,i])=>i.type==="Boolean"&&(i.attribute??n.toLowerCase())===e):!1};function Rs(t){const e=t.prototype.attributeChangedCallback;return class extends t{attributeChangedCallback(r,n,i){const o=i!==null&&Os(this,r)&&!Ns(i)?null:i;e?.call(this,r,n,o)}}}function Vr(t){return t.replace(/\s+/gu," ").trim().replace(/^[^\p{L}\p{N}]+/u,"").replace(/[^\p{L}\p{N}]+$/u,"")}function Cs(t){return!t||t.length>80?!1:t.split(" ").length<=4}function Ds(t,e){if(!t||typeof t!="object")return{status:"error",reason:`The ${e.serviceLabel} returned no data.`};const r=t;let n=null;for(const o of e.keys)if(Array.isArray(r[o])){n=r[o];break}if(!n)return{status:"error",reason:`The ${e.serviceLabel} response was unreadable.`};const i=n.map(e.toItem).filter(o=>o!==null);return i.length>0?{status:"ok",items:i}:{status:"empty"}}function Is(t){const e=t.fetchImpl??globalThis.fetch;return async(r,n)=>{if(typeof e!="function")return{status:"error",reason:"No fetch implementation is available."};let i={"content-type":"application/json"};try{const o=await t.headers?.();o&&(i={...i,...o})}catch{return{status:"error",reason:`The ${t.serviceLabel} could not be authorized.`}}try{const o=await e(t.endpoint,{method:"POST",headers:i,credentials:t.credentials??"same-origin",body:JSON.stringify(r),signal:n});return o.ok?t.readResponse(await o.json()):{status:"error",reason:`The ${t.serviceLabel} is unavailable (${o.status}).`}}catch(o){return o instanceof DOMException&&o.name==="AbortError"?{status:"empty"}:{status:"error",reason:`The ${t.serviceLabel} could not be reached.`}}}}var zs="Look up a single word or short phrase.",ke=new WeakMap,Er=new WeakMap,qr=new WeakMap,Fs=class{constructor(t){T(this,"options",void 0),b(this,ke,null),b(this,Er,""),b(this,qr,null),this.options=t}get searchedFor(){return s(Er,this)}syncConfigured(t){const e=this.options.resolver();if(!e&&t.kind==="idle"){this.options.onState({kind:"unconfigured"});return}e&&t.kind==="unconfigured"&&this.options.onState({kind:"idle"})}syncRequestedTerm(t){const e=Vr(t.term);if(!t.visible||!e)return!1;const r=t.requestId===void 0?`term:${e}`:`id:${t.requestId}`;return r===s(qr,this)?!1:(g(qr,this,r),this.run(e),!0)}async run(t){const e=this.options.resolver();if(!e){this.options.onState({kind:"unconfigured"});return}const r=Vr(t);if(!Cs(r)){this.options.onState({kind:"error",term:r,reason:zs});return}s(ke,this)?.abort();const n=new AbortController;g(ke,this,n),g(Er,this,r),this.options.onState({kind:"searching",term:r});const i=await e({keyword:r,language:this.options.language?.()||void 0,max:this.options.max},n.signal);if(n===s(ke,this)){if(g(ke,this,null),i.status==="ok"){this.options.onState({kind:"results",term:r,items:i.items});return}if(i.status==="empty"){this.options.onState({kind:"empty",term:r});return}this.options.onState({kind:"error",term:r,reason:i.reason})}}};function Vs(t,e){return t.kind==="searching"?`Looking up ${t.term}`:t.kind==="results"?`${e.countLabel(t.items.length)} for ${t.term}`:t.kind==="empty"?e.emptyLabel(t.term):""}var ji="picture dictionary";function Hs(t){const e=t.trim();return e?e.startsWith("//")||/^https:\/\//iu.test(e)?!0:e.startsWith("/")?Js(e):!1:!1}var Tn="https://pie-picture-dictionary.invalid";function Js(t){try{return new URL(t,Tn).origin===Tn}catch{return!1}}function Ln(t){return typeof t=="string"?t.trim():""}function Bs(t){if(!t||typeof t!="object")return null;const e=t,r=Ln(e.url)||Ln(e.image);return Hs(r)?{url:r,caption:typeof e.caption=="string"&&e.caption.trim()?e.caption.trim():void 0,width:typeof e.width=="number"?e.width:void 0,height:typeof e.height=="number"?e.height:void 0}:null}function Ks(t){return Ds(t,{serviceLabel:ji,keys:["pictures","images"],toItem:Bs})}function Us(t){return Is({...t,serviceLabel:ji,readResponse:Ks})}var Gs=Nt('<p class="pie-tool-picture-dictionary__notice svelte-rpoqcp">No picture dictionary service is configured for this assessment.</p>'),Xs=Nt('<p class="pie-tool-picture-dictionary__notice svelte-rpoqcp">Type a word to see a picture of it.</p>'),jn=Nt('<p class="pie-tool-picture-dictionary__notice svelte-rpoqcp"> </p>'),Zs=Nt('<p class="pie-tool-picture-dictionary__error svelte-rpoqcp" role="alert"> </p>'),Qs=Nt('<span class="pie-tool-picture-dictionary__caption svelte-rpoqcp" aria-hidden="true"> </span>'),Ys=Nt('<li class="pie-tool-picture-dictionary__cell svelte-rpoqcp"><img class="pie-tool-picture-dictionary__image svelte-rpoqcp" loading="lazy" decoding="async"/> <!></li>'),ta=Nt('<ul class="pie-tool-picture-dictionary__grid svelte-rpoqcp"></ul>'),ea=Nt('<div class="pie-tool-picture-dictionary svelte-rpoqcp" role="dialog" aria-label="Picture Dictionary"><form class="pie-tool-picture-dictionary__search svelte-rpoqcp"><label class="pie-tool-picture-dictionary__label svelte-rpoqcp" for="pie-tool-picture-dictionary-term">Word or phrase</label> <div class="pie-tool-picture-dictionary__row svelte-rpoqcp"><input id="pie-tool-picture-dictionary-term" class="pie-tool-picture-dictionary__input svelte-rpoqcp" type="text" autocomplete="off" spellcheck="false"/> <button class="pie-tool-picture-dictionary__submit svelte-rpoqcp" type="submit">Look up</button></div></form> <div class="pie-tool-picture-dictionary__status svelte-rpoqcp" role="status" aria-live="polite"> </div> <div class="pie-tool-picture-dictionary__body svelte-rpoqcp"><!></div></div>'),ra={hash:"svelte-rpoqcp",code:`.pie-tool-picture-dictionary.svelte-rpoqcp {display:flex;flex-direction:column;gap:0.5rem;height:100%;min-height:0;padding:0.75rem;box-sizing:border-box;color:var(--pie-text, #1f2937);background:var(--pie-background, #fff);font-size:0.95rem;}.pie-tool-picture-dictionary__search.svelte-rpoqcp {display:flex;flex-direction:column;gap:0.25rem;}.pie-tool-picture-dictionary__label.svelte-rpoqcp {font-size:0.8rem;font-weight:600;}.pie-tool-picture-dictionary__row.svelte-rpoqcp {display:flex;gap:0.5rem;}.pie-tool-picture-dictionary__input.svelte-rpoqcp {flex:1 1 auto;min-width:0;padding:0.35rem 0.5rem;border:1px solid var(--pie-border-light, #e5e7eb);border-radius:0.375rem;background:var(--pie-background, #fff);color:inherit;font:inherit;}.pie-tool-picture-dictionary__submit.svelte-rpoqcp {flex:0 0 auto;padding:0.35rem 0.75rem;border:1px solid var(--pie-border-light, #e5e7eb);border-radius:0.375rem;background:var(--pie-secondary-background, #f9fafb);color:inherit;font:inherit;cursor:pointer;}.pie-tool-picture-dictionary__submit.svelte-rpoqcp:disabled {opacity:0.5;cursor:not-allowed;}.pie-tool-picture-dictionary__input.svelte-rpoqcp:focus-visible,
|
|
1
|
+
import{t as Ci}from"./attribute-coercion-b93b482c.js";import{a as Ii,i as Fi,n as Vi,r as Bi,t as Hi}from"./term-lookup-632cf6b1.js";if(typeof window<"u"){var sn,on;((sn=(on=window).__svelte??(on.__svelte={})).v??(sn.v=new Set)).add("5")}var le={},z=Symbol("uninitialized"),qn=Array.isArray,Ji=Array.prototype.indexOf,Er=Array.prototype.includes,cr=Array.from,Ge=Object.keys,Te=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,Ui=Object.getOwnPropertyDescriptors,Ki=Object.prototype,Qi=Array.prototype,Tn=Object.getPrototypeOf,an=Object.isExtensible,Zi=()=>{};function Xi(t){for(var e=0;e<t.length;e++)t[e]()}function Pn(){var t,e;return{promise:new Promise((r,n)=>{t=r,e=n}),resolve:t,reject:e}}function Pe(t){"@babel/helpers - typeof";return Pe=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},Pe(t)}function Gi(t,e){if(Pe(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(Pe(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Yi(t){var e=Gi(t,"string");return Pe(e)=="symbol"?e:e+""}function T(t,e,r){return(e=Yi(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var et=1024,ht=2048,Zt=4096,Cr=8192,ts=16384,Ir=32768,ln=1<<25,Fr=65536,ve=1<<19,es=1<<20,Se=1<<25,un=1<<21,rs=1<<22,Ye=1<<23,Ke=Symbol("$state"),Ln=Symbol("component"),jn=Symbol("legacy props"),ns=Symbol(""),Wr=Symbol("attributes"),is=Symbol("class"),ss=Symbol("style"),Qe=Symbol("text"),Ee=Symbol("form reset"),ze=new class extends Error{constructor(...t){super(...t),T(this,"name","StaleReactionError"),T(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},os=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function as(){console.warn("https://svelte.dev/e/derived_inert")}function hr(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function ls(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var q=!1;function Et(t){q=t}var W;function H(t){if(t===null)throw hr(),le;return W=t}function vr(){return H(_t(W))}function Rt(t){if(q){if(_t(W)!==null)throw hr(),le;W=t}}function us(t=1){if(q){for(var e=t,r=W;e--;)r=_t(r);W=r}}function tr(t=!0){for(var e=0,r=W;;){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=_t(r);t&&r.remove(),r=i}}function An(t){if(!t||t.nodeType!==8)throw hr(),le;return t.data}function On(t){return t===this.v}function fs(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Nn(t){return!fs(t,this.v)}function cs(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function hs(t,e,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function vs(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ds(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ps(t){throw new Error("https://svelte.dev/e/effect_orphan")}function gs(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ms(){throw new Error("https://svelte.dev/e/hydration_failed")}function ws(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function ys(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function bs(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function $s(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function _s(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var de=!1,dr=!1,D=null;function ue(t){D=t}function zn(t,e=!1,r){D={p:D,i:!1,c:null,e:null,s:t,x:null,r:x,l:dr&&!e?{s:null,u:null,$:[]}:null}}function Rn(t){var e=D,r=e.e;if(r!==null){e.e=null;for(var n of r)li(n)}return t!==void 0&&(e.x=t),e.i=!0,D=e.p,Dn(t)}function Dn(t={}){return Te(t,Ln,{value:!0}),t}function Re(){return!dr||D!==null&&D.l===null}var Ft=[];function Cn(){var t=Ft;Ft=[],Xi(t)}function bt(t){if(Ft.length===0&&!We){var e=Ft;queueMicrotask(()=>{e===Ft&&Cn()})}Ft.push(t)}function ks(){for(;Ft.length>0;)Cn()}var xs=~(ht|Zt|et);function A(t,e){t.f=t.f&xs|e}function Vr(t){(t.f&512)!==0||t.deps===null?A(t,et):A(t,Zt)}function In(t,e,r){(t.f&2048)!==0?e.add(t):t.f&4096&&r.add(t),A(t,et)}var fn=!1;function Fn(){fn||(fn=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e[Ee]?.()})},{capture:!0}))}function pe(t){var e=S,r=x;nt(null),$t(null);try{return t()}finally{nt(e),$t(r)}}function Ms(t,e,r,n=r){t.addEventListener(e,()=>pe(r));const i=t[Ee];i?t[Ee]=()=>{i(),n(!0)}:t[Ee]=()=>n(!0),Fn()}function Ss(t,e,r,n){const i=Re()?Le:Br;var s=t.filter(h=>!h.settled),a=e.map(i);if(r.length===0&&s.length===0){n(a);return}var l=x,f=Es(),u=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(h=>h.promise)):null;function c(h){if((l.f&16384)===0){f();try{n([...a,...h])}catch(w){yt(w,l)}er()}}var v=Vn();if(r.length===0){u.then(()=>c([])).finally(v);return}function d(){Promise.all(r.map(h=>Ws(h))).then(c).catch(h=>yt(h,l)).finally(v)}u?u.then(()=>{f(),d(),er()}):d()}function Es(){var t=x,e=S,r=D,n=$;return function(i=!0){$t(t),nt(e),ue(r),i&&!(t.f&16384)&&(n?.activate(),n?.apply())}}function er(t=!0){$t(null),nt(null),ue(null),t&&$?.deactivate()}function Vn(){var t=x,e=t.b,r=$,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 Le(t){var e=2|ht;return x!==null&&(x.f|=ve),{ctx:D,deps:null,effects:null,equals:On,f:e,fn:t,reactions:null,rv:0,v:z,wv:0,parent:x,ac:null}}var ke=Symbol("obsolete");function Ws(t,e,r){let n=x;n===null&&cs();var i=void 0,s=Qt(z),a=!S,l=new Set;return Hs(()=>{var f=x,u=Pn();i=u.promise;try{Promise.resolve(t()).then(u.resolve,h=>{h!==ze&&u.reject(h)}).finally(er)}catch(h){u.reject(h),er()}var c=$;if(a){if((f.f&32768)!==0)var v=Vn();if(n.b?.is_rendered())c.async_deriveds.get(f)?.reject(ke);else for(const h of l.values())h.reject(ke);l.add(u),c.async_deriveds.set(f,u)}const d=(h,w=void 0)=>{v?.(),l.delete(u),w!==ke&&(c.activate(),w?(s.f|=Ye,ce(s,w)):(s.f&8388608&&(s.f^=Ye),ce(s,h)),c.deactivate())};u.promise.then(d,h=>d(null,h||"unknown"))}),ai(()=>{for(const f of l)f.reject(ke)}),new Promise(f=>{function u(c){function v(){c===i?f(s):u(i)}c.then(v,v)}u(i)})}function cn(t){const e=Le(t);return vi(e),e}function Br(t){const e=Le(t);return e.equals=Nn,e}function qs(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)F(e[r])}}function Hr(t){var e,r=x,n=t.parent;if(!qt&&n!==null&&t.v!==z&&(n.f&24576)!==0)return as(),t.v;$t(n);try{qs(t),e=mi(t)}finally{$t(r)}return e}function Bn(t){var e=Hr(t);if(!t.equals(e)&&(t.wv=pi(),(!$?.is_fork||t.deps===null)&&($!==null?($.capture(t,e,!0),rr?.capture(t,e,!0)):t.v=e,t.deps===null))){A(t,et);return}qt||(I!==null?(Qr()||$?.is_fork)&&I.set(t,e):Vr(t))}function Ts(t){if(t.effects!==null)for(const e of t.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac!==null&&pe(()=>{e.ac.abort(ze),e.ac=null}),e.fn!==null&&(e.teardown=Zi),Ae(e,0),Gr(e))}function Hn(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&e.fn!==null&&he(e)}function Jn(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jr(t,e){Jn(t,e),e.add(t)}function b(t,e,r){Jn(t,e),e.set(t,r)}function k(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 y(t,e,r){return t.set(k(t,e),r),r}function o(t,e){return t.get(k(t,e))}var Un,qr=null,ee=null,$=null,rr=null,I=null,Tr=null,We=!1,mr=!1,je=null,nr=null,Kn=0,Ps=1,Pr=new WeakMap,Jt=new WeakMap,oe=new WeakMap,ir=new WeakMap,Ce=new WeakMap,re=new WeakMap,Dt=new WeakMap,xe=new WeakMap,gt=new WeakMap,hn=new WeakMap,fe=new WeakMap,Wt=new WeakMap,Lt=new WeakMap,wr=new WeakMap,Ie=new WeakMap,N=new WeakSet,Xt=class Qn{constructor(){Jr(this,N),T(this,"id",Ps++),b(this,Pr,!1),T(this,"linked",!0),b(this,Jt,null),b(this,oe,null),T(this,"async_deriveds",new Map),T(this,"current",new Map),T(this,"previous",new Map),b(this,ir,new Set),b(this,Ce,new Set),b(this,re,0),b(this,Dt,new Map),b(this,xe,null),b(this,gt,[]),b(this,hn,[]),b(this,fe,new Set),b(this,Wt,new Set),b(this,Lt,new Map),b(this,wr,new Set),T(this,"is_fork",!1),b(this,Ie,!1),ee===null?qr=ee=this:(y(oe,ee,this),y(Jt,this,ee)),ee=this}skip_effect(e){o(Lt,this).has(e)||o(Lt,this).set(e,{d:[],m:[]}),o(wr,this).delete(e)}unskip_effect(e,r=n=>this.schedule(n)){var n=o(Lt,this).get(e);if(n){o(Lt,this).delete(e);for(var i of n.d)A(i,ht),r(i);for(i of n.m)A(i,Zt),r(i)}o(wr,this).add(e)}capture(e,r,n=!1){e.v!==z&&!this.previous.has(e)&&this.previous.set(e,e.v),!(e.f&8388608)&&(this.current.set(e,[r,n]),I?.set(e,r)),this.is_fork||(e.v=r)}activate(){$=this}deactivate(){$=null,I=null}flush(){try{mr=!0,$=this,k(N,this,sr).call(this)}finally{Kn=0,Tr=null,je=null,nr=null,mr=!1,$=null,I=null,wt.clear()}}discard(){for(const e of o(Ce,this))e(this);o(Ce,this).clear();for(const e of this.async_deriveds.values())e.reject(ke);k(N,this,or).call(this),o(xe,this)?.resolve()}register_created_effect(e){o(hn,this).push(e)}increment(e,r){if(y(re,this,o(re,this)+1),e){let n=o(Dt,this).get(r)??0;o(Dt,this).set(r,n+1)}}decrement(e,r){if(y(re,this,o(re,this)-1),e){let n=o(Dt,this).get(r)??0;n===1?o(Dt,this).delete(r):o(Dt,this).set(r,n-1)}o(Ie,this)||(y(Ie,this,!0),bt(()=>{y(Ie,this,!1),this.linked&&this.flush()}))}transfer_effects(e,r){for(const n of e)o(fe,this).add(n);for(const n of r)o(Wt,this).add(n);e.clear(),r.clear()}oncommit(e){o(ir,this).add(e)}ondiscard(e){o(Ce,this).add(e)}settled(){return(o(xe,this)??y(xe,this,Pn())).promise}static ensure(){if($===null){const e=$=new Qn;!mr&&!We&&bt(()=>{o(Pr,e)||e.flush()})}return $}apply(){if(!de||!this.is_fork&&o(Jt,this)===null&&o(oe,this)===null){I=null;return}I=new Map;for(const[r,[n]]of this.current)I.set(r,n);for(let r=qr;r!==null;r=o(oe,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)I.has(n)||I.set(n,i)}}schedule(e){if(Tr=e,e.b?.is_pending&&(e.f&16777228)!==0&&(e.f&32768)===0){e.b.defer_effect(e);return}o(gt,this).push(e)}};Un=Xt;function vn(){if(this.is_fork)return!0;for(const r of o(Dt,this).keys()){for(var t=r,e=!1;t.parent!==null;){if(o(Lt,this).has(t)){e=!0;break}t=t.parent}if(!e)return!0}return!1}function Ls(){var t=[];for(const i of o(gt,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^=et}}r||t.push(e)}return y(gt,this,[]),t}function sr(){y(Pr,this,!0);for(const a of o(fe,this))o(Wt,this).delete(a),A(a,ht),this.schedule(a);for(const a of o(Wt,this))A(a,Zt),this.schedule(a);this.apply();for(var t=je=[],e=[],r=nr=[];o(gt,this).length>0;){Kn++>1e3&&(k(N,this,or).call(this),Ns());for(const a of k(N,this,Ls).call(this))try{k(N,this,js).call(this,a,t,e)}catch(l){throw Gn(a),k(N,this,vn).call(this)||this.discard(),l}}if($=null,r.length>0){var n=Un.ensure();for(const a of r)n.schedule(a)}if(je=null,nr=null,k(N,this,vn).call(this)){k(N,this,Fe).call(this,e),k(N,this,Fe).call(this,t);for(const[a,l]of o(Lt,this))Xn(a,l);r.length>0&&k(N,$,sr).call($);return}const i=k(N,this,As).call(this);if(i){k(N,this,Fe).call(this,e),k(N,this,Fe).call(this,t),k(N,i,Os).call(i,this);return}o(fe,this).clear(),o(Wt,this).clear();for(const a of o(ir,this))a(this);o(ir,this).clear(),rr=this,dn(e),dn(t),rr=null,o(xe,this)?.resolve();var s=$;if(o(re,this)===0&&(o(gt,this).length===0||s!==null)&&k(N,this,or).call(this),o(gt,this).length>0)if(s!==null){for(const a of o(gt,this))o(gt,s).push(a);y(gt,this,[])}else s=this;s!==null&&(wt.clear(),k(N,s,sr).call(s))}function js(t,e,r){t.f^=et;for(var n=t.first;n!==null;){var i=n.f,s=(i&96)!==0;if(!(s&&(i&1024)!==0||(i&8192)!==0||o(Lt,this).has(n))&&n.fn!==null){s?n.f^=et:(i&4)!==0?e.push(n):de&&(i&16777224)!==0?r.push(n):De(n)&&(i&16&&o(Wt,this).add(n),he(n));var a=n.first;if(a!==null){n=a;continue}}for(;n!==null;){var l=n.next;if(l!==null){n=l;break}n=n.parent}}}function As(){for(var t=o(Jt,this);t!==null;){if(!t.is_fork){for(const[e,[,r]]of this.current)if(t.current.has(e)&&!r)return t}t=o(Jt,t)}return null}function Os(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(o(fe,t),o(Wt,t));const e=r=>{var n=r.reactions;if(n!==null&&!((r.f&2)!==0&&(r.f&6144)===0))for(const a of n){var i=a.f;if((i&2)!==0)e(a);else{var s=a;i&4194320&&!this.async_deriveds.has(s)&&(o(Wt,this).delete(s),A(s,ht),this.schedule(s))}}};for(const r of this.current.keys())e(r);this.oncommit(()=>t.discard()),k(N,t,or).call(t),$=this,k(N,this,sr).call(this)}function Fe(t){for(var e=0;e<t.length;e+=1)In(t[e],o(fe,this),o(Wt,this))}function or(){if(this.linked){var t=o(Jt,this),e=o(oe,this);t===null?qr=e:y(oe,t,e),e===null?ee=t:y(Jt,e,t),this.linked=!1}}function ot(t){var e=We;We=!0;try{var r;for(t&&($!==null&&!$.is_fork&&$.flush(),r=t());;){if(ks(),$===null)return r;$.flush()}}finally{We=e}}function Ns(){try{gs()}catch(t){yt(t,Tr)}}var pt=null;function dn(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&24576)===0&&De(n)&&(pt=new Set,he(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&fi(n),pt?.size>0)){wt.clear();for(const i of pt){if((i.f&24576)!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)pt.has(a)&&(pt.delete(a),s.push(a)),a=a.parent;for(let l=s.length-1;l>=0;l--){const f=s[l];!(f.f&24576)&&he(f)}}pt.clear()}}pt=null}}function Zn(t){$.schedule(t)}function Xn(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),A(t,et);for(var r=t.first;r!==null;)Xn(r,e),r=r.next}}function Gn(t){A(t,et);for(var e=t.first;e!==null;)Gn(e),e=e.next}var ar=new Set,wt=new Map,Yn=!1;function Qt(t,e){return{f:0,v:t,reactions:null,equals:On,rv:0,wv:0}}function dt(t,e){const r=Qt(t,e);return vi(r),r}function ti(t,e=!1,r=!0){const n=Qt(t);if(e||(n.equals=Nn),dr&&r&&D!==null&&D.l!==null){var i;((i=D.l).s??(i.s=[])).push(n)}return n}function Y(t,e,r=!1){return S!==null&&(!at||S.f&131072)&&Re()&&S.f&4325394&&(ut===null||!ut.has(t))&&$s(),ce(t,r?Vt(e):e,nr)}var Ct=null,Lr=0;function ce(t,e,r=null){if(!t.equals(e)){qt?wt.set(t,e):wt.has(t)||wt.set(t,t.v);var n=Xt.ensure();if(n.capture(t,e),(t.f&2)!==0){const i=t;t.f&2048&&Hr(i),I===null&&Vr(i)}t.wv=pi(),Ct=null,Lr=0,ei(t,ht,r),Ct=null,Re()&&x!==null&&x.f&1024&&!(x.f&96)&&(G===null?Qs([t]):G.push(t)),!n.is_fork&&ar.size>0&&!Yn&&zs()}return e}function zs(){Yn=!1;for(const t of ar){t.f&1024&&A(t,Zt);let e;try{e=De(t)}catch{e=!0}e&&he(t)}ar.clear()}function qe(t){Y(t,t.v+1)}function ei(t,e,r){var n=t.reactions;if(n!==null){var i=Re(),s=n.length;if(Lr+=s,Lr>1e5&&Ct===null&&(Ct=new Set),Ct!==null){if(Ct.has(t))return;Ct.add(t)}for(var a=0;a<s;a++){var l=n[a],f=l.f;if(!(!i&&l===x)){var u=(f&ht)===0;if(u&&A(l,e),(f&131072)!==0)ar.add(l);else if((f&2)!==0){var c=l;I?.delete(c),ei(c,Zt,r)}else if(u){var v=l;f&16&&pt!==null&&pt.add(v),r!==null?r.push(v):Zn(v)}}}}}function Vt(t){if(typeof t!="object"||t===null||Ke in t||Ln in t)return t;const e=Tn(t);if(e!==Ki&&e!==Qi)return t;var r=new Map,n=qn(t),i=dt(0),s=null,a=Ut,l=f=>{if(Ut===a)return f();var u=S,c=Ut;nt(null),wn(a);var v=f();return nt(u),wn(c),v};return n&&r.set("length",dt(t.length,s)),new Proxy(t,{defineProperty(f,u,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&ys();var v=r.get(u);return v===void 0?l(()=>{var d=dt(c.value,s);return r.set(u,d),d}):Y(v,c.value,!0),!0},deleteProperty(f,u){var c=r.get(u);if(c===void 0){if(u in f){const v=l(()=>dt(z,s));r.set(u,v),qe(i)}}else Y(c,z),qe(i);return!0},get(f,u,c){if(u===Ke)return t;var v=r.get(u),d=u in f;if(v===void 0&&(!d||Ht(f,u)?.writable)&&(v=l(()=>dt(Vt(d?f[u]:z),s)),r.set(u,v)),v!==void 0){var h=_(v);return h===z?void 0:h}return Reflect.get(f,u,c)},getOwnPropertyDescriptor(f,u){this.has?.(f,u);var c=Reflect.getOwnPropertyDescriptor(f,u),v=r.get(u);if(v!==void 0){var d=_(v);if(d===z)return;if(c&&"value"in c)c.value=d;else return{enumerable:!0,configurable:!0,value:d,writable:!0}}return c},has(f,u){if(u===Ke)return!0;var c=r.get(u),v=c!==void 0&&c.v!==z||Reflect.has(f,u);return(c!==void 0||x!==null&&(!v||Ht(f,u)?.writable))&&(c===void 0&&(c=l(()=>dt(v?Vt(f[u]):z,s)),r.set(u,c)),_(c)===z)?!1:v},set(f,u,c,v){var d=r.get(u),h=u in f;if(n&&u==="length")for(var w=c;w<d.v;w+=1){var M=r.get(w+"");M!==void 0?Y(M,z):w in f&&(M=l(()=>dt(z,s)),r.set(w+"",M))}if(d===void 0)(!h||Ht(f,u)?.writable)&&(d=l(()=>dt(void 0,s)),Y(d,Vt(c)),r.set(u,d));else{h=d.v!==z;var p=l(()=>Vt(c));Y(d,p)}var g=Reflect.getOwnPropertyDescriptor(f,u);if(g?.set&&g.set.call(v,c),!h){if(n&&typeof u=="string"){var j=r.get("length"),P=Number(u);Number.isInteger(P)&&P>=j.v&&Y(j,P+1)}qe(i)}return!0},ownKeys(f){_(i);var u=Reflect.ownKeys(f).filter(d=>{var h=r.get(d);return h===void 0||h.v!==z});for(var[c,v]of r)v.v!==z&&!(c in f)&&u.push(c);return u},setPrototypeOf(){bs()}})}var pn,ri,ni,ii;function jr(){if(pn===void 0){pn=window,ri=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;ni=Ht(e,"firstChild").get,ii=Ht(e,"nextSibling").get,an(t)&&(t[is]=void 0,t[Wr]=null,t[ss]=void 0,t.__e=void 0),an(r)&&(r[Qe]=void 0)}}function tt(t=""){return document.createTextNode(t)}function At(t){return ni.call(t)}function _t(t){return ii.call(t)}function ne(t,e){if(!q)return At(t);var r=At(W);if(r===null)r=W.appendChild(tt());else if(e&&r.nodeType!==3){var n=tt();return r?.before(n),H(n),n}return e&&Kr(r),H(r),r}function Rs(t,e=!1){if(!q){var r=At(t);return r instanceof Comment&&r.data===""?_t(r):r}if(e){if(W?.nodeType!==3){var n=tt();return W?.before(n),H(n),n}Kr(W)}return W}function we(t,e=!1){if(!q)return At(t);var r=ne(t,e);return Rt(t),r}function ye(t,e=1,r=!1){let n=q?W:t;for(var i;e--;)i=n,n=_t(n);if(!q)return n;if(r){if(n?.nodeType!==3){var s=tt();return n===null?i?.after(s):n.before(s),H(s),s}Kr(n)}return H(n),n}function si(t){t.textContent=""}function oi(){return!de||pt!==null?!1:(x.f&Ir)!==0}function Ur(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 Kr(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 Ds(t){var e=x;if(e===null)return S.f|=Ye,t;if((e.f&32768)===0&&(e.f&4)===0)throw t;yt(t,e)}function yt(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 Cs(t){x===null&&(S===null&&ps(t),ds()),qt&&vs(t)}function Is(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function kt(t,e){var r=x;r!==null&&r.f&8192&&(t|=Cr);var n={ctx:D,deps:null,nodes:null,f:t|ht|512,first:null,fn:e,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};$?.register_created_effect(n);var i=n;if((t&4)!==0)je!==null?je.push(n):Xt.ensure().schedule(n);else if(e!==null){try{he(n)}catch(a){throw F(n),a}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|=Fr))}if(i!==null&&(i.parent=r,r!==null&&Is(i,r),S!==null&&(S.f&2)!==0&&(t&64)===0)){var s=S;(s.effects??(s.effects=[])).push(i)}return n}function Qr(){return S!==null&&!at}function ai(t){const e=kt(8,null);return A(e,et),e.teardown=t,e}function gn(t){Cs("$effect");var e=x.f;if(!S&&(e&32)!==0&&D!==null&&!D.i){var r=D;(r.e??(r.e=[])).push(t)}else return li(t)}function li(t){return kt(4|es,t)}function Fs(t){Xt.ensure();const e=kt(64|ve,t);return()=>{F(e)}}function Vs(t){Xt.ensure();const e=kt(64|ve,t);return(r={})=>new Promise(n=>{r.outro?Gt(e,()=>{F(e),n(void 0)}):(F(e),n(void 0))})}function Bs(t){return kt(4,t)}function Hs(t){return kt(rs|ve,t)}function Zr(t,e=0){return kt(8|e,t)}function te(t,e=[],r=[],n=[]){Ss(n,e,r,i=>{kt(8,()=>{t(...i.map(_))})})}function Xr(t,e=0){return kt(16|e,t)}function rt(t){return kt(32|ve,t)}function ui(t){var e=t.teardown;if(e!==null){const r=qt,n=S;mn(!0),nt(null);try{e.call(null)}catch(i){yt(i,t.parent)}finally{mn(r),nt(n)}}}function Gr(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&pe(()=>{i.abort(ze)});var n=r.next;(r.f&64)!==0?r.parent=null:F(r,e),r=n}}function Js(t){for(var e=t.first;e!==null;){var r=e.next;!(e.f&32)&&F(e),e=r}}function F(t,e=!0){var r=!1;(e||t.f&262144)&&t.nodes!==null&&t.nodes.end!==null&&(Us(t.nodes.start,t.nodes.end),r=!0),t.f|=ln,Gr(t,e&&!r),Ae(t,0);var n=t.nodes&&t.nodes.t;if(n!==null)for(const s of n)s.stop();ui(t),t.f^=ln,t.f|=ts;var i=t.parent;i!==null&&i.first!==null&&fi(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function Us(t,e){for(;t!==null;){var r=t===e?null:_t(t);t.remove(),t=r}}function fi(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 Gt(t,e,r=!0){var n=[];t.f|=256,ci(t,n,!0);var i=()=>{r&&F(t),e&&e()},s=n.length;if(s>0){var a=()=>--s||i();for(var l of n)l.out(a)}else i()}function ci(t,e,r){if((t.f&8192)===0){t.f^=Cr;var n=t.nodes&&t.nodes.t;if(n!==null)for(const l of n)(l.is_global||r)&&e.push(l);for(var i=t.first;i!==null;){var s=i.next;if((i.f&64)===0){var a=(i.f&65536)!==0||(i.f&32)!==0&&(t.f&16)!==0;ci(i,e,a?r:!1)}i=s}}}function lr(t){t.f&=-257,hi(t,!0)}function hi(t,e){if((t.f&256)===0&&(t.f&8192)!==0){t.f^=Cr,!(t.f&1024)&&(A(t,ht),Xt.ensure().schedule(t));for(var r=t.first;r!==null;){var n=r.next,i=(r.f&65536)!==0||(r.f&32)!==0;hi(r,i?e:!1),r=n}var s=t.nodes&&t.nodes.t;if(s!==null)for(const a of s)(a.is_global||e)&&a.in()}}function Yr(t,e){if(t.nodes)for(var r=t.nodes.start,n=t.nodes.end;r!==null;){var i=r===n?null:_t(r);e.append(r),r=i}}var Ks=null,Ze=!1,qt=!1;function mn(t){qt=t}var S=null,at=!1;function nt(t){S=t}var x=null;function $t(t){x=t}var ut=null;function vi(t){S!==null&&(S.f&2097152||S.f&2)&&(ut??(ut=new Set)).add(t)}var B=null,U=0,G=null;function Qs(t){G=t}var di=1,Bt=0,Ut=Bt;function wn(t){Ut=t}function pi(){return++di}function De(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 s=r[i];if(De(s)&&Bn(s),s.wv>t.wv)return!0}e&512&&I===null&&A(t,et)}return!1}function gi(t,e,r=!0){var n=t.reactions;if(n!==null&&!(!de&&ut!==null&&ut.has(t)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&2)!==0?gi(s,e,!1):e===s&&(r?A(s,ht):s.f&1024&&A(s,Zt),Zn(s))}}function mi(t){var e=B,r=U,n=G,i=S,s=ut,a=D,l=at,f=Ut,u=t.f;B=null,U=0,G=null,S=(u&96)===0?t:null,ut=null,ue(t.ctx),at=!1,Ut=++Bt,t.ac!==null&&(pe(()=>{t.ac.abort(ze)}),t.ac=null);try{t.f|=un;var c=t.fn,v=c();t.f|=Ir;var d=yn(t);if(Re()&&G!==null&&!at&&d!==null&&(t.f&6146)===0)for(var h=0;h<G.length;h++)gi(G[h],t);if(i!==null&&i!==t){if(Bt++,i.deps!==null)for(let w=0;w<r;w+=1)i.deps[w].rv=Bt;if(e!==null)for(const w of e)w.rv=Bt;G!==null&&(n===null?n=G:n.push(...G))}return t.f&8388608&&(t.f^=Ye),v}catch(w){return yn(t),Ds(w)}finally{t.f^=un,B=e,U=r,G=n,S=i,ut=s,ue(a),at=l,Ut=f}}function yn(t){var e=t.deps,r=$?.is_fork;if(B!==null){var n;if(r||Ae(t,U),e!==null&&U>0)for(e.length=U+B.length,n=0;n<B.length;n++)e[U+n]=B[n];else t.deps=e=B;if(Qr()&&(t.f&512)!==0)for(n=U;n<e.length;n++){var i;((i=e[n]).reactions??(i.reactions=[])).push(t)}}else!r&&e!==null&&U<e.length&&(Ae(t,U),e.length=U);return e}function Zs(t,e){let r=e.reactions;if(r!==null){var n=Ji.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&&(B===null||!Er.call(B,e))){var s=e;s.f&512&&(s.f^=512),s.v!==z&&Vr(s),s.ac!==null&&pe(()=>{s.ac.abort(ze),s.ac=null,A(s,ht)}),Ts(s),Ae(s,0)}}function Ae(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)Zs(t,r[n])}function he(t){var e=t.f;if((e&16384)===0){A(t,et);var r=x,n=Ze;x=t,Ze=(e&96)===0;try{(e&16777232)!==0?Js(t):Gr(t),ui(t);var i=mi(t);t.teardown=typeof i=="function"?i:null,t.wv=di}finally{Ze=n,x=r}}}async function Xs(){if(de)return new Promise(t=>{requestAnimationFrame(()=>t()),setTimeout(()=>t())});await Promise.resolve(),ot()}function _(t){var e=(t.f&2)!==0;if(Ks?.add(t),S!==null&&!at&&!(x!==null&&(x.f&16384)!==0)&&(ut===null||!ut.has(t))){var r=S.deps;if((S.f&2097152)!==0)t.rv<Bt&&(t.rv=Bt,B===null&&r!==null&&r[U]===t?U++:B===null?B=[t]:B.push(t));else{var n;(n=S).deps??(n.deps=[]),Er.call(S.deps,t)||S.deps.push(t);var i=t.reactions;i===null?t.reactions=[S]:Er.call(i,S)||i.push(S)}}if(qt&&wt.has(t))return wt.get(t);if(e){var s=t;if(qt){var a=s.v;return(!(s.f&1024)&&s.reactions!==null||yi(s))&&(a=Hr(s)),wt.set(s,a),a}var l=(s.f&512)===0&&!at&&S!==null&&(Ze||(S.f&512)!==0),f=(s.f&Ir)===0;De(s)&&(l&&(s.f|=512),Bn(s)),l&&!f&&(Hn(s),wi(s))}if(I?.has(t))return I.get(t);if((t.f&8388608)!==0)throw t.v;return t.v}function wi(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)&&(Hn(e),wi(e))}function yi(t){if(t.v===z)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(wt.has(e)||(e.f&2)!==0&&yi(e))return!0;return!1}function Oe(t){var e=at;try{return at=!0,t()}finally{at=e}}var Ve=Symbol("events"),Gs=new Set,bn=new Set;function Ys(t,e,r,n={}){function i(s){if(n.capture||Ar.call(e,s),!s.cancelBubble)return pe(()=>r?.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?(i.__removed=!1,bt(()=>{i.__removed||e.addEventListener(t,i,n)})):e.addEventListener(t,i,n),i}function to(t,e,r,n,i){var s={capture:n,passive:i},a=Ys(t,e,r,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&ai(()=>{a.__removed=!0,e.removeEventListener(t,a,s)})}var yr=null,br=!1;function Ar(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;yr=t,br||(br=!0,setTimeout(()=>{br=!1,yr=null}));var a=0,l=yr===t&&t[Ve];if(l){var f=i.indexOf(l);if(f!==-1&&(e===document||e===window)){t[Ve]=e;return}var u=i.indexOf(e);if(u===-1)return;f<=u&&(a=f)}if(s=i[a]||t.target,s!==e){Te(t,"currentTarget",{configurable:!0,get(){return s||r}});var c=S,v=x;nt(null),$t(null);try{for(var d,h=[];s!==null&&s!==e;){try{var w=s[Ve]?.[n];w!=null&&(!s.disabled||t.target===s)&&w.call(s,t)}catch(M){d?h.push(M):d=M}if(t.cancelBubble)break;a++,s=a<i.length?i[a]:null}if(d){for(let M of h)queueMicrotask(()=>{throw M});throw d}}finally{t[Ve]=e,delete t.currentTarget,nt(c),$t(v)}}}var eo=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function ro(t){return eo?.createHTML(t)??t}function no(t){var e=Ur("template");return e.innerHTML=ro(t.replaceAll("<!>","<!---->")),e.content}function ae(t,e){var r=x;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function Ot(t,e){var r=(e&1)!==0,n=(e&2)!==0,i,s=!t.startsWith("<!>");return()=>{if(q)return ae(W,null),W;i===void 0&&(i=no(s?t:"<!>"+t),r||(i=At(i)));var a=n||ri?document.importNode(i,!0):i.cloneNode(!0);if(r){var l=At(a),f=a.lastChild;ae(l,f)}else ae(a,a);return a}}function io(){if(q)return ae(W,null),W;var t=document.createDocumentFragment(),e=document.createComment(""),r=tt();return t.append(e,r),ae(e,r),t}function st(t,e){if(q){var r=x;(!(r.f&32768)||r.nodes.end===null)&&(r.nodes.end=W),vr();return}t!==null&&t.before(e)}var so=["touchstart","touchmove"];function oo(t){return so.includes(t)}function ao(t){let e=0,r=Qt(0),n;return()=>{Qr()&&(_(r),Zr(()=>(e===0&&(n=Oe(()=>t(()=>qe(r)))),e+=1,()=>{bt(()=>{e-=1,e===0&&(n?.(),n=void 0,qe(r))})})))}}var lo=Fr|ve;function uo(t,e,r,n){new fo(t,e,r,n)}var ft=new WeakMap,Or=new WeakMap,mt=new WeakMap,Ne=new WeakMap,K=new WeakMap,ct=new WeakMap,Q=new WeakMap,lt=new WeakMap,jt=new WeakMap,ie=new WeakMap,Kt=new WeakMap,Be=new WeakMap,Nr=new WeakMap,zr=new WeakMap,Nt=new WeakMap,$n=new WeakMap,R=new WeakSet,fo=class{constructor(t,e,r,n){Jr(this,R),T(this,"parent",void 0),T(this,"is_pending",!1),T(this,"transform_error",void 0),b(this,ft,void 0),b(this,Or,q?W:null),b(this,mt,void 0),b(this,Ne,void 0),b(this,K,void 0),b(this,ct,null),b(this,Q,null),b(this,lt,null),b(this,jt,null),b(this,ie,0),b(this,Kt,0),b(this,Be,!1),b(this,Nr,new Set),b(this,zr,new Set),b(this,Nt,null),b(this,$n,ao(()=>(y(Nt,this,Qt(o(ie,this))),()=>{y(Nt,this,null)}))),y(ft,this,t),y(mt,this,e),y(Ne,this,i=>{var s=x;s.b=this,s.f|=128,r(i)}),this.parent=x.b,this.transform_error=n??this.parent?.transform_error??(i=>i),y(K,this,Xr(()=>{if(q){const i=o(Or,this);vr();const s=i.data==="[!";if(i.data.startsWith("[?")){const a=JSON.parse(i.data.slice(2));k(R,this,ho).call(this,a)}else s?k(R,this,vo).call(this):k(R,this,co).call(this)}else k(R,this,$i).call(this)},lo)),q&&y(ft,this,W)}defer_effect(t){In(t,o(Nr,this),o(zr,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!o(mt,this).pending}update_pending_count(t,e){k(R,this,_i).call(this,t,e),y(ie,this,o(ie,this)+t),o(Nt,this)&&!o(Be,this)&&(y(Be,this,!0),bt(()=>{y(Be,this,!1),o(Nt,this)&&ce(o(Nt,this),o(ie,this))}))}get_effect_pending(){return o($n,this).call(this),_(o(Nt,this))}error(t){if(!o(mt,this).onerror&&!o(mt,this).failed)throw t;$?.is_fork?(o(ct,this)&&$.skip_effect(o(ct,this)),o(Q,this)&&$.skip_effect(o(Q,this)),o(lt,this)&&$.skip_effect(o(lt,this)),$.oncommit(()=>{k(R,this,_n).call(this,t)})):k(R,this,_n).call(this,t)}};function co(){try{y(ct,this,rt(()=>o(Ne,this).call(this,o(ft,this))))}catch(t){this.error(t)}}function ho(t){const e=o(mt,this).failed,{reset:r,invoke_onerror:n}=k(R,this,bi).call(this,t);bt(n),e&&y(lt,this,rt(()=>{e(o(ft,this),()=>t,()=>r)}))}function bi(t){var e=!1,r=!1;const n=()=>{if(e){ls();return}e=!0,r&&_s(),o(lt,this)!==null&&Gt(o(lt,this),()=>{y(lt,this,null)}),k(R,this,tn).call(this,()=>{k(R,this,$i).call(this)})};return{reset:n,invoke_onerror:()=>{try{r=!0,o(mt,this).onerror?.(t,n),r=!1}catch(i){yt(i,o(K,this)&&o(K,this).parent)}}}}function vo(){const t=o(mt,this).pending;t&&(this.is_pending=!0,y(Q,this,rt(()=>t(o(ft,this)))),bt(()=>{var e=y(jt,this,document.createDocumentFragment()),r=tt(),n=!1;if(e.append(r),y(ct,this,k(R,this,tn).call(this,()=>{try{return rt(()=>o(Ne,this).call(this,r))}catch(i){try{this.error(i),n=!0}catch(s){yt(s,o(K,this).parent)}return null}})),o(ct,this)===null){y(jt,this,null),n&&k(R,this,ur).call(this,$);return}o(Kt,this)===0&&(o(ft,this).before(e),y(jt,this,null),Gt(o(Q,this),()=>{y(Q,this,null)}),k(R,this,ur).call(this,$))}))}function $i(){try{if(this.is_pending=this.has_pending_snippet(),y(Kt,this,0),y(ie,this,0),y(ct,this,rt(()=>{o(Ne,this).call(this,o(ft,this))})),o(Kt,this)>0){var t=y(jt,this,document.createDocumentFragment());Yr(o(ct,this),t);const e=o(mt,this).pending;y(Q,this,rt(()=>e(o(ft,this))))}else k(R,this,ur).call(this,$)}catch(e){this.error(e)}}function ur(t){this.is_pending=!1,t.transfer_effects(o(Nr,this),o(zr,this))}function tn(t){var e=x,r=S,n=D;$t(o(K,this)),nt(o(K,this)),ue(o(K,this).ctx);try{return Xt.ensure(),t()}finally{$t(e),nt(r),ue(n)}}function _i(t,e){if(!this.has_pending_snippet()){if(this.parent){var r;k(R,r=this.parent,_i).call(r,t,e)}return}y(Kt,this,o(Kt,this)+t),o(Kt,this)===0&&(k(R,this,ur).call(this,e),o(Q,this)&&Gt(o(Q,this),()=>{y(Q,this,null)}),o(jt,this)&&(o(ft,this).before(o(jt,this)),y(jt,this,null)))}function _n(t){o(ct,this)&&(F(o(ct,this)),y(ct,this,null)),o(Q,this)&&(F(o(Q,this)),y(Q,this,null)),o(lt,this)&&(F(o(lt,this)),y(lt,this,null)),q&&(H(o(Or,this)),us(),H(tr()));let e=o(mt,this).failed;const r=n=>{const{reset:i,invoke_onerror:s}=k(R,this,bi).call(this,n);s(),e&&y(lt,this,k(R,this,tn).call(this,()=>{try{return rt(()=>{var a=x;a.b=this,a.f|=128,e(o(ft,this),()=>n,()=>i)})}catch(a){return yt(a,o(K,this).parent),null}}))};bt(()=>{var n;try{n=this.transform_error(t)}catch(i){yt(i,o(K,this)&&o(K,this).parent);return}n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(r,i=>yt(i,o(K,this)&&o(K,this).parent)):r(n)})}function be(t,e){var r=e==null?"":typeof e=="object"?`${e}`:e;r!==(t[Qe]??(t[Qe]=t.nodeValue))&&(t[Qe]=r,t.nodeValue=`${r}`)}function ki(t,e){return xi(t,e)}function po(t,e){jr(),e.intro=e.intro??!1;const r=e.target,n=q,i=W;try{for(var s=At(r);s&&(s.nodeType!==8||s.data!=="[");)s=_t(s);if(!s)throw le;Et(!0),H(s);const a=xi(t,{...e,anchor:s});return Et(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
2
|
+
`).some(l=>l.startsWith("https://svelte.dev/e/")))throw a;return a!==le&&console.warn("Failed to hydrate: ",a),e.recover===!1&&ms(),jr(),si(r),Et(!1),ki(t,e)}finally{Et(n),H(i)}}var He=new Map;function xi(t,{target:e,anchor:r,props:n={},events:i,context:s,intro:a=!0,transformError:l}){jr();var f=void 0,u=Vs(()=>{var c=r??e.appendChild(tt());uo(c,{pending:()=>{}},h=>{zn({});var w=D;if(s&&(w.c=s),i&&(n.$$events=i),q&&ae(h,null),f=t(h,n)||Dn(),q&&(x.nodes.end=W,W===null||W.nodeType!==8||W.data!=="]"))throw hr(),le;Rn()},l);var v=new Set,d=h=>{for(var w=0;w<h.length;w++){var M=h[w];if(!v.has(M)){v.add(M);var p=oo(M);for(const P of[e,document]){var g=He.get(P);g===void 0&&(g=new Map,He.set(P,g));var j=g.get(M);j===void 0?(P.addEventListener(M,Ar,{passive:p}),g.set(M,1)):g.set(M,j+1)}}}};return d(cr(Gs)),bn.add(d),()=>{for(var h of v)for(const p of[e,document]){var w=He.get(p),M=w.get(h);--M==0?(p.removeEventListener(h,Ar),w.delete(h),w.size===0&&He.delete(p)):w.set(h,M)}bn.delete(d),c!==r&&c.parentNode?.removeChild(c)}});return Rr.set(f,u),f}var Rr=new WeakMap;function go(t,e){const r=Rr.get(t);return r?(Rr.delete(t),r(e)):Promise.resolve()}var Mt=new WeakMap,Tt=new WeakMap,it=new WeakMap,$e=new WeakMap,$r=new WeakMap,_r=new WeakMap,kn=new WeakMap,mo=class{constructor(t,e=!0){T(this,"anchor",void 0),b(this,Mt,new Map),b(this,Tt,new Map),b(this,it,new Map),b(this,$e,new Set),b(this,$r,!0),b(this,_r,r=>{if(o(Mt,this).has(r)){var n=o(Mt,this).get(r),i=o(Tt,this).get(n);if(i)lr(i),o($e,this).delete(n);else{var s=o(it,this).get(n);s&&(lr(s.effect),o(Tt,this).set(n,s.effect),o(it,this).delete(n),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),i=s.effect)}for(const[a,l]of o(Mt,this)){if(o(Mt,this).delete(a),a===r)break;const f=o(it,this).get(l);f&&(F(f.effect),o(it,this).delete(l))}for(const[a,l]of o(Tt,this)){if(a===n||o($e,this).has(a))continue;const f=()=>{if(Array.from(o(Mt,this).values()).includes(a)){var u=document.createDocumentFragment();Yr(l,u),u.append(tt()),o(it,this).set(a,{effect:l,fragment:u})}else F(l);o($e,this).delete(a),o(Tt,this).delete(a)};o($r,this)||!i?(o($e,this).add(a),Gt(l,f,!1)):f()}}}),b(this,kn,r=>{o(Mt,this).delete(r);const n=Array.from(o(Mt,this).values());for(const[i,s]of o(it,this))n.includes(i)||(F(s.effect),o(it,this).delete(i))}),this.anchor=t,y($r,this,e)}ensure(t,e){var r=$,n=oi();if(e&&!o(Tt,this).has(t)&&!o(it,this).has(t))if(n){var i=document.createDocumentFragment(),s=tt();i.append(s),o(it,this).set(t,{effect:rt(()=>e(s)),fragment:i})}else o(Tt,this).set(t,rt(()=>e(this.anchor)));if(o(Mt,this).set(r,t),n){for(const[a,l]of o(Tt,this))a===t?r.unskip_effect(l):r.skip_effect(l);for(const[a,l]of o(it,this))a===t?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(o(_r,this)),r.ondiscard(o(kn,this))}else q&&(this.anchor=W),o(_r,this).call(this,r)}};function kr(t,e,r=!1){var n;q&&(n=W,vr());var i=new mo(t),s=r?Fr:0;function a(l,f){if(q){var u=An(n);if(l!==parseInt(u.substring(1))){var c=tr();H(c),i.anchor=c,Et(!1),i.ensure(l,f),Et(!0);return}}i.ensure(l,f)}Xr(()=>{var l=!1;e((f,u=0)=>{l=!0,a(u,f)}),l||a(-1,null)},s)}function wo(t,e,r){for(var n=[],i=e.length,s,a=e.length,l=0;l<i;l++){let v=e[l];Gt(v,()=>{if(s){if(s.pending.delete(v),s.done.add(v),s.pending.size===0){var d=t.outrogroups;Dr(t,cr(s.done)),d.delete(s),d.size===0&&(t.outrogroups=null)}}else a-=1},!1)}if(a===0){var f=n.length===0&&r!==null&&t.pending.size===0;if(f){var u=r,c=u.parentNode;si(c),c.append(u),t.items.clear()}Dr(t,e,!f)}else s={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(s)}function Dr(t,e,r=!0){var n;if(t.pending.size>0){n=new Set;for(const a of t.pending.values())for(const l of a)n.add(t.items.get(l).e)}for(var i=0;i<e.length;i++){var s=e[i];n?.has(s)?(s.f|=Se,Yr(s,document.createDocumentFragment())):F(e[i],r)}}var Je;function yo(t,e,r,n,i,s=null){var a=t,l=new Map;if((e&4)!==0){var f=t;a=q?H(At(f)):f.appendChild(tt())}q&&vr();var u=null,c=Br(()=>{var g=r();return qn(g)?g:g==null?[]:cr(g)}),v,d=new Map,h=!0;function w(g){!(p.effect.f&16384)&&(p.pending.delete(g),p.fallback=u,bo(p,v,a,e,n),u!==null&&(v.length===0?(u.f&33554432)===0?lr(u):(u.f^=Se,Me(u,null,a)):Gt(u,()=>{u=null})))}function M(g){p.pending.delete(g)}var p={effect:Xr(()=>{v=_(c);var g=v.length;let j=!1;q&&An(a)==="[!"!=(g===0)&&(a=tr(),H(a),Et(!1),j=!0);for(var P=new Set,E=$,Z=oi(),m=0;m<g;m+=1){q&&W.nodeType===8&&W.data==="]"&&(a=W,j=!0,Et(!1));var O=v[m],C=n(O,m),V=h?null:l.get(C);V?(V.v&&ce(V.v,O),V.i&&ce(V.i,m),Z&&E.unskip_effect(V.e)):(V=$o(l,h?a:Je??(Je=tt()),O,C,m,i,e,r),h||(V.e.f|=Se),l.set(C,V)),P.add(C)}if(g===0&&s&&!u&&(h?u=rt(()=>s(a)):(u=rt(()=>s(Je??(Je=tt()))),u.f|=Se)),g>P.size&&hs("","",""),q&&g>0&&H(tr()),!h)if(d.set(E,P),Z){for(const[J,pr]of l)P.has(J)||E.skip_effect(pr.e);E.oncommit(w),E.ondiscard(M)}else w(E);j&&Et(!0),_(c)}),flags:e,items:l,pending:d,outrogroups:null,fallback:u};h=!1,q&&(a=W)}function _e(t){for(;t!==null&&(t.f&32)===0;)t=t.next;return t}function bo(t,e,r,n,i){var s=(n&8)!==0,a=e.length,l=t.items,f=_e(t.effect.first),u,c=null,v,d=[],h=[],w,M,p,g;if(s)for(g=0;g<a;g+=1)w=e[g],M=i(w,g),p=l.get(M).e,!(p.f&33554432)&&(p.nodes?.a?.measure(),(v??(v=new Set)).add(p));for(g=0;g<a;g+=1){if(w=e[g],M=i(w,g),p=l.get(M).e,t.outrogroups!==null)for(const J of t.outrogroups)J.pending.delete(p),J.done.delete(p);if(p.f&8192&&(lr(p),s&&(p.nodes?.a?.unfix(),(v??(v=new Set)).delete(p))),(p.f&33554432)!==0)if(p.f^=Se,p===f)Me(p,null,r);else{var j=c?c.next:f;p===t.effect.last&&(t.effect.last=p.prev),p.prev&&(p.prev.next=p.next),p.next&&(p.next.prev=p.prev),Pt(t,c,p),Pt(t,p,j),Me(p,j,r),c=p,d=[],h=[],f=_e(c.next);continue}if(p!==f){if(u!==void 0&&u.has(p)){if(d.length<h.length){var P=h[0],E;c=P.prev;var Z=d[0],m=d[d.length-1];for(E=0;E<d.length;E+=1)Me(d[E],P,r);for(E=0;E<h.length;E+=1)u.delete(h[E]);Pt(t,Z.prev,m.next),Pt(t,c,Z),Pt(t,m,P),f=P,c=m,g-=1,d=[],h=[]}else u.delete(p),Me(p,f,r),Pt(t,p.prev,p.next),Pt(t,p,c===null?t.effect.first:c.next),Pt(t,c,p),c=p;continue}for(d=[],h=[];f!==null&&f!==p;)(u??(u=new Set)).add(f),h.push(f),f=_e(f.next);if(f===null)continue}!(p.f&33554432)&&d.push(p),c=p,f=_e(p.next)}if(t.outrogroups!==null){for(const J of t.outrogroups)J.pending.size===0&&(Dr(t,cr(J.done)),t.outrogroups?.delete(J));t.outrogroups.size===0&&(t.outrogroups=null)}if(f!==null||u!==void 0){var O=[];if(u!==void 0)for(p of u)!(p.f&8192)&&O.push(p);for(;f!==null;)!(f.f&8192)&&f!==t.fallback&&O.push(f),f=_e(f.next);var C=O.length;if(C>0){var V=(n&4)!==0&&a===0?r:null;if(s){for(g=0;g<C;g+=1)O[g].nodes?.a?.measure();for(g=0;g<C;g+=1)O[g].nodes?.a?.fix()}wo(t,O,V)}}s&&bt(()=>{if(v!==void 0)for(p of v)p.nodes?.a?.apply()})}function $o(t,e,r,n,i,s,a,l){var f=(a&1)!==0?(a&16)===0?ti(r,!1,!1):Qt(r):null,u=(a&2)!==0?Qt(i):null;return{v:f,i:u,e:rt(()=>(s(e,f??r,u??i,l),()=>{t.delete(n)}))}}function Me(t,e,r){if(t.nodes)for(var n=t.nodes.start,i=t.nodes.end,s=e&&(e.f&33554432)===0?e.nodes.start:r;n!==null;){var a=_t(n);if(s.before(n),n===i)return;n=a}}function Pt(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function _o(t,e){Bs(()=>{t=x?.parent?.nodes?.start??t;var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const i=Ur("style");i.id=e.hash,i.textContent=e.code,n.appendChild(i)}})}var ko=Symbol("is custom element"),xo=Symbol("is html"),Mo=os?"link":"LINK";function So(t){if(q){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;It(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var i=t.checked;It(t,"checked",null),t.checked=i}}};t[Ee]=r,bt(r),Fn()}}function It(t,e,r,n){var i=Eo(t);q&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName===Mo)||i[e]!==(i[e]=r)&&(e==="loading"&&(t[ns]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Wo(t).has(e)?t[e]=r:t.setAttribute(e,r))}function Eo(t){return t[Wr]??(t[Wr]={[ko]:t.nodeName.includes("-"),[xo]:t.namespaceURI==="http://www.w3.org/1999/xhtml"})}var xn=new Map;function Wo(t){var e=t.getAttribute("is")||t.nodeName,r=xn.get(e);if(r)return r;xn.set(e,r=new Set);for(var n,i=t,s=Element.prototype;s!==i;){n=Ui(i);for(var a in n)n[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.add(a);i=Tn(i)}return r}function qo(t,e,r=e){var n=new WeakSet;Ms(t,"input",async i=>{var s=i?t.defaultValue:t.value;if(s=xr(t)?Mr(s):s,r(s),$!==null&&n.add($),await Xs(),s!==(s=e())){var a=t.selectionStart,l=t.selectionEnd,f=t.value.length;if(t.value=s??"",l!==null){var u=t.value.length;a===l&&l===f&&u>f?(t.selectionStart=u,t.selectionEnd=u):(t.selectionStart=a,t.selectionEnd=Math.min(l,u))}}}),(q&&t.defaultValue!==t.value||Oe(e)==null&&t.value)&&(r(xr(t)?Mr(t.value):t.value),$!==null&&n.add($)),Zr(()=>{var i=e();if(t===document.activeElement){var s=de?rr:$;if(n.has(s))return}xr(t)&&i===Mr(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}function xr(t){var e=t.type;return e==="number"||e==="range"}function Mr(t){return t===""?null:+t}var Mi,se=new WeakMap,fr=new WeakMap,Sr=new WeakMap,Mn=new WeakSet,Si=class{constructor(t){Jr(this,Mn),b(this,se,new WeakMap),b(this,fr,void 0),b(this,Sr,void 0),y(Sr,this,t)}observe(t,e){var r=o(se,this).get(t)||new Set;return r.add(e),o(se,this).set(t,r),k(Mn,this,To).call(this).observe(t,o(Sr,this)),()=>{var n=o(se,this).get(t);n.delete(e),n.size===0&&(o(se,this).delete(t),o(fr,this).unobserve(t))}}};Mi=Si;function To(){return o(fr,this)??y(fr,this,new ResizeObserver(t=>{for(var e of t){Mi.entries.set(e.target,e);for(var r of o(se,this).get(e.target)||[])r(e)}}))}T(Si,"entries",new WeakMap);var Ue=!1;function Po(t){var e=Ue;try{return Ue=!1,[t(),Ue]}finally{Ue=e}}function St(t,e,r,n){var i=!dr||(r&2)!==0,s=(r&8)!==0,a=(r&16)!==0,l=n,f=!0,u=void 0,c=()=>a&&i?(u??(u=Le(n)),_(u)):(f&&(f=!1,l=a?Oe(n):n),l);let v;if(s){var d=Ke in t||jn in t;v=Ht(t,e)?.set??(d&&e in t?E=>t[e]=E:void 0)}var h,w=!1;s?[h,w]=Po(()=>t[e]):h=t[e],h===void 0&&n!==void 0&&(h=c(),v&&(i&&ws(e),v(h)));var M;if(i?M=()=>{var E=t[e];return E===void 0?c():(f=!0,E)}:M=()=>{var E=t[e];return E!==void 0&&(l=void 0),E===void 0?l:E},i&&(r&4)===0)return M;if(v){var p=t.$$legacy;return(function(E,Z){return arguments.length>0?((!i||!Z||p||w)&&v(Z?M():E),E):M()})}var g=!1,j=((r&1)!==0?Le:Br)(()=>(g=!1,M()));s&&_(j);var P=x;return(function(E,Z){if(arguments.length>0){const m=Z?_(j):i&&s?Vt(E):E;return Y(j,m),g=!0,l!==void 0&&(l=m),E}return qt&&g||(P.f&16384)!==0?j.v:_(j)})}function Lo(t){return new jo(t)}var zt=new WeakMap,vt=new WeakMap,jo=class{constructor(t){b(this,zt,void 0),b(this,vt,void 0);var e=new Map,r=(i,s)=>{var a=ti(s,!1,!1);return e.set(i,a),a};const n=new Proxy({...t.props||{},$$events:{}},{get(i,s){return _(e.get(s)??r(s,Reflect.get(i,s)))},has(i,s){return s===jn?!0:(_(e.get(s)??r(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,a){return Y(e.get(s)??r(s,a),a),Reflect.set(i,s,a)}});y(vt,this,(t.hydrate?po:ki)(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)&&ot(),y(zt,this,n.$$events);for(const i of Object.keys(o(vt,this)))i==="$set"||i==="$destroy"||i==="$on"||Te(this,i,{get(){return o(vt,this)[i]},set(s){o(vt,this)[i]=s},enumerable:!0});o(vt,this).$set=i=>{Object.assign(n,i)},o(vt,this).$destroy=()=>{go(o(vt,this))}}$set(t){o(vt,this).$set(t)}$on(t,e){o(zt,this)[t]=o(zt,this)[t]||[];const r=(...n)=>e.call(this,...n);return o(zt,this)[t].push(r),()=>{o(zt,this)[t]=o(zt,this)[t].filter(n=>n!==r)}}$destroy(){o(vt,this).$destroy()}},Ei;typeof HTMLElement=="function"&&(Ei=class extends HTMLElement{constructor(t,e,r){super(),T(this,"$$ctor",void 0),T(this,"$$s",void 0),T(this,"$$c",void 0),T(this,"$$cn",!1),T(this,"$$d",{}),T(this,"$$r",!1),T(this,"$$p_d",{}),T(this,"$$l",{}),T(this,"$$l_u",new Map),T(this,"$$me",void 0),T(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 s=Ur("slot");n!=="default"&&(s.name=n),st(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const e={},r=Ao(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]=Xe(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=Lo({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:e,$$host:this}}),this.$$me=Fs(()=>{Zr(()=>{this.$$r=!0;for(const n of Ge(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Xe(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 s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(t,e,r){this.$$r||(t=this.$$g_p(t),this.$$d[t]=Xe(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 Ge(this.$$p_d).find(e=>this.$$p_d[e].attribute===t||!this.$$p_d[e].attribute&&e.toLowerCase()===t)||t}});function Xe(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 Ao(t){const e={};return t.childNodes.forEach(r=>{e[r.slot||"default"]=!0}),e}function Oo(t,e,r,n,i,s){let a=class extends Ei{constructor(){super(t,r,i),this.$$p_d=e}static get observedAttributes(){return Ge(e).map(l=>(e[l].attribute||l).toLowerCase())}};return Ge(e).forEach(l=>{Te(a.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(f){f=Xe(l,f,e),this.$$d[l]=f;var u=this.$$c;u&&(Ht(u,l)?.get?u[l]=f:u.$set({[l]:f}))}})}),n.forEach(l=>{Te(a.prototype,l,{get(){return this.$$c?.[l]}})}),s&&(a=s(a)),t.element=a,a}var Wi="picture dictionary";function No(t){const e=t.trim();return e?e.startsWith("//")||/^https:\/\//iu.test(e)?!0:e.startsWith("/")?zo(e):!1:!1}var Sn="https://pie-picture-dictionary.invalid";function zo(t){try{return new URL(t,Sn).origin===Sn}catch{return!1}}function En(t){return typeof t=="string"?t.trim():""}function Ro(t){if(!t||typeof t!="object")return null;const e=t,r=En(e.url)||En(e.image);return No(r)?{url:r,caption:typeof e.caption=="string"&&e.caption.trim()?e.caption.trim():void 0,width:typeof e.width=="number"?e.width:void 0,height:typeof e.height=="number"?e.height:void 0}:null}function Do(t){return Fi(t,{serviceLabel:Wi,keys:["pictures","images"],toItem:Ro})}function Co(t){return Vi({...t,serviceLabel:Wi,readResponse:Do})}var Io=Ot('<p class="pie-tool-picture-dictionary__notice svelte-rpoqcp">No picture dictionary service is configured for this assessment.</p>'),Fo=Ot('<p class="pie-tool-picture-dictionary__notice svelte-rpoqcp">Type a word to see a picture of it.</p>'),Wn=Ot('<p class="pie-tool-picture-dictionary__notice svelte-rpoqcp"> </p>'),Vo=Ot('<p class="pie-tool-picture-dictionary__error svelte-rpoqcp" role="alert"> </p>'),Bo=Ot('<span class="pie-tool-picture-dictionary__caption svelte-rpoqcp" aria-hidden="true"> </span>'),Ho=Ot('<li class="pie-tool-picture-dictionary__cell svelte-rpoqcp"><img class="pie-tool-picture-dictionary__image svelte-rpoqcp" loading="lazy" decoding="async"/> <!></li>'),Jo=Ot('<ul class="pie-tool-picture-dictionary__grid svelte-rpoqcp"></ul>'),Uo=Ot('<div class="pie-tool-picture-dictionary svelte-rpoqcp" role="dialog" aria-label="Picture Dictionary"><form class="pie-tool-picture-dictionary__search svelte-rpoqcp"><label class="pie-tool-picture-dictionary__label svelte-rpoqcp" for="pie-tool-picture-dictionary-term">Word or phrase</label> <div class="pie-tool-picture-dictionary__row svelte-rpoqcp"><input id="pie-tool-picture-dictionary-term" class="pie-tool-picture-dictionary__input svelte-rpoqcp" type="text" autocomplete="off" spellcheck="false"/> <button class="pie-tool-picture-dictionary__submit svelte-rpoqcp" type="submit">Look up</button></div></form> <div class="pie-tool-picture-dictionary__status svelte-rpoqcp" role="status" aria-live="polite"> </div> <div class="pie-tool-picture-dictionary__body svelte-rpoqcp"><!></div></div>'),Ko={hash:"svelte-rpoqcp",code:`.pie-tool-picture-dictionary.svelte-rpoqcp {display:flex;flex-direction:column;gap:0.5rem;height:100%;min-height:0;padding:0.75rem;box-sizing:border-box;color:var(--pie-text, #1f2937);background:var(--pie-background, #fff);font-size:0.95rem;}.pie-tool-picture-dictionary__search.svelte-rpoqcp {display:flex;flex-direction:column;gap:0.25rem;}.pie-tool-picture-dictionary__label.svelte-rpoqcp {font-size:0.8rem;font-weight:600;}.pie-tool-picture-dictionary__row.svelte-rpoqcp {display:flex;gap:0.5rem;}.pie-tool-picture-dictionary__input.svelte-rpoqcp {flex:1 1 auto;min-width:0;padding:0.35rem 0.5rem;border:1px solid var(--pie-border-light, #e5e7eb);border-radius:0.375rem;background:var(--pie-background, #fff);color:inherit;font:inherit;}.pie-tool-picture-dictionary__submit.svelte-rpoqcp {flex:0 0 auto;padding:0.35rem 0.75rem;border:1px solid var(--pie-border-light, #e5e7eb);border-radius:0.375rem;background:var(--pie-secondary-background, #f9fafb);color:inherit;font:inherit;cursor:pointer;}.pie-tool-picture-dictionary__submit.svelte-rpoqcp:disabled {opacity:0.5;cursor:not-allowed;}.pie-tool-picture-dictionary__input.svelte-rpoqcp:focus-visible,
|
|
3
3
|
.pie-tool-picture-dictionary__submit.svelte-rpoqcp:focus-visible {outline:2px solid var(--pie-button-focus-outline, #2563eb);outline-offset:2px;}.pie-tool-picture-dictionary__status.svelte-rpoqcp {position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;}.pie-tool-picture-dictionary__body.svelte-rpoqcp {flex:1 1 auto;min-height:0;overflow-y:auto;}.pie-tool-picture-dictionary__notice.svelte-rpoqcp,
|
|
4
|
-
.pie-tool-picture-dictionary__error.svelte-rpoqcp {margin:0.25rem 0;}.pie-tool-picture-dictionary__grid.svelte-rpoqcp {display:grid;grid-template-columns:repeat(auto-fill, minmax(9rem, 1fr));gap:0.75rem;margin:0;padding:0;list-style:none;}.pie-tool-picture-dictionary__cell.svelte-rpoqcp {display:flex;flex-direction:column;align-items:center;gap:0.25rem;padding:0.5rem;border:1px solid var(--pie-border-light, #e5e7eb);border-radius:0.375rem;}.pie-tool-picture-dictionary__image.svelte-rpoqcp {max-width:100%;height:auto;}.pie-tool-picture-dictionary__caption.svelte-rpoqcp {text-align:center;font-size:0.85rem;opacity:0.85;}`};function
|
|
4
|
+
.pie-tool-picture-dictionary__error.svelte-rpoqcp {margin:0.25rem 0;}.pie-tool-picture-dictionary__grid.svelte-rpoqcp {display:grid;grid-template-columns:repeat(auto-fill, minmax(9rem, 1fr));gap:0.75rem;margin:0;padding:0;list-style:none;}.pie-tool-picture-dictionary__cell.svelte-rpoqcp {display:flex;flex-direction:column;align-items:center;gap:0.25rem;padding:0.5rem;border:1px solid var(--pie-border-light, #e5e7eb);border-radius:0.375rem;}.pie-tool-picture-dictionary__image.svelte-rpoqcp {max-width:100%;height:auto;}.pie-tool-picture-dictionary__caption.svelte-rpoqcp {text-align:center;font-size:0.85rem;opacity:0.85;}`};function Qo(t,e){zn(e,!0),_o(t,Ko);let r=St(e,"visible",7,!1),n=St(e,"toolId",7,"pictureDictionary"),i=St(e,"term",7,""),s=St(e,"termRequestId",7,void 0),a=St(e,"endpoint",7,""),l=St(e,"language",7,""),f=St(e,"lookup",7,void 0),u=St(e,"headers",7,void 0),c=St(e,"credentials",7,void 0),v=dt(""),d=dt(Vt({kind:"idle"}));const h=cn(()=>f()??(a()?Co({endpoint:a(),headers:u(),credentials:c()}):null)),w=new Hi({resolver:()=>_(h),max:4,language:()=>l(),onState:m=>{Y(d,m,!0)}});gn(()=>{_(h),Oe(()=>w.syncConfigured(_(d)))}),gn(()=>{const m=Bi(i()),O=s(),C=r();Oe(()=>{w.syncRequestedTerm({term:m,requestId:O,visible:C})&&Y(v,m,!0)})});function M(m){m.preventDefault(),w.run(_(v))}function p(m,O){return m.caption??O}const g=cn(()=>Ii(_(d),{countLabel:m=>`${m} ${m===1?"picture":"pictures"}`,emptyLabel:m=>`No picture for ${m}`}));var j={get visible(){return r()},set visible(m=!1){r(m),ot()},get toolId(){return n()},set toolId(m="pictureDictionary"){n(m),ot()},get term(){return i()},set term(m=""){i(m),ot()},get termRequestId(){return s()},set termRequestId(m=void 0){s(m),ot()},get endpoint(){return a()},set endpoint(m=""){a(m),ot()},get language(){return l()},set language(m=""){l(m),ot()},get lookup(){return f()},set lookup(m=void 0){f(m),ot()},get headers(){return u()},set headers(m=void 0){u(m),ot()},get credentials(){return c()},set credentials(m=void 0){c(m),ot()}},P=io(),E=Rs(P),Z=m=>{var O=Uo(),C=ne(O),V=ye(ne(C),2),J=ne(V);So(J);var pr=ye(J,2);Rt(V),Rt(C);var en=ye(C,2),qi=we(en,!0),rn=ye(en,2),Ti=ne(rn),Pi=L=>{st(L,Io())},Li=L=>{st(L,Fo())},ji=L=>{var X=Wn(),xt=we(X);te(()=>be(xt,`Looking up “${_(d).term??""}”…`)),st(L,X)},Ai=L=>{var X=Wn(),xt=we(X);te(()=>be(xt,`No picture for “${_(d).term??""}”.`)),st(L,X)},Oi=L=>{var X=Vo(),xt=we(X,!0);te(()=>be(xt,_(d).reason)),st(L,X)},Ni=L=>{var X=Jo();yo(X,21,()=>_(d).items,xt=>xt.url,(xt,Yt)=>{var gr=Ho(),ge=ne(gr),zi=ye(ge,2),Ri=me=>{var nn=Bo(),Di=we(nn,!0);te(()=>be(Di,_(Yt).caption)),st(me,nn)};kr(zi,me=>{_(Yt).caption&&me(Ri)}),Rt(gr),te(me=>{It(ge,"src",_(Yt).url),It(ge,"alt",me),It(ge,"width",_(Yt).width),It(ge,"height",_(Yt).height)},[()=>p(_(Yt),_(d).term)]),st(xt,gr)}),Rt(X),st(L,X)};kr(Ti,L=>{_(d).kind==="unconfigured"?L(Pi):_(d).kind==="idle"?L(Li,1):_(d).kind==="searching"?L(ji,2):_(d).kind==="empty"?L(Ai,3):_(d).kind==="error"?L(Oi,4):L(Ni,-1)}),Rt(rn),Rt(O),te(L=>{It(O,"data-pie-tool-id",n()),J.disabled=_(d).kind==="unconfigured",pr.disabled=L,be(qi,_(g))},[()=>_(d).kind==="unconfigured"||!_(v).trim()]),to("submit",C,M),qo(J,()=>_(v),L=>Y(v,L)),st(m,O)};return kr(E,m=>{r()&&m(Z)}),st(t,P),Rn(j)}Zo("pie-tool-picture-dictionary",Oo(Qo,{visible:{attribute:"visible",type:"Boolean"},toolId:{attribute:"tool-id",type:"String"},term:{attribute:"term",type:"String"},endpoint:{attribute:"endpoint",type:"String"},language:{attribute:"language",type:"String"},termRequestId:{},lookup:{},headers:{},credentials:{}},[],[],{mode:"open"},Ci));function Zo(t,e){customElements.get(t)||customElements.define(t,e)}export{Qo as default};
|