@pie-players/pie-section-player 0.3.74 → 0.3.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +249 -134
- package/dist/browser/assets/{evaluation-worker-DkU_wGh3.js → evaluation-worker-CORp9m0K.js} +39245 -38027
- package/dist/browser/chunks/PUA-tLuTiQ7--f2b27953.js +1 -1
- package/dist/browser/chunks/accents-BTUYmhn9-cafeb96e.js +1 -1
- package/dist/browser/chunks/accents-b-i-CngHZsLL-e0eb98fd.js +1 -1
- package/dist/browser/chunks/arabic-BzEHMVZD-30ac1ade.js +1 -1
- package/dist/browser/chunks/arrows-VjxlU-jv-2e17c192.js +1 -1
- package/dist/browser/chunks/braille-BeWC_Ruq-a3bb8ef9.js +1 -1
- package/dist/browser/chunks/braille-d-Dk6J96GO-d832bfbf.js +1 -1
- package/dist/browser/chunks/browser-a3c32178.js +17 -16
- package/dist/browser/chunks/calculator-element-271c142f.js +7 -3
- package/dist/browser/chunks/calligraphic-Cew9cU3x-04cf0735.js +1 -1
- package/dist/browser/chunks/catalog-context-46d3e50e.js +1 -0
- package/dist/browser/chunks/catalog-owner-d602f784.js +1 -0
- package/dist/browser/chunks/cherokee-Cny3FYho-4da7d2f3.js +1 -1
- package/dist/browser/chunks/cyrillic-CfCDulXU-5550df0b.js +1 -1
- package/dist/browser/chunks/cyrillic-ss-lU7bNGG9-12eb0188.js +1 -1
- package/dist/browser/chunks/devanagari-CDIz2h-r-18c38725.js +1 -1
- package/dist/browser/chunks/dist-41b39e7f.js +1 -1
- package/dist/browser/chunks/dist-59132a53.js +1 -1
- package/dist/browser/chunks/dist-60d7afef.js +1 -1
- package/dist/browser/chunks/dist-ca9b9622.js +1 -1
- package/dist/browser/chunks/double-struck-BpJEQk8y-500ce8dd.js +1 -1
- package/dist/browser/chunks/fraktur-rLEq9DEH-44cc14d8.js +1 -1
- package/dist/browser/chunks/greek-BlraJTyL-90ce8924.js +1 -1
- package/dist/browser/chunks/greek-ss-D-EN2PK0-91610739.js +1 -1
- package/dist/browser/chunks/hebrew-GiQZeybp-b583f555.js +1 -1
- package/dist/browser/chunks/latin-b-BhEnC7R2-d13e06ff.js +1 -1
- package/dist/browser/chunks/latin-bi-DqiIKv3U-1dec8705.js +1 -1
- package/dist/browser/chunks/latin-i-B1xtwaE1-21637466.js +1 -1
- package/dist/browser/chunks/latin-xfWFlLkD-5bcea5cf.js +1 -1
- package/dist/browser/chunks/logger-8b07fb72.js +1 -1
- package/dist/browser/chunks/marrows-DD1NgMQi-15b63755.js +1 -1
- package/dist/browser/chunks/math-DpWn1mbG-38eeb914.js +1 -1
- package/dist/browser/chunks/math-rendering-ready-9a0fd90a.js +1 -1
- package/dist/browser/chunks/{mathjax-D2JHb_R_-64780dc5.js → mathjax-BKrHE4xs-3ca05bf6.js} +41 -41
- package/dist/browser/chunks/monospace-D116QD2a-98d484fd.js +1 -1
- package/dist/browser/chunks/monospace-ex-DcXpouKS-456b403c.js +1 -1
- package/dist/browser/chunks/monospace-l-Ct5wkMDs-f34a4a9e.js +1 -1
- package/dist/browser/chunks/mshapes-DCp86WSX-c0055952.js +1 -1
- package/dist/browser/chunks/nl-NL-364d61b9.js +1 -1
- package/dist/browser/chunks/nl-NL-8b7e6d4b.js +1 -1
- package/dist/browser/chunks/phonetics-BwOCw2Y9-d2e3af59.js +1 -1
- package/dist/browser/chunks/phonetics-ss-CRtMn02f-579b6135.js +1 -1
- package/dist/browser/chunks/pie-api-client-687c319a.js +1 -1
- package/dist/browser/chunks/provider-4c704118.js +1 -1
- package/dist/browser/chunks/{runtime-C7H1jS4E-64772f5e.js → runtime-wcU7KOFU-ac86d7b8.js} +401 -278
- package/dist/browser/chunks/sans-serif-BYPZKlE9-2efdbcd9.js +1 -1
- package/dist/browser/chunks/sans-serif-b-B0kRKiC--b5530dce.js +1 -1
- package/dist/browser/chunks/sans-serif-bi-DXWul6mu-5370dba4.js +1 -1
- package/dist/browser/chunks/sans-serif-ex-Boux1kMP-aa178f31.js +1 -1
- package/dist/browser/chunks/sans-serif-i-676RFaSO-2db54474.js +1 -1
- package/dist/browser/chunks/sans-serif-r-DrN9xdZt-0fc72eea.js +1 -1
- package/dist/browser/chunks/script-0ohehnXc-526904f4.js +1 -1
- package/dist/browser/chunks/shapes-BG47NodJ-d59b0eca.js +1 -1
- package/dist/browser/chunks/{sre-engine-wf9s43gg-f09289c5.js → sre-0162a7a9.js} +18 -18
- package/dist/browser/chunks/sre-engine-ace23548.js +1 -0
- package/dist/browser/chunks/sre-engine-jd8cc08x-42d270e5.js +1 -0
- package/dist/browser/chunks/sre-locales-112320af.js +1 -0
- package/dist/browser/chunks/symbols-BqnUxf_t-83087e87.js +1 -1
- package/dist/browser/chunks/symbols-b-i-eg9k5hmF-9c461ac2.js +1 -1
- package/dist/browser/chunks/tool-annotation-toolbar-997438b4.js +7 -6
- package/dist/browser/chunks/tool-answer-eliminator-35483abd.js +4 -4
- package/dist/browser/chunks/tool-color-scheme-b7de5cdf.js +2 -2
- package/dist/browser/chunks/tool-dictionary-cecff3b4.js +1 -1
- package/dist/browser/chunks/tool-graph-cb0338e8.js +4 -4
- package/dist/browser/chunks/tool-host-contract-b93b482c.js +1 -1
- package/dist/browser/chunks/tool-instance-id-2a92deb0.js +1 -0
- package/dist/browser/chunks/tool-line-reader-f8ef3c6a.js +2 -2
- package/dist/browser/chunks/tool-periodic-table-43b133b8.js +1 -1
- package/dist/browser/chunks/tool-picture-dictionary-33721e91.js +1 -1
- package/dist/browser/chunks/tool-protractor-23f77028.js +6 -6
- package/dist/browser/chunks/tool-ruler-1d9a03a6.js +6 -6
- package/dist/browser/chunks/tool-tts-inline-98c2ce7a.js +7 -7
- package/dist/browser/chunks/tts-runtime-config-a7ab1ad4.js +194 -0
- package/dist/browser/chunks/variants-2LRNhOUP-966fc49d.js +1 -1
- package/dist/browser/pie-section-player.js +199 -85
- package/dist/chunks/nl-NL-364d61b9.js +1 -24
- package/dist/chunks/{sre-engine-wf9s43gg-f09289c5.js → sre-engine-jd8cc08x-42d270e5.js} +1 -1
- package/dist/components/shared/composition.d.ts +3 -1
- package/dist/components/shared/framework-error-latch.d.ts +32 -0
- package/dist/components/shared/host-element.d.ts +10 -0
- package/dist/components/shared/kernel-host-default-body.d.ts +14 -0
- package/dist/components/shared/layout-host-methods.d.ts +12 -27
- package/dist/components/shared/missing-tool-providers.d.ts +8 -8
- package/dist/components/shared/section-player-backend-delivery.d.ts +1 -1
- package/dist/components/shared/section-player-card-context.d.ts +5 -1
- package/dist/components/shared/section-player-host-runtime.d.ts +32 -19
- package/dist/components/shared/section-player-layout-context.d.ts +77 -0
- package/dist/components/shared/section-player-own-event.d.ts +10 -0
- package/dist/components/shared/section-player-runtime-callbacks.d.ts +1 -1
- package/dist/components/shared/section-player-shell-layout.svelte.d.ts +3 -11
- package/dist/components/shared/section-player-view-state.d.ts +6 -1
- package/dist/components/shared/toolkit-ready-wait.d.ts +16 -0
- package/dist/contracts/host-hooks.d.ts +0 -7
- package/dist/contracts/runtime-host-contract.d.ts +0 -5
- package/dist/controllers/SectionController.d.ts +1 -0
- package/dist/controllers/types.d.ts +8 -1
- package/dist/item-section/index.d.ts +22 -0
- package/dist/item-section/index.js +37 -0
- package/dist/pie-section-player.d.ts +4 -6
- package/dist/pie-section-player.js +19437 -19877
- package/dist/policies/index.d.ts +1 -19
- package/dist/policies/index.js +6 -14
- package/dist/policies/types.d.ts +0 -4
- package/package.json +13 -53
- package/dist/browser/chunks/custom-element-define-2a92deb0.js +0 -1
- package/dist/browser/chunks/nds-icon-button-d602f784.js +0 -194
- package/dist/browser/chunks/pie-tool-calculator-cortex-0626bc24.js +0 -9
- package/dist/browser/chunks/pie-tool-calculator-geogebra-561236cb.js +0 -9
- package/dist/components/item-shell-element.d.ts +0 -1
- package/dist/components/shared/shell-registration.d.ts +0 -55
- package/dist/contracts/layout-contract.d.ts +0 -17
- package/dist/contracts/layout-contract.js +0 -0
- package/dist/contracts/layout-parity-metadata.d.ts +0 -4
- package/dist/contracts/layout-parity-metadata.js +0 -87
- package/dist/contracts/public-events.d.ts +0 -92
- package/dist/contracts/public-events.js +0 -12
- package/dist/policies/guards.d.ts +0 -2
- /package/dist/browser/chunks/{ItemToolBar-wr2myaah-2ce4b643.js → ItemToolBar-jx38w99s-58defccc.js} +0 -0
- /package/dist/chunks/{ItemToolBar-wr2myaah-1287ba31.js → ItemToolBar-jx38w99s-1287ba31.js} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{g as In,i as kn,n as Ln,r as Rn}from"./tool-host-contract-b93b482c.js";import{t as Mn}from"./versioned-tag-54a76be9.js";import{t as On}from"./ToolCoordinator-cc2dc319.js";if(typeof window<"u"){var hr,ur;((hr=(ur=window).__svelte??(ur.__svelte={})).v??(hr.v=new Set)).add("5")}var Ae={},R=Symbol("uninitialized"),Hn=Array.isArray,xn=Array.prototype.indexOf,Fe=Array.prototype.includes,Bn=Array.from,be=Object.keys,Qt=Object.defineProperty,_t=Object.getOwnPropertyDescriptor,Nn=Object.prototype,Wn=Array.prototype,Gn=Object.getPrototypeOf,fr=Object.isExtensible,Pn=()=>{};function Fn(e){for(var t=0;t<e.length;t++)e[t]()}function Dn(){var e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}function Zt(e){"@babel/helpers - typeof";return Zt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zt(e)}function Kn(e,t){if(Zt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qn(e){var t=Kn(e,"string");return Zt(t)=="symbol"?t:t+""}function l(e,t,r){return(t=qn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var rt=1024,lt=2048,Mt=4096,kr=8192,jn=16384,Lr=32768,dr=1<<25,Rr=65536,ie=1<<19,Xn=1<<20,vr=1<<21,Mr=1<<23,Yt=Symbol("$state"),Or=Symbol("component"),Hr=Symbol("legacy props"),zn=Symbol("attributes"),Vn=Symbol("class"),Yn=Symbol("style"),Un=Symbol("text"),ke=new class extends Error{constructor(...e){super(...e),l(this,"name","StaleReactionError"),l(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};globalThis.document?.contentType;function Jn(){console.warn("https://svelte.dev/e/derived_inert")}function xr(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Qn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var J=!1;function oe(e){J=e}var N;function te(e){if(e===null)throw xr(),Ae;return N=e}function Br(){return te(jt(N))}function Zn(e=1){if(J){for(var t=e,r=N;t--;)r=jt(r);N=r}}function ti(e=!0){for(var t=0,r=N;;){if(r.nodeType===8){var n=r.data;if(n==="]"){if(t===0)return r;t-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var i=jt(r);e&&r.remove(),r=i}}function Nr(e){return e===this.v}function ei(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Wr(e){return!ei(e,this.v)}function ri(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function ni(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function ii(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function si(e){throw new Error("https://svelte.dev/e/effect_orphan")}function ai(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function oi(){throw new Error("https://svelte.dev/e/hydration_failed")}function li(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function ci(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function hi(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ui(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function fi(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var Ze=!1,se=!1,I=null;function Se(e){I=e}function Gr(e,t=!1,r){I={p:I,i:!1,c:null,e:null,s:e,x:null,r:T,l:se&&!t?{s:null,u:null,$:[]}:null}}function Pr(e){var t=I,r=t.e;if(r!==null){t.e=null;for(var n of r)on(n)}return e!==void 0&&(t.x=e),t.i=!0,I=t.p,tr(e)}function tr(e={}){return Qt(e,Or,{value:!0}),e}function Le(){return!se||I!==null&&I.l===null}var Ct=[];function Fr(){var e=Ct;Ct=[],Fn(e)}function Lt(e){if(Ct.length===0&&!Ut){var t=Ct;queueMicrotask(()=>{t===Ct&&Fr()})}Ct.push(e)}function di(){for(;Ct.length>0;)Fr()}var vi=~(lt|Mt|rt);function M(e,t){e.f=e.f&vi|t}function er(e){(e.f&512)!==0||e.deps===null?M(e,rt):M(e,Mt)}function Dr(e,t,r){(e.f&2048)!==0?t.add(e):e.f&4096&&r.add(e),M(e,rt)}function Re(e){var t=w,r=T;ot(null),At(null);try{return e()}finally{ot(t),At(r)}}function ye(e){var t=2|lt;return T!==null&&(T.f|=ie),{ctx:I,deps:null,effects:null,equals:Nr,f:t,fn:e,reactions:null,rv:0,v:R,wv:0,parent:T,ac:null}}var pi=Symbol("obsolete");function pr(e){const t=ye(e);return un(t),t}function mi(e){const t=ye(e);return t.equals=Wr,t}function gi(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)Q(t[r])}}function rr(e){var t,r=T,n=e.parent;if(!dt&&n!==null&&e.v!==R&&(n.f&24576)!==0)return Jn(),e.v;At(n);try{gi(e),t=pn(e)}finally{At(r)}return t}function Kr(e){var t=rr(e);if(!e.equals(t)&&(e.wv=dn(),(!C?.is_fork||e.deps===null)&&(C!==null?(C.capture(e,t,!0),Ke?.capture(e,t,!0)):e.v=t,e.deps===null))){M(e,rt);return}dt||(B!==null?(ir()||C?.is_fork)&&B.set(e,t):er(e))}function Ai(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Re(()=>{t.ac.abort(ke),t.ac=null}),t.fn!==null&&(t.teardown=Pn),re(t,0),ar(t))}function qr(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Kt(t)}function jr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function nr(e,t){jr(e,t),t.add(e)}function S(e,t,r){jr(e,t),t.set(e,r)}function g(e,t,r){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function d(e,t,r){return e.set(g(e,t),r),r}function a(e,t){return e.get(g(e,t))}var Xr,De=null,Bt=null,C=null,Ke=null,B=null,qe=null,Ut=!1,xe=!1,ee=null,we=null,zr=0,bi=1,je=new WeakMap,$t=new WeakMap,Pt=new WeakMap,Ee=new WeakMap,le=new WeakMap,Nt=new WeakMap,yt=new WeakMap,zt=new WeakMap,it=new WeakMap,mr=new WeakMap,Dt=new WeakMap,ft=new WeakMap,pt=new WeakMap,Be=new WeakMap,ce=new WeakMap,k=new WeakSet,qt=class Vr{constructor(){nr(this,k),l(this,"id",bi++),S(this,je,!1),l(this,"linked",!0),S(this,$t,null),S(this,Pt,null),l(this,"async_deriveds",new Map),l(this,"current",new Map),l(this,"previous",new Map),S(this,Ee,new Set),S(this,le,new Set),S(this,Nt,0),S(this,yt,new Map),S(this,zt,null),S(this,it,[]),S(this,mr,[]),S(this,Dt,new Set),S(this,ft,new Set),S(this,pt,new Map),S(this,Be,new Set),l(this,"is_fork",!1),S(this,ce,!1),Bt===null?De=Bt=this:(d(Pt,Bt,this),d($t,this,Bt)),Bt=this}skip_effect(t){a(pt,this).has(t)||a(pt,this).set(t,{d:[],m:[]}),a(Be,this).delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=a(pt,this).get(t);if(n){a(pt,this).delete(t);for(var i of n.d)M(i,lt),r(i);for(i of n.m)M(i,Mt),r(i)}a(Be,this).add(t)}capture(t,r,n=!1){t.v!==R&&!this.previous.has(t)&&this.previous.set(t,t.v),!(t.f&8388608)&&(this.current.set(t,[r,n]),B?.set(t,r)),this.is_fork||(t.v=r)}activate(){C=this}deactivate(){C=null,B=null}flush(){try{xe=!0,C=this,g(k,this,Ce).call(this)}finally{zr=0,qe=null,ee=null,we=null,xe=!1,C=null,B=null,at.clear()}}discard(){for(const t of a(le,this))t(this);a(le,this).clear();for(const t of this.async_deriveds.values())t.reject(pi);g(k,this,Te).call(this),a(zt,this)?.resolve()}register_created_effect(t){a(mr,this).push(t)}increment(t,r){if(d(Nt,this,a(Nt,this)+1),t){let n=a(yt,this).get(r)??0;a(yt,this).set(r,n+1)}}decrement(t,r){if(d(Nt,this,a(Nt,this)-1),t){let n=a(yt,this).get(r)??0;n===1?a(yt,this).delete(r):a(yt,this).set(r,n-1)}a(ce,this)||(d(ce,this,!0),Lt(()=>{d(ce,this,!1),this.linked&&this.flush()}))}transfer_effects(t,r){for(const n of t)a(Dt,this).add(n);for(const n of r)a(ft,this).add(n);t.clear(),r.clear()}oncommit(t){a(Ee,this).add(t)}ondiscard(t){a(le,this).add(t)}settled(){return(a(zt,this)??d(zt,this,Dn())).promise}static ensure(){if(C===null){const t=C=new Vr;!xe&&!Ut&&Lt(()=>{a(je,t)||t.flush()})}return C}apply(){if(!Ze||!this.is_fork&&a($t,this)===null&&a(Pt,this)===null){B=null;return}B=new Map;for(const[r,[n]]of this.current)B.set(r,n);for(let r=De;r!==null;r=a(Pt,r))if(!(r===this||r.is_fork)){var t=!1;if(r.id<this.id){for(const[n,[,i]]of r.current)if(!i&&this.current.has(n)){t=!0;break}}if(!t)for(const[n,i]of r.previous)B.has(n)||B.set(n,i)}}schedule(t){if(qe=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}a(it,this).push(t)}};Xr=qt;function gr(){if(this.is_fork)return!0;for(const r of a(yt,this).keys()){for(var e=r,t=!1;e.parent!==null;){if(a(pt,this).has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}function Si(){var e=[];for(const i of a(it,this))if(!((i.f&16384)!==0||(i.f&6144)===0)){for(var t=i,r=!1;t.parent!==null;){t=t.parent;var n=t.f;if((n&96)!==0){if((n&1024)===0){r=!0;break}t.f^=rt}}r||e.push(t)}return d(it,this,[]),e}function Ce(){d(je,this,!0);for(const o of a(Dt,this))a(ft,this).delete(o),M(o,lt),this.schedule(o);for(const o of a(ft,this))M(o,Mt),this.schedule(o);this.apply();for(var e=ee=[],t=[],r=we=[];a(it,this).length>0;){zr++>1e3&&(g(k,this,Te).call(this),Ci());for(const o of g(k,this,Si).call(this))try{g(k,this,yi).call(this,o,e,t)}catch(c){throw Jr(o),g(k,this,gr).call(this)||this.discard(),c}}if(C=null,r.length>0){var n=Xr.ensure();for(const o of r)n.schedule(o)}if(ee=null,we=null,g(k,this,gr).call(this)){g(k,this,he).call(this,t),g(k,this,he).call(this,e);for(const[o,c]of a(pt,this))Ur(o,c);r.length>0&&g(k,C,Ce).call(C);return}const i=g(k,this,wi).call(this);if(i){g(k,this,he).call(this,t),g(k,this,he).call(this,e),g(k,i,Ei).call(i,this);return}a(Dt,this).clear(),a(ft,this).clear();for(const o of a(Ee,this))o(this);a(Ee,this).clear(),Ke=this,Ar(t),Ar(e),Ke=null,a(zt,this)?.resolve();var s=C;if(a(Nt,this)===0&&(a(it,this).length===0||s!==null)&&g(k,this,Te).call(this),a(it,this).length>0)if(s!==null){for(const o of a(it,this))a(it,s).push(o);d(it,this,[])}else s=this;s!==null&&(at.clear(),g(k,s,Ce).call(s))}function yi(e,t,r){e.f^=rt;for(var n=e.first;n!==null;){var i=n.f,s=(i&96)!==0;if(!(s&&(i&1024)!==0||(i&8192)!==0||a(pt,this).has(n))&&n.fn!==null){s?n.f^=rt:(i&4)!==0?t.push(n):Ze&&(i&16777224)!==0?r.push(n):ae(n)&&(i&16&&a(ft,this).add(n),Kt(n));var o=n.first;if(o!==null){n=o;continue}}for(;n!==null;){var c=n.next;if(c!==null){n=c;break}n=n.parent}}}function wi(){for(var e=a($t,this);e!==null;){if(!e.is_fork){for(const[t,[,r]]of this.current)if(e.current.has(t)&&!r)return e}e=a($t,e)}return null}function Ei(e){for(const[r,n]of e.current)!this.previous.has(r)&&e.previous.has(r)&&this.previous.set(r,e.previous.get(r)),this.current.set(r,n);for(const[r,n]of e.async_deriveds){const i=this.async_deriveds.get(r);i&&n.promise.then(i.resolve).catch(i.reject)}e.async_deriveds.clear(),this.transfer_effects(a(Dt,e),a(ft,e));const t=r=>{var n=r.reactions;if(n!==null&&!((r.f&2)!==0&&(r.f&6144)===0))for(const o of n){var i=o.f;if((i&2)!==0)t(o);else{var s=o;i&4194320&&!this.async_deriveds.has(s)&&(a(ft,this).delete(s),M(s,lt),this.schedule(s))}}};for(const r of this.current.keys())t(r);this.oncommit(()=>e.discard()),g(k,e,Te).call(e),C=this,g(k,this,Ce).call(this)}function he(e){for(var t=0;t<e.length;t+=1)Dr(e[t],a(Dt,this),a(ft,this))}function Te(){if(this.linked){var e=a($t,this),t=a(Pt,this);e===null?De=t:d(Pt,e,t),t===null?Bt=e:d($t,t,e),this.linked=!1}}function ht(e){var t=Ut;Ut=!0;try{var r;for(e&&(C!==null&&!C.is_fork&&C.flush(),r=e());;){if(di(),C===null)return r;C.flush()}}finally{Ut=t}}function Ci(){try{ai()}catch(e){mt(e,qe)}}var ut=null;function Ar(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&ae(n)&&(ut=new Set,Kt(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&cn(n),ut?.size>0)){at.clear();for(const i of ut){if((i.f&24576)!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)ut.has(o)&&(ut.delete(o),s.push(o)),o=o.parent;for(let c=s.length-1;c>=0;c--){const h=s[c];!(h.f&24576)&&Kt(h)}}ut.clear()}}ut=null}}function Yr(e){C.schedule(e)}function Ur(e,t){if(!((e.f&32)!==0&&(e.f&1024)!==0)){(e.f&2048)!==0?t.d.push(e):e.f&4096&&t.m.push(e),M(e,rt);for(var r=e.first;r!==null;)Ur(r,t),r=r.next}}function Jr(e){M(e,rt);for(var t=e.first;t!==null;)Jr(t),t=t.next}var _e=new Set,at=new Map,Qr=!1;function Me(e,t){return{f:0,v:e,reactions:null,equals:Nr,rv:0,wv:0}}function K(e,t){const r=Me(e,t);return un(r),r}function Ti(e,t=!1,r=!0){const n=Me(e);if(t||(n.equals=Wr),se&&r&&I!==null&&I.l!==null){var i;((i=I.l).s??(i.s=[])).push(n)}return n}function x(e,t,r=!1){return w!==null&&(!Y||w.f&131072)&&Le()&&w.f&4325394&&(Z===null||!Z.has(e))&&ui(),Zr(e,r?Ft(t):t,we)}var Et=null,Xe=0;function Zr(e,t,r=null){if(!e.equals(t)){dt?at.set(e,t):at.has(e)||at.set(e,e.v);var n=qt.ensure();if(n.capture(e,t),(e.f&2)!==0){const i=e;e.f&2048&&rr(i),B===null&&er(i)}e.wv=dn(),Et=null,Xe=0,tn(e,lt,r),Et=null,Le()&&T!==null&&T.f&1024&&!(T.f&96)&&(V===null?Gi([e]):V.push(e)),!n.is_fork&&_e.size>0&&!Qr&&_i()}return t}function _i(){Qr=!1;for(const e of _e){e.f&1024&&M(e,Mt);let t;try{t=ae(e)}catch{t=!0}t&&Kt(e)}_e.clear()}function Jt(e){x(e,e.v+1)}function tn(e,t,r){var n=e.reactions;if(n!==null){var i=Le(),s=n.length;if(Xe+=s,Xe>1e5&&Et===null&&(Et=new Set),Et!==null){if(Et.has(e))return;Et.add(e)}for(var o=0;o<s;o++){var c=n[o],h=c.f;if(!(!i&&c===T)){var u=(h<)===0;if(u&&M(c,t),(h&131072)!==0)_e.add(c);else if((h&2)!==0){var f=c;B?.delete(f),tn(f,Mt,r)}else if(u){var v=c;h&16&&ut!==null&&ut.add(v),r!==null?r.push(v):Yr(v)}}}}}function Ft(e){if(typeof e!="object"||e===null||Yt in e||Or in e)return e;const t=Gn(e);if(t!==Nn&&t!==Wn)return e;var r=new Map,n=Hn(e),i=K(0),s=null,o=It,c=h=>{if(It===o)return h();var u=w,f=It;ot(null),yr(o);var v=h();return ot(u),yr(f),v};return n&&r.set("length",K(e.length,s)),new Proxy(e,{defineProperty(h,u,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&ci();var v=r.get(u);return v===void 0?c(()=>{var b=K(f.value,s);return r.set(u,b),b}):x(v,f.value,!0),!0},deleteProperty(h,u){var f=r.get(u);if(f===void 0){if(u in h){const v=c(()=>K(R,s));r.set(u,v),Jt(i)}}else x(f,R),Jt(i);return!0},get(h,u,f){if(u===Yt)return e;var v=r.get(u),b=u in h;if(v===void 0&&(!b||_t(h,u)?.writable)&&(v=c(()=>K(Ft(b?h[u]:R),s)),r.set(u,v)),v!==void 0){var y=A(v);return y===R?void 0:y}return Reflect.get(h,u,f)},getOwnPropertyDescriptor(h,u){this.has?.(h,u);var f=Reflect.getOwnPropertyDescriptor(h,u),v=r.get(u);if(v!==void 0){var b=A(v);if(b===R)return;if(f&&"value"in f)f.value=b;else return{enumerable:!0,configurable:!0,value:b,writable:!0}}return f},has(h,u){if(u===Yt)return!0;var f=r.get(u),v=f!==void 0&&f.v!==R||Reflect.has(h,u);return(f!==void 0||T!==null&&(!v||_t(h,u)?.writable))&&(f===void 0&&(f=c(()=>K(v?Ft(h[u]):R,s)),r.set(u,f)),A(f)===R)?!1:v},set(h,u,f,v){var b=r.get(u),y=u in h;if(n&&u==="length")for(var p=f;p<b.v;p+=1){var E=r.get(p+"");E!==void 0?x(E,R):p in h&&(E=c(()=>K(R,s)),r.set(p+"",E))}if(b===void 0)(!y||_t(h,u)?.writable)&&(b=c(()=>K(void 0,s)),x(b,Ft(f)),r.set(u,b));else{y=b.v!==R;var z=c(()=>Ft(f));x(b,z)}var O=Reflect.getOwnPropertyDescriptor(h,u);if(O?.set&&O.set.call(v,f),!y){if(n&&typeof u=="string"){var P=r.get("length"),F=Number(u);Number.isInteger(F)&&F>=P.v&&x(P,F+1)}Jt(i)}return!0},ownKeys(h){A(i);var u=Reflect.ownKeys(h).filter(b=>{var y=r.get(b);return y===void 0||y.v!==R});for(var[f,v]of r)v.v!==R&&!(f in h)&&u.push(f);return u},setPrototypeOf(){hi()}})}var br,en,rn,nn;function ze(){if(br===void 0){br=window,en=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;rn=_t(t,"firstChild").get,nn=_t(t,"nextSibling").get,fr(e)&&(e[Vn]=void 0,e[zn]=null,e[Yn]=void 0,e.__e=void 0),fr(r)&&(r[Un]=void 0)}}function sn(e=""){return document.createTextNode(e)}function Ve(e){return rn.call(e)}function jt(e){return nn.call(e)}function $i(e){e.textContent=""}function an(e,t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?r?document.createElement(e,{is:r}):document.createElement(e):r?document.createElementNS(t,e,{is:r}):document.createElementNS(t,e)}function Ii(e){var t=T;if(t===null)return w.f|=Mr,e;if((t.f&32768)===0&&(t.f&4)===0)throw e;mt(e,t)}function mt(e,t){if(!(t!==null&&(t.f&16384)!==0)){for(;t!==null;){if((t.f&128)!==0&&(t.f&33570816)===0){if((t.f&32768)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}}function ki(e){T===null&&(w===null&&si(e),ii()),dt&&ni(e)}function Li(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Ot(e,t){var r=T;r!==null&&r.f&8192&&(e|=kr);var n={ctx:I,deps:null,nodes:null,f:e|lt|512,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};C?.register_created_effect(n);var i=n;if((e&4)!==0)ee!==null?ee.push(n):qt.ensure().schedule(n);else if(t!==null){try{Kt(n)}catch(o){throw Q(n),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=Rr))}if(i!==null&&(i.parent=r,r!==null&&Li(i,r),w!==null&&(w.f&2)!==0&&(e&64)===0)){var s=w;(s.effects??(s.effects=[])).push(i)}return n}function ir(){return w!==null&&!Y}function wt(e){ki("$effect");var t=T.f;if(!w&&(t&32)!==0&&I!==null&&!I.i){var r=I;(r.e??(r.e=[])).push(e)}else return on(e)}function on(e){return Ot(4|Xn,e)}function Ri(e){qt.ensure();const t=Ot(64|ie,e);return()=>{Q(t)}}function Mi(e){qt.ensure();const t=Ot(64|ie,e);return(r={})=>new Promise(n=>{r.outro?Oe(t,()=>{Q(t),n(void 0)}):(Q(t),n(void 0))})}function Oi(e){return Ot(4,e)}function sr(e,t=0){return Ot(8|t,e)}function Hi(e,t=0){return Ot(16|t,e)}function Rt(e){return Ot(32|ie,e)}function ln(e){var t=e.teardown;if(t!==null){const r=dt,n=w;Sr(!0),ot(null);try{t.call(null)}catch(i){mt(i,e.parent)}finally{Sr(r),ot(n)}}}function ar(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Re(()=>{i.abort(ke)});var n=r.next;(r.f&64)!==0?r.parent=null:Q(r,t),r=n}}function xi(e){for(var t=e.first;t!==null;){var r=t.next;!(t.f&32)&&Q(t),t=r}}function Q(e,t=!0){var r=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Bi(e.nodes.start,e.nodes.end),r=!0),e.f|=dr,ar(e,t&&!r),re(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();ln(e),e.f^=dr,e.f|=jn;var i=e.parent;i!==null&&i.first!==null&&cn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Bi(e,t){for(;e!==null;){var r=e===t?null:jt(e);e.remove(),e=r}}function cn(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function Oe(e,t,r=!0){var n=[];e.f|=256,hn(e,n,!0);var i=()=>{r&&Q(e),t&&t()},s=n.length;if(s>0){var o=()=>--s||i();for(var c of n)c.out(o)}else i()}function hn(e,t,r){if((e.f&8192)===0){e.f^=kr;var n=e.nodes&&e.nodes.t;if(n!==null)for(const c of n)(c.is_global||r)&&t.push(c);for(var i=e.first;i!==null;){var s=i.next;if((i.f&64)===0){var o=(i.f&65536)!==0||(i.f&32)!==0&&(e.f&16)!==0;hn(i,t,o?r:!1)}i=s}}}function Ni(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:jt(r);t.append(r),r=i}}var Wi=null,pe=!1,dt=!1;function Sr(e){dt=e}var w=null,Y=!1;function ot(e){w=e}var T=null;function At(e){T=e}var Z=null;function un(e){w!==null&&(w.f&2097152||w.f&2)&&(Z??(Z=new Set)).add(e)}var G=null,q=0,V=null;function Gi(e){V=e}var fn=1,Tt=0,It=Tt;function yr(e){It=e}function dn(){return++fn}function ae(e){var t=e.f;if((t&2048)!==0)return!0;if((t&4096)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(ae(s)&&Kr(s),s.wv>e.wv)return!0}t&512&&B===null&&M(e,rt)}return!1}function vn(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!Ze&&Z!==null&&Z.has(e)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&2)!==0?vn(s,t,!1):t===s&&(r?M(s,lt):s.f&1024&&M(s,Mt),Yr(s))}}function pn(e){var t=G,r=q,n=V,i=w,s=Z,o=I,c=Y,h=It,u=e.f;G=null,q=0,V=null,w=(u&96)===0?e:null,Z=null,Se(e.ctx),Y=!1,It=++Tt,e.ac!==null&&(Re(()=>{e.ac.abort(ke)}),e.ac=null);try{e.f|=vr;var f=e.fn,v=f();e.f|=Lr;var b=wr(e);if(Le()&&V!==null&&!Y&&b!==null&&(e.f&6146)===0)for(var y=0;y<V.length;y++)vn(V[y],e);if(i!==null&&i!==e){if(Tt++,i.deps!==null)for(let p=0;p<r;p+=1)i.deps[p].rv=Tt;if(t!==null)for(const p of t)p.rv=Tt;V!==null&&(n===null?n=V:n.push(...V))}return e.f&8388608&&(e.f^=Mr),v}catch(p){return wr(e),Ii(p)}finally{e.f^=vr,G=t,q=r,V=n,w=i,Z=s,Se(o),Y=c,It=h}}function wr(e){var t=e.deps,r=C?.is_fork;if(G!==null){var n;if(r||re(e,q),t!==null&&q>0)for(t.length=q+G.length,n=0;n<G.length;n++)t[q+n]=G[n];else e.deps=t=G;if(ir()&&(e.f&512)!==0)for(n=q;n<t.length;n++){var i;((i=t[n]).reactions??(i.reactions=[])).push(e)}}else!r&&t!==null&&q<t.length&&(re(e,q),t.length=q);return t}function Pi(e,t){let r=t.reactions;if(r!==null){var n=xn.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(t.f&2)!==0&&(G===null||!Fe.call(G,t))){var s=t;s.f&512&&(s.f^=512),s.v!==R&&er(s),s.ac!==null&&Re(()=>{s.ac.abort(ke),s.ac=null,M(s,lt)}),Ai(s),re(s,0)}}function re(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Pi(e,r[n])}function Kt(e){var t=e.f;if((t&16384)===0){M(e,rt);var r=T,n=pe;T=e,pe=(t&96)===0;try{(t&16777232)!==0?xi(e):ar(e),ln(e);var i=pn(e);e.teardown=typeof i=="function"?i:null,e.wv=fn}finally{pe=n,T=r}}}function A(e){var t=(e.f&2)!==0;if(Wi?.add(e),w!==null&&!Y&&!(T!==null&&(T.f&16384)!==0)&&(Z===null||!Z.has(e))){var r=w.deps;if((w.f&2097152)!==0)e.rv<Tt&&(e.rv=Tt,G===null&&r!==null&&r[q]===e?q++:G===null?G=[e]:G.push(e));else{var n;(n=w).deps??(n.deps=[]),Fe.call(w.deps,e)||w.deps.push(e);var i=e.reactions;i===null?e.reactions=[w]:Fe.call(i,w)||i.push(w)}}if(dt&&at.has(e))return at.get(e);if(t){var s=e;if(dt){var o=s.v;return(!(s.f&1024)&&s.reactions!==null||gn(s))&&(o=rr(s)),at.set(s,o),o}var c=(s.f&512)===0&&!Y&&w!==null&&(pe||(w.f&512)!==0),h=(s.f&Lr)===0;ae(s)&&(c&&(s.f|=512),Kr(s)),c&&!h&&(qr(s),mn(s))}if(B?.has(e))return B.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function mn(e){if(e.f|=512,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&2&&!(t.f&512)&&(qr(t),mn(t))}function gn(e){if(e.v===R)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(at.has(t)||(t.f&2)!==0&&gn(t))return!0;return!1}function He(e){var t=Y;try{return Y=!0,e()}finally{Y=t}}var ue=Symbol("events"),Fi=new Set,Er=new Set,Ne=null,We=!1;function Cr(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;Ne=e,We||(We=!0,setTimeout(()=>{We=!1,Ne=null}));var o=0,c=Ne===e&&e[ue];if(c){var h=i.indexOf(c);if(h!==-1&&(t===document||t===window)){e[ue]=t;return}var u=i.indexOf(t);if(u===-1)return;h<=u&&(o=h)}if(s=i[o]||e.target,s!==t){Qt(e,"currentTarget",{configurable:!0,get(){return s||r}});var f=w,v=T;ot(null),At(null);try{for(var b,y=[];s!==null&&s!==t;){try{var p=s[ue]?.[n];p!=null&&(!s.disabled||e.target===s)&&p.call(s,e)}catch(E){b?y.push(E):b=E}if(e.cancelBubble)break;o++,s=o<i.length?i[o]:null}if(b){for(let E of y)queueMicrotask(()=>{throw E});throw b}}finally{e[ue]=t,delete e.currentTarget,ot(f),At(v)}}}var Di=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ki(e){return Di?.createHTML(e)??e}function qi(e){var t=an("template");return t.innerHTML=Ki(e.replaceAll("<!>","<!---->")),t.content}function me(e,t){var r=T;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function ji(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,s=!e.startsWith("<!>");return()=>{if(J)return me(N,null),N;i===void 0&&(i=qi(s?e:"<!>"+e),r||(i=Ve(i)));var o=n||en?document.importNode(i,!0):i.cloneNode(!0);if(r){var c=Ve(o),h=o.lastChild;me(c,h)}else me(o,o);return o}}function An(e,t){if(J){var r=T;(!(r.f&32768)||r.nodes.end===null)&&(r.nodes.end=N),Br();return}e!==null&&e.before(t)}var Xi=["touchstart","touchmove"];function zi(e){return Xi.includes(e)}function Vi(e){let t=0,r=Me(0),n;return()=>{ir()&&(A(r),sr(()=>(t===0&&(n=He(()=>e(()=>Jt(r)))),t+=1,()=>{Lt(()=>{t-=1,t===0&&(n?.(),n=void 0,Jt(r))})})))}}var Yi=Rr|ie;function Ui(e,t,r,n){new Ji(e,t,r,n)}var tt=new WeakMap,Ye=new WeakMap,st=new WeakMap,ne=new WeakMap,j=new WeakMap,et=new WeakMap,X=new WeakMap,U=new WeakMap,gt=new WeakMap,Wt=new WeakMap,kt=new WeakMap,fe=new WeakMap,Ue=new WeakMap,Je=new WeakMap,bt=new WeakMap,Tr=new WeakMap,L=new WeakSet,Ji=class{constructor(e,t,r,n){nr(this,L),l(this,"parent",void 0),l(this,"is_pending",!1),l(this,"transform_error",void 0),S(this,tt,void 0),S(this,Ye,J?N:null),S(this,st,void 0),S(this,ne,void 0),S(this,j,void 0),S(this,et,null),S(this,X,null),S(this,U,null),S(this,gt,null),S(this,Wt,0),S(this,kt,0),S(this,fe,!1),S(this,Ue,new Set),S(this,Je,new Set),S(this,bt,null),S(this,Tr,Vi(()=>(d(bt,this,Me(a(Wt,this))),()=>{d(bt,this,null)}))),d(tt,this,e),d(st,this,t),d(ne,this,i=>{var s=T;s.b=this,s.f|=128,r(i)}),this.parent=T.b,this.transform_error=n??this.parent?.transform_error??(i=>i),d(j,this,Hi(()=>{if(J){const i=a(Ye,this);Br();const s=i.data==="[!";if(i.data.startsWith("[?")){const o=JSON.parse(i.data.slice(2));g(L,this,Zi).call(this,o)}else s?g(L,this,ts).call(this):g(L,this,Qi).call(this)}else g(L,this,Sn).call(this)},Yi)),J&&d(tt,this,N)}defer_effect(e){Dr(e,a(Ue,this),a(Je,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!a(st,this).pending}update_pending_count(e,t){g(L,this,yn).call(this,e,t),d(Wt,this,a(Wt,this)+e),a(bt,this)&&!a(fe,this)&&(d(fe,this,!0),Lt(()=>{d(fe,this,!1),a(bt,this)&&Zr(a(bt,this),a(Wt,this))}))}get_effect_pending(){return a(Tr,this).call(this),A(a(bt,this))}error(e){if(!a(st,this).onerror&&!a(st,this).failed)throw e;C?.is_fork?(a(et,this)&&C.skip_effect(a(et,this)),a(X,this)&&C.skip_effect(a(X,this)),a(U,this)&&C.skip_effect(a(U,this)),C.oncommit(()=>{g(L,this,_r).call(this,e)})):g(L,this,_r).call(this,e)}};function Qi(){try{d(et,this,Rt(()=>a(ne,this).call(this,a(tt,this))))}catch(e){this.error(e)}}function Zi(e){const t=a(st,this).failed,{reset:r,invoke_onerror:n}=g(L,this,bn).call(this,e);Lt(n),t&&d(U,this,Rt(()=>{t(a(tt,this),()=>e,()=>r)}))}function bn(e){var t=!1,r=!1;const n=()=>{if(t){Qn();return}t=!0,r&&fi(),a(U,this)!==null&&Oe(a(U,this),()=>{d(U,this,null)}),g(L,this,or).call(this,()=>{g(L,this,Sn).call(this)})};return{reset:n,invoke_onerror:()=>{try{r=!0,a(st,this).onerror?.(e,n),r=!1}catch(i){mt(i,a(j,this)&&a(j,this).parent)}}}}function ts(){const e=a(st,this).pending;e&&(this.is_pending=!0,d(X,this,Rt(()=>e(a(tt,this)))),Lt(()=>{var t=d(gt,this,document.createDocumentFragment()),r=sn(),n=!1;if(t.append(r),d(et,this,g(L,this,or).call(this,()=>{try{return Rt(()=>a(ne,this).call(this,r))}catch(i){try{this.error(i),n=!0}catch(s){mt(s,a(j,this).parent)}return null}})),a(et,this)===null){d(gt,this,null),n&&g(L,this,$e).call(this,C);return}a(kt,this)===0&&(a(tt,this).before(t),d(gt,this,null),Oe(a(X,this),()=>{d(X,this,null)}),g(L,this,$e).call(this,C))}))}function Sn(){try{if(this.is_pending=this.has_pending_snippet(),d(kt,this,0),d(Wt,this,0),d(et,this,Rt(()=>{a(ne,this).call(this,a(tt,this))})),a(kt,this)>0){var e=d(gt,this,document.createDocumentFragment());Ni(a(et,this),e);const t=a(st,this).pending;d(X,this,Rt(()=>t(a(tt,this))))}else g(L,this,$e).call(this,C)}catch(t){this.error(t)}}function $e(e){this.is_pending=!1,e.transfer_effects(a(Ue,this),a(Je,this))}function or(e){var t=T,r=w,n=I;At(a(j,this)),ot(a(j,this)),Se(a(j,this).ctx);try{return qt.ensure(),e()}finally{At(t),ot(r),Se(n)}}function yn(e,t){if(!this.has_pending_snippet()){if(this.parent){var r;g(L,r=this.parent,yn).call(r,e,t)}return}d(kt,this,a(kt,this)+e),a(kt,this)===0&&(g(L,this,$e).call(this,t),a(X,this)&&Oe(a(X,this),()=>{d(X,this,null)}),a(gt,this)&&(a(tt,this).before(a(gt,this)),d(gt,this,null)))}function _r(e){a(et,this)&&(Q(a(et,this)),d(et,this,null)),a(X,this)&&(Q(a(X,this)),d(X,this,null)),a(U,this)&&(Q(a(U,this)),d(U,this,null)),J&&(te(a(Ye,this)),Zn(),te(ti()));let t=a(st,this).failed;const r=n=>{const{reset:i,invoke_onerror:s}=g(L,this,bn).call(this,n);s(),t&&d(U,this,g(L,this,or).call(this,()=>{try{return Rt(()=>{var o=T;o.b=this,o.f|=128,t(a(tt,this),()=>n,()=>i)})}catch(o){return mt(o,a(j,this).parent),null}}))};Lt(()=>{var n;try{n=this.transform_error(e)}catch(i){mt(i,a(j,this)&&a(j,this).parent);return}n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(r,i=>mt(i,a(j,this)&&a(j,this).parent)):r(n)})}function wn(e,t){return En(e,t)}function es(e,t){ze(),t.intro=t.intro??!1;const r=t.target,n=J,i=N;try{for(var s=Ve(r);s&&(s.nodeType!==8||s.data!=="[");)s=jt(s);if(!s)throw Ae;oe(!0),te(s);const o=En(e,{...t,anchor:s});return oe(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
|
|
2
|
-
`).some(c=>c.startsWith("https://svelte.dev/e/")))throw o;return o!==Ae&&console.warn("Failed to hydrate: ",o),t.recover===!1&&oi(),ze(),$i(r),oe(!1),wn(e,t)}finally{oe(n),te(i)}}var de=new Map;function En(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:o=!0,transformError:c}){ze();var h=void 0,u=Mi(()=>{var f=r??t.appendChild(sn());Ui(f,{pending:()=>{}},y=>{Gr({});var p=I;if(s&&(p.c=s),i&&(n.$$events=i),J&&me(y,null),h=e(y,n)||tr(),J&&(T.nodes.end=N,N===null||N.nodeType!==8||N.data!=="]"))throw xr(),Ae;Pr()},c);var v=new Set,b=y=>{for(var p=0;p<y.length;p++){var E=y[p];if(!v.has(E)){v.add(E);var z=zi(E);for(const F of[t,document]){var O=de.get(F);O===void 0&&(O=new Map,de.set(F,O));var P=O.get(E);P===void 0?(F.addEventListener(E,Cr,{passive:z}),O.set(E,1)):O.set(E,P+1)}}}};return b(Bn(Fi)),Er.add(b),()=>{for(var y of v)for(const z of[t,document]){var p=de.get(z),E=p.get(y);--E==0?(z.removeEventListener(y,Cr),p.delete(y),p.size===0&&de.delete(z)):p.set(y,E)}Er.delete(b),f!==r&&f.parentNode?.removeChild(f)}});return Qe.set(h,u),h}var Qe=new WeakMap;function rs(e,t){const r=Qe.get(e);return r?(Qe.delete(e),r(t)):Promise.resolve()}function ns(e){I===null&&ri("onMount"),se&&I.l!==null?is(I).m.push(e):wt(()=>{const t=He(e);if(typeof t=="function")return t})}function is(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}var Cn,Gt=new WeakMap,Ie=new WeakMap,Ge=new WeakMap,$r=new WeakSet,Tn=class{constructor(e){nr(this,$r),S(this,Gt,new WeakMap),S(this,Ie,void 0),S(this,Ge,void 0),d(Ge,this,e)}observe(e,t){var r=a(Gt,this).get(e)||new Set;return r.add(t),a(Gt,this).set(e,r),g($r,this,ss).call(this).observe(e,a(Ge,this)),()=>{var n=a(Gt,this).get(e);n.delete(t),n.size===0&&(a(Gt,this).delete(e),a(Ie,this).unobserve(e))}}};Cn=Tn;function ss(){return a(Ie,this)??d(Ie,this,new ResizeObserver(e=>{for(var t of e){Cn.entries.set(t.target,t);for(var r of a(Gt,this).get(t.target)||[])r(t)}}))}l(Tn,"entries",new WeakMap);function Pe(e,t){return e===t||e?.[Yt]===t}function as(e=tr(),t,r,n){var i=I.r,s=T;return Oi(()=>{var o,c;return sr(()=>{o=c,c=n?.()||[],He(()=>{Pe(r(...c),e)||(t(e,...c),o&&Pe(r(...o),e)&&t(null,...o))})}),()=>{let h=s;for(;h!==i&&h.parent!==null&&h.parent.f&33554432;)h=h.parent;const u=()=>{c&&Pe(r(...c),e)&&t(null,...c)},f=h.teardown;h.teardown=()=>{u(),f?.()}}}),e}var ve=!1;function os(e){var t=ve;try{return ve=!1,[e(),ve]}finally{ve=t}}function vt(e,t,r,n){var i=!se||(r&2)!==0,s=(r&8)!==0,o=(r&16)!==0,c=n,h=!0,u=void 0,f=()=>o&&i?(u??(u=ye(n)),A(u)):(h&&(h=!1,c=o?He(n):n),c);let v;if(s){var b=Yt in e||Hr in e;v=_t(e,t)?.set??(b&&t in e?H=>e[t]=H:void 0)}var y,p=!1;s?[y,p]=os(()=>e[t]):y=e[t],y===void 0&&n!==void 0&&(y=f(),v&&(i&&li(t),v(y)));var E;if(i?E=()=>{var H=e[t];return H===void 0?f():(h=!0,H)}:E=()=>{var H=e[t];return H!==void 0&&(c=void 0),H===void 0?c:H},i&&(r&4)===0)return E;if(v){var z=e.$$legacy;return(function(H,xt){return arguments.length>0?((!i||!xt||z||p)&&v(xt?E():H),H):E()})}var O=!1,P=((r&1)!==0?ye:mi)(()=>(O=!1,E()));s&&A(P);var F=T;return(function(H,xt){if(arguments.length>0){const Xt=xt?A(P):i&&s?Ft(H):H;return x(P,Xt),O=!0,c!==void 0&&(c=Xt),H}return dt&&O||(F.f&16384)!==0?P.v:A(P)})}function ls(e){return new cs(e)}var St=new WeakMap,nt=new WeakMap,cs=class{constructor(e){S(this,St,void 0),S(this,nt,void 0);var t=new Map,r=(i,s)=>{var o=Ti(s,!1,!1);return t.set(i,o),o};const n=new Proxy({...e.props||{},$$events:{}},{get(i,s){return A(t.get(s)??r(s,Reflect.get(i,s)))},has(i,s){return s===Hr?!0:(A(t.get(s)??r(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,o){return x(t.get(s)??r(s,o),o),Reflect.set(i,s,o)}});d(nt,this,(e.hydrate?es:wn)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError})),(!e?.props?.$$host||e.sync===!1)&&ht(),d(St,this,n.$$events);for(const i of Object.keys(a(nt,this)))i==="$set"||i==="$destroy"||i==="$on"||Qt(this,i,{get(){return a(nt,this)[i]},set(s){a(nt,this)[i]=s},enumerable:!0});a(nt,this).$set=i=>{Object.assign(n,i)},a(nt,this).$destroy=()=>{rs(a(nt,this))}}$set(e){a(nt,this).$set(e)}$on(e,t){a(St,this)[e]=a(St,this)[e]||[];const r=(...n)=>t.call(this,...n);return a(St,this)[e].push(r),()=>{a(St,this)[e]=a(St,this)[e].filter(n=>n!==r)}}$destroy(){a(nt,this).$destroy()}},_n;typeof HTMLElement=="function"&&(_n=class extends HTMLElement{constructor(e,t,r){super(),l(this,"$$ctor",void 0),l(this,"$$s",void 0),l(this,"$$c",void 0),l(this,"$$cn",!1),l(this,"$$d",{}),l(this,"$$r",!1),l(this,"$$p_d",{}),l(this,"$$l",{}),l(this,"$$l_u",new Map),l(this,"$$me",void 0),l(this,"$$shadowRoot",null),this.$$ctor=e,this.$$s=t,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return i=>{const s=an("slot");n!=="default"&&(s.name=n),An(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=hs(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),t.default=!0):t[n]=e(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=ge(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=ls({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Ri(()=>{sr(()=>{this.$$r=!0;for(const n of be(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=ge(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(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=ge(e,r,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return be(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function ge(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function hs(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function us(e,t,r,n,i,s){let o=class extends _n{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return be(t).map(c=>(t[c].attribute||c).toLowerCase())}};return be(t).forEach(c=>{Qt(o.prototype,c,{get(){return this.$$c&&c in this.$$c?this.$$c[c]:this.$$d[c]},set(h){h=ge(c,h,t),this.$$d[c]=h;var u=this.$$c;u&&(_t(u,c)?.get?u[c]=h:u.$set({[c]:h}))}})}),n.forEach(c=>{Qt(o.prototype,c,{get(){return this.$$c?.[c]}})}),s&&(o=s(o)),e.element=o,o}var $n,ct=class D{constructor(){l(this,"elementType","multiple-choice"),l(this,"priority",100)}canHandle(t){return t.tagName.toLowerCase()==="multiple-choice"||t.classList.contains("multiple-choice")}findChoices(t){t.setAttribute(D.ROOT_HOOK_ATTR,"true");const r=Array.from(t.querySelectorAll(D.CHOICE_SELECTOR));for(const n of r)this.annotateChoice(n);return this.annotateFeedbackTicks(t),r}createChoiceRange(t){const r=this.resolveLabelElement(t);if(!r)return null;const n=document.createRange();return n.selectNodeContents(r),n}getChoiceId(t){const r=t.querySelector('input[type="checkbox"], input[type="radio"]');return r?.getAttribute("value")||r?.id||this.generateFallbackId(t)}getChoiceLabel(t){return this.resolveLabelElement(t)?.textContent?.trim()||"Unlabeled choice"}isSelected(t){const r=t.querySelector('input[type="checkbox"], input[type="radio"]');return r?r.checked||r.getAttribute("aria-checked")==="true":!1}canEliminate(t){const r=t.querySelector('input[type="checkbox"], input[type="radio"]');return!(!r||this.isSelected(t)||r.disabled||(t.closest(`[${D.ROOT_HOOK_ATTR}="true"]`)||t.closest("multiple-choice"))?.querySelector(`[${D.FEEDBACK_HOOK_ATTR}="true"]`))}setSelectable(t,r){const n=t.querySelector('input[type="checkbox"], input[type="radio"]');if(!n)return;n.disabled=!r,r?n.removeAttribute("aria-disabled"):n.setAttribute("aria-disabled","true");const i=n.closest(D.MUI_BUTTON_SELECTOR);i&&i.classList.toggle(D.MUI_DISABLED_CLASS,!r)}getButtonContainer(t){return t}generateFallbackId(t){const r=(t.closest(`[${D.ROOT_HOOK_ATTR}="true"]`)||t.closest("multiple-choice"))?.querySelectorAll(`[${D.CHOICE_HOOK_ATTR}="true"]`)||[];return`choice-${Array.from(r).indexOf(t)}`}annotateChoice(t){t.setAttribute(D.CHOICE_HOOK_ATTR,"true");const r=this.resolveLabelElement(t);r&&r.setAttribute(D.LABEL_HOOK_ATTR,"true")}resolveLabelElement(t){return t.querySelector(`[${D.LABEL_HOOK_ATTR}="true"]`)||t.querySelector("label")||t.querySelector("span")}annotateFeedbackTicks(t){for(const r of t.querySelectorAll(".feedback-tick"))r.setAttribute(D.FEEDBACK_HOOK_ATTR,"true")}};$n=ct;l(ct,"CHOICE_HOOK_ATTR","data-pie-answer-eliminator-choice");l(ct,"LABEL_HOOK_ATTR","data-pie-answer-eliminator-label");l(ct,"ROOT_HOOK_ATTR","data-pie-answer-eliminator-root");l(ct,"FEEDBACK_HOOK_ATTR","data-pie-answer-eliminator-feedback-tick");l(ct,"CHOICE_SELECTOR",`[${$n.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);l(ct,"MUI_BUTTON_SELECTOR",".MuiButtonBase-root, .MuiRadio-root, .MuiCheckbox-root");l(ct,"MUI_DISABLED_CLASS","Mui-disabled");var fs="ebsr-multiple-choice",lr=e=>e instanceof HTMLElement&&Mn(e.tagName.toLowerCase()).baseName===fs,Ir=(e,t)=>Array.from(e.querySelectorAll(`[id="${t}"]`)).find(lr)??null,ds=e=>{let t=e.parentElement;for(;t!==null;){if(lr(t))return t;t=t.parentElement}return null},vs=class{constructor(){l(this,"elementType","ebsr"),l(this,"priority",110),l(this,"mcAdapter",new ct)}canHandle(e){return e.tagName.toLowerCase()==="ebsr"||Array.from(e.querySelectorAll("*")).some(lr)}findChoices(e){const t=Ir(e,"a"),r=Ir(e,"b"),n=[];return t&&n.push(...this.mcAdapter.findChoices(t)),r&&n.push(...this.mcAdapter.findChoices(r)),n}createChoiceRange(e){return this.mcAdapter.createChoiceRange(e)}getChoiceId(e){return`${ds(e)?.id||"unknown"}-${this.mcAdapter.getChoiceId(e)}`}getChoiceLabel(e){return this.mcAdapter.getChoiceLabel(e)}isSelected(e){return this.mcAdapter.isSelected(e)}canEliminate(e){return this.mcAdapter.canEliminate(e)}setSelectable(e,t){this.mcAdapter.setSelectable(e,t)}getButtonContainer(e){return this.mcAdapter.getButtonContainer(e)}},ps=class{constructor(){l(this,"elementType","inline-dropdown"),l(this,"priority",90)}canHandle(e){return e.tagName.toLowerCase()==="inline-dropdown"||e.querySelector('[role="combobox"]')!==null}findChoices(e){return Array.from(e.querySelectorAll('[role="option"]'))}createChoiceRange(e){const t=document.createRange();return t.selectNodeContents(e),t}getChoiceId(e){return e.id||e.getAttribute("data-value")||""}getChoiceLabel(e){return e.textContent?.trim()||"Unlabeled option"}canEliminate(e){return e.getAttribute("aria-selected")!=="true"}getButtonContainer(e){return e}},ms=class{constructor(){l(this,"adapters",void 0),this.adapters=[new ct,new vs,new ps].sort((e,t)=>t.priority-e.priority)}findAdapter(e){return this.adapters.find(t=>t.canHandle(e))||null}findAllChoicesWithAdapters(e){const t=[],r=new Set;for(const n of this.adapters){const i=n.findChoices(e);for(const s of i)r.has(s)||(r.add(s),t.push({choice:s,adapter:n}))}return t}registerAdapter(e){this.adapters.push(e),this.adapters.sort((t,r)=>r.priority-t.priority)}},Ht=class W{constructor(){l(this,"name","mask"),l(this,"highlights",new Map),l(this,"ranges",new Map),l(this,"fallbackContainers",new Map)}initialize(){}destroy(){this.clearAll()}apply(t,r){if(!this.isSupported()){this.applyFallback(t,r);return}this.injectHighlightCSS(t);const n=new Highlight(r);CSS.highlights.set(`${W.HIGHLIGHT_NAME_PREFIX}${t}`,n),this.highlights.set(t,n),this.ranges.set(t,r),this.addAriaAttributes(r)}remove(t){if(!this.isSupported()){this.removeFallback(t);return}CSS.highlights.delete(`${W.HIGHLIGHT_NAME_PREFIX}${t}`),this.removeHighlightCSS(t);const r=this.ranges.get(t);r&&this.removeAriaAttributes(r),this.highlights.delete(t),this.ranges.delete(t),this.fallbackContainers.delete(t)}isEliminated(t){return this.highlights.has(t)||this.fallbackContainers.has(t)}clearAll(){for(const t of this.getEliminatedIds())this.remove(t);this.fallbackContainers.clear()}getEliminatedIds(){return Array.from(new Set([...this.highlights.keys(),...this.fallbackContainers.keys()]))}isSupported(){return typeof CSS<"u"&&"highlights"in CSS}injectHighlightCSS(t){const r=`${W.HIGHLIGHT_STYLE_PREFIX}${t}`;if(document.getElementById(r))return;const n=document.createElement("style");n.id=r,n.textContent=`
|
|
1
|
+
import{a as Ln,i as In,m as Rn,r as Mn}from"./tool-host-contract-b93b482c.js";import{t as On}from"./versioned-tag-54a76be9.js";import{t as Hn}from"./ToolCoordinator-cc2dc319.js";if(typeof window<"u"){var cr,fr;((cr=(fr=window).__svelte??(fr.__svelte={})).v??(cr.v=new Set)).add("5")}var ye={},R=Symbol("uninitialized"),xn=Array.isArray,Nn=Array.prototype.indexOf,Fe=Array.prototype.includes,Kn=Array.from,be=Object.keys,Jt=Object.defineProperty,Tt=Object.getOwnPropertyDescriptor,Wn=Object.prototype,Bn=Array.prototype,Gn=Object.getPrototypeOf,dr=Object.isExtensible,Pn=()=>{};function Fn(e){for(var t=0;t<e.length;t++)e[t]()}function Dn(){var e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}function Qt(e){"@babel/helpers - typeof";return Qt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qt(e)}function qn(e,t){if(Qt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jn(e){var t=qn(e,"string");return Qt(t)=="symbol"?t:t+""}function l(e,t,r){return(t=jn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var rt=1024,lt=2048,Mt=4096,Ir=8192,Xn=16384,Rr=32768,vr=1<<25,Mr=65536,ne=1<<19,zn=1<<20,pr=1<<21,Or=1<<23,Vt=Symbol("$state"),Hr=Symbol("component"),xr=Symbol("legacy props"),Vn=Symbol("attributes"),Yn=Symbol("class"),Un=Symbol("style"),Jn=Symbol("text"),Le=new class extends Error{constructor(...e){super(...e),l(this,"name","StaleReactionError"),l(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};globalThis.document?.contentType;function Qn(){console.warn("https://svelte.dev/e/derived_inert")}function Nr(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function Zn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var J=!1;function ae(e){J=e}var K;function Zt(e){if(e===null)throw Nr(),ye;return K=e}function Kr(){return Zt(jt(K))}function ti(e=1){if(J){for(var t=e,r=K;t--;)r=jt(r);K=r}}function ei(e=!0){for(var t=0,r=K;;){if(r.nodeType===8){var n=r.data;if(n==="]"){if(t===0)return r;t-=1}else(n==="["||n==="[!"||n[0]==="["&&!isNaN(Number(n.slice(1))))&&(t+=1)}var i=jt(r);e&&r.remove(),r=i}}function Wr(e){return e===this.v}function ri(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function Br(e){return!ri(e,this.v)}function ni(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function ii(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function si(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ai(e){throw new Error("https://svelte.dev/e/effect_orphan")}function oi(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function li(){throw new Error("https://svelte.dev/e/hydration_failed")}function ui(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function hi(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ci(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fi(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function di(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var tr=!1,ie=!1,k=null;function Ae(e){k=e}function Gr(e,t=!1,r){k={p:k,i:!1,c:null,e:null,s:e,x:null,r:$,l:ie&&!t?{s:null,u:null,$:[]}:null}}function Pr(e){var t=k,r=t.e;if(r!==null){t.e=null;for(var n of r)ln(n)}return e!==void 0&&(t.x=e),t.i=!0,k=t.p,er(e)}function er(e={}){return Jt(e,Hr,{value:!0}),e}function Ie(){return!ie||k!==null&&k.l===null}var Ct=[];function Fr(){var e=Ct;Ct=[],Fn(e)}function It(e){if(Ct.length===0&&!Yt){var t=Ct;queueMicrotask(()=>{t===Ct&&Fr()})}Ct.push(e)}function vi(){for(;Ct.length>0;)Fr()}var pi=~(lt|Mt|rt);function M(e,t){e.f=e.f&pi|t}function rr(e){(e.f&512)!==0||e.deps===null?M(e,rt):M(e,Mt)}function Dr(e,t,r){(e.f&2048)!==0?t.add(e):e.f&4096&&r.add(e),M(e,rt)}function Re(e){var t=w,r=$;ot(null),gt(null);try{return e()}finally{ot(t),gt(r)}}function Se(e){var t=2|lt;return $!==null&&($.f|=ne),{ctx:k,deps:null,effects:null,equals:Wr,f:t,fn:e,reactions:null,rv:0,v:R,wv:0,parent:$,ac:null}}var mi=Symbol("obsolete");function xe(e){const t=Se(e);return fn(t),t}function gi(e){const t=Se(e);return t.equals=Br,t}function yi(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)Q(t[r])}}function nr(e){var t,r=$,n=e.parent;if(!ft&&n!==null&&e.v!==R&&(n.f&24576)!==0)return Qn(),e.v;gt(n);try{yi(e),t=mn(e)}finally{gt(r)}return t}function qr(e){var t=nr(e);if(!e.equals(t)&&(e.wv=vn(),(!C?.is_fork||e.deps===null)&&(C!==null?(C.capture(e,t,!0),qe?.capture(e,t,!0)):e.v=t,e.deps===null))){M(e,rt);return}ft||(N!==null?(sr()||C?.is_fork)&&N.set(e,t):rr(e))}function bi(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Re(()=>{t.ac.abort(Le),t.ac=null}),t.fn!==null&&(t.teardown=Pn),ee(t,0),or(t))}function jr(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&Dt(t)}function Xr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ir(e,t){Xr(e,t),t.add(e)}function A(e,t,r){Xr(e,t),t.set(e,r)}function g(e,t,r){if(typeof e=="function"?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function d(e,t,r){return e.set(g(e,t),r),r}function a(e,t){return e.get(g(e,t))}var zr,De=null,Nt=null,C=null,qe=null,N=null,je=null,Yt=!1,Ne=!1,te=null,we=null,Vr=0,Ai=1,Xe=new WeakMap,_t=new WeakMap,Gt=new WeakMap,Ee=new WeakMap,oe=new WeakMap,Kt=new WeakMap,St=new WeakMap,zt=new WeakMap,it=new WeakMap,mr=new WeakMap,Ft=new WeakMap,ct=new WeakMap,vt=new WeakMap,Ke=new WeakMap,le=new WeakMap,L=new WeakSet,qt=class Yr{constructor(){ir(this,L),l(this,"id",Ai++),A(this,Xe,!1),l(this,"linked",!0),A(this,_t,null),A(this,Gt,null),l(this,"async_deriveds",new Map),l(this,"current",new Map),l(this,"previous",new Map),A(this,Ee,new Set),A(this,oe,new Set),A(this,Kt,0),A(this,St,new Map),A(this,zt,null),A(this,it,[]),A(this,mr,[]),A(this,Ft,new Set),A(this,ct,new Set),A(this,vt,new Map),A(this,Ke,new Set),l(this,"is_fork",!1),A(this,le,!1),Nt===null?De=Nt=this:(d(Gt,Nt,this),d(_t,this,Nt)),Nt=this}skip_effect(t){a(vt,this).has(t)||a(vt,this).set(t,{d:[],m:[]}),a(Ke,this).delete(t)}unskip_effect(t,r=n=>this.schedule(n)){var n=a(vt,this).get(t);if(n){a(vt,this).delete(t);for(var i of n.d)M(i,lt),r(i);for(i of n.m)M(i,Mt),r(i)}a(Ke,this).add(t)}capture(t,r,n=!1){t.v!==R&&!this.previous.has(t)&&this.previous.set(t,t.v),!(t.f&8388608)&&(this.current.set(t,[r,n]),N?.set(t,r)),this.is_fork||(t.v=r)}activate(){C=this}deactivate(){C=null,N=null}flush(){try{Ne=!0,C=this,g(L,this,Ce).call(this)}finally{Vr=0,je=null,te=null,we=null,Ne=!1,C=null,N=null,at.clear()}}discard(){for(const t of a(oe,this))t(this);a(oe,this).clear();for(const t of this.async_deriveds.values())t.reject(mi);g(L,this,$e).call(this),a(zt,this)?.resolve()}register_created_effect(t){a(mr,this).push(t)}increment(t,r){if(d(Kt,this,a(Kt,this)+1),t){let n=a(St,this).get(r)??0;a(St,this).set(r,n+1)}}decrement(t,r){if(d(Kt,this,a(Kt,this)-1),t){let n=a(St,this).get(r)??0;n===1?a(St,this).delete(r):a(St,this).set(r,n-1)}a(le,this)||(d(le,this,!0),It(()=>{d(le,this,!1),this.linked&&this.flush()}))}transfer_effects(t,r){for(const n of t)a(Ft,this).add(n);for(const n of r)a(ct,this).add(n);t.clear(),r.clear()}oncommit(t){a(Ee,this).add(t)}ondiscard(t){a(oe,this).add(t)}settled(){return(a(zt,this)??d(zt,this,Dn())).promise}static ensure(){if(C===null){const t=C=new Yr;!Ne&&!Yt&&It(()=>{a(Xe,t)||t.flush()})}return C}apply(){if(!tr||!this.is_fork&&a(_t,this)===null&&a(Gt,this)===null){N=null;return}N=new Map;for(const[r,[n]]of this.current)N.set(r,n);for(let r=De;r!==null;r=a(Gt,r))if(!(r===this||r.is_fork)){var t=!1;if(r.id<this.id){for(const[n,[,i]]of r.current)if(!i&&this.current.has(n)){t=!0;break}}if(!t)for(const[n,i]of r.previous)N.has(n)||N.set(n,i)}}schedule(t){if(je=t,t.b?.is_pending&&(t.f&16777228)!==0&&(t.f&32768)===0){t.b.defer_effect(t);return}a(it,this).push(t)}};zr=qt;function gr(){if(this.is_fork)return!0;for(const r of a(St,this).keys()){for(var e=r,t=!1;e.parent!==null;){if(a(vt,this).has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}function Si(){var e=[];for(const i of a(it,this))if(!((i.f&16384)!==0||(i.f&6144)===0)){for(var t=i,r=!1;t.parent!==null;){t=t.parent;var n=t.f;if((n&96)!==0){if((n&1024)===0){r=!0;break}t.f^=rt}}r||e.push(t)}return d(it,this,[]),e}function Ce(){d(Xe,this,!0);for(const o of a(Ft,this))a(ct,this).delete(o),M(o,lt),this.schedule(o);for(const o of a(ct,this))M(o,Mt),this.schedule(o);this.apply();for(var e=te=[],t=[],r=we=[];a(it,this).length>0;){Vr++>1e3&&(g(L,this,$e).call(this),$i());for(const o of g(L,this,Si).call(this))try{g(L,this,wi).call(this,o,e,t)}catch(u){throw Qr(o),g(L,this,gr).call(this)||this.discard(),u}}if(C=null,r.length>0){var n=zr.ensure();for(const o of r)n.schedule(o)}if(te=null,we=null,g(L,this,gr).call(this)){g(L,this,ue).call(this,t),g(L,this,ue).call(this,e);for(const[o,u]of a(vt,this))Jr(o,u);r.length>0&&g(L,C,Ce).call(C);return}const i=g(L,this,Ei).call(this);if(i){g(L,this,ue).call(this,t),g(L,this,ue).call(this,e),g(L,i,Ci).call(i,this);return}a(Ft,this).clear(),a(ct,this).clear();for(const o of a(Ee,this))o(this);a(Ee,this).clear(),qe=this,yr(t),yr(e),qe=null,a(zt,this)?.resolve();var s=C;if(a(Kt,this)===0&&(a(it,this).length===0||s!==null)&&g(L,this,$e).call(this),a(it,this).length>0)if(s!==null){for(const o of a(it,this))a(it,s).push(o);d(it,this,[])}else s=this;s!==null&&(at.clear(),g(L,s,Ce).call(s))}function wi(e,t,r){e.f^=rt;for(var n=e.first;n!==null;){var i=n.f,s=(i&96)!==0;if(!(s&&(i&1024)!==0||(i&8192)!==0||a(vt,this).has(n))&&n.fn!==null){s?n.f^=rt:(i&4)!==0?t.push(n):tr&&(i&16777224)!==0?r.push(n):se(n)&&(i&16&&a(ct,this).add(n),Dt(n));var o=n.first;if(o!==null){n=o;continue}}for(;n!==null;){var u=n.next;if(u!==null){n=u;break}n=n.parent}}}function Ei(){for(var e=a(_t,this);e!==null;){if(!e.is_fork){for(const[t,[,r]]of this.current)if(e.current.has(t)&&!r)return e}e=a(_t,e)}return null}function Ci(e){for(const[r,n]of e.current)!this.previous.has(r)&&e.previous.has(r)&&this.previous.set(r,e.previous.get(r)),this.current.set(r,n);for(const[r,n]of e.async_deriveds){const i=this.async_deriveds.get(r);i&&n.promise.then(i.resolve).catch(i.reject)}e.async_deriveds.clear(),this.transfer_effects(a(Ft,e),a(ct,e));const t=r=>{var n=r.reactions;if(n!==null&&!((r.f&2)!==0&&(r.f&6144)===0))for(const o of n){var i=o.f;if((i&2)!==0)t(o);else{var s=o;i&4194320&&!this.async_deriveds.has(s)&&(a(ct,this).delete(s),M(s,lt),this.schedule(s))}}};for(const r of this.current.keys())t(r);this.oncommit(()=>e.discard()),g(L,e,$e).call(e),C=this,g(L,this,Ce).call(this)}function ue(e){for(var t=0;t<e.length;t+=1)Dr(e[t],a(Ft,this),a(ct,this))}function $e(){if(this.linked){var e=a(_t,this),t=a(Gt,this);e===null?De=t:d(Gt,e,t),t===null?Nt=e:d(_t,t,e),this.linked=!1}}function dt(e){var t=Yt;Yt=!0;try{var r;for(e&&(C!==null&&!C.is_fork&&C.flush(),r=e());;){if(vi(),C===null)return r;C.flush()}}finally{Yt=t}}function $i(){try{oi()}catch(e){pt(e,je)}}var ht=null;function yr(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&24576)===0&&se(n)&&(ht=new Set,Dt(n),n.deps===null&&n.first===null&&n.nodes===null&&n.teardown===null&&n.ac===null&&hn(n),ht?.size>0)){at.clear();for(const i of ht){if((i.f&24576)!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)ht.has(o)&&(ht.delete(o),s.push(o)),o=o.parent;for(let u=s.length-1;u>=0;u--){const h=s[u];!(h.f&24576)&&Dt(h)}}ht.clear()}}ht=null}}function Ur(e){C.schedule(e)}function Jr(e,t){if(!((e.f&32)!==0&&(e.f&1024)!==0)){(e.f&2048)!==0?t.d.push(e):e.f&4096&&t.m.push(e),M(e,rt);for(var r=e.first;r!==null;)Jr(r,t),r=r.next}}function Qr(e){M(e,rt);for(var t=e.first;t!==null;)Qr(t),t=t.next}var Te=new Set,at=new Map,Zr=!1;function Me(e,t){return{f:0,v:e,reactions:null,equals:Wr,rv:0,wv:0}}function D(e,t){const r=Me(e,t);return fn(r),r}function Ti(e,t=!1,r=!0){const n=Me(e);if(t||(n.equals=Br),ie&&r&&k!==null&&k.l!==null){var i;((i=k.l).s??(i.s=[])).push(n)}return n}function x(e,t,r=!1){return w!==null&&(!Y||w.f&131072)&&Ie()&&w.f&4325394&&(Z===null||!Z.has(e))&&fi(),tn(e,r?Pt(t):t,we)}var Et=null,ze=0;function tn(e,t,r=null){if(!e.equals(t)){ft?at.set(e,t):at.has(e)||at.set(e,e.v);var n=qt.ensure();if(n.capture(e,t),(e.f&2)!==0){const i=e;e.f&2048&&nr(i),N===null&&rr(i)}e.wv=vn(),Et=null,ze=0,en(e,lt,r),Et=null,Ie()&&$!==null&&$.f&1024&&!($.f&96)&&(V===null?Gi([e]):V.push(e)),!n.is_fork&&Te.size>0&&!Zr&&_i()}return t}function _i(){Zr=!1;for(const e of Te){e.f&1024&&M(e,Mt);let t;try{t=se(e)}catch{t=!0}t&&Dt(e)}Te.clear()}function Ut(e){x(e,e.v+1)}function en(e,t,r){var n=e.reactions;if(n!==null){var i=Ie(),s=n.length;if(ze+=s,ze>1e5&&Et===null&&(Et=new Set),Et!==null){if(Et.has(e))return;Et.add(e)}for(var o=0;o<s;o++){var u=n[o],h=u.f;if(!(!i&&u===$)){var c=(h<)===0;if(c&&M(u,t),(h&131072)!==0)Te.add(u);else if((h&2)!==0){var f=u;N?.delete(f),en(f,Mt,r)}else if(c){var v=u;h&16&&ht!==null&&ht.add(v),r!==null?r.push(v):Ur(v)}}}}}function Pt(e){if(typeof e!="object"||e===null||Vt in e||Hr in e)return e;const t=Gn(e);if(t!==Wn&&t!==Bn)return e;var r=new Map,n=xn(e),i=D(0),s=null,o=kt,u=h=>{if(kt===o)return h();var c=w,f=kt;ot(null),Sr(o);var v=h();return ot(c),Sr(f),v};return n&&r.set("length",D(e.length,s)),new Proxy(e,{defineProperty(h,c,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&hi();var v=r.get(c);return v===void 0?u(()=>{var S=D(f.value,s);return r.set(c,S),S}):x(v,f.value,!0),!0},deleteProperty(h,c){var f=r.get(c);if(f===void 0){if(c in h){const v=u(()=>D(R,s));r.set(c,v),Ut(i)}}else x(f,R),Ut(i);return!0},get(h,c,f){if(c===Vt)return e;var v=r.get(c),S=c in h;if(v===void 0&&(!S||Tt(h,c)?.writable)&&(v=u(()=>D(Pt(S?h[c]:R),s)),r.set(c,v)),v!==void 0){var b=y(v);return b===R?void 0:b}return Reflect.get(h,c,f)},getOwnPropertyDescriptor(h,c){this.has?.(h,c);var f=Reflect.getOwnPropertyDescriptor(h,c),v=r.get(c);if(v!==void 0){var S=y(v);if(S===R)return;if(f&&"value"in f)f.value=S;else return{enumerable:!0,configurable:!0,value:S,writable:!0}}return f},has(h,c){if(c===Vt)return!0;var f=r.get(c),v=f!==void 0&&f.v!==R||Reflect.has(h,c);return(f!==void 0||$!==null&&(!v||Tt(h,c)?.writable))&&(f===void 0&&(f=u(()=>D(v?Pt(h[c]):R,s)),r.set(c,f)),y(f)===R)?!1:v},set(h,c,f,v){var S=r.get(c),b=c in h;if(n&&c==="length")for(var p=f;p<S.v;p+=1){var E=r.get(p+"");E!==void 0?x(E,R):p in h&&(E=u(()=>D(R,s)),r.set(p+"",E))}if(S===void 0)(!b||Tt(h,c)?.writable)&&(S=u(()=>D(void 0,s)),x(S,Pt(f)),r.set(c,S));else{b=S.v!==R;var z=u(()=>Pt(f));x(S,z)}var O=Reflect.getOwnPropertyDescriptor(h,c);if(O?.set&&O.set.call(v,f),!b){if(n&&typeof c=="string"){var G=r.get("length"),P=Number(c);Number.isInteger(P)&&P>=G.v&&x(G,P+1)}Ut(i)}return!0},ownKeys(h){y(i);var c=Reflect.ownKeys(h).filter(S=>{var b=r.get(S);return b===void 0||b.v!==R});for(var[f,v]of r)v.v!==R&&!(f in h)&&c.push(f);return c},setPrototypeOf(){ci()}})}var br,rn,nn,sn;function Ve(){if(br===void 0){br=window,rn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;nn=Tt(t,"firstChild").get,sn=Tt(t,"nextSibling").get,dr(e)&&(e[Yn]=void 0,e[Vn]=null,e[Un]=void 0,e.__e=void 0),dr(r)&&(r[Jn]=void 0)}}function an(e=""){return document.createTextNode(e)}function Ye(e){return nn.call(e)}function jt(e){return sn.call(e)}function ki(e){e.textContent=""}function on(e,t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?r?document.createElement(e,{is:r}):document.createElement(e):r?document.createElementNS(t,e,{is:r}):document.createElementNS(t,e)}function Li(e){var t=$;if(t===null)return w.f|=Or,e;if((t.f&32768)===0&&(t.f&4)===0)throw e;pt(e,t)}function pt(e,t){if(!(t!==null&&(t.f&16384)!==0)){for(;t!==null;){if((t.f&128)!==0&&(t.f&33570816)===0){if((t.f&32768)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}}function Ii(e){$===null&&(w===null&&ai(e),si()),ft&&ii(e)}function Ri(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Ot(e,t){var r=$;r!==null&&r.f&8192&&(e|=Ir);var n={ctx:k,deps:null,nodes:null,f:e|lt|512,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};C?.register_created_effect(n);var i=n;if((e&4)!==0)te!==null?te.push(n):qt.ensure().schedule(n);else if(t!==null){try{Dt(n)}catch(o){throw Q(n),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=Mr))}if(i!==null&&(i.parent=r,r!==null&&Ri(i,r),w!==null&&(w.f&2)!==0&&(e&64)===0)){var s=w;(s.effects??(s.effects=[])).push(i)}return n}function sr(){return w!==null&&!Y}function wt(e){Ii("$effect");var t=$.f;if(!w&&(t&32)!==0&&k!==null&&!k.i){var r=k;(r.e??(r.e=[])).push(e)}else return ln(e)}function ln(e){return Ot(4|zn,e)}function Mi(e){qt.ensure();const t=Ot(64|ne,e);return()=>{Q(t)}}function Oi(e){qt.ensure();const t=Ot(64|ne,e);return(r={})=>new Promise(n=>{r.outro?Oe(t,()=>{Q(t),n(void 0)}):(Q(t),n(void 0))})}function Hi(e){return Ot(4,e)}function ar(e,t=0){return Ot(8|t,e)}function xi(e,t=0){return Ot(16|t,e)}function Rt(e){return Ot(32|ne,e)}function un(e){var t=e.teardown;if(t!==null){const r=ft,n=w;Ar(!0),ot(null);try{t.call(null)}catch(i){pt(i,e.parent)}finally{Ar(r),ot(n)}}}function or(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&Re(()=>{i.abort(Le)});var n=r.next;(r.f&64)!==0?r.parent=null:Q(r,t),r=n}}function Ni(e){for(var t=e.first;t!==null;){var r=t.next;!(t.f&32)&&Q(t),t=r}}function Q(e,t=!0){var r=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Ki(e.nodes.start,e.nodes.end),r=!0),e.f|=vr,or(e,t&&!r),ee(e,0);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();un(e),e.f^=vr,e.f|=Xn;var i=e.parent;i!==null&&i.first!==null&&hn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Ki(e,t){for(;e!==null;){var r=e===t?null:jt(e);e.remove(),e=r}}function hn(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function Oe(e,t,r=!0){var n=[];e.f|=256,cn(e,n,!0);var i=()=>{r&&Q(e),t&&t()},s=n.length;if(s>0){var o=()=>--s||i();for(var u of n)u.out(o)}else i()}function cn(e,t,r){if((e.f&8192)===0){e.f^=Ir;var n=e.nodes&&e.nodes.t;if(n!==null)for(const u of n)(u.is_global||r)&&t.push(u);for(var i=e.first;i!==null;){var s=i.next;if((i.f&64)===0){var o=(i.f&65536)!==0||(i.f&32)!==0&&(e.f&16)!==0;cn(i,t,o?r:!1)}i=s}}}function Wi(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:jt(r);t.append(r),r=i}}var Bi=null,ve=!1,ft=!1;function Ar(e){ft=e}var w=null,Y=!1;function ot(e){w=e}var $=null;function gt(e){$=e}var Z=null;function fn(e){w!==null&&(w.f&2097152||w.f&2)&&(Z??(Z=new Set)).add(e)}var B=null,q=0,V=null;function Gi(e){V=e}var dn=1,$t=0,kt=$t;function Sr(e){kt=e}function vn(){return++dn}function se(e){var t=e.f;if((t&2048)!==0)return!0;if((t&4096)!==0){for(var r=e.deps,n=r.length,i=0;i<n;i++){var s=r[i];if(se(s)&&qr(s),s.wv>e.wv)return!0}t&512&&N===null&&M(e,rt)}return!1}function pn(e,t,r=!0){var n=e.reactions;if(n!==null&&!(!tr&&Z!==null&&Z.has(e)))for(var i=0;i<n.length;i++){var s=n[i];(s.f&2)!==0?pn(s,t,!1):t===s&&(r?M(s,lt):s.f&1024&&M(s,Mt),Ur(s))}}function mn(e){var t=B,r=q,n=V,i=w,s=Z,o=k,u=Y,h=kt,c=e.f;B=null,q=0,V=null,w=(c&96)===0?e:null,Z=null,Ae(e.ctx),Y=!1,kt=++$t,e.ac!==null&&(Re(()=>{e.ac.abort(Le)}),e.ac=null);try{e.f|=pr;var f=e.fn,v=f();e.f|=Rr;var S=wr(e);if(Ie()&&V!==null&&!Y&&S!==null&&(e.f&6146)===0)for(var b=0;b<V.length;b++)pn(V[b],e);if(i!==null&&i!==e){if($t++,i.deps!==null)for(let p=0;p<r;p+=1)i.deps[p].rv=$t;if(t!==null)for(const p of t)p.rv=$t;V!==null&&(n===null?n=V:n.push(...V))}return e.f&8388608&&(e.f^=Or),v}catch(p){return wr(e),Li(p)}finally{e.f^=pr,B=t,q=r,V=n,w=i,Z=s,Ae(o),Y=u,kt=h}}function wr(e){var t=e.deps,r=C?.is_fork;if(B!==null){var n;if(r||ee(e,q),t!==null&&q>0)for(t.length=q+B.length,n=0;n<B.length;n++)t[q+n]=B[n];else e.deps=t=B;if(sr()&&(e.f&512)!==0)for(n=q;n<t.length;n++){var i;((i=t[n]).reactions??(i.reactions=[])).push(e)}}else!r&&t!==null&&q<t.length&&(ee(e,q),t.length=q);return t}function Pi(e,t){let r=t.reactions;if(r!==null){var n=Nn.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}if(r===null&&(t.f&2)!==0&&(B===null||!Fe.call(B,t))){var s=t;s.f&512&&(s.f^=512),s.v!==R&&rr(s),s.ac!==null&&Re(()=>{s.ac.abort(Le),s.ac=null,M(s,lt)}),bi(s),ee(s,0)}}function ee(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Pi(e,r[n])}function Dt(e){var t=e.f;if((t&16384)===0){M(e,rt);var r=$,n=ve;$=e,ve=(t&96)===0;try{(t&16777232)!==0?Ni(e):or(e),un(e);var i=mn(e);e.teardown=typeof i=="function"?i:null,e.wv=dn}finally{ve=n,$=r}}}function y(e){var t=(e.f&2)!==0;if(Bi?.add(e),w!==null&&!Y&&!($!==null&&($.f&16384)!==0)&&(Z===null||!Z.has(e))){var r=w.deps;if((w.f&2097152)!==0)e.rv<$t&&(e.rv=$t,B===null&&r!==null&&r[q]===e?q++:B===null?B=[e]:B.push(e));else{var n;(n=w).deps??(n.deps=[]),Fe.call(w.deps,e)||w.deps.push(e);var i=e.reactions;i===null?e.reactions=[w]:Fe.call(i,w)||i.push(w)}}if(ft&&at.has(e))return at.get(e);if(t){var s=e;if(ft){var o=s.v;return(!(s.f&1024)&&s.reactions!==null||yn(s))&&(o=nr(s)),at.set(s,o),o}var u=(s.f&512)===0&&!Y&&w!==null&&(ve||(w.f&512)!==0),h=(s.f&Rr)===0;se(s)&&(u&&(s.f|=512),qr(s)),u&&!h&&(jr(s),gn(s))}if(N?.has(e))return N.get(e);if((e.f&8388608)!==0)throw e.v;return e.v}function gn(e){if(e.f|=512,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&2&&!(t.f&512)&&(jr(t),gn(t))}function yn(e){if(e.v===R)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(at.has(t)||(t.f&2)!==0&&yn(t))return!0;return!1}function He(e){var t=Y;try{return Y=!0,e()}finally{Y=t}}var he=Symbol("events"),Fi=new Set,Er=new Set,We=null,Be=!1;function Cr(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;We=e,Be||(Be=!0,setTimeout(()=>{Be=!1,We=null}));var o=0,u=We===e&&e[he];if(u){var h=i.indexOf(u);if(h!==-1&&(t===document||t===window)){e[he]=t;return}var c=i.indexOf(t);if(c===-1)return;h<=c&&(o=h)}if(s=i[o]||e.target,s!==t){Jt(e,"currentTarget",{configurable:!0,get(){return s||r}});var f=w,v=$;ot(null),gt(null);try{for(var S,b=[];s!==null&&s!==t;){try{var p=s[he]?.[n];p!=null&&(!s.disabled||e.target===s)&&p.call(s,e)}catch(E){S?b.push(E):S=E}if(e.cancelBubble)break;o++,s=o<i.length?i[o]:null}if(S){for(let E of b)queueMicrotask(()=>{throw E});throw S}}finally{e[he]=t,delete e.currentTarget,ot(f),gt(v)}}}var Di=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function qi(e){return Di?.createHTML(e)??e}function ji(e){var t=on("template");return t.innerHTML=qi(e.replaceAll("<!>","<!---->")),t.content}function pe(e,t){var r=$;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function Xi(e,t){var r=(t&1)!==0,n=(t&2)!==0,i,s=!e.startsWith("<!>");return()=>{if(J)return pe(K,null),K;i===void 0&&(i=ji(s?e:"<!>"+e),r||(i=Ye(i)));var o=n||rn?document.importNode(i,!0):i.cloneNode(!0);if(r){var u=Ye(o),h=o.lastChild;pe(u,h)}else pe(o,o);return o}}function bn(e,t){if(J){var r=$;(!(r.f&32768)||r.nodes.end===null)&&(r.nodes.end=K),Kr();return}e!==null&&e.before(t)}var zi=["touchstart","touchmove"];function Vi(e){return zi.includes(e)}function Yi(e){let t=0,r=Me(0),n;return()=>{sr()&&(y(r),ar(()=>(t===0&&(n=He(()=>e(()=>Ut(r)))),t+=1,()=>{It(()=>{t-=1,t===0&&(n?.(),n=void 0,Ut(r))})})))}}var Ui=Mr|ne;function Ji(e,t,r,n){new Qi(e,t,r,n)}var tt=new WeakMap,Ue=new WeakMap,st=new WeakMap,re=new WeakMap,j=new WeakMap,et=new WeakMap,X=new WeakMap,U=new WeakMap,mt=new WeakMap,Wt=new WeakMap,Lt=new WeakMap,ce=new WeakMap,Je=new WeakMap,Qe=new WeakMap,yt=new WeakMap,$r=new WeakMap,I=new WeakSet,Qi=class{constructor(e,t,r,n){ir(this,I),l(this,"parent",void 0),l(this,"is_pending",!1),l(this,"transform_error",void 0),A(this,tt,void 0),A(this,Ue,J?K:null),A(this,st,void 0),A(this,re,void 0),A(this,j,void 0),A(this,et,null),A(this,X,null),A(this,U,null),A(this,mt,null),A(this,Wt,0),A(this,Lt,0),A(this,ce,!1),A(this,Je,new Set),A(this,Qe,new Set),A(this,yt,null),A(this,$r,Yi(()=>(d(yt,this,Me(a(Wt,this))),()=>{d(yt,this,null)}))),d(tt,this,e),d(st,this,t),d(re,this,i=>{var s=$;s.b=this,s.f|=128,r(i)}),this.parent=$.b,this.transform_error=n??this.parent?.transform_error??(i=>i),d(j,this,xi(()=>{if(J){const i=a(Ue,this);Kr();const s=i.data==="[!";if(i.data.startsWith("[?")){const o=JSON.parse(i.data.slice(2));g(I,this,ts).call(this,o)}else s?g(I,this,es).call(this):g(I,this,Zi).call(this)}else g(I,this,Sn).call(this)},Ui)),J&&d(tt,this,K)}defer_effect(e){Dr(e,a(Je,this),a(Qe,this))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!a(st,this).pending}update_pending_count(e,t){g(I,this,wn).call(this,e,t),d(Wt,this,a(Wt,this)+e),a(yt,this)&&!a(ce,this)&&(d(ce,this,!0),It(()=>{d(ce,this,!1),a(yt,this)&&tn(a(yt,this),a(Wt,this))}))}get_effect_pending(){return a($r,this).call(this),y(a(yt,this))}error(e){if(!a(st,this).onerror&&!a(st,this).failed)throw e;C?.is_fork?(a(et,this)&&C.skip_effect(a(et,this)),a(X,this)&&C.skip_effect(a(X,this)),a(U,this)&&C.skip_effect(a(U,this)),C.oncommit(()=>{g(I,this,Tr).call(this,e)})):g(I,this,Tr).call(this,e)}};function Zi(){try{d(et,this,Rt(()=>a(re,this).call(this,a(tt,this))))}catch(e){this.error(e)}}function ts(e){const t=a(st,this).failed,{reset:r,invoke_onerror:n}=g(I,this,An).call(this,e);It(n),t&&d(U,this,Rt(()=>{t(a(tt,this),()=>e,()=>r)}))}function An(e){var t=!1,r=!1;const n=()=>{if(t){Zn();return}t=!0,r&&di(),a(U,this)!==null&&Oe(a(U,this),()=>{d(U,this,null)}),g(I,this,lr).call(this,()=>{g(I,this,Sn).call(this)})};return{reset:n,invoke_onerror:()=>{try{r=!0,a(st,this).onerror?.(e,n),r=!1}catch(i){pt(i,a(j,this)&&a(j,this).parent)}}}}function es(){const e=a(st,this).pending;e&&(this.is_pending=!0,d(X,this,Rt(()=>e(a(tt,this)))),It(()=>{var t=d(mt,this,document.createDocumentFragment()),r=an(),n=!1;if(t.append(r),d(et,this,g(I,this,lr).call(this,()=>{try{return Rt(()=>a(re,this).call(this,r))}catch(i){try{this.error(i),n=!0}catch(s){pt(s,a(j,this).parent)}return null}})),a(et,this)===null){d(mt,this,null),n&&g(I,this,_e).call(this,C);return}a(Lt,this)===0&&(a(tt,this).before(t),d(mt,this,null),Oe(a(X,this),()=>{d(X,this,null)}),g(I,this,_e).call(this,C))}))}function Sn(){try{if(this.is_pending=this.has_pending_snippet(),d(Lt,this,0),d(Wt,this,0),d(et,this,Rt(()=>{a(re,this).call(this,a(tt,this))})),a(Lt,this)>0){var e=d(mt,this,document.createDocumentFragment());Wi(a(et,this),e);const t=a(st,this).pending;d(X,this,Rt(()=>t(a(tt,this))))}else g(I,this,_e).call(this,C)}catch(t){this.error(t)}}function _e(e){this.is_pending=!1,e.transfer_effects(a(Je,this),a(Qe,this))}function lr(e){var t=$,r=w,n=k;gt(a(j,this)),ot(a(j,this)),Ae(a(j,this).ctx);try{return qt.ensure(),e()}finally{gt(t),ot(r),Ae(n)}}function wn(e,t){if(!this.has_pending_snippet()){if(this.parent){var r;g(I,r=this.parent,wn).call(r,e,t)}return}d(Lt,this,a(Lt,this)+e),a(Lt,this)===0&&(g(I,this,_e).call(this,t),a(X,this)&&Oe(a(X,this),()=>{d(X,this,null)}),a(mt,this)&&(a(tt,this).before(a(mt,this)),d(mt,this,null)))}function Tr(e){a(et,this)&&(Q(a(et,this)),d(et,this,null)),a(X,this)&&(Q(a(X,this)),d(X,this,null)),a(U,this)&&(Q(a(U,this)),d(U,this,null)),J&&(Zt(a(Ue,this)),ti(),Zt(ei()));let t=a(st,this).failed;const r=n=>{const{reset:i,invoke_onerror:s}=g(I,this,An).call(this,n);s(),t&&d(U,this,g(I,this,lr).call(this,()=>{try{return Rt(()=>{var o=$;o.b=this,o.f|=128,t(a(tt,this),()=>n,()=>i)})}catch(o){return pt(o,a(j,this).parent),null}}))};It(()=>{var n;try{n=this.transform_error(e)}catch(i){pt(i,a(j,this)&&a(j,this).parent);return}n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(r,i=>pt(i,a(j,this)&&a(j,this).parent)):r(n)})}function En(e,t){return Cn(e,t)}function rs(e,t){Ve(),t.intro=t.intro??!1;const r=t.target,n=J,i=K;try{for(var s=Ye(r);s&&(s.nodeType!==8||s.data!=="[");)s=jt(s);if(!s)throw ye;ae(!0),Zt(s);const o=Cn(e,{...t,anchor:s});return ae(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
|
|
2
|
+
`).some(u=>u.startsWith("https://svelte.dev/e/")))throw o;return o!==ye&&console.warn("Failed to hydrate: ",o),t.recover===!1&&li(),Ve(),ki(r),ae(!1),En(e,t)}finally{ae(n),Zt(i)}}var fe=new Map;function Cn(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:o=!0,transformError:u}){Ve();var h=void 0,c=Oi(()=>{var f=r??t.appendChild(an());Ji(f,{pending:()=>{}},b=>{Gr({});var p=k;if(s&&(p.c=s),i&&(n.$$events=i),J&&pe(b,null),h=e(b,n)||er(),J&&($.nodes.end=K,K===null||K.nodeType!==8||K.data!=="]"))throw Nr(),ye;Pr()},u);var v=new Set,S=b=>{for(var p=0;p<b.length;p++){var E=b[p];if(!v.has(E)){v.add(E);var z=Vi(E);for(const P of[t,document]){var O=fe.get(P);O===void 0&&(O=new Map,fe.set(P,O));var G=O.get(E);G===void 0?(P.addEventListener(E,Cr,{passive:z}),O.set(E,1)):O.set(E,G+1)}}}};return S(Kn(Fi)),Er.add(S),()=>{for(var b of v)for(const z of[t,document]){var p=fe.get(z),E=p.get(b);--E==0?(z.removeEventListener(b,Cr),p.delete(b),p.size===0&&fe.delete(z)):p.set(b,E)}Er.delete(S),f!==r&&f.parentNode?.removeChild(f)}});return Ze.set(h,c),h}var Ze=new WeakMap;function ns(e,t){const r=Ze.get(e);return r?(Ze.delete(e),r(t)):Promise.resolve()}function is(e){k===null&&ni("onMount"),ie&&k.l!==null?ss(k).m.push(e):wt(()=>{const t=He(e);if(typeof t=="function")return t})}function ss(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}var $n,Bt=new WeakMap,ke=new WeakMap,Ge=new WeakMap,_r=new WeakSet,Tn=class{constructor(e){ir(this,_r),A(this,Bt,new WeakMap),A(this,ke,void 0),A(this,Ge,void 0),d(Ge,this,e)}observe(e,t){var r=a(Bt,this).get(e)||new Set;return r.add(t),a(Bt,this).set(e,r),g(_r,this,as).call(this).observe(e,a(Ge,this)),()=>{var n=a(Bt,this).get(e);n.delete(t),n.size===0&&(a(Bt,this).delete(e),a(ke,this).unobserve(e))}}};$n=Tn;function as(){return a(ke,this)??d(ke,this,new ResizeObserver(e=>{for(var t of e){$n.entries.set(t.target,t);for(var r of a(Bt,this).get(t.target)||[])r(t)}}))}l(Tn,"entries",new WeakMap);function Pe(e,t){return e===t||e?.[Vt]===t}function os(e=er(),t,r,n){var i=k.r,s=$;return Hi(()=>{var o,u;return ar(()=>{o=u,u=n?.()||[],He(()=>{Pe(r(...u),e)||(t(e,...u),o&&Pe(r(...o),e)&&t(null,...o))})}),()=>{let h=s;for(;h!==i&&h.parent!==null&&h.parent.f&33554432;)h=h.parent;const c=()=>{u&&Pe(r(...u),e)&&t(null,...u)},f=h.teardown;h.teardown=()=>{c(),f?.()}}}),e}var de=!1;function ls(e){var t=de;try{return de=!1,[e(),de]}finally{de=t}}function bt(e,t,r,n){var i=!ie||(r&2)!==0,s=(r&8)!==0,o=(r&16)!==0,u=n,h=!0,c=void 0,f=()=>o&&i?(c??(c=Se(n)),y(c)):(h&&(h=!1,u=o?He(n):n),u);let v;if(s){var S=Vt in e||xr in e;v=Tt(e,t)?.set??(S&&t in e?H=>e[t]=H:void 0)}var b,p=!1;s?[b,p]=ls(()=>e[t]):b=e[t],b===void 0&&n!==void 0&&(b=f(),v&&(i&&ui(t),v(b)));var E;if(i?E=()=>{var H=e[t];return H===void 0?f():(h=!0,H)}:E=()=>{var H=e[t];return H!==void 0&&(u=void 0),H===void 0?u:H},i&&(r&4)===0)return E;if(v){var z=e.$$legacy;return(function(H,xt){return arguments.length>0?((!i||!xt||z||p)&&v(xt?E():H),H):E()})}var O=!1,G=((r&1)!==0?Se:gi)(()=>(O=!1,E()));s&&y(G);var P=$;return(function(H,xt){if(arguments.length>0){const Xt=xt?y(G):i&&s?Pt(H):H;return x(G,Xt),O=!0,u!==void 0&&(u=Xt),H}return ft&&O||(P.f&16384)!==0?G.v:y(G)})}function us(e){return new hs(e)}var At=new WeakMap,nt=new WeakMap,hs=class{constructor(e){A(this,At,void 0),A(this,nt,void 0);var t=new Map,r=(i,s)=>{var o=Ti(s,!1,!1);return t.set(i,o),o};const n=new Proxy({...e.props||{},$$events:{}},{get(i,s){return y(t.get(s)??r(s,Reflect.get(i,s)))},has(i,s){return s===xr?!0:(y(t.get(s)??r(s,Reflect.get(i,s))),Reflect.has(i,s))},set(i,s,o){return x(t.get(s)??r(s,o),o),Reflect.set(i,s,o)}});d(nt,this,(e.hydrate?rs:En)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError})),(!e?.props?.$$host||e.sync===!1)&&dt(),d(At,this,n.$$events);for(const i of Object.keys(a(nt,this)))i==="$set"||i==="$destroy"||i==="$on"||Jt(this,i,{get(){return a(nt,this)[i]},set(s){a(nt,this)[i]=s},enumerable:!0});a(nt,this).$set=i=>{Object.assign(n,i)},a(nt,this).$destroy=()=>{ns(a(nt,this))}}$set(e){a(nt,this).$set(e)}$on(e,t){a(At,this)[e]=a(At,this)[e]||[];const r=(...n)=>t.call(this,...n);return a(At,this)[e].push(r),()=>{a(At,this)[e]=a(At,this)[e].filter(n=>n!==r)}}$destroy(){a(nt,this).$destroy()}},_n;typeof HTMLElement=="function"&&(_n=class extends HTMLElement{constructor(e,t,r){super(),l(this,"$$ctor",void 0),l(this,"$$s",void 0),l(this,"$$c",void 0),l(this,"$$cn",!1),l(this,"$$d",{}),l(this,"$$r",!1),l(this,"$$p_d",{}),l(this,"$$l",{}),l(this,"$$l_u",new Map),l(this,"$$me",void 0),l(this,"$$shadowRoot",null),this.$$ctor=e,this.$$s=t,r&&(this.$$shadowRoot=this.attachShadow(r))}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return i=>{const s=on("slot");n!=="default"&&(s.name=n),bn(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=cs(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),t.default=!0):t[n]=e(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=me(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=us({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Mi(()=>{ar(()=>{this.$$r=!0;for(const n of be(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=me(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(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=me(e,r,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return be(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function me(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function cs(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function fs(e,t,r,n,i,s){let o=class extends _n{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return be(t).map(u=>(t[u].attribute||u).toLowerCase())}};return be(t).forEach(u=>{Jt(o.prototype,u,{get(){return this.$$c&&u in this.$$c?this.$$c[u]:this.$$d[u]},set(h){h=me(u,h,t),this.$$d[u]=h;var c=this.$$c;c&&(Tt(c,u)?.get?c[u]=h:c.$set({[u]:h}))}})}),n.forEach(u=>{Jt(o.prototype,u,{get(){return this.$$c?.[u]}})}),s&&(o=s(o)),e.element=o,o}var kn,ut=class F{constructor(){l(this,"elementType","multiple-choice"),l(this,"priority",100)}canHandle(t){return t.tagName.toLowerCase()==="multiple-choice"||t.classList.contains("multiple-choice")}findChoices(t){t.setAttribute(F.ROOT_HOOK_ATTR,"true");const r=Array.from(t.querySelectorAll(F.CHOICE_SELECTOR));for(const n of r)this.annotateChoice(n);return this.annotateFeedbackTicks(t),r}createChoiceRange(t){const r=this.resolveLabelElement(t);if(!r)return null;const n=document.createRange();return n.selectNodeContents(r),n}getChoiceId(t){const r=t.querySelector('input[type="checkbox"], input[type="radio"]');return r?.getAttribute("value")||r?.id||this.generateFallbackId(t)}getChoiceLabel(t){return this.resolveLabelElement(t)?.textContent?.trim()||"Unlabeled choice"}isSelected(t){const r=t.querySelector('input[type="checkbox"], input[type="radio"]');return r?r.checked||r.getAttribute("aria-checked")==="true":!1}canEliminate(t){const r=t.querySelector('input[type="checkbox"], input[type="radio"]');return!(!r||this.isSelected(t)||r.disabled||(t.closest(`[${F.ROOT_HOOK_ATTR}="true"]`)||t.closest("multiple-choice"))?.querySelector(`[${F.FEEDBACK_HOOK_ATTR}="true"]`))}setSelectable(t,r){const n=t.querySelector('input[type="checkbox"], input[type="radio"]');if(!n)return;n.disabled=!r,r?n.removeAttribute("aria-disabled"):n.setAttribute("aria-disabled","true");const i=n.closest(F.MUI_BUTTON_SELECTOR);i&&i.classList.toggle(F.MUI_DISABLED_CLASS,!r)}getButtonContainer(t){return t}generateFallbackId(t){const r=(t.closest(`[${F.ROOT_HOOK_ATTR}="true"]`)||t.closest("multiple-choice"))?.querySelectorAll(`[${F.CHOICE_HOOK_ATTR}="true"]`)||[];return`choice-${Array.from(r).indexOf(t)}`}annotateChoice(t){t.setAttribute(F.CHOICE_HOOK_ATTR,"true");const r=this.resolveLabelElement(t);r&&r.setAttribute(F.LABEL_HOOK_ATTR,"true")}resolveLabelElement(t){return t.querySelector(`[${F.LABEL_HOOK_ATTR}="true"]`)||t.querySelector("label")||t.querySelector("span")}annotateFeedbackTicks(t){for(const r of t.querySelectorAll(".feedback-tick"))r.setAttribute(F.FEEDBACK_HOOK_ATTR,"true")}};kn=ut;l(ut,"CHOICE_HOOK_ATTR","data-pie-answer-eliminator-choice");l(ut,"LABEL_HOOK_ATTR","data-pie-answer-eliminator-label");l(ut,"ROOT_HOOK_ATTR","data-pie-answer-eliminator-root");l(ut,"FEEDBACK_HOOK_ATTR","data-pie-answer-eliminator-feedback-tick");l(ut,"CHOICE_SELECTOR",`[${kn.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);l(ut,"MUI_BUTTON_SELECTOR",".MuiButtonBase-root, .MuiRadio-root, .MuiCheckbox-root");l(ut,"MUI_DISABLED_CLASS","Mui-disabled");var ds="ebsr-multiple-choice",ur=e=>e instanceof HTMLElement&&On(e.tagName.toLowerCase()).baseName===ds,kr=(e,t)=>Array.from(e.querySelectorAll(`[id="${t}"]`)).find(ur)??null,vs=e=>{let t=e.parentElement;for(;t!==null;){if(ur(t))return t;t=t.parentElement}return null},ps=class{constructor(){l(this,"elementType","ebsr"),l(this,"priority",110),l(this,"mcAdapter",new ut)}canHandle(e){return e.tagName.toLowerCase()==="ebsr"||Array.from(e.querySelectorAll("*")).some(ur)}findChoices(e){const t=kr(e,"a"),r=kr(e,"b"),n=[];return t&&n.push(...this.mcAdapter.findChoices(t)),r&&n.push(...this.mcAdapter.findChoices(r)),n}createChoiceRange(e){return this.mcAdapter.createChoiceRange(e)}getChoiceId(e){return`${vs(e)?.id||"unknown"}-${this.mcAdapter.getChoiceId(e)}`}getChoiceLabel(e){return this.mcAdapter.getChoiceLabel(e)}isSelected(e){return this.mcAdapter.isSelected(e)}canEliminate(e){return this.mcAdapter.canEliminate(e)}setSelectable(e,t){this.mcAdapter.setSelectable(e,t)}getButtonContainer(e){return this.mcAdapter.getButtonContainer(e)}},ms=class{constructor(){l(this,"elementType","inline-dropdown"),l(this,"priority",90)}canHandle(e){return e.tagName.toLowerCase()==="inline-dropdown"||e.querySelector('[role="combobox"]')!==null}findChoices(e){return Array.from(e.querySelectorAll('[role="option"]'))}createChoiceRange(e){const t=document.createRange();return t.selectNodeContents(e),t}getChoiceId(e){return e.id||e.getAttribute("data-value")||""}getChoiceLabel(e){return e.textContent?.trim()||"Unlabeled option"}canEliminate(e){return e.getAttribute("aria-selected")!=="true"}getButtonContainer(e){return e}},gs=class{constructor(){l(this,"adapters",void 0),this.adapters=[new ut,new ps,new ms].sort((e,t)=>t.priority-e.priority)}findAdapter(e){return this.adapters.find(t=>t.canHandle(e))||null}findAllChoicesWithAdapters(e){const t=[],r=new Set;for(const n of this.adapters){const i=n.findChoices(e);for(const s of i)r.has(s)||(r.add(s),t.push({choice:s,adapter:n}))}return t}registerAdapter(e){this.adapters.push(e),this.adapters.sort((t,r)=>r.priority-t.priority)}},Ht=class W{constructor(){l(this,"name","mask"),l(this,"highlights",new Map),l(this,"ranges",new Map),l(this,"fallbackContainers",new Map)}initialize(){}destroy(){this.clearAll()}apply(t,r){if(!this.isSupported()){this.applyFallback(t,r);return}this.injectHighlightCSS(t);const n=new Highlight(r);CSS.highlights.set(`${W.HIGHLIGHT_NAME_PREFIX}${t}`,n),this.highlights.set(t,n),this.ranges.set(t,r),this.addAriaAttributes(r)}remove(t){if(!this.isSupported()){this.removeFallback(t);return}CSS.highlights.delete(`${W.HIGHLIGHT_NAME_PREFIX}${t}`),this.removeHighlightCSS(t);const r=this.ranges.get(t);r&&this.removeAriaAttributes(r),this.highlights.delete(t),this.ranges.delete(t),this.fallbackContainers.delete(t)}isEliminated(t){return this.highlights.has(t)||this.fallbackContainers.has(t)}clearAll(){for(const t of this.getEliminatedIds())this.remove(t);this.fallbackContainers.clear()}getEliminatedIds(){return Array.from(new Set([...this.highlights.keys(),...this.fallbackContainers.keys()]))}isSupported(){return typeof CSS<"u"&&"highlights"in CSS}injectHighlightCSS(t){const r=`${W.HIGHLIGHT_STYLE_PREFIX}${t}`;if(document.getElementById(r))return;const n=document.createElement("style");n.id=r,n.textContent=`
|
|
3
3
|
::highlight(pie-answer-masked-${t}) {
|
|
4
4
|
opacity: 0.2;
|
|
5
5
|
filter: blur(2px);
|
|
6
6
|
}
|
|
7
|
-
`,document.head.appendChild(n)}removeHighlightCSS(t){document.getElementById(`${W.HIGHLIGHT_STYLE_PREFIX}${t}`)?.remove()}addAriaAttributes(t){const r=this.findChoiceContainer(t);r&&(r.setAttribute(W.ELIMINATED_ATTR,"true"),r.setAttribute("aria-hidden","true"))}removeAriaAttributes(t){const r=this.findChoiceContainer(t);r&&(r.removeAttribute(W.ELIMINATED_ATTR),r.removeAttribute("aria-hidden"))}findChoiceContainer(t){let r=t.startContainer;for(r.nodeType===Node.TEXT_NODE&&(r=r.parentElement);r&&r!==document.body;){if(r.getAttribute(W.CHOICE_HOOK_ATTR)==="true")return r;r=r.parentElement}return null}applyFallback(t,r){const n=this.findChoiceContainer(r);n&&(n.classList.add(W.FALLBACK_CLASS),n.setAttribute(W.ELIMINATED_ATTR,"true"),n.setAttribute(W.ELIMINATED_ID_ATTR,t),this.fallbackContainers.set(t,n),this.addAriaAttributes(r))}removeFallback(t){const r=this.fallbackContainers.get(t);if(!r)return;r.classList.remove(W.FALLBACK_CLASS),r.removeAttribute(W.ELIMINATED_ATTR),r.removeAttribute(W.ELIMINATED_ID_ATTR);const n=document.createRange();n.selectNodeContents(r),this.removeAriaAttributes(n),this.fallbackContainers.delete(t)}};l(Ht,"HIGHLIGHT_STYLE_PREFIX","pie-answer-eliminator-mask-highlight-");l(Ht,"HIGHLIGHT_NAME_PREFIX","pie-answer-masked-");l(Ht,"FALLBACK_CLASS","pie-answer-masked-fallback");l(Ht,"CHOICE_HOOK_ATTR","data-pie-answer-eliminator-choice");l(Ht,"ELIMINATED_ATTR","data-pie-answer-eliminated");l(Ht,"ELIMINATED_ID_ATTR","data-pie-answer-eliminated-id");var
|
|
7
|
+
`,document.head.appendChild(n)}removeHighlightCSS(t){document.getElementById(`${W.HIGHLIGHT_STYLE_PREFIX}${t}`)?.remove()}addAriaAttributes(t){const r=this.findChoiceContainer(t);r&&(r.setAttribute(W.ELIMINATED_ATTR,"true"),r.setAttribute("aria-hidden","true"))}removeAriaAttributes(t){const r=this.findChoiceContainer(t);r&&(r.removeAttribute(W.ELIMINATED_ATTR),r.removeAttribute("aria-hidden"))}findChoiceContainer(t){let r=t.startContainer;for(r.nodeType===Node.TEXT_NODE&&(r=r.parentElement);r&&r!==document.body;){if(r.getAttribute(W.CHOICE_HOOK_ATTR)==="true")return r;r=r.parentElement}return null}applyFallback(t,r){const n=this.findChoiceContainer(r);n&&(n.classList.add(W.FALLBACK_CLASS),n.setAttribute(W.ELIMINATED_ATTR,"true"),n.setAttribute(W.ELIMINATED_ID_ATTR,t),this.fallbackContainers.set(t,n),this.addAriaAttributes(r))}removeFallback(t){const r=this.fallbackContainers.get(t);if(!r)return;r.classList.remove(W.FALLBACK_CLASS),r.removeAttribute(W.ELIMINATED_ATTR),r.removeAttribute(W.ELIMINATED_ID_ATTR);const n=document.createRange();n.selectNodeContents(r),this.removeAriaAttributes(n),this.fallbackContainers.delete(t)}};l(Ht,"HIGHLIGHT_STYLE_PREFIX","pie-answer-eliminator-mask-highlight-");l(Ht,"HIGHLIGHT_NAME_PREFIX","pie-answer-masked-");l(Ht,"FALLBACK_CLASS","pie-answer-masked-fallback");l(Ht,"CHOICE_HOOK_ATTR","data-pie-answer-eliminator-choice");l(Ht,"ELIMINATED_ATTR","data-pie-answer-eliminated");l(Ht,"ELIMINATED_ID_ATTR","data-pie-answer-eliminated-id");var _=class m{constructor(){l(this,"name","strikethrough"),l(this,"highlights",new Map),l(this,"ranges",new Map),l(this,"fallbackContainers",new Map),l(this,"imageWrappers",new Map),l(this,"mathTargets",new Map)}initialize(){this.isSupported()||console.warn("CSS Custom Highlight API not supported, using fallback")}destroy(){this.clearAll()}apply(t,r){if(this.isSupported()){this.injectHighlightCSS(t);const n=new Highlight(r);CSS.highlights.set(`${m.HIGHLIGHT_NAME_PREFIX}${t}`,n),this.highlights.set(t,n),this.ranges.set(t,r),this.addAriaAttributes(r)}else this.applyFallback(t,r);this.strikeImages(t,r),this.strikeMath(t,r)}remove(t){if(this.unstrikeImages(t),this.unstrikeMath(t),!this.isSupported()){this.removeFallback(t);return}CSS.highlights.delete(`${m.HIGHLIGHT_NAME_PREFIX}${t}`),this.removeHighlightCSS(t);const r=this.ranges.get(t);r&&this.removeAriaAttributes(r),this.highlights.delete(t),this.ranges.delete(t),this.fallbackContainers.delete(t)}isEliminated(t){return this.highlights.has(t)||this.fallbackContainers.has(t)}clearAll(){const t=new Set([...this.highlights.keys(),...this.fallbackContainers.keys(),...this.imageWrappers.keys(),...this.mathTargets.keys()]);for(const r of t)this.remove(r);this.fallbackContainers.clear(),this.imageWrappers.clear(),this.mathTargets.clear()}getEliminatedIds(){return Array.from(new Set([...this.highlights.keys(),...this.fallbackContainers.keys()]))}isSupported(){return typeof CSS<"u"&&"highlights"in CSS}injectHighlightCSS(t){const r=`${m.HIGHLIGHT_STYLE_PREFIX}${t}`;if(document.getElementById(r))return;const n=document.createElement("style");n.id=r,n.textContent=`
|
|
8
8
|
::highlight(pie-answer-eliminated-${t}) {
|
|
9
9
|
text-decoration: line-through;
|
|
10
10
|
text-decoration-thickness: 2px;
|
|
11
11
|
text-decoration-color: var(--pie-answer-eliminator-strike-color, var(--pie-incorrect, #ff9800));
|
|
12
12
|
}
|
|
13
|
-
`,document.head.appendChild(n)}removeHighlightCSS(t){document.getElementById(`${m.HIGHLIGHT_STYLE_PREFIX}${t}`)?.remove()}addAriaAttributes(t){const r=this.findChoiceContainer(t);if(!r)return;r.setAttribute(m.ELIMINATED_ATTR,"true"),r.setAttribute("aria-disabled","true");const n=this.resolveLabelElement(r);if(n&&!n.querySelector(`.${m.SR_CLASS}`)){const i=document.createElement("span");i.className=m.SR_CLASS,i.textContent=" (eliminated)",n.appendChild(i)}}removeAriaAttributes(t){const r=this.findChoiceContainer(t);r&&(r.removeAttribute(m.ELIMINATED_ATTR),r.removeAttribute("aria-disabled"),r.querySelector(`.${m.SR_CLASS}`)?.remove())}findChoiceContainer(t){let r=t.startContainer;for(r.nodeType===Node.TEXT_NODE&&(r=r.parentElement);r&&r!==document.body;){if(r.getAttribute(m.CHOICE_HOOK_ATTR)==="true")return r;r=r.parentElement}return null}applyFallback(t,r){const n=this.findChoiceContainer(r);n&&(n.classList.add(m.FALLBACK_CLASS),n.setAttribute(m.ELIMINATED_ATTR,"true"),n.setAttribute(m.ELIMINATED_ID_ATTR,t),this.fallbackContainers.set(t,n),this.addAriaAttributes(r))}removeFallback(t){const r=this.fallbackContainers.get(t);if(!r)return;r.classList.remove(m.FALLBACK_CLASS),r.removeAttribute(m.ELIMINATED_ATTR),r.removeAttribute(m.ELIMINATED_ID_ATTR);const n=document.createRange();n.selectNodeContents(r),this.removeAriaAttributes(n),this.fallbackContainers.delete(t)}strikeImages(t,r){const n=this.resolveImageScope(r);if(!n)return;const i=[];for(const s of Array.from(n.querySelectorAll("img"))){const o=this.wrapImage(s);o&&i.push(o)}i.length>0&&this.imageWrappers.set(t,i)}unstrikeImages(t){const r=this.imageWrappers.get(t);if(r){for(const n of r)this.unwrapImage(n);this.imageWrappers.delete(t)}}strikeMath(t,r){const n=this.resolveImageScope(r);if(!n)return;const i=[];for(const s of n.querySelectorAll(m.MATH_SELECTOR)){const o=s.querySelector(m.MATH_BOX_SELECTOR)??s,c=!!o.querySelector(m.MATH_STACKED_SELECTOR);o.classList.add(m.MATH_STRIKE_CLASS,c?m.MATH_STRIKE_CROSS_CLASS:m.MATH_STRIKE_LINE_CLASS),o.setAttribute(m.MATH_STRIKE_ATTR,c?"cross":"line"),i.push(o)}i.length>0&&this.mathTargets.set(t,i)}unstrikeMath(t){const r=this.mathTargets.get(t);if(r){for(const n of r)n.classList.remove(m.MATH_STRIKE_CLASS,m.MATH_STRIKE_LINE_CLASS,m.MATH_STRIKE_CROSS_CLASS),n.removeAttribute(m.MATH_STRIKE_ATTR);this.mathTargets.delete(t)}}resolveImageScope(t){const r=t.commonAncestorContainer;return(r.nodeType===Node.TEXT_NODE?r.parentElement:r)??this.findChoiceContainer(t)}wrapImage(t){const r=t.parentElement;if(!r)return null;if(r.classList.contains(m.IMAGE_WRAPPER_CLASS)||r.hasAttribute(m.IMAGE_WRAPPER_ATTR))return r;const n=document.createElement("span");return n.className=m.IMAGE_WRAPPER_CLASS,n.setAttribute(m.IMAGE_WRAPPER_ATTR,"true"),this.fillsParentWidth(t,r)?n.style.display="block":m.BLOCK_DISPLAYS.has(getComputedStyle(t).display)&&(n.style.display="block",n.style.width="fit-content"),r.insertBefore(n,t),n.appendChild(t),n.appendChild(this.createImageStrikeOverlay()),n}fillsParentWidth(t,r){const n=t.getBoundingClientRect().width,i=r.clientWidth;return n===0||i===0?!1:n>=i-1}unwrapImage(t){t.querySelector(`.${m.IMAGE_OVERLAY_CLASS}`)?.remove();const r=t.parentElement;if(r){for(;t.firstChild;)r.insertBefore(t.firstChild,t);t.remove()}}createImageStrikeOverlay(){const t=document.createElementNS(m.SVG_NS,"svg");t.setAttribute("class",m.IMAGE_OVERLAY_CLASS),t.setAttribute("viewBox","0 0 100 100"),t.setAttribute("preserveAspectRatio","none"),t.setAttribute("aria-hidden","true"),t.setAttribute("focusable","false");const r=[{x1:"0",y1:"0",x2:"100",y2:"100"},{x1:"0",y1:"100",x2:"100",y2:"0"}];for(const n of[m.IMAGE_CASING_CLASS,m.IMAGE_LINE_CLASS])for(const{x1:i,y1:s,x2:o,y2:c}of r){const h=document.createElementNS(m.SVG_NS,"line");h.setAttribute("class",n),h.setAttribute("x1",i),h.setAttribute("y1",s),h.setAttribute("x2",o),h.setAttribute("y2",c),h.setAttribute("vector-effect","non-scaling-stroke"),t.appendChild(h)}return t}resolveLabelElement(t){return t.querySelector(`[${m.LABEL_HOOK_ATTR}="true"]`)||t.querySelector("label")}};l($,"HIGHLIGHT_STYLE_PREFIX","pie-answer-eliminator-highlight-");l($,"HIGHLIGHT_NAME_PREFIX","pie-answer-eliminated-");l($,"FALLBACK_CLASS","pie-answer-eliminator-eliminated-fallback");l($,"SR_CLASS","pie-answer-eliminator-sr-announcement");l($,"CHOICE_HOOK_ATTR","data-pie-answer-eliminator-choice");l($,"LABEL_HOOK_ATTR","data-pie-answer-eliminator-label");l($,"ELIMINATED_ATTR","data-pie-answer-eliminated");l($,"ELIMINATED_ID_ATTR","data-pie-answer-eliminated-id");l($,"IMAGE_WRAPPER_CLASS","pie-answer-eliminator-image-strike");l($,"IMAGE_WRAPPER_ATTR","data-pie-answer-eliminator-image-strike");l($,"IMAGE_OVERLAY_CLASS","pie-answer-eliminator-image-strike-overlay");l($,"IMAGE_LINE_CLASS","pie-answer-eliminator-image-strike-line");l($,"IMAGE_CASING_CLASS","pie-answer-eliminator-image-strike-casing");l($,"MATH_STRIKE_CLASS","pie-answer-eliminator-math-strike");l($,"MATH_STRIKE_LINE_CLASS","pie-answer-eliminator-math-strike--line");l($,"MATH_STRIKE_CROSS_CLASS","pie-answer-eliminator-math-strike--cross");l($,"MATH_STRIKE_ATTR","data-pie-answer-eliminator-math-strike");l($,"MATH_STACKED_SELECTOR","mjx-mfrac, mjx-mtable");l($,"MATH_BOX_SELECTOR","mjx-math");l($,"MATH_SELECTOR","mjx-container");l($,"SVG_NS","http://www.w3.org/2000/svg");l($,"BLOCK_DISPLAYS",new Set(["block","flex","grid","table","flow-root","list-item"]));var cr=class Vt{constructor(t="strikethrough",r="right"){l(this,"registry",void 0),l(this,"strategy",void 0),l(this,"eliminatedChoices",new Set),l(this,"choiceElements",new Map),l(this,"choiceButtons",new Map),l(this,"choiceAdapters",new Map),l(this,"buttonAlignment","right"),l(this,"shouldRestoreState",!0),l(this,"active",!0),l(this,"questionRoot",null),l(this,"selectionChangeHandler",null),l(this,"selectionObserver",null),l(this,"selectionRefreshFrame",null),l(this,"storeIntegration",null),this.registry=new ms,this.strategy=this.createStrategy(t),this.strategy.initialize(),this.buttonAlignment=r}createStrategy(t){return t==="mask"?new Ht:new $}initializeForQuestion(t){this.active=!0,this.cleanupButtons();const r=this.registry.findAllChoicesWithAdapters(t);for(const{choice:n,adapter:i}of r)this.initializeChoice(n,i);this.shouldRestoreState&&this.restoreState(),this.attachSelectionListener(t)}initializeChoice(t,r){const n=r.getChoiceId(t);this.choiceElements.set(n,t),this.choiceAdapters.set(n,r);const i=this.createToggleButton(t,r);if(!i)return;this.choiceButtons.set(n,i),this.setButtonHidden(i,this.shouldHideButton(n,t,r));const s=r.getButtonContainer(t);s&&(s.style.position="relative",s.appendChild(i))}createToggleButton(t,r){const n=r.getChoiceId(t),i=r.getChoiceLabel(t),s=document.createElement("button");s.type="button",s.className=Vt.TOGGLE_CLASS,s.setAttribute("aria-label",`Toggle elimination for ${i}`),s.setAttribute("aria-pressed","false"),s.setAttribute("data-choice-id",n);const o=document.createElement("span");return o.setAttribute("aria-hidden","true"),o.textContent="⊗",s.appendChild(o),this.applyButtonAlignment(s),s.dataset.pieShownDisplay=s.style.display,s.addEventListener("click",c=>{c.preventDefault(),c.stopPropagation(),this.toggleElimination(t,r)}),s}toggleElimination(t,r){const n=r.getChoiceId(t);if(this.strategy.isEliminated(n))this.restoreChoice(n);else{if(!r.canEliminate(t)){console.warn("Cannot eliminate this choice (already selected or in evaluate mode)");return}this.eliminateChoice(t,r)}this.saveState()}eliminateChoice(t,r){const n=r.getChoiceId(t),i=r.createChoiceRange(t);if(!i){console.error("Failed to create range for choice");return}this.strategy.apply(n,i),this.eliminatedChoices.add(n),r.setSelectable?.(t,!1);const s=this.choiceButtons.get(n);s&&(s.classList.add(Vt.TOGGLE_ACTIVE_CLASS),s.setAttribute("aria-pressed","true")),this.updateButtonVisibility(n),this.saveState()}restoreChoice(t){this.strategy.remove(t),this.eliminatedChoices.delete(t);const r=this.choiceElements.get(t),n=this.choiceAdapters.get(t);r&&n&&n.setSelectable?.(r,!0);const i=this.choiceButtons.get(t);i&&(i.classList.remove(Vt.TOGGLE_ACTIVE_CLASS),i.setAttribute("aria-pressed","false")),this.updateButtonVisibility(t),this.saveState()}resetAll(){if(this.eliminatedChoices.size!==0){for(const t of Array.from(this.eliminatedChoices))this.restoreChoice(t);this.eliminatedChoices.clear(),this.saveState()}}getEliminatedCount(){return this.eliminatedChoices.size}setStoreIntegration(t,r){this.storeIntegration={store:t,globalElementId:r}}saveState(){if(!this.storeIntegration)return;const t={eliminatedChoices:Array.from(this.eliminatedChoices)};this.storeIntegration.store.setState(this.storeIntegration.globalElementId,"answerEliminator",t)}restoreState(){if(!this.storeIntegration)return;const t=this.storeIntegration.store.getState(this.storeIntegration.globalElementId,"answerEliminator");if(!(!t||!t.eliminatedChoices))try{const r=t.eliminatedChoices;if(!r||r.length===0)return;for(const n of r){const i=this.choiceElements.get(n);if(!i)continue;const s=this.choiceAdapters.get(n);if(!s||s.isSelected?.(i))continue;const o=s.createChoiceRange(i);if(o){this.strategy.apply(n,o),this.eliminatedChoices.add(n),s.setSelectable?.(i,!1);const c=this.choiceButtons.get(n);c&&(c.classList.add(Vt.TOGGLE_ACTIVE_CLASS),c.setAttribute("aria-pressed","true")),this.updateButtonVisibility(n)}}}catch(r){console.error("Failed to restore eliminator state:",r)}}restoreAllSelectable(){for(const t of this.eliminatedChoices){const r=this.choiceElements.get(t),n=this.choiceAdapters.get(t);r&&n&&n.setSelectable?.(r,!0)}}setButtonHidden(t,r){const n=r?"none":t.dataset.pieShownDisplay??"";t.style.display!==n&&(t.style.display=n)}shouldHideButton(t,r,n){return this.eliminatedChoices.has(t)?!1:this.active?n.isSelected?.(r)??!1:!0}updateButtonVisibility(t){const r=this.choiceElements.get(t),n=this.choiceAdapters.get(t),i=this.choiceButtons.get(t);!r||!n||!i||this.setButtonHidden(i,this.shouldHideButton(t,r,n))}refreshSelectionState(){for(const[t,r]of this.choiceElements){const n=this.choiceAdapters.get(t),i=this.choiceButtons.get(t);!n||!i||this.setButtonHidden(i,this.shouldHideButton(t,r,n))}}scheduleSelectionRefresh(){this.selectionRefreshFrame===null&&(this.selectionRefreshFrame=requestAnimationFrame(()=>{this.selectionRefreshFrame=null,this.refreshSelectionState()}))}attachSelectionListener(t){this.detachSelectionListener(),this.questionRoot=t,this.selectionChangeHandler=()=>this.scheduleSelectionRefresh(),t.addEventListener("change",this.selectionChangeHandler),typeof MutationObserver<"u"&&(this.selectionObserver=new MutationObserver(r=>{const n=new Set(this.choiceButtons.values());r.some(i=>!n.has(i.target))&&this.scheduleSelectionRefresh()}),this.selectionObserver.observe(t,{subtree:!0,childList:!0,attributes:!0}))}detachSelectionListener(){this.selectionRefreshFrame!==null&&(cancelAnimationFrame(this.selectionRefreshFrame),this.selectionRefreshFrame=null),this.selectionObserver&&(this.selectionObserver.disconnect(),this.selectionObserver=null),this.questionRoot&&this.selectionChangeHandler&&this.questionRoot.removeEventListener("change",this.selectionChangeHandler),this.questionRoot=null,this.selectionChangeHandler=null}cleanupButtons(){this.detachSelectionListener();for(const t of this.choiceButtons.values())t.remove();this.choiceButtons.clear(),this.choiceElements.clear(),this.choiceAdapters.clear()}applyButtonAlignment(t){switch(this.buttonAlignment){case"right":Object.assign(t.style,{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)"});break;case"left":Object.assign(t.style,{position:"absolute",left:"8px",top:"50%",transform:"translateY(-50%)"});break;case"inline":Object.assign(t.style,{position:"relative",marginLeft:"8px",marginRight:"8px",display:"inline-flex",verticalAlign:"middle"})}}enableStateRestoration(){this.shouldRestoreState=!0}disableStateRestoration(){this.shouldRestoreState=!1}cleanup(){this.active=!1,this.refreshSelectionState()}destroy(){this.restoreAllSelectable(),this.cleanupButtons(),this.strategy.destroy()}};l(cr,"TOGGLE_CLASS","pie-answer-eliminator-toggle");l(cr,"TOGGLE_ACTIVE_CLASS","pie-answer-eliminator-toggle--active");var gs=ji('<div style="display: none;" aria-hidden="true"></div>');function As(e,t){Gr(t,!0);let r=vt(t,"visible",7,!1),n=vt(t,"toolId",7,"answerEliminator"),i=vt(t,"strategy",7,"strikethrough"),s=vt(t,"alwaysOn",7,!1),o=vt(t,"buttonAlignment",7,"right"),c=vt(t,"scopeElement",7,null),h=vt(t,"elementToolStateStore",7,null),u=vt(t,"globalElementId",7,""),f=K(null),v=K(null),b=K(null);const y=pr(()=>A(v)?.toolCoordinator);let p=K(null),E=K(null);const z=kn("Answer Eliminator",On.MODAL);let O=pr(()=>s()||r());wt(()=>{if(A(f))return Ln(A(f),_=>{x(v,_,!0)})}),wt(()=>{if(A(f))return Rn(A(f),_=>{x(b,_,!0)})});function P(){return c()||A(b)?.scopeElement||null}function F(){if(!A(O)||!A(p))return;const _=P();if(!_){console.warn("[AnswerEliminator] Missing shell scope context for question root");return}A(p).initializeForQuestion(_)}function H(){requestAnimationFrame(()=>{requestAnimationFrame(()=>{F()})})}wt(()=>z.sync(A(y),n())),wt(()=>{A(p)&&h()&&u()&&A(p).setStoreIntegration(h(),u())}),ns(()=>(x(p,new cr(i(),o()),!0),A(p)&&h()&&u()&&A(p).setStoreIntegration(h(),u()),A(O)?F():A(p).cleanup(),()=>{A(p)?.destroy(),x(p,null),z.release()})),wt(()=>{const _=A(b)?.contextVersion??null;if(_!==null){if(A(E)===null){x(E,_,!0);return}_!==A(E)&&(x(E,_,!0),H())}}),wt(()=>{A(p)&&(A(O)?(A(p).enableStateRestoration(),F()):A(p).cleanup())});var xt={get visible(){return r()},set visible(_=!1){r(_),ht()},get toolId(){return n()},set toolId(_="answerEliminator"){n(_),ht()},get strategy(){return i()},set strategy(_="strikethrough"){i(_),ht()},get alwaysOn(){return s()},set alwaysOn(_=!1){s(_),ht()},get buttonAlignment(){return o()},set buttonAlignment(_="right"){o(_),ht()},get scopeElement(){return c()},set scopeElement(_=null){c(_),ht()},get elementToolStateStore(){return h()},set elementToolStateStore(_=null){h(_),ht()},get globalElementId(){return u()},set globalElementId(_=""){u(_),ht()}},Xt=gs();return as(Xt,_=>x(f,_),()=>A(f)),An(e,Xt),Pr(xt)}bs("pie-tool-answer-eliminator",us(As,{visible:{attribute:"visible",type:"Boolean"},toolId:{attribute:"tool-id",type:"String"},strategy:{attribute:"strategy",type:"String"},alwaysOn:{attribute:"always-on",type:"Boolean"},buttonAlignment:{attribute:"button-alignment",type:"String"},scopeElement:{type:"Object"},elementToolStateStore:{type:"Object"},globalElementId:{type:"String"}},[],[],{mode:"open"},In));function bs(e,t){customElements.get(e)||customElements.define(e,t)}export{As as default};
|
|
13
|
+
`,document.head.appendChild(n)}removeHighlightCSS(t){document.getElementById(`${m.HIGHLIGHT_STYLE_PREFIX}${t}`)?.remove()}addAriaAttributes(t){const r=this.findChoiceContainer(t);if(!r)return;r.setAttribute(m.ELIMINATED_ATTR,"true"),r.setAttribute("aria-disabled","true");const n=this.resolveLabelElement(r);if(n&&!n.querySelector(`.${m.SR_CLASS}`)){const i=document.createElement("span");i.className=m.SR_CLASS,i.textContent=" (eliminated)",n.appendChild(i)}}removeAriaAttributes(t){const r=this.findChoiceContainer(t);r&&(r.removeAttribute(m.ELIMINATED_ATTR),r.removeAttribute("aria-disabled"),r.querySelector(`.${m.SR_CLASS}`)?.remove())}findChoiceContainer(t){let r=t.startContainer;for(r.nodeType===Node.TEXT_NODE&&(r=r.parentElement);r&&r!==document.body;){if(r.getAttribute(m.CHOICE_HOOK_ATTR)==="true")return r;r=r.parentElement}return null}applyFallback(t,r){const n=this.findChoiceContainer(r);n&&(n.classList.add(m.FALLBACK_CLASS),n.setAttribute(m.ELIMINATED_ATTR,"true"),n.setAttribute(m.ELIMINATED_ID_ATTR,t),this.fallbackContainers.set(t,n),this.addAriaAttributes(r))}removeFallback(t){const r=this.fallbackContainers.get(t);if(!r)return;r.classList.remove(m.FALLBACK_CLASS),r.removeAttribute(m.ELIMINATED_ATTR),r.removeAttribute(m.ELIMINATED_ID_ATTR);const n=document.createRange();n.selectNodeContents(r),this.removeAriaAttributes(n),this.fallbackContainers.delete(t)}strikeImages(t,r){const n=this.resolveImageScope(r);if(!n)return;const i=[];for(const s of Array.from(n.querySelectorAll("img"))){const o=this.wrapImage(s);o&&i.push(o)}i.length>0&&this.imageWrappers.set(t,i)}unstrikeImages(t){const r=this.imageWrappers.get(t);if(r){for(const n of r)this.unwrapImage(n);this.imageWrappers.delete(t)}}strikeMath(t,r){const n=this.resolveImageScope(r);if(!n)return;const i=[];for(const s of n.querySelectorAll(m.MATH_SELECTOR)){const o=s.querySelector(m.MATH_BOX_SELECTOR)??s,u=!!o.querySelector(m.MATH_STACKED_SELECTOR);o.classList.add(m.MATH_STRIKE_CLASS,u?m.MATH_STRIKE_CROSS_CLASS:m.MATH_STRIKE_LINE_CLASS),o.setAttribute(m.MATH_STRIKE_ATTR,u?"cross":"line"),i.push(o)}i.length>0&&this.mathTargets.set(t,i)}unstrikeMath(t){const r=this.mathTargets.get(t);if(r){for(const n of r)n.classList.remove(m.MATH_STRIKE_CLASS,m.MATH_STRIKE_LINE_CLASS,m.MATH_STRIKE_CROSS_CLASS),n.removeAttribute(m.MATH_STRIKE_ATTR);this.mathTargets.delete(t)}}resolveImageScope(t){const r=t.commonAncestorContainer;return(r.nodeType===Node.TEXT_NODE?r.parentElement:r)??this.findChoiceContainer(t)}wrapImage(t){const r=t.parentElement;if(!r)return null;if(r.classList.contains(m.IMAGE_WRAPPER_CLASS)||r.hasAttribute(m.IMAGE_WRAPPER_ATTR))return r;const n=document.createElement("span");return n.className=m.IMAGE_WRAPPER_CLASS,n.setAttribute(m.IMAGE_WRAPPER_ATTR,"true"),this.fillsParentWidth(t,r)?n.style.display="block":m.BLOCK_DISPLAYS.has(getComputedStyle(t).display)&&(n.style.display="block",n.style.width="fit-content"),r.insertBefore(n,t),n.appendChild(t),n.appendChild(this.createImageStrikeOverlay()),n}fillsParentWidth(t,r){const n=t.getBoundingClientRect().width,i=r.clientWidth;return n===0||i===0?!1:n>=i-1}unwrapImage(t){t.querySelector(`.${m.IMAGE_OVERLAY_CLASS}`)?.remove();const r=t.parentElement;if(r){for(;t.firstChild;)r.insertBefore(t.firstChild,t);t.remove()}}createImageStrikeOverlay(){const t=document.createElementNS(m.SVG_NS,"svg");t.setAttribute("class",m.IMAGE_OVERLAY_CLASS),t.setAttribute("viewBox","0 0 100 100"),t.setAttribute("preserveAspectRatio","none"),t.setAttribute("aria-hidden","true"),t.setAttribute("focusable","false");const r=[{x1:"0",y1:"0",x2:"100",y2:"100"},{x1:"0",y1:"100",x2:"100",y2:"0"}];for(const n of[m.IMAGE_CASING_CLASS,m.IMAGE_LINE_CLASS])for(const{x1:i,y1:s,x2:o,y2:u}of r){const h=document.createElementNS(m.SVG_NS,"line");h.setAttribute("class",n),h.setAttribute("x1",i),h.setAttribute("y1",s),h.setAttribute("x2",o),h.setAttribute("y2",u),h.setAttribute("vector-effect","non-scaling-stroke"),t.appendChild(h)}return t}resolveLabelElement(t){return t.querySelector(`[${m.LABEL_HOOK_ATTR}="true"]`)||t.querySelector("label")}};l(_,"HIGHLIGHT_STYLE_PREFIX","pie-answer-eliminator-highlight-");l(_,"HIGHLIGHT_NAME_PREFIX","pie-answer-eliminated-");l(_,"FALLBACK_CLASS","pie-answer-eliminator-eliminated-fallback");l(_,"SR_CLASS","pie-answer-eliminator-sr-announcement");l(_,"CHOICE_HOOK_ATTR","data-pie-answer-eliminator-choice");l(_,"LABEL_HOOK_ATTR","data-pie-answer-eliminator-label");l(_,"ELIMINATED_ATTR","data-pie-answer-eliminated");l(_,"ELIMINATED_ID_ATTR","data-pie-answer-eliminated-id");l(_,"IMAGE_WRAPPER_CLASS","pie-answer-eliminator-image-strike");l(_,"IMAGE_WRAPPER_ATTR","data-pie-answer-eliminator-image-strike");l(_,"IMAGE_OVERLAY_CLASS","pie-answer-eliminator-image-strike-overlay");l(_,"IMAGE_LINE_CLASS","pie-answer-eliminator-image-strike-line");l(_,"IMAGE_CASING_CLASS","pie-answer-eliminator-image-strike-casing");l(_,"MATH_STRIKE_CLASS","pie-answer-eliminator-math-strike");l(_,"MATH_STRIKE_LINE_CLASS","pie-answer-eliminator-math-strike--line");l(_,"MATH_STRIKE_CROSS_CLASS","pie-answer-eliminator-math-strike--cross");l(_,"MATH_STRIKE_ATTR","data-pie-answer-eliminator-math-strike");l(_,"MATH_STACKED_SELECTOR","mjx-mfrac, mjx-mtable");l(_,"MATH_BOX_SELECTOR","mjx-math");l(_,"MATH_SELECTOR","mjx-container");l(_,"SVG_NS","http://www.w3.org/2000/svg");l(_,"BLOCK_DISPLAYS",new Set(["block","flex","grid","table","flow-root","list-item"]));var Lr="answerEliminator",hr=class ge{constructor(t="strikethrough",r="right"){l(this,"registry",void 0),l(this,"strategy",void 0),l(this,"choices",new Map),l(this,"eliminated",new Set),l(this,"strategyKeys",new Map),l(this,"anonymousGroups",new WeakMap),l(this,"nextToken",0),l(this,"buttonAlignment","right"),l(this,"shouldRestoreState",!0),l(this,"active",!0),l(this,"questionRoot",null),l(this,"selectionChangeHandler",null),l(this,"selectionObserver",null),l(this,"selectionRefreshFrame",null),l(this,"store",null),l(this,"elementStateKeys",{}),this.registry=new gs,this.strategy=this.createStrategy(t),this.strategy.initialize(),this.buttonAlignment=r}createStrategy(t){return t==="mask"?new Ht:new _}initializeForQuestion(t){this.active=!0;const r=new Set(this.eliminated);this.restoreAllSelectable(),this.strategy.clearAll(),this.eliminated.clear(),this.cleanupButtons();const n=this.registry.findAllChoicesWithAdapters(t);for(const{choice:s,adapter:o}of n)this.initializeChoice(s,o,t);const i=this.readPersistedEliminations();for(const[s,o]of this.choices)(i.has(o.group)?i.get(o.group)?.has(o.choiceId):r.has(s))&&this.applyElimination(s,o);this.attachSelectionListener(t)}trackingKey(t,r){return`${t}\0${r}`}resolveGroup(t,r){let n=null;for(let o=t.parentElement;o!==null;o=o===r?null:o.parentElement){if(o.id&&Object.hasOwn(this.elementStateKeys,o.id))return o.id;n===null&&o.localName.includes("-")&&(n=o)}const i=n??r;let s=this.anonymousGroups.get(i);return s||(s=`\0anonymous-${this.nextToken++}`,this.anonymousGroups.set(i,s)),s}strategyKeyFor(t){let r=this.strategyKeys.get(t);return r||(r=`choice-${this.nextToken++}`,this.strategyKeys.set(t,r)),r}initializeChoice(t,r,n){const i=r.getChoiceId(t),s=this.resolveGroup(t,n),o=this.trackingKey(s,i),u={choiceId:i,group:s,strategyKey:this.strategyKeyFor(o),element:t,adapter:r,button:null};this.choices.set(o,u);const h=this.createToggleButton(o,u);u.button=h,this.updateButtonVisibility(o);const c=r.getButtonContainer(t);c&&(c.style.position="relative",c.appendChild(h))}createToggleButton(t,r){const n=r.adapter.getChoiceLabel(r.element),i=document.createElement("button");i.type="button",i.className=ge.TOGGLE_CLASS,i.setAttribute("aria-label",`Toggle elimination for ${n}`),i.setAttribute("aria-pressed","false"),i.setAttribute("data-choice-id",r.choiceId);const s=document.createElement("span");return s.setAttribute("aria-hidden","true"),s.textContent="⊗",i.appendChild(s),this.applyButtonAlignment(i),i.dataset.pieShownDisplay=i.style.display,i.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),this.toggleElimination(t)}),i}toggleElimination(t){const r=this.choices.get(t);if(r){if(this.eliminated.has(t))this.restoreChoice(t);else{if(!r.adapter.canEliminate(r.element)){console.warn("Cannot eliminate this choice (already selected or in evaluate mode)");return}if(!this.applyElimination(t,r)){console.error("Failed to create range for choice");return}}this.saveState(r.group)}}applyElimination(t,r){if(r.adapter.isSelected?.(r.element))return!1;const n=r.adapter.createChoiceRange(r.element);return n?(this.strategy.apply(r.strategyKey,n),this.eliminated.add(t),r.adapter.setSelectable?.(r.element,!1),r.button&&(r.button.classList.add(ge.TOGGLE_ACTIVE_CLASS),r.button.setAttribute("aria-pressed","true")),this.updateButtonVisibility(t),!0):!1}restoreChoice(t){const r=this.choices.get(t);this.eliminated.delete(t),r&&(this.strategy.remove(r.strategyKey),r.adapter.setSelectable?.(r.element,!0),r.button&&(r.button.classList.remove(ge.TOGGLE_ACTIVE_CLASS),r.button.setAttribute("aria-pressed","false")),this.updateButtonVisibility(t))}resetAll(){if(this.eliminated.size===0)return;const t=new Set;for(const r of Array.from(this.eliminated)){const n=this.choices.get(r)?.group;n!==void 0&&t.add(n),this.restoreChoice(r)}for(const r of t)this.saveState(r)}getEliminatedCount(){return this.eliminated.size}setStoreIntegration(t,r){this.store=t,this.elementStateKeys=r}saveState(t){if(!this.store||!Object.hasOwn(this.elementStateKeys,t))return;const r=[];for(const n of this.eliminated){const i=this.choices.get(n);i?.group===t&&r.push(i.choiceId)}this.store.setState(this.elementStateKeys[t],Lr,{eliminatedChoices:r})}readPersistedEliminations(){const t=new Map;if(!this.store||!this.shouldRestoreState)return t;for(const{group:r}of this.choices.values())if(!(t.has(r)||!Object.hasOwn(this.elementStateKeys,r)))try{const n=this.store.getState(this.elementStateKeys[r],Lr),i=Array.isArray(n?.eliminatedChoices)?n.eliminatedChoices.filter(s=>typeof s=="string"):[];t.set(r,new Set(i))}catch(n){console.error("Failed to restore eliminator state:",n)}return t}restoreAllSelectable(){for(const t of this.eliminated){const r=this.choices.get(t);r?.adapter.setSelectable?.(r.element,!0)}}setButtonHidden(t,r){const n=r?"none":t.dataset.pieShownDisplay??"";t.style.display!==n&&(t.style.display=n)}shouldHideButton(t,r){return this.eliminated.has(t)?!1:this.active?r.adapter.isSelected?.(r.element)??!1:!0}updateButtonVisibility(t){const r=this.choices.get(t);r?.button&&this.setButtonHidden(r.button,this.shouldHideButton(t,r))}refreshSelectionState(){for(const t of this.choices.keys())this.updateButtonVisibility(t)}scheduleSelectionRefresh(){this.selectionRefreshFrame===null&&(this.selectionRefreshFrame=requestAnimationFrame(()=>{this.selectionRefreshFrame=null,this.refreshSelectionState()}))}attachSelectionListener(t){this.detachSelectionListener(),this.questionRoot=t,this.selectionChangeHandler=()=>this.scheduleSelectionRefresh(),t.addEventListener("change",this.selectionChangeHandler),typeof MutationObserver<"u"&&(this.selectionObserver=new MutationObserver(r=>{const n=new Set;for(const{button:i}of this.choices.values())i&&n.add(i);r.some(i=>!n.has(i.target))&&this.scheduleSelectionRefresh()}),this.selectionObserver.observe(t,{subtree:!0,childList:!0,attributes:!0}))}detachSelectionListener(){this.selectionRefreshFrame!==null&&(cancelAnimationFrame(this.selectionRefreshFrame),this.selectionRefreshFrame=null),this.selectionObserver&&(this.selectionObserver.disconnect(),this.selectionObserver=null),this.questionRoot&&this.selectionChangeHandler&&this.questionRoot.removeEventListener("change",this.selectionChangeHandler),this.questionRoot=null,this.selectionChangeHandler=null}cleanupButtons(){this.detachSelectionListener();for(const{button:t}of this.choices.values())t?.remove();this.choices.clear()}applyButtonAlignment(t){switch(this.buttonAlignment){case"right":Object.assign(t.style,{position:"absolute",right:"8px",top:"50%",transform:"translateY(-50%)"});break;case"left":Object.assign(t.style,{position:"absolute",left:"8px",top:"50%",transform:"translateY(-50%)"});break;case"inline":Object.assign(t.style,{position:"relative",marginLeft:"8px",marginRight:"8px",display:"inline-flex",verticalAlign:"middle"})}}enableStateRestoration(){this.shouldRestoreState=!0}disableStateRestoration(){this.shouldRestoreState=!1}cleanup(){this.active=!1,this.refreshSelectionState()}destroy(){this.restoreAllSelectable(),this.eliminated.clear(),this.cleanupButtons(),this.strategy.destroy()}};l(hr,"TOGGLE_CLASS","pie-answer-eliminator-toggle");l(hr,"TOGGLE_ACTIVE_CLASS","pie-answer-eliminator-toggle--active");var ys=Xi('<div style="display: none;" aria-hidden="true"></div>');function bs(e,t){Gr(t,!0);let r=bt(t,"visible",7,!1),n=bt(t,"toolId",7,"answerEliminator"),i=bt(t,"strategy",7,"strikethrough"),s=bt(t,"alwaysOn",7,!1),o=bt(t,"buttonAlignment",7,"right"),u=bt(t,"scopeElement",7,null),h=bt(t,"elementStateKeys",23,()=>({})),c=D(null),f=D(null),v=D(null);const S=xe(()=>y(f)?.toolCoordinator),b=xe(()=>y(f)?.elementToolStateStore??null);let p=D(null),E=D(null);const z=Ln("Answer Eliminator",Hn.MODAL);let O=xe(()=>s()||r());wt(()=>{if(y(c))return Mn(y(c),T=>{x(f,T,!0)})}),wt(()=>{if(y(c))return In(y(c),T=>{x(v,T,!0)})});function G(){return u()||y(v)?.scopeElement||null}function P(){if(!y(O)||!y(p))return;const T=G();if(!T){console.warn("[AnswerEliminator] Missing shell scope context for question root");return}y(p).initializeForQuestion(T)}function H(){requestAnimationFrame(()=>{requestAnimationFrame(()=>{P()})})}wt(()=>z.sync(y(S),n())),wt(()=>{y(p)?.setStoreIntegration(y(b),h()??{})}),is(()=>(x(p,new hr(i(),o()),!0),y(p).setStoreIntegration(y(b),h()??{}),y(O)?P():y(p).cleanup(),()=>{y(p)?.destroy(),x(p,null),z.release()})),wt(()=>{const T=y(v)?.contextVersion??null;if(T!==null){if(y(E)===null){x(E,T,!0);return}T!==y(E)&&(x(E,T,!0),H())}}),wt(()=>{y(p)&&(y(O)?(y(p).enableStateRestoration(),P()):y(p).cleanup())});var xt={get visible(){return r()},set visible(T=!1){r(T),dt()},get toolId(){return n()},set toolId(T="answerEliminator"){n(T),dt()},get strategy(){return i()},set strategy(T="strikethrough"){i(T),dt()},get alwaysOn(){return s()},set alwaysOn(T=!1){s(T),dt()},get buttonAlignment(){return o()},set buttonAlignment(T="right"){o(T),dt()},get scopeElement(){return u()},set scopeElement(T=null){u(T),dt()},get elementStateKeys(){return h()},set elementStateKeys(T={}){h(T),dt()}},Xt=ys();return os(Xt,T=>x(c,T),()=>y(c)),bn(e,Xt),Pr(xt)}As("pie-tool-answer-eliminator",fs(bs,{visible:{attribute:"visible",type:"Boolean"},toolId:{attribute:"tool-id",type:"String"},strategy:{attribute:"strategy",type:"String"},alwaysOn:{attribute:"always-on",type:"Boolean"},buttonAlignment:{attribute:"button-alignment",type:"String"},scopeElement:{type:"Object"},elementStateKeys:{type:"Object"}},[],[],{mode:"open"},Rn));function As(e,t){customElements.get(e)||customElements.define(e,t)}export{bs as default};
|