@pie-element/simple-cloze 0.1.4-next.7 → 0.1.4-next.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/author/index.d.ts +8 -6
- package/dist/author/index.js +70 -90
- package/dist/author/index.js.map +1 -1
- package/dist/browser/author/index.js +2768 -2737
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/delivery/index.js +154 -98
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/{i18n-DJMxdTMU.js → i18n-BaF24Jzw.js} +3 -5
- package/dist/browser/i18n-BaF24Jzw.js.map +1 -0
- package/dist/browser/print/index.js +1 -1
- package/dist/delivery/index.d.ts +2 -25
- package/dist/delivery/index.js +120 -175
- package/dist/delivery/index.js.map +1 -1
- package/dist/index.iife.js +3 -3
- package/dist/index.js +2 -7471
- package/dist/print/index.js +2 -4
- package/dist/print/index.js.map +1 -1
- package/dist/runtime-support.js +5 -5
- package/dist/runtime-support.js.map +1 -1
- package/module/print.js +2 -4
- package/module/print.js.map +1 -1
- package/package.json +2 -4
- package/dist/browser/dist-CYpSKy-4.js +0 -80
- package/dist/browser/dist-CYpSKy-4.js.map +0 -1
- package/dist/browser/i18n-DJMxdTMU.js.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/index.iife.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
this.SimpleClozeElement=(function(){typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var e={},t=Symbol(`uninitialized`),n=`http://www.w3.org/1999/xhtml`,r=`http://www.w3.org/2000/svg`,i=`http://www.w3.org/1998/Math/MathML`,a=Array.isArray,o=Array.prototype.indexOf,s=Array.prototype.includes,c=Array.from,l=Object.keys,u=Object.defineProperty,d=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyDescriptors,p=Object.prototype,m=Array.prototype,h=Object.getPrototypeOf,g=Object.isExtensible,ee=()=>{};function _(e){for(var t=0;t<e.length;t++)e[t]()}function v(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var y=1024,b=2048,te=4096,ne=8192,re=16384,x=32768,S=1<<25,ie=65536,ae=1<<19,oe=1<<20,se=65536,ce=1<<21,le=1<<22,ue=1<<23,de=Symbol(`$state`),C=Symbol(`component`),fe=Symbol(`legacy props`),pe=Symbol(``),me=Symbol(`attributes`),he=Symbol(`class`),ge=Symbol(`style`),_e=Symbol(`text`),ve=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ye=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function be(){console.warn(`https://svelte.dev/e/derived_inert`)}function xe(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Se(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var w=!1;function Ce(e){w=e}var T;function E(t){if(t===null)throw xe(),e;return T=t}function we(){return E(Qt(T))}function Te(t){if(w){if(Qt(T)!==null)throw xe(),e;T=t}}function Ee(e=1){if(w){for(var t=e,n=T;t--;)n=Qt(n);T=n}}function De(e=!0){for(var t=0,n=T;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Qt(n);e&&n.remove(),n=i}}function Oe(t){if(!t||t.nodeType!==8)throw xe(),e;return t.data}function ke(e){return e===this.v}function Ae(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function je(e){return!Ae(e,this.v)}function Me(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Ne(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Pe(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Fe(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Ie(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Le(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Re(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function ze(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Be(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Ve(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function He(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var D=null;function Ue(e){D=e}function We(e,t=!1,n){D={p:D,i:!1,c:null,e:null,s:e,x:null,r:H,l:null}}function Ge(e){var t=D,n=t.e;if(n!==null){t.e=null;for(var r of n)pn(r)}return e!==void 0&&(t.x=e),t.i=!0,D=t.p,Ke(e)}function Ke(e={}){return u(e,C,{value:!0}),e}function qe(){return!0}var Je=[];function Ye(){var e=Je;Je=[],_(e)}function Xe(e){if(Je.length===0&&!xt){var t=Je;queueMicrotask(()=>{t===Je&&Ye()})}Je.push(e)}function Ze(){for(;Je.length>0;)Ye()}var Qe=~(b|te|y);function O(e,t){e.f=e.f&Qe|t}function $e(e){e.f&512||e.deps===null?O(e,y):O(e,te)}function et(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=se,et(t.deps))}function tt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),et(e.deps),O(e,y)}var nt=!1;function rt(e){var t=nt;try{return nt=!1,[e(),nt]}finally{nt=t}}function it(e){var t=z,n=H;V(null),U(null);try{return e()}finally{V(t),U(n)}}function at(e,t,n,r){let i=qe()?lt:ft;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=H,c=ot(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){I(e,s)}st()}}var d=ct();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>dt(e))).then(u).catch(e=>I(e,s)).finally(d)}l?l.then(()=>{c(),f(),st()}):f()}function ot(){var e=H,t=z,n=D,r=A;return function(i=!0){U(e),V(t),Ue(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function st(e=!0){U(null),V(null),Ue(null),e&&A?.deactivate()}function ct(){var e=H,t=e.b,n=A,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function lt(e){var n=2|b;return H!==null&&(H.f|=ae),{ctx:D,deps:null,effects:null,equals:ke,f:n,fn:e,reactions:null,rv:0,v:t,wv:0,parent:H,ac:null}}var ut=Symbol(`obsolete`);function dt(e,n,r){let i=H;i===null&&Me();var a=void 0,o=zt(t),s=!z,c=new Set;return _n(()=>{var t=H,n=v();a=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ve&&n.reject(e)}).finally(st)}catch(e){n.reject(e),st()}var r=A;if(s){if(t.f&32768)var l=ct();if(i.b?.is_rendered())r.async_deriveds.get(t)?.reject(ut);else for(let e of c.values())e.reject(ut);c.add(n),r.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),c.delete(n),t!==ut&&(r.activate(),t?(o.f|=ue,Vt(o,t)):(o.f&8388608&&(o.f^=ue),Vt(o,e)),r.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),dn(()=>{for(let e of c)e.reject(ut)}),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function k(e){let t=lt(e);return In(t),t}function ft(e){let t=lt(e);return t.equals=je,t}function pt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)R(t[n])}}function mt(e){var n,r=H,i=e.parent;if(!Pn&&i!==null&&e.v!==t&&i.f&24576)return be(),e.v;U(i);try{e.f&=~se,pt(e),n=Gn(e)}finally{U(r)}return n}function ht(e){var t=mt(e);if(!e.equals(t)&&(e.wv=Hn(),(!A?.is_fork||e.deps===null)&&(A===null?e.v=t:(A.capture(e,t,!0),yt?.capture(e,t,!0)),e.deps===null))){O(e,y);return}Pn||(j===null?$e(e):(un()||A?.is_fork)&&j.set(e,t))}function gt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&it(()=>{t.ac.abort(ve),t.ac=null}),t.fn!==null&&(t.teardown=ee),Jn(t,0),Cn(t))}function _t(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Yn(t)}var vt=null,A=null,yt=null,j=null,bt=null,xt=!1,St=!1,Ct=null,wt=null,Tt=0,Et=1,Dt=class e{id=Et++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){vt===null?vt=this:(vt.#n=this,this.#t=vt),vt=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)O(r,b),t(r);for(r of n.m)O(r,te),t(r)}this.#p.add(e)}#g(){this.#e=!0,Tt++>1e3&&(this.#x(),kt());for(let e of this.#u)this.#d.delete(e),O(e,b),this.schedule(e);for(let e of this.#d)O(e,te),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=Ct=[],r=[],i=wt=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw It(e),this.#h()||this.discard(),t}if(A=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(Ct=null,wt=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)Ft(e,t);i.length>0&&A.#g();return}let o=this.#v();if(o){this.#b(r),this.#b(n),o.#y(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),yt=this,jt(r),jt(n),yt=null,this.#s?.resolve();var s=A;if(this.#a===0&&(this.#c.length===0||s!==null)&&this.#x(),this.#c.length>0)if(s!==null){let e=s;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}else s=this;s!==null&&(M.clear(),s.#g())}#_(e,t,n){e.f^=y;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=y:i&4?t.push(r):Un(r)&&(i&16&&this.#d.add(r),Yn(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#v(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#y(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),O(i,b),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#x(),A=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)tt(e[t],this.#u,this.#d)}capture(e,n,r=!1){e.v!==t&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[n,r]),j?.set(e,n)),this.is_fork||(e.v=n)}activate(){A=this}deactivate(){A=null,j=null}flush(){try{St=!0,A=this,this.#g()}finally{Tt=0,bt=null,Ct=null,wt=null,St=!1,A=null,j=null,M.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(ut);this.#x(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,Xe(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=v()).promise}static ensure(){if(A===null){let t=A=new e;!St&&!xt&&Xe(()=>{t.#e||t.flush()})}return A}apply(){j=null}schedule(e){if(bt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(Ct!==null&&t===H&&(z===null||!(z.f&2)))return;if(n&96){if(!(n&1024))return;t.f^=y}}this.#c.push(t)}#x(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?vt=e:t.#t=e,this.linked=!1}}};function Ot(e){var t=xt;xt=!0;try{var n;for(e&&(A!==null&&!A.is_fork&&A.flush(),n=e());;){if(Ze(),A===null)return n;A.flush()}}finally{xt=t}}function kt(){try{Ie()}catch(e){I(e,bt)}}var At=null;function jt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Un(r)&&(At=new Set,Yn(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&En(r),At?.size>0)){M.clear();for(let e of At){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)At.has(n)&&(At.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Yn(n)}}At.clear()}}At=null}}function Mt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?Mt(i,t,n,r):e&4194320&&!(e&2048)&&Nt(i,t,r)&&(O(i,b),Pt(i))}}function Nt(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(s.call(t,r))return!0;if(r.f&2&&Nt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Pt(e){A.schedule(e)}function Ft(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),O(e,y);for(var n=e.first;n!==null;)Ft(n,t),n=n.next}}function It(e){O(e,y);for(var t=e.first;t!==null;)It(t),t=t.next}var Lt=new Set,M=new Map,Rt=!1;function zt(e,t){return{f:0,v:e,reactions:null,equals:ke,rv:0,wv:0}}function N(e,t){let n=zt(e,t);return In(n),n}function Bt(e,t=!1,n=!0){let r=zt(e);return t||(r.equals=je),r}function P(e,t,n=!1){return z!==null&&(!B||z.f&131072)&&qe()&&z.f&4325394&&(W===null||!W.has(e))&&Ve(),Vt(e,n?Gt(t):t,wt)}function Vt(e,t,n=null){if(!e.equals(t)){Pn?M.set(e,t):M.has(e)||M.set(e,e.v);var r=Dt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&mt(t),j===null&&$e(t)}e.wv=Hn(),Wt(e,b,n),qe()&&H!==null&&H.f&1024&&!(H.f&96)&&(q===null?Ln([e]):q.push(e)),!r.is_fork&&Lt.size>0&&!Rt&&Ht()}return t}function Ht(){Rt=!1;for(let e of Lt){e.f&1024&&O(e,te);let t;try{t=Un(e)}catch{t=!0}t&&Yn(e)}Lt.clear()}function Ut(e){P(e,e.v+1)}function Wt(e,t,n){var r=e.reactions;if(r!==null)for(var i=qe(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===H)){var l=(c&b)===0;if(l&&O(s,t),c&131072)Lt.add(s);else if(c&2){var u=s;j?.delete(u),c&65536||(c&512&&(H===null||!(H.f&2097152))&&(s.f|=se),Wt(u,te,n))}else if(l){var d=s;c&16&&At!==null&&At.add(d),n===null?Pt(d):n.push(d)}}}}function Gt(e){if(typeof e!=`object`||!e||de in e||C in e)return e;let n=h(e);if(n!==p&&n!==m)return e;var r=new Map,i=a(e),o=N(0),s=null,c=Bn,l=e=>{if(Bn===c)return e();var t=z,n=Bn;V(null),Vn(c);var r=e();return V(t),Vn(n),r};return i&&r.set(`length`,N(e.length,s)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&ze();var i=r.get(t);return i===void 0?l(()=>{var e=N(n.value,s);return r.set(t,e),e}):P(i,n.value,!0),!0},deleteProperty(e,n){var i=r.get(n);if(i===void 0){if(n in e){let e=l(()=>N(t,s));r.set(n,e),Ut(o)}}else P(i,t),Ut(o);return!0},get(n,i,a){if(i===de)return e;var o=r.get(i),c=i in n;if(o===void 0&&(!c||d(n,i)?.writable)&&(o=l(()=>N(Gt(c?n[i]:t),s)),r.set(i,o)),o!==void 0){var u=J(o);return u===t?void 0:u}return Reflect.get(n,i,a)},getOwnPropertyDescriptor(e,n){var i=Reflect.getOwnPropertyDescriptor(e,n);if(i&&`value`in i){var a=r.get(n);a&&(i.value=J(a))}else if(i===void 0){var o=r.get(n),s=o?.v;if(o!==void 0&&s!==t)return{enumerable:!0,configurable:!0,value:s,writable:!0}}return i},has(e,n){if(n===de)return!0;var i=r.get(n),a=i!==void 0&&i.v!==t||Reflect.has(e,n);return(i!==void 0||H!==null&&(!a||d(e,n)?.writable))&&(i===void 0&&(i=l(()=>N(a?Gt(e[n]):t,s)),r.set(n,i)),J(i)===t)?!1:a},set(e,n,a,c){var u=r.get(n),f=n in e;if(i&&n===`length`)for(var p=a;p<u.v;p+=1){var m=r.get(p+``);m===void 0?p in e&&(m=l(()=>N(t,s)),r.set(p+``,m)):P(m,t)}if(u===void 0)(!f||d(e,n)?.writable)&&(u=l(()=>N(void 0,s)),P(u,Gt(a)),r.set(n,u));else{f=u.v!==t;var h=l(()=>Gt(a));P(u,h)}var g=Reflect.getOwnPropertyDescriptor(e,n);if(g?.set&&g.set.call(c,a),!f){if(i&&typeof n==`string`){var ee=r.get(`length`),_=Number(n);Number.isInteger(_)&&_>=ee.v&&P(ee,_+1)}Ut(o)}return!0},ownKeys(e){J(o);var n=Reflect.ownKeys(e).filter(e=>{var n=r.get(e);return n===void 0||n.v!==t});for(var[i,a]of r)a.v!==t&&!(i in e)&&n.push(i);return n},setPrototypeOf(){Be()}})}var Kt,qt,Jt,Yt;function Xt(){if(Kt===void 0){Kt=window,qt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Jt=d(t,`firstChild`).get,Yt=d(t,`nextSibling`).get,g(e)&&(e[he]=void 0,e[me]=null,e[ge]=void 0,e.__e=void 0),g(n)&&(n[_e]=void 0)}}function Zt(e=``){return document.createTextNode(e)}function F(e){return Jt.call(e)}function Qt(e){return Yt.call(e)}function $t(e,t){if(!w)return F(e);var n=F(T);if(n===null)n=T.appendChild(Zt());else if(t&&n.nodeType!==3){var r=Zt();return n?.before(r),E(r),r}return t&&on(n),E(n),n}function en(e,t=!1){if(!w)return F(e);var n=$t(e,t);return Te(e),n}function tn(e,t=1,n=!1){let r=w?T:e;for(var i;t--;)i=r,r=Qt(r);if(!w)return r;if(n){if(r?.nodeType!==3){var a=Zt();return r===null?i?.after(a):r.before(a),E(a),a}on(r)}return E(r),r}function nn(e){e.textContent=``}function rn(){return!1}function an(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function on(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function sn(e){var t=H;if(t===null)return z.f|=ue,e;if(!(t.f&32768)&&!(t.f&4))throw e;I(e,t)}function I(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128&&!(t.f&33570816)){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}function cn(e){H===null&&(z===null&&Fe(e),Pe()),Pn&&Ne(e)}function ln(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function L(e,t){var n=H;n!==null&&n.f&8192&&(e|=ne);var r={ctx:D,deps:null,nodes:null,f:e|b|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};A?.register_created_effect(r);var i=r;if(e&4)Ct===null?Dt.ensure().schedule(r):Ct.push(r);else if(t!==null){try{Yn(r)}catch(e){throw R(r),e}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|=ie))}if(i!==null&&(i.parent=n,n!==null&&ln(i,n),z!==null&&z.f&2&&!(e&64))){var a=z;(a.effects??=[]).push(i)}return r}function un(){return z!==null&&!B}function dn(e){let t=L(8,null);return O(t,y),t.teardown=e,t}function fn(e){cn(`$effect`);var t=H.f;if(!z&&t&32&&D!==null&&!D.i){var n=D;(n.e??=[]).push(e)}else return pn(e)}function pn(e){return L(4|oe,e)}function mn(e){Dt.ensure();let t=L(64|ae,e);return()=>{R(t)}}function hn(e){Dt.ensure();let t=L(64|ae,e);return(e={})=>new Promise(n=>{e.outro?Dn(t,()=>{R(t),n(void 0)}):(R(t),n(void 0))})}function gn(e){return L(4,e)}function _n(e){return L(le|ae,e)}function vn(e,t=0){return L(8|t,e)}function yn(e,t=[],n=[],r=[]){at(r,t,n,t=>{L(8,()=>{e(...t.map(J))})})}function bn(e,t=0){return L(16|t,e)}function xn(e){return L(32|ae,e)}function Sn(e){var t=e.teardown;if(t!==null){let n=Pn,r=z;Fn(!0),V(null);try{t.call(null)}catch(t){I(t,e.parent)}finally{Fn(n),V(r)}}}function Cn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&it(()=>{e.abort(ve)});var r=n.next;n.f&64?n.parent=null:R(n,t),n=r}}function wn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||R(t),t=n}}function R(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Tn(e.nodes.start,e.nodes.end),n=!0),e.f|=S,Cn(e,t&&!n),Jn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Sn(e),e.f^=S,e.f|=re;var i=e.parent;i!==null&&i.first!==null&&En(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Tn(e,t){for(;e!==null;){var n=e===t?null:Qt(e);e.remove(),e=n}}function En(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Dn(e,t,n=!0){var r=[];e.f|=256,On(e,r,!0);var i=()=>{n&&R(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function On(e,t,n){if(!(e.f&8192)){e.f^=ne;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;On(i,t,o?n:!1)}i=a}}}function kn(e){e.f&=-257,An(e,!0)}function An(e,t){if(!(e.f&256)&&e.f&8192){e.f^=ne,e.f&1024||(O(e,b),Dt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;An(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function jn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Qt(n);t.append(n),n=i}}var Mn=null,Nn=!1,Pn=!1;function Fn(e){Pn=e}var z=null,B=!1;function V(e){z=e}var H=null;function U(e){H=e}var W=null;function In(e){z!==null&&(W??=new Set).add(e)}var G=null,K=0,q=null;function Ln(e){q=e}var Rn=1,zn=0,Bn=zn;function Vn(e){Bn=e}function Hn(){return++Rn}function Un(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~se),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Un(a)&&ht(a),a.wv>e.wv)return!0}t&512&&j===null&&O(e,y)}return!1}function Wn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(W!==null&&W.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Wn(a,t,!1):t===a&&(n?O(a,b):a.f&1024&&O(a,te),Pt(a))}}function Gn(e){var t=G,n=K,r=q,i=z,a=W,o=D,s=B,c=Bn,l=e.f;G=null,K=0,q=null,z=l&96?null:e,W=null,Ue(e.ctx),B=!1,Bn=++zn,e.ac!==null&&(it(()=>{e.ac.abort(ve)}),e.ac=null);try{e.f|=ce;var u=e.fn,d=u();e.f|=x;var f=Kn(e);if(qe()&&q!==null&&!B&&f!==null&&!(e.f&6146))for(var p=0;p<q.length;p++)Wn(q[p],e);if(i!==null&&i!==e){if(zn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=zn;if(t!==null)for(let e of t)e.rv=zn;q!==null&&(r===null?r=q:r.push(...q))}return e.f&8388608&&(e.f^=ue),d}catch(t){return Kn(e),sn(t)}finally{e.f^=ce,G=t,K=n,q=r,z=i,W=a,Ue(o),B=s,Bn=c}}function Kn(e){var t=e.deps,n=A?.is_fork;if(G!==null){var r;if(n||Jn(e,K),t!==null&&K>0)for(t.length=K+G.length,r=0;r<G.length;r++)t[K+r]=G[r];else e.deps=t=G;if(un()&&e.f&512)for(r=K;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&K<t.length&&(Jn(e,K),t.length=K);return t}function qn(e,n){let r=n.reactions;if(r!==null){var i=o.call(r,e);if(i!==-1){var a=r.length-1;a===0?r=n.reactions=null:(r[i]=r[a],r.pop())}}if(r===null&&n.f&2&&(G===null||!s.call(G,n))){var c=n;c.f&512&&(c.f^=512,c.f&=~se),c.v!==t&&$e(c),c.ac!==null&&it(()=>{c.ac.abort(ve),c.ac=null,O(c,b)}),gt(c),Jn(c,0)}}function Jn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)qn(e,n[r])}function Yn(e){var t=e.f;if(!(t&16384)){O(e,y);var n=H,r=Nn;H=e,Nn=(t&96)==0;try{t&16777232?wn(e):Cn(e),Sn(e);var i=Gn(e);e.teardown=typeof i==`function`?i:null,e.wv=Rn}finally{Nn=r,H=n}}}function J(e){var t=(e.f&2)!=0;if(Mn?.add(e),z!==null&&!B&&!(H!==null&&H.f&16384)&&(W===null||!W.has(e))){var n=z.deps;if(z.f&2097152)e.rv<zn&&(e.rv=zn,G===null&&n!==null&&n[K]===e?K++:G===null?G=[e]:G.push(e));else{z.deps??=[],s.call(z.deps,e)||z.deps.push(e);var r=e.reactions;r===null?e.reactions=[z]:s.call(r,z)||r.push(z)}}if(Pn&&M.has(e))return M.get(e);if(t){var i=e;if(Pn){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||Zn(i))&&(a=mt(i)),M.set(i,a),a}var o=(i.f&512)==0&&!B&&z!==null&&(Nn||(z.f&512)!=0),c=(i.f&x)===0;Un(i)&&(o&&(i.f|=512),ht(i)),o&&!c&&(_t(i),Xn(i))}if(j?.has(e))return j.get(e);if(e.f&8388608)throw e.v;return e.v}function Xn(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(_t(t),Xn(t))}function Zn(e){if(e.v===t)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(M.has(t)||t.f&2&&Zn(t))return!0;return!1}function Qn(e){var t=B;try{return B=!0,e()}finally{B=t}}var $n=Symbol(`events`),er=new Set,tr=new Set;function nr(e,t,n){(t[$n]??={})[e]=n}function rr(e){for(var t=0;t<e.length;t++)er.add(e[t]);for(var n of tr)n(e)}var ir=null,ar=!1;function or(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;ir=e,ar||(ar=!0,setTimeout(()=>{ar=!1,ir=null}));var o=0,s=ir===e&&e[$n];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[$n]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){u(e,`currentTarget`,{configurable:!0,get(){return a||n}});var d=z,f=H;V(null),U(null);try{for(var p,m=[];a!==null&&a!==t;){try{var h=a[$n]?.[r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;o++,a=o<i.length?i[o]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[$n]=t,delete e.currentTarget,V(d),U(f)}}}var sr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function cr(e){return sr?.createHTML(e)??e}function lr(e){var t=an(`template`);return t.innerHTML=cr(e.replaceAll(`<!>`,`<!---->`)),t.content}function Y(e,t){var n=H;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function ur(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(w)return Y(T,null),T;i===void 0&&(i=lr(a?e:`<!>`+e),n||(i=F(i)));var t=r||qt?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=F(t),s=t.lastChild;Y(o,s)}else Y(t,t);return t}}function dr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(w)return Y(T,null),T;if(!o){var e=F(lr(a));if(i)for(o=document.createDocumentFragment();F(e);)o.appendChild(F(e));else o=F(e)}var t=o.cloneNode(!0);if(i){var n=F(t),r=t.lastChild;Y(n,r)}else Y(t,t);return t}}function fr(e,t){return dr(e,t,`svg`)}function pr(e,t){if(w){var n=H;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=T),we();return}e!==null&&e.before(t)}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var mr=[`touchstart`,`touchmove`];function hr(e){return mr.includes(e)}function gr(e){let t=0,n=zt(0),r;return()=>{un()&&(J(n),vn(()=>(t===0&&(r=Qn(()=>e(()=>Ut(n)))),t+=1,()=>{Xe(()=>{--t,t===0&&(r?.(),r=void 0,Ut(n))})})))}}var _r=ie|ae;function vr(e,t,n,r){new yr(e,t,n,r)}var yr=class{parent;is_pending=!1;transform_error;#e;#t=w?T:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=gr(()=>(this.#m=zt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=H;t.b=this,t.f|=128,n(e)},this.parent=H.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=bn(()=>{if(w){let e=this.#t;we();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#y():this.#g()}else this.#b()},_r),w&&(this.#e=T)}#g(){try{this.#a=xn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);Xe(r),t&&(this.#s=xn(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{if(t){Se();return}t=!0,n&&He(),this.#s!==null&&Dn(this.#s,()=>{this.#s=null}),this.#S(()=>{this.#b()})};return{reset:r,invoke_onerror:()=>{try{n=!0,this.#n.onerror?.(e,r),n=!1}catch(e){I(e,this.#i&&this.#i.parent)}}}}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=xn(()=>e(this.#e)),Xe(()=>{var e=this.#c=document.createDocumentFragment(),t=Zt(),n=!1;if(e.append(t),this.#a=this.#S(()=>{try{return xn(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){I(e,this.#i.parent)}return null}}),this.#a===null){this.#c=null,n&&this.#x(A);return}this.#u===0&&(this.#e.before(e),this.#c=null,Dn(this.#o,()=>{this.#o=null}),this.#x(A))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=xn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();jn(this.#a,e);let t=this.#n.pending;this.#o=xn(()=>t(this.#e))}else this.#x(A)}catch(e){this.error(e)}}#x(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){tt(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#S(e){var t=H,n=z,r=D;U(this.#i),V(this.#i),Ue(this.#i.ctx);try{return Dt.ensure(),e()}finally{U(t),V(n),Ue(r)}}#C(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#C(e,t);return}this.#u+=e,this.#u===0&&(this.#x(t),this.#o&&Dn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#C(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,Xe(()=>{this.#d=!1,this.#m&&Vt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),J(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;A?.is_fork?(this.#a&&A.skip_effect(this.#a),this.#o&&A.skip_effect(this.#o),this.#s&&A.skip_effect(this.#s),A.oncommit(()=>{this.#w(e)})):this.#w(e)}#w(e){this.#a&&=(R(this.#a),null),this.#o&&=(R(this.#o),null),this.#s&&=(R(this.#s),null),w&&(E(this.#t),Ee(),E(De()));let t=this.#n.failed,n=e=>{let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&(this.#s=this.#S(()=>{try{return xn(()=>{var r=H;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return I(e,this.#i.parent),null}}))};Xe(()=>{var t;try{t=this.transform_error(e)}catch(e){I(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>I(e,this.#i&&this.#i.parent)):n(t)})}};function br(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[_e]??=e.nodeValue)&&(e[_e]=n,e.nodeValue=`${n}`)}function xr(e,t){return wr(e,t)}function Sr(t,n){Xt(),n.intro=n.intro??!1;let r=n.target,i=w,a=T;try{for(var o=F(r);o&&(o.nodeType!==8||o.data!==`[`);)o=Qt(o);if(!o)throw e;Ce(!0),E(o);let i=wr(t,{...n,anchor:o});return Ce(!1),i}catch(i){if(i instanceof Error&&i.message.split(`
|
|
1
|
+
this.SimpleClozeElement=(function(){typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var e={},t=Symbol(`uninitialized`),n=`http://www.w3.org/1999/xhtml`,r=`http://www.w3.org/2000/svg`,i=`http://www.w3.org/1998/Math/MathML`,a=Array.isArray,o=Array.prototype.indexOf,s=Array.prototype.includes,c=Array.from,l=Object.keys,u=Object.defineProperty,d=Object.getOwnPropertyDescriptor,f=Object.getOwnPropertyDescriptors,p=Object.prototype,m=Array.prototype,h=Object.getPrototypeOf,g=Object.isExtensible,ee=()=>{};function _(e){for(var t=0;t<e.length;t++)e[t]()}function v(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var y=1024,b=2048,te=4096,ne=8192,re=16384,x=32768,S=1<<25,ie=65536,ae=1<<19,oe=1<<20,se=65536,ce=1<<21,le=1<<22,ue=1<<23,de=Symbol(`$state`),fe=Symbol(`component`),C=Symbol(`legacy props`),pe=Symbol(``),me=Symbol(`attributes`),he=Symbol(`class`),ge=Symbol(`style`),_e=Symbol(`text`),ve=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ye=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function be(){console.warn(`https://svelte.dev/e/derived_inert`)}function xe(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Se(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var w=!1;function Ce(e){w=e}var T;function E(t){if(t===null)throw xe(),e;return T=t}function we(){return E(Qt(T))}function Te(t){if(w){if(Qt(T)!==null)throw xe(),e;T=t}}function Ee(e=1){if(w){for(var t=e,n=T;t--;)n=Qt(n);T=n}}function De(e=!0){for(var t=0,n=T;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Qt(n);e&&n.remove(),n=i}}function Oe(t){if(!t||t.nodeType!==8)throw xe(),e;return t.data}function ke(e){return e===this.v}function Ae(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function je(e){return!Ae(e,this.v)}function Me(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Ne(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Pe(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Fe(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Ie(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Le(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Re(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function ze(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Be(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Ve(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function He(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var D=null;function Ue(e){D=e}function We(e,t=!1,n){D={p:D,i:!1,c:null,e:null,s:e,x:null,r:H,l:null}}function Ge(e){var t=D,n=t.e;if(n!==null){t.e=null;for(var r of n)pn(r)}return e!==void 0&&(t.x=e),t.i=!0,D=t.p,Ke(e)}function Ke(e={}){return u(e,fe,{value:!0}),e}function qe(){return!0}var Je=[];function Ye(){var e=Je;Je=[],_(e)}function Xe(e){if(Je.length===0&&!xt){var t=Je;queueMicrotask(()=>{t===Je&&Ye()})}Je.push(e)}function Ze(){for(;Je.length>0;)Ye()}var Qe=~(b|te|y);function O(e,t){e.f=e.f&Qe|t}function $e(e){e.f&512||e.deps===null?O(e,y):O(e,te)}function et(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=se,et(t.deps))}function tt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),et(e.deps),O(e,y)}var nt=!1;function rt(e){var t=nt;try{return nt=!1,[e(),nt]}finally{nt=t}}function it(e){var t=z,n=H;V(null),U(null);try{return e()}finally{V(t),U(n)}}function at(e,t,n,r){let i=qe()?lt:ft;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=H,c=ot(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){I(e,s)}st()}}var d=ct();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>dt(e))).then(u).catch(e=>I(e,s)).finally(d)}l?l.then(()=>{c(),f(),st()}):f()}function ot(){var e=H,t=z,n=D,r=A;return function(i=!0){U(e),V(t),Ue(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function st(e=!0){U(null),V(null),Ue(null),e&&A?.deactivate()}function ct(){var e=H,t=e.b,n=A,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function lt(e){var n=2|b;return H!==null&&(H.f|=ae),{ctx:D,deps:null,effects:null,equals:ke,f:n,fn:e,reactions:null,rv:0,v:t,wv:0,parent:H,ac:null}}var ut=Symbol(`obsolete`);function dt(e,n,r){let i=H;i===null&&Me();var a=void 0,o=zt(t),s=!z,c=new Set;return _n(()=>{var t=H,n=v();a=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ve&&n.reject(e)}).finally(st)}catch(e){n.reject(e),st()}var r=A;if(s){if(t.f&32768)var l=ct();if(i.b?.is_rendered())r.async_deriveds.get(t)?.reject(ut);else for(let e of c.values())e.reject(ut);c.add(n),r.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),c.delete(n),t!==ut&&(r.activate(),t?(o.f|=ue,Vt(o,t)):(o.f&8388608&&(o.f^=ue),Vt(o,e)),r.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),dn(()=>{for(let e of c)e.reject(ut)}),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function k(e){let t=lt(e);return In(t),t}function ft(e){let t=lt(e);return t.equals=je,t}function pt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)R(t[n])}}function mt(e){var n,r=H,i=e.parent;if(!Pn&&i!==null&&e.v!==t&&i.f&24576)return be(),e.v;U(i);try{e.f&=~se,pt(e),n=Gn(e)}finally{U(r)}return n}function ht(e){var t=mt(e);if(!e.equals(t)&&(e.wv=Hn(),(!A?.is_fork||e.deps===null)&&(A===null?e.v=t:(A.capture(e,t,!0),yt?.capture(e,t,!0)),e.deps===null))){O(e,y);return}Pn||(j===null?$e(e):(un()||A?.is_fork)&&j.set(e,t))}function gt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&it(()=>{t.ac.abort(ve),t.ac=null}),t.fn!==null&&(t.teardown=ee),Jn(t,0),Cn(t))}function _t(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Yn(t)}var vt=null,A=null,yt=null,j=null,bt=null,xt=!1,St=!1,Ct=null,wt=null,Tt=0,Et=1,Dt=class e{id=Et++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){vt===null?vt=this:(vt.#n=this,this.#t=vt),vt=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)O(r,b),t(r);for(r of n.m)O(r,te),t(r)}this.#p.add(e)}#g(){this.#e=!0,Tt++>1e3&&(this.#x(),kt());for(let e of this.#u)this.#d.delete(e),O(e,b),this.schedule(e);for(let e of this.#d)O(e,te),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=Ct=[],r=[],i=wt=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw It(e),this.#h()||this.discard(),t}if(A=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(Ct=null,wt=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)Ft(e,t);i.length>0&&A.#g();return}let o=this.#v();if(o){this.#b(r),this.#b(n),o.#y(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),yt=this,jt(r),jt(n),yt=null,this.#s?.resolve();var s=A;if(this.#a===0&&(this.#c.length===0||s!==null)&&this.#x(),this.#c.length>0)if(s!==null){let e=s;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}else s=this;s!==null&&(M.clear(),s.#g())}#_(e,t,n){e.f^=y;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=y:i&4?t.push(r):Un(r)&&(i&16&&this.#d.add(r),Yn(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#v(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#y(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),O(i,b),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#x(),A=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)tt(e[t],this.#u,this.#d)}capture(e,n,r=!1){e.v!==t&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[n,r]),j?.set(e,n)),this.is_fork||(e.v=n)}activate(){A=this}deactivate(){A=null,j=null}flush(){try{St=!0,A=this,this.#g()}finally{Tt=0,bt=null,Ct=null,wt=null,St=!1,A=null,j=null,M.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(ut);this.#x(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,Xe(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=v()).promise}static ensure(){if(A===null){let t=A=new e;!St&&!xt&&Xe(()=>{t.#e||t.flush()})}return A}apply(){j=null}schedule(e){if(bt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(Ct!==null&&t===H&&(z===null||!(z.f&2)))return;if(n&96){if(!(n&1024))return;t.f^=y}}this.#c.push(t)}#x(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?vt=e:t.#t=e,this.linked=!1}}};function Ot(e){var t=xt;xt=!0;try{var n;for(e&&(A!==null&&!A.is_fork&&A.flush(),n=e());;){if(Ze(),A===null)return n;A.flush()}}finally{xt=t}}function kt(){try{Ie()}catch(e){I(e,bt)}}var At=null;function jt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Un(r)&&(At=new Set,Yn(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&En(r),At?.size>0)){M.clear();for(let e of At){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)At.has(n)&&(At.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Yn(n)}}At.clear()}}At=null}}function Mt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?Mt(i,t,n,r):e&4194320&&!(e&2048)&&Nt(i,t,r)&&(O(i,b),Pt(i))}}function Nt(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(s.call(t,r))return!0;if(r.f&2&&Nt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Pt(e){A.schedule(e)}function Ft(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),O(e,y);for(var n=e.first;n!==null;)Ft(n,t),n=n.next}}function It(e){O(e,y);for(var t=e.first;t!==null;)It(t),t=t.next}var Lt=new Set,M=new Map,Rt=!1;function zt(e,t){return{f:0,v:e,reactions:null,equals:ke,rv:0,wv:0}}function N(e,t){let n=zt(e,t);return In(n),n}function Bt(e,t=!1,n=!0){let r=zt(e);return t||(r.equals=je),r}function P(e,t,n=!1){return z!==null&&(!B||z.f&131072)&&qe()&&z.f&4325394&&(W===null||!W.has(e))&&Ve(),Vt(e,n?Gt(t):t,wt)}function Vt(e,t,n=null){if(!e.equals(t)){Pn?M.set(e,t):M.has(e)||M.set(e,e.v);var r=Dt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&mt(t),j===null&&$e(t)}e.wv=Hn(),Wt(e,b,n),qe()&&H!==null&&H.f&1024&&!(H.f&96)&&(q===null?Ln([e]):q.push(e)),!r.is_fork&&Lt.size>0&&!Rt&&Ht()}return t}function Ht(){Rt=!1;for(let e of Lt){e.f&1024&&O(e,te);let t;try{t=Un(e)}catch{t=!0}t&&Yn(e)}Lt.clear()}function Ut(e){P(e,e.v+1)}function Wt(e,t,n){var r=e.reactions;if(r!==null)for(var i=qe(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===H)){var l=(c&b)===0;if(l&&O(s,t),c&131072)Lt.add(s);else if(c&2){var u=s;j?.delete(u),c&65536||(c&512&&(H===null||!(H.f&2097152))&&(s.f|=se),Wt(u,te,n))}else if(l){var d=s;c&16&&At!==null&&At.add(d),n===null?Pt(d):n.push(d)}}}}function Gt(e){if(typeof e!=`object`||!e||de in e||fe in e)return e;let n=h(e);if(n!==p&&n!==m)return e;var r=new Map,i=a(e),o=N(0),s=null,c=Bn,l=e=>{if(Bn===c)return e();var t=z,n=Bn;V(null),Vn(c);var r=e();return V(t),Vn(n),r};return i&&r.set(`length`,N(e.length,s)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&ze();var i=r.get(t);return i===void 0?l(()=>{var e=N(n.value,s);return r.set(t,e),e}):P(i,n.value,!0),!0},deleteProperty(e,n){var i=r.get(n);if(i===void 0){if(n in e){let e=l(()=>N(t,s));r.set(n,e),Ut(o)}}else P(i,t),Ut(o);return!0},get(n,i,a){if(i===de)return e;var o=r.get(i),c=i in n;if(o===void 0&&(!c||d(n,i)?.writable)&&(o=l(()=>N(Gt(c?n[i]:t),s)),r.set(i,o)),o!==void 0){var u=J(o);return u===t?void 0:u}return Reflect.get(n,i,a)},getOwnPropertyDescriptor(e,n){var i=Reflect.getOwnPropertyDescriptor(e,n);if(i&&`value`in i){var a=r.get(n);a&&(i.value=J(a))}else if(i===void 0){var o=r.get(n),s=o?.v;if(o!==void 0&&s!==t)return{enumerable:!0,configurable:!0,value:s,writable:!0}}return i},has(e,n){if(n===de)return!0;var i=r.get(n),a=i!==void 0&&i.v!==t||Reflect.has(e,n);return(i!==void 0||H!==null&&(!a||d(e,n)?.writable))&&(i===void 0&&(i=l(()=>N(a?Gt(e[n]):t,s)),r.set(n,i)),J(i)===t)?!1:a},set(e,n,a,c){var u=r.get(n),f=n in e;if(i&&n===`length`)for(var p=a;p<u.v;p+=1){var m=r.get(p+``);m===void 0?p in e&&(m=l(()=>N(t,s)),r.set(p+``,m)):P(m,t)}if(u===void 0)(!f||d(e,n)?.writable)&&(u=l(()=>N(void 0,s)),P(u,Gt(a)),r.set(n,u));else{f=u.v!==t;var h=l(()=>Gt(a));P(u,h)}var g=Reflect.getOwnPropertyDescriptor(e,n);if(g?.set&&g.set.call(c,a),!f){if(i&&typeof n==`string`){var ee=r.get(`length`),_=Number(n);Number.isInteger(_)&&_>=ee.v&&P(ee,_+1)}Ut(o)}return!0},ownKeys(e){J(o);var n=Reflect.ownKeys(e).filter(e=>{var n=r.get(e);return n===void 0||n.v!==t});for(var[i,a]of r)a.v!==t&&!(i in e)&&n.push(i);return n},setPrototypeOf(){Be()}})}var Kt,qt,Jt,Yt;function Xt(){if(Kt===void 0){Kt=window,qt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Jt=d(t,`firstChild`).get,Yt=d(t,`nextSibling`).get,g(e)&&(e[he]=void 0,e[me]=null,e[ge]=void 0,e.__e=void 0),g(n)&&(n[_e]=void 0)}}function Zt(e=``){return document.createTextNode(e)}function F(e){return Jt.call(e)}function Qt(e){return Yt.call(e)}function $t(e,t){if(!w)return F(e);var n=F(T);if(n===null)n=T.appendChild(Zt());else if(t&&n.nodeType!==3){var r=Zt();return n?.before(r),E(r),r}return t&&on(n),E(n),n}function en(e,t=!1){if(!w)return F(e);var n=$t(e,t);return Te(e),n}function tn(e,t=1,n=!1){let r=w?T:e;for(var i;t--;)i=r,r=Qt(r);if(!w)return r;if(n){if(r?.nodeType!==3){var a=Zt();return r===null?i?.after(a):r.before(a),E(a),a}on(r)}return E(r),r}function nn(e){e.textContent=``}function rn(){return!1}function an(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function on(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function sn(e){var t=H;if(t===null)return z.f|=ue,e;if(!(t.f&32768)&&!(t.f&4))throw e;I(e,t)}function I(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128&&!(t.f&33570816)){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}function cn(e){H===null&&(z===null&&Fe(e),Pe()),Pn&&Ne(e)}function ln(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function L(e,t){var n=H;n!==null&&n.f&8192&&(e|=ne);var r={ctx:D,deps:null,nodes:null,f:e|b|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};A?.register_created_effect(r);var i=r;if(e&4)Ct===null?Dt.ensure().schedule(r):Ct.push(r);else if(t!==null){try{Yn(r)}catch(e){throw R(r),e}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|=ie))}if(i!==null&&(i.parent=n,n!==null&&ln(i,n),z!==null&&z.f&2&&!(e&64))){var a=z;(a.effects??=[]).push(i)}return r}function un(){return z!==null&&!B}function dn(e){let t=L(8,null);return O(t,y),t.teardown=e,t}function fn(e){cn(`$effect`);var t=H.f;if(!z&&t&32&&D!==null&&!D.i){var n=D;(n.e??=[]).push(e)}else return pn(e)}function pn(e){return L(4|oe,e)}function mn(e){Dt.ensure();let t=L(64|ae,e);return()=>{R(t)}}function hn(e){Dt.ensure();let t=L(64|ae,e);return(e={})=>new Promise(n=>{e.outro?Dn(t,()=>{R(t),n(void 0)}):(R(t),n(void 0))})}function gn(e){return L(4,e)}function _n(e){return L(le|ae,e)}function vn(e,t=0){return L(8|t,e)}function yn(e,t=[],n=[],r=[]){at(r,t,n,t=>{L(8,()=>{e(...t.map(J))})})}function bn(e,t=0){return L(16|t,e)}function xn(e){return L(32|ae,e)}function Sn(e){var t=e.teardown;if(t!==null){let n=Pn,r=z;Fn(!0),V(null);try{t.call(null)}catch(t){I(t,e.parent)}finally{Fn(n),V(r)}}}function Cn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&it(()=>{e.abort(ve)});var r=n.next;n.f&64?n.parent=null:R(n,t),n=r}}function wn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||R(t),t=n}}function R(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Tn(e.nodes.start,e.nodes.end),n=!0),e.f|=S,Cn(e,t&&!n),Jn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Sn(e),e.f^=S,e.f|=re;var i=e.parent;i!==null&&i.first!==null&&En(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Tn(e,t){for(;e!==null;){var n=e===t?null:Qt(e);e.remove(),e=n}}function En(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Dn(e,t,n=!0){var r=[];e.f|=256,On(e,r,!0);var i=()=>{n&&R(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function On(e,t,n){if(!(e.f&8192)){e.f^=ne;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;On(i,t,o?n:!1)}i=a}}}function kn(e){e.f&=-257,An(e,!0)}function An(e,t){if(!(e.f&256)&&e.f&8192){e.f^=ne,e.f&1024||(O(e,b),Dt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;An(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function jn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Qt(n);t.append(n),n=i}}var Mn=null,Nn=!1,Pn=!1;function Fn(e){Pn=e}var z=null,B=!1;function V(e){z=e}var H=null;function U(e){H=e}var W=null;function In(e){z!==null&&(W??=new Set).add(e)}var G=null,K=0,q=null;function Ln(e){q=e}var Rn=1,zn=0,Bn=zn;function Vn(e){Bn=e}function Hn(){return++Rn}function Un(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~se),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Un(a)&&ht(a),a.wv>e.wv)return!0}t&512&&j===null&&O(e,y)}return!1}function Wn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(W!==null&&W.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Wn(a,t,!1):t===a&&(n?O(a,b):a.f&1024&&O(a,te),Pt(a))}}function Gn(e){var t=G,n=K,r=q,i=z,a=W,o=D,s=B,c=Bn,l=e.f;G=null,K=0,q=null,z=l&96?null:e,W=null,Ue(e.ctx),B=!1,Bn=++zn,e.ac!==null&&(it(()=>{e.ac.abort(ve)}),e.ac=null);try{e.f|=ce;var u=e.fn,d=u();e.f|=x;var f=Kn(e);if(qe()&&q!==null&&!B&&f!==null&&!(e.f&6146))for(var p=0;p<q.length;p++)Wn(q[p],e);if(i!==null&&i!==e){if(zn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=zn;if(t!==null)for(let e of t)e.rv=zn;q!==null&&(r===null?r=q:r.push(...q))}return e.f&8388608&&(e.f^=ue),d}catch(t){return Kn(e),sn(t)}finally{e.f^=ce,G=t,K=n,q=r,z=i,W=a,Ue(o),B=s,Bn=c}}function Kn(e){var t=e.deps,n=A?.is_fork;if(G!==null){var r;if(n||Jn(e,K),t!==null&&K>0)for(t.length=K+G.length,r=0;r<G.length;r++)t[K+r]=G[r];else e.deps=t=G;if(un()&&e.f&512)for(r=K;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&K<t.length&&(Jn(e,K),t.length=K);return t}function qn(e,n){let r=n.reactions;if(r!==null){var i=o.call(r,e);if(i!==-1){var a=r.length-1;a===0?r=n.reactions=null:(r[i]=r[a],r.pop())}}if(r===null&&n.f&2&&(G===null||!s.call(G,n))){var c=n;c.f&512&&(c.f^=512,c.f&=~se),c.v!==t&&$e(c),c.ac!==null&&it(()=>{c.ac.abort(ve),c.ac=null,O(c,b)}),gt(c),Jn(c,0)}}function Jn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)qn(e,n[r])}function Yn(e){var t=e.f;if(!(t&16384)){O(e,y);var n=H,r=Nn;H=e,Nn=(t&96)==0;try{t&16777232?wn(e):Cn(e),Sn(e);var i=Gn(e);e.teardown=typeof i==`function`?i:null,e.wv=Rn}finally{Nn=r,H=n}}}function J(e){var t=(e.f&2)!=0;if(Mn?.add(e),z!==null&&!B&&!(H!==null&&H.f&16384)&&(W===null||!W.has(e))){var n=z.deps;if(z.f&2097152)e.rv<zn&&(e.rv=zn,G===null&&n!==null&&n[K]===e?K++:G===null?G=[e]:G.push(e));else{z.deps??=[],s.call(z.deps,e)||z.deps.push(e);var r=e.reactions;r===null?e.reactions=[z]:s.call(r,z)||r.push(z)}}if(Pn&&M.has(e))return M.get(e);if(t){var i=e;if(Pn){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||Zn(i))&&(a=mt(i)),M.set(i,a),a}var o=(i.f&512)==0&&!B&&z!==null&&(Nn||(z.f&512)!=0),c=(i.f&x)===0;Un(i)&&(o&&(i.f|=512),ht(i)),o&&!c&&(_t(i),Xn(i))}if(j?.has(e))return j.get(e);if(e.f&8388608)throw e.v;return e.v}function Xn(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(_t(t),Xn(t))}function Zn(e){if(e.v===t)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(M.has(t)||t.f&2&&Zn(t))return!0;return!1}function Qn(e){var t=B;try{return B=!0,e()}finally{B=t}}var $n=Symbol(`events`),er=new Set,tr=new Set;function nr(e,t,n){(t[$n]??={})[e]=n}function rr(e){for(var t=0;t<e.length;t++)er.add(e[t]);for(var n of tr)n(e)}var ir=null,ar=!1;function or(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;ir=e,ar||(ar=!0,setTimeout(()=>{ar=!1,ir=null}));var o=0,s=ir===e&&e[$n];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[$n]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){u(e,`currentTarget`,{configurable:!0,get(){return a||n}});var d=z,f=H;V(null),U(null);try{for(var p,m=[];a!==null&&a!==t;){try{var h=a[$n]?.[r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;o++,a=o<i.length?i[o]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[$n]=t,delete e.currentTarget,V(d),U(f)}}}var sr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function cr(e){return sr?.createHTML(e)??e}function lr(e){var t=an(`template`);return t.innerHTML=cr(e.replaceAll(`<!>`,`<!---->`)),t.content}function Y(e,t){var n=H;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function ur(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(w)return Y(T,null),T;i===void 0&&(i=lr(a?e:`<!>`+e),n||(i=F(i)));var t=r||qt?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=F(t),s=t.lastChild;Y(o,s)}else Y(t,t);return t}}function dr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(w)return Y(T,null),T;if(!o){var e=F(lr(a));if(i)for(o=document.createDocumentFragment();F(e);)o.appendChild(F(e));else o=F(e)}var t=o.cloneNode(!0);if(i){var n=F(t),r=t.lastChild;Y(n,r)}else Y(t,t);return t}}function fr(e,t){return dr(e,t,`svg`)}function pr(e,t){if(w){var n=H;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=T),we();return}e!==null&&e.before(t)}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var mr=[`touchstart`,`touchmove`];function hr(e){return mr.includes(e)}function gr(e){let t=0,n=zt(0),r;return()=>{un()&&(J(n),vn(()=>(t===0&&(r=Qn(()=>e(()=>Ut(n)))),t+=1,()=>{Xe(()=>{--t,t===0&&(r?.(),r=void 0,Ut(n))})})))}}var _r=ie|ae;function vr(e,t,n,r){new yr(e,t,n,r)}var yr=class{parent;is_pending=!1;transform_error;#e;#t=w?T:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=gr(()=>(this.#m=zt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=H;t.b=this,t.f|=128,n(e)},this.parent=H.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=bn(()=>{if(w){let e=this.#t;we();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#y():this.#g()}else this.#b()},_r),w&&(this.#e=T)}#g(){try{this.#a=xn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);Xe(r),t&&(this.#s=xn(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{if(t){Se();return}t=!0,n&&He(),this.#s!==null&&Dn(this.#s,()=>{this.#s=null}),this.#S(()=>{this.#b()})};return{reset:r,invoke_onerror:()=>{try{n=!0,this.#n.onerror?.(e,r),n=!1}catch(e){I(e,this.#i&&this.#i.parent)}}}}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=xn(()=>e(this.#e)),Xe(()=>{var e=this.#c=document.createDocumentFragment(),t=Zt(),n=!1;if(e.append(t),this.#a=this.#S(()=>{try{return xn(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){I(e,this.#i.parent)}return null}}),this.#a===null){this.#c=null,n&&this.#x(A);return}this.#u===0&&(this.#e.before(e),this.#c=null,Dn(this.#o,()=>{this.#o=null}),this.#x(A))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=xn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();jn(this.#a,e);let t=this.#n.pending;this.#o=xn(()=>t(this.#e))}else this.#x(A)}catch(e){this.error(e)}}#x(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){tt(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#S(e){var t=H,n=z,r=D;U(this.#i),V(this.#i),Ue(this.#i.ctx);try{return Dt.ensure(),e()}finally{U(t),V(n),Ue(r)}}#C(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#C(e,t);return}this.#u+=e,this.#u===0&&(this.#x(t),this.#o&&Dn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#C(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,Xe(()=>{this.#d=!1,this.#m&&Vt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),J(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;A?.is_fork?(this.#a&&A.skip_effect(this.#a),this.#o&&A.skip_effect(this.#o),this.#s&&A.skip_effect(this.#s),A.oncommit(()=>{this.#w(e)})):this.#w(e)}#w(e){this.#a&&=(R(this.#a),null),this.#o&&=(R(this.#o),null),this.#s&&=(R(this.#s),null),w&&(E(this.#t),Ee(),E(De()));let t=this.#n.failed,n=e=>{let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&(this.#s=this.#S(()=>{try{return xn(()=>{var r=H;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return I(e,this.#i.parent),null}}))};Xe(()=>{var t;try{t=this.transform_error(e)}catch(e){I(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>I(e,this.#i&&this.#i.parent)):n(t)})}};function br(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[_e]??=e.nodeValue)&&(e[_e]=n,e.nodeValue=`${n}`)}function xr(e,t){return wr(e,t)}function Sr(t,n){Xt(),n.intro=n.intro??!1;let r=n.target,i=w,a=T;try{for(var o=F(r);o&&(o.nodeType!==8||o.data!==`[`);)o=Qt(o);if(!o)throw e;Ce(!0),E(o);let i=wr(t,{...n,anchor:o});return Ce(!1),i}catch(i){if(i instanceof Error&&i.message.split(`
|
|
2
2
|
`).some(e=>e.startsWith(`https://svelte.dev/e/`)))throw i;return i!==e&&console.warn(`Failed to hydrate: `,i),n.recover===!1&&Le(),Xt(),nn(r),Ce(!1),xr(t,n)}finally{Ce(i),E(a)}}var Cr=new Map;function wr(t,{target:n,anchor:r,props:i={},events:a,context:o,intro:s=!0,transformError:l}){Xt();var u=void 0,d=hn(()=>{var s=r??n.appendChild(Zt());vr(s,{pending:()=>{}},n=>{We({});var r=D;if(o&&(r.c=o),a&&(i.$$events=a),w&&Y(n,null),u=t(n,i)||Ke(),w&&(H.nodes.end=T,T===null||T.nodeType!==8||T.data!==`]`))throw xe(),e;Ge()},l);var d=new Set,f=e=>{for(var t=0;t<e.length;t++){var r=e[t];if(!d.has(r)){d.add(r);var i=hr(r);for(let e of[n,document]){var a=Cr.get(e);a===void 0&&(a=new Map,Cr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,or,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(c(er)),tr.add(f),()=>{for(var e of d)for(let r of[n,document]){var t=Cr.get(r),i=t.get(e);--i==0?(r.removeEventListener(e,or),t.delete(e),t.size===0&&Cr.delete(r)):t.set(e,i)}tr.delete(f),s!==r&&s.parentNode?.removeChild(s)}});return Tr.set(u,d),u}var Tr=new WeakMap;function Er(e,t){let n=Tr.get(e);return n?(Tr.delete(e),n(t)):Promise.resolve()}var Dr=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)kn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(kn(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(R(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();jn(r,t),t.append(Zt()),this.#n.set(e,{effect:r,fragment:t})}else R(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Dn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(R(n.effect),this.#n.delete(e))};ensure(e,t){var n=A,r=rn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=Zt();i.append(a),this.#n.set(e,{effect:xn(()=>t(a)),fragment:i})}else this.#t.set(e,xn(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else w&&(this.anchor=T),this.#a(n)}};function Or(e,t,n=!1){var r;w&&(r=T,we());var i=new Dr(e),a=n?ie:0;function o(e,t){if(w){var n=Oe(r);if(e!==parseInt(n.substring(1))){var a=De();E(a),i.anchor=a,Ce(!1),i.ensure(e,t),Ce(!0);return}}i.ensure(e,t)}bn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function kr(t,n,a=!1,o=!1,s=!1,c=!1){var l=t,u=``;if(a){var d=t;w&&(l=E(F(d)))}yn(()=>{var t=H;if(u===(u=n()??``)){w&&we();return}if(a&&!w){t.nodes=null,d.innerHTML=u,u!==``&&Y(F(d),d.lastChild);return}if(t.nodes!==null&&(Tn(t.nodes.start,t.nodes.end),t.nodes=null),u!==``){if(w){for(var c=T.data,f=we(),p=f;f!==null&&(f.nodeType!==8||f.data!==``);)p=f,f=Qt(f);if(f===null)throw xe(),e;Y(T,p),l=E(f);return}var m=an(o?`svg`:s?`math`:`template`,o?r:s?i:void 0);m.innerHTML=u;var h=o||s?m:m.content;if(Y(F(h),h.lastChild),o||s)for(;F(h);)l.before(F(h));else l.before(h)}})}function Ar(e,t){gn(()=>{e=H?.parent?.nodes?.start??e;var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=an(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}var jr=[...`
|
|
3
|
-
\r\f\xA0\v`];function Mr(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||jr.includes(r[o-1]))&&(s===r.length||jr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Nr(e,t,n,r,i,a){var o=e[he];if(w||o!==n||o===void 0){var s=Mr(n,r,a);(!w||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[he]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}var Pr=Symbol(`is custom element`),Fr=Symbol(`is html`),Ir=ye?`link`:`LINK`;function X(e,t,n,r){var i=Lr(e);w&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Ir)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[pe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&zr(e).has(t)?e[t]=n:e.setAttribute(t,n))}function Lr(e){return e[me]??={[Pr]:e.nodeName.includes(`-`),[Fr]:e.namespaceURI===n}}var Rr=new Map;function zr(e){var t=e.getAttribute(`is`)||e.nodeName,n=Rr.get(t);if(n)return n;Rr.set(t,n=new Set);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=f(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.add(o);i=h(i)}return n}function Br(e,t){return e===t||e?.[de]===t}function Vr(e=Ke(),t,n,r){var i=D.r,a=H;return gn(()=>{var o,s;return vn(()=>{o=s,s=r?.()||[],Qn(()=>{Br(n(...s),e)||(t(e,...s),o&&Br(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&Br(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function Hr(e,t,n,r){var i=!0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=void 0,u=()=>o&&i?(l??=lt(r),J(l)):(c&&(c=!1,s=o?Qn(r):r),s);let f;if(a){var p=de in e||fe in e;f=d(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=rt(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=u(),f&&(i&&Re(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?u():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return g;if(f){var ee=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||ee||h)&&f(t?g():e),e):g()})}var _=!1,v=(n&1?lt:ft)(()=>(_=!1,g()));a&&J(v);var y=H;return(function(e,t){if(arguments.length>0){let n=t?J(v):i&&a?Gt(e):e;return P(v,n),_=!0,s!==void 0&&(s=n),e}return Pn&&_||y.f&16384?v.v:J(v)})}function Ur(e){return new Wr(e)}var Wr=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=Bt(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return J(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===fe?!0:(J(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return P(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?Sr:xr)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),(!e?.props?.$$host||e.sync===!1)&&Ot(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||u(this,e,{get(){return this.#t[e]},set(t){this.#t[e]=t},enumerable:!0});this.#t.$set=e=>{Object.assign(r,e)},this.#t.$destroy=()=>{Er(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];let n=(...e)=>t.call(this,...e);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(e=>e!==n)}}$destroy(){this.#t.$destroy()}},Gr;typeof HTMLElement==`function`&&(Gr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){let e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn||this.$$c)return;function e(e){return t=>{let n=an(`slot`);e!=="default"&&(n.name=e),pr(t,n)}}let t={},n=qr(this);for(let r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(let e of this.attributes){let t=this.$$g_p(e.name);t in this.$$d||(this.$$d[t]=Kr(t,e.value,this.$$p_d,`toProp`))}for(let e in this.$$p_d)!(e in this.$$d)&&this[e]!==void 0&&(this.$$d[e]=this[e],delete this[e]);this.$$c=Ur({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=mn(()=>{vn(()=>{this.$$r=!0;for(let e of l(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];let t=Kr(e,this.$$d[e],this.$$p_d,`toAttribute`);t==null?this.removeAttribute(this.$$p_d[e].attribute||e):this.setAttribute(this.$$p_d[e].attribute||e,t)}this.$$r=!1})});for(let e in this.$$l)for(let t of this.$$l[e]){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Kr(e,n,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 l(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Kr(e,t,n,r){let i=n[e]?.type;if(t=i===`Boolean`&&typeof t!=`boolean`?t!=null:t,!r||!n[e])return t;if(r===`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 qr(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function Jr(e,t,n,r,i,a){let o=class extends Gr{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return l(t).map(e=>(t[e].attribute||e).toLowerCase())}};return l(t).forEach(e=>{u(o.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=Kr(e,n,t),this.$$d[e]=n;var r=this.$$c;r&&(d(r,e)?.get?r[e]=n:r.$set({[e]:n}))}})}),r.forEach(e=>{u(o.prototype,e,{get(){return this.$$c?.[e]}})}),a&&(o=a(o)),e.element=o,o}var Yr=class e extends CustomEvent{static{this.TYPE=`model-set`}constructor(t,n,r){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t,hasModel:r}}),this.component=t,this.complete=n}},Xr=class e extends CustomEvent{static{this.TYPE=`session-changed`}constructor(t,n){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t}}),this.component=t,this.complete=n}},Zr=e=>{let t=e;return t?typeof t.onSessionChange==`function`||typeof t.onAudioStarted==`function`||typeof t.onAudioEnded==`function`:!1};function Qr(e){if(e.parentElement)return e.parentElement;let t=e.getRootNode();return t instanceof ShadowRoot?t.host:null}function $r(e,t={}){let n=t.hostPredicate??Zr,r=e;for(;r;){if(n(r))return r;r=Qr(r)}return null}function ei(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function ti(e,t){if(e===t)return e;if(!ei(e)||!ei(t)||Object.isFrozen(e)||!Object.isExtensible(e))return t;try{for(let n of Object.keys(e))n in t||delete e[n];Object.assign(e,t)}catch{return t}return e}var ni={},ri=new WeakSet;function ii(e){let t=e??ni;if(ri.has(t))return;ri.add(t);let n=e?`above <${e.tagName.toLowerCase()}>`:`for an update with no source element`;console.warn(`[session-bridge] no delivery host ${n}; the session change was not forwarded to the player`)}function ai({sourceEl:e,complete:t,session:n}){let r=$r(e);if(!r)return ii(e),null;if(typeof r.onSessionChange==`function`)return r.onSessionChange(n),r;let i=ti(r.session,n);return i!==r.session&&(r.session=i),r.dispatchEvent(new Xr(r.tagName.toLowerCase(),t)),r}var oi=null;function si(e){return typeof window>`u`||window.MathJax?.typesetPromise?Promise.resolve():oi||(oi=new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s={loader:{load:i?[`a11y/assistive-mml`]:[]},tex:{packages:[`base`,`ams`,`autoload`],macros:{parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`}},options:{enableMenu:i,enableExplorer:i,enableAssistiveMml:i},startup:{ready:()=>{window.MathJax?.startup.defaultReady&&(window.MathJax.startup.defaultReady(),t())},defaultReady:()=>{}}};r&&s.tex&&(s.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],s.tex.processEscapes=!0),a||(s.chtml={fontURL:``}),window.MathJax=s;let c=document.createElement(`script`);c.src=o||`https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js`,c.async=!0,c.onload=()=>{setTimeout(t,100)},c.onerror=()=>{n(Error(`Failed to load MathJax`))},document.head.appendChild(c)}),oi)}function ci(){let e=window.MathJax?.startup?.document;if(typeof e?.assistiveMml==`function`)try{e.assistiveMml().updateDocument?.()}catch(e){console.warn(`[mathjax-renderer] Failed to attach assistive MathML:`,e)}}function li(e={}){return async t=>{if(await si(e),!window.MathJax?.typesetPromise){console.warn(`[mathjax-renderer] MathJax not loaded or missing typesetPromise.`);return}await window.MathJax.typesetPromise([t]),ci()}}var ui=null;function di(){return ui||=li({accessibility:!0,useSingleDollar:!0}),ui}function fi(){if(typeof window>`u`)return null;let e=window[`@pie-lib/math-rendering`];return typeof e?.renderMath==`function`?e:null}var pi=async e=>{if(typeof window>`u`)return;let t=typeof e==`string`,n;t?(n=document.createElement(`div`),n.innerHTML=e):n=e||document.body;let r=fi();return r?await r.renderMath?.(n):await di()(n),t?n.innerHTML:void 0},mi={translation:{categorize:{limitMaxChoicesPerCategory:`You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.`,maxChoicesPerCategoryRestriction:`To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].`},ebsr:{part:`Part {{index}}`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`},imageClozeAssociation:{reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`},drawingResponse:{fillColor:`Fill color`,outlineColor:`Outline color`,noFill:`No fill`,lightblue:`Light blue`,lightyellow:`Light yellow`,red:`Red`,orange:`Orange`,yellow:`Yellow`,violet:`Violet`,blue:`Blue`,green:`Green`,white:`White`,black:`Black`,onDoubleClick:`Double click to edit this text. Press Enter to submit.`},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`}},graphing:{point:`Point`,circle:`Circle`,line:`Line`,parabola:`Parabola`,absolute:`Absolute Value`,exponential:`Exponential`,polygon:`Polygon`,ray:`Ray`,segment:`Segment`,sine:`Sine`,vector:`Vector`,label:`Label`,redo:`Redo`,reset:`Reset`},mathInline:{primaryCorrectWithAlternates:`Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.`},mcPopulatedBlank:{answerChoices:`Answer choices`,blankLabel:`blank`,emptyBlank:`(blank)`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,correctAnswerSelected:`Correct answer selected`,incorrectAnswerSelected:`Incorrect answer selected`,selectedAnswerImage:`Selected answer image`,choiceImage:`Choice {{id}}`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,listen:`Listen`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,printAudio:`Audio:`,printTranscript:`Transcript:`,printKey:`(key)`},multipleChoice:{minSelections:`Select at least {{minSelections}}.`,maxSelections_one:`Only {{maxSelections}} answer is allowed.`,maxSelections_other:`Only {{maxSelections}} answers are allowed.`,minmaxSelections_equal:`Select {{minSelections}}.`,minmaxSelections_range:`Select between {{minSelections}} and {{maxSelections}}.`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`},simpleCloze:{correctAnswerShown:`Correct answer`,correct:`Correct`,incorrect:`Incorrect`,unanswered:`No answer`,placeholder:`Enter your answer...`,answerInput:`Your answer`,printCorrectAnswer:`Correct answer:`,printAnswerBlank:`Answer blank`},vennClassification:{tray:`Tiles to classify`,unknownTarget:`unknown`,cancelled:`Cancelled`,returnedToTray:`{{name}} returned to tray`,placedIn:`{{name}} placed in {{target}}`,pickedUp:`Picked up {{name}}`,pickedUpWithKeyboard:`Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.`,dropTarget:`Drop target: {{target}}`,unsupportedCircles_one:`This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.`,unsupportedCircles_other:`This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.`,setNumber:`Set {{number}}`,regionOnly:`{{set}} only`,regionNeither:`Neither {{first}} nor {{second}}`,regionNoneOf:`None of {{sets}}`,regionAndSeparator:` and `,tileFallbackName:`Tile`,tileNotPlaced:`not placed`,tileInRegion:`in {{region}}`,tileCorrect:`correct`,tileIncorrect:`incorrect`}},common:{undo:`Undo`,clearAll:`Clear all`,correct:`Correct`,incorrect:`Incorrect`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,showTeacherInstructions:`Show Teacher Instructions`,hideTeacherInstructions:`Hide Teacher Instructions`,commonCorrectAnswerWithAlternates:`Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.`,warning:`Warning`,showNote:`Show Note`,hideNote:`Hide Note`,cancel:`Cancel`}},hi={translation:{categorize:{limitMaxChoicesPerCategory:`Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,maxChoicesPerCategoryRestriction:`Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta`},ebsr:{part:`Parte {{index}}`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`},imageClozeAssociation:{reachedLimit_one:`Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,reachedLimit_other:`Lleno`},drawingResponse:{fillColor:`Color de relleno`,outlineColor:`Color del contorno`,noFill:`Sin relleno`,lightblue:`Azul claro`,lightyellow:`Amarillo claro`,red:`Rojo`,orange:`Naranja`,yellow:`Amarillo`,violet:`Violeta`,blue:`Azul`,green:`Verde`,white:`Blanco`,black:`Negro`,onDoubleClick:`Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar`},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,reachedLimit_other:`No puede haber más de {{count}} categorías.`,keyLegend:{incorrectAnswer:`Respuesta incorrecta del estudiante`,correctAnswer:`Respuesta correcta del estudiante`,correctKeyAnswer:`Clave de respuesta correcta`}},graphing:{point:`Punto`,circle:`Circulo`,line:`Línea`,parabola:`Parábola`,absolute:`Valor absoluto`,exponential:`Exponencial`,polygon:`Polígono`,ray:`Semirrecta`,segment:`Segmento `,sine:`Seno`,vector:`Vector`,label:`Etiqueta`,redo:`Rehacer`,reset:`Reiniciar`},mathInline:{primaryCorrectWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.`},mcPopulatedBlank:{answerChoices:`Opciones de respuesta`,blankLabel:`espacio en blanco`,emptyBlank:`(en blanco)`,blankPreSelectionHint:`La respuesta que elijas aparecerá en la línea en blanco de arriba.`,correctAnswerSelected:`Respuesta correcta seleccionada`,incorrectAnswerSelected:`Respuesta incorrecta seleccionada`,selectedAnswerImage:`Imagen de la respuesta seleccionada`,choiceImage:`Opción {{id}}`,clickToEnableAutoplay:`Haz clic para activar la reproducción automática del audio`,audioResourceUnavailable:`El audio está activado, pero no hay una URL de audio reproducible configurada.`,listen:`Escuchar`,listenSilentAlt:`Escuchar. Repetir las instrucciones.`,listenPlayingAlt:`Escuchar. Estas son las instrucciones.`,printAudio:`Audio:`,printTranscript:`Transcripción:`,printKey:`(clave)`},multipleChoice:{minSelections:`Seleccione al menos {{minSelections}}.`,maxSelections_one:`Sólo se permite {{maxSelections}} respuesta.`,maxSelections_other:`Sólo se permiten {{maxSelections}} respuestas.`,minmaxSelections_equal:`Seleccione {{minSelections}}.`,minmaxSelections_range:`Seleccione entre {{minSelections}} y {{maxSelections}}.`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`},simpleCloze:{correctAnswerShown:`Respuesta correcta`,correct:`Correcto`,incorrect:`Incorrecto`,unanswered:`Sin respuesta`,placeholder:`Escribe tu respuesta...`,answerInput:`Tu respuesta`,printCorrectAnswer:`Respuesta correcta:`,printAnswerBlank:`Espacio para la respuesta`},vennClassification:{tray:`Fichas para clasificar`,unknownTarget:`desconocido`,cancelled:`Cancelado`,returnedToTray:`Se devolvió {{name}} a la bandeja`,placedIn:`Se colocó {{name}} en {{target}}`,pickedUp:`Se tomó {{name}}`,pickedUpWithKeyboard:`Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.`,dropTarget:`Destino: {{target}}`,unsupportedCircles_one:`No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.`,unsupportedCircles_other:`No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.`,setNumber:`Conjunto {{number}}`,regionOnly:`Solo {{set}}`,regionNeither:`Ni {{first}} ni {{second}}`,regionNoneOf:`Ninguno de {{sets}}`,regionAndSeparator:` y `,tileFallbackName:`Ficha`,tileNotPlaced:`sin colocar`,tileInRegion:`en {{region}}`,tileCorrect:`correcta`,tileIncorrect:`incorrecta`}},common:{undo:`Deshacer`,clearAll:`Borrar todo`,correct:`Correcto`,incorrect:`Incorrecto`,showCorrectAnswer:`Mostrar respuesta correcta`,hideCorrectAnswer:`Ocultar respuesta correcta`,showTeacherInstructions:`Mostrar instrucciones para el maestro`,hideTeacherInstructions:`Ocultar instrucciones para el maestro`,commonCorrectAnswerWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.`,warning:`Advertencia`,showNote:`Mostrar Nota`,hideNote:`Ocultar Nota`,cancel:`Cancelar`}},Z=e=>typeof e==`string`,gi=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},_i=e=>e==null?``:``+e,vi=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},yi=/###/g,bi=e=>e&&e.indexOf(`###`)>-1?e.replace(yi,`.`):e,xi=e=>!e||Z(e),Si=(e,t,n)=>{let r=Z(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(xi(e))return{};let t=bi(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return xi(e)?{}:{obj:e,k:bi(r[i])}},Ci=(e,t,n)=>{let{obj:r,k:i}=Si(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=Si(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Si(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},wi=(e,t,n,r)=>{let{obj:i,k:a}=Si(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Ti=(e,t)=>{let{obj:n,k:r}=Si(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Ei=(e,t,n)=>{let r=Ti(e,n);return r===void 0?Ti(t,n):r},Di=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?Z(e[r])||e[r]instanceof String||Z(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Di(e[r],t[r],n):e[r]=t[r]);return e},Oi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),ki={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},Ai=e=>Z(e)?e.replace(/[&<>"'\/]/g,e=>ki[e]):e,ji=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},Mi=[` `,`,`,`?`,`!`,`;`],Ni=new ji(20),Pi=(e,t,n)=>{t||=``,n||=``;let r=Mi.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=Ni.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},Fi=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].indexOf(typeof t)>-1&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},Ii=e=>e?.replace(/_/g,`-`),Li={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Q=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Li,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(Z(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Ri=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}},zi=class extends Ri{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):Z(n)&&i?o.push(...n.split(i)):o.push(n)));let s=Ti(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!Z(n)?s:Fi(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),Ci(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(Z(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=Ti(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Di(s,n,i):s={...s,...n},Ci(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Bi={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Vi=Symbol(`i18next/PATH_KEY`);function Hi(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Vi?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Ui(e,t){let{[Vi]:n}=e(Hi()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var Wi={},Gi=e=>!Z(e)&&typeof e!=`boolean`&&typeof e!=`number`,Ki=class e extends Ri{constructor(e,t={}){super(),vi([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Q.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=Gi(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Pi(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Z(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:Z(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Ui(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Ui(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,ee=[`[object Number]`,`[object Function]`,`[object RegExp]`],_=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,y=i.count!==void 0&&!Z(i.count),b=e.hasDefaultValue(i),te=y?this.pluralResolver.getSuffix(d,i.count,i):``,ne=i.ordinal&&y?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,re=y&&!i.ordinal&&i.count===0,x=re&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${te}`]||i[`defaultValue${ne}`]||i.defaultValue,S=m;v&&!m&&b&&(S=x);let ie=Gi(S),ae=Object.prototype.toString.apply(S);if(v&&S&&ie&&ee.indexOf(ae)<0&&!(Z(_)&&Array.isArray(S))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,S,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(S),t=e?[]:{},n=e?g:h;for(let e in S)if(Object.prototype.hasOwnProperty.call(S,e)){let r=`${n}${o}${e}`;b&&!m?t[e]=this.translate(r,{...i,defaultValue:Gi(x)?x[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=S[e])}m=t}}else if(v&&Z(_)&&Array.isArray(m))m=m.join(_),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&b&&(e=!0,m=x),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=b&&x!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?x:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=b&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&y?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);re&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||x)})}):n(e,s,x))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=Z(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!Z(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=Z(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Bi.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return Z(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Ui(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!Z(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(Z(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!Wi[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(Wi[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!Z(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},qi=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Q.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Ii(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=Ii(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Z(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),Z(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Z(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):Z(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},Ji={zero:0,one:1,two:2,few:3,many:4,other:5},Yi={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},Xi=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Q.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Ii(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),Yi;if(!e.match(/-|_/))return Yi;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Ji[e]-Ji[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Zi=(e,t,n,r=`.`,i=!0)=>{let a=Ei(e,t,n);return!a&&i&&Z(n)&&(a=Fi(e,n,r),a===void 0&&(a=Fi(t,n,r))),a},Qi=e=>e.replace(/\$/g,`$$$$`),$i=class{constructor(e={}){this.logger=Q.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:ee}=e.interpolation;this.escape=t===void 0?Ai:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?Oi(i):a||`{{`,this.suffix=o?Oi(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?Oi(d):f||Oi(`$t(`),this.nestingSuffix=p?Oi(p):m||Oi(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=ee!==void 0&&ee,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=Zi(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Zi(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Qi(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Qi(this.escape(e)):Qi(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=Z(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!Z(a)&&!this.useRawValueToEscape&&(a=_i(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${Oi(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!Z(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!Z(i))return i;Z(i)||(i=_i(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},ea=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},ta=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(Ii(r),i),t[o]=s),s(n)}},na=e=>(t,n,r)=>e(Ii(n),r)(t),ra=class{constructor(e={}){this.logger=Q.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?ta:na;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=ta(t)}format(e,t,n,r={}){let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=ea(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},ia=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},aa=class extends Ri{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Q.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{wi(n.loaded,[i],a),ia(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();Z(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Z(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},oa=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,simplifyPluralSuffix:!0,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),Z(e[1])&&(t.defaultValue=e[1]),Z(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),sa=e=>(Z(e.ns)&&(e.ns=[e.ns]),Z(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Z(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),ca=()=>{},la=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},ua=`__i18next_supportNoticeShown`,da=()=>!!(typeof globalThis<`u`&&globalThis[ua]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env&&process.env.NODE_ENV===`production`),fa=()=>{typeof globalThis<`u`&&(globalThis[ua]=!0)},pa=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),$=class e extends Ri{constructor(e={},t){if(super(),this.options=sa(e),this.services={},this.logger=Q,this.modules={external:[]},la(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(Z(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=oa();this.options={...n,...this.options,...sa(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!pa(this)&&!da()&&(typeof console<`u`&&console.info!==void 0&&console.info(`🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙`),fa());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Q.init(r(this.modules.logger),this.options):Q.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:ra;let t=new qi(this.options);this.store=new zi(this.options.resources,this.options);let i=this.services;i.logger=Q,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new Xi(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new $i(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new aa(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new Ki(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=ca,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=gi(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=ca){let n=t,r=Z(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=gi();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=ca,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Bi.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!([`cimode`,`dev`].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=gi();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=Z(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Z(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=Ui(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=Ui(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=Ui(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return Z(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=gi();return this.options.ns?(Z(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=gi();Z(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new qi(oa());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=ca){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new zi(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...oa().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new $i(n)}return a.translator=new Ki(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();$.createInstance,$.dir,$.init,$.loadResources,$.reloadResources,$.use,$.changeLanguage,$.getFixedT,$.t,$.exists,$.setDefaultNamespace,$.hasLoadedNamespace,$.loadNamespaces,$.loadLanguages,$.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:mi,es:hi}});var{translator:ma}={translator:{...$,t:(e,t)=>{let{lng:n}=t;switch(n){case`en_US`:case`en-US`:t.lng=`en`;break;case`es_ES`:case`es-ES`:case`es_MX`:case`es-MX`:t.lng=`es`;break;default:break}return $.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]};function ha(e,t){return ma.t(`translation:simpleCloze:${e}`,{lng:t})}function ga(e,t){return ma.t(`common:${e}`,{lng:t})}var _a=ur(`<div class="teacher-instructions pie-teacher-instructions svelte-1jhejbv"><button type="button" class="teacher-instructions-toggle pie-teacher-instructions-toggle svelte-1jhejbv"> </button> <div class="teacher-instructions-content pie-teacher-instructions-content svelte-1jhejbv"></div></div>`),va={hash:`svelte-1jhejbv`,code:`.teacher-instructions.svelte-1jhejbv {margin-bottom:1rem;}.teacher-instructions-toggle.svelte-1jhejbv {padding:0;border:0;border-bottom:1px dotted currentColor;background:transparent;font:inherit;color:var(--pie-primary, #3f51b5);cursor:pointer;}.teacher-instructions-toggle.svelte-1jhejbv:focus-visible {outline:2px solid var(--pie-button-focus-outline, #3b82f6);outline-offset:2px;}.teacher-instructions-content.svelte-1jhejbv {padding-top:1rem;}`};function ya(e,t){We(t,!0),Ar(e,va);let n=Hr(t,`html`,7),r=Hr(t,`language`,7),i=N(!1),a=`simple-cloze-teacher-instructions-${Math.random().toString(36).slice(2,10)}`;var o={get html(){return n()},set html(e){n(e),Ot()},get language(){return r()},set language(e){r(e),Ot()}},s=_a(),c=$t(s),l=en(c,!0),u=tn(c,2);return kr(u,n,!0),Te(u),Te(s),yn(e=>{X(c,`aria-expanded`,J(i)),X(c,`aria-controls`,a),br(l,e),X(u,`id`,a),X(u,`hidden`,!J(i))},[()=>ga(J(i)?`hideTeacherInstructions`:`showTeacherInstructions`,r())]),nr(`click`,c,()=>P(i,!J(i))),pr(e,s),Ge(o)}rr([`click`]),Jr(ya,{html:{},language:{}},[],[],{mode:`open`});var ba=ur(`<div class="simple-cloze-prompt svelte-1glps5n"></div>`),xa=fr(`<svg preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-283 359 34 35" focusable="false" class="svelte-1glps5n"><circle cx="-266" cy="375.9" r="14" fill="#bce2ff"></circle><path d="M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z" fill="#bce2ff"></path><polygon points="-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6" fill="#1a9cff"></polygon></svg>`),Sa=fr(`<svg preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-129.5 127 34 35" focusable="false" class="svelte-1glps5n"><path style="fill: #D0CAC5; stroke: #E6E3E0; stroke-width: 0.75; stroke-miterlimit: 10;" d="M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z"></path><path style="fill: #B3ABA4; stroke: #CDC7C2; stroke-width: 0.5; stroke-miterlimit: 10;" d="M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"></path><circle cx="-114.2" cy="143.5" r="14" fill="white"></circle><path d="M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z" fill="#bce2ff"></path><polygon points="-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2" fill="#1a9cff"></polygon></svg>`),Ca=ur(`<button type="button" class="simple-cloze-toggle svelte-1glps5n"><span class="simple-cloze-toggle-icon svelte-1glps5n" aria-hidden="true"><!></span> <span class="simple-cloze-toggle-label svelte-1glps5n"> </span></button>`),wa=ur(`<span class="correctness-icon correctness-icon--correct svelte-1glps5n" aria-hidden="true"><svg fill="currentColor" viewBox="0 0 24 24" focusable="false" class="svelte-1glps5n"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"></path></svg></span>`),Ta=ur(`<span class="correctness-icon correctness-icon--incorrect svelte-1glps5n" aria-hidden="true"><svg fill="currentColor" viewBox="0 0 24 24" focusable="false" class="svelte-1glps5n"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path></svg></span>`),Ea=ur(`<div class="simple-cloze-root svelte-1glps5n"><!> <!> <!> <div class="simple-cloze-response svelte-1glps5n"><!> <input type="text" spellcheck="false"/> <span class="sr-only svelte-1glps5n" role="status"> </span></div></div>`),Da={hash:`svelte-1glps5n`,code:`
|
|
3
|
+
\r\f\xA0\v`];function Mr(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||jr.includes(r[o-1]))&&(s===r.length||jr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Nr(e,t,n,r,i,a){var o=e[he];if(w||o!==n||o===void 0){var s=Mr(n,r,a);(!w||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[he]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}var Pr=Symbol(`is custom element`),Fr=Symbol(`is html`),Ir=ye?`link`:`LINK`;function X(e,t,n,r){var i=Lr(e);w&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Ir)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[pe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&zr(e).has(t)?e[t]=n:e.setAttribute(t,n))}function Lr(e){return e[me]??={[Pr]:e.nodeName.includes(`-`),[Fr]:e.namespaceURI===n}}var Rr=new Map;function zr(e){var t=e.getAttribute(`is`)||e.nodeName,n=Rr.get(t);if(n)return n;Rr.set(t,n=new Set);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=f(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.add(o);i=h(i)}return n}function Br(e,t){return e===t||e?.[de]===t}function Vr(e=Ke(),t,n,r){var i=D.r,a=H;return gn(()=>{var o,s;return vn(()=>{o=s,s=r?.()||[],Qn(()=>{Br(n(...s),e)||(t(e,...s),o&&Br(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&Br(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function Hr(e,t,n,r){var i=!0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=void 0,u=()=>o&&i?(l??=lt(r),J(l)):(c&&(c=!1,s=o?Qn(r):r),s);let f;if(a){var p=de in e||C in e;f=d(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=rt(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=u(),f&&(i&&Re(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?u():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return g;if(f){var ee=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||ee||h)&&f(t?g():e),e):g()})}var _=!1,v=(n&1?lt:ft)(()=>(_=!1,g()));a&&J(v);var y=H;return(function(e,t){if(arguments.length>0){let n=t?J(v):i&&a?Gt(e):e;return P(v,n),_=!0,s!==void 0&&(s=n),e}return Pn&&_||y.f&16384?v.v:J(v)})}function Ur(e){return new Wr(e)}var Wr=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=Bt(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return J(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===C?!0:(J(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return P(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?Sr:xr)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),(!e?.props?.$$host||e.sync===!1)&&Ot(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||u(this,e,{get(){return this.#t[e]},set(t){this.#t[e]=t},enumerable:!0});this.#t.$set=e=>{Object.assign(r,e)},this.#t.$destroy=()=>{Er(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];let n=(...e)=>t.call(this,...e);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(e=>e!==n)}}$destroy(){this.#t.$destroy()}},Gr;typeof HTMLElement==`function`&&(Gr=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){let e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn||this.$$c)return;function e(e){return t=>{let n=an(`slot`);e!=="default"&&(n.name=e),pr(t,n)}}let t={},n=qr(this);for(let r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(let e of this.attributes){let t=this.$$g_p(e.name);t in this.$$d||(this.$$d[t]=Kr(t,e.value,this.$$p_d,`toProp`))}for(let e in this.$$p_d)!(e in this.$$d)&&this[e]!==void 0&&(this.$$d[e]=this[e],delete this[e]);this.$$c=Ur({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=mn(()=>{vn(()=>{this.$$r=!0;for(let e of l(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];let t=Kr(e,this.$$d[e],this.$$p_d,`toAttribute`);t==null?this.removeAttribute(this.$$p_d[e].attribute||e):this.setAttribute(this.$$p_d[e].attribute||e,t)}this.$$r=!1})});for(let e in this.$$l)for(let t of this.$$l[e]){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Kr(e,n,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 l(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Kr(e,t,n,r){let i=n[e]?.type;if(t=i===`Boolean`&&typeof t!=`boolean`?t!=null:t,!r||!n[e])return t;if(r===`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 qr(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function Jr(e,t,n,r,i,a){let o=class extends Gr{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return l(t).map(e=>(t[e].attribute||e).toLowerCase())}};return l(t).forEach(e=>{u(o.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=Kr(e,n,t),this.$$d[e]=n;var r=this.$$c;r&&(d(r,e)?.get?r[e]=n:r.$set({[e]:n}))}})}),r.forEach(e=>{u(o.prototype,e,{get(){return this.$$c?.[e]}})}),a&&(o=a(o)),e.element=o,o}var Yr=null;function Xr(e){return typeof window>`u`||window.MathJax?.typesetPromise?Promise.resolve():Yr||(Yr=new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s={loader:{load:i?[`a11y/assistive-mml`]:[]},tex:{packages:[`base`,`ams`,`autoload`],macros:{parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`}},options:{enableMenu:i,enableExplorer:i,enableAssistiveMml:i},startup:{ready:()=>{window.MathJax?.startup.defaultReady&&(window.MathJax.startup.defaultReady(),t())},defaultReady:()=>{}}};r&&s.tex&&(s.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],s.tex.processEscapes=!0),a||(s.chtml={fontURL:``}),window.MathJax=s;let c=document.createElement(`script`);c.src=o||`https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js`,c.async=!0,c.onload=()=>{setTimeout(t,100)},c.onerror=()=>{n(Error(`Failed to load MathJax`))},document.head.appendChild(c)}),Yr)}function Zr(){let e=window.MathJax?.startup?.document;if(typeof e?.assistiveMml==`function`)try{e.assistiveMml().updateDocument?.()}catch(e){console.warn(`[mathjax-renderer] Failed to attach assistive MathML:`,e)}}function Qr(e={}){return async t=>{if(await Xr(e),!window.MathJax?.typesetPromise){console.warn(`[mathjax-renderer] MathJax not loaded or missing typesetPromise.`);return}await window.MathJax.typesetPromise([t]),Zr()}}var $r=null;function ei(){return $r||=Qr({accessibility:!0,useSingleDollar:!0}),$r}function ti(){if(typeof window>`u`)return null;let e=window[`@pie-lib/math-rendering`];return typeof e?.renderMath==`function`?e:null}var ni=async e=>{if(typeof window>`u`)return;let t=typeof e==`string`,n;t?(n=document.createElement(`div`),n.innerHTML=e):n=e||document.body;let r=ti();return r?await r.renderMath?.(n):await ei()(n),t?n.innerHTML:void 0},ri={translation:{categorize:{limitMaxChoicesPerCategory:`You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.`,maxChoicesPerCategoryRestriction:`To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].`},ebsr:{part:`Part {{index}}`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`},imageClozeAssociation:{reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`},drawingResponse:{fillColor:`Fill color`,outlineColor:`Outline color`,noFill:`No fill`,lightblue:`Light blue`,lightyellow:`Light yellow`,red:`Red`,orange:`Orange`,yellow:`Yellow`,violet:`Violet`,blue:`Blue`,green:`Green`,white:`White`,black:`Black`,onDoubleClick:`Double click to edit this text. Press Enter to submit.`},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`}},graphing:{point:`Point`,circle:`Circle`,line:`Line`,parabola:`Parabola`,absolute:`Absolute Value`,exponential:`Exponential`,polygon:`Polygon`,ray:`Ray`,segment:`Segment`,sine:`Sine`,vector:`Vector`,label:`Label`,redo:`Redo`,reset:`Reset`},mathInline:{primaryCorrectWithAlternates:`Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.`},mcPopulatedBlank:{answerChoices:`Answer choices`,blankLabel:`blank`,emptyBlank:`(blank)`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,correctAnswerSelected:`Correct answer selected`,incorrectAnswerSelected:`Incorrect answer selected`,selectedAnswerImage:`Selected answer image`,choiceImage:`Choice {{id}}`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,listen:`Listen`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,printAudio:`Audio:`,printTranscript:`Transcript:`},multipleChoice:{minSelections:`Select at least {{minSelections}}.`,maxSelections_one:`Only {{maxSelections}} answer is allowed.`,maxSelections_other:`Only {{maxSelections}} answers are allowed.`,minmaxSelections_equal:`Select {{minSelections}}.`,minmaxSelections_range:`Select between {{minSelections}} and {{maxSelections}}.`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`},simpleCloze:{correctAnswerShown:`Correct answer`,correct:`Correct`,incorrect:`Incorrect`,unanswered:`No answer`,placeholder:`Enter your answer...`,answerInput:`Your answer`,printCorrectAnswer:`Correct answer:`,printAnswerBlank:`Answer blank`},vennClassification:{tray:`Tiles to classify`,unknownTarget:`unknown`,cancelled:`Cancelled`,returnedToTray:`{{name}} returned to tray`,placedIn:`{{name}} placed in {{target}}`,pickedUp:`Picked up {{name}}`,pickedUpWithKeyboard:`Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.`,dropTarget:`Drop target: {{target}}`,unsupportedCircles_one:`This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.`,unsupportedCircles_other:`This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.`,setNumber:`Set {{number}}`,regionOnly:`{{set}} only`,regionNeither:`Neither {{first}} nor {{second}}`,regionNoneOf:`None of {{sets}}`,regionAndSeparator:` and `,tileFallbackName:`Tile`,tileNotPlaced:`not placed`,tileInRegion:`in {{region}}`,tileCorrect:`correct`,tileIncorrect:`incorrect`}},common:{undo:`Undo`,clearAll:`Clear all`,correct:`Correct`,incorrect:`Incorrect`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,showTeacherInstructions:`Show Teacher Instructions`,hideTeacherInstructions:`Hide Teacher Instructions`,commonCorrectAnswerWithAlternates:`Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.`,warning:`Warning`,showNote:`Show Note`,hideNote:`Hide Note`,cancel:`Cancel`}},ii={translation:{categorize:{limitMaxChoicesPerCategory:`Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,maxChoicesPerCategoryRestriction:`Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta`},ebsr:{part:`Parte {{index}}`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`},imageClozeAssociation:{reachedLimit_one:`Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,reachedLimit_other:`Lleno`},drawingResponse:{fillColor:`Color de relleno`,outlineColor:`Color del contorno`,noFill:`Sin relleno`,lightblue:`Azul claro`,lightyellow:`Amarillo claro`,red:`Rojo`,orange:`Naranja`,yellow:`Amarillo`,violet:`Violeta`,blue:`Azul`,green:`Verde`,white:`Blanco`,black:`Negro`,onDoubleClick:`Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar`},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,reachedLimit_other:`No puede haber más de {{count}} categorías.`,keyLegend:{incorrectAnswer:`Respuesta incorrecta del estudiante`,correctAnswer:`Respuesta correcta del estudiante`,correctKeyAnswer:`Clave de respuesta correcta`}},graphing:{point:`Punto`,circle:`Circulo`,line:`Línea`,parabola:`Parábola`,absolute:`Valor absoluto`,exponential:`Exponencial`,polygon:`Polígono`,ray:`Semirrecta`,segment:`Segmento `,sine:`Seno`,vector:`Vector`,label:`Etiqueta`,redo:`Rehacer`,reset:`Reiniciar`},mathInline:{primaryCorrectWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.`},mcPopulatedBlank:{answerChoices:`Opciones de respuesta`,blankLabel:`espacio en blanco`,emptyBlank:`(en blanco)`,blankPreSelectionHint:`La respuesta que elijas aparecerá en la línea en blanco de arriba.`,correctAnswerSelected:`Respuesta correcta seleccionada`,incorrectAnswerSelected:`Respuesta incorrecta seleccionada`,selectedAnswerImage:`Imagen de la respuesta seleccionada`,choiceImage:`Opción {{id}}`,clickToEnableAutoplay:`Haz clic para activar la reproducción automática del audio`,audioResourceUnavailable:`El audio está activado, pero no hay una URL de audio reproducible configurada.`,listen:`Escuchar`,listenSilentAlt:`Escuchar. Repetir las instrucciones.`,listenPlayingAlt:`Escuchar. Estas son las instrucciones.`,printAudio:`Audio:`,printTranscript:`Transcripción:`},multipleChoice:{minSelections:`Seleccione al menos {{minSelections}}.`,maxSelections_one:`Sólo se permite {{maxSelections}} respuesta.`,maxSelections_other:`Sólo se permiten {{maxSelections}} respuestas.`,minmaxSelections_equal:`Seleccione {{minSelections}}.`,minmaxSelections_range:`Seleccione entre {{minSelections}} y {{maxSelections}}.`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`},simpleCloze:{correctAnswerShown:`Respuesta correcta`,correct:`Correcto`,incorrect:`Incorrecto`,unanswered:`Sin respuesta`,placeholder:`Escribe tu respuesta...`,answerInput:`Tu respuesta`,printCorrectAnswer:`Respuesta correcta:`,printAnswerBlank:`Espacio para la respuesta`},vennClassification:{tray:`Fichas para clasificar`,unknownTarget:`desconocido`,cancelled:`Cancelado`,returnedToTray:`Se devolvió {{name}} a la bandeja`,placedIn:`Se colocó {{name}} en {{target}}`,pickedUp:`Se tomó {{name}}`,pickedUpWithKeyboard:`Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.`,dropTarget:`Destino: {{target}}`,unsupportedCircles_one:`No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.`,unsupportedCircles_other:`No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.`,setNumber:`Conjunto {{number}}`,regionOnly:`Solo {{set}}`,regionNeither:`Ni {{first}} ni {{second}}`,regionNoneOf:`Ninguno de {{sets}}`,regionAndSeparator:` y `,tileFallbackName:`Ficha`,tileNotPlaced:`sin colocar`,tileInRegion:`en {{region}}`,tileCorrect:`correcta`,tileIncorrect:`incorrecta`}},common:{undo:`Deshacer`,clearAll:`Borrar todo`,correct:`Correcto`,incorrect:`Incorrecto`,showCorrectAnswer:`Mostrar respuesta correcta`,hideCorrectAnswer:`Ocultar respuesta correcta`,showTeacherInstructions:`Mostrar instrucciones para el maestro`,hideTeacherInstructions:`Ocultar instrucciones para el maestro`,commonCorrectAnswerWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.`,warning:`Advertencia`,showNote:`Mostrar Nota`,hideNote:`Ocultar Nota`,cancel:`Cancelar`}},Z=e=>typeof e==`string`,ai=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},oi=e=>e==null?``:``+e,si=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},ci=/###/g,li=e=>e&&e.indexOf(`###`)>-1?e.replace(ci,`.`):e,ui=e=>!e||Z(e),di=(e,t,n)=>{let r=Z(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(ui(e))return{};let t=li(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return ui(e)?{}:{obj:e,k:li(r[i])}},fi=(e,t,n)=>{let{obj:r,k:i}=di(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=di(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=di(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},pi=(e,t,n,r)=>{let{obj:i,k:a}=di(e,t,Object);i[a]=i[a]||[],i[a].push(n)},mi=(e,t)=>{let{obj:n,k:r}=di(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},hi=(e,t,n)=>{let r=mi(e,n);return r===void 0?mi(t,n):r},gi=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?Z(e[r])||e[r]instanceof String||Z(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):gi(e[r],t[r],n):e[r]=t[r]);return e},_i=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),vi={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},yi=e=>Z(e)?e.replace(/[&<>"'\/]/g,e=>vi[e]):e,bi=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},xi=[` `,`,`,`?`,`!`,`;`],Si=new bi(20),Ci=(e,t,n)=>{t||=``,n||=``;let r=xi.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=Si.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},wi=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].indexOf(typeof t)>-1&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},Ti=e=>e?.replace(/_/g,`-`),Ei={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Q=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Ei,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(Z(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Di=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}},Oi=class extends Di{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):Z(n)&&i?o.push(...n.split(i)):o.push(n)));let s=mi(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!Z(n)?s:wi(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),fi(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(Z(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=mi(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?gi(s,n,i):s={...s,...n},fi(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},ki={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Ai=Symbol(`i18next/PATH_KEY`);function ji(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Ai?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Mi(e,t){let{[Ai]:n}=e(ji()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var Ni={},Pi=e=>!Z(e)&&typeof e!=`boolean`&&typeof e!=`number`,Fi=class e extends Di{constructor(e,t={}){super(),si([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Q.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=Pi(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ci(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Z(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:Z(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Mi(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Mi(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,ee=[`[object Number]`,`[object Function]`,`[object RegExp]`],_=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,y=i.count!==void 0&&!Z(i.count),b=e.hasDefaultValue(i),te=y?this.pluralResolver.getSuffix(d,i.count,i):``,ne=i.ordinal&&y?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,re=y&&!i.ordinal&&i.count===0,x=re&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${te}`]||i[`defaultValue${ne}`]||i.defaultValue,S=m;v&&!m&&b&&(S=x);let ie=Pi(S),ae=Object.prototype.toString.apply(S);if(v&&S&&ie&&ee.indexOf(ae)<0&&!(Z(_)&&Array.isArray(S))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,S,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(S),t=e?[]:{},n=e?g:h;for(let e in S)if(Object.prototype.hasOwnProperty.call(S,e)){let r=`${n}${o}${e}`;b&&!m?t[e]=this.translate(r,{...i,defaultValue:Pi(x)?x[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=S[e])}m=t}}else if(v&&Z(_)&&Array.isArray(m))m=m.join(_),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&b&&(e=!0,m=x),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=b&&x!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?x:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=b&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&y?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);re&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||x)})}):n(e,s,x))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=Z(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!Z(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=Z(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=ki.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return Z(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Mi(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!Z(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(Z(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!Ni[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(Ni[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!Z(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},Ii=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Q.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Ti(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=Ti(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Z(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),Z(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Z(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):Z(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},Li={zero:0,one:1,two:2,few:3,many:4,other:5},Ri={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},zi=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Q.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Ti(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),Ri;if(!e.match(/-|_/))return Ri;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Li[e]-Li[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Bi=(e,t,n,r=`.`,i=!0)=>{let a=hi(e,t,n);return!a&&i&&Z(n)&&(a=wi(e,n,r),a===void 0&&(a=wi(t,n,r))),a},Vi=e=>e.replace(/\$/g,`$$$$`),Hi=class{constructor(e={}){this.logger=Q.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:ee}=e.interpolation;this.escape=t===void 0?yi:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?_i(i):a||`{{`,this.suffix=o?_i(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?_i(d):f||_i(`$t(`),this.nestingSuffix=p?_i(p):m||_i(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=ee!==void 0&&ee,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=Bi(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Bi(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Vi(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Vi(this.escape(e)):Vi(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=Z(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!Z(a)&&!this.useRawValueToEscape&&(a=oi(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${_i(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!Z(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!Z(i))return i;Z(i)||(i=oi(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Ui=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Wi=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(Ti(r),i),t[o]=s),s(n)}},Gi=e=>(t,n,r)=>e(Ti(n),r)(t),Ki=class{constructor(e={}){this.logger=Q.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Wi:Gi;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Wi(t)}format(e,t,n,r={}){let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Ui(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},qi=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Ji=class extends Di{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Q.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{pi(n.loaded,[i],a),qi(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();Z(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Z(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},Yi=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,simplifyPluralSuffix:!0,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),Z(e[1])&&(t.defaultValue=e[1]),Z(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Xi=e=>(Z(e.ns)&&(e.ns=[e.ns]),Z(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Z(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),Zi=()=>{},Qi=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},$i=`__i18next_supportNoticeShown`,ea=()=>!!(typeof globalThis<`u`&&globalThis[$i]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env&&process.env.NODE_ENV===`production`),ta=()=>{typeof globalThis<`u`&&(globalThis[$i]=!0)},na=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),$=class e extends Di{constructor(e={},t){if(super(),this.options=Xi(e),this.services={},this.logger=Q,this.modules={external:[]},Qi(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(Z(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=Yi();this.options={...n,...this.options,...Xi(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!na(this)&&!ea()&&(typeof console<`u`&&console.info!==void 0&&console.info(`🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙`),ta());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Q.init(r(this.modules.logger),this.options):Q.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:Ki;let t=new Ii(this.options);this.store=new Oi(this.options.resources,this.options);let i=this.services;i.logger=Q,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new zi(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new Hi(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Ji(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new Fi(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=Zi,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=ai(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=Zi){let n=t,r=Z(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=ai();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=Zi,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&ki.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!([`cimode`,`dev`].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=ai();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=Z(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Z(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=Mi(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=Mi(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=Mi(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return Z(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=ai();return this.options.ns?(Z(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=ai();Z(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new Ii(Yi());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=Zi){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Oi(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...Yi().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new Hi(n)}return a.translator=new Fi(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();$.createInstance,$.dir,$.init,$.loadResources,$.reloadResources,$.use,$.changeLanguage,$.getFixedT,$.t,$.exists,$.setDefaultNamespace,$.hasLoadedNamespace,$.loadNamespaces,$.loadLanguages,$.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:ri,es:ii}});var{translator:ra}={translator:{...$,t:(e,t)=>{let{lng:n}=t;switch(n){case`en_US`:case`en-US`:t.lng=`en`;break;case`es_ES`:case`es-ES`:case`es_MX`:case`es-MX`:t.lng=`es`;break;default:break}return $.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]};function ia(e,t){return ra.t(`translation:simpleCloze:${e}`,{lng:t})}function aa(e,t){return ra.t(`common:${e}`,{lng:t})}var oa=ur(`<div class="teacher-instructions pie-teacher-instructions svelte-1jhejbv"><button type="button" class="teacher-instructions-toggle pie-teacher-instructions-toggle svelte-1jhejbv"> </button> <div class="teacher-instructions-content pie-teacher-instructions-content svelte-1jhejbv"></div></div>`),sa={hash:`svelte-1jhejbv`,code:`.teacher-instructions.svelte-1jhejbv {margin-bottom:1rem;}.teacher-instructions-toggle.svelte-1jhejbv {padding:0;border:0;border-bottom:1px dotted currentColor;background:transparent;font:inherit;color:var(--pie-primary, #3f51b5);cursor:pointer;}.teacher-instructions-toggle.svelte-1jhejbv:focus-visible {outline:2px solid var(--pie-button-focus-outline, #3b82f6);outline-offset:2px;}.teacher-instructions-content.svelte-1jhejbv {padding-top:1rem;}`};function ca(e,t){We(t,!0),Ar(e,sa);let n=Hr(t,`html`,7),r=Hr(t,`language`,7),i=N(!1),a=`simple-cloze-teacher-instructions-${Math.random().toString(36).slice(2,10)}`;var o={get html(){return n()},set html(e){n(e),Ot()},get language(){return r()},set language(e){r(e),Ot()}},s=oa(),c=$t(s),l=en(c,!0),u=tn(c,2);return kr(u,n,!0),Te(u),Te(s),yn(e=>{X(c,`aria-expanded`,J(i)),X(c,`aria-controls`,a),br(l,e),X(u,`id`,a),X(u,`hidden`,!J(i))},[()=>aa(J(i)?`hideTeacherInstructions`:`showTeacherInstructions`,r())]),nr(`click`,c,()=>P(i,!J(i))),pr(e,s),Ge(o)}rr([`click`]),Jr(ca,{html:{},language:{}},[],[],{mode:`open`});var la=ur(`<div class="simple-cloze-prompt svelte-1glps5n"></div>`),ua=fr(`<svg preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-283 359 34 35" focusable="false" class="svelte-1glps5n"><circle cx="-266" cy="375.9" r="14" fill="#bce2ff"></circle><path d="M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z" fill="#bce2ff"></path><polygon points="-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6" fill="#1a9cff"></polygon></svg>`),da=fr(`<svg preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-129.5 127 34 35" focusable="false" class="svelte-1glps5n"><path style="fill: #D0CAC5; stroke: #E6E3E0; stroke-width: 0.75; stroke-miterlimit: 10;" d="M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z"></path><path style="fill: #B3ABA4; stroke: #CDC7C2; stroke-width: 0.5; stroke-miterlimit: 10;" d="M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"></path><circle cx="-114.2" cy="143.5" r="14" fill="white"></circle><path d="M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z" fill="#bce2ff"></path><polygon points="-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2" fill="#1a9cff"></polygon></svg>`),fa=ur(`<button type="button" class="simple-cloze-toggle svelte-1glps5n"><span class="simple-cloze-toggle-icon svelte-1glps5n" aria-hidden="true"><!></span> <span class="simple-cloze-toggle-label svelte-1glps5n"> </span></button>`),pa=ur(`<span class="correctness-icon correctness-icon--correct svelte-1glps5n" aria-hidden="true"><svg fill="currentColor" viewBox="0 0 24 24" focusable="false" class="svelte-1glps5n"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"></path></svg></span>`),ma=ur(`<span class="correctness-icon correctness-icon--incorrect svelte-1glps5n" aria-hidden="true"><svg fill="currentColor" viewBox="0 0 24 24" focusable="false" class="svelte-1glps5n"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path></svg></span>`),ha=ur(`<div class="simple-cloze-root svelte-1glps5n"><!> <!> <!> <div class="simple-cloze-response svelte-1glps5n"><!> <input type="text" spellcheck="false"/> <span class="sr-only svelte-1glps5n" role="status"> </span></div></div>`),ga={hash:`svelte-1glps5n`,code:`
|
|
4
4
|
/*
|
|
5
5
|
* Self-contained: players ship no Tailwind, so nothing here relies on host
|
|
6
6
|
* utility classes or a CSS reset. Colours are \`--pie-*\` theme variables with
|
|
7
7
|
* the fallbacks \`@pie-lib/render-ui\`'s \`color\` module uses.
|
|
8
8
|
*/.simple-cloze-root.svelte-1glps5n {padding:1rem;color:var(--pie-text, black);}.simple-cloze-prompt.svelte-1glps5n {margin-bottom:1rem;}.simple-cloze-prompt.svelte-1glps5n p {margin:0.5em 0;}.simple-cloze-prompt.svelte-1glps5n strong {font-weight:600;}.simple-cloze-toggle.svelte-1glps5n {display:flex;align-items:center;gap:0.5rem;margin:0 0 0.75rem;padding:0;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;user-select:none;}.simple-cloze-toggle.svelte-1glps5n:hover .simple-cloze-toggle-label:where(.svelte-1glps5n) {text-decoration:underline;}.simple-cloze-toggle.svelte-1glps5n:focus-visible {outline:2px solid var(--pie-button-focus-outline, #3b82f6);outline-offset:2px;}.simple-cloze-toggle-icon.svelte-1glps5n {display:inline-flex;}.simple-cloze-toggle-icon.svelte-1glps5n svg:where(.svelte-1glps5n) {width:25px;height:25px;}.simple-cloze-toggle-label.svelte-1glps5n {font-size:0.875rem;line-height:1.25rem;}.simple-cloze-response.svelte-1glps5n {position:relative;display:inline-block;}.simple-cloze-input.svelte-1glps5n {box-sizing:border-box;margin:0;padding:0.5rem 0.75rem;
|
|
9
|
-
/* The text colour, as ECR's input border: a light grey fails 3:1 (WCAG 1.4.11). */border:1px solid var(--pie-text, black);border-radius:0.25rem;background-color:transparent;color:var(--pie-text, black);font:inherit;}.simple-cloze-input.svelte-1glps5n:disabled {opacity:1;color:var(--pie-text, black);-webkit-text-fill-color:currentColor;}.simple-cloze-input.svelte-1glps5n:focus-visible {outline:2px solid var(--pie-button-focus-outline, #3b82f6);outline-offset:2px;}.simple-cloze-input--correct.svelte-1glps5n {border:2px solid var(--pie-correct-tertiary, #0ea449);}.simple-cloze-input--incorrect.svelte-1glps5n {border:2px solid var(--pie-incorrect-icon, #bf0d00);}.simple-cloze-input[readonly].svelte-1glps5n {font-weight:600;}.correctness-icon.svelte-1glps5n {position:absolute;top:-8px;left:-8px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;padding:2px;color:var(--pie-white, #ffffff);}.correctness-icon.svelte-1glps5n svg:where(.svelte-1glps5n) {width:12px;height:12px;}.correctness-icon--correct.svelte-1glps5n {background-color:var(--pie-correct-tertiary, #0ea449);}.correctness-icon--incorrect.svelte-1glps5n {background-color:var(--pie-incorrect-icon, #bf0d00);}.sr-only.svelte-1glps5n {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}`};function
|
|
9
|
+
/* The text colour, as ECR's input border: a light grey fails 3:1 (WCAG 1.4.11). */border:1px solid var(--pie-text, black);border-radius:0.25rem;background-color:transparent;color:var(--pie-text, black);font:inherit;}.simple-cloze-input.svelte-1glps5n:disabled {opacity:1;color:var(--pie-text, black);-webkit-text-fill-color:currentColor;}.simple-cloze-input.svelte-1glps5n:focus-visible {outline:2px solid var(--pie-button-focus-outline, #3b82f6);outline-offset:2px;}.simple-cloze-input--correct.svelte-1glps5n {border:2px solid var(--pie-correct-tertiary, #0ea449);}.simple-cloze-input--incorrect.svelte-1glps5n {border:2px solid var(--pie-incorrect-icon, #bf0d00);}.simple-cloze-input[readonly].svelte-1glps5n {font-weight:600;}.correctness-icon.svelte-1glps5n {position:absolute;top:-8px;left:-8px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;padding:2px;color:var(--pie-white, #ffffff);}.correctness-icon.svelte-1glps5n svg:where(.svelte-1glps5n) {width:12px;height:12px;}.correctness-icon--correct.svelte-1glps5n {background-color:var(--pie-correct-tertiary, #0ea449);}.correctness-icon--incorrect.svelte-1glps5n {background-color:var(--pie-incorrect-icon, #bf0d00);}.sr-only.svelte-1glps5n {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}`};function _a(e,t){We(t,!0),Ar(e,ga);let n=Hr(t,`model`,7,null),r=Hr(t,`session`,7,null),i=Hr(t,`onSessionChange`,7),a=`simple-cloze-${Math.random().toString(36).slice(2,10)}`,o=`${a}-prompt`,s=`${a}-feedback`,c=N(null),l=N(null),u=N(!1),d=k(()=>n()?.mode===`evaluate`),f=k(()=>n()?.correctness),p=k(()=>J(f)===`correct`),m=k(()=>J(f)===`incorrect`),h=k(()=>J(f)===`unanswered`),g=k(()=>typeof n()?.prompt==`string`?n().prompt:``),ee=k(()=>typeof n()?.correctAnswer==`string`?n().correctAnswer:``),_=k(()=>typeof r()?.value==`string`?r().value:``),v=k(()=>J(d)&&!J(p)&&!!J(ee).trim()),y=k(()=>J(u)&&J(v)),b=k(()=>J(d)?J(y)?ia(`correctAnswerShown`,n()?.language):J(p)?ia(`correct`,n()?.language):J(m)?ia(`incorrect`,n()?.language):J(h)?ia(`unanswered`,n()?.language):``:``);fn(()=>{J(v)||P(u,!1)}),fn(()=>{if(!J(l))return;let e=J(y)?J(ee):J(_);J(l).value!==e&&(J(l).value=e)}),fn(()=>{if(!J(c)||!J(g))return;let e=e=>console.warn(`simple-cloze: MathJax render failed`,e);try{Promise.resolve(ni(J(c))).catch(e)}catch(t){e(t)}});function te(e){let t=e.target.value;i()?.({...r(),value:t})}function ne(){J(v)&&P(u,!J(u))}var re={get model(){return n()},set model(e=null){n(e),Ot()},get session(){return r()},set session(e=null){r(e),Ot()},get onSessionChange(){return i()},set onSessionChange(e){i(e),Ot()}},x=ha(),S=$t(x),ie=e=>{{let t=k(()=>n()?.language);ca(e,{get html(){return n().teacherInstructions},get language(){return J(t)}})}};Or(S,e=>{n()?.teacherInstructions&&e(ie)});var ae=tn(S,2),oe=e=>{var t=la();kr(t,()=>J(g),!0),Te(t),Vr(t,e=>P(c,e),()=>J(c)),yn(()=>X(t,`id`,o)),pr(e,t)};Or(ae,e=>{J(g)&&e(oe)});var se=tn(ae,2),ce=e=>{var t=fa(),r=$t(t),i=$t(r),a=e=>{pr(e,ua())},o=e=>{pr(e,da())};Or(i,e=>{J(y)?e(a):e(o,-1)}),Te(r);var s=en(tn(r,2),!0);Te(t),yn(e=>{X(t,`aria-pressed`,J(y)),br(s,e)},[()=>aa(J(y)?`hideCorrectAnswer`:`showCorrectAnswer`,n()?.language)]),nr(`click`,t,ne),pr(e,t)};Or(se,e=>{J(v)&&e(ce)});var le=tn(se,2),ue=$t(le),de=e=>{pr(e,pa())},fe=e=>{pr(e,ma())};Or(ue,e=>{J(d)&&(J(p)||J(y))?e(de):J(d)&&J(m)&&e(fe,1)});var C=tn(ue,2);let pe;Vr(C,e=>P(l,e),()=>J(l));var me=tn(C,2),he=en(me,!0);return Te(le),Te(x),yn((e,t)=>{pe=Nr(C,1,`simple-cloze-input svelte-1glps5n`,null,pe,{"simple-cloze-input--correct":J(d)&&(J(p)||J(y)),"simple-cloze-input--incorrect":J(d)&&J(m)&&!J(y)}),X(C,`placeholder`,e),X(C,`aria-labelledby`,J(g)?o:void 0),X(C,`aria-label`,t),X(C,`aria-describedby`,J(b)?s:void 0),C.disabled=n()?.disabled,C.readOnly=J(y),X(me,`id`,s),br(he,J(b))},[()=>ia(`placeholder`,n()?.language),()=>J(g)?void 0:ia(`answerInput`,n()?.language)]),nr(`input`,C,te),pr(e,x),Ge(re)}rr([`click`,`input`]),Jr(_a,{model:{type:`Object`},session:{type:`Object`},onSessionChange:{}},[],[]);function va(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function ya(e,t){if(e===t)return e;if(!va(e)||!va(t)||Object.isFrozen(e)||!Object.isExtensible(e))return t;try{for(let n of Object.keys(e))n in t||delete e[n];Object.assign(e,t)}catch{return t}return e}var ba=class e extends CustomEvent{static{this.TYPE=`model-set`}constructor(t,n,r){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t,hasModel:r}}),this.component=t,this.complete=n}},xa=class e extends CustomEvent{static{this.TYPE=`session-changed`}constructor(t,n){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t}}),this.component=t,this.complete=n}};function Sa(e,t){let n=e.element;if(!n)throw TypeError("defineDeliveryElement: the component was not compiled with `customElement`");class r extends n{#e;#t;constructor(){super(),this.onSessionChange=e=>{this.writeSession(e),this.dispatchSessionChanged()}}set model(e){this.#e=e,super.model=e,queueMicrotask(()=>{this.dispatchEvent(new ba(this.tagName.toLowerCase(),this.isComplete(),this.#e!==void 0))})}get model(){return this.#e}set session(e){this.#t=e,super.session=e,this.dispatchSessionChanged()}get session(){return this.#t}isComplete(){return t.isComplete(this.#e,this.#t)}writeSession(e){this.#t=ya(this.#t,e),super.session=e}dispatchSessionChanged(){this.dispatchEvent(new xa(this.tagName.toLowerCase(),this.isComplete()))}}return r}return Sa(_a,{isComplete:(e,t)=>typeof t?.value==`string`&&t.value.trim().length>0})})();
|