@pie-element/mc-populated-blank 0.2.13 → 0.3.0-next.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -6
- package/author.js +2 -0
- package/configure.js +2 -0
- package/dist/author/defaults.d.ts +74 -0
- package/dist/author/index.d.ts +0 -1
- package/dist/author/index.js +1732 -1553
- package/dist/author/index.js.map +1 -1
- package/dist/browser/McPopulatedBlank-DbmR6UWn.js +2542 -0
- package/dist/browser/McPopulatedBlank-DbmR6UWn.js.map +1 -0
- package/dist/browser/author/index.js +41 -0
- package/dist/browser/author/index.js.map +1 -0
- package/dist/browser/client-CWh3mUUV.js +2385 -0
- package/dist/browser/client-CWh3mUUV.js.map +1 -0
- package/dist/browser/controller/index.js +2 -0
- package/dist/browser/controller-D_ITRCYG.js +209 -0
- package/dist/browser/controller-D_ITRCYG.js.map +1 -0
- package/dist/browser/delivery/index.js +124 -0
- package/dist/browser/delivery/index.js.map +1 -0
- package/dist/browser/layoutLimits-Bp17YP2V.js +42 -0
- package/dist/browser/layoutLimits-Bp17YP2V.js.map +1 -0
- package/dist/browser/print/index.js +129 -0
- package/dist/browser/print/index.js.map +1 -0
- package/dist/controller/defaults.d.ts +8 -30
- package/dist/controller/index.d.ts +79 -63
- package/dist/controller/index.js +108 -85
- package/dist/controller/index.js.map +1 -1
- package/dist/delivery/computeAudioMode.d.ts +0 -1
- package/dist/delivery/computeChoiceCorrectness.d.ts +0 -1
- package/dist/delivery/computeDisplayState.d.ts +7 -8
- package/dist/delivery/computeLayoutProfile.d.ts +0 -1
- package/dist/delivery/computeLayoutStyle.d.ts +0 -2
- package/dist/delivery/i18n.d.ts +8 -0
- package/dist/delivery/index.d.ts +8 -17
- package/dist/delivery/index.js +6138 -3662
- package/dist/delivery/index.js.map +1 -1
- package/dist/delivery/variant-css-map.d.ts +15 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.iife.d.ts +0 -156
- package/dist/index.iife.js +139 -38
- package/dist/index.js +2 -6811
- package/dist/print/index.d.ts +4 -1
- package/dist/print/index.js +8158 -3655
- package/dist/print/index.js.map +1 -1
- package/dist/print/preparePrint.d.ts +15 -0
- package/dist/runtime-support.d.ts +12 -0
- package/dist/runtime-support.js +14 -0
- package/dist/runtime-support.js.map +1 -0
- package/dist/shared/layoutLimits.d.ts +1 -2
- package/dist/shared/types.d.ts +21 -19
- package/module/print.js +5192 -0
- package/module/print.js.map +1 -0
- package/package.json +42 -14
- package/print.js +2 -0
- package/dist/author/index.d.ts.map +0 -1
- package/dist/controller/defaults.d.ts.map +0 -1
- package/dist/controller/index.d.ts.map +0 -1
- package/dist/delivery/computeAudioMode.d.ts.map +0 -1
- package/dist/delivery/computeChoiceCorrectness.d.ts.map +0 -1
- package/dist/delivery/computeDisplayState.d.ts.map +0 -1
- package/dist/delivery/computeLayoutProfile.d.ts.map +0 -1
- package/dist/delivery/computeLayoutStyle.d.ts.map +0 -1
- package/dist/delivery/index.d.ts.map +0 -1
- package/dist/delivery/variant-css-map.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.iife.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/print/index.d.ts.map +0 -1
- package/dist/shared/layoutLimits.d.ts.map +0 -1
- package/dist/shared/types.d.ts.map +0 -1
package/dist/index.iife.js
CHANGED
|
@@ -1,8 +1,26 @@
|
|
|
1
|
-
(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=Object.defineProperty,n=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r};typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var r={},i=Symbol(),a=`http://www.w3.org/1999/xhtml`,o=`http://www.w3.org/2000/svg`,s=`http://www.w3.org/1998/Math/MathML`,c=Array.isArray,l=Array.prototype.indexOf,u=Array.prototype.includes,d=Array.from,f=Object.keys,p=Object.defineProperty,m=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyDescriptors,g=Object.prototype,_=Array.prototype,v=Object.getPrototypeOf,y=Object.isExtensible,b=()=>{};function x(e){for(var t=0;t<e.length;t++)e[t]()}function S(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var C=1024,w=2048,T=4096,ee=8192,te=16384,ne=32768,re=1<<25,ie=65536,ae=1<<19,oe=1<<20,se=1<<25,ce=65536,le=1<<21,ue=1<<22,de=1<<23,fe=Symbol(`$state`),pe=Symbol(`legacy props`),me=Symbol(``),he=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ge=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function _e(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function ve(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function ye(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function be(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function xe(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Se(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Ce(){throw Error(`https://svelte.dev/e/hydration_failed`)}function we(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Te(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ee(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function De(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Oe(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}function ke(){console.warn(`https://svelte.dev/e/derived_inert`)}function Ae(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function je(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var E=!1;function D(e){E=e}var O;function k(e){if(e===null)throw Ae(),r;return O=e}function Me(){return k(Qt(O))}function A(e){if(E){if(Qt(O)!==null)throw Ae(),r;O=e}}function Ne(e=1){if(E){for(var t=e,n=O;t--;)n=Qt(n);O=n}}function Pe(e=!0){for(var t=0,n=O;;){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 Fe(e){if(!e||e.nodeType!==8)throw Ae(),r;return e.data}function Ie(e){return e===this.v}function Le(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Re(e){return!Le(e,this.v)}var ze=!1,Be=!1,j=null;function Ve(e){j=e}function He(e,t=!1,n){j={p:j,i:!1,c:null,e:null,s:e,x:null,r:K,l:Be&&!t?{s:null,u:null,$:[]}:null}}function Ue(e){var t=j,n=t.e;if(n!==null){t.e=null;for(var r of n)mn(r)}return e!==void 0&&(t.x=e),t.i=!0,j=t.p,e??{}}function We(){return!Be||j!==null&&j.l===null}var Ge=[];function Ke(){var e=Ge;Ge=[],x(e)}function M(e){if(Ge.length===0&&!at){var t=Ge;queueMicrotask(()=>{t===Ge&&Ke()})}Ge.push(e)}function qe(){for(;Ge.length>0;)Ke()}function Je(e){var t=K;if(t===null)return G.f|=de,e;if(!(t.f&32768)&&!(t.f&4))throw e;Ye(e,t)}function Ye(e,t){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}var Xe=~(w|T|C);function N(e,t){e.f=e.f&Xe|t}function Ze(e){e.f&512||e.deps===null?N(e,C):N(e,T)}function Qe(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=ce,Qe(t.deps))}function $e(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),Qe(e.deps),N(e,C)}var et=!1,tt=!1;function nt(e){var t=tt;try{return tt=!1,[e(),tt]}finally{tt=t}}var rt=new Set,P=null,F=null,it=null,at=!1,ot=!1,st=null,ct=null,lt=0,ut=1,dt=class e{id=ut++;current=new Map;previous=new Map;#e=new Set;#t=new Set;#n=new Set;#r=new Map;#i=new Map;#a=null;#o=[];#s=[];#c=new Set;#l=new Set;#u=new Map;#d=new Set;is_fork=!1;#f=!1;#p=new Set;#m(){return this.is_fork||this.#i.size>0}#h(){for(let n of this.#p)for(let r of n.#i.keys()){for(var e=!1,t=r;t.parent!==null;){if(this.#u.has(t)){e=!0;break}t=t.parent}if(!e)return!0}return!1}skip_effect(e){this.#u.has(e)||this.#u.set(e,{d:[],m:[]}),this.#d.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#u.get(e);if(n){this.#u.delete(e);for(var r of n.d)N(r,w),t(r);for(r of n.m)N(r,T),t(r)}this.#d.add(e)}#g(){if(lt++>1e3&&(rt.delete(this),ft()),!this.#m()){for(let e of this.#c)this.#l.delete(e),N(e,w),this.schedule(e);for(let e of this.#l)N(e,T),this.schedule(e)}let t=this.#o;this.#o=[],this.apply();var n=st=[],r=[],i=ct=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw yt(e),t}if(P=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(st=null,ct=null,this.#m()||this.#h()){this.#v(r),this.#v(n);for(let[e,t]of this.#u)vt(e,t)}else{this.#r.size===0&&rt.delete(this),this.#c.clear(),this.#l.clear();for(let e of this.#e)e(this);this.#e.clear(),mt(r),mt(n),this.#a?.resolve()}var o=P;if(this.#o.length>0){let e=o??=this;e.#o.push(...this.#o.filter(t=>!e.#o.includes(t)))}o!==null&&(rt.add(o),o.#g()),ze&&!rt.has(this)&&this.#y()}#_(e,t,n){e.f^=C;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#u.has(r))&&r.fn!==null){a?r.f^=C:i&4?t.push(r):ze&&i&16777224?n.push(r):Xn(r)&&(i&16&&this.#l.add(r),tr(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(e){for(var t=0;t<e.length;t+=1)$e(e[t],this.#c,this.#l)}capture(e,t,n=!1){e.v!==i&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),F?.set(e,t)),this.is_fork||(e.v=t)}activate(){P=this}deactivate(){P=null,F=null}flush(){try{ot=!0,P=this,this.#g()}finally{lt=0,it=null,st=null,ct=null,ot=!1,P=null,F=null,Lt.clear()}}discard(){for(let e of this.#t)e(this);this.#t.clear(),this.#n.clear(),rt.delete(this)}register_created_effect(e){this.#s.push(e)}#y(){for(let l of rt){var e=l.id<this.id,t=[];for(let[r,[i,a]]of this.current){if(l.current.has(r)){var n=l.current.get(r)[0];if(e&&i!==n)l.current.set(r,[i,a]);else continue}t.push(r)}var r=[...l.current.keys()].filter(e=>!this.current.has(e));if(r.length===0)e&&l.discard();else if(t.length>0){if(e)for(let e of this.#d)l.unskip_effect(e,e=>{e.f&4194320?l.schedule(e):l.#v([e])});l.activate();var i=new Set,a=new Map;for(var o of t)ht(o,r,i,a);a=new Map;var s=[...l.current.keys()].filter(e=>this.current.has(e)?this.current.get(e)[0]!==e:!0);for(let e of this.#s)!(e.f&155648)&>(e,s,a)&&(e.f&4194320?(N(e,w),l.schedule(e)):l.#c.add(e));if(l.#o.length>0){l.apply();for(var c of l.#o)l.#_(c,[],[]);l.#o=[]}l.deactivate()}}for(let e of rt)e.#p.has(this)&&(e.#p.delete(this),e.#p.size===0&&!e.#m()&&(e.activate(),e.#g()))}increment(e,t){let n=this.#r.get(t)??0;if(this.#r.set(t,n+1),e){let e=this.#i.get(t)??0;this.#i.set(t,e+1)}}decrement(e,t,n){let r=this.#r.get(t)??0;if(r===1?this.#r.delete(t):this.#r.set(t,r-1),e){let e=this.#i.get(t)??0;e===1?this.#i.delete(t):this.#i.set(t,e-1)}this.#f||n||(this.#f=!0,M(()=>{this.#f=!1,this.flush()}))}transfer_effects(e,t){for(let t of e)this.#c.add(t);for(let e of t)this.#l.add(e);e.clear(),t.clear()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}on_fork_commit(e){this.#n.add(e)}run_fork_commit_callbacks(){for(let e of this.#n)e(this);this.#n.clear()}settled(){return(this.#a??=S()).promise}static ensure(){if(P===null){let t=P=new e;ot||(rt.add(P),at||M(()=>{P===t&&t.flush()}))}return P}apply(){if(!ze||!this.is_fork&&rt.size===1){F=null;return}F=new Map;for(let[e,[t]]of this.current)F.set(e,t);for(let n of rt)if(!(n===this||n.is_fork)){var e=!1,t=!1;if(n.id<this.id)for(let[r,[,i]]of n.current)i||(e||=this.current.has(r),t||=!this.current.has(r));if(e&&t)this.#p.add(n);else for(let[e,t]of n.previous)F.has(e)||F.set(e,t)}}schedule(e){if(it=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(st!==null&&t===K&&(ze||(G===null||!(G.f&2))&&!et))return;if(n&96){if(!(n&1024))return;t.f^=C}}this.#o.push(t)}};function I(e){var t=at;at=!0;try{var n;for(e&&(P!==null&&!P.is_fork&&P.flush(),n=e());;){if(qe(),P===null)return n;P.flush()}}finally{at=t}}function ft(){try{Se()}catch(e){Ye(e,it)}}var pt=null;function mt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Xn(r)&&(pt=new Set,tr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&En(r),pt?.size>0)){Lt.clear();for(let e of pt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)pt.has(n)&&(pt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||tr(n)}}pt.clear()}}pt=null}}function ht(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?ht(i,t,n,r):e&4194320&&!(e&2048)&>(i,t,r)&&(N(i,w),_t(i))}}function gt(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(u.call(t,r))return!0;if(r.f&2&>(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function _t(e){P.schedule(e)}function vt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),N(e,C);for(var n=e.first;n!==null;)vt(n,t),n=n.next}}function yt(e){N(e,C);for(var t=e.first;t!==null;)yt(t),t=t.next}function bt(e){let t=0,n=zt(0),r;return()=>{dn()&&(q(n),yn(()=>(t===0&&(r=ir(()=>e(()=>Ut(n)))),t+=1,()=>{M(()=>{--t,t===0&&(r?.(),r=void 0,Ut(n))})})))}}var xt=ie|ae;function St(e,t,n,r){new Ct(e,t,n,r)}var Ct=class{parent;is_pending=!1;transform_error;#e;#t=E?O: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=bt(()=>(this.#m=zt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=K;t.b=this,t.f|=128,n(e)},this.parent=K.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=bn(()=>{if(E){let e=this.#t;Me();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},xt),E&&(this.#e=O)}#g(){try{this.#a=xn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=xn(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=xn(()=>e(this.#e)),M(()=>{var e=this.#c=document.createDocumentFragment(),t=Zt();e.append(t),this.#a=this.#x(()=>xn(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,Dn(this.#o,()=>{this.#o=null}),this.#b(P))}))}#y(){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.#b(P)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){$e(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=K,n=G,r=j;Rn(this.#i),Ln(this.#i),Ve(this.#i.ctx);try{return dt.ensure(),e()}catch(e){return Je(e),null}finally{Rn(t),Ln(n),Ve(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&Dn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,M(()=>{this.#d=!1,this.#m&&Vt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),q(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;P?.is_fork?(this.#a&&P.skip_effect(this.#a),this.#o&&P.skip_effect(this.#o),this.#s&&P.skip_effect(this.#s),P.on_fork_commit(()=>{this.#C(e)})):this.#C(e)}#C(e){this.#a&&=(W(this.#a),null),this.#o&&=(W(this.#o),null),this.#s&&=(W(this.#s),null),E&&(k(this.#t),Ne(),k(Pe()));var t=this.#n.onerror;let n=this.#n.failed;var r=!1,i=!1;let a=()=>{if(r){je();return}r=!0,i&&Oe(),this.#s!==null&&Dn(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){Ye(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return xn(()=>{var t=K;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return Ye(e,this.#i.parent),null}}))};M(()=>{var t;try{t=this.transform_error(e)}catch(e){Ye(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>Ye(e,this.#i&&this.#i.parent)):o(t)})}};function wt(e,t,n,r){let i=We()?Ot:At;var a=e.filter(e=>!e.settled);if(n.length===0&&a.length===0){r(t.map(i));return}var o=K,s=Tt(),c=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function l(e){s();try{r(e)}catch(e){o.f&16384||Ye(e,o)}Et()}if(n.length===0){c.then(()=>l(t.map(i)));return}var u=Dt();function d(){Promise.all(n.map(e=>kt(e))).then(e=>l([...t.map(i),...e])).catch(e=>Ye(e,o)).finally(()=>u())}c?c.then(()=>{s(),d(),Et()}):d()}function Tt(){var e=K,t=G,n=j,r=P;return function(i=!0){Rn(e),Ln(t),Ve(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function Et(e=!0){Rn(null),Ln(null),Ve(null),e&&P?.deactivate()}function Dt(){var e=K,t=e.b,n=P,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),(i=!1)=>{t.update_pending_count(-1,n),n.decrement(r,e,i)}}function Ot(e){var t=2|w;return K!==null&&(K.f|=ae),{ctx:j,deps:null,effects:null,equals:Ie,f:t,fn:e,reactions:null,rv:0,v:i,wv:0,parent:K,ac:null}}function kt(e,t,n){let r=K;r===null&&_e();var a=void 0,o=zt(i),s=!G,c=new Map;return vn(()=>{var t=K,n=S();a=n.promise;try{Promise.resolve(e()).then(n.resolve,n.reject).finally(Et)}catch(e){n.reject(e),Et()}var i=P;if(s){if(t.f&32768)var l=Dt();if(r.b.is_rendered())c.get(i)?.reject(he),c.delete(i);else{for(let e of c.values())e.reject(he);c.clear()}c.set(i,n)}let u=(e,n=void 0)=>{if(l&&l(n===he),!(n===he||t.f&16384)){if(i.activate(),n)o.f|=de,Vt(o,n);else{o.f&8388608&&(o.f^=de),Vt(o,e);for(let[e,t]of c){if(c.delete(e),e===i)break;t.reject(he)}}i.deactivate()}};n.promise.then(u,e=>u(null,e||`unknown`))}),fn(()=>{for(let e of c.values())e.reject(he)}),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function L(e){let t=Ot(e);return ze||Bn(t),t}function At(e){let t=Ot(e);return t.equals=Re,t}function jt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)W(t[n])}}function Mt(e){var t,n=K,r=e.parent;if(!Pn&&r!==null&&r.f&24576)return ke(),e.v;Rn(r);try{e.f&=~ce,jt(e),t=Qn(e)}finally{Rn(n)}return t}function Nt(e){var t=Mt(e);if(!e.equals(t)&&(e.wv=Yn(),(!P?.is_fork||e.deps===null)&&(P===null?e.v=t:P.capture(e,t,!0),e.deps===null))){N(e,C);return}Pn||(F===null?Ze(e):(dn()||P?.is_fork)&&F.set(e,t))}function Pt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(he),t.teardown=b,t.ac=null,er(t,0),Cn(t))}function Ft(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&tr(t)}var It=new Set,Lt=new Map,Rt=!1;function zt(e,t){return{f:0,v:e,reactions:null,equals:Ie,rv:0,wv:0}}function R(e,t){let n=zt(e,t);return Bn(n),n}function Bt(e,t=!1,n=!0){let r=zt(e);return t||(r.equals=Re),Be&&n&&j!==null&&j.l!==null&&(j.l.s??=[]).push(r),r}function z(e,t,n=!1){return G!==null&&(!In||G.f&131072)&&We()&&G.f&4325394&&(zn===null||!u.call(zn,e))&&De(),Vt(e,n?Gt(t):t,ct)}function Vt(e,t,n=null){if(!e.equals(t)){Lt.set(e,Pn?t:e.v);var r=dt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&Mt(t),F===null&&Ze(t)}e.wv=Yn(),Wt(e,w,n),We()&&K!==null&&K.f&1024&&!(K.f&96)&&(Un===null?Wn([e]):Un.push(e)),!r.is_fork&&It.size>0&&!Rt&&Ht()}return t}function Ht(){Rt=!1;for(let e of It)e.f&1024&&N(e,T),Xn(e)&&tr(e);It.clear()}function Ut(e){z(e,e.v+1)}function Wt(e,t,n){var r=e.reactions;if(r!==null)for(var i=We(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===K)){var l=(c&w)===0;if(l&&N(s,t),c&2){var u=s;F?.delete(u),c&65536||(c&512&&(K===null||!(K.f&2097152))&&(s.f|=ce),Wt(u,T,n))}else if(l){var d=s;c&16&&pt!==null&&pt.add(d),n===null?_t(d):n.push(d)}}}}function Gt(e){if(typeof e!=`object`||!e||fe in e)return e;let t=v(e);if(t!==g&&t!==_)return e;var n=new Map,r=c(e),a=R(0),o=null,s=qn,l=e=>{if(qn===s)return e();var t=G,n=qn;Ln(null),Jn(s);var r=e();return Ln(t),Jn(n),r};return r&&n.set(`length`,R(e.length,o)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&Te();var i=n.get(t);return i===void 0?l(()=>{var e=R(r.value,o);return n.set(t,e),e}):z(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=l(()=>R(i,o));n.set(t,e),Ut(a)}}else z(r,i),Ut(a);return!0},get(t,r,a){if(r===fe)return e;var s=n.get(r),c=r in t;if(s===void 0&&(!c||m(t,r)?.writable)&&(s=l(()=>R(Gt(c?t[r]:i),o)),n.set(r,s)),s!==void 0){var u=q(s);return u===i?void 0:u}return Reflect.get(t,r,a)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var a=n.get(t);a&&(r.value=q(a))}else if(r===void 0){var o=n.get(t),s=o?.v;if(o!==void 0&&s!==i)return{enumerable:!0,configurable:!0,value:s,writable:!0}}return r},has(e,t){if(t===fe)return!0;var r=n.get(t),a=r!==void 0&&r.v!==i||Reflect.has(e,t);return(r!==void 0||K!==null&&(!a||m(e,t)?.writable))&&(r===void 0&&(r=l(()=>R(a?Gt(e[t]):i,o)),n.set(t,r)),q(r)===i)?!1:a},set(e,t,s,c){var u=n.get(t),d=t in e;if(r&&t===`length`)for(var f=s;f<u.v;f+=1){var p=n.get(f+``);p===void 0?f in e&&(p=l(()=>R(i,o)),n.set(f+``,p)):z(p,i)}if(u===void 0)(!d||m(e,t)?.writable)&&(u=l(()=>R(void 0,o)),z(u,Gt(s)),n.set(t,u));else{d=u.v!==i;var h=l(()=>Gt(s));z(u,h)}var g=Reflect.getOwnPropertyDescriptor(e,t);if(g?.set&&g.set.call(c,s),!d){if(r&&typeof t==`string`){var _=n.get(`length`),v=Number(t);Number.isInteger(v)&&v>=_.v&&z(_,v+1)}Ut(a)}return!0},ownKeys(e){q(a);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==i});for(var[r,o]of n)o.v!==i&&!(r in e)&&t.push(r);return t},setPrototypeOf(){Ee()}})}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=m(t,`firstChild`).get,Yt=m(t,`nextSibling`).get,y(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),y(n)&&(n.__t=void 0)}}function Zt(e=``){return document.createTextNode(e)}function B(e){return Jt.call(e)}function Qt(e){return Yt.call(e)}function V(e,t){if(!E)return B(e);var n=B(O);if(n===null)n=O.appendChild(Zt());else if(t&&n.nodeType!==3){var r=Zt();return n?.before(r),k(r),r}return t&&rn(n),k(n),n}function $t(e,t=!1){if(!E){var n=B(e);return n instanceof Comment&&n.data===``?Qt(n):n}if(t){if(O?.nodeType!==3){var r=Zt();return O?.before(r),k(r),r}rn(O)}return O}function H(e,t=1,n=!1){let r=E?O:e;for(var i;t--;)i=r,r=Qt(r);if(!E)return r;if(n){if(r?.nodeType!==3){var a=Zt();return r===null?i?.after(a):r.before(a),k(a),a}rn(r)}return k(r),r}function en(e){e.textContent=``}function tn(){return!ze||pt!==null?!1:(K.f&ne)!==0}function nn(e,t,n){let r=n?{is:n}:void 0;return document.createElementNS(t??`http://www.w3.org/1999/xhtml`,e,r)}function rn(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}var an=!1;function on(){an||(an=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function sn(e){var t=G,n=K;Ln(null),Rn(null);try{return e()}finally{Ln(t),Rn(n)}}function cn(e){K===null&&(G===null&&xe(e),be()),Pn&&ye(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 un(e,t){var n=K;n!==null&&n.f&8192&&(e|=ee);var r={ctx:j,deps:null,nodes:null,f:e|w|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};P?.register_created_effect(r);var i=r;if(e&4)st===null?dt.ensure().schedule(r):st.push(r);else if(t!==null){try{tr(r)}catch(e){throw W(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),G!==null&&G.f&2&&!(e&64))){var a=G;(a.effects??=[]).push(i)}return r}function dn(){return G!==null&&!In}function fn(e){let t=un(8,null);return N(t,C),t.teardown=e,t}function pn(e){cn(`$effect`);var t=K.f;if(!G&&t&32&&!(t&32768)){var n=j;(n.e??=[]).push(e)}else return mn(e)}function mn(e){return un(4|oe,e)}function hn(e){dt.ensure();let t=un(64|ae,e);return()=>{W(t)}}function gn(e){dt.ensure();let t=un(64|ae,e);return(e={})=>new Promise(n=>{e.outro?Dn(t,()=>{W(t),n(void 0)}):(W(t),n(void 0))})}function _n(e){return un(4,e)}function vn(e){return un(ue|ae,e)}function yn(e,t=0){return un(8|t,e)}function U(e,t=[],n=[],r=[]){wt(r,t,n,t=>{un(8,()=>e(...t.map(q)))})}function bn(e,t=0){return un(16|t,e)}function xn(e){return un(32|ae,e)}function Sn(e){var t=e.teardown;if(t!==null){let e=Pn,n=G;Fn(!0),Ln(null);try{t.call(null)}finally{Fn(e),Ln(n)}}}function Cn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&sn(()=>{e.abort(he)});var r=n.next;n.f&64?n.parent=null:W(n,t),n=r}}function wn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||W(t),t=n}}function W(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),N(e,re),Cn(e,t&&!n),er(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Sn(e),e.f^=re,e.f|=te;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=[];On(e,r,!0);var i=()=>{n&&W(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^=ee;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){An(e,!0)}function An(e,t){if(e.f&8192){e.f^=ee,e.f&1024||(N(e,w),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 G=null,In=!1;function Ln(e){G=e}var K=null;function Rn(e){K=e}var zn=null;function Bn(e){G!==null&&(!ze||G.f&2)&&(zn===null?zn=[e]:zn.push(e))}var Vn=null,Hn=0,Un=null;function Wn(e){Un=e}var Gn=1,Kn=0,qn=Kn;function Jn(e){qn=e}function Yn(){return++Gn}function Xn(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~ce),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Xn(a)&&Nt(a),a.wv>e.wv)return!0}t&512&&F===null&&N(e,C)}return!1}function Zn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!ze&&zn!==null&&u.call(zn,e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Zn(a,t,!1):t===a&&(n?N(a,w):a.f&1024&&N(a,T),_t(a))}}function Qn(e){var t=Vn,n=Hn,r=Un,i=G,a=zn,o=j,s=In,c=qn,l=e.f;Vn=null,Hn=0,Un=null,G=l&96?null:e,zn=null,Ve(e.ctx),In=!1,qn=++Kn,e.ac!==null&&(sn(()=>{e.ac.abort(he)}),e.ac=null);try{e.f|=le;var u=e.fn,d=u();e.f|=ne;var f=e.deps,p=P?.is_fork;if(Vn!==null){var m;if(p||er(e,Hn),f!==null&&Hn>0)for(f.length=Hn+Vn.length,m=0;m<Vn.length;m++)f[Hn+m]=Vn[m];else e.deps=f=Vn;if(dn()&&e.f&512)for(m=Hn;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&Hn<f.length&&(er(e,Hn),f.length=Hn);if(We()&&Un!==null&&!In&&f!==null&&!(e.f&6146))for(m=0;m<Un.length;m++)Zn(Un[m],e);if(i!==null&&i!==e){if(Kn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Kn;if(t!==null)for(let e of t)e.rv=Kn;Un!==null&&(r===null?r=Un:r.push(...Un))}return e.f&8388608&&(e.f^=de),d}catch(e){return Je(e)}finally{e.f^=le,Vn=t,Hn=n,Un=r,G=i,zn=a,Ve(o),In=s,qn=c}}function $n(e,t){let n=t.reactions;if(n!==null){var r=l.call(n,e);if(r!==-1){var a=n.length-1;a===0?n=t.reactions=null:(n[r]=n[a],n.pop())}}if(n===null&&t.f&2&&(Vn===null||!u.call(Vn,t))){var o=t;o.f&512&&(o.f^=512,o.f&=~ce),o.v!==i&&Ze(o),Pt(o),er(o,0)}}function er(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)$n(e,n[r])}function tr(e){var t=e.f;if(!(t&16384)){N(e,C);var n=K,r=Nn;K=e,Nn=!0;try{t&16777232?wn(e):Cn(e),Sn(e);var i=Qn(e);e.teardown=typeof i==`function`?i:null,e.wv=Gn}finally{Nn=r,K=n}}}function q(e){var t=(e.f&2)!=0;if(Mn?.add(e),G!==null&&!In&&!(K!==null&&K.f&16384)&&(zn===null||!u.call(zn,e))){var n=G.deps;if(G.f&2097152)e.rv<Kn&&(e.rv=Kn,Vn===null&&n!==null&&n[Hn]===e?Hn++:Vn===null?Vn=[e]:Vn.push(e));else{(G.deps??=[]).push(e);var r=e.reactions;r===null?e.reactions=[G]:u.call(r,G)||r.push(G)}}if(Pn&&Lt.has(e))return Lt.get(e);if(t){var i=e;if(Pn){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||rr(i))&&(a=Mt(i)),Lt.set(i,a),a}var o=(i.f&512)==0&&!In&&G!==null&&(Nn||(G.f&512)!=0),s=(i.f&ne)===0;Xn(i)&&(o&&(i.f|=512),Nt(i)),o&&!s&&(Ft(i),nr(i))}if(F?.has(e))return F.get(e);if(e.f&8388608)throw e.v;return e.v}function nr(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(Ft(t),nr(t))}function rr(e){if(e.v===i)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Lt.has(t)||t.f&2&&rr(t))return!0;return!1}function ir(e){var t=In;try{return In=!0,e()}finally{In=t}}var ar=Symbol(`events`),or=new Set,sr=new Set,cr=null;function lr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;cr=e;var o=0,s=cr===e&&e[ar];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[ar]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){p(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=G,d=K;Ln(null),Rn(null);try{for(var f,m=[];a!==null;){var h=a.assignedSlot||a.parentNode||a.host||null;try{var g=a[ar]?.[r];g!=null&&(!a.disabled||e.target===a)&&g.call(a,e)}catch(e){f?m.push(e):f=e}if(e.cancelBubble||h===t||h===null)break;a=h}if(f){for(let e of m)queueMicrotask(()=>{throw e});throw f}}finally{e[ar]=t,delete e.currentTarget,Ln(u),Rn(d)}}}var ur=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function dr(e){return ur?.createHTML(e)??e}function fr(e){var t=nn(`template`);return t.innerHTML=dr(e.replaceAll(`<!>`,`<!---->`)),t.content}function pr(e,t){var n=K;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function J(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(E)return pr(O,null),O;i===void 0&&(i=fr(a?e:`<!>`+e),n||(i=B(i)));var t=r||qt?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=B(t),s=t.lastChild;pr(o,s)}else pr(t,t);return t}}function mr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(E)return pr(O,null),O;if(!o){var e=B(fr(a));if(i)for(o=document.createDocumentFragment();B(e);)o.appendChild(B(e));else o=B(e)}var t=o.cloneNode(!0);if(i){var n=B(t),r=t.lastChild;pr(n,r)}else pr(t,t);return t}}function hr(e,t){return mr(e,t,`svg`)}function gr(){if(E)return pr(O,null),O;var e=document.createDocumentFragment(),t=document.createComment(``),n=Zt();return e.append(t,n),pr(t,n),e}function Y(e,t){if(E){var n=K;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=O),Me();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 _r=[`touchstart`,`touchmove`];function vr(e){return _r.includes(e)}function yr(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=`${n}`)}function br(e,t){return Cr(e,t)}function xr(e,t){Xt(),t.intro=t.intro??!1;let n=t.target,i=E,a=O;try{for(var o=B(n);o&&(o.nodeType!==8||o.data!==`[`);)o=Qt(o);if(!o)throw r;D(!0),k(o);let i=Cr(e,{...t,anchor:o});return D(!1),i}catch(i){if(i instanceof Error&&i.message.split(`
|
|
2
|
-
`).some(e=>e.startsWith(`https://svelte.dev/e/`)))throw i;return i!==
|
|
3
|
-
\r\f\xA0\v`];function Br(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||zr.includes(r[o-1]))&&(s===r.length||zr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Vr(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Hr(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Ur(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Hr)),i&&c.push(...Object.keys(i).map(Hr));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Hr(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Vr(r)),i&&(n+=Vr(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Wr(e,t,n,r,i,a){var o=e.__className;if(E||o!==n||o===void 0){var s=Br(n,r,a);(!E||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e.__className=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}function Gr(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function Kr(e,t,n,r){var i=e.__style;if(E||i!==t){var a=Ur(t,r);(!E||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e.__style=t}else r&&(Array.isArray(r)?(Gr(e,n?.[0],r[0]),Gr(e,n?.[1],r[1],`important`)):Gr(e,n,r));return r}var qr=Symbol(`is custom element`),Jr=Symbol(`is html`),Yr=ge?`link`:`LINK`,Xr=ge?`progress`:`PROGRESS`;function Zr(e){if(E){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;X(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;X(e,`checked`,null),e.checked=r}}};e.__on_r=n,M(n),on()}}function Qr(e,t){var n=ei(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==Xr)||(e.value=t??``)}function $r(e,t){var n=ei(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function X(e,t,n,r){var i=ei(e);E&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Yr)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[me]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ni(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ei(e){return e.__attributes??={[qr]:e.nodeName.includes(`-`),[Jr]:e.namespaceURI===a}}var ti=new Map;function ni(e){var t=e.getAttribute(`is`)||e.nodeName,n=ti.get(t);if(n)return n;ti.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=h(i),r)r[o].set&&n.push(o);i=v(i)}return n}function ri(e,t){return e===t||e?.[fe]===t}function ii(e={},t,n,r){var i=j.r,a=K;return _n(()=>{var o,s;return yn(()=>{o=s,s=r?.()||[],ir(()=>{e!==n(...s)&&(t(e,...s),o&&ri(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&&ri(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function Z(e,t,n,r){var i=!Be||(n&2)!=0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=()=>(c&&(c=!1,s=o?ir(r):r),s);let u;if(a){var d=fe in e||pe in e;u=m(e,t)?.set??(d&&t in e?n=>e[t]=n:void 0)}var f,p=!1;a?[f,p]=nt(()=>e[t]):f=e[t],f===void 0&&r!==void 0&&(f=l(),u&&(i&&we(t),u(f)));var h=i?()=>{var n=e[t];return n===void 0?l():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return h;if(u){var g=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||g||p)&&u(t?h():e),e):h()})}var _=!1,v=(n&1?Ot:At)(()=>(_=!1,h()));a&&q(v);var y=K;return(function(e,t){if(arguments.length>0){let n=t?q(v):i&&a?Gt(e):e;return z(v,n),_=!0,s!==void 0&&(s=n),e}return Pn&&_||y.f&16384?v.v:q(v)})}function ai(e){return new oi(e)}var oi=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 q(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===pe?!0:(q(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return z(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?xr:br)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!ze&&(!e?.props?.$$host||e.sync===!1)&&I(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||p(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=()=>{Tr(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()}},si;typeof HTMLElement==`function`&&(si=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=nn(`slot`);e!==`default`&&(n.name=e),Y(t,n)}}let t={},n=li(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]=ci(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=ai({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=hn(()=>{yn(()=>{this.$$r=!0;for(let e of f(this.$$c)){if(!this.$$p_d[e]?.reflect)continue;this.$$d[e]=this.$$c[e];let t=ci(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]=ci(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 f(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function ci(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 li(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function ui(e,t,n,r,i,a){let o=class extends si{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return f(t).map(e=>(t[e].attribute||e).toLowerCase())}};return f(t).forEach(e=>{p(o.prototype,e,{get(){return this.$$c&&e in this.$$c?this.$$c[e]:this.$$d[e]},set(n){n=ci(e,n,t),this.$$d[e]=n;var r=this.$$c;r&&(m(r,e)?.get?r[e]=n:r.$set({[e]:n}))}})}),r.forEach(e=>{p(o.prototype,e,{get(){return this.$$c?.[e]}})}),a&&(o=a(o)),e.element=o,o}var di={50:`#e8f5e9`,500:`#4caf50`},fi={200:`#9fa8da`,500:`#3f51b5`,800:`#283593`},pi={500:`#ff9800`},mi={200:`#f48fb1`,900:`#880e4f`,A400:`#f50057`},hi={50:`#ffebee`,700:`#d32f2f`},Q={TEXT:`black`,DISABLED:`grey`,DISABLED_SECONDARY:`#ABABAB`,CORRECT:di[500],CORRECT_SECONDARY:di[50],CORRECT_TERTIARY:`#0EA449`,CORRECT_WITH_ICON:`#087D38`,INCORRECT:pi[500],INCORRECT_SECONDARY:hi[50],INCORRECT_WITH_ICON:`#BF0D00`,MISSING:hi[700],MISSING_WITH_ICON:`#6A78A1`,PRIMARY:fi[500],PRIMARY_LIGHT:fi[200],PRIMARY_DARK:fi[800],SECONDARY:mi.A400,SECONDARY_LIGHT:mi[200],SECONDARY_DARK:mi[900],TERTIARY:`#146EB3`,TERTIARY_LIGHT:`#D0E2F0`,BACKGROUND:`rgba(255,255,255,0)`,BACKGROUND_DARK:`#ECEDF1`,DROPDOWN_BACKGROUND:`#E0E1E6`,SECONDARY_BACKGROUND:`rgba(241,241,241,1)`,BORDER:`#9A9A9A`,BORDER_LIGHT:`#D1D1D1`,BORDER_DARK:`#646464`,BORDER_GRAY:`#7E8494`,BLACK:`#000000`,WHITE:`#ffffff`,TRANSPARENT:`transparent`,FOCUS_CHECKED:`#BBDEFB`,FOCUS_CHECKED_BORDER:`#1565C0`,FOCUS_UNCHECKED:`#E0E0E0`,FOCUS_UNCHECKED_BORDER:`#757575`,BLUE_GREY100:`#F3F5F7`,BLUE_GREY300:`#C0C3CF`,BLUE_GREY600:`#7E8494`,BLUE_GREY900:`#152452`,FADED_PRIMARY:`#DCDAFB`};Object.freeze(Q);var $=(e=>(...t)=>{let n=t.pop();return t.reduceRight((t,n)=>`var(--${e}-${n}, ${t})`,n)})(`pie`),gi={text:()=>$(`text`,Q.TEXT),disabled:()=>$(`disabled`,Q.DISABLED),disabledSecondary:()=>$(`disabled-secondary`,Q.DISABLED_SECONDARY),correct:()=>$(`correct`,Q.CORRECT),correctSecondary:()=>$(`correct-secondary`,Q.CORRECT_SECONDARY),correctTertiary:()=>$(`correct-tertiary`,Q.CORRECT_TERTIARY),correctWithIcon:()=>$(`correct-icon`,Q.CORRECT_WITH_ICON),incorrect:()=>$(`incorrect`,Q.INCORRECT),incorrectWithIcon:()=>$(`incorrect-icon`,Q.INCORRECT_WITH_ICON),incorrectSecondary:()=>$(`incorrect-secondary`,Q.INCORRECT_SECONDARY),missing:()=>$(`missing`,Q.MISSING),missingWithIcon:()=>$(`missing-icon`,Q.MISSING_WITH_ICON),primary:()=>$(`primary`,Q.PRIMARY),primaryLight:()=>$(`primary-light`,Q.PRIMARY_LIGHT),primaryDark:()=>$(`primary-dark`,Q.PRIMARY_DARK),primaryText:()=>$(`primary-text`,`text`,Q.TEXT),fadedPrimary:()=>$(`faded-primary`,Q.FADED_PRIMARY),secondary:()=>$(`secondary`,Q.SECONDARY),secondaryLight:()=>$(`secondary-light`,Q.SECONDARY_LIGHT),secondaryDark:()=>$(`secondary-dark`,Q.SECONDARY_DARK),secondaryText:()=>$(`secondary-text`,`text`,Q.TEXT),background:()=>$(`background`,Q.BACKGROUND),backgroundDark:()=>$(`background-dark`,Q.BACKGROUND_DARK),secondaryBackground:()=>$(`secondary-background`,Q.SECONDARY_BACKGROUND),dropdownBackground:()=>$(`dropdown-background`,Q.DROPDOWN_BACKGROUND),tertiary:()=>$(`tertiary`,Q.TERTIARY),tertiaryLight:()=>$(`tertiary-light`,Q.TERTIARY_LIGHT),border:()=>$(`border`,Q.BORDER),borderLight:()=>$(`border-light`,Q.BORDER_LIGHT),borderDark:()=>$(`border-dark`,Q.BORDER_DARK),borderGray:()=>$(`border-gray`,Q.BORDER_GRAY),black:()=>$(`black`,Q.BLACK),white:()=>$(`white`,Q.WHITE),transparent:()=>Q.TRANSPARENT,focusChecked:()=>$(`focus-checked`,Q.FOCUS_CHECKED),focusCheckedBorder:()=>$(`focus-checked-border`,Q.FOCUS_CHECKED_BORDER),focusUnchecked:()=>$(`focus-unchecked`,Q.FOCUS_UNCHECKED),focusUncheckedBorder:()=>$(`focus-unchecked-border`,Q.FOCUS_UNCHECKED_BORDER),blueGrey100:()=>$(`blue-grey-100`,Q.BLUE_GREY100),blueGrey300:()=>$(`blue-grey-300`,Q.BLUE_GREY300),blueGrey600:()=>$(`blue-grey-600`,Q.BLUE_GREY600),blueGrey900:()=>$(`blue-grey-900`,Q.BLUE_GREY900)},_i=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}},vi=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}},yi=e=>{let t=e;return t?typeof t.onSessionChange==`function`||typeof t.onAudioStarted==`function`||typeof t.onAudioEnded==`function`:!1};function bi(e,t={}){let n=t.hostPredicate??yi,r=e;for(;r;){if(n(r))return r;r=r.parentElement}if(typeof document<`u`&&t.fallbackSelector){let e=document.querySelector(t.fallbackSelector);if(n(e))return e}return null}function xi({sourceEl:e,fallbackSelector:t,component:n,complete:r,session:i}){let a=bi(e,{fallbackSelector:t});return a?typeof a.onSessionChange==`function`?(a.onSessionChange(i),a):(a.dispatchEvent(new vi(n,r)),a):null}function Si(e){return e.hasAudio?e.audioUrl?e.useFeatureButtonAudio?`feature-button`:`controls`:`error`:`none`}var Ci=J(`<audio class="sr-only pie-audio-player svelte-ypdwb3" preload="metadata" aria-hidden="true" tabindex="-1"></audio> <button class="listen-button pie-listen-button rli-feature-audio svelte-ypdwb3" type="button"><img/> <img/></button>`,1),wi=J(`<button class="mt-2 text-sm underline pie-audio-autoplay-enable" type="button"> </button>`),Ti=J(`<audio controls="" class="w-full max-w-md pie-audio-player" preload="metadata"><track kind="captions"/></audio> <!>`,1),Ei=J(`<p class="text-sm text-red-700 pie-audio-error" role="alert"> </p>`),Di=J(`<div class="mb-4 audio-container pie-audio-container"><!></div>`),Oi={hash:`svelte-ypdwb3`,code:`.listen-button.svelte-ypdwb3 {width:var(--mpb-listen-button-size, 128px);height:var(--mpb-listen-button-size, 128px);border:0;padding:0;background-color:transparent;cursor:pointer;z-index:1;}.listen-button.svelte-ypdwb3:hover {background-color:#e2f1fe;}.listen-feature-icon.svelte-ypdwb3 {width:var(--mpb-listen-button-size, 128px);height:var(--mpb-listen-button-size, 128px);object-fit:contain;display:none;}.listen-feature-icon.listen-active.svelte-ypdwb3 {display:block;}.sr-only.svelte-ypdwb3 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}`};function ki(e,t){He(t,!0),Rr(e,Oi);let n={IDLE:`idle`,PLAYING:`playing`,BLOCKED:`blocked`,PAUSED:`paused`},r=Z(t,`hasAudio`,7,!1),i=Z(t,`audioUrl`,7),a=Z(t,`useFeatureButtonAudio`,7,!1),o=Z(t,`autoplayEnabled`,7,!1),s=Z(t,`audioTranscript`,7),c=Z(t,`showVisibleTranscript`,7),l=Z(t,`transcriptId`,7),u=Z(t,`featureAudioSkin`,7),d=Z(t,`uiText`,7),f=Z(t,`locale`,7,``),p=Z(t,`onaudiostarted`,7),m=Z(t,`onaudioended`,7),h=R(null),g=R(null),_=R(null),v=R(Gt(n.IDLE)),y=L(()=>Si({hasAudio:r(),audioUrl:i(),useFeatureButtonAudio:a()})),b=L(()=>q(v)===n.PLAYING),x=L(()=>q(v)===n.BLOCKED),S=L(()=>q(y)===`error`?d().audioResourceUnavailable:``);pn(()=>{i(),z(v,n.IDLE,!0)});function C(){q(y)!==`none`&&q(y)!==`error`&&q(h)&&q(h).play().catch(()=>{})}function w(){q(y)!==`none`&&q(y)!==`error`&&q(h)&&q(h).play().finally(()=>{q(v)===n.BLOCKED&&z(v,n.PAUSED,!0)})}function T(e,t,n){pn(()=>{let r=e();if(r)return r.addEventListener(t,n),()=>r.removeEventListener(t,n)})}T(()=>q(h),`playing`,()=>{z(v,n.PLAYING,!0),p()?.()}),T(()=>q(h),`ended`,()=>{z(v,n.PAUSED,!0),m()?.()}),T(()=>q(g),`click`,()=>C()),T(()=>q(_),`click`,()=>w()),pn(()=>{!o()||q(y)===`none`||q(y)===`error`||q(v)===n.IDLE&&q(h)&&i()&&(z(v,n.PAUSED,!0),q(h).play().catch(()=>{z(v,n.BLOCKED,!0)}))});function ee(e=``){return e.toLowerCase().startsWith(`es`)?`Escuchar`:`Listen`}function te(e=``){return e.toLowerCase().startsWith(`es`)?d().listenSilentAltEs??`Escuchar. Repetir las instrucciones.`:d().listenSilentAlt??`Repeat instructions`}function ne(e=``){return e.toLowerCase().startsWith(`es`)?d().listenPlayingAltEs??`Escuchar. Estas son las instrucciones.`:d().listenPlayingAlt??`Instructions are playing`}var re={get hasAudio(){return r()},set hasAudio(e=!1){r(e),I()},get audioUrl(){return i()},set audioUrl(e){i(e),I()},get useFeatureButtonAudio(){return a()},set useFeatureButtonAudio(e=!1){a(e),I()},get autoplayEnabled(){return o()},set autoplayEnabled(e=!1){o(e),I()},get audioTranscript(){return s()},set audioTranscript(e){s(e),I()},get showVisibleTranscript(){return c()},set showVisibleTranscript(e){c(e),I()},get transcriptId(){return l()},set transcriptId(e){l(e),I()},get featureAudioSkin(){return u()},set featureAudioSkin(e){u(e),I()},get uiText(){return d()},set uiText(e){d(e),I()},get locale(){return f()},set locale(e=``){f(e),I()},get onaudiostarted(){return p()},set onaudiostarted(e){p(e),I()},get onaudioended(){return m()},set onaudioended(e){m(e),I()}},ie=gr(),ae=$t(ie),oe=e=>{var t=Di(),n=V(t),r=e=>{var t=Ci(),n=$t(t);ii(n,e=>z(h,e),()=>q(h));var r=H(n,2),a=V(r),o=H(a,2);A(r),ii(r,e=>z(g,e),()=>q(g)),U((e,t,s)=>{X(n,`src`,i()),X(r,`aria-label`,e),Wr(a,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${q(b)?``:`listen-active`}`,`svelte-ypdwb3`),X(a,`src`,u().silentUrl),X(a,`alt`,t),Wr(o,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${q(b)?`listen-active`:``}`,`svelte-ypdwb3`),X(o,`src`,u().playingUrl),X(o,`alt`,s)},[()=>ee(f()),()=>te(f()),()=>ne(f())]),Y(e,t)},a=e=>{var t=Ti(),n=$t(t);ii(n,e=>z(h,e),()=>q(h));var r=H(n,2),a=e=>{var t=wi(),n=V(t,!0);A(t),ii(t,e=>z(_,e),()=>q(_)),U(()=>yr(n,d().clickToEnableAutoplay)),Y(e,t)};Dr(r,e=>{q(x)&&e(a)}),U(()=>{X(n,`src`,i()),X(n,`aria-describedby`,s()?l():void 0)}),Y(e,t)},o=e=>{var t=Ei(),n=V(t,!0);A(t),U(()=>yr(n,q(S))),Y(e,t)};Dr(n,e=>{q(y)===`feature-button`?e(r):q(y)===`controls`?e(a,1):q(y)===`error`&&e(o,2)}),A(t),Y(e,t)};return Dr(ae,e=>{q(y)!==`none`&&e(oe)}),Y(e,ie),Ue(re)}ui(ki,{hasAudio:{},audioUrl:{},useFeatureButtonAudio:{},autoplayEnabled:{},audioTranscript:{},showVisibleTranscript:{},transcriptId:{},featureAudioSkin:{},uiText:{},locale:{},onaudiostarted:{},onaudioended:{}},[],[],{mode:`open`});var Ai=J(`<img class="w-auto object-contain pie-blank-image" style="max-height:var(--mpb-selected-image-max-height, 4rem);"/>`),ji=J(`<span class="cloze-marker-value pie-blank-value svelte-d9l5tb"></span>`),Mi=J(`<span class="cloze-marker-empty svelte-d9l5tb" aria-hidden="true"> </span>`),Ni=J(`<span role="status" aria-live="polite" aria-atomic="true"><!></span>`),Pi={hash:`svelte-d9l5tb`,code:`.cloze-marker.svelte-d9l5tb {display:inline-flex;align-items:center;justify-content:center;text-align:center;vertical-align:baseline;}.cloze-marker.svelte-d9l5tb:focus-within {outline:2px solid var(--pie-focus, #2563eb);outline-offset:2px;}.cloze-marker-standalone.svelte-d9l5tb {width:var(--mpb-blank-standalone-width, 7rem);}.cloze-marker-empty.svelte-d9l5tb {display:inline-block;min-width:4ch;}.cloze-marker-value.svelte-d9l5tb {width:100%;display:inline-flex;align-items:center;justify-content:center;text-align:center;}.cloze-marker-value.svelte-d9l5tb p {margin:0;}`};function Fi(e,t){He(t,!0),Rr(e,Pi);let n=Z(t,`choiceMode`,7,`text`),r=Z(t,`displayChoice`,7,void 0),i=Z(t,`displayChoiceLabelHtml`,7,``),a=Z(t,`isStandalone`,7,!1),o=Z(t,`blankWidth`,7),s=Z(t,`blankBorderWidth`,7),c=Z(t,`ariaLabel`,7);var l={get choiceMode(){return n()},set choiceMode(e=`text`){n(e),I()},get displayChoice(){return r()},set displayChoice(e=void 0){r(e),I()},get displayChoiceLabelHtml(){return i()},set displayChoiceLabelHtml(e=``){i(e),I()},get isStandalone(){return a()},set isStandalone(e=!1){a(e),I()},get blankWidth(){return o()},set blankWidth(e){o(e),I()},get blankBorderWidth(){return s()},set blankBorderWidth(e){s(e),I()},get ariaLabel(){return c()},set ariaLabel(e){c(e),I()}},u=Ni(),d=V(u),f=e=>{var t=Ai();U(()=>{X(t,`src`,r().imageUrl),X(t,`alt`,r().imageAlt||`Selected answer image`)}),Y(e,t)},p=e=>{var t=ji();Lr(t,i,!0),A(t),Y(e,t)},m=e=>{Y(e,Mi())};return Dr(d,e=>{n()===`image`&&r()?.imageUrl?e(f):i()?e(p,1):e(m,-1)}),A(u),U(()=>{Wr(u,1,`inline-flex items-center min-h-[1.5em] px-2 mx-1 border-b-2 border-gray-500 align-baseline cloze-marker pie-blank-slot ${a()?`cloze-marker-standalone pie-blank-slot-standalone`:``}`,`svelte-d9l5tb`),Kr(u,`width:${o()};border-bottom-width:${s()};`),X(u,`aria-label`,c())}),Y(e,u),Ue(l)}ui(Fi,{choiceMode:{},displayChoice:{},displayChoiceLabelHtml:{},isStandalone:{},blankWidth:{},blankBorderWidth:{},ariaLabel:{}},[],[],{mode:`open`});var Ii=J(`<img class="object-contain pie-choice-image" style="max-height:var(--mpb-choice-image-max-height, 5rem);"/>`),Li=J(`<span class="choice-html pie-choice-label svelte-8xu1pt"></span>`),Ri=J(`<label class="cursor-pointer choice-tile text-center pie-choice-tile svelte-8xu1pt"><span class="choice-tile-content pie-choice-tile-content svelte-8xu1pt"><!></span> <input type="radio" class="choice-radio-bottom pie-choice-radio pie-choice-radio-bottom svelte-8xu1pt"/></label>`),zi=J(`<img class="object-contain pie-choice-image" style="max-height:var(--mpb-choice-image-max-height, 5rem);"/>`),Bi=J(`<span class="choice-html pie-choice-label svelte-8xu1pt"></span>`),Vi=J(`<input type="radio" class="choice-radio-inline pie-choice-radio pie-choice-radio-inline svelte-8xu1pt"/> <label class="cursor-pointer flex-1 pie-choice-label-wrap svelte-8xu1pt"><!></label>`,1),Hi=J(`<span aria-hidden="true"> </span>`),Ui=J(`<div style="gap:var(--mpb-choice-row-gap, 0.5rem);"><!> <!></div>`),Wi={hash:`svelte-8xu1pt`,code:`.choice-row-horizontal.svelte-8xu1pt {flex-direction:column;align-items:center;width:min(var(--mpb-choice-width-px, 170px), var(--mpb-choice-width-vw, 30vw));min-height:var(--mpb-choice-tile-min-height, 11rem);gap:0;}.choice-tile.svelte-8xu1pt {display:flex;flex-direction:column;justify-content:space-between;align-items:center;width:100%;min-height:var(--mpb-choice-tile-min-height, 11rem);padding:0.8rem 0.65rem 0.5rem;border-radius:8px;background:transparent;transition:background-color 120ms ease-in-out;}.choice-tile-content.svelte-8xu1pt {width:100%;display:flex;align-items:center;justify-content:center;min-height:var(--mpb-choice-content-min-height, 7.5rem);}.choice-row-horizontal.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-hover-bg, var(--pie-correct-answer-choice-hover-bg, #f2f2f2));}.pie-choice-horizontal.svelte-8xu1pt:not(.is-selected):not(:hover) .pie-choice-tile:where(.svelte-8xu1pt) {background:transparent;}.choice-row-horizontal.is-selected.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-selected-bg, var(--pie-correct-answer-choice-selected-bg, #fcfcd3));}.choice-row-horizontal.is-selected.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-selected-bg, var(--pie-correct-answer-choice-selected-bg, #fcfcd3));}.pie-choice.svelte-8xu1pt:not(.pie-choice-horizontal):hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-correct-answer-choice-hover-bg, #ececec);}.pie-choice.svelte-8xu1pt:not(.pie-choice-horizontal):not(.is-selected):not(:hover) .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:transparent;}.pie-choice:not(.pie-choice-horizontal).is-selected.svelte-8xu1pt .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-correct-answer-choice-selected-bg, #f1f1f1);border-radius:6px;}.pie-choice:not(.pie-choice-horizontal).is-selected.svelte-8xu1pt:hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-correct-answer-choice-selected-bg, #f1f1f1);}.pie-choice.choice-correct.svelte-8xu1pt {border-left:3px solid var(--pie-correct-answer-choice-correct-border, #0ea449);}.pie-choice.choice-incorrect.svelte-8xu1pt {border-left:3px solid var(--pie-correct-answer-choice-incorrect-border, #bf0d00);}.pie-choice-horizontal.choice-correct.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-correct-answer-choice-correct-bg, #e8f5e9);}.pie-choice-horizontal.choice-incorrect.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-correct-answer-choice-incorrect-bg, #ffebee);}.pie-choice-feedback-badge.svelte-8xu1pt {margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:1.1rem;height:1.1rem;border-radius:9999px;font-size:0.72rem;line-height:1;font-weight:700;color:var(--pie-correct-answer-feedback-glyph-color, #fff);}.pie-choice-feedback-correct.svelte-8xu1pt {background:var(--pie-correct-answer-feedback-correct-bg, #087d38);}.pie-choice-feedback-incorrect.svelte-8xu1pt {background:var(--pie-correct-answer-feedback-incorrect-bg, #bf0d00);}.choice-row-horizontal.svelte-8xu1pt p {margin:0;text-align:center;}.choice-html.svelte-8xu1pt p {margin:0;}.choice-html.svelte-8xu1pt {width:100%;display:inline-flex;align-items:center;justify-content:center;text-align:center;}.choice-radio-bottom.svelte-8xu1pt {margin-top:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem);padding:var(--mpb-choice-radio-padding, 0px);}.choice-radio-inline.svelte-8xu1pt {margin-top:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem);}`};function Gi(e,t){He(t,!0),Rr(e,Wi);let n=Z(t,`choice`,7),r=Z(t,`choiceMode`,7,`text`),i=Z(t,`isHorizontal`,7,!1),a=Z(t,`isSelected`,7,!1),o=Z(t,`isDisabled`,7,!1),s=Z(t,`correctness`,7,void 0),c=Z(t,`isEvaluateMode`,7,!1),l=Z(t,`instanceId`,7),u=Z(t,`radioGroupName`,7);var d={get choice(){return n()},set choice(e){n(e),I()},get choiceMode(){return r()},set choiceMode(e=`text`){r(e),I()},get isHorizontal(){return i()},set isHorizontal(e=!1){i(e),I()},get isSelected(){return a()},set isSelected(e=!1){a(e),I()},get isDisabled(){return o()},set isDisabled(e=!1){o(e),I()},get correctness(){return s()},set correctness(e=void 0){s(e),I()},get isEvaluateMode(){return c()},set isEvaluateMode(e=!1){c(e),I()},get instanceId(){return l()},set instanceId(e){l(e),I()},get radioGroupName(){return u()},set radioGroupName(e){u(e),I()}},f=Ui(),p=V(f),m=e=>{var t=Ri(),i=V(t),s=V(i),c=e=>{var t=Ii();U(()=>{X(t,`src`,n().imageUrl),X(t,`alt`,n().imageAlt||`Choice ${n().id}`)}),Y(e,t)},d=e=>{var t=Li();Lr(t,()=>n().labelHtml||``,!0),A(t),Y(e,t)};Dr(s,e=>{r()===`image`&&n().imageUrl?e(c):e(d,-1)}),A(i);var f=H(i,2);Zr(f),A(t),U(()=>{X(t,`for`,`${l()}-opt-${n().id}`),X(f,`name`,u()),X(f,`id`,`${l()}-opt-${n().id}`),Qr(f,n().id),$r(f,a()),f.disabled=o()}),Y(e,t)},h=e=>{var t=Vi(),i=$t(t);Zr(i);var s=H(i,2),c=V(s),d=e=>{var t=zi();U(()=>{X(t,`src`,n().imageUrl),X(t,`alt`,n().imageAlt||`Choice ${n().id}`)}),Y(e,t)},f=e=>{var t=Bi();Lr(t,()=>n().labelHtml||``,!0),A(t),Y(e,t)};Dr(c,e=>{r()===`image`&&n().imageUrl?e(d):e(f,-1)}),A(s),U(()=>{X(i,`name`,u()),X(i,`id`,`${l()}-opt-${n().id}`),Qr(i,n().id),$r(i,a()),i.disabled=o(),X(s,`for`,`${l()}-opt-${n().id}`)}),Y(e,t)};Dr(p,e=>{i()?e(m):e(h,-1)});var g=H(p,2),_=e=>{var t=Hi(),n=V(t,!0);A(t),U(()=>{Wr(t,1,`pie-choice-feedback-badge ${s()===`correct`?`pie-choice-feedback-correct`:`pie-choice-feedback-incorrect`}`,`svelte-8xu1pt`),yr(n,s()===`correct`?`✓`:`✕`)}),Y(e,t)};return Dr(g,e=>{c()&&s()&&e(_)}),A(f),U(()=>Wr(f,1,`flex items-start choice-row pie-choice ${i()?`choice-row-horizontal pie-choice-horizontal`:``} ${a()?`is-selected pie-choice-selected`:``} ${s()?`choice-${s()} pie-choice-${s()}`:``}`,`svelte-8xu1pt`)),Y(e,f),Ue(d)}ui(Gi,{choice:{},choiceMode:{},isHorizontal:{},isSelected:{},isDisabled:{},correctness:{},isEvaluateMode:{},instanceId:{},radioGroupName:{}},[],[],{mode:`open`});function Ki(e){let t=new Map,{isEvaluateMode:n,correctChoiceId:r,selectedId:i,showCorrectAnswer:a}=e;return!n||!r?t:a?(t.set(r,`correct`),t):i?i===r?(t.set(r,`correct`),t):(t.set(i,`incorrect`),t.set(r,`incorrect`),t):(t.set(r,`incorrect`),t)}var qi=`{{blank}}`,Ji=new Set([`audio_blank_only`,`stimulus_image_blank`,`token_sequence`]);function Yi(e){let{interactionMode:t=``,template:n=``,choiceLayout:r,layoutProfile:i=``,hasAudio:a=!1,useFeatureButtonAudio:o}=e,s=t===`audio_mc_only`,c=n?n.replace(/<[^>]+>/g,``).replace(/ /g,` `).trim()===qi:!1,l=r===`horizontal`||r===`vertical`?r:s||c?`horizontal`:`vertical`;return{isAudioOnlyMode:s,isBlankOnlyTemplate:c,choiceLayout:l,isHorizontalChoices:l===`horizontal`,hasInlineSentenceAudioLayout:i===`inline_sentence`&&a,useFeatureButtonAudio:typeof o==`boolean`?o:a&&Ji.has(i)}}var Xi={blankStandaloneWidthRem:7,blankWideWidthRem:10,blankUnderlineWidthPx:2,blankUnderlineWideWidthPx:4,horizontalChoiceWidthPx:170,horizontalChoiceWidthVw:30,horizontalChoiceTileMinHeightRem:11,horizontalChoiceContentMinHeightRem:7.5,selectedImageMaxHeightRem:4,choiceImageMaxHeightRem:5,listenButtonSizePx:128,stimulusMinColumnPx:210,textMinColumnPx:260,legendMaxChars:120,choiceGroupGapRem:.5,choiceRowGapRem:.5,toggleButtonGapRem:.5,horizontalChoiceRadioTopMarginRem:.5,audioBlankTemplateMarginTopRem:.8,audioBlankTemplateMarginBottomRem:1.8,audioInstructionsMaxWidthPx:875,narrowHorizontalChoiceMaxWidthPx:230,stimulusGridColumnGapRem:2,stimulusGridRowGapRem:.7,stimulusSentenceMarginTopRem:.2,stimulusChoicesMarginTopRem:.9,tokenGridColumnGapRem:1.5,tokenGridRowGapRem:.8,tokenTemplateMarginTopRem:.6,tokenInlineTokenGapRem:.35,tokenChoicesMarginTopRem:.2,inlineGridColumnGapRem:1.5,inlineGridRowGapRem:.65,inlineTemplateMarginTopRem:.45,inlineChoicesMarginTopRem:.25},Zi={blankStandaloneWidthRem:{varName:`--mpb-blank-standalone-width`,unit:`rem`},blankWideWidthRem:{varName:`--mpb-blank-wide-width`,unit:`rem`},blankUnderlineWidthPx:{varName:`--mpb-blank-underline-width`,unit:`px`},blankUnderlineWideWidthPx:{varName:`--mpb-blank-underline-wide-width`,unit:`px`},horizontalChoiceWidthPx:{varName:`--mpb-choice-width-px`,unit:`px`},horizontalChoiceWidthVw:{varName:`--mpb-choice-width-vw`,unit:`vw`},horizontalChoiceTileMinHeightRem:{varName:`--mpb-choice-tile-min-height`,unit:`rem`},horizontalChoiceContentMinHeightRem:{varName:`--mpb-choice-content-min-height`,unit:`rem`},choiceImageMaxHeightRem:{varName:`--mpb-choice-image-max-height`,unit:`rem`},selectedImageMaxHeightRem:{varName:`--mpb-selected-image-max-height`,unit:`rem`},choiceGroupGapRem:{varName:`--mpb-choice-group-gap`,unit:`rem`},choiceRowGapRem:{varName:`--mpb-choice-row-gap`,unit:`rem`},horizontalChoiceRadioTopMarginRem:{varName:`--mpb-horizontal-choice-radio-top-margin`,unit:`rem`},narrowHorizontalChoiceMaxWidthPx:{varName:`--mpb-narrow-choice-max-width`,unit:`px`},toggleButtonGapRem:{varName:`--mpb-toggle-button-gap`,unit:`rem`},listenButtonSizePx:{varName:`--mpb-listen-button-size`,unit:`px`},audioBlankTemplateMarginTopRem:{varName:`--mpb-audio-blank-template-margin-top`,unit:`rem`},audioBlankTemplateMarginBottomRem:{varName:`--mpb-audio-blank-template-margin-bottom`,unit:`rem`},audioInstructionsMaxWidthPx:{varName:`--mpb-audio-instructions-max-width`,unit:`px`},stimulusMinColumnPx:{varName:`--mpb-stimulus-min-column`,unit:`px`},textMinColumnPx:{varName:`--mpb-text-min-column`,unit:`px`},stimulusGridColumnGapRem:{varName:`--mpb-stimulus-grid-column-gap`,unit:`rem`},stimulusGridRowGapRem:{varName:`--mpb-stimulus-grid-row-gap`,unit:`rem`},stimulusSentenceMarginTopRem:{varName:`--mpb-stimulus-sentence-margin-top`,unit:`rem`},stimulusChoicesMarginTopRem:{varName:`--mpb-stimulus-choices-margin-top`,unit:`rem`},tokenGridColumnGapRem:{varName:`--mpb-token-grid-column-gap`,unit:`rem`},tokenGridRowGapRem:{varName:`--mpb-token-grid-row-gap`,unit:`rem`},tokenTemplateMarginTopRem:{varName:`--mpb-token-template-margin-top`,unit:`rem`},tokenInlineTokenGapRem:{varName:`--mpb-token-inline-token-gap`,unit:`rem`},tokenChoicesMarginTopRem:{varName:`--mpb-token-choices-margin-top`,unit:`rem`},inlineGridColumnGapRem:{varName:`--mpb-inline-grid-column-gap`,unit:`rem`},inlineGridRowGapRem:{varName:`--mpb-inline-grid-row-gap`,unit:`rem`},inlineTemplateMarginTopRem:{varName:`--mpb-inline-template-margin-top`,unit:`rem`},inlineChoicesMarginTopRem:{varName:`--mpb-inline-choices-margin-top`,unit:`rem`}},Qi={audio_blank_only:{blankWideWidthRem:10,blankUnderlineWideWidthPx:6,horizontalChoiceTileMinHeightRem:11.25,horizontalChoiceContentMinHeightRem:9.375,choiceGroupGapRem:1,audioBlankTemplateMarginBottomRem:1.875},stimulus_image_blank:{blankWideWidthRem:10,blankUnderlineWideWidthPx:6},token_sequence:{blankStandaloneWidthRem:7,blankUnderlineWideWidthPx:6}};function $i(e){let{layoutProfile:t,isBlankOnlyTemplate:n,correctAnswerStyleVars:r}=e,i=e.configuredLimits&&typeof e.configuredLimits==`object`?e.configuredLimits:{},a=e.customProfilePresets&&typeof e.customProfilePresets==`object`?e.customProfilePresets:{},o=a[t]&&typeof a[t]==`object`?a[t]:{},s={...Qi[t]??{},...o},c={...Xi,...i,...s},l=[`audio_blank_only`,`stimulus_image_blank`],u=[`audio_blank_only`,`stimulus_image_blank`,`token_sequence`],d=l.includes(t)?`${c.blankWideWidthRem}rem`:n?`${c.blankStandaloneWidthRem}rem`:`auto`,f=u.includes(t)?`${c.blankUnderlineWideWidthPx}px`:`${c.blankUnderlineWidthPx}px`;return{rootStyle:[...Object.keys(Zi).map(e=>`${Zi[e].varName}:${c[e]}${Zi[e].unit}`),r].join(`;`),blankWidth:d,blankBorderWidth:f,legendMaxChars:c.legendMaxChars}}var ea={default:{silentUrl:`https://assets.learnosity.com/organisations/844/0c9f2aa3-3cd5-4de7-93ef-541c24ca35da.svg`,playingUrl:`https://assets.learnosity.com/organisations/844/231dfdc2-c113-4be5-91fb-e75a0ca5994b.svg`},es:{silentUrl:`https://assets.learnosity.com/organisations/844/27a9d5b5-d873-4bd5-b9ba-22748782d8ba.svg`,playingUrl:`https://assets.learnosity.com/organisations/844/120f216d-96b7-4560-94b8-1d90710216b7.svg`}};function ta(e){let t=String(e.locale||``).toLowerCase(),n=t.slice(0,2),r=e.audioButtonSkinsByLocale&&typeof e.audioButtonSkinsByLocale==`object`?e.audioButtonSkinsByLocale:{},i=e.audioButtonSkin&&typeof e.audioButtonSkin==`object`?e.audioButtonSkin:null,a=t.startsWith(`es`)?ea.es:ea.default;return r[t]||r[n]||r.default||i||a}function na(e){let{selectedId:t,isEvaluateMode:n,showCorrectAnswer:r,alwaysShowCorrect:i,correctChoiceId:a}=e;return i&&a||n&&r&&a?a:t}function ra(e){let{isEvaluateMode:t,showCorrectAnswer:n,isCorrect:r,isIncorrect:i,selectedId:a}=e;return!t||n?``:r?`Correct answer selected`:i&&a?`Incorrect answer selected`:``}function ia(e){let{prompt:t,legendMaxChars:n,answerChoicesLabel:r}=e,i=t.replace(/<[^>]+>/g,` `).replace(/\s+/g,` `).trim(),a=Math.max(8,n);return i?i.length>a?`${i.slice(0,Math.max(1,a-1))}…`:i:r}var aa=`/* Shared base styles for all sel_r1-*_plusggg variants.
|
|
1
|
+
this.McPopulatedBlankElement=(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,_=()=>{};function v(e){for(var t=0;t<e.length;t++)e[t]()}function y(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var b=1024,x=2048,S=4096,ee=8192,C=16384,w=32768,T=1<<25,te=65536,ne=1<<19,re=1<<20,ie=1<<25,ae=65536,oe=1<<21,se=1<<22,ce=1<<23,le=Symbol(`$state`),ue=Symbol(`component`),de=Symbol(`legacy props`),fe=Symbol(``),pe=Symbol(`attributes`),me=Symbol(`class`),he=Symbol(`style`),ge=Symbol(`text`),_e=Symbol(`form reset`),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 E=!1;function Ce(e){E=e}var D;function O(t){if(t===null)throw xe(),e;return D=t}function we(){return O(tn(D))}function k(t){if(E){if(tn(D)!==null)throw xe(),e;D=t}}function Te(e=1){if(E){for(var t=e,n=D;t--;)n=tn(n);D=n}}function Ee(e=!0){for(var t=0,n=D;;){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=tn(n);e&&n.remove(),n=i}}function De(t){if(!t||t.nodeType!==8)throw xe(),e;return t.data}function Oe(e){return e===this.v}function ke(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Ae(e){return!ke(e,this.v)}function je(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Me(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}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 A=null;function Ue(e){A=e}function We(e,t=!1,n){A={p:A,i:!1,c:null,e:null,s:e,x:null,r:U,l:null}}function Ge(e){var t=A,n=t.e;if(n!==null){t.e=null;for(var r of n)_n(r)}return e!==void 0&&(t.x=e),t.i=!0,A=t.p,Ke(e)}function Ke(e={}){return u(e,ue,{value:!0}),e}function qe(){return!0}var Je=[];function Ye(){var e=Je;Je=[],v(e)}function Xe(e){if(Je.length===0&&!wt){var t=Je;queueMicrotask(()=>{t===Je&&Ye()})}Je.push(e)}function Ze(){for(;Je.length>0;)Ye()}var Qe=~(x|S|b);function j(e,t){e.f=e.f&Qe|t}function $e(e){e.f&512||e.deps===null?j(e,b):j(e,S)}function et(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=ae,et(t.deps))}function tt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),et(e.deps),j(e,b)}var nt=!1;function rt(e){var t=nt;try{return nt=!1,[e(),nt]}finally{nt=t}}var it=!1;function at(){it||(it=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[_e]?.()})},{capture:!0}))}function ot(e){var t=H,n=U;Bn(null),Vn(null);try{return e()}finally{Bn(t),Vn(n)}}function st(e,t,n,r){let i=qe()?dt:mt;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=U,c=ct(),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){un(e,s)}lt()}}var d=ut();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>pt(e))).then(u).catch(e=>un(e,s)).finally(d)}l?l.then(()=>{c(),f(),lt()}):f()}function ct(){var e=U,t=H,n=A,r=N;return function(i=!0){Vn(e),Bn(t),Ue(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function lt(e=!0){Vn(null),Bn(null),Ue(null),e&&N?.deactivate()}function ut(){var e=U,t=e.b,n=N,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 dt(e){var n=2|x;return U!==null&&(U.f|=ne),{ctx:A,deps:null,effects:null,equals:Oe,f:n,fn:e,reactions:null,rv:0,v:t,wv:0,parent:U,ac:null}}var ft=Symbol(`obsolete`);function pt(e,n,r){let i=U;i===null&&je();var a=void 0,o=Ht(t),s=!H,c=new Set;return xn(()=>{var t=U,n=y();a=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ve&&n.reject(e)}).finally(lt)}catch(e){n.reject(e),lt()}var r=N;if(s){if(t.f&32768)var l=ut();if(i.b?.is_rendered())r.async_deriveds.get(t)?.reject(ft);else for(let e of c.values())e.reject(ft);c.add(n),r.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),c.delete(n),t!==ft&&(r.activate(),t?(o.f|=ce,Wt(o,t)):(o.f&8388608&&(o.f^=ce),Wt(o,e)),r.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),hn(()=>{for(let e of c)e.reject(ft)}),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function M(e){let t=dt(e);return Un(t),t}function mt(e){let t=dt(e);return t.equals=Ae,t}function ht(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)V(t[n])}}function gt(e){var n,r=U,i=e.parent;if(!Ln&&i!==null&&e.v!==t&&i.f&24576)return be(),e.v;Vn(i);try{e.f&=~ae,ht(e),n=$n(e)}finally{Vn(r)}return n}function _t(e){var t=gt(e);if(!e.equals(t)&&(e.wv=Xn(),(!N?.is_fork||e.deps===null)&&(N===null?e.v=t:(N.capture(e,t,!0),xt?.capture(e,t,!0)),e.deps===null))){j(e,b);return}Ln||(St===null?$e(e):(mn()||N?.is_fork)&&St.set(e,t))}function vt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&ot(()=>{t.ac.abort(ve),t.ac=null}),t.fn!==null&&(t.teardown=_),nr(t,0),En(t))}function yt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&rr(t)}var bt=null,N=null,xt=null,St=null,Ct=null,wt=!1,Tt=!1,Et=null,Dt=null,Ot=0,kt=1,At=class e{id=kt++;#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(){bt===null?bt=this:(bt.#n=this,this.#t=bt),bt=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)j(r,x),t(r);for(r of n.m)j(r,S),t(r)}this.#p.add(e)}#g(){this.#e=!0,Ot++>1e3&&(this.#x(),jt());for(let e of this.#u)this.#d.delete(e),j(e,x),this.schedule(e);for(let e of this.#d)j(e,S),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=Et=[],r=[],i=Dt=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw Rt(e),this.#h()||this.discard(),t}if(N=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(Et=null,Dt=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)Lt(e,t);i.length>0&&N.#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(),xt=this,Nt(r),Nt(n),xt=null,this.#s?.resolve();var s=N;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&&(Bt.clear(),s.#g())}#_(e,t,n){e.f^=b;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^=b:i&4?t.push(r):Zn(r)&&(i&16&&this.#d.add(r),rr(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),j(i,x),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#x(),N=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]),St?.set(e,n)),this.is_fork||(e.v=n)}activate(){N=this}deactivate(){N=null,St=null}flush(){try{Tt=!0,N=this,this.#g()}finally{Ot=0,Ct=null,Et=null,Dt=null,Tt=!1,N=null,St=null,Bt.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(ft);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??=y()).promise}static ensure(){if(N===null){let t=N=new e;!Tt&&!wt&&Xe(()=>{t.#e||t.flush()})}return N}apply(){St=null}schedule(e){if(Ct=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(Et!==null&&t===U&&(H===null||!(H.f&2)))return;if(n&96){if(!(n&1024))return;t.f^=b}}this.#c.push(t)}#x(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?bt=e:t.#t=e,this.linked=!1}}};function P(e){var t=wt;wt=!0;try{var n;for(e&&(N!==null&&!N.is_fork&&N.flush(),n=e());;){if(Ze(),N===null)return n;N.flush()}}finally{wt=t}}function jt(){try{Ie()}catch(e){un(e,Ct)}}var Mt=null;function Nt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Zn(r)&&(Mt=new Set,rr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&kn(r),Mt?.size>0)){Bt.clear();for(let e of Mt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Mt.has(n)&&(Mt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||rr(n)}}Mt.clear()}}Mt=null}}function Pt(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?Pt(i,t,n,r):e&4194320&&!(e&2048)&&Ft(i,t,r)&&(j(i,x),It(i))}}function Ft(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&&Ft(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function It(e){N.schedule(e)}function Lt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),j(e,b);for(var n=e.first;n!==null;)Lt(n,t),n=n.next}}function Rt(e){j(e,b);for(var t=e.first;t!==null;)Rt(t),t=t.next}var zt=new Set,Bt=new Map,Vt=!1;function Ht(e,t){return{f:0,v:e,reactions:null,equals:Oe,rv:0,wv:0}}function F(e,t){let n=Ht(e,t);return Un(n),n}function Ut(e,t=!1,n=!0){let r=Ht(e);return t||(r.equals=Ae),r}function I(e,t,n=!1){return H!==null&&(!zn||H.f&131072)&&qe()&&H.f&4325394&&(Hn===null||!Hn.has(e))&&Ve(),Wt(e,n?Jt(t):t,Dt)}function Wt(e,t,n=null){if(!e.equals(t)){Ln?Bt.set(e,t):Bt.has(e)||Bt.set(e,e.v);var r=At.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&>(t),St===null&&$e(t)}e.wv=Xn(),qt(e,x,n),qe()&&U!==null&&U.f&1024&&!(U.f&96)&&(Wn===null?Gn([e]):Wn.push(e)),!r.is_fork&&zt.size>0&&!Vt&&Gt()}return t}function Gt(){Vt=!1;for(let e of zt){e.f&1024&&j(e,S);let t;try{t=Zn(e)}catch{t=!0}t&&rr(e)}zt.clear()}function Kt(e){I(e,e.v+1)}function qt(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===U)){var l=(c&x)===0;if(l&&j(s,t),c&131072)zt.add(s);else if(c&2){var u=s;St?.delete(u),c&65536||(c&512&&(U===null||!(U.f&2097152))&&(s.f|=ae),qt(u,S,n))}else if(l){var d=s;c&16&&Mt!==null&&Mt.add(d),n===null?It(d):n.push(d)}}}}function Jt(e){if(typeof e!=`object`||!e||le in e||ue in e)return e;let n=h(e);if(n!==p&&n!==m)return e;var r=new Map,i=a(e),o=F(0),s=null,c=Jn,l=e=>{if(Jn===c)return e();var t=H,n=Jn;Bn(null),Yn(c);var r=e();return Bn(t),Yn(n),r};return i&&r.set(`length`,F(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=F(n.value,s);return r.set(t,e),e}):I(i,n.value,!0),!0},deleteProperty(e,n){var i=r.get(n);if(i===void 0){if(n in e){let e=l(()=>F(t,s));r.set(n,e),Kt(o)}}else I(i,t),Kt(o);return!0},get(n,i,a){if(i===le)return e;var o=r.get(i),c=i in n;if(o===void 0&&(!c||d(n,i)?.writable)&&(o=l(()=>F(Jt(c?n[i]:t),s)),r.set(i,o)),o!==void 0){var u=K(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=K(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===le)return!0;var i=r.get(n),a=i!==void 0&&i.v!==t||Reflect.has(e,n);return(i!==void 0||U!==null&&(!a||d(e,n)?.writable))&&(i===void 0&&(i=l(()=>F(a?Jt(e[n]):t,s)),r.set(n,i)),K(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(()=>F(t,s)),r.set(p+``,m)):I(m,t)}if(u===void 0)(!f||d(e,n)?.writable)&&(u=l(()=>F(void 0,s)),I(u,Jt(a)),r.set(n,u));else{f=u.v!==t;var h=l(()=>Jt(a));I(u,h)}var g=Reflect.getOwnPropertyDescriptor(e,n);if(g?.set&&g.set.call(c,a),!f){if(i&&typeof n==`string`){var _=r.get(`length`),v=Number(n);Number.isInteger(v)&&v>=_.v&&I(_,v+1)}Kt(o)}return!0},ownKeys(e){K(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 Yt,Xt,Zt,Qt;function $t(){if(Yt===void 0){Yt=window,Xt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Zt=d(t,`firstChild`).get,Qt=d(t,`nextSibling`).get,g(e)&&(e[me]=void 0,e[pe]=null,e[he]=void 0,e.__e=void 0),g(n)&&(n[ge]=void 0)}}function en(e=``){return document.createTextNode(e)}function L(e){return Zt.call(e)}function tn(e){return Qt.call(e)}function R(e,t){if(!E)return L(e);var n=L(D);if(n===null)n=D.appendChild(en());else if(t&&n.nodeType!==3){var r=en();return n?.before(r),O(r),r}return t&&cn(n),O(n),n}function nn(e,t=!1){if(!E){var n=L(e);return n instanceof Comment&&n.data===``?tn(n):n}if(t){if(D?.nodeType!==3){var r=en();return D?.before(r),O(r),r}cn(D)}return D}function rn(e,t=!1){if(!E)return L(e);var n=R(e,t);return k(e),n}function z(e,t=1,n=!1){let r=E?D:e;for(var i;t--;)i=r,r=tn(r);if(!E)return r;if(n){if(r?.nodeType!==3){var a=en();return r===null?i?.after(a):r.before(a),O(a),a}cn(r)}return O(r),r}function an(e){e.textContent=``}function on(){return!1}function sn(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 cn(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 ln(e){var t=U;if(t===null)return H.f|=ce,e;if(!(t.f&32768)&&!(t.f&4))throw e;un(e,t)}function un(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 dn(e){U===null&&(H===null&&Fe(e),Pe()),Ln&&Ne(e)}function fn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function pn(e,t){var n=U;n!==null&&n.f&8192&&(e|=ee);var r={ctx:A,deps:null,nodes:null,f:e|x|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};N?.register_created_effect(r);var i=r;if(e&4)Et===null?At.ensure().schedule(r):Et.push(r);else if(t!==null){try{rr(r)}catch(e){throw V(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|=te))}if(i!==null&&(i.parent=n,n!==null&&fn(i,n),H!==null&&H.f&2&&!(e&64))){var a=H;(a.effects??=[]).push(i)}return r}function mn(){return H!==null&&!zn}function hn(e){let t=pn(8,null);return j(t,b),t.teardown=e,t}function gn(e){dn(`$effect`);var t=U.f;if(!H&&t&32&&A!==null&&!A.i){var n=A;(n.e??=[]).push(e)}else return _n(e)}function _n(e){return pn(4|re,e)}function vn(e){At.ensure();let t=pn(64|ne,e);return()=>{V(t)}}function yn(e){At.ensure();let t=pn(64|ne,e);return(e={})=>new Promise(n=>{e.outro?An(t,()=>{V(t),n(void 0)}):(V(t),n(void 0))})}function bn(e){return pn(4,e)}function xn(e){return pn(se|ne,e)}function Sn(e,t=0){return pn(8|t,e)}function B(e,t=[],n=[],r=[]){st(r,t,n,t=>{pn(8,()=>{e(...t.map(K))})})}function Cn(e,t=0){return pn(16|t,e)}function wn(e){return pn(32|ne,e)}function Tn(e){var t=e.teardown;if(t!==null){let n=Ln,r=H;Rn(!0),Bn(null);try{t.call(null)}catch(t){un(t,e.parent)}finally{Rn(n),Bn(r)}}}function En(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&ot(()=>{e.abort(ve)});var r=n.next;n.f&64?n.parent=null:V(n,t),n=r}}function Dn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||V(t),t=n}}function V(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(On(e.nodes.start,e.nodes.end),n=!0),e.f|=T,En(e,t&&!n),nr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Tn(e),e.f^=T,e.f|=C;var i=e.parent;i!==null&&i.first!==null&&kn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function On(e,t){for(;e!==null;){var n=e===t?null:tn(e);e.remove(),e=n}}function kn(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 An(e,t,n=!0){var r=[];e.f|=256,jn(e,r,!0);var i=()=>{n&&V(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function jn(e,t,n){if(!(e.f&8192)){e.f^=ee;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;jn(i,t,o?n:!1)}i=a}}}function Mn(e){e.f&=-257,Nn(e,!0)}function Nn(e,t){if(!(e.f&256)&&e.f&8192){e.f^=ee,e.f&1024||(j(e,x),At.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;Nn(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 Pn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:tn(n);t.append(n),n=i}}var Fn=null,In=!1,Ln=!1;function Rn(e){Ln=e}var H=null,zn=!1;function Bn(e){H=e}var U=null;function Vn(e){U=e}var Hn=null;function Un(e){H!==null&&(Hn??=new Set).add(e)}var W=null,G=0,Wn=null;function Gn(e){Wn=e}var Kn=1,qn=0,Jn=qn;function Yn(e){Jn=e}function Xn(){return++Kn}function Zn(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~ae),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Zn(a)&&_t(a),a.wv>e.wv)return!0}t&512&&St===null&&j(e,b)}return!1}function Qn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Hn!==null&&Hn.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Qn(a,t,!1):t===a&&(n?j(a,x):a.f&1024&&j(a,S),It(a))}}function $n(e){var t=W,n=G,r=Wn,i=H,a=Hn,o=A,s=zn,c=Jn,l=e.f;W=null,G=0,Wn=null,H=l&96?null:e,Hn=null,Ue(e.ctx),zn=!1,Jn=++qn,e.ac!==null&&(ot(()=>{e.ac.abort(ve)}),e.ac=null);try{e.f|=oe;var u=e.fn,d=u();e.f|=w;var f=er(e);if(qe()&&Wn!==null&&!zn&&f!==null&&!(e.f&6146))for(var p=0;p<Wn.length;p++)Qn(Wn[p],e);if(i!==null&&i!==e){if(qn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=qn;if(t!==null)for(let e of t)e.rv=qn;Wn!==null&&(r===null?r=Wn:r.push(...Wn))}return e.f&8388608&&(e.f^=ce),d}catch(t){return er(e),ln(t)}finally{e.f^=oe,W=t,G=n,Wn=r,H=i,Hn=a,Ue(o),zn=s,Jn=c}}function er(e){var t=e.deps,n=N?.is_fork;if(W!==null){var r;if(n||nr(e,G),t!==null&&G>0)for(t.length=G+W.length,r=0;r<W.length;r++)t[G+r]=W[r];else e.deps=t=W;if(mn()&&e.f&512)for(r=G;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&G<t.length&&(nr(e,G),t.length=G);return t}function tr(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&&(W===null||!s.call(W,n))){var c=n;c.f&512&&(c.f^=512,c.f&=~ae),c.v!==t&&$e(c),c.ac!==null&&ot(()=>{c.ac.abort(ve),c.ac=null,j(c,x)}),vt(c),nr(c,0)}}function nr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)tr(e,n[r])}function rr(e){var t=e.f;if(!(t&16384)){j(e,b);var n=U,r=In;U=e,In=(t&96)==0;try{t&16777232?Dn(e):En(e),Tn(e);var i=$n(e);e.teardown=typeof i==`function`?i:null,e.wv=Kn}finally{In=r,U=n}}}function K(e){var t=(e.f&2)!=0;if(Fn?.add(e),H!==null&&!zn&&!(U!==null&&U.f&16384)&&(Hn===null||!Hn.has(e))){var n=H.deps;if(H.f&2097152)e.rv<qn&&(e.rv=qn,W===null&&n!==null&&n[G]===e?G++:W===null?W=[e]:W.push(e));else{H.deps??=[],s.call(H.deps,e)||H.deps.push(e);var r=e.reactions;r===null?e.reactions=[H]:s.call(r,H)||r.push(H)}}if(Ln&&Bt.has(e))return Bt.get(e);if(t){var i=e;if(Ln){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||ar(i))&&(a=gt(i)),Bt.set(i,a),a}var o=(i.f&512)==0&&!zn&&H!==null&&(In||(H.f&512)!=0),c=(i.f&w)===0;Zn(i)&&(o&&(i.f|=512),_t(i)),o&&!c&&(yt(i),ir(i))}if(St?.has(e))return St.get(e);if(e.f&8388608)throw e.v;return e.v}function ir(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(yt(t),ir(t))}function ar(e){if(e.v===t)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Bt.has(t)||t.f&2&&ar(t))return!0;return!1}function or(e){var t=zn;try{return zn=!0,e()}finally{zn=t}}var sr=Symbol(`events`),cr=new Set,lr=new Set;function ur(e,t,n){(t[sr]??={})[e]=n}function dr(e){for(var t=0;t<e.length;t++)cr.add(e[t]);for(var n of lr)n(e)}var fr=null,pr=!1;function mr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;fr=e,pr||(pr=!0,setTimeout(()=>{pr=!1,fr=null}));var o=0,s=fr===e&&e[sr];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[sr]=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=H,f=U;Bn(null),Vn(null);try{for(var p,m=[];a!==null&&a!==t;){try{var h=a[sr]?.[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[sr]=t,delete e.currentTarget,Bn(d),Vn(f)}}}var hr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function gr(e){return hr?.createHTML(e)??e}function _r(e){var t=sn(`template`);return t.innerHTML=gr(e.replaceAll(`<!>`,`<!---->`)),t.content}function vr(e,t){var n=U;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function q(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(E)return vr(D,null),D;i===void 0&&(i=_r(a?e:`<!>`+e),n||(i=L(i)));var t=r||Xt?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=L(t),s=t.lastChild;vr(o,s)}else vr(t,t);return t}}function yr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(E)return vr(D,null),D;if(!o){var e=L(_r(a));if(i)for(o=document.createDocumentFragment();L(e);)o.appendChild(L(e));else o=L(e)}var t=o.cloneNode(!0);if(i){var n=L(t),r=t.lastChild;vr(n,r)}else vr(t,t);return t}}function br(e,t){return yr(e,t,`svg`)}function xr(){if(E)return vr(D,null),D;var e=document.createDocumentFragment(),t=document.createComment(``),n=en();return e.append(t,n),vr(t,n),e}function J(e,t){if(E){var n=U;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=D),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 Sr=[`touchstart`,`touchmove`];function Cr(e){return Sr.includes(e)}function wr(e){let t=0,n=Ht(0),r;return()=>{mn()&&(K(n),Sn(()=>(t===0&&(r=or(()=>e(()=>Kt(n)))),t+=1,()=>{Xe(()=>{--t,t===0&&(r?.(),r=void 0,Kt(n))})})))}}var Tr=te|ne;function Er(e,t,n,r){new Dr(e,t,n,r)}var Dr=class{parent;is_pending=!1;transform_error;#e;#t=E?D: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=wr(()=>(this.#m=Ht(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=U;t.b=this,t.f|=128,n(e)},this.parent=U.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=Cn(()=>{if(E){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()},Tr),E&&(this.#e=D)}#g(){try{this.#a=wn(()=>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=wn(()=>{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&&An(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){un(e,this.#i&&this.#i.parent)}}}}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=wn(()=>e(this.#e)),Xe(()=>{var e=this.#c=document.createDocumentFragment(),t=en(),n=!1;if(e.append(t),this.#a=this.#S(()=>{try{return wn(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){un(e,this.#i.parent)}return null}}),this.#a===null){this.#c=null,n&&this.#x(N);return}this.#u===0&&(this.#e.before(e),this.#c=null,An(this.#o,()=>{this.#o=null}),this.#x(N))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=wn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Pn(this.#a,e);let t=this.#n.pending;this.#o=wn(()=>t(this.#e))}else this.#x(N)}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=U,n=H,r=A;Vn(this.#i),Bn(this.#i),Ue(this.#i.ctx);try{return At.ensure(),e()}finally{Vn(t),Bn(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&&An(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&&Wt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),K(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;N?.is_fork?(this.#a&&N.skip_effect(this.#a),this.#o&&N.skip_effect(this.#o),this.#s&&N.skip_effect(this.#s),N.oncommit(()=>{this.#w(e)})):this.#w(e)}#w(e){this.#a&&=(V(this.#a),null),this.#o&&=(V(this.#o),null),this.#s&&=(V(this.#s),null),E&&(O(this.#t),Te(),O(Ee()));let t=this.#n.failed,n=e=>{let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&(this.#s=this.#S(()=>{try{return wn(()=>{var r=U;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return un(e,this.#i.parent),null}}))};Xe(()=>{var t;try{t=this.transform_error(e)}catch(e){un(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>un(e,this.#i&&this.#i.parent)):n(t)})}};function Or(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[ge]??=e.nodeValue)&&(e[ge]=n,e.nodeValue=`${n}`)}function kr(e,t){return Mr(e,t)}function Ar(t,n){$t(),n.intro=n.intro??!1;let r=n.target,i=E,a=D;try{for(var o=L(r);o&&(o.nodeType!==8||o.data!==`[`);)o=tn(o);if(!o)throw e;Ce(!0),O(o);let i=Mr(t,{...n,anchor:o});return Ce(!1),i}catch(i){if(i instanceof Error&&i.message.split(`
|
|
2
|
+
`).some(e=>e.startsWith(`https://svelte.dev/e/`)))throw i;return i!==e&&console.warn(`Failed to hydrate: `,i),n.recover===!1&&Le(),$t(),an(r),Ce(!1),kr(t,n)}finally{Ce(i),O(a)}}var jr=new Map;function Mr(t,{target:n,anchor:r,props:i={},events:a,context:o,intro:s=!0,transformError:l}){$t();var u=void 0,d=yn(()=>{var s=r??n.appendChild(en());Er(s,{pending:()=>{}},n=>{We({});var r=A;if(o&&(r.c=o),a&&(i.$$events=a),E&&vr(n,null),u=t(n,i)||Ke(),E&&(U.nodes.end=D,D===null||D.nodeType!==8||D.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=Cr(r);for(let e of[n,document]){var a=jr.get(e);a===void 0&&(a=new Map,jr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,mr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(c(cr)),lr.add(f),()=>{for(var e of d)for(let r of[n,document]){var t=jr.get(r),i=t.get(e);--i==0?(r.removeEventListener(e,mr),t.delete(e),t.size===0&&jr.delete(r)):t.set(e,i)}lr.delete(f),s!==r&&s.parentNode?.removeChild(s)}});return Nr.set(u,d),u}var Nr=new WeakMap;function Pr(e,t){let n=Nr.get(e);return n?(Nr.delete(e),n(t)):Promise.resolve()}var Fr=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)Mn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(Mn(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&&(V(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();Pn(r,t),t.append(en()),this.#n.set(e,{effect:r,fragment:t})}else V(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),An(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)||(V(n.effect),this.#n.delete(e))};ensure(e,t){var n=N,r=on();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=en();i.append(a),this.#n.set(e,{effect:wn(()=>t(a)),fragment:i})}else this.#t.set(e,wn(()=>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 E&&(this.anchor=D),this.#a(n)}};function Y(e,t,n=!1){var r;E&&(r=D,we());var i=new Fr(e),a=n?te:0;function o(e,t){if(E){var n=De(r);if(e!==parseInt(n.substring(1))){var a=Ee();O(a),i.anchor=a,Ce(!1),i.ensure(e,t),Ce(!0);return}}i.ensure(e,t)}Cn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Ir(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];An(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Lr(e,c(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else--o},!1)}if(o===0){var l=r.length===0&&n!==null&&e.pending.size===0;if(l){var u=n,d=u.parentNode;an(d),d.append(u),e.items.clear()}Lr(e,t,!l)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Lr(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=ie,Pn(a,document.createDocumentFragment())):V(t[i],n)}}var Rr;function zr(e,t,n,r,i,o=null){var s=e,l=new Map;if(t&4){var u=e;s=E?O(L(u)):u.appendChild(en())}E&&we();var d=null,f=mt(()=>{var e=n();return a(e)?e:e==null?[]:c(e)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=d,Vr(v,p,s,t,r),d!==null&&(p.length===0?d.f&33554432?(d.f^=ie,Ur(d,null,s)):Mn(d):An(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:Cn(()=>{p=K(f);var e=p.length;let a=!1;E&&De(s)===`[!`!=(e===0)&&(s=Ee(),O(s),Ce(!1),a=!0);for(var c=new Set,u=N,v=on(),y=0;y<e;y+=1){E&&D.nodeType===8&&D.data===`]`&&(s=D,a=!0,Ce(!1));var b=p[y],x=r(b,y),S=h?null:l.get(x);S?(S.v&&Wt(S.v,b),S.i&&Wt(S.i,y),v&&u.unskip_effect(S.e)):(S=Hr(l,h?s:Rr??=en(),b,x,y,i,t,n),h||(S.e.f|=ie),l.set(x,S)),c.add(x)}if(e===0&&o&&!d&&(h?d=wn(()=>o(s)):(d=wn(()=>o(Rr??=en())),d.f|=ie)),e>c.size&&Me(``,``,``),E&&e>0&&O(Ee()),!h)if(m.set(u,c),v){for(let[e,t]of l)c.has(e)||u.skip_effect(t.e);u.oncommit(g),u.ondiscard(_)}else g(u);a&&Ce(!0),K(f)}),flags:t,items:l,pending:m,outrogroups:null,fallback:d};h=!1,E&&(s=D)}function Br(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Vr(e,t,n,r,i){var a=(r&8)!=0,o=t.length,s=e.items,l=Br(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(a)for(v=0;v<o;v+=1)h=t[v],g=i(h,v),_=s.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<o;v+=1){if(h=t[v],g=i(h,v),_=s.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(Mn(_),a&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432)if(_.f^=ie,_===l)Ur(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Wr(e,d,_),Wr(e,_,y),Ur(_,y,n),d=_,p=[],m=[],l=Br(d.next);continue}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],ee=p[p.length-1];for(x=0;x<p.length;x+=1)Ur(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Wr(e,S.prev,ee.next),Wr(e,d,S),Wr(e,ee,b),l=b,d=ee,--v,p=[],m=[]}else u.delete(_),Ur(_,l,n),Wr(e,_.prev,_.next),Wr(e,_,d===null?e.effect.first:d.next),Wr(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=Br(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Br(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Lr(e,c(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var C=[];if(u!==void 0)for(_ of u)_.f&8192||C.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&C.push(l),l=Br(l.next);var w=C.length;if(w>0){var T=r&4&&o===0?n:null;if(a){for(v=0;v<w;v+=1)C[v].nodes?.a?.measure();for(v=0;v<w;v+=1)C[v].nodes?.a?.fix()}Ir(e,C,T)}}a&&Xe(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Hr(e,t,n,r,i,a,o,s){var c=o&1?o&16?Ht(n):Ut(n,!1,!1):null,l=o&2?Ht(i):null;return{v:c,i:l,e:wn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Ur(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=tn(r);if(a.before(r),r===i)return;r=o}}function Wr(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Gr(t,n,a=!1,o=!1,s=!1,c=!1){var l=t,u=``;if(a){var d=t;E&&(l=O(L(d)))}B(()=>{var t=U;if(u===(u=n()??``)){E&&we();return}if(a&&!E){t.nodes=null,d.innerHTML=u,u!==``&&vr(L(d),d.lastChild);return}if(t.nodes!==null&&(On(t.nodes.start,t.nodes.end),t.nodes=null),u!==``){if(E){for(var c=D.data,f=we(),p=f;f!==null&&(f.nodeType!==8||f.data!==``);)p=f,f=tn(f);if(f===null)throw xe(),e;vr(D,p),l=O(f);return}var m=sn(o?`svg`:s?`math`:`template`,o?r:s?i:void 0);m.innerHTML=u;var h=o||s?m:m.content;if(vr(L(h),h.lastChild),o||s)for(;L(h);)l.before(L(h));else l.before(h)}})}function Kr(e,t){bn(()=>{e=U?.parent?.nodes?.start??e;var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=sn(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}var qr=[...`
|
|
3
|
+
\r\f\xA0\v`];function Jr(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||qr.includes(r[o-1]))&&(s===r.length||qr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Yr(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Xr(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Zr(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Xr)),i&&c.push(...Object.keys(i).map(Xr));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Xr(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Yr(r)),i&&(n+=Yr(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Qr(e,t,n,r,i,a){var o=e[me];if(E||o!==n||o===void 0){var s=Jr(n,r,a);(!E||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[me]=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}function $r(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function ei(e,t,n,r){var i=e[he];if(E||i!==t){var a=Zr(t,r);(!E||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[he]=t}else r&&(Array.isArray(r)?($r(e,n?.[0],r[0]),$r(e,n?.[1],r[1],`important`)):$r(e,n,r));return r}var ti=Symbol(`is custom element`),ni=Symbol(`is html`),ri=ye?`link`:`LINK`,ii=ye?`progress`:`PROGRESS`;function ai(e){if(E){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;X(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;X(e,`checked`,null),e.checked=r}}};e[_e]=n,Xe(n),at()}}function oi(e,t){var n=ci(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==ii)||(e.value=t??``)}function si(e,t){var n=ci(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function X(e,t,n,r){var i=ci(e);E&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===ri)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[fe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ui(e).has(t)?e[t]=n:e.setAttribute(t,n))}function ci(e){return e[pe]??={[ti]:e.nodeName.includes(`-`),[ni]:e.namespaceURI===n}}var li=new Map;function ui(e){var t=e.getAttribute(`is`)||e.nodeName,n=li.get(t);if(n)return n;li.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 di(e,t){return e===t||e?.[le]===t}function fi(e=Ke(),t,n,r){var i=A.r,a=U;return bn(()=>{var o,s;return Sn(()=>{o=s,s=r?.()||[],or(()=>{di(n(...s),e)||(t(e,...s),o&&di(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&&di(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function Z(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??=dt(r),K(l)):(c&&(c=!1,s=o?or(r):r),s);let f;if(a){var p=le in e||de 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 _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?dt:mt)(()=>(v=!1,g()));a&&K(y);var b=U;return(function(e,t){if(arguments.length>0){let n=t?K(y):i&&a?Jt(e):e;return I(y,n),v=!0,s!==void 0&&(s=n),e}return Ln&&v||b.f&16384?y.v:K(y)})}function pi(e){return new mi(e)}var mi=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=Ut(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return K(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===de?!0:(K(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return I(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?Ar:kr)(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)&&P(),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=()=>{Pr(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()}},hi;typeof HTMLElement==`function`&&(hi=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=sn(`slot`);e!=="default"&&(n.name=e),J(t,n)}}let t={},n=_i(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]=gi(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=pi({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=vn(()=>{Sn(()=>{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=gi(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]=gi(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 gi(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 _i(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function vi(e,t,n,r,i,a){let o=class extends hi{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=gi(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}function yi(e){return e.hasAudio?e.audioUrl?e.useFeatureButtonAudio?`feature-button`:`controls`:`error`:`none`}var bi={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`}},xi={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`}},Q=e=>typeof e==`string`,Si=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Ci=e=>e==null?``:``+e,wi=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Ti=/###/g,Ei=e=>e&&e.indexOf(`###`)>-1?e.replace(Ti,`.`):e,Di=e=>!e||Q(e),Oi=(e,t,n)=>{let r=Q(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(Di(e))return{};let t=Ei(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Di(e)?{}:{obj:e,k:Ei(r[i])}},ki=(e,t,n)=>{let{obj:r,k:i}=Oi(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=Oi(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Oi(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Ai=(e,t,n,r)=>{let{obj:i,k:a}=Oi(e,t,Object);i[a]=i[a]||[],i[a].push(n)},ji=(e,t)=>{let{obj:n,k:r}=Oi(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Mi=(e,t,n)=>{let r=ji(e,n);return r===void 0?ji(t,n):r},Ni=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?Q(e[r])||e[r]instanceof String||Q(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Ni(e[r],t[r],n):e[r]=t[r]);return e},Pi=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Fi={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},Ii=e=>Q(e)?e.replace(/[&<>"'\/]/g,e=>Fi[e]):e,Li=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}},Ri=[` `,`,`,`?`,`!`,`;`],zi=new Li(20),Bi=(e,t,n)=>{t||=``,n||=``;let r=Ri.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=zi.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},Vi=(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},Hi=e=>e?.replace(/_/g,`-`),Ui={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)}},Wi=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Ui,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:(Q(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)}},Gi=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])})}},Ki=class extends Gi{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):Q(n)&&i?o.push(...n.split(i)):o.push(n)));let s=ji(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!Q(n)?s:Vi(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),ki(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)(Q(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=ji(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Ni(s,n,i):s={...s,...n},ki(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}},qi={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}},Ji=Symbol(`i18next/PATH_KEY`);function Yi(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Ji?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Xi(e,t){let{[Ji]:n}=e(Yi()),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 Zi={},Qi=e=>!Q(e)&&typeof e!=`boolean`&&typeof e!=`number`,$i=class e extends Gi{constructor(e,t={}){super(),wi([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Wi.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=Qi(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&&!Bi(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Q(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:Q(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=Xi(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Xi(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,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!Q(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,ee=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,C=b&&!i.ordinal&&i.count===0,w=C&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${ee}`]||i.defaultValue,T=m;y&&!m&&x&&(T=w);let te=Qi(T),ne=Object.prototype.toString.apply(T);if(y&&T&&te&&_.indexOf(ne)<0&&!(Q(v)&&Array.isArray(T))){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,T,{...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(T),t=e?[]:{},n=e?g:h;for(let e in T)if(Object.prototype.hasOwnProperty.call(T,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:Qi(w)?w[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=T[e])}m=t}}else if(y&&Q(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=w),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&w!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?w: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=x&&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&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);C&&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}`]||w)})}):n(e,s,w))}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=Q(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&&!Q(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=Q(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=qi.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 Q(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Xi(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&&!Q(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(Q(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,!Zi[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(Zi[`${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&&!Q(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}},ea=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Wi.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Hi(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=Hi(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Q(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)),Q(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 Q(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))):Q(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},ta={zero:0,one:1,two:2,few:3,many:4,other:5},na={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},ra=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Wi.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Hi(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!`),na;if(!e.match(/-|_/))return na;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)=>ta[e]-ta[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))}},ia=(e,t,n,r=`.`,i=!0)=>{let a=Mi(e,t,n);return!a&&i&&Q(n)&&(a=Vi(e,n,r),a===void 0&&(a=Vi(t,n,r))),a},aa=e=>e.replace(/\$/g,`$$$$`),oa=class{constructor(e={}){this.logger=Wi.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:_}=e.interpolation;this.escape=t===void 0?Ii:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?Pi(i):a||`{{`,this.suffix=o?Pi(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?Pi(d):f||Pi(`$t(`),this.nestingSuffix=p?Pi(p):m||Pi(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,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=ia(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(ia(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=>aa(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?aa(this.escape(e)):aa(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=Q(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!Q(a)&&!this.useRawValueToEscape&&(a=Ci(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(`${Pi(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&&!Q(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&&!Q(i))return i;Q(i)||(i=Ci(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}},sa=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}},ca=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(Hi(r),i),t[o]=s),s(n)}},la=e=>(t,n,r)=>e(Hi(n),r)(t),ua=class{constructor(e={}){this.logger=Wi.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?ca:la;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()]=ca(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}=sa(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)}},da=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},fa=class extends Gi{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Wi.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=>{Ai(n.loaded,[i],a),da(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();Q(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Q(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)}}},pa=()=>({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]),Q(e[1])&&(t.defaultValue=e[1]),Q(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}),ma=e=>(Q(e.ns)&&(e.ns=[e.ns]),Q(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Q(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),ha=()=>{},ga=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},_a=`__i18next_supportNoticeShown`,va=()=>!!(typeof globalThis<`u`&&globalThis[_a]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env&&process.env.NODE_ENV===`production`),ya=()=>{typeof globalThis<`u`&&(globalThis[_a]=!0)},ba=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 Gi{constructor(e={},t){if(super(),this.options=ma(e),this.services={},this.logger=Wi,this.modules={external:[]},ga(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&&(Q(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=pa();this.options={...n,...this.options,...ma(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&&!ba(this)&&!va()&&(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 💙`),ya());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Wi.init(r(this.modules.logger),this.options):Wi.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:ua;let t=new ea(this.options);this.store=new Ki(this.options.resources,this.options);let i=this.services;i.logger=Wi,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new ra(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 oa(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new fa(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 $i(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||=ha,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=Si(),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=ha){let n=t,r=Q(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=Si();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||=ha,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`&&qi.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=Si();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=Q(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Q(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=Xi(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=Xi(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=Xi(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return Q(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=Si();return this.options.ns?(Q(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=Si();Q(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 ea(pa());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=ha){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 Ki(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={...pa().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new oa(n)}return a.translator=new $i(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:bi,es:xi}});var{translator:xa}={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 Sa(e,t,n={}){return xa.t(`translation:mcPopulatedBlank:${e}`,{lng:t,...n,interpolation:{escapeValue:!1}})}function Ca(e,t){return xa.t(`common:${e}`,{lng:t})}var wa=q(`<audio class="sr-only pie-audio-player svelte-ypdwb3" preload="metadata" aria-hidden="true" tabindex="-1"></audio> <button class="listen-button pie-listen-button rli-feature-audio svelte-ypdwb3" type="button"><img/> <img/></button>`,1),Ta=q(`<button class="autoplay-enable pie-audio-autoplay-enable svelte-ypdwb3" type="button"> </button>`),Ea=q(`<audio controls="" class="audio-controls pie-audio-player svelte-ypdwb3" preload="metadata"><track kind="captions"/></audio> <!>`,1),Da=q(`<p class="audio-error pie-audio-error svelte-ypdwb3" role="alert"> </p>`),Oa=q(`<div class="audio-container pie-audio-container svelte-ypdwb3"><!></div>`),ka={hash:`svelte-ypdwb3`,code:`.audio-container.svelte-ypdwb3 {margin-bottom:1rem;}.audio-controls.svelte-ypdwb3 {display:block;width:100%;max-width:28rem;}.autoplay-enable.svelte-ypdwb3 {margin-top:0.5rem;padding:0;border:0;background:transparent;font:inherit;font-size:0.875rem;line-height:calc(1.25 / 0.875);color:inherit;text-decoration-line:underline;}.audio-error.svelte-ypdwb3 {margin:0;font-size:0.875rem;line-height:calc(1.25 / 0.875);color:var(--pie-incorrect-icon, #c10007);}.listen-button.svelte-ypdwb3 {width:var(--mpb-listen-button-size, 128px);height:var(--mpb-listen-button-size, 128px);border:0;padding:0;background-color:transparent;cursor:pointer;z-index:1;}.listen-button.svelte-ypdwb3:hover {background-color:#e2f1fe;}.listen-feature-icon.svelte-ypdwb3 {width:var(--mpb-listen-button-size, 128px);height:var(--mpb-listen-button-size, 128px);object-fit:contain;display:none;}.listen-feature-icon.listen-active.svelte-ypdwb3 {display:block;}.sr-only.svelte-ypdwb3 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}`};function Aa(e,t){We(t,!0),Kr(e,ka);let n={IDLE:`idle`,PLAYING:`playing`,BLOCKED:`blocked`,PAUSED:`paused`},r=Z(t,`hasAudio`,7,!1),i=Z(t,`audioUrl`,7),a=Z(t,`useFeatureButtonAudio`,7,!1),o=Z(t,`autoplayEnabled`,7,!1),s=Z(t,`featureAudioSkin`,7),c=Z(t,`language`,7),l=Z(t,`onaudiostarted`,7),u=Z(t,`onaudioended`,7),d=F(null),f=F(null),p=F(null),m=F(Jt(n.IDLE)),h=M(()=>yi({hasAudio:r(),audioUrl:i(),useFeatureButtonAudio:a()})),g=M(()=>K(m)===n.PLAYING),_=M(()=>K(m)===n.BLOCKED),v=M(()=>K(h)===`error`?Sa(`audioResourceUnavailable`,c()):``);gn(()=>{i(),I(m,n.IDLE,!0)});function y(){K(h)!==`none`&&K(h)!==`error`&&K(d)&&K(d).play().catch(()=>{})}function b(){K(h)!==`none`&&K(h)!==`error`&&K(d)&&K(d).play().finally(()=>{K(m)===n.BLOCKED&&I(m,n.PAUSED,!0)})}function x(e,t,n){gn(()=>{let r=e();if(r)return r.addEventListener(t,n),()=>r.removeEventListener(t,n)})}x(()=>K(d),`playing`,()=>{I(m,n.PLAYING,!0),l()?.()}),x(()=>K(d),`ended`,()=>{I(m,n.PAUSED,!0),u()?.()}),x(()=>K(f),`click`,()=>y()),x(()=>K(p),`click`,()=>b()),gn(()=>{!o()||K(h)===`none`||K(h)===`error`||K(m)===n.IDLE&&K(d)&&i()&&(I(m,n.PAUSED,!0),K(d).play().catch(()=>{I(m,n.BLOCKED,!0)}))});var S={get hasAudio(){return r()},set hasAudio(e=!1){r(e),P()},get audioUrl(){return i()},set audioUrl(e){i(e),P()},get useFeatureButtonAudio(){return a()},set useFeatureButtonAudio(e=!1){a(e),P()},get autoplayEnabled(){return o()},set autoplayEnabled(e=!1){o(e),P()},get featureAudioSkin(){return s()},set featureAudioSkin(e){s(e),P()},get language(){return c()},set language(e){c(e),P()},get onaudiostarted(){return l()},set onaudiostarted(e){l(e),P()},get onaudioended(){return u()},set onaudioended(e){u(e),P()}},ee=xr(),C=nn(ee),w=e=>{var t=Oa(),n=R(t),r=e=>{var t=wa(),n=nn(t);fi(n,e=>I(d,e),()=>K(d));var r=z(n,2),a=R(r),o=z(a,2);k(r),fi(r,e=>I(f,e),()=>K(f)),B((e,t,c)=>{X(n,`src`,i()),X(r,`aria-label`,e),Qr(a,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${K(g)?``:`listen-active`}`,`svelte-ypdwb3`),X(a,`src`,s().silentUrl),X(a,`alt`,t),Qr(o,1,`listen-feature-icon pie-listen-icon rli-feature-listen ${K(g)?`listen-active`:``}`,`svelte-ypdwb3`),X(o,`src`,s().playingUrl),X(o,`alt`,c)},[()=>Sa(`listen`,c()),()=>Sa(`listenSilentAlt`,c()),()=>Sa(`listenPlayingAlt`,c())]),J(e,t)},a=e=>{var t=Ea(),n=nn(t);fi(n,e=>I(d,e),()=>K(d));var r=z(n,2),a=e=>{var t=Ta(),n=rn(t,!0);fi(t,e=>I(p,e),()=>K(p)),B(e=>Or(n,e),[()=>Sa(`clickToEnableAutoplay`,c())]),J(e,t)};Y(r,e=>{K(_)&&e(a)}),B(()=>X(n,`src`,i())),J(e,t)},o=e=>{var t=Da(),n=rn(t,!0);B(()=>Or(n,K(v))),J(e,t)};Y(n,e=>{K(h)===`feature-button`?e(r):K(h)===`controls`?e(a,1):K(h)===`error`&&e(o,2)}),k(t),J(e,t)};return Y(C,e=>{K(h)!==`none`&&e(w)}),J(e,ee),Ge(S)}vi(Aa,{hasAudio:{},audioUrl:{},useFeatureButtonAudio:{},autoplayEnabled:{},featureAudioSkin:{},language:{},onaudiostarted:{},onaudioended:{}},[],[],{mode:`open`});var ja=q(`<img class="cloze-marker-image pie-blank-image svelte-d9l5tb" style="max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);"/>`),Ma=q(`<span class="cloze-marker-value pie-blank-value svelte-d9l5tb"></span>`),Na=q(`<span class="cloze-marker-empty svelte-d9l5tb"><span aria-hidden="true"> </span> <span class="sr-only svelte-d9l5tb"> </span></span>`),Pa=q(`<span role="status" aria-live="polite" aria-atomic="true"><!></span>`),Fa={hash:`svelte-d9l5tb`,code:`
|
|
4
|
+
/* The underline width comes from the inline style (layoutLimits); the colour
|
|
5
|
+
follows the text. */.cloze-marker.svelte-d9l5tb {display:inline-flex;align-items:center;justify-content:center;text-align:center;vertical-align:baseline;padding-inline:0.5rem;border-bottom:2px solid currentColor;}.cloze-marker.svelte-d9l5tb:focus-within {outline:2px solid var(--mpb-focus-ring, #1565c0);outline-offset:2px;}.cloze-marker-standalone.svelte-d9l5tb {width:var(--mpb-blank-standalone-width, 7rem);}.cloze-marker-image.svelte-d9l5tb {object-fit:contain;}.cloze-marker-empty.svelte-d9l5tb {display:inline-block;min-width:4ch;}.cloze-marker-value.svelte-d9l5tb {width:100%;display:inline-flex;align-items:center;justify-content:center;text-align:center;}.cloze-marker-value.svelte-d9l5tb p {margin:0;}
|
|
6
|
+
|
|
7
|
+
/* Same 150x150 content-element constraint as ChoiceRow.svelte's .choice-html
|
|
8
|
+
img — the selected choice's raw labelHtml can carry an embedded <img> here
|
|
9
|
+
too, regardless of customType. See CONTOOL-3159. */.cloze-marker-value.svelte-d9l5tb img {width:150px;height:150px;}.sr-only.svelte-d9l5tb {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}`};function Ia(e,t){We(t,!0),Kr(e,Fa);let n=Z(t,`choiceMode`,7,`text`),r=Z(t,`displayChoice`,7,void 0),i=Z(t,`displayChoiceLabelHtml`,7,``),a=Z(t,`isStandalone`,7,!1),o=Z(t,`blankWidth`,7),s=Z(t,`blankBorderWidth`,7),c=Z(t,`ariaLabel`,7),l=Z(t,`language`,7);var u={get choiceMode(){return n()},set choiceMode(e=`text`){n(e),P()},get displayChoice(){return r()},set displayChoice(e=void 0){r(e),P()},get displayChoiceLabelHtml(){return i()},set displayChoiceLabelHtml(e=``){i(e),P()},get isStandalone(){return a()},set isStandalone(e=!1){a(e),P()},get blankWidth(){return o()},set blankWidth(e){o(e),P()},get blankBorderWidth(){return s()},set blankBorderWidth(e){s(e),P()},get ariaLabel(){return c()},set ariaLabel(e){c(e),P()},get language(){return l()},set language(e){l(e),P()}},d=Pa(),f=R(d),p=e=>{var t=ja();B(e=>{X(t,`src`,r().imageUrl),X(t,`alt`,e)},[()=>r().imageAlt||Sa(`selectedAnswerImage`,l())]),J(e,t)},m=e=>{var t=Ma();Gr(t,i,!0),k(t),J(e,t)},h=e=>{var t=Na(),n=rn(z(R(t),2),!0);k(t),B(e=>Or(n,e),[()=>Sa(`emptyBlank`,l())]),J(e,t)};return Y(f,e=>{n()===`image`&&r()?.imageUrl?e(p):i()?e(m,1):e(h,-1)}),k(d),B(()=>{Qr(d,1,`cloze-marker pie-blank-slot ${a()?`cloze-marker-standalone pie-blank-slot-standalone`:``}`,`svelte-d9l5tb`),ei(d,`width:${o()};border-bottom-width:${s()};`),X(d,`aria-label`,c())}),J(e,d),Ge(u)}vi(Ia,{choiceMode:{},displayChoice:{},displayChoiceLabelHtml:{},isStandalone:{},blankWidth:{},blankBorderWidth:{},ariaLabel:{},language:{}},[],[],{mode:`open`});var La=q(`<img class="choice-image pie-choice-image svelte-8xu1pt" style="max-width:var(--mpb-choice-image-max-width, 9.375rem);max-height:var(--mpb-choice-image-max-height, 9.375rem);"/>`),Ra=q(`<span class="choice-html pie-choice-label svelte-8xu1pt"></span>`),za=q(`<label class="choice-tile pie-choice-tile svelte-8xu1pt"><span class="choice-tile-content pie-choice-tile-content svelte-8xu1pt"><!></span> <input type="radio" class="choice-radio-bottom pie-choice-radio pie-choice-radio-bottom svelte-8xu1pt"/></label>`),Ba=q(`<img class="choice-image pie-choice-image svelte-8xu1pt" style="max-height:var(--mpb-choice-image-max-height, 5rem);"/>`),Va=q(`<input type="radio" class="choice-radio-inline pie-choice-radio pie-choice-radio-inline svelte-8xu1pt"/> <label class="choice-label-wrap pie-choice-label-wrap svelte-8xu1pt"><!></label>`,1),Ha=q(`<span aria-hidden="true"> </span>`),Ua=q(`<div style="gap:var(--mpb-choice-row-gap, 0.5rem);"><!> <!></div>`),Wa={hash:`svelte-8xu1pt`,code:`.choice-row.svelte-8xu1pt {display:flex;align-items:flex-start;}.choice-row-horizontal.svelte-8xu1pt {flex-direction:column;align-items:center;width:min(var(--mpb-choice-width-px, 170px), var(--mpb-choice-width-vw, 30vw));min-height:var(--mpb-choice-tile-min-height, 11rem);gap:0;}.choice-tile.svelte-8xu1pt {display:flex;flex-direction:column;justify-content:space-between;align-items:center;width:100%;min-height:var(--mpb-choice-tile-min-height, 11rem);padding:0.8rem 0.65rem 0.5rem;border-radius:8px;background:transparent;transition:background-color 120ms ease-in-out;cursor:pointer;text-align:center;}.choice-tile-content.svelte-8xu1pt {width:100%;display:flex;align-items:center;justify-content:center;min-height:var(--mpb-choice-content-min-height, 7.5rem);}.choice-image.svelte-8xu1pt {display:block;object-fit:contain;}.choice-label-wrap.svelte-8xu1pt {flex:1 1 0%;cursor:pointer;}.choice-row-horizontal.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-hover-bg, var(--pie-background-dark, #ecedf1));}.pie-choice-horizontal.svelte-8xu1pt:not(.is-selected):not(:hover) .pie-choice-tile:where(.svelte-8xu1pt) {background:transparent;}.choice-row-horizontal.is-selected.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-selected-bg, var(--pie-secondary-background, rgba(241, 241, 241, 1)));}.choice-row-horizontal.is-selected.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-selected-bg, var(--pie-secondary-background, rgba(241, 241, 241, 1)));}.pie-choice.svelte-8xu1pt:not(.pie-choice-horizontal):hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-background-dark, #ecedf1);}.pie-choice.svelte-8xu1pt:not(.pie-choice-horizontal):not(.is-selected):not(:hover) .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:transparent;}.pie-choice:not(.pie-choice-horizontal).is-selected.svelte-8xu1pt .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-secondary-background, rgba(241, 241, 241, 1));border-radius:6px;}.pie-choice:not(.pie-choice-horizontal).is-selected.svelte-8xu1pt:hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-secondary-background, rgba(241, 241, 241, 1));}.pie-choice.choice-correct.svelte-8xu1pt {border-left:3px solid var(--pie-correct-tertiary, #0ea449);}.pie-choice.choice-incorrect.svelte-8xu1pt {border-left:3px solid var(--pie-incorrect-icon, #bf0d00);}.pie-choice-horizontal.choice-correct.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-correct-secondary, #e8f5e9);}.pie-choice-horizontal.choice-incorrect.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-incorrect-secondary, #ffebee);}.pie-choice-feedback-badge.svelte-8xu1pt {margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:1.1rem;height:1.1rem;border-radius:9999px;font-size:0.72rem;line-height:1;font-weight:700;color:var(--pie-white, #ffffff);}.pie-choice-feedback-correct.svelte-8xu1pt {background:var(--pie-correct-icon, #087d38);}.pie-choice-feedback-incorrect.svelte-8xu1pt {background:var(--pie-incorrect-icon, #bf0d00);}.choice-row-horizontal.svelte-8xu1pt p {margin:0;text-align:center;}.choice-html.svelte-8xu1pt p {margin:0;}.choice-html.svelte-8xu1pt {width:100%;display:inline-flex;align-items:center;justify-content:center;text-align:center;}
|
|
10
|
+
|
|
11
|
+
/* Choices carrying raw <img> markup in labelHtml (rather than the dedicated
|
|
12
|
+
imageUrl/imageAlt fields) render unconstrained at their authored size
|
|
13
|
+
otherwise — 3rd-party/CQT-sourced content is typically authored well above
|
|
14
|
+
the platform's 150x150 content-element spec. Applies regardless of
|
|
15
|
+
customType, unlike the r1-CQT-specific cqt-css overlays. See CONTOOL-3159. */.choice-html.svelte-8xu1pt img {width:150px;height:150px;}
|
|
16
|
+
|
|
17
|
+
/* Only the top margin is spaced; the browser's own radio side margins would
|
|
18
|
+
otherwise offset the control from its label (the demo app's preflight zeroed them). */.choice-radio-bottom.svelte-8xu1pt {margin:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem) 0 0;padding:var(--mpb-choice-radio-padding, 0px);}.choice-radio-inline.svelte-8xu1pt {margin:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem) 0 0;}`};function Ga(e,t){We(t,!0),Kr(e,Wa);let n=Z(t,`choice`,7),r=Z(t,`choiceMode`,7,`text`),i=Z(t,`isHorizontal`,7,!1),a=Z(t,`isSelected`,7,!1),o=Z(t,`isDisabled`,7,!1),s=Z(t,`correctness`,7,void 0),c=Z(t,`isEvaluateMode`,7,!1),l=Z(t,`instanceId`,7),u=Z(t,`radioGroupName`,7),d=Z(t,`language`,7);var f={get choice(){return n()},set choice(e){n(e),P()},get choiceMode(){return r()},set choiceMode(e=`text`){r(e),P()},get isHorizontal(){return i()},set isHorizontal(e=!1){i(e),P()},get isSelected(){return a()},set isSelected(e=!1){a(e),P()},get isDisabled(){return o()},set isDisabled(e=!1){o(e),P()},get correctness(){return s()},set correctness(e=void 0){s(e),P()},get isEvaluateMode(){return c()},set isEvaluateMode(e=!1){c(e),P()},get instanceId(){return l()},set instanceId(e){l(e),P()},get radioGroupName(){return u()},set radioGroupName(e){u(e),P()},get language(){return d()},set language(e){d(e),P()}},p=Ua(),m=R(p),h=e=>{var t=za(),i=R(t),s=R(i),c=e=>{var t=La();B(e=>{X(t,`src`,n().imageUrl),X(t,`alt`,e)},[()=>n().imageAlt||Sa(`choiceImage`,d(),{id:n().id})]),J(e,t)},f=e=>{var t=Ra();Gr(t,()=>n().labelHtml||``,!0),k(t),J(e,t)};Y(s,e=>{r()===`image`&&n().imageUrl?e(c):e(f,-1)}),k(i);var p=z(i,2);ai(p),k(t),B(()=>{X(t,`for`,`${l()}-opt-${n().id}`),X(p,`name`,u()),X(p,`id`,`${l()}-opt-${n().id}`),oi(p,n().id),si(p,a()),p.disabled=o()}),J(e,t)},g=e=>{var t=Va(),i=nn(t);ai(i);var s=z(i,2),c=R(s),f=e=>{var t=Ba();B(e=>{X(t,`src`,n().imageUrl),X(t,`alt`,e)},[()=>n().imageAlt||Sa(`choiceImage`,d(),{id:n().id})]),J(e,t)},p=e=>{var t=Ra();Gr(t,()=>n().labelHtml||``,!0),k(t),J(e,t)};Y(c,e=>{r()===`image`&&n().imageUrl?e(f):e(p,-1)}),k(s),B(()=>{X(i,`name`,u()),X(i,`id`,`${l()}-opt-${n().id}`),oi(i,n().id),si(i,a()),i.disabled=o(),X(s,`for`,`${l()}-opt-${n().id}`)}),J(e,t)};Y(m,e=>{i()?e(h):e(g,-1)});var _=z(m,2),v=e=>{var t=Ha(),n=rn(t,!0);B(()=>{Qr(t,1,`pie-choice-feedback-badge ${s()===`correct`?`pie-choice-feedback-correct`:`pie-choice-feedback-incorrect`}`,`svelte-8xu1pt`),Or(n,s()===`correct`?`✓`:`✕`)}),J(e,t)};return Y(_,e=>{c()&&s()&&e(v)}),k(p),B(()=>Qr(p,1,`choice-row pie-choice ${i()?`choice-row-horizontal pie-choice-horizontal`:``} ${a()?`is-selected pie-choice-selected`:``} ${s()?`choice-${s()} pie-choice-${s()}`:``}`,`svelte-8xu1pt`)),J(e,p),Ge(f)}vi(Ga,{choice:{},choiceMode:{},isHorizontal:{},isSelected:{},isDisabled:{},correctness:{},isEvaluateMode:{},instanceId:{},radioGroupName:{},language:{}},[],[],{mode:`open`});var Ka=q(`<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>`),qa={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(--mpb-focus-ring, var(--pie-focus-outline, #1565c0));outline-offset:2px;}.teacher-instructions-content.svelte-1jhejbv {padding-top:1rem;}`};function Ja(e,t){We(t,!0),Kr(e,qa);let n=Z(t,`html`,7),r=Z(t,`language`,7),i=F(!1),a=`mpb-teacher-instructions-${Math.random().toString(36).slice(2,10)}`;var o={get html(){return n()},set html(e){n(e),P()},get language(){return r()},set language(e){r(e),P()}},s=Ka(),c=R(s),l=rn(c,!0),u=z(c,2);return Gr(u,n,!0),k(u),k(s),B(e=>{X(c,`aria-expanded`,K(i)),X(c,`aria-controls`,a),Or(l,e),X(u,`id`,a),X(u,`hidden`,!K(i))},[()=>Ca(K(i)?`hideTeacherInstructions`:`showTeacherInstructions`,r())]),ur(`click`,c,()=>I(i,!K(i))),J(e,s),Ge(o)}dr([`click`]),vi(Ja,{html:{},language:{}},[],[],{mode:`open`});function Ya(e){let t=new Map,{isEvaluateMode:n,correctChoiceId:r,selectedId:i,showCorrectAnswer:a}=e;return!n||!r?t:a?(t.set(r,`correct`),t):i?i===r?(t.set(r,`correct`),t):(t.set(i,`incorrect`),t.set(r,`incorrect`),t):(t.set(r,`incorrect`),t)}var Xa=`{{blank}}`,Za=new Set([`audio_blank_only`,`stimulus_image_blank`,`token_sequence`]);function Qa(e){let{interactionMode:t=``,template:n=``,choiceLayout:r,layoutProfile:i=``,hasAudio:a=!1,useFeatureButtonAudio:o}=e,s=t===`audio_mc_only`,c=n?n.replace(/<[^>]+>/g,``).replace(/ /g,` `).trim()===Xa:!1,l=r===`horizontal`||r===`vertical`?r:s||c?`horizontal`:`vertical`;return{isAudioOnlyMode:s,isBlankOnlyTemplate:c,choiceLayout:l,isHorizontalChoices:l===`horizontal`,hasInlineSentenceAudioLayout:i===`inline_sentence`&&a,useFeatureButtonAudio:typeof o==`boolean`?o:a&&Za.has(i)}}var $a={blankStandaloneWidthRem:7,blankWideWidthRem:10,blankUnderlineWidthPx:2,blankUnderlineWideWidthPx:4,horizontalChoiceWidthPx:170,horizontalChoiceWidthVw:30,horizontalChoiceTileMinHeightRem:11,horizontalChoiceContentMinHeightRem:7.5,choiceImageMaxHeightRem:9.375,choiceImageMaxWidthRem:9.375,listenButtonSizePx:128,stimulusMinColumnPx:210,textMinColumnPx:260,legendMaxChars:120,choiceGroupGapRem:.5,choiceRowGapRem:.5,toggleButtonGapRem:.5,horizontalChoiceRadioTopMarginRem:.5,audioBlankTemplateMarginTopRem:.8,audioBlankTemplateMarginBottomRem:1.8,audioInstructionsMaxWidthPx:875,narrowHorizontalChoiceMaxWidthPx:230,stimulusGridColumnGapRem:2,stimulusGridRowGapRem:.7,stimulusSentenceMarginTopRem:.2,stimulusChoicesMarginTopRem:.9,tokenGridColumnGapRem:1.5,tokenGridRowGapRem:.8,tokenTemplateMarginTopRem:.6,tokenInlineTokenGapRem:.35,tokenChoicesMarginTopRem:.2,inlineGridColumnGapRem:1.5,inlineGridRowGapRem:.65,inlineTemplateMarginTopRem:.45,inlineChoicesMarginTopRem:.25},eo={blankStandaloneWidthRem:{varName:`--mpb-blank-standalone-width`,unit:`rem`},blankWideWidthRem:{varName:`--mpb-blank-wide-width`,unit:`rem`},blankUnderlineWidthPx:{varName:`--mpb-blank-underline-width`,unit:`px`},blankUnderlineWideWidthPx:{varName:`--mpb-blank-underline-wide-width`,unit:`px`},horizontalChoiceWidthPx:{varName:`--mpb-choice-width-px`,unit:`px`},horizontalChoiceWidthVw:{varName:`--mpb-choice-width-vw`,unit:`vw`},horizontalChoiceTileMinHeightRem:{varName:`--mpb-choice-tile-min-height`,unit:`rem`},horizontalChoiceContentMinHeightRem:{varName:`--mpb-choice-content-min-height`,unit:`rem`},choiceImageMaxHeightRem:{varName:`--mpb-choice-image-max-height`,unit:`rem`},choiceImageMaxWidthRem:{varName:`--mpb-choice-image-max-width`,unit:`rem`},choiceGroupGapRem:{varName:`--mpb-choice-group-gap`,unit:`rem`},choiceRowGapRem:{varName:`--mpb-choice-row-gap`,unit:`rem`},horizontalChoiceRadioTopMarginRem:{varName:`--mpb-horizontal-choice-radio-top-margin`,unit:`rem`},narrowHorizontalChoiceMaxWidthPx:{varName:`--mpb-narrow-choice-max-width`,unit:`px`},toggleButtonGapRem:{varName:`--mpb-toggle-button-gap`,unit:`rem`},listenButtonSizePx:{varName:`--mpb-listen-button-size`,unit:`px`},audioBlankTemplateMarginTopRem:{varName:`--mpb-audio-blank-template-margin-top`,unit:`rem`},audioBlankTemplateMarginBottomRem:{varName:`--mpb-audio-blank-template-margin-bottom`,unit:`rem`},audioInstructionsMaxWidthPx:{varName:`--mpb-audio-instructions-max-width`,unit:`px`},stimulusMinColumnPx:{varName:`--mpb-stimulus-min-column`,unit:`px`},textMinColumnPx:{varName:`--mpb-text-min-column`,unit:`px`},stimulusGridColumnGapRem:{varName:`--mpb-stimulus-grid-column-gap`,unit:`rem`},stimulusGridRowGapRem:{varName:`--mpb-stimulus-grid-row-gap`,unit:`rem`},stimulusSentenceMarginTopRem:{varName:`--mpb-stimulus-sentence-margin-top`,unit:`rem`},stimulusChoicesMarginTopRem:{varName:`--mpb-stimulus-choices-margin-top`,unit:`rem`},tokenGridColumnGapRem:{varName:`--mpb-token-grid-column-gap`,unit:`rem`},tokenGridRowGapRem:{varName:`--mpb-token-grid-row-gap`,unit:`rem`},tokenTemplateMarginTopRem:{varName:`--mpb-token-template-margin-top`,unit:`rem`},tokenInlineTokenGapRem:{varName:`--mpb-token-inline-token-gap`,unit:`rem`},tokenChoicesMarginTopRem:{varName:`--mpb-token-choices-margin-top`,unit:`rem`},inlineGridColumnGapRem:{varName:`--mpb-inline-grid-column-gap`,unit:`rem`},inlineGridRowGapRem:{varName:`--mpb-inline-grid-row-gap`,unit:`rem`},inlineTemplateMarginTopRem:{varName:`--mpb-inline-template-margin-top`,unit:`rem`},inlineChoicesMarginTopRem:{varName:`--mpb-inline-choices-margin-top`,unit:`rem`}},to={audio_blank_only:{blankWideWidthRem:10,blankUnderlineWideWidthPx:6,horizontalChoiceTileMinHeightRem:11.25,horizontalChoiceContentMinHeightRem:9.375,choiceGroupGapRem:1,audioBlankTemplateMarginBottomRem:1.875},stimulus_image_blank:{blankWideWidthRem:10,blankUnderlineWideWidthPx:6},token_sequence:{blankStandaloneWidthRem:7,blankUnderlineWideWidthPx:6}};function no(e){let{layoutProfile:t,isBlankOnlyTemplate:n}=e,r=e.configuredLimits&&typeof e.configuredLimits==`object`?e.configuredLimits:{},i=e.customProfilePresets&&typeof e.customProfilePresets==`object`?e.customProfilePresets:{},a=i[t]&&typeof i[t]==`object`?i[t]:{},o={...to[t]??{},...a},s={...$a,...r,...o},c=[`audio_blank_only`,`stimulus_image_blank`],l=[`audio_blank_only`,`stimulus_image_blank`,`token_sequence`],u=c.includes(t)?`${s.blankWideWidthRem}rem`:n?`${s.blankStandaloneWidthRem}rem`:`auto`,d=l.includes(t)?`${s.blankUnderlineWideWidthPx}px`:`${s.blankUnderlineWidthPx}px`;return{rootStyle:Object.keys(eo).map(e=>`${eo[e].varName}:${s[e]}${eo[e].unit}`).join(`;`),blankWidth:u,blankBorderWidth:d,legendMaxChars:s.legendMaxChars}}var ro={default:{silentUrl:`https://assets.learnosity.com/organisations/844/0c9f2aa3-3cd5-4de7-93ef-541c24ca35da.svg`,playingUrl:`https://assets.learnosity.com/organisations/844/231dfdc2-c113-4be5-91fb-e75a0ca5994b.svg`},es:{silentUrl:`https://assets.learnosity.com/organisations/844/27a9d5b5-d873-4bd5-b9ba-22748782d8ba.svg`,playingUrl:`https://assets.learnosity.com/organisations/844/120f216d-96b7-4560-94b8-1d90710216b7.svg`}};function io(e){let t=String(e.locale||``).toLowerCase(),n=t.slice(0,2),r=e.audioButtonSkinsByLocale&&typeof e.audioButtonSkinsByLocale==`object`?e.audioButtonSkinsByLocale:{},i=e.audioButtonSkin&&typeof e.audioButtonSkin==`object`?e.audioButtonSkin:null,a=t.startsWith(`es`)?ro.es:ro.default;return r[t]||r[n]||r.default||i||a}function ao(e){let{selectedId:t,isEvaluateMode:n,showCorrectAnswer:r,correctChoiceId:i}=e;return n&&r&&i?i:t}function oo(e){let{isEvaluateMode:t,showCorrectAnswer:n,isCorrect:r,isIncorrect:i,selectedId:a}=e;return!t||n?``:r?`correct`:i&&a?`incorrect`:``}function so(e){let{prompt:t,legendMaxChars:n,answerChoicesLabel:r}=e,i=t.replace(/<[^>]+>/g,` `).replace(/\s+/g,` `).trim(),a=Math.max(8,n);return i?i.length>a?`${i.slice(0,Math.max(1,a-1))}…`:i:r}var co=`/* Shared base styles for all sel_r1-*_plusggg variants.
|
|
4
19
|
Applied via the data-mpb-variant="sel-r1-base" style element.
|
|
5
|
-
|
|
20
|
+
Every selector starts at .mc-populated-blank-root carrying any r1 variant class,
|
|
21
|
+
so it cannot match outside this element. :where() keeps the attribute match out
|
|
22
|
+
of the specificity, so each per-variant file still overrides a base rule with
|
|
23
|
+
the selector shapes it already uses.
|
|
6
24
|
Source: web-ItemBankViewer/learnosity/templates/Renaissance/r1.scss */
|
|
7
25
|
|
|
8
26
|
/* r1.scss: Starial font throughout.
|
|
@@ -11,13 +29,13 @@
|
|
|
11
29
|
and any em-based author content (e.g. <span style="font-size:1.8em">). Without
|
|
12
30
|
this base PIE inherits the 16px browser default and renders ~14% larger than
|
|
13
31
|
the LSY reference. See CONTOOL-2567. */
|
|
14
|
-
[class*="variant-sel-r1-"] {
|
|
32
|
+
.mc-populated-blank-root:where([class*="variant-sel-r1-"]) {
|
|
15
33
|
font-family: Starial, Arial, sans-serif;
|
|
16
34
|
font-size: 14px;
|
|
17
35
|
}
|
|
18
36
|
|
|
19
37
|
/* r1.scss: .rli-r1-audio-transcript { font-family:Roboto; font-size:16px } */
|
|
20
|
-
[class*="variant-sel-r1-"] .pie-audio-transcript {
|
|
38
|
+
.mc-populated-blank-root:where([class*="variant-sel-r1-"]) .pie-audio-transcript {
|
|
21
39
|
font-family: Roboto, Arial, sans-serif;
|
|
22
40
|
font-size: 16px;
|
|
23
41
|
font-style: normal;
|
|
@@ -26,7 +44,7 @@
|
|
|
26
44
|
|
|
27
45
|
/* r1.scss: .rli-r1-content-element { font-size: 1.9em } wraps all stem tokens.
|
|
28
46
|
Makes inline font-size spans in the template multiply on top of this base. */
|
|
29
|
-
[class*="variant-sel-r1-"] .pie-template-line {
|
|
47
|
+
.mc-populated-blank-root:where([class*="variant-sel-r1-"]) .pie-template-line {
|
|
30
48
|
font-size: 1.9em;
|
|
31
49
|
}
|
|
32
50
|
|
|
@@ -35,16 +53,16 @@
|
|
|
35
53
|
Apply the per-element margin to both classless tokens and the blank slot
|
|
36
54
|
(which is the cloze equivalent) so the gap stacks with whitespace text-nodes
|
|
37
55
|
between flex items the same way LSY does. Earlier this used column-gap:4px,
|
|
38
|
-
but flex column-gap accumulates with the cloze
|
|
56
|
+
but flex column-gap accumulates with the cloze margin and the implicit
|
|
39
57
|
whitespace, producing a wider gap than LSY shows. See CONTOOL-2569. */
|
|
40
|
-
[class*="variant-sel-r1-"] .pie-template-line {
|
|
58
|
+
.mc-populated-blank-root:where([class*="variant-sel-r1-"]) .pie-template-line {
|
|
41
59
|
display: flex;
|
|
42
60
|
flex-direction: row;
|
|
43
61
|
align-items: baseline;
|
|
44
62
|
justify-content: center;
|
|
45
63
|
}
|
|
46
64
|
|
|
47
|
-
[class*="variant-sel-r1-"] .pie-template-line p {
|
|
65
|
+
.mc-populated-blank-root:where([class*="variant-sel-r1-"]) .pie-template-line p {
|
|
48
66
|
margin: 0;
|
|
49
67
|
display: flex;
|
|
50
68
|
flex-direction: row;
|
|
@@ -56,7 +74,7 @@
|
|
|
56
74
|
(blank slot and adjacent inline spans) in LSY, giving each a 150px box with a
|
|
57
75
|
2px per-side margin. Apply to inline tokens in all r1 variants so trailing
|
|
58
76
|
tokens in audio_blank_only (gplusggg) match the blank's height the way LSY does. */
|
|
59
|
-
[class*="variant-sel-r1-"] .pie-template-line span:not([class]) {
|
|
77
|
+
.mc-populated-blank-root:where([class*="variant-sel-r1-"]) .pie-template-line span:not([class]) {
|
|
60
78
|
min-width: 150px;
|
|
61
79
|
max-width: 150px;
|
|
62
80
|
min-height: 150px;
|
|
@@ -65,15 +83,43 @@
|
|
|
65
83
|
margin-right: 2px;
|
|
66
84
|
}
|
|
67
85
|
|
|
86
|
+
/* .pie-template-line's align-items:baseline (above) computes a shared baseline
|
|
87
|
+
across all its flex items. .pie-blank-slot has no baseline-participating child
|
|
88
|
+
of its own (.cloze-marker centers internally, align-items:center) — so it
|
|
89
|
+
contributes a *synthesized* baseline back to the row, based on its own box
|
|
90
|
+
geometry. That geometry swings wildly depending on the blank's content: an
|
|
91
|
+
empty placeholder vs. a selected choice's image (up to 150x150). Every time a
|
|
92
|
+
choice is selected the row's shared baseline is recomputed from that new
|
|
93
|
+
geometry, visibly shifting sibling tokens like a leading/trailing stem word.
|
|
94
|
+
align-self removes the blank from that shared computation entirely — its
|
|
95
|
+
siblings' position no longer depends on what's currently displayed inside it.
|
|
96
|
+
See CONTOOL-3159. */
|
|
97
|
+
.mc-populated-blank-root:where([class*="variant-sel-r1-"]) .pie-template-line .pie-blank-slot {
|
|
98
|
+
align-self: flex-end;
|
|
99
|
+
}
|
|
100
|
+
|
|
68
101
|
/* In token_sequence layouts the blank itself is also a content-element box (no
|
|
69
102
|
surrounding .rli-r1-cloze container at 160px). audio_blank_only / stimulus_image_blank
|
|
70
103
|
keep their own 160px min-height set on the blank slot in McPopulatedBlank.svelte to
|
|
71
104
|
mirror LSY's .rli-r1-cloze height. The 2px per-side margin matches LSY's
|
|
72
|
-
.rli-r1-content-element pattern
|
|
73
|
-
|
|
105
|
+
.rli-r1-content-element pattern.
|
|
106
|
+
.pie-blank-slot is box-sizing:border-box (McPopulatedBlank.svelte sets it for
|
|
107
|
+
the whole element) with a permanent 6px border-bottom (the underline) —
|
|
108
|
+
min-height:150px therefore only leaves 144px for content,
|
|
109
|
+
so an empty blank (content ~0px, clamped to the 150px floor) and a blank
|
|
110
|
+
showing a 150px choice image (150 + 6 border = 156px, exceeding the floor)
|
|
111
|
+
render at two different total heights. Since .pie-blank-slot is bottom-anchored
|
|
112
|
+
in its row (align-self:flex-end above), that 6px height difference shows up as
|
|
113
|
+
a visible shift of the blank/image every time a choice is selected or cleared.
|
|
114
|
+
min-height:156px keeps the total box height constant regardless of content, so
|
|
115
|
+
the 150px is fully available to the image/text and the border no longer
|
|
116
|
+
competes with it. See CONTOOL-3159. */
|
|
117
|
+
.mc-populated-blank-root:where([class*="variant-sel-r1-"]).layout-token_sequence
|
|
118
|
+
.pie-template-line
|
|
119
|
+
.pie-blank-slot {
|
|
74
120
|
min-width: 150px;
|
|
75
121
|
max-width: 150px;
|
|
76
|
-
min-height:
|
|
122
|
+
min-height: 156px;
|
|
77
123
|
line-height: 89px;
|
|
78
124
|
margin-left: 2px;
|
|
79
125
|
margin-right: 2px;
|
|
@@ -81,16 +127,44 @@
|
|
|
81
127
|
|
|
82
128
|
/* audio_blank_only / stimulus_image_blank keep the 160px wide blank slot, but
|
|
83
129
|
still need the 2px per-side margin so the gap to the trailing token mirrors
|
|
84
|
-
LSY's .rli-r1-content-element rhythm.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
130
|
+
LSY's .rli-r1-content-element rhythm. See CONTOOL-2569. */
|
|
131
|
+
.mc-populated-blank-root:where([class*="variant-sel-r1-"]).layout-audio_blank_only
|
|
132
|
+
.pie-template-line
|
|
133
|
+
.pie-blank-slot,
|
|
134
|
+
.mc-populated-blank-root:where([class*="variant-sel-r1-"]).layout-stimulus_image_blank
|
|
135
|
+
.pie-template-line
|
|
136
|
+
.pie-blank-slot {
|
|
88
137
|
margin-left: 2px;
|
|
89
138
|
margin-right: 2px;
|
|
90
139
|
}
|
|
91
140
|
|
|
141
|
+
/* The \`.pie-template-line span:not([class])\` rule above has no depth limit, so it
|
|
142
|
+
also matches the unclassed answer <span> ClozeMarker.svelte renders inside
|
|
143
|
+
.pie-blank-value once a choice is selected (e.g. author font-size overrides like
|
|
144
|
+
<span style="font-size:3em">). For token_sequence that coincides with the blank
|
|
145
|
+
slot's own 150px/89px box above, so outer and inner agree. audio_blank_only /
|
|
146
|
+
stimulus_image_blank instead keep .pie-blank-slot at LSY's separate, taller
|
|
147
|
+
.rli-r1-cloze box (160px) — forcing the answer span into the stem token's
|
|
148
|
+
150px/89px box there is wrong: a plain (non-flex) span whose min-height exceeds
|
|
149
|
+
its line-height renders that line top-anchored, pinning the answer text to the
|
|
150
|
+
top of the blank with the rest of the box empty beneath it, instead of centered
|
|
151
|
+
on the underline the way LSY renders it. See CONTOOL-3159. */
|
|
152
|
+
.mc-populated-blank-root:where([class*="variant-sel-r1-"]).layout-audio_blank_only
|
|
153
|
+
.pie-blank-value
|
|
154
|
+
span:not([class]),
|
|
155
|
+
.mc-populated-blank-root:where([class*="variant-sel-r1-"]).layout-stimulus_image_blank
|
|
156
|
+
.pie-blank-value
|
|
157
|
+
span:not([class]) {
|
|
158
|
+
min-width: 0;
|
|
159
|
+
max-width: none;
|
|
160
|
+
min-height: 0;
|
|
161
|
+
line-height: normal;
|
|
162
|
+
margin-left: 0;
|
|
163
|
+
margin-right: 0;
|
|
164
|
+
}
|
|
165
|
+
|
|
92
166
|
/* r1.scss: .rli-r1-content-element { font-size:1.9em; line-height:89px } on distractors */
|
|
93
|
-
[class*="variant-sel-r1-"] .pie-choice-label {
|
|
167
|
+
.mc-populated-blank-root:where([class*="variant-sel-r1-"]) .pie-choice-label {
|
|
94
168
|
font-size: 1.9em;
|
|
95
169
|
line-height: 89px;
|
|
96
170
|
}
|
|
@@ -101,12 +175,12 @@
|
|
|
101
175
|
to 150 server-side. PIE keeps the authored attributes (typically 108×108),
|
|
102
176
|
so without an explicit override images render ~28% smaller than LSY.
|
|
103
177
|
See CONTOOL-2570. */
|
|
104
|
-
[class*="variant-sel-r1-"] .pie-template-line img,
|
|
105
|
-
[class*="variant-sel-r1-"] .pie-choice-label img {
|
|
178
|
+
.mc-populated-blank-root:where([class*="variant-sel-r1-"]) .pie-template-line img,
|
|
179
|
+
.mc-populated-blank-root:where([class*="variant-sel-r1-"]) .pie-choice-label img {
|
|
106
180
|
width: 150px;
|
|
107
181
|
height: 150px;
|
|
108
182
|
}
|
|
109
|
-
`,
|
|
183
|
+
`,lo={"sel_r1-_plusggg":{variantId:`sel-r1-plusggg`,variantClass:`variant-sel-r1-plusggg`,sourceUrl:`https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_plusggg/0.0.1/question.css`,cssText:`/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_plusggg/0.0.1/question.css */
|
|
110
184
|
/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */
|
|
111
185
|
.mc-populated-blank-root.variant-sel-r1-plusggg {
|
|
112
186
|
max-width: 875px;
|
|
@@ -209,8 +283,6 @@
|
|
|
209
283
|
--mpb-inline-grid-row-gap: 0.5rem;
|
|
210
284
|
--mpb-inline-template-margin-top: 0.2rem;
|
|
211
285
|
--mpb-inline-choices-margin-top: 0.2rem;
|
|
212
|
-
--pie-correct-answer-choice-hover-bg: #e2e2e2;
|
|
213
|
-
--pie-correct-answer-choice-selected-bg: #fcfcd3;
|
|
214
286
|
}
|
|
215
287
|
|
|
216
288
|
.mc-populated-blank-root.variant-sel-vic .pie-audio-transcript {
|
|
@@ -255,11 +327,9 @@
|
|
|
255
327
|
}
|
|
256
328
|
|
|
257
329
|
/* vic.scss: .rli-vic-cloze { margin-left: 6px; margin-right: 6px } gives the
|
|
258
|
-
cloze breathing room from adjacent text or punctuation. The
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
explicitly so the cloze→trailing-punctuation gap matches LSY. See
|
|
262
|
-
CONTOOL-2572. */
|
|
330
|
+
cloze breathing room from adjacent text or punctuation. The shared blank slot
|
|
331
|
+
has no inline margin, so set it here so the cloze→trailing-punctuation gap
|
|
332
|
+
matches LSY. See CONTOOL-2572. */
|
|
263
333
|
.mc-populated-blank-root.variant-sel-vic .pie-template-line .pie-blank-slot {
|
|
264
334
|
margin-left: 6px;
|
|
265
335
|
margin-right: 6px;
|
|
@@ -427,6 +497,10 @@
|
|
|
427
497
|
"sentence template audio"
|
|
428
498
|
"choices choices choices";
|
|
429
499
|
justify-content: center;
|
|
500
|
+
/* question.css: .rli-s3-cloze-container { justify-content:end } bottom-anchors
|
|
501
|
+
the cloze against the shared sentence/audio row instead of top-aligning it —
|
|
502
|
+
matches every item sitting on the same visual baseline. See CONTOOL-3159. */
|
|
503
|
+
align-items: end;
|
|
430
504
|
}
|
|
431
505
|
|
|
432
506
|
.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-template-line {
|
|
@@ -434,6 +508,18 @@
|
|
|
434
508
|
justify-self: center;
|
|
435
509
|
}
|
|
436
510
|
|
|
511
|
+
/* ClozeMarker.svelte's shared .cloze-marker rule vertically *centers* its content
|
|
512
|
+
(align-items:center). question.css's .rli-s3-cloze-container uses
|
|
513
|
+
justify-content:end instead, bottom-anchoring the answer text against the
|
|
514
|
+
underline. Centering leaves it floating well above both the underline and the
|
|
515
|
+
sentence image's own (bottom-anchored) baseline. The blank's own box height
|
|
516
|
+
(160px, from McPopulatedBlank.svelte's shared audio_blank_only/stimulus_image_blank
|
|
517
|
+
rule) is left as-is — it already matches the Learnosity reference (~161px)
|
|
518
|
+
closely; only the internal alignment was wrong. See CONTOOL-3159. */
|
|
519
|
+
.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-blank-slot {
|
|
520
|
+
align-items: flex-end;
|
|
521
|
+
}
|
|
522
|
+
|
|
437
523
|
.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-sentence-line {
|
|
438
524
|
justify-self: end;
|
|
439
525
|
}
|
|
@@ -467,19 +553,34 @@
|
|
|
467
553
|
.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-horizontal .pie-choice-radio {
|
|
468
554
|
transform: scale(0.85);
|
|
469
555
|
}
|
|
470
|
-
`}},
|
|
471
|
-
|
|
556
|
+
`}},uo=e=>String(e||``).trim().toLowerCase().replace(/v\d+\.\d+\.\d+$/i,``),fo=e=>lo[uo(e)],po=e=>fo(e)?.variantClass||``,mo=new Set([`sel-r1-plusggg`,`sel-r1-gplusggg`,`sel-r1-g-stem`,`sel-r1-gg-plus`,`sel-r1-ggplus`,`sel-r1-s3`]),ho=/\.mc-populated-blank-root(?![\w-])/g,go=(e=>{let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)})([co,...Object.values(lo).map(e=>e.cssText)].join(`
|
|
557
|
+
`)),_o=e=>e.replace(ho,`.mc-populated-blank-root:where([data-mpb-css="${go}"])`),vo=(e,t,n)=>{let r=`mc-populated-blank-css-${t}-${go}`;if(e.getElementById(r))return;let i=document.createElement(`style`);i.id=r,i.setAttribute(`data-mpb-variant`,t),i.textContent=_o(n),(e instanceof ShadowRoot?e:e.head).appendChild(i)},yo=(e,t)=>{if(!e?.cssText||typeof document>`u`)return;let n=t.getRootNode(),r=n instanceof ShadowRoot?n:document;mo.has(e.variantId)&&vo(r,`sel-r1-base`,co),vo(r,e.variantId,e.cssText)},bo=q(`<div class="pie-prompt svelte-6wlbb4"></div>`),xo=br(`<svg class="pie-correct-answer-toggle-svg svelte-6wlbb4" preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-283 359 34 35"><circle cx="-266" cy="375.9" r="14" fill="var(--pie-tertiary-light, #d0e2f0)"></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="var(--pie-tertiary-light, #d0e2f0)"></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="var(--pie-tertiary, #146eb3)"></polygon></svg>`),So=br(`<svg class="pie-correct-answer-toggle-svg svelte-6wlbb4" preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-129.5 127 34 35"><path 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" fill="#D0CAC5" stroke="#E6E3E0" stroke-width="0.75"></path><path 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" fill="#B3ABA4" stroke="#CDC7C2" stroke-width="0.5"></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="var(--pie-background-dark, #ecedf1)"></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="var(--pie-tertiary, #146eb3)"></polygon></svg>`),Co=q(`<div class="pie-correct-answer-toggle-row svelte-6wlbb4"><button type="button" class="pie-toggle-correct-answer svelte-6wlbb4" style="gap:var(--mpb-toggle-button-gap, 0.5rem);" data-testid="show-correct-answer"><span class="pie-correct-answer-toggle-content svelte-6wlbb4"><span class="pie-correct-answer-toggle-icon-holder svelte-6wlbb4" aria-hidden="true"><!></span> <span class="pie-correct-answer-toggle-label svelte-6wlbb4"> </span></span></button></div>`),wo=q(`<div class="sentence-line pie-sentence-line svelte-6wlbb4"></div>`),To=q(`<div class="template-line pie-template-line svelte-6wlbb4"><!><!><!></div>`),Eo=q(`<p class="sr-only pie-result-feedback svelte-6wlbb4" role="status" aria-live="polite"> </p>`),Do=q(`<div><!> <!> <!> <!> <!> <!> <!> <p class="sr-only pie-blank-hint svelte-6wlbb4"> </p> <fieldset class="pie-choices-fieldset svelte-6wlbb4"><legend class="sr-only pie-choices-legend svelte-6wlbb4"> </legend> <div style="gap:var(--mpb-choice-group-gap, 0.5rem);" role="radiogroup" tabindex="-1"></div></fieldset></div>`),Oo={hash:`svelte-6wlbb4`,code:`.sr-only.svelte-6wlbb4 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}
|
|
558
|
+
|
|
559
|
+
/* Layout is self-contained: PIE players ship no Tailwind, so no utility class or
|
|
560
|
+
preflight reset can be assumed. The blank slot, choice tiles and variant
|
|
561
|
+
max-widths are sized for border-box. */.mc-populated-blank-root.svelte-6wlbb4,
|
|
562
|
+
.mc-populated-blank-root.svelte-6wlbb4 *,
|
|
563
|
+
.mc-populated-blank-root.svelte-6wlbb4 *::before,
|
|
564
|
+
.mc-populated-blank-root.svelte-6wlbb4 *::after {box-sizing:border-box;}
|
|
565
|
+
|
|
566
|
+
/* An authored image on its own line (the sel_r1-s3 stimulus) would otherwise sit
|
|
567
|
+
on the text baseline and add the descender gap below it. */.mc-populated-blank-root.svelte-6wlbb4 img {vertical-align:middle;}.mc-populated-blank-root.svelte-6wlbb4 {--mpb-focus-ring: var(
|
|
568
|
+
--pie-focus-outline,
|
|
569
|
+
var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565c0))
|
|
570
|
+
);padding:1rem;}.pie-prompt.svelte-6wlbb4 {margin-bottom:1rem;}
|
|
571
|
+
|
|
572
|
+
/* Flush paragraphs, as the demo app's preflight reset rendered them. */.pie-prompt.svelte-6wlbb4 p,
|
|
573
|
+
.sentence-line.svelte-6wlbb4 p {margin:0;}.sentence-line.svelte-6wlbb4 {margin-bottom:0.75rem;}.pie-toggle-correct-answer.svelte-6wlbb4 {width:100%;cursor:pointer;border:0;background:transparent;padding:0;margin-bottom:0.75rem;display:flex;justify-content:center;text-align:center;font:inherit;color:var(--pie-text, black);}.pie-correct-answer-toggle-row.svelte-6wlbb4 {width:100%;display:flex;justify-content:flex-end;}.pie-correct-answer-toggle-content.svelte-6wlbb4 {display:flex;margin:0 auto;align-items:center;}.pie-correct-answer-toggle-icon-holder.svelte-6wlbb4 {width:25px;margin-right:5px;display:inline-flex;align-items:center;justify-content:center;}.pie-correct-answer-toggle-svg.svelte-6wlbb4 {width:25px;height:25px;}.pie-correct-answer-toggle-label.svelte-6wlbb4 {width:fit-content;min-width:140px;align-self:center;vertical-align:middle;font-weight:400;user-select:none;}.pie-toggle-correct-answer.svelte-6wlbb4:hover .pie-correct-answer-toggle-label:where(.svelte-6wlbb4),
|
|
574
|
+
.pie-toggle-correct-answer.svelte-6wlbb4:focus-visible .pie-correct-answer-toggle-label:where(.svelte-6wlbb4) {text-decoration:underline;}.template-line.svelte-6wlbb4 {white-space:pre-wrap;margin-bottom:1rem;}.template-line.svelte-6wlbb4 p {margin:0;display:inline;}.pie-choices-fieldset.svelte-6wlbb4 {border:0;padding:0;margin:0;}.pie-choices.svelte-6wlbb4 {display:flex;}.choices-horizontal.svelte-6wlbb4 {flex-direction:row;flex-wrap:wrap;align-items:flex-start;justify-content:center;}.choices-vertical.svelte-6wlbb4 {flex-direction:column;}.layout-audio_blank_only.svelte-6wlbb4 .pie-audio-container,
|
|
472
575
|
.layout-stimulus_image_blank.svelte-6wlbb4 .pie-audio-container {display:flex;width:min(100%, var(--mpb-audio-instructions-max-width, 875px));margin-left:auto;margin-right:auto;justify-content:flex-end;}.layout-audio_blank_only.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4),
|
|
473
576
|
.layout-stimulus_image_blank.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {text-align:center;margin:var(--mpb-audio-blank-template-margin-top, 0.8rem) 0
|
|
474
577
|
var(--mpb-audio-blank-template-margin-bottom, 1.8rem);}.layout-audio_blank_only.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {display:flex;justify-content:center;}.layout-audio_blank_only.svelte-6wlbb4 .pie-blank-slot,
|
|
475
|
-
.layout-stimulus_image_blank.svelte-6wlbb4 .pie-blank-slot {width:var(--mpb-blank-wide-width, 10rem);border-bottom-width:var(--mpb-blank-underline-wide-width, 6px);min-height:160px;padding-bottom:4px;}.layout-stimulus_image_blank.svelte-6wlbb4 {display:grid;grid-template-columns:minmax(var(--mpb-stimulus-min-column, 210px), 1fr) auto;grid-template-areas:'
|
|
476
|
-
'sentence audio'
|
|
578
|
+
.layout-stimulus_image_blank.svelte-6wlbb4 .pie-blank-slot {width:var(--mpb-blank-wide-width, 10rem);border-bottom-width:var(--mpb-blank-underline-wide-width, 6px);min-height:160px;padding-bottom:4px;}.layout-stimulus_image_blank.svelte-6wlbb4 {display:grid;grid-template-columns:minmax(var(--mpb-stimulus-min-column, 210px), 1fr) auto;grid-template-areas:'sentence audio'
|
|
477
579
|
'. template'
|
|
478
|
-
'choices choices';column-gap:var(--mpb-stimulus-grid-column-gap, 2rem);row-gap:var(--mpb-stimulus-grid-row-gap, 0.7rem);align-items:start;}.layout-stimulus_image_blank.svelte-6wlbb4 .pie-audio-
|
|
580
|
+
'choices choices';column-gap:var(--mpb-stimulus-grid-column-gap, 2rem);row-gap:var(--mpb-stimulus-grid-row-gap, 0.7rem);align-items:start;}.layout-stimulus_image_blank.svelte-6wlbb4 .pie-audio-container {grid-area:audio;margin:0;}.layout-stimulus_image_blank.svelte-6wlbb4 .sentence-line:where(.svelte-6wlbb4) {grid-area:sentence;margin:var(--mpb-stimulus-sentence-margin-top, 0.2rem) 0 0;}.layout-stimulus_image_blank.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:0;text-align:center;justify-self:center;}.layout-stimulus_image_blank.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-stimulus-choices-margin-top, 0.9rem);}.layout-token_sequence.svelte-6wlbb4 {display:grid;grid-template-columns:1fr auto;grid-template-areas:'audio audio'
|
|
479
581
|
'template template'
|
|
480
|
-
'choices choices';column-gap:var(--mpb-token-grid-column-gap, 1.5rem);row-gap:var(--mpb-token-grid-row-gap, 0.8rem);align-items:start;}.layout-token_sequence.svelte-6wlbb4 .pie-audio-
|
|
481
|
-
'template audio
|
|
482
|
-
'choices choices';column-gap:var(--mpb-inline-grid-column-gap, 1.5rem);row-gap:var(--mpb-inline-grid-row-gap, 0.65rem);align-items:start;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .pie-audio-transcript:where(.svelte-6wlbb4) {grid-area:transcript;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .pie-audio-container {grid-area:audio;margin:0;justify-self:end;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:var(--mpb-inline-template-margin-top, 0.45rem) 0 0;text-align:center;justify-self:center;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-inline-choices-margin-top, 0.25rem);}
|
|
582
|
+
'choices choices';column-gap:var(--mpb-token-grid-column-gap, 1.5rem);row-gap:var(--mpb-token-grid-row-gap, 0.8rem);align-items:start;}.layout-token_sequence.svelte-6wlbb4 .pie-audio-container {grid-area:audio;margin:0;justify-self:end;}.layout-token_sequence.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:var(--mpb-token-template-margin-top, 0.6rem) 0 0;justify-self:center;text-align:center;}.layout-token_sequence.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) span + span {margin-left:var(--mpb-token-inline-token-gap, 0.35rem);}.layout-token_sequence.svelte-6wlbb4 .pie-blank-slot {width:var(--mpb-blank-standalone-width, 7rem);border-bottom-width:var(--mpb-blank-underline-wide-width, 4px);margin-left:var(--mpb-token-inline-token-gap, 0.35rem);}.layout-token_sequence.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-token-choices-margin-top, 0.2rem);}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 {display:grid;grid-template-columns:minmax(var(--mpb-text-min-column, 260px), 1fr) auto;grid-template-areas:'template audio'
|
|
583
|
+
'choices choices';column-gap:var(--mpb-inline-grid-column-gap, 1.5rem);row-gap:var(--mpb-inline-grid-row-gap, 0.65rem);align-items:start;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .pie-audio-container {grid-area:audio;margin:0;justify-self:end;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:var(--mpb-inline-template-margin-top, 0.45rem) 0 0;text-align:center;justify-self:center;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-inline-choices-margin-top, 0.25rem);}
|
|
483
584
|
|
|
484
585
|
/* Match Learnosity responsive behavior for CQT audio-blank layouts:
|
|
485
586
|
at smaller widths, audio control shifts left and answer tiles stack. */
|
|
@@ -493,4 +594,4 @@
|
|
|
493
594
|
.layout-token_sequence.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),
|
|
494
595
|
.layout-stimulus_image_blank.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),
|
|
495
596
|
.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4) {width:min(100%, var(--mpb-narrow-choice-max-width, 230px));align-items:flex-start;}
|
|
496
|
-
}`};function Ca(e,t){He(t,!0),Rr(e,Sa);let n={answerChoices:`Answer choices`,selectedAnswerInSentence:`Selected answer in sentence`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,transcriptLabel:`Transcript`},r=Z(t,`model`,7),i=Z(t,`session`,7),a=R(``),o=R(null),s=R(null),c=R(null),l=R(!1),u=`mc-populated-blank-${Math.random().toString(36).slice(2,10)}`,d=L(()=>(r()?.mode||r()?.env?.mode||``).toString()),f=L(()=>q(d)===`evaluate`),p=L(()=>r()?.correctness),m=L(()=>typeof r()?.responseCorrect==`boolean`?r().responseCorrect:q(p)===`correct`),h=L(()=>q(p)===`correct`),g=L(()=>q(p)===`incorrect`),_=R(!1),v=L(()=>q(f)&&!q(m)&&!!r()?.correctChoiceId),y=L(()=>r()?.layoutProfile||``),b=L(()=>Yi({interactionMode:r()?.interactionMode,template:r()?.template,choiceLayout:r()?.choiceLayout,layoutProfile:q(y),hasAudio:r()?.hasAudio,useFeatureButtonAudio:r()?.useFeatureButtonAudio})),x=L(()=>q(b).isAudioOnlyMode),S=L(()=>q(b).isBlankOnlyTemplate),C=L(()=>q(b).isHorizontalChoices),w=L(()=>q(b).hasInlineSentenceAudioLayout),T=L(()=>q(b).useFeatureButtonAudio),ee=L(()=>q(l)),te=L(()=>[`--pie-correct-answer-toggle-label-color:${gi.text()}`,`--pie-correct-answer-toggle-icon-open-bg:${gi.tertiaryLight()}`,`--pie-correct-answer-toggle-icon-closed-bg:${gi.backgroundDark()}`,`--pie-correct-answer-toggle-icon-glyph-color:${gi.tertiary()}`,`--pie-correct-answer-choice-hover-bg:${gi.backgroundDark()}`,`--pie-correct-answer-choice-selected-bg:${gi.secondaryBackground()}`,`--pie-correct-answer-choice-correct-bg:${gi.correctSecondary()}`,`--pie-correct-answer-choice-incorrect-bg:${gi.incorrectSecondary()}`,`--pie-correct-answer-choice-correct-border:${gi.correctTertiary()}`,`--pie-correct-answer-choice-incorrect-border:${gi.incorrectWithIcon()}`,`--pie-correct-answer-feedback-correct-bg:${gi.correctWithIcon()}`,`--pie-correct-answer-feedback-incorrect-bg:${gi.incorrectWithIcon()}`,`--pie-correct-answer-feedback-glyph-color:${gi.white()}`].join(`;`)),ne=L(()=>$i({layoutProfile:q(y),isBlankOnlyTemplate:q(S),configuredLimits:r()?.layoutLimits,customProfilePresets:r()?.layoutProfilePresets,correctAnswerStyleVars:q(te)})),re=L(()=>Array.isArray(r()?.choices)?r().choices:[]),ie=L(()=>r()?.choiceMode||`text`),ae=L(()=>i()?.choiceId||q(a)||``),oe=L(()=>`${u}-choice-group-${r()?.id||`1`}`),se=L(()=>na({selectedId:q(ae),isEvaluateMode:q(f),showCorrectAnswer:q(_),alwaysShowCorrect:!!r()?.alwaysShowCorrect,correctChoiceId:String(r()?.correctChoiceId||``)})),ce=L(()=>q(re).find(e=>e.id===q(se))),le=L(()=>String(q(ce)?.labelHtml||``)),ue=L(()=>ra({isEvaluateMode:q(f),showCorrectAnswer:q(_),isCorrect:q(h),isIncorrect:q(g),selectedId:q(ae)})),de=L(()=>Ki({isEvaluateMode:q(f),correctChoiceId:String(r()?.correctChoiceId||``),selectedId:String(q(ae)||``),showCorrectAnswer:q(_)})),fe=L(()=>({...n,...r()?.uiText||{}})),pe=L(()=>`${u}-prompt`),me=L(()=>`${u}-transcript`),he=L(()=>`${u}-choices-legend`),ge=L(()=>`${u}-result`),_e=L(()=>ia({prompt:r()?.prompt||``,legendMaxChars:q(ne).legendMaxChars,answerChoicesLabel:q(fe).answerChoices})),ve=L(()=>r()?.prompt?q(pe):void 0),ye=L(()=>r()?.prompt?void 0:String(r()?.choiceGroupLabel||``).trim()||q(_e)),be=L(()=>{let e=[];return r()?.prompt&&e.push(q(pe)),r()?.hasAudio&&r()?.audioTranscript&&e.push(q(me)),e.length?e.join(` `):void 0}),xe=L(()=>{let e=r()?.locale||``;return e?e.slice(0,2):`en`}),Se=L(()=>ca(r()?.customType)),Ce=L(()=>la(r()?.customType)),we=L(()=>{let e=r()?.template||``,t=e.indexOf(`{{blank}}`);if(t<0)return{before:e,after:``};let n=e.slice(0,t),i=e.slice(t+9);return q(y)===`inline_sentence`&&(n=`${n.replace(/\s+$/,``)} `,i=` ${i.replace(/^\s+/,``)}`),{before:n,after:i}});function Te(e,t){xi({sourceEl:t,fallbackSelector:`mc-populated-blank`,component:`mc-populated-blank`,session:e,complete:!!e?.choiceId})}function Ee(e){let t=e.target;if(!t.checked)return;let n=t.value;z(a,n,!0),Te({...i(),id:i()?.id||r()?.id||`1`,element:`mc-populated-blank`,choiceId:n},t)}function De(){q(v)&&z(_,!q(_))}pn(()=>{(!q(f)||q(m))&&z(_,!1)});function Oe(e){if(r()?.disabled)return;let t=e.key;if(![`ArrowDown`,`ArrowRight`,`ArrowUp`,`ArrowLeft`].includes(t))return;e.preventDefault();let n=e.currentTarget,i=Array.from(n.querySelectorAll(`input[type="radio"]:not([disabled])`));if(i.length===0)return;let a=i.findIndex(e=>e.checked);a=t===`ArrowDown`||t===`ArrowRight`?a<0?0:(a+1)%i.length:a<0?i.length-1:(a-1+i.length)%i.length;let o=i[a];o.checked=!0,o.dispatchEvent(new Event(`change`,{bubbles:!0})),o.focus()}let ke=L(()=>ta({locale:r()?.locale,audioButtonSkin:r()?.audioButtonSkin,audioButtonSkinsByLocale:r()?.audioButtonSkinsByLocale}));function Ae(){bi(q(c),{fallbackSelector:`mc-populated-blank`})?.onAudioStarted?.()}function je(){bi(q(c),{fallbackSelector:`mc-populated-blank`})?.onAudioEnded?.()}pn(()=>{i()?.choiceId&&z(a,i().choiceId,!0)}),pn(()=>{let e=q(o);if(e)return e.addEventListener(`click`,De),()=>e.removeEventListener(`click`,De)}),pn(()=>{let e=q(s);if(!e)return;let t=e=>{let t=e.target;!t||t.type!==`radio`||Ee(e)},n=e=>Oe(e);return e.addEventListener(`change`,t),e.addEventListener(`keydown`,n),()=>{e.removeEventListener(`change`,t),e.removeEventListener(`keydown`,n)}}),pn(()=>{fa(q(Se))}),pn(()=>{let e=q(c);if(!e)return;let t=()=>{z(l,!!e.closest(`.rli-with-audio-transcript`))};t();let n=new MutationObserver(t),r=e.parentElement;for(;r;)n.observe(r,{attributes:!0,attributeFilter:[`class`]}),r=r.parentElement;return()=>n.disconnect()});var E={get model(){return r()},set model(e){r(e),I()},get session(){return i()},set session(e){i(e),I()}},D=xa(),O=V(D),k=e=>{var t=pa();Lr(t,()=>r().prompt,!0),A(t),U(()=>X(t,`id`,q(pe))),Y(e,t)};Dr(O,e=>{r()?.prompt&&e(k)});var Me=H(O,2),Ne=e=>{var t=ma(),n=V(t,!0);A(t),U(()=>{Wr(t,1,`text-sm mb-3 text-gray-700 text-center pie-audio-transcript ${q(ee)?``:`sr-only`}`,`svelte-6wlbb4`),X(t,`id`,q(me)),yr(n,r().audioTranscript)}),Y(e,t)};Dr(Me,e=>{r()?.audioTranscript&&e(Ne)});var Pe=H(Me,2),Fe=e=>{var t=_a(),n=V(t),r=V(n),i=V(r),a=V(i),s=e=>{Y(e,ha())},c=e=>{Y(e,ga())};Dr(a,e=>{q(_)?e(s):e(c,-1)}),A(i);var l=H(i,2),u=V(l,!0);A(l),A(r),A(n),ii(n,e=>z(o,e),()=>q(o)),A(t),U(()=>{X(n,`aria-pressed`,q(_)),yr(u,q(_)?q(fe).hideCorrectAnswer:q(fe).showCorrectAnswer)}),Y(e,t)};Dr(Pe,e=>{q(v)&&e(Fe)});var Ie=H(Pe,2);{let e=L(()=>!!r()?.hasAudio),t=L(()=>r()?.audioUrl),n=L(()=>!!r()?.autoplayAudioEnabled),i=L(()=>r()?.audioTranscript),a=L(()=>r()?.locale);ki(Ie,{get hasAudio(){return q(e)},get audioUrl(){return q(t)},get useFeatureButtonAudio(){return q(T)},get autoplayEnabled(){return q(n)},get audioTranscript(){return q(i)},get showVisibleTranscript(){return q(ee)},get transcriptId(){return q(me)},get featureAudioSkin(){return q(ke)},get uiText(){return q(fe)},get locale(){return q(a)},onaudiostarted:Ae,onaudioended:je})}var Le=H(Ie,2),Re=e=>{var t=va();Lr(t,()=>r().sentenceHtml,!0),A(t),U(()=>X(t,`aria-describedby`,q(be))),Y(e,t)};Dr(Le,e=>{r()?.sentenceHtml&&e(Re)});var ze=H(Le,2),Be=e=>{var t=ya(),n=V(t);Lr(n,()=>q(we).before);var r=H(n);Fi(r,{get choiceMode(){return q(ie)},get displayChoice(){return q(ce)},get displayChoiceLabelHtml(){return q(le)},get isStandalone(){return q(S)},get blankWidth(){return q(ne).blankWidth},get blankBorderWidth(){return q(ne).blankBorderWidth},get ariaLabel(){return q(fe).selectedAnswerInSentence}}),Lr(H(r),()=>q(we).after),A(t),U(()=>X(t,`aria-describedby`,q(be))),Y(e,t)};Dr(ze,e=>{q(x)||e(Be)});var j=H(ze,2),Ve=e=>{var t=ba(),n=V(t,!0);A(t),U(()=>{X(t,`id`,q(ge)),yr(n,q(ue))}),Y(e,t)};Dr(j,e=>{q(ue)&&e(Ve)});var We=H(j,2),Ge=V(We),Ke=V(Ge,!0);A(Ge);var M=H(Ge,2);return jr(M,21,()=>q(re),e=>e.id,(e,t)=>{{let n=L(()=>q(se)===q(t).id),i=L(()=>!!r()?.disabled),a=L(()=>q(de).get(q(t).id));Gi(e,{get choice(){return q(t)},get choiceMode(){return q(ie)},get isHorizontal(){return q(C)},get isSelected(){return q(n)},get isDisabled(){return q(i)},get correctness(){return q(a)},get isEvaluateMode(){return q(f)},get instanceId(){return u},get radioGroupName(){return q(oe)}})}}),A(M),ii(M,e=>z(s,e),()=>q(s)),A(We),A(D),ii(D,e=>z(c,e),()=>q(c)),U(()=>{Wr(D,1,`p-4 mc-populated-blank-root pie-element pie-element-mc-populated-blank pie-delivery-root layout-${q(y)} ${q(Ce)} ${q(w)?`has-inline-audio`:``}`,`svelte-6wlbb4`),X(D,`lang`,q(xe)),Kr(D,q(ne).rootStyle),We.disabled=r()?.disabled,X(Ge,`id`,q(he)),yr(Ke,q(_e)),Wr(M,1,`pie-choices ${q(C)?`flex flex-row flex-wrap items-start justify-center`:`flex flex-col`}`,`svelte-6wlbb4`),X(M,`aria-labelledby`,q(ve)),X(M,`aria-label`,q(ye)),X(M,`aria-describedby`,q(ue)?q(ge):void 0)}),Y(e,D),Ue(E)}ui(Ca,{model:{type:`Object`},session:{type:`Object`},options:{type:`Object`}},[],[]);function wa(e,t,n=!1){return!(!t?.choiceId||e?.autoplayAudioEnabled&&e?.completeAudioEnabled&&e?.hasAudio&&!n)}var Ta=Ca.element,Ea=class extends Ta{_internalSession=null;_model=null;_options=null;audioComplete=!1;_dispatchModelSet=()=>{this.dispatchEvent(new _i(this.tagName.toLowerCase(),this._isComplete(),this._model!==void 0))};_dispatchSessionChanged=()=>{this.dispatchEvent(new vi(this.tagName.toLowerCase(),this._isComplete()))};set model(e){this._model=e,this.audioComplete=!1,super.model=e,this._dispatchModelSet()}get model(){return this._model}set session(e){this._internalSession=e,super.session=e,this._dispatchSessionChanged()}get session(){return this._internalSession}set options(e){this._options=e,super.options=e}get options(){return this._options}onSessionChange=e=>{this._internalSession=e,super.session=e,this._dispatchSessionChanged()};onAudioStarted=()=>{this._internalSession={...this._internalSession||{},audioStartTime:Date.now()}};onAudioEnded=()=>{this.audioComplete=!0,this._internalSession={...this._internalSession||{},audioEndTime:Date.now()},this._dispatchSessionChanged()};_isComplete=()=>wa(this._model,this._internalSession,this.audioComplete);connectedCallback(){super.connectedCallback(),this.onSessionChange=this.onSessionChange,this.onAudioStarted=this.onAudioStarted,this.onAudioEnded=this.onAudioEnded}},Da=`{{blank}}`,Oa={model:{id:`1`,element:`mc-populated-blank`,prompt:`<p><strong>Demo prompt</strong></p>`,promptEnabled:!0,interactionMode:`populate_blank`,layoutProfile:``,choiceLayout:``,layoutProfilePresets:{},layoutLimits:{...Xi},audioButtonSkin:null,audioButtonSkinsByLocale:{},uiText:{answerChoices:`Answer choices`,selectedAnswerInSentence:`blank`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,transcriptLabel:`Transcript`,listenLabelEn:`Listen`,listenLabelEs:`Escuchar`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,listenSilentAltEs:`Escuchar. Repetir las instrucciones.`,listenPlayingAltEs:`Escuchar. Estas son las instrucciones.`},sentenceHtml:``,template:`<p>The answer is ${Da}.</p>`,choiceMode:`text`,choices:[{id:`c1`,labelHtml:`<p>Option A</p>`},{id:`c2`,labelHtml:`<p>Option B</p>`},{id:`c3`,labelHtml:`<p>Option C</p>`}],correctChoiceId:`c2`,hasAudio:!1,autoplayAudioEnabled:!1,completeAudioEnabled:!1,audioUrl:``,audioTranscript:``,showVisibleTranscript:!1,locale:``,teacherInstructions:``,teacherInstructionsEnabled:!1},configuration:{prompt:{label:`Prompt`,settings:!0}}},ka=n({countBlankTokens:()=>ja,createCorrectResponseSession:()=>Ga,createDefaultModel:()=>Fa,getCorrectness:()=>Ma,getPartialScore:()=>Na,model:()=>Wa,normalize:()=>Ia,normalizeSession:()=>La,outcome:()=>Pa,validate:()=>Ka}),Aa=e=>!!e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0;function ja(e){return e?(e.match(/\{\{blank\}\}/g)||[]).length:0}var Ma=(e,t)=>{if(!t?.choiceId)return`unanswered`;let n=e?.correctChoiceId||``;return t.choiceId===n?`correct`:`incorrect`},Na=(e,t)=>!t||Aa(t)||!t.choiceId?0:1,Pa=(e,t,n)=>new Promise(r=>{if(!t||Aa(t)){r({score:0,empty:!0,traceLog:[`Student did not select any answers. Score is 0.`]});return}t=La(t);let i=Ma(e,t);if(i===`unanswered`){r({score:0,empty:!0,traceLog:[`Student did not select any answers. Score is 0.`]});return}let a=+(i===`correct`);r({score:a,empty:!1,traceLog:[`Mode: ${n?.mode||`unknown`}.`,`Student selected choice: ${t.choiceId}.`,`Correct choice: ${e?.correctChoiceId||`none`}.`,`Final score: ${a}.`]})}),Fa=(e={})=>({...Oa.model,...e,layoutLimits:{...Xi,...e?.layoutLimits||{}}}),Ia=(e={})=>Fa(e),La=e=>({...e}),Ra=e=>!!e?.shuffle,za=(e,t)=>e?.lockChoiceOrder||t?.[`@pie-element`]?.lockChoiceOrder?!0:t?.role===`instructor`;function Ba(e){let t=[...e];for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t}var Va=e=>Array.isArray(e?.data?.shuffledValues)?e.data.shuffledValues:Array.isArray(e?.shuffledValues)?e.shuffledValues:[],Ha=(e,t,n)=>{let r=t.map(t=>e.find(e=>e?.[n]===t)).filter(e=>!!e);if(r.length===e.length)return r;let i=new Set(r.map(e=>e[n])),a=e.filter(e=>!i.has(e?.[n]));return[...r,...a]},Ua=async(e,t,n,r)=>{let i=Array.isArray(e?.choices)?[...e.choices]:[];if(!i.length||!Ra(e)||za(e,n||{}))return i;let a=Va(t);if(a.length)return Ha(i,a,`id`);let o=Ba(i);if(r&&typeof r==`function`&&t?.id&&t?.element){let e=o.map(e=>e?.id).filter(Boolean);e.length&&await r(t.id,t.element,{shuffledValues:e})}return o},Wa=async(e,t,n,r)=>{let i=t||{},a=n||{},o=Ia(e),s=await Ua(o,i,a,r),c={prompt:o.promptEnabled?o.prompt:null,interactionMode:o.interactionMode||`populate_blank`,layoutProfile:o.layoutProfile||``,choiceLayout:o.choiceLayout||``,layoutProfilePresets:o.layoutProfilePresets&&typeof o.layoutProfilePresets==`object`?o.layoutProfilePresets:{},layoutLimits:o.layoutLimits||{...Xi},audioButtonSkin:o.audioButtonSkin&&typeof o.audioButtonSkin==`object`?o.audioButtonSkin:null,audioButtonSkinsByLocale:o.audioButtonSkinsByLocale&&typeof o.audioButtonSkinsByLocale==`object`?o.audioButtonSkinsByLocale:{},uiText:o.uiText&&typeof o.uiText==`object`?o.uiText:{},sentenceHtml:o.sentenceHtml||null,template:o.template,choiceMode:o.choiceMode,choices:s,hasAudio:o.hasAudio,autoplayAudioEnabled:!!o.autoplayAudioEnabled,completeAudioEnabled:!!o.completeAudioEnabled,audioUrl:o.hasAudio?o.audioUrl:null,audioTranscript:o.hasAudio?o.audioTranscript:null,showVisibleTranscript:!!o.showVisibleTranscript,customType:o.customType||``,useFeatureButtonAudio:typeof o.useFeatureButtonAudio==`boolean`?o.useFeatureButtonAudio:void 0,locale:o.locale||``,disabled:a.mode!==`gather`,mode:a.mode};if(a.mode===`evaluate`){let e=Ma(o,i);c.correctness=e,c.responseCorrect=e===`correct`,c.correctChoiceId=o.correctChoiceId}return a.role===`instructor`&&(a.mode===`view`||a.mode===`evaluate`)?c.teacherInstructions=o.teacherInstructionsEnabled?o.teacherInstructions:null:c.teacherInstructions=null,c},Ga=(e,t)=>new Promise(n=>{t.mode!==`evaluate`&&t.role===`instructor`?n({id:`1`,element:`mc-populated-blank`,choiceId:e?.correctChoiceId||``}):n(null)}),Ka=(e={},t={})=>{let n={};if(e.promptEnabled){let t=e.prompt?.trim()||``;(!t||t===`<p></p>`)&&(n.prompt=`Prompt is required when prompt is enabled`)}let r=e.interactionMode||`populate_blank`,i=ja(e.template||``);r===`audio_mc_only`?i>0&&(n.template=`Template cannot contain ${Da} in audio-only mode`):r===`populate_blank`?i===0?n.template=`Template must contain exactly one ${Da} placeholder`:i>1&&(n.template=`Template must contain only one ${Da} placeholder`):n.interactionMode=`Unknown interaction mode`;let a=Array.isArray(e.choices)?e.choices:[];a.length<2&&(n.choices=`At least two choices are required`);let o=e.choiceMode||`text`;for(let e=0;e<a.length;e++){let t=a[e];if(!t?.id){n.choices=`Choice ${e+1} is missing an id`;break}if(o===`text`){let r=(t.labelHtml||``).trim();if(!r||r===`<p></p>`){n.choices=`Choice ${e+1} needs label text`;break}}else{if(!t.imageUrl?.trim()){n.choices=`Choice ${e+1} needs an image URL`;break}if(!t.imageAlt?.trim()){n.choices=`Choice ${e+1} needs image alt text`;break}}}let s=e.correctChoiceId;(!s||!a.some(e=>e.id===s))&&(n.correctChoiceId=`Correct choice must match one of the choice ids`),e.hasAudio&&(e.audioUrl?.trim()||(n.audioUrl=`A playable audio URL is required when audio is enabled`));let c=e?.layoutLimits;if(c&&typeof c==`object`)for(let e of`blankStandaloneWidthRem.blankWideWidthRem.blankUnderlineWidthPx.blankUnderlineWideWidthPx.horizontalChoiceWidthPx.horizontalChoiceWidthVw.horizontalChoiceTileMinHeightRem.horizontalChoiceContentMinHeightRem.selectedImageMaxHeightRem.choiceImageMaxHeightRem.listenButtonSizePx.stimulusMinColumnPx.textMinColumnPx.legendMaxChars.choiceGroupGapRem.choiceRowGapRem.toggleButtonGapRem.horizontalChoiceRadioTopMarginRem.audioBlankTemplateMarginTopRem.audioBlankTemplateMarginBottomRem.audioInstructionsMaxWidthPx.narrowHorizontalChoiceMaxWidthPx.stimulusGridColumnGapRem.stimulusGridRowGapRem.stimulusSentenceMarginTopRem.stimulusChoicesMarginTopRem.tokenGridColumnGapRem.tokenGridRowGapRem.tokenTemplateMarginTopRem.tokenInlineTokenGapRem.tokenChoicesMarginTopRem.inlineGridColumnGapRem.inlineGridRowGapRem.inlineTemplateMarginTopRem.inlineChoicesMarginTopRem`.split(`.`)){if(c[e]===void 0||c[e]===null)continue;let t=Number(c[e]);if(!Number.isFinite(t)||t<=0){n.layoutLimits=`${e} must be a positive number when provided`;break}}return n},qa={...ka},Ja=Ea;e.controller=qa,e.default=Ja})(this.McPopulatedBlankElement=this.McPopulatedBlankElement||{});
|
|
597
|
+
}`};function ko(e,t){We(t,!0),Kr(e,Oo);let n=Z(t,`model`,7),r=Z(t,`session`,7),i=Z(t,`onSessionChange`,7),a=Z(t,`onAudioStarted`,7),o=Z(t,`onAudioEnded`,7),s=e=>Sa(e,n()?.language),c=F(``),l=F(null),u=F(null),d=F(null),f=`mc-populated-blank-${Math.random().toString(36).slice(2,10)}`,p=M(()=>(n()?.mode||n()?.env?.mode||``).toString()),m=M(()=>K(p)===`evaluate`),h=M(()=>n()?.correctness),g=M(()=>typeof n()?.responseCorrect==`boolean`?n().responseCorrect:K(h)===`correct`),_=M(()=>K(h)===`correct`),v=M(()=>K(h)===`incorrect`),y=F(!1),b=M(()=>K(m)&&!K(g)&&!!n()?.correctChoiceId),x=M(()=>n()?.layoutProfile||``),S=M(()=>Qa({interactionMode:n()?.interactionMode,template:n()?.template,choiceLayout:n()?.choiceLayout,layoutProfile:K(x),hasAudio:n()?.hasAudio,useFeatureButtonAudio:n()?.useFeatureButtonAudio})),ee=M(()=>K(S).isAudioOnlyMode),C=M(()=>K(S).isBlankOnlyTemplate),w=M(()=>K(S).isHorizontalChoices),T=M(()=>K(S).hasInlineSentenceAudioLayout),te=M(()=>K(S).useFeatureButtonAudio),ne=M(()=>no({layoutProfile:K(x),isBlankOnlyTemplate:K(C),configuredLimits:n()?.layoutLimits,customProfilePresets:n()?.layoutProfilePresets})),re=M(()=>Array.isArray(n()?.choices)?n().choices:[]),ie=M(()=>n()?.choiceMode||`text`),ae=M(()=>r()?.choiceId||K(c)||``),oe=M(()=>`${f}-choice-group-${n()?.id||`1`}`),se=M(()=>ao({selectedId:K(ae),isEvaluateMode:K(m),showCorrectAnswer:K(y),correctChoiceId:String(n()?.correctChoiceId||``)})),ce=M(()=>K(re).find(e=>e.id===K(se))),le=M(()=>String(K(ce)?.labelHtml||``)),ue=M(()=>oo({isEvaluateMode:K(m),showCorrectAnswer:K(y),isCorrect:K(_),isIncorrect:K(v),selectedId:K(ae)})),de=M(()=>K(ue)===`correct`?s(`correctAnswerSelected`):K(ue)===`incorrect`?s(`incorrectAnswerSelected`):``),fe=M(()=>Ya({isEvaluateMode:K(m),correctChoiceId:String(n()?.correctChoiceId||``),selectedId:String(K(ae)||``),showCorrectAnswer:K(y)})),pe=M(()=>`${f}-prompt`),me=M(()=>`${f}-choices-legend`),he=M(()=>`${f}-result`),ge=M(()=>`${f}-blank-hint`),_e=M(()=>so({prompt:n()?.prompt||``,legendMaxChars:K(ne).legendMaxChars,answerChoicesLabel:s(`answerChoices`)})),ve=M(()=>n()?.prompt?K(pe):void 0),ye=M(()=>n()?.prompt?void 0:String(n()?.choiceGroupLabel||``).trim()||K(_e)),be=M(()=>n()?.prompt?K(pe):void 0),xe=M(()=>{let e=String(n()?.language||n()?.locale||``).trim();return e?e.replace(/_/g,`-`):void 0}),Se=M(()=>fo(n()?.customType)),E=M(()=>po(n()?.customType)),Ce=M(()=>{let e=n()?.template||``,t=e.indexOf(`{{blank}}`);if(t<0)return{before:e,after:``};let r=e.slice(0,t),i=e.slice(t+9);return K(x)===`inline_sentence`&&(r=`${r.replace(/\s+$/,``)} `,i=` ${i.replace(/^\s+/,``)}`),{before:r,after:i}});function D(e){let t=e.target;if(!t.checked)return;let n=t.value;I(c,n,!0),i()?.({...r(),choiceId:n})}function O(){K(b)&&I(y,!K(y))}gn(()=>{(!K(m)||K(g))&&I(y,!1)});function we(e){if(n()?.disabled)return;let t=e.key;if(![`ArrowDown`,`ArrowRight`,`ArrowUp`,`ArrowLeft`].includes(t))return;e.preventDefault();let r=e.currentTarget,i=Array.from(r.querySelectorAll(`input[type="radio"]:not([disabled])`));if(i.length===0)return;let a=i.findIndex(e=>e.checked);a=t===`ArrowDown`||t===`ArrowRight`?a<0?0:(a+1)%i.length:a<0?i.length-1:(a-1+i.length)%i.length;let o=i[a];o.checked=!0,o.dispatchEvent(new Event(`change`,{bubbles:!0})),o.focus()}let Te=M(()=>io({locale:n()?.locale,audioButtonSkin:n()?.audioButtonSkin,audioButtonSkinsByLocale:n()?.audioButtonSkinsByLocale}));gn(()=>{I(c,r()?.choiceId||``,!0)}),gn(()=>{let e=K(l);if(e)return e.addEventListener(`click`,O),()=>e.removeEventListener(`click`,O)}),gn(()=>{let e=K(u);if(!e)return;let t=e=>{e.target?.type===`radio`&&D(e)},n=e=>we(e);return e.addEventListener(`change`,t),e.addEventListener(`keydown`,n),()=>{e.removeEventListener(`change`,t),e.removeEventListener(`keydown`,n)}}),gn(()=>{K(d)&&yo(K(Se),K(d))});var Ee={get model(){return n()},set model(e){n(e),P()},get session(){return r()},set session(e){r(e),P()},get onSessionChange(){return i()},set onSessionChange(e){i(e),P()},get onAudioStarted(){return a()},set onAudioStarted(e){a(e),P()},get onAudioEnded(){return o()},set onAudioEnded(e){o(e),P()}},De=Do(),Oe=R(De),ke=e=>{{let t=M(()=>n()?.language);Ja(e,{get html(){return n().teacherInstructions},get language(){return K(t)}})}};Y(Oe,e=>{n()?.teacherInstructions&&e(ke)});var Ae=z(Oe,2),je=e=>{var t=bo();Gr(t,()=>n().prompt,!0),k(t),B(()=>X(t,`id`,K(pe))),J(e,t)};Y(Ae,e=>{n()?.prompt&&e(je)});var Me=z(Ae,2),Ne=e=>{var t=Co(),r=R(t),i=R(r),a=R(i),o=R(a),s=e=>{J(e,xo())},c=e=>{J(e,So())};Y(o,e=>{K(y)?e(s):e(c,-1)}),k(a);var u=rn(z(a,2),!0);k(i),k(r),fi(r,e=>I(l,e),()=>K(l)),k(t),B(e=>{X(r,`aria-pressed`,K(y)),Or(u,e)},[()=>Ca(K(y)?`hideCorrectAnswer`:`showCorrectAnswer`,n()?.language)]),J(e,t)};Y(Me,e=>{K(b)&&e(Ne)});var Pe=z(Me,2);{let e=M(()=>!!n()?.hasAudio),t=M(()=>n()?.audioUrl),r=M(()=>!!n()?.autoplayAudioEnabled),i=M(()=>n()?.language);Aa(Pe,{get hasAudio(){return K(e)},get audioUrl(){return K(t)},get useFeatureButtonAudio(){return K(te)},get autoplayEnabled(){return K(r)},get featureAudioSkin(){return K(Te)},get language(){return K(i)},get onaudiostarted(){return a()},get onaudioended(){return o()}})}var Fe=z(Pe,2),Ie=e=>{var t=wo();Gr(t,()=>n().sentenceHtml,!0),k(t),B(()=>X(t,`aria-describedby`,K(be))),J(e,t)};Y(Fe,e=>{n()?.sentenceHtml&&e(Ie)});var Le=z(Fe,2),Re=e=>{var t=To(),r=R(t);Gr(r,()=>K(Ce).before);var i=z(r);{let e=M(()=>s(`blankLabel`)),t=M(()=>n()?.language);Ia(i,{get choiceMode(){return K(ie)},get displayChoice(){return K(ce)},get displayChoiceLabelHtml(){return K(le)},get isStandalone(){return K(C)},get blankWidth(){return K(ne).blankWidth},get blankBorderWidth(){return K(ne).blankBorderWidth},get ariaLabel(){return K(e)},get language(){return K(t)}})}Gr(z(i),()=>K(Ce).after),k(t),B(()=>X(t,`aria-describedby`,K(be))),J(e,t)};Y(Le,e=>{K(ee)||e(Re)});var ze=z(Le,2),Be=e=>{var t=Eo(),n=rn(t,!0);B(()=>{X(t,`id`,K(he)),Or(n,K(de))}),J(e,t)};Y(ze,e=>{K(de)&&e(Be)});var Ve=z(ze,2),He=rn(Ve,!0),A=z(Ve,2),Ue=R(A),Ke=rn(Ue,!0),qe=z(Ue,2);return zr(qe,21,()=>K(re),e=>e.id,(e,t)=>{{let r=M(()=>K(se)===K(t).id),i=M(()=>!!n()?.disabled),a=M(()=>K(fe).get(K(t).id)),o=M(()=>n()?.language);Ga(e,{get choice(){return K(t)},get choiceMode(){return K(ie)},get isHorizontal(){return K(w)},get isSelected(){return K(r)},get isDisabled(){return K(i)},get correctness(){return K(a)},get isEvaluateMode(){return K(m)},get instanceId(){return f},get radioGroupName(){return K(oe)},get language(){return K(o)}})}}),k(qe),fi(qe,e=>I(u,e),()=>K(u)),k(A),k(De),fi(De,e=>I(d,e),()=>K(d)),B((e,t)=>{Qr(De,1,`mc-populated-blank-root pie-element pie-element-mc-populated-blank pie-delivery-root layout-${K(x)} ${K(E)} ${K(T)?`has-inline-audio`:``}`,`svelte-6wlbb4`),X(De,`lang`,K(xe)),ei(De,K(ne).rootStyle),X(De,`data-mpb-css`,go),X(Ve,`id`,K(ge)),Or(He,e),A.disabled=n()?.disabled,X(Ue,`id`,K(me)),Or(Ke,K(_e)),Qr(qe,1,`pie-choices ${K(w)?`choices-horizontal`:`choices-vertical`}`,`svelte-6wlbb4`),X(qe,`aria-labelledby`,K(ve)),X(qe,`aria-label`,K(ye)),X(qe,`aria-describedby`,t)},[()=>s(`blankPreSelectionHint`),()=>[K(ge),K(de)?K(he):void 0].filter(Boolean).join(` `)]),J(e,De),Ge(Ee)}vi(ko,{model:{type:`Object`},session:{type:`Object`},options:{type:`Object`},onSessionChange:{},onAudioStarted:{},onAudioEnded:{}},[],[]);function Ao(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function jo(e,t){if(e===t)return e;if(!Ao(e)||!Ao(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 Mo=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}},No=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 Po(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 Mo(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=jo(this.#t,e),super.session=e}dispatchSessionChanged(){this.dispatchEvent(new No(this.tagName.toLowerCase(),this.isComplete()))}}return r}var Fo=Po(ko,{isComplete:(e,t)=>!!t?.choiceId});function Io(e){return!!e?.autoplayAudioEnabled&&!!e?.completeAudioEnabled&&!!e?.hasAudio}return class extends Fo{audioComplete=!1;constructor(){super(),this.onAudioStarted=()=>{this.#e({audioStartTime:Date.now()})},this.onAudioEnded=()=>{this.audioComplete=!0,this.#e({audioEndTime:Date.now()}),this.dispatchSessionChanged()}}set model(e){e?.audioUrl!==this.model?.audioUrl&&(this.audioComplete=!1),super.model=e}get model(){return super.model}isComplete(){return super.isComplete()&&(this.audioComplete||!Io(this.model))}#e(e){let t=this.session||{},n=t.audioStartTime||e.audioStartTime,r=t.audioEndTime||e.audioEndTime,i={...t,...n?{audioStartTime:n}:{},...r?{audioEndTime:r}:{}};!i.waitTime&&n&&r&&(i.waitTime=r-n),this.writeSession(i)}}})();
|