@pie-element/venn-classification 0.1.4-next.20261007184841 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/author/index.js +548 -279
- package/dist/author/index.js.map +1 -1
- package/dist/browser/{VennClassification-opnX3-BY.js → VennClassification-DKBN96xP.js} +2172 -1914
- package/dist/browser/VennClassification-DKBN96xP.js.map +1 -0
- package/dist/browser/author/index.js +1 -1
- package/dist/browser/delivery/index.js +1 -1
- package/dist/browser/editor-runtime/{VennClassification-opnX3-BY.js → VennClassification-DKBN96xP.js} +2172 -1914
- package/dist/browser/editor-runtime/VennClassification-DKBN96xP.js.map +1 -0
- package/dist/browser/editor-runtime/author/index.js +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +1 -1
- package/dist/browser/editor-runtime/{mathjax-BKrHE4xs-BMxhukI-.js → mathjax-BKrHE4xs-BMXH-FVH.js} +2 -2
- package/dist/browser/editor-runtime/{mathjax-BKrHE4xs-BMxhukI-.js.map → mathjax-BKrHE4xs-BMXH-FVH.js.map} +1 -1
- package/dist/browser/{mathjax-BKrHE4xs-BMxhukI-.js → mathjax-BKrHE4xs-BMXH-FVH.js} +2 -2
- package/dist/browser/{mathjax-BKrHE4xs-BMxhukI-.js.map → mathjax-BKrHE4xs-BMXH-FVH.js.map} +1 -1
- package/dist/delivery/index.js +548 -279
- package/dist/delivery/index.js.map +1 -1
- package/dist/index.iife.js +23 -23
- package/package.json +4 -4
- package/dist/browser/VennClassification-opnX3-BY.js.map +0 -1
- package/dist/browser/editor-runtime/VennClassification-opnX3-BY.js.map +0 -1
package/dist/index.iife.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
this.VennClassificationElement=(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}}function b(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);let n=[];for(let r of e)if(n.push(r),n.length===t)break;return n}var x=1024,S=2048,C=4096,w=8192,T=16384,E=32768,ee=1<<25,te=65536,ne=1<<19,re=1<<20,ie=1<<25,D=1<<21,ae=1<<22,oe=1<<23,se=Symbol(`$state`),ce=Symbol(`component`),le=Symbol(`legacy props`),ue=Symbol(``),de=Symbol(`attributes`),O=Symbol(`class`),fe=Symbol(`style`),pe=Symbol(`text`),me=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},he=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function ge(){console.warn(`https://svelte.dev/e/derived_inert`)}function _e(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function ve(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var k=!1;function ye(e){k=e}var A;function j(t){if(t===null)throw _e(),e;return A=t}function M(){return j(Jt(A))}function N(t){if(k){if(Jt(A)!==null)throw _e(),e;A=t}}function be(e=1){if(k){for(var t=e,n=A;t--;)n=Jt(n);A=n}}function xe(e=!0){for(var t=0,n=A;;){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=Jt(n);e&&n.remove(),n=i}}function Se(t){if(!t||t.nodeType!==8)throw _e(),e;return t.data}function Ce(e){return e===this.v}function we(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Te(e){return!we(e,this.v)}function Ee(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function De(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Oe(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function ke(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Ae(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function je(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Me(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Ne(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Pe(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Fe(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ie(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Le(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Re(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var P=null;function ze(e){P=e}function Be(e,t=!1,n){P={p:P,i:!1,c:null,e:null,s:e,x:null,r:G,l:null}}function Ve(e){var t=P,n=t.e;if(n!==null){t.e=null;for(var r of n)dn(r)}return e!==void 0&&(t.x=e),t.i=!0,P=t.p,He(e)}function He(e={}){return u(e,ce,{value:!0}),e}function Ue(){return!0}var We=[];function Ge(){var e=We;We=[],v(e)}function Ke(e){if(We.length===0&&!mt){var t=We;queueMicrotask(()=>{t===We&&Ge()})}We.push(e)}function qe(){for(;We.length>0;)Ge()}var Je=~(S|C|x);function F(e,t){e.f=e.f&Je|t}function Ye(e){e.f&512||e.deps===null?F(e,x):F(e,C)}function Xe(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),F(e,x)}function Ze(e){var t=W,n=G;In(null),Ln(null);try{return e()}finally{In(t),Ln(n)}}function Qe(e,t,n,r){let i=Ue()?nt:at;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=G,c=$e(),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){rn(e,s)}et()}}var d=tt();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>it(e))).then(u).catch(e=>rn(e,s)).finally(d)}l?l.then(()=>{c(),f(),et()}):f()}function $e(){var e=G,t=W,n=P,r=R;return function(i=!0){Ln(e),In(t),ze(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function et(e=!0){Ln(null),In(null),ze(null),e&&R?.deactivate()}function tt(){var e=G,t=e.b,n=R,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 nt(e){var n=2|S;return G!==null&&(G.f|=ne),{ctx:P,deps:null,effects:null,equals:Ce,f:n,fn:e,reactions:null,rv:0,v:t,wv:0,parent:G,ac:null}}var rt=Symbol(`obsolete`);function it(e,n,r){let i=G;i===null&&De();var a=void 0,o=jt(t),s=!W,c=new Set;return gn(()=>{var t=G,n=y();a=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==me&&n.reject(e)}).finally(et)}catch(e){n.reject(e),et()}var r=R;if(s){if(t.f&32768)var l=tt();if(i.b?.is_rendered())r.async_deriveds.get(t)?.reject(rt);else for(let e of c.values())e.reject(rt);c.add(n),r.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),c.delete(n),t!==rt&&(r.activate(),t?(o.f|=oe,It(o,t)):(o.f&8388608&&(o.f^=oe),It(o,e)),r.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),ln(()=>{for(let e of c)e.reject(rt)}),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function I(e){let t=nt(e);return zn(t),t}function at(e){let t=nt(e);return t.equals=Te,t}function ot(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Cn(t[n])}}function L(e){var n,r=G,i=e.parent;if(!Nn&&i!==null&&e.v!==t&&i.f&24576)return ge(),e.v;Ln(i);try{ot(e),n=Zn(e)}finally{Ln(r)}return n}function st(e){var t=L(e);if(!e.equals(t)&&(e.wv=Jn(),(!R?.is_fork||e.deps===null)&&(R===null?e.v=t:(R.capture(e,t,!0),dt?.capture(e,t,!0)),e.deps===null))){F(e,x);return}Nn||(ft===null?Ye(e):(cn()||R?.is_fork)&&ft.set(e,t))}function ct(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Ze(()=>{t.ac.abort(me),t.ac=null}),t.fn!==null&&(t.teardown=_),er(t,0),xn(t))}function lt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&tr(t)}var ut=null,R=null,dt=null,ft=null,pt=null,mt=!1,ht=!1,gt=null,_t=null,vt=0,yt=1,bt=class e{id=yt++;#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(){ut===null?ut=this:(ut.#n=this,this.#t=ut),ut=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)F(r,S),t(r);for(r of n.m)F(r,C),t(r)}this.#p.add(e)}#g(){var e=[];for(let i of this.#c)if(!(i.f&16384||!(i.f&6144))){for(var t=i,n=!1;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024)){n=!0;break}t.f^=x}}n||e.push(t)}return this.#c=[],e}#_(){this.#e=!0;for(let e of this.#u)this.#d.delete(e),F(e,S),this.schedule(e);for(let e of this.#d)F(e,C),this.schedule(e);this.apply();for(var t=gt=[],n=[],r=_t=[];this.#c.length>0;){vt++>1e3&&(this.#S(),xt());for(let e of this.#g())try{this.#v(e,t,n)}catch(t){throw Ot(e),this.#h()||this.discard(),t}}if(R=null,r.length>0){var i=e.ensure();for(let e of r)i.schedule(e)}if(gt=null,_t=null,this.#h()){this.#x(n),this.#x(t);for(let[e,t]of this.#f)Dt(e,t);r.length>0&&R.#_();return}let a=this.#y();if(a){this.#x(n),this.#x(t),a.#b(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),dt=this,Ct(n),Ct(t),dt=null,this.#s?.resolve();var o=R;if(this.#a===0&&(this.#c.length===0||o!==null)&&this.#S(),this.#c.length>0)if(o!==null){for(let e of this.#c)o.#c.push(e);this.#c=[]}else o=this;o!==null&&(B.clear(),o.#_())}#v(e,t,n){e.f^=x;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^=x:i&4?t.push(r):Yn(r)&&(i&16&&this.#d.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}}}#y(){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}#b(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),F(i,S),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#S(),R=this,this.#_()}#x(e){for(var t=0;t<e.length;t+=1)Xe(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]),ft?.set(e,n)),this.is_fork||(e.v=n)}activate(){R=this}deactivate(){R=null,ft=null}flush(){try{ht=!0,R=this,this.#_()}finally{vt=0,pt=null,gt=null,_t=null,ht=!1,R=null,ft=null,B.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(rt);this.#S(),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,Ke(()=>{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(R===null){let t=R=new e;!ht&&!mt&&Ke(()=>{t.#e||t.flush()})}return R}apply(){ft=null}schedule(e){if(pt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}this.#c.push(e)}#S(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?ut=e:t.#t=e,this.linked=!1}}};function z(e){var t=mt;mt=!0;try{var n;for(e&&(R!==null&&!R.is_fork&&R.flush(),n=e());;){if(qe(),R===null)return n;R.flush()}}finally{mt=t}}function xt(){try{Me()}catch(e){rn(e,pt)}}var St=null;function Ct(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Yn(r)&&(St=new Set,tr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Tn(r),St?.size>0)){B.clear();for(let e of St){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)St.has(n)&&(St.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)}}St.clear()}}St=null}}function wt(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?wt(i,t,n,r):e&4194320&&!(e&2048)&&Tt(i,t,r)&&(F(i,S),Et(i))}}function Tt(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&&Tt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Et(e){R.schedule(e)}function Dt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),F(e,x);for(var n=e.first;n!==null;)Dt(n,t),n=n.next}}function Ot(e){F(e,x);for(var t=e.first;t!==null;)Ot(t),t=t.next}var kt=new Set,B=new Map,At=!1;function jt(e,t){return{f:0,v:e,reactions:null,equals:Ce,rv:0,wv:0}}function Mt(e,t){let n=jt(e,t);return zn(n),n}function Nt(e,t=!1,n=!0){let r=jt(e);return t||(r.equals=Te),r}function V(e,t,n=!1){return W!==null&&(!Fn||W.f&131072)&&Ue()&&W.f&4325394&&(Rn===null||!Rn.has(e))&&Le(),It(e,n?Bt(t):t,_t)}var Pt=null,Ft=0;function It(e,t,n=null){if(!e.equals(t)){Nn?B.set(e,t):B.has(e)||B.set(e,e.v);var r=bt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&L(t),ft===null&&Ye(t)}e.wv=Jn(),Pt=null,Ft=0,zt(e,S,n),Pt=null,Ue()&&G!==null&&G.f&1024&&!(G.f&96)&&(Hn===null?Un([e]):Hn.push(e)),!r.is_fork&&kt.size>0&&!At&&Lt()}return t}function Lt(){At=!1;for(let e of kt){e.f&1024&&F(e,C);let t;try{t=Yn(e)}catch{t=!0}t&&tr(e)}kt.clear()}function Rt(e){V(e,e.v+1)}function zt(e,t,n){var r=e.reactions;if(r!==null){var i=Ue(),a=r.length;if(Ft+=a,Ft>1e5&&Pt===null&&(Pt=new Set),Pt!==null){if(Pt.has(e))return;Pt.add(e)}for(var o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===G)){var l=(c&S)===0;if(l&&F(s,t),c&131072)kt.add(s);else if(c&2){var u=s;ft?.delete(u),zt(u,C,n)}else if(l){var d=s;c&16&&St!==null&&St.add(d),n===null?Et(d):n.push(d)}}}}}function Bt(e){if(typeof e!=`object`||!e||se in e||ce in e)return e;let n=h(e);if(n!==p&&n!==m)return e;var r=new Map,i=a(e),o=Mt(0),s=null,c=Kn,l=e=>{if(Kn===c)return e();var t=W,n=Kn;In(null),qn(c);var r=e();return In(t),qn(n),r};return i&&r.set(`length`,Mt(e.length,s)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&Fe();var i=r.get(t);return i===void 0?l(()=>{var e=Mt(n.value,s);return r.set(t,e),e}):V(i,n.value,!0),!0},deleteProperty(e,n){var i=r.get(n);if(i===void 0){if(n in e){let e=l(()=>Mt(t,s));r.set(n,e),Rt(o)}}else V(i,t),Rt(o);return!0},get(n,i,a){if(i===se)return e;var o=r.get(i),c=i in n;if(o===void 0&&(!c||d(n,i)?.writable)&&(o=l(()=>Mt(Bt(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){this.has?.(e,n);var i=Reflect.getOwnPropertyDescriptor(e,n),a=r.get(n);if(a!==void 0){var o=K(a);if(o===t)return;if(i&&`value`in i)i.value=o;else return{enumerable:!0,configurable:!0,value:o,writable:!0}}return i},has(e,n){if(n===se)return!0;var i=r.get(n),a=i!==void 0&&i.v!==t||Reflect.has(e,n);return(i!==void 0||G!==null&&(!a||d(e,n)?.writable))&&(i===void 0&&(i=l(()=>Mt(a?Bt(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(()=>Mt(t,s)),r.set(p+``,m)):V(m,t)}if(u===void 0)(!f||d(e,n)?.writable)&&(u=l(()=>Mt(void 0,s)),V(u,Bt(a)),r.set(n,u));else{f=u.v!==t;var h=l(()=>Bt(a));V(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&&V(_,v+1)}Rt(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(){Ie()}})}var Vt,Ht,Ut,Wt;function Gt(){if(Vt===void 0){Vt=window,Ht=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Ut=d(t,`firstChild`).get,Wt=d(t,`nextSibling`).get,g(e)&&(e[O]=void 0,e[de]=null,e[fe]=void 0,e.__e=void 0),g(n)&&(n[pe]=void 0)}}function Kt(e=``){return document.createTextNode(e)}function qt(e){return Ut.call(e)}function Jt(e){return Wt.call(e)}function Yt(e,t){if(!k)return qt(e);var n=qt(A);if(n===null)n=A.appendChild(Kt());else if(t&&n.nodeType!==3){var r=Kt();return n?.before(r),j(r),r}return t&&tn(n),j(n),n}function Xt(e,t=!1){if(!k){var n=qt(e);return n instanceof Comment&&n.data===``?Jt(n):n}if(t){if(A?.nodeType!==3){var r=Kt();return A?.before(r),j(r),r}tn(A)}return A}function Zt(e,t=!1){if(!k)return qt(e);var n=Yt(e,t);return N(e),n}function H(e,t=1,n=!1){let r=k?A:e;for(var i;t--;)i=r,r=Jt(r);if(!k)return r;if(n){if(r?.nodeType!==3){var a=Kt();return r===null?i?.after(a):r.before(a),j(a),a}tn(r)}return j(r),r}function Qt(e){e.textContent=``}function $t(){return!1}function en(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 tn(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 nn(e){var t=G;if(t===null)return W.f|=oe,e;if(!(t.f&32768)&&!(t.f&4))throw e;rn(e,t)}function rn(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 an(e){G===null&&(W===null&&je(e),Ae()),Nn&&ke(e)}function on(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function sn(e,t){var n=G;n!==null&&n.f&8192&&(e|=w);var r={ctx:P,deps:null,nodes:null,f:e|S|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};R?.register_created_effect(r);var i=r;if(e&4)gt===null?bt.ensure().schedule(r):gt.push(r);else if(t!==null){try{tr(r)}catch(e){throw Cn(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&&on(i,n),W!==null&&W.f&2&&!(e&64))){var a=W;(a.effects??=[]).push(i)}return r}function cn(){return W!==null&&!Fn}function ln(e){let t=sn(8,null);return F(t,x),t.teardown=e,t}function un(e){an(`$effect`);var t=G.f;if(!W&&t&32&&P!==null&&!P.i){var n=P;(n.e??=[]).push(e)}else return dn(e)}function dn(e){return sn(4|re,e)}function fn(e){return an(`$effect.pre`),sn(8|re,e)}function pn(e){bt.ensure();let t=sn(64|ne,e);return()=>{Cn(t)}}function mn(e){bt.ensure();let t=sn(64|ne,e);return(e={})=>new Promise(n=>{e.outro?En(t,()=>{Cn(t),n(void 0)}):(Cn(t),n(void 0))})}function hn(e){return sn(4,e)}function gn(e){return sn(ae|ne,e)}function _n(e,t=0){return sn(8|t,e)}function U(e,t=[],n=[],r=[]){Qe(r,t,n,t=>{sn(8,()=>{e(...t.map(K))})})}function vn(e,t=0){return sn(16|t,e)}function yn(e){return sn(32|ne,e)}function bn(e){var t=e.teardown;if(t!==null){let n=Nn,r=W;Pn(!0),In(null);try{t.call(null)}catch(t){rn(t,e.parent)}finally{Pn(n),In(r)}}}function xn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Ze(()=>{e.abort(me)});var r=n.next;n.f&64?n.parent=null:Cn(n,t),n=r}}function Sn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||Cn(t),t=n}}function Cn(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(wn(e.nodes.start,e.nodes.end),n=!0),e.f|=ee,xn(e,t&&!n),er(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();bn(e),e.f^=ee,e.f|=T;var i=e.parent;i!==null&&i.first!==null&&Tn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function wn(e,t){for(;e!==null;){var n=e===t?null:Jt(e);e.remove(),e=n}}function Tn(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 En(e,t,n=!0){var r=[];e.f|=256,Dn(e,r,!0);var i=()=>{n&&Cn(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Dn(e,t,n){if(!(e.f&8192)){e.f^=w;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;Dn(i,t,o?n:!1)}i=a}}}function On(e){e.f&=-257,kn(e,!0)}function kn(e,t){if(!(e.f&256)&&e.f&8192){e.f^=w,e.f&1024||(F(e,S),bt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;kn(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 An(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Jt(n);t.append(n),n=i}}var jn=null,Mn=!1,Nn=!1;function Pn(e){Nn=e}var W=null,Fn=!1;function In(e){W=e}var G=null;function Ln(e){G=e}var Rn=null;function zn(e){W!==null&&(W.f&2097152||W.f&2)&&(Rn??=new Set).add(e)}var Bn=null,Vn=0,Hn=null;function Un(e){Hn=e}var Wn=1,Gn=0,Kn=Gn;function qn(e){Kn=e}function Jn(){return++Wn}function Yn(e){var t=e.f;if(t&2048)return!0;if(t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Yn(a)&&st(a),a.wv>e.wv)return!0}t&512&&ft===null&&F(e,x)}return!1}function Xn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Rn!==null&&Rn.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Xn(a,t,!1):t===a&&(n?F(a,S):a.f&1024&&F(a,C),Et(a))}}function Zn(e){var t=Bn,n=Vn,r=Hn,i=W,a=Rn,o=P,s=Fn,c=Kn,l=e.f;Bn=null,Vn=0,Hn=null,W=l&96?null:e,Rn=null,ze(e.ctx),Fn=!1,Kn=++Gn,e.ac!==null&&(Ze(()=>{e.ac.abort(me)}),e.ac=null);try{e.f|=D;var u=e.fn,d=u();e.f|=E;var f=Qn(e);if(Ue()&&Hn!==null&&!Fn&&f!==null&&!(e.f&6146))for(var p=0;p<Hn.length;p++)Xn(Hn[p],e);if(i!==null&&i!==e){if(Gn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Gn;if(t!==null)for(let e of t)e.rv=Gn;Hn!==null&&(r===null?r=Hn:r.push(...Hn))}return e.f&8388608&&(e.f^=oe),d}catch(t){return Qn(e),nn(t)}finally{e.f^=D,Bn=t,Vn=n,Hn=r,W=i,Rn=a,ze(o),Fn=s,Kn=c}}function Qn(e){var t=e.deps,n=R?.is_fork;if(Bn!==null){var r;if(n||er(e,Vn),t!==null&&Vn>0)for(t.length=Vn+Bn.length,r=0;r<Bn.length;r++)t[Vn+r]=Bn[r];else e.deps=t=Bn;if(cn()&&e.f&512)for(r=Vn;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&Vn<t.length&&(er(e,Vn),t.length=Vn);return t}function $n(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&&(Bn===null||!s.call(Bn,n))){var c=n;c.f&512&&(c.f^=512),c.v!==t&&Ye(c),c.ac!==null&&Ze(()=>{c.ac.abort(me),c.ac=null,F(c,S)}),ct(c),er(c,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)){F(e,x);var n=G,r=Mn;G=e,Mn=(t&96)==0;try{t&16777232?Sn(e):xn(e),bn(e);var i=Zn(e);e.teardown=typeof i==`function`?i:null,e.wv=Wn}finally{Mn=r,G=n}}}async function nr(){await Promise.resolve(),z()}function K(e){var t=(e.f&2)!=0;if(jn?.add(e),W!==null&&!Fn&&!(G!==null&&G.f&16384)&&(Rn===null||!Rn.has(e))){var n=W.deps;if(W.f&2097152)e.rv<Gn&&(e.rv=Gn,Bn===null&&n!==null&&n[Vn]===e?Vn++:Bn===null?Bn=[e]:Bn.push(e));else{W.deps??=[],s.call(W.deps,e)||W.deps.push(e);var r=e.reactions;r===null?e.reactions=[W]:s.call(r,W)||r.push(W)}}if(Nn&&B.has(e))return B.get(e);if(t){var i=e;if(Nn){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||ir(i))&&(a=L(i)),B.set(i,a),a}var o=(i.f&512)==0&&!Fn&&W!==null&&(Mn||(W.f&512)!=0),c=(i.f&E)===0;Yn(i)&&(o&&(i.f|=512),st(i)),o&&!c&&(lt(i),rr(i))}if(ft?.has(e))return ft.get(e);if(e.f&8388608)throw e.v;return e.v}function rr(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(lt(t),rr(t))}function ir(e){if(e.v===t)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(B.has(t)||t.f&2&&ir(t))return!0;return!1}function ar(e){var t=Fn;try{return Fn=!0,e()}finally{Fn=t}}var or=Symbol(`events`),sr=new Set,cr=new Set;function lr(e,t,n,r={}){function i(e){if(r.capture||hr.call(t,e),!e.cancelBubble)return Ze(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?(i.__removed=!1,Ke(()=>{i.__removed||t.addEventListener(e,i,r)})):t.addEventListener(e,i,r),i}function ur(e,t,n,r,i){var a={capture:r,passive:i},o=lr(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&ln(()=>{o.__removed=!0,t.removeEventListener(e,o,a)})}function dr(e,t,n){(t[or]??={})[e]=n}function fr(e){for(var t=0;t<e.length;t++)sr.add(e[t]);for(var n of cr)n(e)}var pr=null,mr=!1;function hr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;pr=e,mr||(mr=!0,setTimeout(()=>{mr=!1,pr=null}));var o=0,s=pr===e&&e[or];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[or]=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=W,f=G;In(null),Ln(null);try{for(var p,m=[];a!==null&&a!==t;){try{var h=a[or]?.[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[or]=t,delete e.currentTarget,In(d),Ln(f)}}}var gr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function _r(e){return gr?.createHTML(e)??e}function vr(e){var t=en(`template`);return t.innerHTML=_r(e.replaceAll(`<!>`,`<!---->`)),t.content}function yr(e,t){var n=G;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function br(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(k)return yr(A,null),A;i===void 0&&(i=vr(a?e:`<!>`+e),n||(i=qt(i)));var t=r||Ht?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=qt(t),s=t.lastChild;yr(o,s)}else yr(t,t);return t}}function xr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(k)return yr(A,null),A;if(!o){var e=qt(vr(a));if(i)for(o=document.createDocumentFragment();qt(e);)o.appendChild(qt(e));else o=qt(e)}var t=o.cloneNode(!0);if(i){var n=qt(t),r=t.lastChild;yr(n,r)}else yr(t,t);return t}}function Sr(e,t){return xr(e,t,`svg`)}function Cr(){if(k)return yr(A,null),A;var e=document.createDocumentFragment(),t=document.createComment(``),n=Kt();return e.append(t,n),yr(t,n),e}function q(e,t){if(k){var n=G;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=A),M();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 wr=[`touchstart`,`touchmove`];function Tr(e){return wr.includes(e)}function Er(e){let t=0,n=jt(0),r;return()=>{cn()&&(K(n),_n(()=>(t===0&&(r=ar(()=>e(()=>Rt(n)))),t+=1,()=>{Ke(()=>{--t,t===0&&(r?.(),r=void 0,Rt(n))})})))}}var Dr=te|ne;function Or(e,t,n,r){new kr(e,t,n,r)}var kr=class{parent;is_pending=!1;transform_error;#e;#t=k?A: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=Er(()=>(this.#m=jt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=G;t.b=this,t.f|=128,n(e)},this.parent=G.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=vn(()=>{if(k){let e=this.#t;M();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()},Dr),k&&(this.#e=A)}#g(){try{this.#a=yn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);Ke(r),t&&(this.#s=yn(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{if(t){ve();return}t=!0,n&&Re(),this.#s!==null&&En(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){rn(e,this.#i&&this.#i.parent)}}}}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=yn(()=>e(this.#e)),Ke(()=>{var e=this.#c=document.createDocumentFragment(),t=Kt(),n=!1;if(e.append(t),this.#a=this.#S(()=>{try{return yn(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){rn(e,this.#i.parent)}return null}}),this.#a===null){this.#c=null,n&&this.#x(R);return}this.#u===0&&(this.#e.before(e),this.#c=null,En(this.#o,()=>{this.#o=null}),this.#x(R))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=yn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();An(this.#a,e);let t=this.#n.pending;this.#o=yn(()=>t(this.#e))}else this.#x(R)}catch(e){this.error(e)}}#x(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){Xe(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=G,n=W,r=P;Ln(this.#i),In(this.#i),ze(this.#i.ctx);try{return bt.ensure(),e()}finally{Ln(t),In(n),ze(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&&En(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,Ke(()=>{this.#d=!1,this.#m&&It(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),K(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;R?.is_fork?(this.#a&&R.skip_effect(this.#a),this.#o&&R.skip_effect(this.#o),this.#s&&R.skip_effect(this.#s),R.oncommit(()=>{this.#w(e)})):this.#w(e)}#w(e){this.#a&&=(Cn(this.#a),null),this.#o&&=(Cn(this.#o),null),this.#s&&=(Cn(this.#s),null),k&&(j(this.#t),be(),j(xe()));let t=this.#n.failed,n=e=>{let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&(this.#s=this.#S(()=>{try{return yn(()=>{var r=G;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return rn(e,this.#i.parent),null}}))};Ke(()=>{var t;try{t=this.transform_error(e)}catch(e){rn(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>rn(e,this.#i&&this.#i.parent)):n(t)})}};function Ar(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[pe]??=e.nodeValue)&&(e[pe]=n,e.nodeValue=`${n}`)}function jr(e,t){return Pr(e,t)}function Mr(t,n){Gt(),n.intro=n.intro??!1;let r=n.target,i=k,a=A;try{for(var o=qt(r);o&&(o.nodeType!==8||o.data!==`[`);)o=Jt(o);if(!o)throw e;ye(!0),j(o);let i=Pr(t,{...n,anchor:o});return ye(!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&&Ne(),Gt(),Qt(r),ye(!1),
|
|
3
|
-
\r\f\xA0\v`];function
|
|
4
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ji(e,t){return Oi(e)||ki(e,t)||Mi(e,t)||Ai()}function Mi(e,t){if(e){if(typeof e==`string`)return Di(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Di(e,t):void 0}}function Ni(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof Ei;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}Ni.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},Ni.prototype.next=function(e){return this._invoke(`next`,e)},Ni.prototype.throw=function(e){return this._invoke(`throw`,e)},Ni.prototype.return=function(e){return this._invoke(`return`,e)};var Pi=Object.entries,Fi=Object.setPrototypeOf,Ii=Object.isFrozen,Li=Object.getPrototypeOf,Ri=Object.getOwnPropertyDescriptor,zi=Object.freeze,Bi=Object.seal,Vi=Object.create,Hi=typeof Reflect<`u`&&Reflect,Ui=Hi.apply,Wi=Hi.construct;zi||=function(e){return e},Bi||=function(e){return e},Ui||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},Wi||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var Gi=X(Array.prototype.forEach);Array.prototype.indexOf;var Ki=X(Array.prototype.lastIndexOf),qi=X(Array.prototype.pop),Ji=X(Array.prototype.push);Array.prototype.slice;var Yi=X(Array.prototype.splice),Xi=Array.isArray,Zi=X(String.prototype.toLowerCase),Qi=X(String.prototype.toString),$i=X(String.prototype.match),ea=X(String.prototype.replace),ta=X(String.prototype.indexOf),na=X(String.prototype.trim),ra=X(Number.prototype.toString),ia=X(Boolean.prototype.toString),aa=typeof BigInt>`u`?null:X(BigInt.prototype.toString),oa=typeof Symbol>`u`?null:X(Symbol.prototype.toString),sa=X(Object.prototype.hasOwnProperty),ca=X(Object.prototype.toString),la=X(RegExp.prototype.test),ua=da(TypeError);function X(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Ui(e,t,r)}}function da(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return Wi(e,n)}}function Z(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zi;if(Fi&&Fi(e,null),!Xi(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Ii(t)||(t[r]=e),i=e)}e[i]=!0}return e}function fa(e){for(let t=0;t<e.length;t++)sa(e,t)||(e[t]=null);return e}function pa(e){let t=Vi(null);for(let r of Pi(e)){var n=ji(r,2);let i=n[0],a=n[1];sa(e,i)&&(Xi(a)?t[i]=fa(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=pa(a):t[i]=a)}return t}function ma(e){switch(typeof e){case`string`:return e;case`number`:return ra(e);case`boolean`:return ia(e);case`bigint`:return aa?aa(e):`0`;case`symbol`:return oa?oa(e):`Symbol()`;case`undefined`:return ca(e);case`function`:case`object`:{if(e===null)return ca(e);let t=e,n=ha(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:ca(e)}return ca(e)}default:return ca(e)}}function ha(e,t){for(;e!==null;){let n=Ri(e,t);if(n){if(n.get)return X(n.get);if(typeof n.value==`function`)return X(n.value)}e=Li(e)}function n(){return null}return n}function ga(e){try{return la(e,``),!0}catch{return!1}}var _a=zi(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),va=zi(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),ya=zi([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),ba=zi([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),xa=zi(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Sa=zi([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Ca=zi([`#text`]),wa=zi(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Ta=zi(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Ea=zi(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Da=zi([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Oa=Bi(/{{[\w\W]*|^[\w\W]*}}/g),ka=Bi(/<%[\w\W]*|^[\w\W]*%>/g),Aa=Bi(/\${[\w\W]*/g),ja=Bi(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ma=Bi(/^aria-[\-\w]+$/),Na=Bi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Pa=Bi(/^(?:\w+script|data):/i),Fa=Bi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ia=Bi(/^html$/i),La=Bi(/^[a-z][.\w]*(-[.\w]+)+$/i),Ra=Bi(/<[/\w!]/g),za=Bi(/<[/\w]/g),Ba=Bi(/<\/no(script|embed|frames)/i),Va=Bi(/\/>/i),Ha={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ua=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],Wa=zi(Z({},Ua)),Ga=function(){let e={};return Gi(Ua,t=>{e[t]=Bi(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),zi(e)}(),Ka=function(){return typeof window>`u`?null:window},qa=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Ja=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ya=function(e,t,n,r){return sa(e,t)&&Xi(e[t])?Z(r.base?pa(r.base):{},e[t],r.transform):n},Xa=function(e,t,n){let r=sa(e,t)?e[t]:void 0;return r&&typeof r==`object`?pa(r):n()};function Za(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ka(),t=e=>Za(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==Ha.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=ha(d,`cloneNode`),p=ha(d,`remove`),m=ha(d,`removeAttributeNode`),h=ha(d,`nextSibling`),g=ha(d,`childNodes`),_=ha(d,`parentNode`),v=ha(d,`shadowRoot`),y=ha(d,`attributes`),b=o&&o.prototype?ha(o.prototype,`nodeType`):null,x=o&&o.prototype?ha(o.prototype,`nodeName`):null,S=o&&o.prototype?ha(o.prototype,`ownerDocument`):null,C=function(e){return b?b(e):e.nodeType},w=function(e){return x?x(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let T,E=``,ee,te=!1,ne=0,re=function(){if(ne>0)throw ua(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},ie=function(e){re(),ne++;try{return T.createHTML(e)}finally{ne--}},D=function(e){re(),ne++;try{return T.createScriptURL(e)}finally{ne--}},ae=function(){return te||=(ee=qa(u,i),!0),ee},oe=n,se=oe.implementation,ce=oe.createNodeIterator,le=oe.createDocumentFragment,ue=oe.getElementsByTagName,de=r.importNode,O=Ja();t.isSupported=typeof Pi==`function`&&typeof _==`function`&&se&&se.createHTMLDocument!==void 0;let fe=Oa,pe=ka,me=Aa,he=ja,ge=Ma,_e=Pa,ve=Fa,k=La,ye=Na,A=null,j=Z({},[..._a,...va,...ya,...xa,...Ca]),M=null,N=Z({},[...wa,...Ta,...Ea,...Da]),be=Object.seal(Vi(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),xe=null,Se=null,Ce=Object.seal(Vi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),we=!0,Te=!0,Ee=!1,De=!0,Oe=!1,ke=!0,Ae=!1,je=!1,Me=null,Ne=null,Pe=!1,Fe=!1,Ie=!1,Le=!1,Re=!0,P=!1,ze=`user-content-`,Be=!0,Ve=!1,He={},Ue=null,We=Z({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ge=null,Ke=Z({},[`audio`,`video`,`img`,`source`,`image`,`track`]),qe=null,Je=Z({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),F=`http://www.w3.org/1998/Math/MathML`,Ye=`http://www.w3.org/2000/svg`,Xe=`http://www.w3.org/1999/xhtml`,Ze=Xe,Qe=!1,$e=null,et=Z({},[F,Ye,Xe],Qi),tt=zi([`mi`,`mo`,`mn`,`ms`,`mtext`]),nt=Z({},tt),rt=zi([`annotation-xml`]),it=Z({},rt),I=Z({},[`title`,`style`,`font`,`a`,`script`]),at=null,ot=[`application/xhtml+xml`,`text/html`],L=null,st=null,ct=n.createElement(`form`),lt=function(e){return e instanceof RegExp||e instanceof Function},ut=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(st&&st===e)return;(!e||typeof e!=`object`)&&(e={}),e=pa(e),at=ot.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,L=at===`application/xhtml+xml`?Qi:Zi,A=Ya(e,`ALLOWED_TAGS`,j,{transform:L}),M=Ya(e,`ALLOWED_ATTR`,N,{transform:L}),$e=Ya(e,`ALLOWED_NAMESPACES`,et,{transform:Qi}),qe=Ya(e,`ADD_URI_SAFE_ATTR`,Je,{transform:L,base:Je}),Ge=Ya(e,`ADD_DATA_URI_TAGS`,Ke,{transform:L,base:Ke}),Ue=Ya(e,`FORBID_CONTENTS`,We,{transform:L}),xe=Ya(e,`FORBID_TAGS`,pa({}),{transform:L}),Se=Ya(e,`FORBID_ATTR`,pa({}),{transform:L}),He=sa(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?pa(e.USE_PROFILES):e.USE_PROFILES:!1,we=e.ALLOW_ARIA_ATTR!==!1,Te=e.ALLOW_DATA_ATTR!==!1,Ee=e.ALLOW_UNKNOWN_PROTOCOLS||!1,De=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Oe=e.SAFE_FOR_TEMPLATES||!1,ke=e.SAFE_FOR_XML!==!1,Ae=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Ie=e.RETURN_DOM_FRAGMENT||!1,Le=e.RETURN_TRUSTED_TYPE||!1,Pe=e.FORCE_BODY||!1,Re=e.SANITIZE_DOM!==!1,P=e.SANITIZE_NAMED_PROPS||!1,Be=e.KEEP_CONTENT!==!1,Ve=e.IN_PLACE||!1,ye=ga(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Na,Ze=typeof e.NAMESPACE==`string`?e.NAMESPACE:Xe,nt=Xa(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>Z({},tt)),it=Xa(e,`HTML_INTEGRATION_POINTS`,()=>Z({},rt));let t=Xa(e,`CUSTOM_ELEMENT_HANDLING`,()=>Vi(null));if(be=Vi(null),sa(t,`tagNameCheck`)&<(t.tagNameCheck)&&(be.tagNameCheck=t.tagNameCheck),sa(t,`attributeNameCheck`)&<(t.attributeNameCheck)&&(be.attributeNameCheck=t.attributeNameCheck),sa(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(be.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),Bi(be),Oe&&(Te=!1),Ie&&(Fe=!0),He&&(A=Z({},Ca),M=Vi(null),He.html===!0&&(Z(A,_a),Z(M,wa)),He.svg===!0&&(Z(A,va),Z(M,Ta),Z(M,Da)),He.svgFilters===!0&&(Z(A,ya),Z(M,Ta),Z(M,Da)),He.mathMl===!0&&(Z(A,xa),Z(M,Ea),Z(M,Da))),Ce.tagCheck=null,Ce.attributeCheck=null,sa(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Ce.tagCheck=e.ADD_TAGS:Xi(e.ADD_TAGS)&&(A===j&&(A=pa(A)),Z(A,e.ADD_TAGS,L))),sa(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Ce.attributeCheck=e.ADD_ATTR:Xi(e.ADD_ATTR)&&(M===N&&(M=pa(M)),Z(M,e.ADD_ATTR,L))),sa(e,`ADD_FORBID_CONTENTS`)&&Xi(e.ADD_FORBID_CONTENTS)&&(Ue===We&&(Ue=pa(Ue)),Z(Ue,e.ADD_FORBID_CONTENTS,L)),Be&&(A[`#text`]=!0),Ae&&Z(A,[`html`,`head`,`body`]),A.table&&(Z(A,[`tbody`]),delete xe.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw ua(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw ua(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=T;T=e.TRUSTED_TYPES_POLICY;try{E=ie(``)}catch(e){throw T=t,e}}else e.TRUSTED_TYPES_POLICY===null?(T=void 0,E=``):(T===void 0&&(T=ae()),T&&typeof E==`string`&&(E=ie(``)));zi&&zi(e),st=e},R=Z({},[...va,...ya,...ba]),dt=Z({},[...xa,...Sa]),ft=function(e,t,n){return t.namespaceURI===Xe?e===`svg`:t.namespaceURI===F?e===`svg`&&(n===`annotation-xml`||nt[n]):!!R[e]},pt=function(e,t,n){return t.namespaceURI===Xe?e===`math`:t.namespaceURI===Ye?e===`math`&&it[n]:!!dt[e]},mt=function(e,t,n){return t.namespaceURI===Ye&&!it[n]||t.namespaceURI===F&&!nt[n]?!1:!dt[e]&&(I[e]||!R[e])},ht=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:Ze,tagName:`template`});let n=Zi(e.tagName),r=Zi(t.tagName);return $e[e.namespaceURI]?e.namespaceURI===Ye?ft(n,t,r):e.namespaceURI===F?pt(n,t,r):e.namespaceURI===Xe?mt(n,t,r):!!(at===`application/xhtml+xml`&&$e[e.namespaceURI]):!1},gt=function(e){Ji(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw ua(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},_t=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},vt=function(e){z(e);let t=g(e);if(t){let e=[];Gi(t,t=>{Ji(e,t)}),Gi(e,e=>{try{p(e)}catch{}})}let n=y(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&_t(e,r,i)}},yt=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}Ji(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`)if(Fe||Ie)try{gt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},bt=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||M[L(i)]||_t(e,r,i)}},z=function(e){let t=[e];for(;t.length>0;){let e=t.pop();C(e)===Ha.element&&bt(e);let n=g(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},xt=function(e,t){return ke?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},St=function(e){if(!ke)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=C(e);if(n===Ha.processingInstruction||n===Ha.comment&&la(za,e.data)){try{p(e)}catch{}continue}if(n===Ha.element){let t=e,n=L(w(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&xt(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=g(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},Ct=function(e){let t=null,r=null;if(Pe)e=`<remove></remove>`+e;else{let t=$i(e,/^[\r\n\t ]+/);r=t&&t[0]}at===`application/xhtml+xml`&&Ze===Xe&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=T?ie(e):e;if(Ze===Xe)try{t=new l().parseFromString(i,at)}catch{}if(!t||!t.documentElement){t=se.createDocument(Ze,`template`,null);try{t.documentElement.innerHTML=Qe?E:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ze===Xe?ue.call(t,Ae?`html`:`body`)[0]:Ae?t.documentElement:a},wt=function(e){let t=S?S(e):e.ownerDocument;return ce.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Tt=function(e){return e=ea(e,fe,` `),e=ea(e,pe,` `),e=ea(e,me,` `),e},Et=function(e){e.normalize();let t=S?S(e):e.ownerDocument,n=ce.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=Tt(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&Gi(i,e=>{Ot(e.content)&&Et(e.content)})},Dt=function(e){let t=x?x(e):null;return typeof t!=`string`||L(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==b(e)||e.childNodes!==g(e)},Ot=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return b(e)===Ha.documentFragment}catch{return!1}},kt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return typeof b(e)==`number`}catch{return!1}};function B(e,n,r){e.length!==0&&Gi(e,e=>{e.call(t,n,r,st)})}let At=function(e,t){return!!(ke&&e.hasChildNodes()&&!kt(e.firstElementChild)&&la(Ra,e.textContent)&&la(Ra,e.innerHTML)||ke&&e.namespaceURI===Xe&&Wa[t]&&(kt(e.firstElementChild)||typeof e.textContent==`string`&&la(Ga[t],e.textContent))||e.nodeType===Ha.processingInstruction||ke&&e.nodeType===Ha.comment&&la(za,e.data))},jt=function(e,t){if(e instanceof RegExp)return la(e,t);if(e instanceof Function){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return!!e(t,...r)}return!1},Mt=function(e,t,n){if(!xe[t]&&Lt(t)&&jt(be.tagNameCheck,t))return!1;if(Be&&!Ue[t]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return gt(e),!0},Nt=function(e,t,n,r){return e.length===0?t:t===n||t===r?pa(t):t},V=function(e,t){return e===t||_(e)!==null?!1:(Ve&&z(e),!0)},Pt=function(e,n){if(B(O.beforeSanitizeElements,e,null),V(e,n))return!0;if(Dt(e))return gt(e),!0;let r=L(w(e));if(A=Nt(O.uponSanitizeElement,A,j,Me),B(O.uponSanitizeElement,e,{tagName:r,allowedTags:A}),V(e,n))return!0;if(At(e,r))return gt(e),!0;if(xe[r]||!(Ce.tagCheck instanceof Function&&Ce.tagCheck(r))&&!A[r]){let t=Mt(e,r,n);return t===!1&&(B(O.afterSanitizeElements,e,null),V(e,n))?!0:t}if(C(e)===Ha.element&&!ht(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&la(Ba,e.innerHTML))return gt(e),!0;if(Oe&&e.nodeType===Ha.text){let n=Tt(e.textContent);e.textContent!==n&&(Ji(t.removed,{element:e.cloneNode()}),e.textContent=n)}return B(O.afterSanitizeElements,e,null),V(e,n)},Ft=function(e,t,r){if(Se[t]||xt(t,e)||Re&&(t===`id`||t===`name`)&&(r in n||r in ct))return!1;let i=M[t]||Ce.attributeCheck instanceof Function&&Ce.attributeCheck(t,e);return Te&&la(he,t)||we&&la(ge,t)?!0:i?qe[t]||la(ye,ea(r,ve,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&ta(r,`data:`)===0&&Ge[e]||Ee&&!la(_e,ea(r,ve,``))?!0:!r:Lt(e)&&jt(be.tagNameCheck,e)&&jt(be.attributeNameCheck,t,e)||t===`is`&&be.allowCustomizedBuiltInElements&&jt(be.tagNameCheck,r)},It=Z({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Lt=function(e){return!It[Zi(e)]&&la(k,e)},Rt=function(e,t,n,r){if(T&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return ie(r);case`TrustedScriptURL`:return D(r)}return r},zt=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),Dt(e)?(gt(e),!1):!0}catch{return yt(t,e),!1}},Bt=function(e,n){if(B(O.beforeSanitizeAttributes,e,null),V(e,n))return;let r=e.attributes;if(!r||Dt(e))return;M=Nt(O.uponSanitizeAttribute,M,N,Ne);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:M,forceKeepAttr:void 0},a=r.length,o=L(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=L(s),d=l,f=s===`value`?d:na(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,B(O.uponSanitizeAttribute,e,i),f=i.attrValue,P&&(u===`id`||u===`name`)&&ta(f,ze)!==0&&(yt(s,e,n),f=ze+f,p=!0),ke&&la(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){yt(s,e,n);continue}if(u===`attributename`&&$i(f,`href`)){yt(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){yt(s,e,n);continue}if(!De&&la(Va,f)){yt(s,e,n);continue}if(Oe&&(f=Tt(f)),!Ft(o,u,f)){yt(s,e,n);continue}f=Rt(o,u,c,f),f!==d&&zt(e,s,c,f)&&p&&qi(t.removed)}}B(O.afterSanitizeAttributes,e,null),V(e,n)},Vt=function(e){let t=null,n=wt(e);for(B(O.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(B(O.uponSanitizeShadowNode,t,null),Pt(t,e),Bt(t,e),Ot(t.content)&&Vt(t.content),C(t)===Ha.element){let e=v(t);Ot(e)&&(Ht(e),Vt(e))}B(O.afterSanitizeShadowDOM,e,null)},Ht=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Vt(e.shadow);continue}let n=e.node,r=C(n)===Ha.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=x?x(n):null;if(typeof e==`string`&&L(e)===`template`){let e=n.content;Ot(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);Ot(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Qe=!e,Qe&&(e=`<!-->`),typeof e!=`string`&&!kt(e)&&(e=ma(e),typeof e!=`string`))throw ua(`dirty is not a string, aborting`);if(!t.isSupported)return e;je?(A=Me,M=Ne):ut(n),(O.uponSanitizeElement.length>0||O.uponSanitizeAttribute.length>0)&&(A=pa(A)),O.uponSanitizeAttribute.length>0&&(M=pa(M)),t.removed=[];let c=Ve&&typeof e!=`string`&&kt(e);if(c){St(e);let t=w(e);if(typeof t==`string`){let n=L(t);if(!A[n]||xe[n])throw vt(e),ua(`root node is forbidden and cannot be sanitized in-place`)}if(Dt(e))throw vt(e),ua(`root node is clobbered and cannot be sanitized in-place`);try{Ht(e)}catch(t){throw vt(e),t}}else if(kt(e))i=Ct(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===Ha.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Ht(i);else{if(!Fe&&!Oe&&!Ae&&e.indexOf(`<`)===-1)return T&&Le?ie(e):e;if(i=Ct(e),!i)return Fe?null:Le?E:``}i&&Pe&>(i.firstChild);let l=c?e:i;try{let e=wt(l);for(;o=e.nextNode();)Pt(o,l),Bt(o,l),Ot(o.content)&&Vt(o.content)}catch(n){throw c&&(vt(e),Gi(t.removed,e=>{e.element&&z(e.element)})),n}if(c){let n=!1;if(Gi(t.removed,t=>{t.element&&(t.element===e&&(n=!0),z(t.element))}),n)throw ua(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return Oe&&Et(e),e}if(Fe){if(Oe&&Et(i),Ie)for(s=le.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(M.shadowroot||M.shadowrootmode)&&(s=de.call(r,s,!0)),s}let u=Ae?i.outerHTML:i.innerHTML;return Ae&&A[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&la(Ia,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
5
|
-
`+u),Oe&&(u=Tt(u)),T&&Le?ie(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ut(e),je=!0,Me=A,Ne=M},t.clearConfig=function(){st=null,je=!1,Me=null,Ne=null,T=ee,E=``},t.isValidAttribute=function(e,t,n){st||ut({});let r=L(e),i=L(t);return Ft(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&sa(O,e)&&Ji(O[e],t)},t.removeHook=function(e,t){if(sa(O,e)){if(t!==void 0){let n=Ki(O[e],t);return n===-1?void 0:Yi(O[e],n,1)[0]}return qi(O[e])}},t.removeHooks=function(e){sa(O,e)&&(O[e]=[])},t.removeAllHooks=function(){O=Ja()},t}var Qa=Za(),$a=`data-pie-authored-ink`,eo=`data-pie-authored-fill`,to=`data-pie-authored-border`,no=[`border-top-color`,`border-right-color`,`border-bottom-color`,`border-left-color`],ro=new Set([`currentcolor`,`inherit`,`initial`,`unset`,`revert`,`revert-layer`,`transparent`]);function io(e){let t=e?.trim().toLowerCase();return!t||ro.has(t)||t.includes(`var(`)?!1:co(t)?.a!==0}function ao(e){let t=co(e);if(!t)return`shade`;let n=e=>(e*t.a+255*(1-t.a))/255,[r,i,a]=[n(t.r),n(t.g),n(t.b)],o=.2126*ko(r)+.7152*ko(i)+.0722*ko(a),s=Math.max(r,i,a)-Math.min(r,i,a);return o>=.85&&s<=.08?`light`:`shade`}function oo(e){e.removeAttribute($a),e.removeAttribute(eo),e.removeAttribute(to);let t=e.hasAttribute(`style`)?e.style:void 0,n=e=>t?.getPropertyValue(e).trim()??``,r=[],i=n(`color`),a=e.localName===`font`?e.getAttribute(`color`):null;io(i||a)&&(e.setAttribute(`data-pie-authored-ink`,``),i&&r.push(`color`));let o=n(`background-color`),s=o||so(e.getAttribute(`bgcolor`));io(s)&&(e.setAttribute(`data-pie-authored-fill`,ao(s)),o&&r.push(`background-color`));let c=no.filter(e=>io(n(e)));c.length&&(e.setAttribute(`data-pie-authored-border`,``),r.push(...c));for(let e of r)t?.getPropertyPriority(e)===`important`&&t.setProperty(e,t.getPropertyValue(e))}function so(e){let t=e?.trim()??``;return/^(?:[\da-f]{3}|[\da-f]{6})$/i.test(t)?`#${t}`:t}function co(e){let t=e.trim().toLowerCase();if(t===`transparent`)return{r:0,g:0,b:0,a:0};let n=uo().get(t);if(n)return fo(n);if(t.startsWith(`#`))return fo(t.slice(1));let r=/^([a-z]+)\(([^()]*)\)$/.exec(t);if(!r)return null;let i=r[2].trim().split(/\s*[\s,/]\s*/);if(i.length!==3&&i.length!==4)return null;let[a,o,s,c]=i,l=go(c),u;switch(r[1]){case`rgb`:case`rgba`:u=[a,o,s].map(e=>mo(e,255)/255);break;case`hsl`:case`hsla`:u=vo(ho(a),mo(o,100)/100,mo(s,100)/100);break;case`hwb`:u=yo(ho(a),mo(o,100)/100,mo(s,100)/100);break;case`lab`:u=To(mo(a,100),mo(o,125),mo(s,125));break;case`lch`:u=To(mo(a,100),..._o(mo(o,150),ho(s)));break;case`oklab`:u=Eo(mo(a,1),mo(o,.4),mo(s,.4));break;case`oklch`:u=Eo(mo(a,1),..._o(mo(o,.4),ho(s)));break;default:return null}if(Number.isNaN(l)||u.some(Number.isNaN))return null;let[d,f,p]=u.map(e=>Ao(e,0,1)*255);return{r:d,g:f,b:p,a:l}}var lo;function uo(){return lo??=new Map(`aliceblue:f0f8ff antiquewhite:faebd7 aqua:00ffff aquamarine:7fffd4 azure:f0ffff beige:f5f5dc bisque:ffe4c4 black:000000 blanchedalmond:ffebcd blue:0000ff blueviolet:8a2be2 brown:a52a2a burlywood:deb887 cadetblue:5f9ea0 chartreuse:7fff00 chocolate:d2691e coral:ff7f50 cornflowerblue:6495ed cornsilk:fff8dc crimson:dc143c cyan:00ffff darkblue:00008b darkcyan:008b8b darkgoldenrod:b8860b darkgray:a9a9a9 darkgreen:006400 darkgrey:a9a9a9 darkkhaki:bdb76b darkmagenta:8b008b darkolivegreen:556b2f darkorange:ff8c00 darkorchid:9932cc darkred:8b0000 darksalmon:e9967a darkseagreen:8fbc8f darkslateblue:483d8b darkslategray:2f4f4f darkslategrey:2f4f4f darkturquoise:00ced1 darkviolet:9400d3 deeppink:ff1493 deepskyblue:00bfff dimgray:696969 dimgrey:696969 dodgerblue:1e90ff firebrick:b22222 floralwhite:fffaf0 forestgreen:228b22 fuchsia:ff00ff gainsboro:dcdcdc ghostwhite:f8f8ff gold:ffd700 goldenrod:daa520 gray:808080 green:008000 greenyellow:adff2f grey:808080 honeydew:f0fff0 hotpink:ff69b4 indianred:cd5c5c indigo:4b0082 ivory:fffff0 khaki:f0e68c lavender:e6e6fa lavenderblush:fff0f5 lawngreen:7cfc00 lemonchiffon:fffacd lightblue:add8e6 lightcoral:f08080 lightcyan:e0ffff lightgoldenrodyellow:fafad2 lightgray:d3d3d3 lightgreen:90ee90 lightgrey:d3d3d3 lightpink:ffb6c1 lightsalmon:ffa07a lightseagreen:20b2aa lightskyblue:87cefa lightslategray:778899 lightslategrey:778899 lightsteelblue:b0c4de lightyellow:ffffe0 lime:00ff00 limegreen:32cd32 linen:faf0e6 magenta:ff00ff maroon:800000 mediumaquamarine:66cdaa mediumblue:0000cd mediumorchid:ba55d3 mediumpurple:9370db mediumseagreen:3cb371 mediumslateblue:7b68ee mediumspringgreen:00fa9a mediumturquoise:48d1cc mediumvioletred:c71585 midnightblue:191970 mintcream:f5fffa mistyrose:ffe4e1 moccasin:ffe4b5 navajowhite:ffdead navy:000080 oldlace:fdf5e6 olive:808000 olivedrab:6b8e23 orange:ffa500 orangered:ff4500 orchid:da70d6 palegoldenrod:eee8aa palegreen:98fb98 paleturquoise:afeeee palevioletred:db7093 papayawhip:ffefd5 peachpuff:ffdab9 peru:cd853f pink:ffc0cb plum:dda0dd powderblue:b0e0e6 purple:800080 rebeccapurple:663399 red:ff0000 rosybrown:bc8f8f royalblue:4169e1 saddlebrown:8b4513 salmon:fa8072 sandybrown:f4a460 seagreen:2e8b57 seashell:fff5ee sienna:a0522d silver:c0c0c0 skyblue:87ceeb slateblue:6a5acd slategray:708090 slategrey:708090 snow:fffafa springgreen:00ff7f steelblue:4682b4 tan:d2b48c teal:008080 thistle:d8bfd8 tomato:ff6347 turquoise:40e0d0 violet:ee82ee wheat:f5deb3 white:ffffff whitesmoke:f5f5f5 yellow:ffff00 yellowgreen:9acd32`.split(` `).map(e=>e.split(`:`))),lo}function fo(e){if(!/^(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/.test(e))return null;let[t,n,r,i=255]=(e.length<=4?[...e].map(e=>e+e):e.match(/../g)??[]).map(e=>Number.parseInt(e,16));return{r:t,g:n,b:r,a:i/255}}var po=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(%|deg|rad|grad|turn)?$/;function mo(e,t){if(e===`none`)return 0;let n=po.exec(e);return!n||n[2]&&n[2]!==`%`?NaN:n[2]?Number(n[1])/100*t:Number(n[1])}function ho(e){if(e===`none`)return 0;let t=po.exec(e);if(!t||t[2]===`%`)return NaN;let n=Number(t[1]);return((t[2]===`rad`?n*180/Math.PI:t[2]===`grad`?n*.9:t[2]===`turn`?n*360:n)%360+360)%360}function go(e){return e===void 0?1:Ao(mo(e,1),0,1)}function _o(e,t){let n=Math.max(0,e),r=t*Math.PI/180;return[n*Math.cos(r),n*Math.sin(r)]}function vo(e,t,n){let r=Ao(t,0,1),i=Ao(n,0,1),a=t=>{let n=(t+e/30)%12,a=r*Math.min(i,1-i);return i-a*Math.max(-1,Math.min(n-3,9-n,1))};return[a(0),a(8),a(4)]}function yo(e,t,n){let r=Ao(t,0,1),i=Ao(n,0,1);return r+i>=1?[,,,].fill(r/(r+i)):vo(e,1,.5).map(e=>e*(1-r-i)+r)}var bo=24389/27,xo=216/24389,So=[.3457/.3585,1,.2958/.3585],Co=[[.955473421488075,-.02309845494876471,.06325924320057072],[-.0283697093338637,1.0099953980813041,.021041441191917323],[.012314014864481998,-.020507649298898964,1.330365926242124]],wo=[[12831/3959,-329/214,-1974/3959],[-851781/878810,1648619/878810,36519/878810],[705/12673,-2585/12673,705/667]];function To(e,t,n){let r=Ao(e,0,100),i=(r+16)/116,a=t/500+i,o=i-n/200;return Do(wo,Do(Co,[a**3>xo?a**3:(116*a-16)/bo,r>bo*xo?i**3:r/bo,o**3>xo?o**3:(116*o-16)/bo].map((e,t)=>e*So[t]))).map(Oo)}function Eo(e,t,n){let r=Ao(e,0,1);return Do([[4.0767416621,-3.3077115913,.2309699292],[-1.2684380046,2.6097574011,-.3413193965],[-.0041960863,-.7034186147,1.707614701]],[r+.3963377774*t+.2158037573*n,r-.1055613458*t-.0638541728*n,r-.0894841775*t-1.291485548*n].map(e=>e**3)).map(Oo)}function Do(e,t){return e.map(e=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2])}function Oo(e){let t=Ao(e,0,1);return t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055}function ko(e){return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function Ao(e,t,n){return Math.min(n,Math.max(t,e))}var jo=[`script`,`embed`,`base`,`form`,`meta`,`link`,`style`,`foreignobject`],Mo=[`onerror`,`onload`,`onclick`,`onmouseover`,`onmouseout`,`onmouseenter`,`onmouseleave`,`onfocus`,`onblur`,`onkeydown`,`onkeyup`,`onkeypress`,`onsubmit`,`onchange`,`onbeforeunload`,`formaction`,`xlink:href`],No=new Set([`iframe`,`object`,`mstack`,`mlongdiv`,`msgroup`,`msrow`,`msline`,`mscarries`,`mscarry`,`semantics`,`annotation`,`none`]),Po=/^[a-z_][\w.-]*:[a-z][\w.-]*$/,Fo=[`alignment`,`target`,`allow`,`allowfullscreen`,`frameborder`,`scrolling`,`data`,`stackalign`,`charalign`,`charspacing`,`longdivstyle`,`position`,`shift`,`location`,`crossout`,`leftoverhang`,`rightoverhang`,`mslinethickness`,`linebreak`],Io=/^\s*document\.getElementById\((['"])([^'"]+)\1\)\.play\(\)\s*;?\s*(?:return\s+false\s*;?\s*)?$/,Lo=`data-pie-play-audio`,Ro={ADD_TAGS:e=>No.has(e)||Po.test(e),ADD_ATTR:Fo,FORBID_TAGS:jo,FORBID_ATTR:Mo,ALLOW_UNKNOWN_PROTOCOLS:!1,RETURN_TRUSTED_TYPE:!1},zo=!1;function Bo(e){for(let t of e.composedPath()){if(!(t instanceof Element))continue;let n=t.getAttribute(Lo);if(n===null)continue;e.preventDefault();let r=t.getRootNode().getElementById?.(n)??document.getElementById(n);r instanceof HTMLMediaElement&&r.play()?.catch(()=>void 0);return}}var Vo=null;function Ho(){return Vo||(Vo=Qa(window),Vo.addHook(`beforeSanitizeAttributes`,e=>{if(e.nodeName!==`A`)return;let t=Io.exec(e.getAttribute(`onclick`)??``)?.[2];t!==void 0&&(e.removeAttribute(`onclick`),e.setAttribute(`data-pie-play-audio`,t),zo||=(document.addEventListener(`click`,Bo),!0))}),Vo.addHook(`afterSanitizeAttributes`,oo),Vo)}var Uo=1e6,Wo=new Map,Go=0;function Ko(e){if(e==null||e===``||!Qa.isSupported)return``;let t=typeof e==`string`?e:String(e),n=Wo.get(t);if(n!==void 0)return n;let r=String(Ho().sanitize(t,Ro)),i=t.length+r.length;if(i>Uo)return r;for(let[e,t]of Wo){if(Go+i<=Uo)break;Wo.delete(e),Go-=e.length+t.length}return Wo.set(t,r),Go+=i,r}var qo=`4.1.3`,Jo=`https://github.com/pie-framework/pie-elements-ng/blob/develop/docs/MATH-RENDERING.md#assets`,Yo=`@pie-lib/math-rendering@2`,Xo=[`nemeth`,`euro`],Zo=`mathjax@${qo}/sre`,Qo=/^[^@]+@[^@]+$/;function $o(e){if(!e)return;let t;try{t=new URL(e)}catch{return}if(t.origin===`null`)return;let n=t.pathname.split(`/`);for(let e=n.length-1;e>0;e--){let r=n[e];if(r===`node_modules`)return;if(!Qo.test(r))continue;let i=n[e-1]?.startsWith(`@`)?e-1:e;return t.origin+n.slice(0,i).join(`/`)}}function es(){let e=globalThis[Yo]?.opts;return e&&typeof e==`object`?e:{}}function ts(e){if(typeof e!=`string`||!e)return;let t=typeof document>`u`?void 0:document.baseURI;try{return new URL(e,t).href.replace(/\/+$/,``)}catch{return}}function ns(e){if(!e||typeof e!=`object`)return;let t=new Map;for(let[n,r]of Object.entries(e)){let e=ts(r);e&&t.set(n,e)}return t.size?t:void 0}function rs(e){if(Array.isArray(e))return new Map(e.filter(e=>typeof e==`string`).map(e=>[e,void 0]));if(e&&typeof e==`object`)return new Map(Object.entries(e).map(([e,t])=>[e,typeof t==`string`?t:void 0]))}function is(e,t){let n=es(),r=ts(e.assetRoot??n.assetRoot)??$o(t);return{root:r,speechPath:ts(e.speechPath??n.speechPath)??(r?`${r}/${Zo}`:void 0),speechLocales:rs(e.speechLocales??n.speechLocales),urls:ns(e.assetUrls??n.assetUrls)}}function as(e,t){if(!(!e||!t)){for(let n of[...e.keys()])!t.has(n)&&!Xo.includes(n)&&e.delete(n);for(let[n,r]of t)(r||!e.has(n))&&e.set(n,r??n)}}function os(e){if(!(!e||e.has(`en`)))return[...e.keys()].find(e=>!Xo.includes(e))}var ss={untypeset:`no MathJax loads, so math stays untypeset`,"no-web-fonts":`math renders without web fonts`,"no-web-fonts-or-speech":`math renders without web fonts and speech`},cs=Symbol.for(`@pie-element/shared-math-rendering-mathjax/no-assets`);function ls(e){let t=globalThis;t[cs]??=[];let n=t[cs];if(n.includes(e))return;n.push(e);let r=`[math-rendering] No asset root for MathJax: ${ss[e]}. Set window['${Yo}'].opts.assetRoot to an npm root. See ${Jo}`;e===`untypeset`?console.error(r):console.warn(r),!(typeof window>`u`)&&window.dispatchEvent(new CustomEvent(`pie-mathjax-no-asset-root`,{detail:{effect:e,message:r,docsUrl:Jo}}))}var us=`https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page`,ds=`pie-mathjax-version-conflict`,fs=Symbol.for(`@pie-element/shared-math-rendering-mathjax/unsupported-page`);function ps(e,t){if(typeof window>`u`)return;let n=globalThis;n[fs]??={logged:!1,conditions:[]};let r=n[fs];if(r.conditions.includes(e))return;r.conditions.push(e);let i=`[math-rendering] Unsupported page (${e}): ${t}. PIE supports one MathJax major version per page; with MathJax 3 and 4 on one page, math rendering is best effort and may break. See ${us}`;r.logged||(r.logged=!0,console.error(i)),window.dispatchEvent(new CustomEvent(ds,{detail:{condition:e,message:i,docsUrl:us}}))}function ms(){let e=window.MathJax?.version;return typeof e==`string`&&e.startsWith(`3.`)?e:void 0}function hs(){return window.MathJax}function gs(e,{root:t,speechPath:n}){t&&(e.loader={...e.loader,paths:{fonts:`${t}/@mathjax`,"mathjax-newcm":`${t}/@mathjax/mathjax-newcm-font@${qo}`,"mathjax-mhchem-extension":`${t}/@mathjax/mathjax-mhchem-font-extension@${qo}`}}),n&&(e.options={...e.options,worker:{path:n,maps:`${n}/mathmaps`}})}function _s(e,t){let n=t.srcUrl||(t.root?`${t.root}/mathjax@4.1.3/tex-mml-chtml.js`:void 0);return n?(gs(e,t),new Promise((t,r)=>{window.MathJax=e;let i=document.createElement(`script`);i.src=n,i.async=!0,i.onload=()=>t(!0),i.onerror=()=>r(Error(`Failed to load MathJax`)),document.head.appendChild(i)})):(ls(`untypeset`),Promise.resolve(!1))}var vs=globalThis,ys=`PIE-MJX-CHTML-styles`,bs=[`MJX-CHTML-styles`,`MJX-SVG-styles`],xs=ms,Ss=`http://www.w3.org/1998/Math/MathML`,Cs=/^([a-z_][\w.-]*):math$/,ws=/^[a-z][a-z0-9-]*$/;function Ts(e){for(let t of e.querySelectorAll(`*`)){let n=Cs.exec(t.tagName.toLowerCase())?.[1];!n||!e.contains(t)||t.closest(`mjx-container`)||t.replaceWith(Es(t,`${n}:`))}}function Es(e,t){let n=e.tagName.toLowerCase().slice(t.length);if(!ws.test(n))return e;let r=e.ownerDocument.createElementNS(Ss,n);for(let t of e.attributes)r.setAttribute(t.name,t.value);for(let n of[...e.childNodes]){let e=n instanceof Element&&n.tagName.toLowerCase().startsWith(t);r.appendChild(e?Es(n,t):n)}return r}var Ds=new Set([`updiagonalstrike`,`downdiagonalstrike`,`verticalstrike`,`horizontalstrike`]),Os={thin:`0.035em`,medium:`0.07em`,thick:`0.14em`},ks={tight:`0em`,medium:`0.1em`,loose:`0.2em`},As=/^(\d+(\.\d*)?|\.\d+)(em|ex|px|pt|pc|in|cm|mm)$/,js=/^(#[0-9a-f]{3,8}|[a-z]+)$/i,Ms=/^(\d+(\.\d*)?|\.\d+)$/,Ns=new Set([`mn`,`mo`,`mi`,`mtext`]),Ps=new Set([`stackalign`,`charalign`,`charspacing`,`longdivstyle`]);function Fs(e,t,n=[],r={}){let i=e.createElementNS(Ss,t);for(let[e,t]of Object.entries(r))i.setAttribute(e,t);for(let e of n)e&&i.appendChild(e);return i}function Is(e,t){let n=Fs(e.document,`mo`);return n.textContent=t,n}function Ls(e){let t=Fs(e.document,`mn`);return t.textContent=`0`,Fs(e.document,`mphantom`,[t])}function Rs(e,t){return e.getAttribute(t)?.trim().toLowerCase()||void 0}function zs(e,t){let n=Number.parseInt(e.getAttribute(t)??``,10);return Number.isFinite(n)?n:0}function Bs(e){return e.localName===`none`||e.localName===`mrow`&&e.children.length===0&&!e.textContent?.trim()}function Vs(e,t,n=e){switch(t){case`left`:return 0;case`center`:return Math.floor(e/2);case`right`:return e;default:return n}}function Hs(e,t,n){let r=[],i,a,o=(e,t)=>{let s=e=>t.reduceRight((e,t)=>{let n=t.cloneNode(!1);return n.appendChild(e),n},e);if(e.localName===`mstyle`)for(let n of[...e.children])o(n,[...t,e]);else if(Bs(e))r.push(null);else if(e.localName===`mn`&&e.children.length===0){let t=[...(e.textContent??``).trim()];for(let a of t){a===n.decimalPoint&&(i??=r.length);let t=e.cloneNode(!1);t.textContent=a,r.push(s(t))}t.length&&(a??=r.length)}else Ns.has(e.localName)&&e.textContent?.trim()===n.decimalPoint&&(i??=r.length),r.push(s(e))};for(let t of e)o(t,[]);return{kind:`digits`,cells:r,anchor:Vs(r.length,n.stackAlign,i??a),position:t}}function Us(e){return(e??``).toLowerCase().split(/\s+/).filter(e=>Ds.has(e))}function Ws(e,t){let n=[...e.children].filter(e=>!Bs(e));return n.length<=1?n[0]??null:Fs(t.document,`mrow`,n)}function Gs(e,t,n){let r=Rs(e,`location`)??`n`,i=Us(e.getAttribute(`crossout`)),a=[...e.children].map(e=>Bs(e)?null:e.localName===`mscarry`?{content:Ws(e,n),location:Rs(e,`location`)??r,crossout:e.hasAttribute(`crossout`)?Us(e.getAttribute(`crossout`)):i}:{content:e,location:r,crossout:i}),o=e.getAttribute(`scriptsizemultiplier`)?.trim()??``;return{kind:`carries`,carries:a,anchor:Vs(a.length,n.stackAlign),position:t,scale:Ms.test(o)?o:`0.6`}}function Ks(e){let t=Rs(e,`mslinethickness`)??`medium`,n=Os[t]??(As.test(t)?t:`0.07em`),r=e.getAttribute(`mathcolor`)?.trim()??``;return`${n} solid ${js.test(r)?r:`currentColor`}`}function qs(e,t,n){let r=Math.max(0,zs(e,`length`));return{kind:`line`,length:r,anchor:Vs(r,n.stackAlign),position:t,border:Ks(e)}}function Js(e,t,n,r,i){e.forEach((e,a)=>{let o=t+a*n+zs(e,`position`);switch(e.localName){case`msgroup`:Js([...e.children],o,zs(e,`shift`),r,i);break;case`msline`:i.push(qs(e,o,r));break;case`mscarries`:i.push(Gs(e,o,r));break;case`msrow`:case`mrow`:i.push(Hs([...e.children],o,r));break;default:i.push(Hs([e],o,r))}})}function Ys(e){return-e.anchor-e.position}function Xs(e){return e.kind===`digits`?e.cells.length:e.kind===`carries`?e.carries.length:e.length}function Zs(e){return Ys(e)+Xs(e)-1}function Qs(e,t,n,r){let i=e=>Fs(r.document,`mpadded`,[t],{width:`0`,...e?{lspace:e}:{}}),a=(e,t)=>Fs(r.document,e,t);switch(n){case`s`:return a(`munder`,[e,i(`-0.5width`)]);case`ne`:return a(`msup`,[e,i()]);case`se`:return a(`msub`,[e,i()]);case`nw`:return a(`mmultiscripts`,[e,a(`mprescripts`,[]),a(`none`,[]),i(`-1width`)]);case`sw`:return a(`mmultiscripts`,[e,a(`mprescripts`,[]),i(`-1width`),a(`none`,[])]);case`w`:return t.setAttribute(`scriptlevel`,`+1`),a(`mrow`,[i(`-1width`),e]);case`e`:return t.setAttribute(`scriptlevel`,`+1`),a(`mrow`,[e,i()]);default:return a(`mover`,[e,i(`-0.5width`)])}}function $s(e,t,n){let r=Fs(n.document,`menclose`,[e],{notation:t.join(` `),"data-padding":`0.1em`,"data-thickness":`0.067em`}),i=t.some(e=>e.endsWith(`diagonalstrike`))?.167:t.includes(`horizontalstrike`)?.1:0;return i?Fs(n.document,`mpadded`,[r],{lspace:`-${i}em`,width:`-${2*i}em`}):r}function ec(e,t,n,r,i){let a=e&&t.crossout.length?$s(e,t.crossout,i):e;if(!t.content)return a;let o=Fs(i.document,`mstyle`,[t.content],{scriptsizemultiplier:r});return Qs(a??Ls(i),o,n,i)}function tc(e,t){return e.carries[t-Ys(e)]??null}function nc(e,t,n,r){let i=e.content;n.forEach((e,a)=>{let o=n.length-1-a,s=n[o],c=tc(s,t),l=n.slice(0,o).some(e=>tc(e,t));if(!c&&!l)return;let u=c??{content:Ls(r),location:`n`,crossout:[]},d=a===0?u.location:`n`;i=ec(i,u,d,s.scale,r)}),e.content=i}function rc(e,t){let n=e.filter(e=>Xs(e)>0),r=Math.min(0,...n.map(Ys)),i=Math.max(r,...n.map(Zs))-r+1,a=-r,o=[],s=new Map,c=()=>Array.from({length:i},()=>({content:null,borders:{}})),l=e=>e.length===0?Array.from({length:i},(e,t)=>t):Array.from({length:e.length},(t,n)=>a+Ys(e)+n),u=[],d=[],f=e=>{let n=c();e.cells.forEach((t,r)=>{n[a+Ys(e)+r].content=t}),u.length&&n.forEach((e,n)=>{nc(e,n-a,u,t)});for(let e of d)for(let t of l(e))n[t].borders.top=e.border;u=[],d=[],s.set(e,o.length),o.push(n)};for(let t of e)t.kind===`digits`?f(t):t.kind===`carries`?u.push(t):d.push(t);(u.length||!o.length)&&f({kind:`digits`,cells:[],anchor:0,position:0});let p=o[o.length-1];for(let e of d)for(let t of l(e))p[t].borders.bottom=e.border;return{rows:o,rowOf:s,origin:a}}function ic(e,{rows:t},n){let r=Fs(n.document,`mtable`,t.map(e=>Fs(n.document,`mtr`,e.map(e=>{let t=Object.entries(e.borders).map(([e,t])=>`border-${e}:${t}`).join(`;`);return Fs(n.document,`mtd`,[e.content],{...t?{style:t}:{},...e.align?{columnalign:e.align}:{}})}))));for(let{name:t,value:n}of[...e.attributes])Ps.has(t)||r.setAttribute(t,n);let i=Rs(e,`charspacing`)??`medium`,a=Rs(e,`charalign`);return r.setAttribute(`columnspacing`,ks[i]??(As.test(i)?i:ks.medium)),r.setAttribute(`columnalign`,a===`left`||a===`center`?a:`right`),r.setAttribute(`rowspacing`,`0`),r.setAttribute(`align`,e.getAttribute(`align`)??`baseline`),r}function ac(e){return{document:e.ownerDocument,stackAlign:Rs(e,`stackalign`)??`decimalpoint`,decimalPoint:e.closest(`[decimalpoint]`)?.getAttribute(`decimalpoint`)?.trim().charAt(0)||`.`}}function oc(e){let t=ac(e),n=[];return Js([...e.children],0,0,t,n),ic(e,rc(n,t),t)}function sc(e,t,n,r,i,a){for(let o=n;o<=r;o++)e[t][o].borders[i]=a}function cc(e,t){let n=Is(t,`)`);return n.setAttribute(`minsize`,`1.2em`),[Fs(t.document,`mrow`,[e,Fs(t.document,`mspace`,[],{width:`0.2em`})]),Fs(t.document,`mpadded`,[n],{voffset:`0.1em`,lspace:`-0.15em`,depth:`-0.2em`,height:`-0.2em`})]}function lc(e){let t=ac(e),[n,r,...i]=[...e.children],a=n&&!Bs(n)?n:null,o=r&&!Bs(r)?r:null,s=Rs(e,`longdivstyle`)??`lefttop`,c=Ks(e),l=[];Js(i,0,0,t,l);let u=l.find(e=>e.kind===`digits`);u||(u={kind:`digits`,cells:[],anchor:0,position:0},l.unshift(u));let d=[],f=(...e)=>{u.cells.unshift(...e),u.anchor+=e.length},p=(...e)=>{let n=e.flatMap(e=>e?e.localName===`mrow`?[...e.children]:[e]:[]);u.cells.push(...Hs(n,0,t).cells)};switch(s){case`left/\\right`:f(a,Is(t,`/`)),p(Is(t,`\\`),o);break;case`left)(right`:f(a,Is(t,`)`)),p(Is(t,`(`),o);break;case`:right=right`:p(Is(t,`:`),a,Is(t,`=`),o);break;case`righttop`:case`stackedleftlinetop`:case`lefttop`:o&&Js([o],0,0,t,d),l.splice(l.indexOf(u),0,...d),s===`righttop`?p(a):s===`stackedleftlinetop`?f(a):f(...cc(a,t));break}let m=rc(l,t),h=m.rows,g=m.rowOf.get(u)??0,_=e=>m.origin+Ys(u)+e,v=Math.max(_(u.cells.length-1),...d.map(e=>m.origin+Zs(e)));switch(s){case`left/\\right`:case`left)(right`:case`:right=right`:break;case`righttop`:{let e=h[g][_(u.cells.length-1)];e.borders.left=c,e.borders.bottom=c,sc(h,g,_(0),_(u.cells.length-1),`top`,c);break}case`stackedleftlinetop`:{let e=h[g][_(0)];e.borders.right=c,e.borders.bottom=c,sc(h,g,_(1),v,`top`,c);break}case`stackedrightright`:case`mediumstackedrightright`:case`shortstackedrightright`:case`stackedleftleft`:uc(h,g,s,a,o,c,t);break;default:sc(h,g,_(1),v,`top`,c)}return ic(e,m,t)}function uc(e,t,n,r,i,a,o){let s=n===`stackedleftleft`,c=s?`right`:`left`,l=e=>e&&Fs(o.document,`mpadded`,[e],{lspace:`0.2em`,width:`+0.4em`});e.length<t+2&&e.push(e[0].map(()=>({content:null,borders:{}}))),e.forEach((e,o)=>{let u={content:null,borders:{},align:s?`right`:`left`};o===t?(u.content=l(r),u.borders={[c]:a,bottom:a}):o===t+1?(u.content=l(i),n!==`shortstackedrightright`&&(u.borders[c]=a)):o>t+1&&(n===`stackedrightright`||s)&&(u.borders[c]=a),s?e.unshift(u):e.push(u)})}function dc(e){for(let t of[...e.querySelectorAll(`mstack, mlongdiv`)])!t.closest(`math`)||t.closest(`mjx-container`)||t.replaceWith(t.localName===`mstack`?oc(t):lc(t))}var fc=`PIE-MJX-explorer-styles`,pc=`var(--pie-text, black)`,mc=`var(--pie-background, #ffffff)`,hc=`var(--pie-border-dark, #66686A)`,gc=`var(--pie-focus-outline, var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565C0)))`,_c=`color-mix(in srgb, ${gc} 15%, transparent)`,vc=`
|
|
1
|
+
this.VennClassificationElement=(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}}function b(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);let n=[];for(let r of e)if(n.push(r),n.length===t)break;return n}var x=1024,S=2048,C=4096,w=8192,T=16384,E=32768,ee=1<<25,te=65536,ne=1<<19,re=1<<20,ie=1<<25,D=1<<21,ae=1<<22,oe=1<<23,se=Symbol(`$state`),ce=Symbol(`component`),le=Symbol(`legacy props`),ue=Symbol(``),de=Symbol(`attributes`),O=Symbol(`class`),fe=Symbol(`style`),pe=Symbol(`text`),me=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},he=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function ge(){console.warn(`https://svelte.dev/e/derived_inert`)}function _e(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function ve(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var k=!1;function ye(e){k=e}var A;function j(t){if(t===null)throw _e(),e;return A=t}function M(){return j(Jt(A))}function N(t){if(k){if(Jt(A)!==null)throw _e(),e;A=t}}function be(e=1){if(k){for(var t=e,n=A;t--;)n=Jt(n);A=n}}function xe(e=!0){for(var t=0,n=A;;){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=Jt(n);e&&n.remove(),n=i}}function Se(t){if(!t||t.nodeType!==8)throw _e(),e;return t.data}function Ce(e){return e===this.v}function we(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Te(e){return!we(e,this.v)}function Ee(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function De(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Oe(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function ke(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Ae(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function je(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Me(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Ne(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Pe(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Fe(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ie(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Le(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Re(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var P=null;function ze(e){P=e}function Be(e,t=!1,n){P={p:P,i:!1,c:null,e:null,s:e,x:null,r:W,l:null}}function Ve(e){var t=P,n=t.e;if(n!==null){t.e=null;for(var r of n)dn(r)}return e!==void 0&&(t.x=e),t.i=!0,P=t.p,He(e)}function He(e={}){return u(e,ce,{value:!0}),e}function Ue(){return!0}var We=[];function Ge(){var e=We;We=[],v(e)}function Ke(e){if(We.length===0&&!mt){var t=We;queueMicrotask(()=>{t===We&&Ge()})}We.push(e)}function qe(){for(;We.length>0;)Ge()}var Je=~(S|C|x);function F(e,t){e.f=e.f&Je|t}function Ye(e){e.f&512||e.deps===null?F(e,x):F(e,C)}function Xe(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),F(e,x)}function Ze(e){var t=U,n=W;Ln(null),Rn(null);try{return e()}finally{Ln(t),Rn(n)}}function Qe(e,t,n,r){let i=Ue()?nt:at;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=W,c=$e(),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){rn(e,s)}et()}}var d=tt();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>it(e))).then(u).catch(e=>rn(e,s)).finally(d)}l?l.then(()=>{c(),f(),et()}):f()}function $e(){var e=W,t=U,n=P,r=R;return function(i=!0){Rn(e),Ln(t),ze(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function et(e=!0){Rn(null),Ln(null),ze(null),e&&R?.deactivate()}function tt(){var e=W,t=e.b,n=R,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 nt(e){var n=2|S;return W!==null&&(W.f|=ne),{ctx:P,deps:null,effects:null,equals:Ce,f:n,fn:e,reactions:null,rv:0,v:t,wv:0,parent:W,ac:null}}var rt=Symbol(`obsolete`);function it(e,n,r){let i=W;i===null&&De();var a=void 0,o=jt(t),s=!U,c=new Set;return gn(()=>{var t=W,n=y();a=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==me&&n.reject(e)}).finally(et)}catch(e){n.reject(e),et()}var r=R;if(s){if(t.f&32768)var l=tt();if(i.b?.is_rendered())r.async_deriveds.get(t)?.reject(rt);else for(let e of c.values())e.reject(rt);c.add(n),r.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),c.delete(n),t!==rt&&(r.activate(),t?(o.f|=oe,It(o,t)):(o.f&8388608&&(o.f^=oe),It(o,e)),r.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),ln(()=>{for(let e of c)e.reject(rt)}),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function I(e){let t=nt(e);return Bn(t),t}function at(e){let t=nt(e);return t.equals=Te,t}function ot(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)wn(t[n])}}function L(e){var n,r=W,i=e.parent;if(!Pn&&i!==null&&e.v!==t&&i.f&24576)return ge(),e.v;Rn(i);try{ot(e),n=Qn(e)}finally{Rn(r)}return n}function st(e){var t=L(e);if(!e.equals(t)&&(e.wv=Yn(),(!R?.is_fork||e.deps===null)&&(R===null?e.v=t:(R.capture(e,t,!0),dt?.capture(e,t,!0)),e.deps===null))){F(e,x);return}Pn||(ft===null?Ye(e):(cn()||R?.is_fork)&&ft.set(e,t))}function ct(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Ze(()=>{t.ac.abort(me),t.ac=null}),t.fn!==null&&(t.teardown=_),tr(t,0),Sn(t))}function lt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&nr(t)}var ut=null,R=null,dt=null,ft=null,pt=null,mt=!1,ht=!1,gt=null,_t=null,vt=0,yt=1,bt=class e{id=yt++;#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(){ut===null?ut=this:(ut.#n=this,this.#t=ut),ut=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)F(r,S),t(r);for(r of n.m)F(r,C),t(r)}this.#p.add(e)}#g(){var e=[];for(let i of this.#c)if(!(i.f&16384||!(i.f&6144))){for(var t=i,n=!1;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024)){n=!0;break}t.f^=x}}n||e.push(t)}return this.#c=[],e}#_(){this.#e=!0;for(let e of this.#u)this.#d.delete(e),F(e,S),this.schedule(e);for(let e of this.#d)F(e,C),this.schedule(e);this.apply();for(var t=gt=[],n=[],r=_t=[];this.#c.length>0;){vt++>1e3&&(this.#S(),xt());for(let e of this.#g())try{this.#v(e,t,n)}catch(t){throw Ot(e),this.#h()||this.discard(),t}}if(R=null,r.length>0){var i=e.ensure();for(let e of r)i.schedule(e)}if(gt=null,_t=null,this.#h()){this.#x(n),this.#x(t);for(let[e,t]of this.#f)Dt(e,t);r.length>0&&R.#_();return}let a=this.#y();if(a){this.#x(n),this.#x(t),a.#b(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),dt=this,Ct(n),Ct(t),dt=null,this.#s?.resolve();var o=R;if(this.#a===0&&(this.#c.length===0||o!==null)&&this.#S(),this.#c.length>0)if(o!==null){for(let e of this.#c)o.#c.push(e);this.#c=[]}else o=this;o!==null&&(B.clear(),o.#_())}#v(e,t,n){e.f^=x;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^=x:i&4?t.push(r):Xn(r)&&(i&16&&this.#d.add(r),nr(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}}}#y(){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}#b(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),F(i,S),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#S(),R=this,this.#_()}#x(e){for(var t=0;t<e.length;t+=1)Xe(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]),ft?.set(e,n)),this.is_fork||(e.v=n)}activate(){R=this}deactivate(){R=null,ft=null}flush(){try{ht=!0,R=this,this.#_()}finally{vt=0,pt=null,gt=null,_t=null,ht=!1,R=null,ft=null,B.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(rt);this.#S(),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,Ke(()=>{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(R===null){let t=R=new e;!ht&&!mt&&Ke(()=>{t.#e||t.flush()})}return R}apply(){ft=null}schedule(e){if(pt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}this.#c.push(e)}#S(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?ut=e:t.#t=e,this.linked=!1}}};function z(e){var t=mt;mt=!0;try{var n;for(e&&(R!==null&&!R.is_fork&&R.flush(),n=e());;){if(qe(),R===null)return n;R.flush()}}finally{mt=t}}function xt(){try{Me()}catch(e){rn(e,pt)}}var St=null;function Ct(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Xn(r)&&(St=new Set,nr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&En(r),St?.size>0)){B.clear();for(let e of St){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)St.has(n)&&(St.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||nr(n)}}St.clear()}}St=null}}function wt(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?wt(i,t,n,r):e&4194320&&!(e&2048)&&Tt(i,t,r)&&(F(i,S),Et(i))}}function Tt(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&&Tt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Et(e){R.schedule(e)}function Dt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),F(e,x);for(var n=e.first;n!==null;)Dt(n,t),n=n.next}}function Ot(e){F(e,x);for(var t=e.first;t!==null;)Ot(t),t=t.next}var kt=new Set,B=new Map,At=!1;function jt(e,t){return{f:0,v:e,reactions:null,equals:Ce,rv:0,wv:0}}function Mt(e,t){let n=jt(e,t);return Bn(n),n}function Nt(e,t=!1,n=!0){let r=jt(e);return t||(r.equals=Te),r}function V(e,t,n=!1){return U!==null&&(!In||U.f&131072)&&Ue()&&U.f&4325394&&(zn===null||!zn.has(e))&&Le(),It(e,n?Bt(t):t,_t)}var Pt=null,Ft=0;function It(e,t,n=null){if(!e.equals(t)){Pn?B.set(e,t):B.has(e)||B.set(e,e.v);var r=bt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&L(t),ft===null&&Ye(t)}e.wv=Yn(),Pt=null,Ft=0,zt(e,S,n),Pt=null,Ue()&&W!==null&&W.f&1024&&!(W.f&96)&&(Un===null?Wn([e]):Un.push(e)),!r.is_fork&&kt.size>0&&!At&&Lt()}return t}function Lt(){At=!1;for(let e of kt){e.f&1024&&F(e,C);let t;try{t=Xn(e)}catch{t=!0}t&&nr(e)}kt.clear()}function Rt(e){V(e,e.v+1)}function zt(e,t,n){var r=e.reactions;if(r!==null){var i=Ue(),a=r.length;if(Ft+=a,Ft>1e5&&Pt===null&&(Pt=new Set),Pt!==null){if(Pt.has(e))return;Pt.add(e)}for(var o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===W)){var l=(c&S)===0;if(l&&F(s,t),c&131072)kt.add(s);else if(c&2){var u=s;ft?.delete(u),zt(u,C,n)}else if(l){var d=s;c&16&&St!==null&&St.add(d),n===null?Et(d):n.push(d)}}}}}function Bt(e){if(typeof e!=`object`||!e||se in e||ce in e)return e;let n=h(e);if(n!==p&&n!==m)return e;var r=new Map,i=a(e),o=Mt(0),s=null,c=qn,l=e=>{if(qn===c)return e();var t=U,n=qn;Ln(null),Jn(c);var r=e();return Ln(t),Jn(n),r};return i&&r.set(`length`,Mt(e.length,s)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&Fe();var i=r.get(t);return i===void 0?l(()=>{var e=Mt(n.value,s);return r.set(t,e),e}):V(i,n.value,!0),!0},deleteProperty(e,n){var i=r.get(n);if(i===void 0){if(n in e){let e=l(()=>Mt(t,s));r.set(n,e),Rt(o)}}else V(i,t),Rt(o);return!0},get(n,i,a){if(i===se)return e;var o=r.get(i),c=i in n;if(o===void 0&&(!c||d(n,i)?.writable)&&(o=l(()=>Mt(Bt(c?n[i]:t),s)),r.set(i,o)),o!==void 0){var u=G(o);return u===t?void 0:u}return Reflect.get(n,i,a)},getOwnPropertyDescriptor(e,n){this.has?.(e,n);var i=Reflect.getOwnPropertyDescriptor(e,n),a=r.get(n);if(a!==void 0){var o=G(a);if(o===t)return;if(i&&`value`in i)i.value=o;else return{enumerable:!0,configurable:!0,value:o,writable:!0}}return i},has(e,n){if(n===se)return!0;var i=r.get(n),a=i!==void 0&&i.v!==t||Reflect.has(e,n);return(i!==void 0||W!==null&&(!a||d(e,n)?.writable))&&(i===void 0&&(i=l(()=>Mt(a?Bt(e[n]):t,s)),r.set(n,i)),G(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(()=>Mt(t,s)),r.set(p+``,m)):V(m,t)}if(u===void 0)(!f||d(e,n)?.writable)&&(u=l(()=>Mt(void 0,s)),V(u,Bt(a)),r.set(n,u));else{f=u.v!==t;var h=l(()=>Bt(a));V(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&&V(_,v+1)}Rt(o)}return!0},ownKeys(e){G(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(){Ie()}})}var Vt,Ht,Ut,Wt;function Gt(){if(Vt===void 0){Vt=window,Ht=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Ut=d(t,`firstChild`).get,Wt=d(t,`nextSibling`).get,g(e)&&(e[O]=void 0,e[de]=null,e[fe]=void 0,e.__e=void 0),g(n)&&(n[pe]=void 0)}}function Kt(e=``){return document.createTextNode(e)}function qt(e){return Ut.call(e)}function Jt(e){return Wt.call(e)}function Yt(e,t){if(!k)return qt(e);var n=qt(A);if(n===null)n=A.appendChild(Kt());else if(t&&n.nodeType!==3){var r=Kt();return n?.before(r),j(r),r}return t&&tn(n),j(n),n}function Xt(e,t=!1){if(!k){var n=qt(e);return n instanceof Comment&&n.data===``?Jt(n):n}if(t){if(A?.nodeType!==3){var r=Kt();return A?.before(r),j(r),r}tn(A)}return A}function Zt(e,t=!1){if(!k)return qt(e);var n=Yt(e,t);return N(e),n}function H(e,t=1,n=!1){let r=k?A:e;for(var i;t--;)i=r,r=Jt(r);if(!k)return r;if(n){if(r?.nodeType!==3){var a=Kt();return r===null?i?.after(a):r.before(a),j(a),a}tn(r)}return j(r),r}function Qt(e){e.textContent=``}function $t(){return!1}function en(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 tn(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 nn(e){var t=W;if(t===null)return U.f|=oe,e;if(!(t.f&32768)&&!(t.f&4))throw e;rn(e,t)}function rn(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 an(e){W===null&&(U===null&&je(e),Ae()),Pn&&ke(e)}function on(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function sn(e,t){var n=W;n!==null&&n.f&8192&&(e|=w);var r={ctx:P,deps:null,nodes:null,f:e|S|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};R?.register_created_effect(r);var i=r;if(e&4)gt===null?bt.ensure().schedule(r):gt.push(r);else if(t!==null){try{nr(r)}catch(e){throw wn(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&&on(i,n),U!==null&&U.f&2&&!(e&64))){var a=U;(a.effects??=[]).push(i)}return r}function cn(){return U!==null&&!In}function ln(e){let t=sn(8,null);return F(t,x),t.teardown=e,t}function un(e){an(`$effect`);var t=W.f;if(!U&&t&32&&P!==null&&!P.i){var n=P;(n.e??=[]).push(e)}else return dn(e)}function dn(e){return sn(4|re,e)}function fn(e){return an(`$effect.pre`),sn(8|re,e)}function pn(e){bt.ensure();let t=sn(64|ne,e);return()=>{wn(t)}}function mn(e){bt.ensure();let t=sn(64|ne,e);return(e={})=>new Promise(n=>{e.outro?Dn(t,()=>{wn(t),n(void 0)}):(wn(t),n(void 0))})}function hn(e){return sn(4,e)}function gn(e){return sn(ae|ne,e)}function _n(e,t=0){return sn(8|t,e)}function vn(e,t=[],n=[],r=[]){Qe(r,t,n,t=>{sn(8,()=>{e(...t.map(G))})})}function yn(e,t=0){return sn(16|t,e)}function bn(e){return sn(32|ne,e)}function xn(e){var t=e.teardown;if(t!==null){let n=Pn,r=U;Fn(!0),Ln(null);try{t.call(null)}catch(t){rn(t,e.parent)}finally{Fn(n),Ln(r)}}}function Sn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Ze(()=>{e.abort(me)});var r=n.next;n.f&64?n.parent=null:wn(n,t),n=r}}function Cn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||wn(t),t=n}}function wn(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Tn(e.nodes.start,e.nodes.end),n=!0),e.f|=ee,Sn(e,t&&!n),tr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();xn(e),e.f^=ee,e.f|=T;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:Jt(e);e.remove(),e=n}}function En(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Dn(e,t,n=!0){var r=[];e.f|=256,On(e,r,!0);var i=()=>{n&&wn(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^=w;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;On(i,t,o?n:!1)}i=a}}}function kn(e){e.f&=-257,An(e,!0)}function An(e,t){if(!(e.f&256)&&e.f&8192){e.f^=w,e.f&1024||(F(e,S),bt.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:Jt(n);t.append(n),n=i}}var Mn=null,Nn=!1,Pn=!1;function Fn(e){Pn=e}var U=null,In=!1;function Ln(e){U=e}var W=null;function Rn(e){W=e}var zn=null;function Bn(e){U!==null&&(U.f&2097152||U.f&2)&&(zn??=new Set).add(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&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Xn(a)&&st(a),a.wv>e.wv)return!0}t&512&&ft===null&&F(e,x)}return!1}function Zn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(zn!==null&&zn.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Zn(a,t,!1):t===a&&(n?F(a,S):a.f&1024&&F(a,C),Et(a))}}function Qn(e){var t=Vn,n=Hn,r=Un,i=U,a=zn,o=P,s=In,c=qn,l=e.f;Vn=null,Hn=0,Un=null,U=l&96?null:e,zn=null,ze(e.ctx),In=!1,qn=++Kn,e.ac!==null&&(Ze(()=>{e.ac.abort(me)}),e.ac=null);try{e.f|=D;var u=e.fn,d=u();e.f|=E;var f=$n(e);if(Ue()&&Un!==null&&!In&&f!==null&&!(e.f&6146))for(var p=0;p<Un.length;p++)Zn(Un[p],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^=oe),d}catch(t){return $n(e),nn(t)}finally{e.f^=D,Vn=t,Hn=n,Un=r,U=i,zn=a,ze(o),In=s,qn=c}}function $n(e){var t=e.deps,n=R?.is_fork;if(Vn!==null){var r;if(n||tr(e,Hn),t!==null&&Hn>0)for(t.length=Hn+Vn.length,r=0;r<Vn.length;r++)t[Hn+r]=Vn[r];else e.deps=t=Vn;if(cn()&&e.f&512)for(r=Hn;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&Hn<t.length&&(tr(e,Hn),t.length=Hn);return t}function er(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&&(Vn===null||!s.call(Vn,n))){var c=n;c.f&512&&(c.f^=512),c.v!==t&&Ye(c),c.ac!==null&&Ze(()=>{c.ac.abort(me),c.ac=null,F(c,S)}),ct(c),tr(c,0)}}function tr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)er(e,n[r])}function nr(e){var t=e.f;if(!(t&16384)){F(e,x);var n=W,r=Nn;W=e,Nn=(t&96)==0;try{t&16777232?Cn(e):Sn(e),xn(e);var i=Qn(e);e.teardown=typeof i==`function`?i:null,e.wv=Gn}finally{Nn=r,W=n}}}async function rr(){await Promise.resolve(),z()}function G(e){var t=(e.f&2)!=0;if(Mn?.add(e),U!==null&&!In&&!(W!==null&&W.f&16384)&&(zn===null||!zn.has(e))){var n=U.deps;if(U.f&2097152)e.rv<Kn&&(e.rv=Kn,Vn===null&&n!==null&&n[Hn]===e?Hn++:Vn===null?Vn=[e]:Vn.push(e));else{U.deps??=[],s.call(U.deps,e)||U.deps.push(e);var r=e.reactions;r===null?e.reactions=[U]:s.call(r,U)||r.push(U)}}if(Pn&&B.has(e))return B.get(e);if(t){var i=e;if(Pn){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||ar(i))&&(a=L(i)),B.set(i,a),a}var o=(i.f&512)==0&&!In&&U!==null&&(Nn||(U.f&512)!=0),c=(i.f&E)===0;Xn(i)&&(o&&(i.f|=512),st(i)),o&&!c&&(lt(i),ir(i))}if(ft?.has(e))return ft.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)&&(lt(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(B.has(t)||t.f&2&&ar(t))return!0;return!1}function or(e){var t=In;try{return In=!0,e()}finally{In=t}}var sr=Symbol(`events`),cr=new Set,lr=new Set;function ur(e,t,n,r={}){function i(e){if(r.capture||gr.call(t,e),!e.cancelBubble)return Ze(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?(i.__removed=!1,Ke(()=>{i.__removed||t.addEventListener(e,i,r)})):t.addEventListener(e,i,r),i}function dr(e,t,n,r,i){var a={capture:r,passive:i},o=ur(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&ln(()=>{o.__removed=!0,t.removeEventListener(e,o,a)})}function fr(e,t,n){(t[sr]??={})[e]=n}function pr(e){for(var t=0;t<e.length;t++)cr.add(e[t]);for(var n of lr)n(e)}var mr=null,hr=!1;function gr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;mr=e,hr||(hr=!0,setTimeout(()=>{hr=!1,mr=null}));var o=0,s=mr===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=U,f=W;Ln(null),Rn(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,Ln(d),Rn(f)}}}var _r=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function vr(e){return _r?.createHTML(e)??e}function yr(e){var t=en(`template`);return t.innerHTML=vr(e.replaceAll(`<!>`,`<!---->`)),t.content}function br(e,t){var n=W;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function xr(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(k)return br(A,null),A;i===void 0&&(i=yr(a?e:`<!>`+e),n||(i=qt(i)));var t=r||Ht?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=qt(t),s=t.lastChild;br(o,s)}else br(t,t);return t}}function Sr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(k)return br(A,null),A;if(!o){var e=qt(yr(a));if(i)for(o=document.createDocumentFragment();qt(e);)o.appendChild(qt(e));else o=qt(e)}var t=o.cloneNode(!0);if(i){var n=qt(t),r=t.lastChild;br(n,r)}else br(t,t);return t}}function Cr(e,t){return Sr(e,t,`svg`)}function wr(){if(k)return br(A,null),A;var e=document.createDocumentFragment(),t=document.createComment(``),n=Kt();return e.append(t,n),br(t,n),e}function K(e,t){if(k){var n=W;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=A),M();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 Tr=[`touchstart`,`touchmove`];function Er(e){return Tr.includes(e)}function Dr(e){let t=0,n=jt(0),r;return()=>{cn()&&(G(n),_n(()=>(t===0&&(r=or(()=>e(()=>Rt(n)))),t+=1,()=>{Ke(()=>{--t,t===0&&(r?.(),r=void 0,Rt(n))})})))}}var Or=te|ne;function kr(e,t,n,r){new Ar(e,t,n,r)}var Ar=class{parent;is_pending=!1;transform_error;#e;#t=k?A: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=Dr(()=>(this.#m=jt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=W;t.b=this,t.f|=128,n(e)},this.parent=W.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=yn(()=>{if(k){let e=this.#t;M();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()},Or),k&&(this.#e=A)}#g(){try{this.#a=bn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);Ke(r),t&&(this.#s=bn(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{if(t){ve();return}t=!0,n&&Re(),this.#s!==null&&Dn(this.#s,()=>{this.#s=null}),this.#S(()=>{this.#b()})};return{reset:r,invoke_onerror:()=>{try{n=!0,this.#n.onerror?.(e,r),n=!1}catch(e){rn(e,this.#i&&this.#i.parent)}}}}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=bn(()=>e(this.#e)),Ke(()=>{var e=this.#c=document.createDocumentFragment(),t=Kt(),n=!1;if(e.append(t),this.#a=this.#S(()=>{try{return bn(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){rn(e,this.#i.parent)}return null}}),this.#a===null){this.#c=null,n&&this.#x(R);return}this.#u===0&&(this.#e.before(e),this.#c=null,Dn(this.#o,()=>{this.#o=null}),this.#x(R))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=bn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();jn(this.#a,e);let t=this.#n.pending;this.#o=bn(()=>t(this.#e))}else this.#x(R)}catch(e){this.error(e)}}#x(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){Xe(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=W,n=U,r=P;Rn(this.#i),Ln(this.#i),ze(this.#i.ctx);try{return bt.ensure(),e()}finally{Rn(t),Ln(n),ze(r)}}#C(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#C(e,t);return}this.#u+=e,this.#u===0&&(this.#x(t),this.#o&&Dn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#C(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,Ke(()=>{this.#d=!1,this.#m&&It(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),G(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;R?.is_fork?(this.#a&&R.skip_effect(this.#a),this.#o&&R.skip_effect(this.#o),this.#s&&R.skip_effect(this.#s),R.oncommit(()=>{this.#w(e)})):this.#w(e)}#w(e){this.#a&&=(wn(this.#a),null),this.#o&&=(wn(this.#o),null),this.#s&&=(wn(this.#s),null),k&&(j(this.#t),be(),j(xe()));let t=this.#n.failed,n=e=>{let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&(this.#s=this.#S(()=>{try{return bn(()=>{var r=W;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return rn(e,this.#i.parent),null}}))};Ke(()=>{var t;try{t=this.transform_error(e)}catch(e){rn(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>rn(e,this.#i&&this.#i.parent)):n(t)})}};function jr(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[pe]??=e.nodeValue)&&(e[pe]=n,e.nodeValue=`${n}`)}function Mr(e,t){return Fr(e,t)}function Nr(t,n){Gt(),n.intro=n.intro??!1;let r=n.target,i=k,a=A;try{for(var o=qt(r);o&&(o.nodeType!==8||o.data!==`[`);)o=Jt(o);if(!o)throw e;ye(!0),j(o);let i=Fr(t,{...n,anchor:o});return ye(!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&&Ne(),Gt(),Qt(r),ye(!1),Mr(t,n)}finally{ye(i),j(a)}}var Pr=new Map;function Fr(t,{target:n,anchor:r,props:i={},events:a,context:o,intro:s=!0,transformError:l}){Gt();var u=void 0,d=mn(()=>{var s=r??n.appendChild(Kt());kr(s,{pending:()=>{}},n=>{Be({});var r=P;if(o&&(r.c=o),a&&(i.$$events=a),k&&br(n,null),u=t(n,i)||He(),k&&(W.nodes.end=A,A===null||A.nodeType!==8||A.data!==`]`))throw _e(),e;Ve()},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=Er(r);for(let e of[n,document]){var a=Pr.get(e);a===void 0&&(a=new Map,Pr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,gr,{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=Pr.get(r),i=t.get(e);--i==0?(r.removeEventListener(e,gr),t.delete(e),t.size===0&&Pr.delete(r)):t.set(e,i)}lr.delete(f),s!==r&&s.parentNode?.removeChild(s)}});return Ir.set(u,d),u}var Ir=new WeakMap;function Lr(e,t){let n=Ir.get(e);return n?(Ir.delete(e),n(t)):Promise.resolve()}var Rr=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)kn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(kn(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(wn(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();jn(r,t),t.append(Kt()),this.#n.set(e,{effect:r,fragment:t})}else wn(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Dn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(wn(n.effect),this.#n.delete(e))};ensure(e,t){var n=R,r=$t();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=Kt();i.append(a),this.#n.set(e,{effect:bn(()=>t(a)),fragment:i})}else this.#t.set(e,bn(()=>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 k&&(this.anchor=A),this.#a(n)}};function zr(e,t,...n){var r=new Rr(e);yn(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},te)}function Br(e){P===null&&Ee(`onMount`),un(()=>{let t=or(e);if(typeof t==`function`)return t})}function Vr(e){P===null&&Ee(`onDestroy`),Br(()=>()=>or(e))}function Hr(e,t,n=!1){var r;k&&(r=A,M());var i=new Rr(e),a=n?te:0;function o(e,t){if(k){var n=Se(r);if(e!==parseInt(n.substring(1))){var a=xe();j(a),i.anchor=a,ye(!1),i.ensure(e,t),ye(!0);return}}i.ensure(e,t)}yn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Ur(e,t){return t}function Wr(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];Dn(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Gr(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;Qt(d),d.append(u),e.items.clear()}Gr(e,t,!l)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Gr(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,jn(a,document.createDocumentFragment())):wn(t[i],n)}}var Kr;function qr(e,t,n,r,i,o=null){var s=e,l=new Map;if(t&4){var u=e;s=k?j(qt(u)):u.appendChild(Kt())}k&&M();var d=null,f=at(()=>{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,Yr(v,p,s,t,r),d!==null&&(p.length===0?d.f&33554432?(d.f^=ie,Zr(d,null,s)):kn(d):Dn(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:yn(()=>{p=G(f);var e=p.length;let a=!1;k&&Se(s)===`[!`!=(e===0)&&(s=xe(),j(s),ye(!1),a=!0);for(var c=new Set,u=R,v=$t(),y=0;y<e;y+=1){k&&A.nodeType===8&&A.data===`]`&&(s=A,a=!0,ye(!1));var b=p[y],x=r(b,y),S=h?null:l.get(x);S?(S.v&&It(S.v,b),S.i&&It(S.i,y),v&&u.unskip_effect(S.e)):(S=Xr(l,h?s:Kr??=Kt(),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=bn(()=>o(s)):(d=bn(()=>o(Kr??=Kt())),d.f|=ie)),e>c.size&&Oe(``,``,``),k&&e>0&&j(xe()),!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&&ye(!0),G(f)}),flags:t,items:l,pending:m,outrogroups:null,fallback:d};h=!1,k&&(s=A)}function Jr(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Yr(e,t,n,r,i){var a=(r&8)!=0,o=t.length,s=e.items,l=Jr(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&&(kn(_),a&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432)if(_.f^=ie,_===l)Zr(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Qr(e,d,_),Qr(e,_,y),Zr(_,y,n),d=_,p=[],m=[],l=Jr(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],C=p[p.length-1];for(x=0;x<p.length;x+=1)Zr(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Qr(e,S.prev,C.next),Qr(e,d,S),Qr(e,C,b),l=b,d=C,--v,p=[],m=[]}else u.delete(_),Zr(_,l,n),Qr(e,_.prev,_.next),Qr(e,_,d===null?e.effect.first:d.next),Qr(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=Jr(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Jr(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Gr(e,c(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var w=[];if(u!==void 0)for(_ of u)_.f&8192||w.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&w.push(l),l=Jr(l.next);var T=w.length;if(T>0){var E=r&4&&o===0?n:null;if(a){for(v=0;v<T;v+=1)w[v].nodes?.a?.measure();for(v=0;v<T;v+=1)w[v].nodes?.a?.fix()}Wr(e,w,E)}}a&&Ke(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Xr(e,t,n,r,i,a,o,s){var c=o&1?o&16?jt(n):Nt(n,!1,!1):null,l=o&2?jt(i):null;return{v:c,i:l,e:bn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Zr(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=Jt(r);if(a.before(r),r===i)return;r=o}}function Qr(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function $r(t,n,a=!1,o=!1,s=!1,c=!1){var l=t,u=``;if(a){var d=t;k&&(l=j(qt(d)))}vn(()=>{var t=W;if(u===(u=n()??``)){k&&M();return}if(a&&!k){t.nodes=null,d.innerHTML=u,u!==``&&br(qt(d),d.lastChild);return}if(t.nodes!==null&&(Tn(t.nodes.start,t.nodes.end),t.nodes=null),u!==``){if(k){for(var c=A.data,f=M(),p=f;f!==null&&(f.nodeType!==8||f.data!==``);)p=f,f=Jt(f);if(f===null)throw _e(),e;br(A,p),l=j(f);return}var m=en(o?`svg`:s?`math`:`template`,o?r:s?i:void 0);m.innerHTML=u;var h=o||s?m:m.content;if(br(qt(h),h.lastChild),o||s)for(;qt(h);)l.before(qt(h));else l.before(h)}})}function ei(e,t){hn(()=>{e=W?.parent?.nodes?.start??e;var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=en(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}var ti=[...`
|
|
3
|
+
\r\f\xA0\v`];function ni(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||ti.includes(r[o-1]))&&(s===r.length||ti.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function ri(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 ii(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function ai(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(ii)),i&&c.push(...Object.keys(i).map(ii));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=ii(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+=ri(r)),i&&(n+=ri(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function oi(e,t,n,r,i,a){var o=e[O];if(k||o!==n||o===void 0){var s=ni(n,r,a);(!k||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[O]=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 si(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 ci(e,t,n,r){var i=e[fe];if(k||i!==t){var a=ai(t,r);(!k||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[fe]=t}else r&&(Array.isArray(r)?(si(e,n?.[0],r[0]),si(e,n?.[1],r[1],`important`)):si(e,n,r));return r}var li=Symbol(`is custom element`),ui=Symbol(`is html`),di=he?`link`:`LINK`;function q(e,t,n,r){var i=fi(e);k&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===di)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[ue]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&mi(e).has(t)?e[t]=n:e.setAttribute(t,n))}function fi(e){return e[de]??={[li]:e.nodeName.includes(`-`),[ui]:e.namespaceURI===n}}var pi=new Map;function mi(e){var t=e.getAttribute(`is`)||e.nodeName,n=pi.get(t);if(n)return n;pi.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}var hi=new class e{#e=new WeakMap;#t;#n;static entries=new WeakMap;constructor(e){this.#n=e}observe(e,t){var n=this.#e.get(e)||new Set;return n.add(t),this.#e.set(e,n),this.#r().observe(e,this.#n),()=>{var n=this.#e.get(e);n.delete(t),n.size===0&&(this.#e.delete(e),this.#t.unobserve(e))}}#r(){return this.#t??=new ResizeObserver(t=>{for(var n of t){e.entries.set(n.target,n);for(var r of this.#e.get(n.target)||[])r(n)}})}}({box:`border-box`});function gi(e,t,n){var r=hi.observe(e,()=>n(e[t]));hn(()=>(or(()=>n(e[t])),r))}function _i(e,t){return e===t||e?.[se]===t}function vi(e=He(),t,n,r){var i=P.r,a=W;return hn(()=>{var o,s;return _n(()=>{o=s,s=r?.()||[],or(()=>{_i(n(...s),e)||(t(e,...s),o&&_i(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&&_i(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}var yi=!1;function bi(e){var t=yi;try{return yi=!1,[e(),yi]}finally{yi=t}}function J(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??=nt(r),G(l)):(c&&(c=!1,s=o?or(r):r),s);let f;if(a){var p=se in e||le in e;f=d(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=bi(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=u(),f&&(i&&Pe(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?nt:at)(()=>(v=!1,g()));a&&G(y);var b=W;return(function(e,t){if(arguments.length>0){let n=t?G(y):i&&a?Bt(e):e;return V(y,n),v=!0,s!==void 0&&(s=n),e}return Pn&&v||b.f&16384?y.v:G(y)})}function xi(e){return new Si(e)}var Si=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=Nt(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return G(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===le?!0:(G(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return V(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?Nr:Mr)(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)&&z(),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=()=>{Lr(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()}},Ci;typeof HTMLElement==`function`&&(Ci=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=en(`slot`);e!=="default"&&(n.name=e),K(t,n)}}let t={},n=Ti(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]=wi(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=xi({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=pn(()=>{_n(()=>{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=wi(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]=wi(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 wi(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 Ti(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function Ei(e,t,n,r,i,a){let o=class extends Ci{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=wi(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 Di(e,t){this.v=e,this.k=t}function Oi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ki(e){if(Array.isArray(e))return e}function Ai(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function ji(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mi(e,t){return ki(e)||Ai(e,t)||Ni(e,t)||ji()}function Ni(e,t){if(e){if(typeof e==`string`)return Oi(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Oi(e,t):void 0}}function Pi(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof Di;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}Pi.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},Pi.prototype.next=function(e){return this._invoke(`next`,e)},Pi.prototype.throw=function(e){return this._invoke(`throw`,e)},Pi.prototype.return=function(e){return this._invoke(`return`,e)};var Fi=Object.entries,Ii=Object.setPrototypeOf,Li=Object.isFrozen,Ri=Object.getPrototypeOf,zi=Object.getOwnPropertyDescriptor,Bi=Object.freeze,Vi=Object.seal,Hi=Object.create,Ui=typeof Reflect<`u`&&Reflect,Wi=Ui.apply,Gi=Ui.construct;Bi||=function(e){return e},Vi||=function(e){return e},Wi||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},Gi||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var Ki=Y(Array.prototype.forEach);Array.prototype.indexOf;var qi=Y(Array.prototype.lastIndexOf),Ji=Y(Array.prototype.pop),Yi=Y(Array.prototype.push);Array.prototype.slice;var Xi=Y(Array.prototype.splice),Zi=Array.isArray,Qi=Y(String.prototype.toLowerCase),$i=Y(String.prototype.toString),ea=Y(String.prototype.match),ta=Y(String.prototype.replace),na=Y(String.prototype.indexOf),ra=Y(String.prototype.trim),ia=Y(Number.prototype.toString),aa=Y(Boolean.prototype.toString),oa=typeof BigInt>`u`?null:Y(BigInt.prototype.toString),sa=typeof Symbol>`u`?null:Y(Symbol.prototype.toString),ca=Y(Object.prototype.hasOwnProperty),la=Y(Object.prototype.toString),ua=Y(RegExp.prototype.test),da=fa(TypeError);function Y(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Wi(e,t,r)}}function fa(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return Gi(e,n)}}function X(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qi;if(Ii&&Ii(e,null),!Zi(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Li(t)||(t[r]=e),i=e)}e[i]=!0}return e}function pa(e){for(let t=0;t<e.length;t++)ca(e,t)||(e[t]=null);return e}function ma(e){let t=Hi(null);for(let r of Fi(e)){var n=Mi(r,2);let i=n[0],a=n[1];ca(e,i)&&(Zi(a)?t[i]=pa(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=ma(a):t[i]=a)}return t}function ha(e){switch(typeof e){case`string`:return e;case`number`:return ia(e);case`boolean`:return aa(e);case`bigint`:return oa?oa(e):`0`;case`symbol`:return sa?sa(e):`Symbol()`;case`undefined`:return la(e);case`function`:case`object`:{if(e===null)return la(e);let t=e,n=ga(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:la(e)}return la(e)}default:return la(e)}}function ga(e,t){for(;e!==null;){let n=zi(e,t);if(n){if(n.get)return Y(n.get);if(typeof n.value==`function`)return Y(n.value)}e=Ri(e)}function n(){return null}return n}function _a(e){try{return ua(e,``),!0}catch{return!1}}var va=Bi(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),ya=Bi(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),ba=Bi([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),xa=Bi([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Sa=Bi(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Ca=Bi([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),wa=Bi([`#text`]),Ta=Bi(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Ea=Bi(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Da=Bi(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Oa=Bi([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),ka=Vi(/{{[\w\W]*|^[\w\W]*}}/g),Aa=Vi(/<%[\w\W]*|^[\w\W]*%>/g),ja=Vi(/\${[\w\W]*/g),Ma=Vi(/^data-[\-\w.\u00B7-\uFFFF]+$/),Na=Vi(/^aria-[\-\w]+$/),Pa=Vi(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Fa=Vi(/^(?:\w+script|data):/i),Ia=Vi(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),La=Vi(/^html$/i),Ra=Vi(/^[a-z][.\w]*(-[.\w]+)+$/i),za=Vi(/<[/\w!]/g),Ba=Vi(/<[/\w]/g),Va=Vi(/<\/no(script|embed|frames)/i),Ha=Vi(/\/>/i),Ua={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Wa=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],Ga=Bi(X({},Wa)),Ka=function(){let e={};return Ki(Wa,t=>{e[t]=Vi(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),Bi(e)}(),qa=function(){return typeof window>`u`?null:window},Ja=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Ya=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Xa=function(e,t,n,r){return ca(e,t)&&Zi(e[t])?X(r.base?ma(r.base):{},e[t],r.transform):n},Za=function(e,t,n){let r=ca(e,t)?e[t]:void 0;return r&&typeof r==`object`?ma(r):n()};function Qa(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qa(),t=e=>Qa(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==Ua.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=ga(d,`cloneNode`),p=ga(d,`remove`),m=ga(d,`removeAttributeNode`),h=ga(d,`nextSibling`),g=ga(d,`childNodes`),_=ga(d,`parentNode`),v=ga(d,`shadowRoot`),y=ga(d,`attributes`),b=o&&o.prototype?ga(o.prototype,`nodeType`):null,x=o&&o.prototype?ga(o.prototype,`nodeName`):null,S=o&&o.prototype?ga(o.prototype,`ownerDocument`):null,C=function(e){return b?b(e):e.nodeType},w=function(e){return x?x(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let T,E=``,ee,te=!1,ne=0,re=function(){if(ne>0)throw da(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},ie=function(e){re(),ne++;try{return T.createHTML(e)}finally{ne--}},D=function(e){re(),ne++;try{return T.createScriptURL(e)}finally{ne--}},ae=function(){return te||=(ee=Ja(u,i),!0),ee},oe=n,se=oe.implementation,ce=oe.createNodeIterator,le=oe.createDocumentFragment,ue=oe.getElementsByTagName,de=r.importNode,O=Ya();t.isSupported=typeof Fi==`function`&&typeof _==`function`&&se&&se.createHTMLDocument!==void 0;let fe=ka,pe=Aa,me=ja,he=Ma,ge=Na,_e=Fa,ve=Ia,k=Ra,ye=Pa,A=null,j=X({},[...va,...ya,...ba,...Sa,...wa]),M=null,N=X({},[...Ta,...Ea,...Da,...Oa]),be=Object.seal(Hi(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),xe=null,Se=null,Ce=Object.seal(Hi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),we=!0,Te=!0,Ee=!1,De=!0,Oe=!1,ke=!0,Ae=!1,je=!1,Me=null,Ne=null,Pe=!1,Fe=!1,Ie=!1,Le=!1,Re=!0,P=!1,ze=`user-content-`,Be=!0,Ve=!1,He={},Ue=null,We=X({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ge=null,Ke=X({},[`audio`,`video`,`img`,`source`,`image`,`track`]),qe=null,Je=X({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),F=`http://www.w3.org/1998/Math/MathML`,Ye=`http://www.w3.org/2000/svg`,Xe=`http://www.w3.org/1999/xhtml`,Ze=Xe,Qe=!1,$e=null,et=X({},[F,Ye,Xe],$i),tt=Bi([`mi`,`mo`,`mn`,`ms`,`mtext`]),nt=X({},tt),rt=Bi([`annotation-xml`]),it=X({},rt),I=X({},[`title`,`style`,`font`,`a`,`script`]),at=null,ot=[`application/xhtml+xml`,`text/html`],L=null,st=null,ct=n.createElement(`form`),lt=function(e){return e instanceof RegExp||e instanceof Function},ut=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(st&&st===e)return;(!e||typeof e!=`object`)&&(e={}),e=ma(e),at=ot.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,L=at===`application/xhtml+xml`?$i:Qi,A=Xa(e,`ALLOWED_TAGS`,j,{transform:L}),M=Xa(e,`ALLOWED_ATTR`,N,{transform:L}),$e=Xa(e,`ALLOWED_NAMESPACES`,et,{transform:$i}),qe=Xa(e,`ADD_URI_SAFE_ATTR`,Je,{transform:L,base:Je}),Ge=Xa(e,`ADD_DATA_URI_TAGS`,Ke,{transform:L,base:Ke}),Ue=Xa(e,`FORBID_CONTENTS`,We,{transform:L}),xe=Xa(e,`FORBID_TAGS`,ma({}),{transform:L}),Se=Xa(e,`FORBID_ATTR`,ma({}),{transform:L}),He=ca(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?ma(e.USE_PROFILES):e.USE_PROFILES:!1,we=e.ALLOW_ARIA_ATTR!==!1,Te=e.ALLOW_DATA_ATTR!==!1,Ee=e.ALLOW_UNKNOWN_PROTOCOLS||!1,De=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Oe=e.SAFE_FOR_TEMPLATES||!1,ke=e.SAFE_FOR_XML!==!1,Ae=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Ie=e.RETURN_DOM_FRAGMENT||!1,Le=e.RETURN_TRUSTED_TYPE||!1,Pe=e.FORCE_BODY||!1,Re=e.SANITIZE_DOM!==!1,P=e.SANITIZE_NAMED_PROPS||!1,Be=e.KEEP_CONTENT!==!1,Ve=e.IN_PLACE||!1,ye=_a(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Pa,Ze=typeof e.NAMESPACE==`string`?e.NAMESPACE:Xe,nt=Za(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>X({},tt)),it=Za(e,`HTML_INTEGRATION_POINTS`,()=>X({},rt));let t=Za(e,`CUSTOM_ELEMENT_HANDLING`,()=>Hi(null));if(be=Hi(null),ca(t,`tagNameCheck`)&<(t.tagNameCheck)&&(be.tagNameCheck=t.tagNameCheck),ca(t,`attributeNameCheck`)&<(t.attributeNameCheck)&&(be.attributeNameCheck=t.attributeNameCheck),ca(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(be.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),Vi(be),Oe&&(Te=!1),Ie&&(Fe=!0),He&&(A=X({},wa),M=Hi(null),He.html===!0&&(X(A,va),X(M,Ta)),He.svg===!0&&(X(A,ya),X(M,Ea),X(M,Oa)),He.svgFilters===!0&&(X(A,ba),X(M,Ea),X(M,Oa)),He.mathMl===!0&&(X(A,Sa),X(M,Da),X(M,Oa))),Ce.tagCheck=null,Ce.attributeCheck=null,ca(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Ce.tagCheck=e.ADD_TAGS:Zi(e.ADD_TAGS)&&(A===j&&(A=ma(A)),X(A,e.ADD_TAGS,L))),ca(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Ce.attributeCheck=e.ADD_ATTR:Zi(e.ADD_ATTR)&&(M===N&&(M=ma(M)),X(M,e.ADD_ATTR,L))),ca(e,`ADD_FORBID_CONTENTS`)&&Zi(e.ADD_FORBID_CONTENTS)&&(Ue===We&&(Ue=ma(Ue)),X(Ue,e.ADD_FORBID_CONTENTS,L)),Be&&(A[`#text`]=!0),Ae&&X(A,[`html`,`head`,`body`]),A.table&&(X(A,[`tbody`]),delete xe.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw da(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw da(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=T;T=e.TRUSTED_TYPES_POLICY;try{E=ie(``)}catch(e){throw T=t,e}}else e.TRUSTED_TYPES_POLICY===null?(T=void 0,E=``):(T===void 0&&(T=ae()),T&&typeof E==`string`&&(E=ie(``)));Bi&&Bi(e),st=e},R=X({},[...ya,...ba,...xa]),dt=X({},[...Sa,...Ca]),ft=function(e,t,n){return t.namespaceURI===Xe?e===`svg`:t.namespaceURI===F?e===`svg`&&(n===`annotation-xml`||nt[n]):!!R[e]},pt=function(e,t,n){return t.namespaceURI===Xe?e===`math`:t.namespaceURI===Ye?e===`math`&&it[n]:!!dt[e]},mt=function(e,t,n){return t.namespaceURI===Ye&&!it[n]||t.namespaceURI===F&&!nt[n]?!1:!dt[e]&&(I[e]||!R[e])},ht=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:Ze,tagName:`template`});let n=Qi(e.tagName),r=Qi(t.tagName);return $e[e.namespaceURI]?e.namespaceURI===Ye?ft(n,t,r):e.namespaceURI===F?pt(n,t,r):e.namespaceURI===Xe?mt(n,t,r):!!(at===`application/xhtml+xml`&&$e[e.namespaceURI]):!1},gt=function(e){Yi(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw da(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},_t=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},vt=function(e){z(e);let t=g(e);if(t){let e=[];Ki(t,t=>{Yi(e,t)}),Ki(e,e=>{try{p(e)}catch{}})}let n=y(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&_t(e,r,i)}},yt=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}Yi(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`)if(Fe||Ie)try{gt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},bt=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||M[L(i)]||_t(e,r,i)}},z=function(e){let t=[e];for(;t.length>0;){let e=t.pop();C(e)===Ua.element&&bt(e);let n=g(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},xt=function(e,t){return ke?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},St=function(e){if(!ke)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=C(e);if(n===Ua.processingInstruction||n===Ua.comment&&ua(Ba,e.data)){try{p(e)}catch{}continue}if(n===Ua.element){let t=e,n=L(w(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&xt(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=g(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},Ct=function(e){let t=null,r=null;if(Pe)e=`<remove></remove>`+e;else{let t=ea(e,/^[\r\n\t ]+/);r=t&&t[0]}at===`application/xhtml+xml`&&Ze===Xe&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=T?ie(e):e;if(Ze===Xe)try{t=new l().parseFromString(i,at)}catch{}if(!t||!t.documentElement){t=se.createDocument(Ze,`template`,null);try{t.documentElement.innerHTML=Qe?E:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ze===Xe?ue.call(t,Ae?`html`:`body`)[0]:Ae?t.documentElement:a},wt=function(e){let t=S?S(e):e.ownerDocument;return ce.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Tt=function(e){return e=ta(e,fe,` `),e=ta(e,pe,` `),e=ta(e,me,` `),e},Et=function(e){e.normalize();let t=S?S(e):e.ownerDocument,n=ce.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=Tt(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&Ki(i,e=>{Ot(e.content)&&Et(e.content)})},Dt=function(e){let t=x?x(e):null;return typeof t!=`string`||L(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==b(e)||e.childNodes!==g(e)},Ot=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return b(e)===Ua.documentFragment}catch{return!1}},kt=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return typeof b(e)==`number`}catch{return!1}};function B(e,n,r){e.length!==0&&Ki(e,e=>{e.call(t,n,r,st)})}let At=function(e,t){return!!(ke&&e.hasChildNodes()&&!kt(e.firstElementChild)&&ua(za,e.textContent)&&ua(za,e.innerHTML)||ke&&e.namespaceURI===Xe&&Ga[t]&&(kt(e.firstElementChild)||typeof e.textContent==`string`&&ua(Ka[t],e.textContent))||e.nodeType===Ua.processingInstruction||ke&&e.nodeType===Ua.comment&&ua(Ba,e.data))},jt=function(e,t){if(e instanceof RegExp)return ua(e,t);if(e instanceof Function){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return!!e(t,...r)}return!1},Mt=function(e,t,n){if(!xe[t]&&Lt(t)&&jt(be.tagNameCheck,t))return!1;if(Be&&!Ue[t]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return gt(e),!0},Nt=function(e,t,n,r){return e.length===0?t:t===n||t===r?ma(t):t},V=function(e,t){return e===t||_(e)!==null?!1:(Ve&&z(e),!0)},Pt=function(e,n){if(B(O.beforeSanitizeElements,e,null),V(e,n))return!0;if(Dt(e))return gt(e),!0;let r=L(w(e));if(A=Nt(O.uponSanitizeElement,A,j,Me),B(O.uponSanitizeElement,e,{tagName:r,allowedTags:A}),V(e,n))return!0;if(At(e,r))return gt(e),!0;if(xe[r]||!(Ce.tagCheck instanceof Function&&Ce.tagCheck(r))&&!A[r]){let t=Mt(e,r,n);return t===!1&&(B(O.afterSanitizeElements,e,null),V(e,n))?!0:t}if(C(e)===Ua.element&&!ht(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&ua(Va,e.innerHTML))return gt(e),!0;if(Oe&&e.nodeType===Ua.text){let n=Tt(e.textContent);e.textContent!==n&&(Yi(t.removed,{element:e.cloneNode()}),e.textContent=n)}return B(O.afterSanitizeElements,e,null),V(e,n)},Ft=function(e,t,r){if(Se[t]||xt(t,e)||Re&&(t===`id`||t===`name`)&&(r in n||r in ct))return!1;let i=M[t]||Ce.attributeCheck instanceof Function&&Ce.attributeCheck(t,e);return Te&&ua(he,t)||we&&ua(ge,t)?!0:i?qe[t]||ua(ye,ta(r,ve,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&na(r,`data:`)===0&&Ge[e]||Ee&&!ua(_e,ta(r,ve,``))?!0:!r:Lt(e)&&jt(be.tagNameCheck,e)&&jt(be.attributeNameCheck,t,e)||t===`is`&&be.allowCustomizedBuiltInElements&&jt(be.tagNameCheck,r)},It=X({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Lt=function(e){return!It[Qi(e)]&&ua(k,e)},Rt=function(e,t,n,r){if(T&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return ie(r);case`TrustedScriptURL`:return D(r)}return r},zt=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),Dt(e)?(gt(e),!1):!0}catch{return yt(t,e),!1}},Bt=function(e,n){if(B(O.beforeSanitizeAttributes,e,null),V(e,n))return;let r=e.attributes;if(!r||Dt(e))return;M=Nt(O.uponSanitizeAttribute,M,N,Ne);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:M,forceKeepAttr:void 0},a=r.length,o=L(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=L(s),d=l,f=s===`value`?d:ra(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,B(O.uponSanitizeAttribute,e,i),f=i.attrValue,P&&(u===`id`||u===`name`)&&na(f,ze)!==0&&(yt(s,e,n),f=ze+f,p=!0),ke&&ua(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){yt(s,e,n);continue}if(u===`attributename`&&ea(f,`href`)){yt(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){yt(s,e,n);continue}if(!De&&ua(Ha,f)){yt(s,e,n);continue}if(Oe&&(f=Tt(f)),!Ft(o,u,f)){yt(s,e,n);continue}f=Rt(o,u,c,f),f!==d&&zt(e,s,c,f)&&p&&Ji(t.removed)}}B(O.afterSanitizeAttributes,e,null),V(e,n)},Vt=function(e){let t=null,n=wt(e);for(B(O.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(B(O.uponSanitizeShadowNode,t,null),Pt(t,e),Bt(t,e),Ot(t.content)&&Vt(t.content),C(t)===Ua.element){let e=v(t);Ot(e)&&(Ht(e),Vt(e))}B(O.afterSanitizeShadowDOM,e,null)},Ht=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Vt(e.shadow);continue}let n=e.node,r=C(n)===Ua.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=x?x(n):null;if(typeof e==`string`&&L(e)===`template`){let e=n.content;Ot(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);Ot(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Qe=!e,Qe&&(e=`<!-->`),typeof e!=`string`&&!kt(e)&&(e=ha(e),typeof e!=`string`))throw da(`dirty is not a string, aborting`);if(!t.isSupported)return e;je?(A=Me,M=Ne):ut(n),(O.uponSanitizeElement.length>0||O.uponSanitizeAttribute.length>0)&&(A=ma(A)),O.uponSanitizeAttribute.length>0&&(M=ma(M)),t.removed=[];let c=Ve&&typeof e!=`string`&&kt(e);if(c){St(e);let t=w(e);if(typeof t==`string`){let n=L(t);if(!A[n]||xe[n])throw vt(e),da(`root node is forbidden and cannot be sanitized in-place`)}if(Dt(e))throw vt(e),da(`root node is clobbered and cannot be sanitized in-place`);try{Ht(e)}catch(t){throw vt(e),t}}else if(kt(e))i=Ct(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===Ua.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Ht(i);else{if(!Fe&&!Oe&&!Ae&&e.indexOf(`<`)===-1)return T&&Le?ie(e):e;if(i=Ct(e),!i)return Fe?null:Le?E:``}i&&Pe&>(i.firstChild);let l=c?e:i;try{let e=wt(l);for(;o=e.nextNode();)Pt(o,l),Bt(o,l),Ot(o.content)&&Vt(o.content)}catch(n){throw c&&(vt(e),Ki(t.removed,e=>{e.element&&z(e.element)})),n}if(c){let n=!1;if(Ki(t.removed,t=>{t.element&&(t.element===e&&(n=!0),z(t.element))}),n)throw da(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return Oe&&Et(e),e}if(Fe){if(Oe&&Et(i),Ie)for(s=le.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(M.shadowroot||M.shadowrootmode)&&(s=de.call(r,s,!0)),s}let u=Ae?i.outerHTML:i.innerHTML;return Ae&&A[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&ua(La,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
5
|
+
`+u),Oe&&(u=Tt(u)),T&&Le?ie(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ut(e),je=!0,Me=A,Ne=M},t.clearConfig=function(){st=null,je=!1,Me=null,Ne=null,T=ee,E=``},t.isValidAttribute=function(e,t,n){st||ut({});let r=L(e),i=L(t);return Ft(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&ca(O,e)&&Yi(O[e],t)},t.removeHook=function(e,t){if(ca(O,e)){if(t!==void 0){let n=qi(O[e],t);return n===-1?void 0:Xi(O[e],n,1)[0]}return Ji(O[e])}},t.removeHooks=function(e){ca(O,e)&&(O[e]=[])},t.removeAllHooks=function(){O=Ya()},t}var $a=Qa(),eo=`data-pie-authored-ink`,to=`data-pie-authored-fill`,no=`data-pie-authored-border`,ro=[`border-top-color`,`border-right-color`,`border-bottom-color`,`border-left-color`],io=new Set([`currentcolor`,`inherit`,`initial`,`unset`,`revert`,`revert-layer`,`transparent`]);function ao(e){let t=e?.trim().toLowerCase();return!t||io.has(t)||t.includes(`var(`)?!1:lo(t)?.a!==0}function oo(e){let t=lo(e);if(!t)return`shade`;let n=e=>(e*t.a+255*(1-t.a))/255,[r,i,a]=[n(t.r),n(t.g),n(t.b)],o=.2126*Ao(r)+.7152*Ao(i)+.0722*Ao(a),s=Math.max(r,i,a)-Math.min(r,i,a);return o>=.85&&s<=.08?`light`:`shade`}function so(e){e.removeAttribute(eo),e.removeAttribute(to),e.removeAttribute(no);let t=e.hasAttribute(`style`)?e.style:void 0,n=e=>t?.getPropertyValue(e).trim()??``,r=[],i=n(`color`),a=e.localName===`font`?e.getAttribute(`color`):null;ao(i||a)&&(e.setAttribute(`data-pie-authored-ink`,``),i&&r.push(`color`));let o=n(`background-color`),s=o||co(e.getAttribute(`bgcolor`));ao(s)&&(e.setAttribute(`data-pie-authored-fill`,oo(s)),o&&r.push(`background-color`));let c=ro.filter(e=>ao(n(e)));c.length&&(e.setAttribute(`data-pie-authored-border`,``),r.push(...c));for(let e of r)t?.getPropertyPriority(e)===`important`&&t.setProperty(e,t.getPropertyValue(e))}function co(e){let t=e?.trim()??``;return/^(?:[\da-f]{3}|[\da-f]{6})$/i.test(t)?`#${t}`:t}function lo(e){let t=e.trim().toLowerCase();if(t===`transparent`)return{r:0,g:0,b:0,a:0};let n=fo().get(t);if(n)return po(n);if(t.startsWith(`#`))return po(t.slice(1));let r=/^([a-z]+)\(([^()]*)\)$/.exec(t);if(!r)return null;let i=r[2].trim().split(/\s*[\s,/]\s*/);if(i.length!==3&&i.length!==4)return null;let[a,o,s,c]=i,l=_o(c),u;switch(r[1]){case`rgb`:case`rgba`:u=[a,o,s].map(e=>ho(e,255)/255);break;case`hsl`:case`hsla`:u=yo(go(a),ho(o,100)/100,ho(s,100)/100);break;case`hwb`:u=bo(go(a),ho(o,100)/100,ho(s,100)/100);break;case`lab`:u=Eo(ho(a,100),ho(o,125),ho(s,125));break;case`lch`:u=Eo(ho(a,100),...vo(ho(o,150),go(s)));break;case`oklab`:u=Do(ho(a,1),ho(o,.4),ho(s,.4));break;case`oklch`:u=Do(ho(a,1),...vo(ho(o,.4),go(s)));break;default:return null}if(Number.isNaN(l)||u.some(Number.isNaN))return null;let[d,f,p]=u.map(e=>jo(e,0,1)*255);return{r:d,g:f,b:p,a:l}}var uo;function fo(){return uo??=new Map(`aliceblue:f0f8ff antiquewhite:faebd7 aqua:00ffff aquamarine:7fffd4 azure:f0ffff beige:f5f5dc bisque:ffe4c4 black:000000 blanchedalmond:ffebcd blue:0000ff blueviolet:8a2be2 brown:a52a2a burlywood:deb887 cadetblue:5f9ea0 chartreuse:7fff00 chocolate:d2691e coral:ff7f50 cornflowerblue:6495ed cornsilk:fff8dc crimson:dc143c cyan:00ffff darkblue:00008b darkcyan:008b8b darkgoldenrod:b8860b darkgray:a9a9a9 darkgreen:006400 darkgrey:a9a9a9 darkkhaki:bdb76b darkmagenta:8b008b darkolivegreen:556b2f darkorange:ff8c00 darkorchid:9932cc darkred:8b0000 darksalmon:e9967a darkseagreen:8fbc8f darkslateblue:483d8b darkslategray:2f4f4f darkslategrey:2f4f4f darkturquoise:00ced1 darkviolet:9400d3 deeppink:ff1493 deepskyblue:00bfff dimgray:696969 dimgrey:696969 dodgerblue:1e90ff firebrick:b22222 floralwhite:fffaf0 forestgreen:228b22 fuchsia:ff00ff gainsboro:dcdcdc ghostwhite:f8f8ff gold:ffd700 goldenrod:daa520 gray:808080 green:008000 greenyellow:adff2f grey:808080 honeydew:f0fff0 hotpink:ff69b4 indianred:cd5c5c indigo:4b0082 ivory:fffff0 khaki:f0e68c lavender:e6e6fa lavenderblush:fff0f5 lawngreen:7cfc00 lemonchiffon:fffacd lightblue:add8e6 lightcoral:f08080 lightcyan:e0ffff lightgoldenrodyellow:fafad2 lightgray:d3d3d3 lightgreen:90ee90 lightgrey:d3d3d3 lightpink:ffb6c1 lightsalmon:ffa07a lightseagreen:20b2aa lightskyblue:87cefa lightslategray:778899 lightslategrey:778899 lightsteelblue:b0c4de lightyellow:ffffe0 lime:00ff00 limegreen:32cd32 linen:faf0e6 magenta:ff00ff maroon:800000 mediumaquamarine:66cdaa mediumblue:0000cd mediumorchid:ba55d3 mediumpurple:9370db mediumseagreen:3cb371 mediumslateblue:7b68ee mediumspringgreen:00fa9a mediumturquoise:48d1cc mediumvioletred:c71585 midnightblue:191970 mintcream:f5fffa mistyrose:ffe4e1 moccasin:ffe4b5 navajowhite:ffdead navy:000080 oldlace:fdf5e6 olive:808000 olivedrab:6b8e23 orange:ffa500 orangered:ff4500 orchid:da70d6 palegoldenrod:eee8aa palegreen:98fb98 paleturquoise:afeeee palevioletred:db7093 papayawhip:ffefd5 peachpuff:ffdab9 peru:cd853f pink:ffc0cb plum:dda0dd powderblue:b0e0e6 purple:800080 rebeccapurple:663399 red:ff0000 rosybrown:bc8f8f royalblue:4169e1 saddlebrown:8b4513 salmon:fa8072 sandybrown:f4a460 seagreen:2e8b57 seashell:fff5ee sienna:a0522d silver:c0c0c0 skyblue:87ceeb slateblue:6a5acd slategray:708090 slategrey:708090 snow:fffafa springgreen:00ff7f steelblue:4682b4 tan:d2b48c teal:008080 thistle:d8bfd8 tomato:ff6347 turquoise:40e0d0 violet:ee82ee wheat:f5deb3 white:ffffff whitesmoke:f5f5f5 yellow:ffff00 yellowgreen:9acd32`.split(` `).map(e=>e.split(`:`))),uo}function po(e){if(!/^(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/.test(e))return null;let[t,n,r,i=255]=(e.length<=4?[...e].map(e=>e+e):e.match(/../g)??[]).map(e=>Number.parseInt(e,16));return{r:t,g:n,b:r,a:i/255}}var mo=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(%|deg|rad|grad|turn)?$/;function ho(e,t){if(e===`none`)return 0;let n=mo.exec(e);return!n||n[2]&&n[2]!==`%`?NaN:n[2]?Number(n[1])/100*t:Number(n[1])}function go(e){if(e===`none`)return 0;let t=mo.exec(e);if(!t||t[2]===`%`)return NaN;let n=Number(t[1]);return((t[2]===`rad`?n*180/Math.PI:t[2]===`grad`?n*.9:t[2]===`turn`?n*360:n)%360+360)%360}function _o(e){return e===void 0?1:jo(ho(e,1),0,1)}function vo(e,t){let n=Math.max(0,e),r=t*Math.PI/180;return[n*Math.cos(r),n*Math.sin(r)]}function yo(e,t,n){let r=jo(t,0,1),i=jo(n,0,1),a=t=>{let n=(t+e/30)%12,a=r*Math.min(i,1-i);return i-a*Math.max(-1,Math.min(n-3,9-n,1))};return[a(0),a(8),a(4)]}function bo(e,t,n){let r=jo(t,0,1),i=jo(n,0,1);return r+i>=1?[,,,].fill(r/(r+i)):yo(e,1,.5).map(e=>e*(1-r-i)+r)}var xo=24389/27,So=216/24389,Co=[.3457/.3585,1,.2958/.3585],wo=[[.955473421488075,-.02309845494876471,.06325924320057072],[-.0283697093338637,1.0099953980813041,.021041441191917323],[.012314014864481998,-.020507649298898964,1.330365926242124]],To=[[12831/3959,-329/214,-1974/3959],[-851781/878810,1648619/878810,36519/878810],[705/12673,-2585/12673,705/667]];function Eo(e,t,n){let r=jo(e,0,100),i=(r+16)/116,a=t/500+i,o=i-n/200;return Oo(To,Oo(wo,[a**3>So?a**3:(116*a-16)/xo,r>xo*So?i**3:r/xo,o**3>So?o**3:(116*o-16)/xo].map((e,t)=>e*Co[t]))).map(ko)}function Do(e,t,n){let r=jo(e,0,1);return Oo([[4.0767416621,-3.3077115913,.2309699292],[-1.2684380046,2.6097574011,-.3413193965],[-.0041960863,-.7034186147,1.707614701]],[r+.3963377774*t+.2158037573*n,r-.1055613458*t-.0638541728*n,r-.0894841775*t-1.291485548*n].map(e=>e**3)).map(ko)}function Oo(e,t){return e.map(e=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2])}function ko(e){let t=jo(e,0,1);return t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055}function Ao(e){return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function jo(e,t,n){return Math.min(n,Math.max(t,e))}var Mo=[`script`,`embed`,`base`,`form`,`meta`,`link`,`style`,`foreignobject`],No=[`onerror`,`onload`,`onclick`,`onmouseover`,`onmouseout`,`onmouseenter`,`onmouseleave`,`onfocus`,`onblur`,`onkeydown`,`onkeyup`,`onkeypress`,`onsubmit`,`onchange`,`onbeforeunload`,`formaction`,`xlink:href`],Po=new Set([`iframe`,`object`,`mstack`,`mlongdiv`,`msgroup`,`msrow`,`msline`,`mscarries`,`mscarry`,`semantics`,`annotation`,`none`]),Fo=/^[a-z_][\w.-]*:[a-z][\w.-]*$/,Io=[`alignment`,`target`,`allow`,`allowfullscreen`,`frameborder`,`scrolling`,`data`,`stackalign`,`charalign`,`charspacing`,`longdivstyle`,`position`,`shift`,`location`,`crossout`,`leftoverhang`,`rightoverhang`,`mslinethickness`,`linebreak`],Lo=/^\s*document\.getElementById\((['"])([^'"]+)\1\)\.play\(\)\s*;?\s*(?:return\s+false\s*;?\s*)?$/,Ro=`data-pie-play-audio`,zo={ADD_TAGS:e=>Po.has(e)||Fo.test(e),ADD_ATTR:Io,FORBID_TAGS:Mo,FORBID_ATTR:No,ALLOW_UNKNOWN_PROTOCOLS:!1,RETURN_TRUSTED_TYPE:!1},Bo=!1;function Vo(e){for(let t of e.composedPath()){if(!(t instanceof Element))continue;let n=t.getAttribute(Ro);if(n===null)continue;e.preventDefault();let r=t.getRootNode().getElementById?.(n)??document.getElementById(n);r instanceof HTMLMediaElement&&r.play()?.catch(()=>void 0);return}}var Ho=null;function Uo(){return Ho||(Ho=$a(window),Ho.addHook(`beforeSanitizeAttributes`,e=>{if(e.nodeName!==`A`)return;let t=Lo.exec(e.getAttribute(`onclick`)??``)?.[2];t!==void 0&&(e.removeAttribute(`onclick`),e.setAttribute(`data-pie-play-audio`,t),Bo||=(document.addEventListener(`click`,Vo),!0))}),Ho.addHook(`afterSanitizeAttributes`,so),Ho)}var Wo=1e6,Go=new Map,Ko=0;function qo(e){if(e==null||e===``||!$a.isSupported)return``;let t=typeof e==`string`?e:String(e),n=Go.get(t);if(n!==void 0)return n;let r=String(Uo().sanitize(t,zo)),i=t.length+r.length;if(i>Wo)return r;for(let[e,t]of Go){if(Ko+i<=Wo)break;Go.delete(e),Ko-=e.length+t.length}return Go.set(t,r),Ko+=i,r}var Jo=`4.1.3`,Yo=`https://github.com/pie-framework/pie-elements-ng/blob/develop/docs/MATH-RENDERING.md#assets`,Xo=`@pie-lib/math-rendering@2`,Zo=[`nemeth`,`euro`],Qo=`mathjax@${Jo}/sre`,$o=/^[^@]+@[^@]+$/;function es(e){if(!e)return;let t;try{t=new URL(e)}catch{return}if(t.origin===`null`)return;let n=t.pathname.split(`/`);for(let e=n.length-1;e>0;e--){let r=n[e];if(r===`node_modules`)return;if(!$o.test(r))continue;let i=n[e-1]?.startsWith(`@`)?e-1:e;return t.origin+n.slice(0,i).join(`/`)}}function ts(){let e=globalThis[Xo]?.opts;return e&&typeof e==`object`?e:{}}function ns(e){if(typeof e!=`string`||!e)return;let t=typeof document>`u`?void 0:document.baseURI;try{return new URL(e,t).href.replace(/\/+$/,``)}catch{return}}function rs(e){if(!e||typeof e!=`object`)return;let t=new Map;for(let[n,r]of Object.entries(e)){let e=ns(r);e&&t.set(n,e)}return t.size?t:void 0}function is(e){if(Array.isArray(e))return new Map(e.filter(e=>typeof e==`string`).map(e=>[e,void 0]));if(e&&typeof e==`object`)return new Map(Object.entries(e).map(([e,t])=>[e,typeof t==`string`?t:void 0]))}function as(e,t){let n=ts(),r=ns(e.assetRoot??n.assetRoot)??es(t);return{root:r,speechPath:ns(e.speechPath??n.speechPath)??(r?`${r}/${Qo}`:void 0),speechLocales:is(e.speechLocales??n.speechLocales),urls:rs(e.assetUrls??n.assetUrls)}}function os(e,t){if(!(!e||!t)){for(let n of[...e.keys()])!t.has(n)&&!Zo.includes(n)&&e.delete(n);for(let[n,r]of t)(r||!e.has(n))&&e.set(n,r??n)}}function ss(e){if(!(!e||e.has(`en`)))return[...e.keys()].find(e=>!Zo.includes(e))}var cs={untypeset:`no MathJax loads, so math stays untypeset`,"no-web-fonts":`math renders without web fonts`,"no-web-fonts-or-speech":`math renders without web fonts and speech`},ls=Symbol.for(`@pie-element/shared-math-rendering-mathjax/no-assets`);function us(e){let t=globalThis;t[ls]??=[];let n=t[ls];if(n.includes(e))return;n.push(e);let r=`[math-rendering] No asset root for MathJax: ${cs[e]}. Set window['${Xo}'].opts.assetRoot to an npm root. See ${Yo}`;e===`untypeset`?console.error(r):console.warn(r),!(typeof window>`u`)&&window.dispatchEvent(new CustomEvent(`pie-mathjax-no-asset-root`,{detail:{effect:e,message:r,docsUrl:Yo}}))}var ds=`https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page`,fs=`pie-mathjax-version-conflict`,ps=Symbol.for(`@pie-element/shared-math-rendering-mathjax/unsupported-page`);function ms(e,t){if(typeof window>`u`)return;let n=globalThis;n[ps]??={logged:!1,conditions:[]};let r=n[ps];if(r.conditions.includes(e))return;r.conditions.push(e);let i=`[math-rendering] Unsupported page (${e}): ${t}. PIE supports one MathJax major version per page; with MathJax 3 and 4 on one page, math rendering is best effort and may break. See ${ds}`;r.logged||(r.logged=!0,console.error(i)),window.dispatchEvent(new CustomEvent(fs,{detail:{condition:e,message:i,docsUrl:ds}}))}function hs(){let e=window.MathJax?.version;return typeof e==`string`&&e.startsWith(`3.`)?e:void 0}function gs(){return window.MathJax}function _s(e,{root:t,speechPath:n}){t&&(e.loader={...e.loader,paths:{fonts:`${t}/@mathjax`,"mathjax-newcm":`${t}/@mathjax/mathjax-newcm-font@${Jo}`,"mathjax-mhchem-extension":`${t}/@mathjax/mathjax-mhchem-font-extension@${Jo}`}}),n&&(e.options={...e.options,worker:{path:n,maps:`${n}/mathmaps`}})}function vs(e,t){let n=t.srcUrl||(t.root?`${t.root}/mathjax@4.1.3/tex-mml-chtml.js`:void 0);return n?(_s(e,t),new Promise((t,r)=>{window.MathJax=e;let i=document.createElement(`script`);i.src=n,i.async=!0,i.onload=()=>t(!0),i.onerror=()=>r(Error(`Failed to load MathJax`)),document.head.appendChild(i)})):(us(`untypeset`),Promise.resolve(!1))}var ys=globalThis,bs=`PIE-MJX-CHTML-styles`,xs=[`MJX-CHTML-styles`,`MJX-SVG-styles`],Ss=hs,Cs=`http://www.w3.org/1998/Math/MathML`,ws=/^([a-z_][\w.-]*):math$/,Ts=/^[a-z][a-z0-9-]*$/;function Es(e){for(let t of e.querySelectorAll(`*`)){let n=ws.exec(t.tagName.toLowerCase())?.[1];!n||!e.contains(t)||t.closest(`mjx-container`)||t.replaceWith(Ds(t,`${n}:`))}}function Ds(e,t){let n=e.tagName.toLowerCase().slice(t.length);if(!Ts.test(n))return e;let r=e.ownerDocument.createElementNS(Cs,n);for(let t of e.attributes)r.setAttribute(t.name,t.value);for(let n of[...e.childNodes]){let e=n instanceof Element&&n.tagName.toLowerCase().startsWith(t);r.appendChild(e?Ds(n,t):n)}return r}var Os=new Set([`updiagonalstrike`,`downdiagonalstrike`,`verticalstrike`,`horizontalstrike`]),ks={thin:`0.035em`,medium:`0.07em`,thick:`0.14em`},As={tight:`0em`,medium:`0.1em`,loose:`0.2em`},js=/^(\d+(\.\d*)?|\.\d+)(em|ex|px|pt|pc|in|cm|mm)$/,Ms=/^(#[0-9a-f]{3,8}|[a-z]+)$/i,Ns=/^(\d+(\.\d*)?|\.\d+)$/,Ps=new Set([`mn`,`mo`,`mi`,`mtext`]),Fs=new Set([`stackalign`,`charalign`,`charspacing`,`longdivstyle`]);function Is(e,t,n=[],r={}){let i=e.createElementNS(Cs,t);for(let[e,t]of Object.entries(r))i.setAttribute(e,t);for(let e of n)e&&i.appendChild(e);return i}function Ls(e,t){let n=Is(e.document,`mo`);return n.textContent=t,n}function Rs(e){let t=Is(e.document,`mn`);return t.textContent=`0`,Is(e.document,`mphantom`,[t])}function zs(e,t){return e.getAttribute(t)?.trim().toLowerCase()||void 0}function Bs(e,t){let n=Number.parseInt(e.getAttribute(t)??``,10);return Number.isFinite(n)?n:0}function Vs(e){return e.localName===`none`||e.localName===`mrow`&&e.children.length===0&&!e.textContent?.trim()}function Hs(e,t,n=e){switch(t){case`left`:return 0;case`center`:return Math.floor(e/2);case`right`:return e;default:return n}}function Us(e,t,n){let r=[],i,a,o=(e,t)=>{let s=e=>t.reduceRight((e,t)=>{let n=t.cloneNode(!1);return n.appendChild(e),n},e);if(e.localName===`mstyle`)for(let n of[...e.children])o(n,[...t,e]);else if(Vs(e))r.push(null);else if(e.localName===`mn`&&e.children.length===0){let t=[...(e.textContent??``).trim()];for(let a of t){a===n.decimalPoint&&(i??=r.length);let t=e.cloneNode(!1);t.textContent=a,r.push(s(t))}t.length&&(a??=r.length)}else Ps.has(e.localName)&&e.textContent?.trim()===n.decimalPoint&&(i??=r.length),r.push(s(e))};for(let t of e)o(t,[]);return{kind:`digits`,cells:r,anchor:Hs(r.length,n.stackAlign,i??a),position:t}}function Ws(e){return(e??``).toLowerCase().split(/\s+/).filter(e=>Os.has(e))}function Gs(e,t){let n=[...e.children].filter(e=>!Vs(e));return n.length<=1?n[0]??null:Is(t.document,`mrow`,n)}function Ks(e,t,n){let r=zs(e,`location`)??`n`,i=Ws(e.getAttribute(`crossout`)),a=[...e.children].map(e=>Vs(e)?null:e.localName===`mscarry`?{content:Gs(e,n),location:zs(e,`location`)??r,crossout:e.hasAttribute(`crossout`)?Ws(e.getAttribute(`crossout`)):i}:{content:e,location:r,crossout:i}),o=e.getAttribute(`scriptsizemultiplier`)?.trim()??``;return{kind:`carries`,carries:a,anchor:Hs(a.length,n.stackAlign),position:t,scale:Ns.test(o)?o:`0.6`}}function qs(e){let t=zs(e,`mslinethickness`)??`medium`,n=ks[t]??(js.test(t)?t:`0.07em`),r=e.getAttribute(`mathcolor`)?.trim()??``;return`${n} solid ${Ms.test(r)?r:`currentColor`}`}function Js(e,t,n){let r=Math.max(0,Bs(e,`length`));return{kind:`line`,length:r,anchor:Hs(r,n.stackAlign),position:t,border:qs(e)}}function Ys(e,t,n,r,i){e.forEach((e,a)=>{let o=t+a*n+Bs(e,`position`);switch(e.localName){case`msgroup`:Ys([...e.children],o,Bs(e,`shift`),r,i);break;case`msline`:i.push(Js(e,o,r));break;case`mscarries`:i.push(Ks(e,o,r));break;case`msrow`:case`mrow`:i.push(Us([...e.children],o,r));break;default:i.push(Us([e],o,r))}})}function Xs(e){return-e.anchor-e.position}function Zs(e){return e.kind===`digits`?e.cells.length:e.kind===`carries`?e.carries.length:e.length}function Qs(e){return Xs(e)+Zs(e)-1}function $s(e,t,n,r){let i=e=>Is(r.document,`mpadded`,[t],{width:`0`,...e?{lspace:e}:{}}),a=(e,t)=>Is(r.document,e,t);switch(n){case`s`:return a(`munder`,[e,i(`-0.5width`)]);case`ne`:return a(`msup`,[e,i()]);case`se`:return a(`msub`,[e,i()]);case`nw`:return a(`mmultiscripts`,[e,a(`mprescripts`,[]),a(`none`,[]),i(`-1width`)]);case`sw`:return a(`mmultiscripts`,[e,a(`mprescripts`,[]),i(`-1width`),a(`none`,[])]);case`w`:return t.setAttribute(`scriptlevel`,`+1`),a(`mrow`,[i(`-1width`),e]);case`e`:return t.setAttribute(`scriptlevel`,`+1`),a(`mrow`,[e,i()]);default:return a(`mover`,[e,i(`-0.5width`)])}}function ec(e,t,n){let r=Is(n.document,`menclose`,[e],{notation:t.join(` `),"data-padding":`0.1em`,"data-thickness":`0.067em`}),i=t.some(e=>e.endsWith(`diagonalstrike`))?.167:t.includes(`horizontalstrike`)?.1:0;return i?Is(n.document,`mpadded`,[r],{lspace:`-${i}em`,width:`-${2*i}em`}):r}function tc(e,t,n,r,i){let a=e&&t.crossout.length?ec(e,t.crossout,i):e;if(!t.content)return a;let o=Is(i.document,`mstyle`,[t.content],{scriptsizemultiplier:r});return $s(a??Rs(i),o,n,i)}function nc(e,t){return e.carries[t-Xs(e)]??null}function rc(e,t,n,r){let i=e.content;n.forEach((e,a)=>{let o=n.length-1-a,s=n[o],c=nc(s,t),l=n.slice(0,o).some(e=>nc(e,t));if(!c&&!l)return;let u=c??{content:Rs(r),location:`n`,crossout:[]},d=a===0?u.location:`n`;i=tc(i,u,d,s.scale,r)}),e.content=i}function ic(e,t){let n=e.filter(e=>Zs(e)>0),r=Math.min(0,...n.map(Xs)),i=Math.max(r,...n.map(Qs))-r+1,a=-r,o=[],s=new Map,c=()=>Array.from({length:i},()=>({content:null,borders:{}})),l=e=>e.length===0?Array.from({length:i},(e,t)=>t):Array.from({length:e.length},(t,n)=>a+Xs(e)+n),u=[],d=[],f=e=>{let n=c();e.cells.forEach((t,r)=>{n[a+Xs(e)+r].content=t}),u.length&&n.forEach((e,n)=>{rc(e,n-a,u,t)});for(let e of d)for(let t of l(e))n[t].borders.top=e.border;u=[],d=[],s.set(e,o.length),o.push(n)};for(let t of e)t.kind===`digits`?f(t):t.kind===`carries`?u.push(t):d.push(t);(u.length||!o.length)&&f({kind:`digits`,cells:[],anchor:0,position:0});let p=o[o.length-1];for(let e of d)for(let t of l(e))p[t].borders.bottom=e.border;return{rows:o,rowOf:s,origin:a}}function ac(e,{rows:t},n){let r=Is(n.document,`mtable`,t.map(e=>Is(n.document,`mtr`,e.map(e=>{let t=Object.entries(e.borders).map(([e,t])=>`border-${e}:${t}`).join(`;`);return Is(n.document,`mtd`,[e.content],{...t?{style:t}:{},...e.align?{columnalign:e.align}:{}})}))));for(let{name:t,value:n}of[...e.attributes])Fs.has(t)||r.setAttribute(t,n);let i=zs(e,`charspacing`)??`medium`,a=zs(e,`charalign`);return r.setAttribute(`columnspacing`,As[i]??(js.test(i)?i:As.medium)),r.setAttribute(`columnalign`,a===`left`||a===`center`?a:`right`),r.setAttribute(`rowspacing`,`0`),r.setAttribute(`align`,e.getAttribute(`align`)??`baseline`),r}function oc(e){return{document:e.ownerDocument,stackAlign:zs(e,`stackalign`)??`decimalpoint`,decimalPoint:e.closest(`[decimalpoint]`)?.getAttribute(`decimalpoint`)?.trim().charAt(0)||`.`}}function sc(e){let t=oc(e),n=[];return Ys([...e.children],0,0,t,n),ac(e,ic(n,t),t)}function cc(e,t,n,r,i,a){for(let o=n;o<=r;o++)e[t][o].borders[i]=a}function lc(e,t){let n=Ls(t,`)`);return n.setAttribute(`minsize`,`1.2em`),[Is(t.document,`mrow`,[e,Is(t.document,`mspace`,[],{width:`0.2em`})]),Is(t.document,`mpadded`,[n],{voffset:`0.1em`,lspace:`-0.15em`,depth:`-0.2em`,height:`-0.2em`})]}function uc(e){let t=oc(e),[n,r,...i]=[...e.children],a=n&&!Vs(n)?n:null,o=r&&!Vs(r)?r:null,s=zs(e,`longdivstyle`)??`lefttop`,c=qs(e),l=[];Ys(i,0,0,t,l);let u=l.find(e=>e.kind===`digits`);u||(u={kind:`digits`,cells:[],anchor:0,position:0},l.unshift(u));let d=[],f=(...e)=>{u.cells.unshift(...e),u.anchor+=e.length},p=(...e)=>{let n=e.flatMap(e=>e?e.localName===`mrow`?[...e.children]:[e]:[]);u.cells.push(...Us(n,0,t).cells)};switch(s){case`left/\\right`:f(a,Ls(t,`/`)),p(Ls(t,`\\`),o);break;case`left)(right`:f(a,Ls(t,`)`)),p(Ls(t,`(`),o);break;case`:right=right`:p(Ls(t,`:`),a,Ls(t,`=`),o);break;case`righttop`:case`stackedleftlinetop`:case`lefttop`:o&&Ys([o],0,0,t,d),l.splice(l.indexOf(u),0,...d),s===`righttop`?p(a):s===`stackedleftlinetop`?f(a):f(...lc(a,t));break}let m=ic(l,t),h=m.rows,g=m.rowOf.get(u)??0,_=e=>m.origin+Xs(u)+e,v=Math.max(_(u.cells.length-1),...d.map(e=>m.origin+Qs(e)));switch(s){case`left/\\right`:case`left)(right`:case`:right=right`:break;case`righttop`:{let e=h[g][_(u.cells.length-1)];e.borders.left=c,e.borders.bottom=c,cc(h,g,_(0),_(u.cells.length-1),`top`,c);break}case`stackedleftlinetop`:{let e=h[g][_(0)];e.borders.right=c,e.borders.bottom=c,cc(h,g,_(1),v,`top`,c);break}case`stackedrightright`:case`mediumstackedrightright`:case`shortstackedrightright`:case`stackedleftleft`:dc(h,g,s,a,o,c,t);break;default:cc(h,g,_(1),v,`top`,c)}return ac(e,m,t)}function dc(e,t,n,r,i,a,o){let s=n===`stackedleftleft`,c=s?`right`:`left`,l=e=>e&&Is(o.document,`mpadded`,[e],{lspace:`0.2em`,width:`+0.4em`});e.length<t+2&&e.push(e[0].map(()=>({content:null,borders:{}}))),e.forEach((e,o)=>{let u={content:null,borders:{},align:s?`right`:`left`};o===t?(u.content=l(r),u.borders={[c]:a,bottom:a}):o===t+1?(u.content=l(i),n!==`shortstackedrightright`&&(u.borders[c]=a)):o>t+1&&(n===`stackedrightright`||s)&&(u.borders[c]=a),s?e.unshift(u):e.push(u)})}function fc(e){for(let t of[...e.querySelectorAll(`mstack, mlongdiv`)])!t.closest(`math`)||t.closest(`mjx-container`)||t.replaceWith(t.localName===`mstack`?sc(t):uc(t))}var pc=`PIE-MJX-explorer-styles`,mc=`var(--pie-text, black)`,hc=`var(--pie-background, #ffffff)`,gc=`var(--pie-border-dark, #66686A)`,_c=`var(--pie-focus-outline, var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565C0)))`,vc=`color-mix(in srgb, ${_c} 15%, transparent)`,yc=`
|
|
6
6
|
:root mjx-container [data-sre-highlight-1]:not([data-mjx-collapsed], rect) {
|
|
7
|
-
color: ${
|
|
8
|
-
fill: ${
|
|
7
|
+
color: ${mc} !important;
|
|
8
|
+
fill: ${mc} !important;
|
|
9
9
|
}
|
|
10
10
|
:root mjx-container:not([data-mjx-clone-container]) [data-sre-highlight-1]:not([data-sre-enclosed], rect) {
|
|
11
|
-
background-color: ${
|
|
11
|
+
background-color: ${vc} !important;
|
|
12
12
|
}
|
|
13
13
|
:root mjx-container rect[data-sre-highlight-1]:not([data-sre-enclosed]) {
|
|
14
|
-
fill: ${
|
|
14
|
+
fill: ${vc} !important;
|
|
15
15
|
}
|
|
16
16
|
:root mjx-container .mjx-selected {
|
|
17
|
-
outline: 2px solid ${
|
|
17
|
+
outline: 2px solid ${_c} !important;
|
|
18
18
|
}
|
|
19
19
|
:root mjx-container [data-sre-highlight-2] {
|
|
20
|
-
color: ${
|
|
20
|
+
color: ${mc} !important;
|
|
21
21
|
background-color: transparent !important;
|
|
22
|
-
fill: ${
|
|
23
|
-
outline: 2px dashed ${
|
|
22
|
+
fill: ${mc} !important;
|
|
23
|
+
outline: 2px dashed ${_c} !important;
|
|
24
24
|
}
|
|
25
25
|
:root mjx-container rect[data-sre-highlight-2] {
|
|
26
26
|
fill: transparent !important;
|
|
27
|
-
stroke: ${
|
|
27
|
+
stroke: ${_c} !important;
|
|
28
28
|
stroke-width: 2px !important;
|
|
29
29
|
vector-effect: non-scaling-stroke;
|
|
30
30
|
}
|
|
31
31
|
:root .MJX_LiveRegion, :root .MJX_HoverRegion, :root .MJX_ToolTip {
|
|
32
|
-
color: ${
|
|
33
|
-
background-color: ${
|
|
34
|
-
border-color: ${
|
|
32
|
+
color: ${mc} !important;
|
|
33
|
+
background-color: ${hc} !important;
|
|
34
|
+
border-color: ${gc} !important;
|
|
35
35
|
}
|
|
36
36
|
:root .MJX_LiveRegion > div, :root .MJX_HoverRegion > div {
|
|
37
|
-
color: ${
|
|
38
|
-
background-color: ${
|
|
37
|
+
color: ${mc} !important;
|
|
38
|
+
background-color: ${vc} !important;
|
|
39
39
|
}
|
|
40
|
-
`;function yc(e=document){if(e.getElementById(`PIE-MJX-explorer-styles`))return;let t=e.createElement(`style`);t.id=fc,t.textContent=vc,e.head.appendChild(t)}var bc=Symbol.for(`@pie-element/shared-math-rendering-mathjax/speech-worker-failed`);function xc(){let e=globalThis;e[bc]||(e[bc]=!0,console.warn(`[math-rendering] MathJax's speech worker did not start, so speech, braille and the explorer are off. A content security policy must allow blob: workers, and scripts and fetches from the asset root. See ${Jo}`))}function Sc(e){let t=e.webworker;if(!t||t.ready)return;e.options??={};let n=e.options;n.enableSpeech=!1,n.enableBraille=!1,n.speechError=()=>{},t.Post=()=>Promise.reject(Error(`The speech worker did not start`)),t.Terminate(),xc()}function Cc(e){let t=e?.adaptor,n=t?.createWorker;!e||!t||!n||(t.createWorker=async(r,i)=>{let a=await n.call(t,r,i);return a.addEventListener(`error`,()=>Sc(e),{once:!0}),a})}`${Zo}`;var wc={parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`,abs:[`\\left|#1\\right|`,1]},Tc=`[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)`,Ec=/\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/,Dc=/\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/,Oc=/\\embed\{newLine\}\[\]/g,kc=[[`$$`,`$$`],[`$`,`$`],[`\\[`,`\\]`],[`\\(`,`\\)`]],Ac=Symbol.for(`@pie-element/shared-math-rendering-mathjax/loading`),jc=`MJX-CHTML-styles`,Mc=`PIE-MJX-SVG-styles`,Nc=`PIE-MathJax-Menu-Settings`,Pc={'mjx-container[overflow="linebreak"][display]':{overflow:`auto clip`,"min-width":`initial !important`}},Fc=200,Ic=201;function Lc(e){let t=[...e.matches(`mjx-container`)?[e]:[],...e.querySelectorAll(`mjx-container`)];for(let e of t)for(let t of[e,...e.querySelectorAll(`[data-latex],[data-latex-item]`)])t.removeAttribute(`data-latex`),t.removeAttribute(`data-latex-item`)}function Rc(e){for(let[t,n]of kc)if(e.startsWith(t)&&e.endsWith(n))return e.substring(t.length,e.length-n.length);return e}function zc(e){return Rc(e.includes(`\\displaystyle`)?e.replace(`\\displaystyle`,``).trim():e)}var Bc=`mathjax_ignore`,Vc=`mathjax_process`;function Hc(e,t){let n=e.closest(`.${Bc}, .${Vc}`);return n!==null&&t.contains(n)&&!n.classList.contains(Vc)}function Uc(e){for(let t of e.querySelectorAll(`[data-latex]`)){if(t.dataset.mathHandled||t.closest(`mjx-container`)||Hc(t,e))continue;let n=t.textContent;n&&(t.textContent=`\\(${zc(n)}\\)`.replace(Oc,`\\newline `),t.dataset.mathHandled=`true`)}}function Wc(e){for(let t of e.querySelectorAll(`math`))t.closest(`mjx-container`)||t.setAttribute(`displaystyle`,`true`)}function Gc(e,t){for(let t of e.querySelectorAll(`math`))if(!t.closest(`mjx-assistive-mml`))return!0;return(t?Dc:Ec).test(e.textContent??``)}function Kc(e){return new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s=is(e,{}.url),c={loader:{load:i?[`a11y/assistive-mml`]:[],failed:e=>n(e),"output/svg":{ready:e=>{let t=hs();return qc(t)&&Jc(t),e}}},startup:{typeset:!1,ready:()=>{let e=hs(),r=e?.startup,i=qc(e);i&&(Jc(e),Yc(e,s.speechLocales),as(e?._?.a11y?.sre_ts?.locales,s.speechLocales)),r?.defaultReady?.(),i&&(Xc(r?.document),r?.document?.addStyles?.(Pc),Cc(r?.document)),Promise.resolve(r?.promise).then(()=>t(),n)}},tex:{macros:{...wc}},output:{displayOverflow:`linebreak`},options:{enableMenu:i,menuOptions:{settings:{assistiveMml:i,enrich:!1,inTabOrder:!1}},a11y:{inTabOrder:!1}}};r&&c.tex&&(console.warn(Tc),c.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],c.tex.processEscapes=!0),a||(c.chtml={fontURL:``});let l=os(s.speechLocales);l&&c.options&&(c.options.sre={locale:l}),_s(c,{...s,srcUrl:o}).then(e=>{e||t()},n)})}function qc(e){return!!e?.version?.startsWith(`4.`)}function Jc(e){let t=e?._?.output,n=t?.chtml_ts?.CHTML;n&&(n.STYLESHEETID=ys);let r=t?.svg_ts?.SVG;r&&(r.STYLESHEETID=Mc)}function Yc(e,t){let n=e?._?.ui?.menu?.Menu?.Menu;if(n){n.MENU_STORAGE=Nc;try{let e=localStorage.getItem(Nc);if(!e)return;let{assistiveMml:n,locale:r,...i}=JSON.parse(e),a=r===void 0||!t||t.has(r);if(n===void 0&&a)return;a&&r!==void 0&&(i.locale=r),Object.keys(i).length?localStorage.setItem(Nc,JSON.stringify(i)):localStorage.removeItem(Nc)}catch{}}}function Xc(e){if(!e)return;let t=new WeakSet,n=e=>{let n=e.typesetRoot;!n||t.has(n)||(Lc(n),t.add(n))};e.addRenderAction?.(`pie-strip-latex`,Ic,e=>{for(let t of e.math??[])n(t);return!1},e=>{let t=e.typesetRoot;return t&&Lc(t),!1});let r=e.outputJax?.chtmlStyles;r?.id===jc&&(r.id=ys),$c()}function Zc(e){return e instanceof HTMLStyleElement&&bs.includes(e.id)}function Qc(e){ps(`foreign-output-stylesheet`,`another MathJax added <style id="${e.id}"> to <head>`)}function $c(){let e=document.head,t=[...e.children].find(Zc);if(t){Qc(t);return}let n=new MutationObserver(e=>{for(let t of e){let e=[...t.addedNodes].find(Zc);if(e){Qc(e),n.disconnect();return}}});n.observe(e,{childList:!0})}function el(e){let t=e?.math;if(!t?.remove)return;let n=[...t].filter(e=>(e.state?.()??0)>=Fc&&e.typesetRoot?.isConnected===!1);if(n.length!==0){for(let e of[...n].reverse())e.clear?.();t.remove(...n)}}function tl(e){return new Promise((t,n)=>{let r=e.startup??{};e.startup=r;let i=r.ready;r.ready=()=>{let e=hs()?.startup;i?i.call(r):e?.defaultReady?.(),Promise.resolve(e?.promise).then(()=>t(),n)}})}function nl(e){let t=hs();return t?t.version?t.startup?.promise?Promise.resolve(t.startup.promise).then(()=>void 0):Promise.resolve():tl(t):Kc(e)}function rl(e){return nl(e).then(()=>{let e=hs();e&&typeof e.typesetPromise!=`function`&&console.warn(`[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.`)})}function il(e){let t=vs,n=t[Ac];return n||(n=rl(e),t[Ac]=n),n}function al(e={}){let t=e.useSingleDollar??!1;return async n=>{if(typeof window>`u`)return;let r=xs();r&&ps(`mathjax-3-global`,`window.MathJax is MathJax ${r}`),Uc(n),Ts(n),Wc(n),dc(n);let i=il(e);if(!Gc(n,t)){i.catch(()=>{});return}await i;let a=hs();if(await a?.startup?.promise,typeof a?.typesetPromise==`function`){yc(),el(a.startup?.document);try{await a.typesetPromise([n])}catch(e){throw a.typesetClear?.([n]),e}Lc(n)}}}var ol={"(":`open parenthesis`,"[":`open bracket`,"{":`open brace`,"⟨":`open angle bracket`,"⌊":`open floor`,"⌈":`open ceiling`},sl={")":`close parenthesis`,"]":`close bracket`,"}":`close brace`,"⟩":`close angle bracket`,"⌋":`close floor`,"⌉":`close ceiling`},cl={"!":`factorial`,"%":`percent`,"°":`degrees`,"′":`prime`,"″":`double prime`};({...ol,...sl,...cl});var ll=`@pie-lib/math-rendering`,ul=`@pie-lib/math-rendering@2`,dl=`pie-print`,fl=50,pl=1e4,ml=null;function hl(){return!!window[ul]?.opts?.useSingleDollar}function gl(){return ml||=al({useSingleDollar:hl()}),ml}function _l(){if(typeof window>`u`)return null;let e=window[ll];return typeof e?.renderMath==`function`&&e.renderMath!==xl?e:null}function vl(e){let t=e;for(;t;){if(t instanceof Element&&t.localName===dl)return t;t=t instanceof ShadowRoot?t.host:t.parentNode}return null}function yl(){let e=window.renderMath;return typeof e==`function`?e:null}async function bl(e){let t=vl(e);if(!t)return null;let n=yl();if(n||t.mathRenderingModuleUrlImported!==!0)return n;let r=Date.now()+pl;for(;Date.now()<r;){await new Promise(e=>setTimeout(e,fl));let e=yl();if(e)return e}return null}var xl=async e=>{if(typeof window>`u`)return;let t=typeof e==`string`,n;t?(n=document.createElement(`div`),n.innerHTML=e):n=e||document.body;let r=_l(),i=r||t?null:await bl(n);return r?await r.renderMath?.(n):i&&i!==xl?await i(n):await gl()(n),t?n.innerHTML:void 0},Sl={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].`},dragInTheBlank:{blank:`Blank {{index}}`},ebsr:{part:`Part {{index}}`,twoPartQuestion:`Two-Part Question`},editableHtml:{responseAreaToolbar:`Response area`,toolbar:`Editing tools`,buttons:{insertTable:`Insert table`,addTableRow:`Add table row`,removeTableRow:`Remove table row`,addTableColumn:`Add table column`,removeTableColumn:`Remove table column`,removeTable:`Remove table`,tableBorders:`Table borders`,bold:`Bold`,italic:`Italic`,strikethrough:`Strikethrough`,code:`Code`,underline:`Underline`,subscript:`Subscript`,superscript:`Superscript`,insertImage:`Insert image`,insertVideo:`Insert video`,insertAudio:`Insert audio`,cssClasses:`CSS classes`,blockquote:`Blockquote`,heading:`Heading`,insertMath:`Insert math`,spanishCharacters:`Spanish characters (ñ)`,specialCharacters:`Special characters (€)`,textAlignment:`Text alignment`,bulletedList:`Bulleted list`,numberedList:`Numbered list`,done:`Done`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Fill in the Blank Question`,response:`Response {{index}} of {{total}}`},extendedTextEntry:{comment:`Comment`,constructedResponseQuestion:`Constructed Response Question`,response:`Your response`,writtenResponseQuestion:`Written Response Question`},fractionModel:{modelLabel_one:`Model {{index}} of {{total}}: {{selected}} of {{count}} part selected`,modelLabel_other:`Model {{index}} of {{total}}: {{selected}} of {{count}} parts selected`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`,closedEnd:`closed`,elementCorrect:`Correct.`,elementIncorrect:`Incorrect.`,graphLabel:`Number line from {{min}} to {{max}}, with a tick every {{interval}}`,line:`Line from {{left}} ({{leftEnd}}) to {{right}} ({{rightEnd}}).`,openEnd:`open`,plottedNone:`Nothing is plotted.`,pointClosed:`Closed point at {{position}}.`,pointOpen:`Open point at {{position}}.`,rayLeft:`Ray from {{position}} ({{end}}) to the left.`,rayRight:`Ray from {{position}} ({{end}}) to the right.`},hotspot:{correctlySelected:`Correctly selected`,image_one:`Image with {{count}} hotspot`,image_other:`Image with {{count}} hotspots`,shape:`Hotspot {{index}} of {{total}}`,shouldHaveBeenSelected:`Should have been selected`,shouldNotHaveBeenSelected:`Should not have been selected`},imageClozeAssociation:{answerChoice:`Answer choice {{index}} of {{total}}`,image_one:`Image with {{count}} response area`,image_other:`Image with {{count}} response areas`,reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`,responseArea:`Response area {{index}} of {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Inline Dropdown Question`,query:`Query`,queryNumber:`Query {{index}}`,showRationaleForChoices:`Show Rationale for choices`,hideRationaleForChoices:`Hide Rationale for choices`},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.`,drawingArea:`Drawing area`,drawingAreaOverImage:`Drawing area over a background image`,tools:{select:`Select`,freeDraw:`Free Draw`,line:`Line`,rectangle:`Rectangle`,circle:`Circle`,textEntry:`Text Entry`,eraser:`Eraser`}},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,categoryLabel:`Category {{index}} label`,categoryLabelValue:`Category {{index}} label: {{label}}`,category:`Category {{index}}`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`},chartTypes:{bar:`Bar chart`,histogram:`Histogram`,lineDot:`Line chart with dots`,lineCross:`Line chart with crosses`,dotPlot:`Dot plot`,linePlot:`Line plot`},categories_zero:`No categories.`,categories_one:`{{count}} category: {{categories}}.`,categories_other:`{{count}} categories: {{categories}}.`,valueRange:`Values from {{min}} to {{max}}.`,labelledValueRange:`{{label}} from {{min}} to {{max}}.`},graphing:{graph:`Coordinate graph`,axisRange:`{{axis}} axis from {{min}} to {{max}}.`,plotted_zero:`Nothing plotted.`,plotted_one:`{{count}} object plotted: {{marks}}.`,plotted_other:`{{count}} objects plotted: {{marks}}.`,shadedRegion:`Shaded region`,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`,markLabel:`Label at ({{x}}, {{y}})`,correctMarkLabel:`Correct label at ({{x}}, {{y}})`,redo:`Redo`,reset:`Reset`,keyLegend:{missingRequiredLabel:`Missing Required Label`,answerKeyCorrect:`Answer Key Correct`,answerKeyCorrectLabel:`Answer Key Correct Label`,studentIncorrect:`Student Incorrect`,incorrectStudentLabel:`Incorrect Student Label`,studentCorrect:`Student Correct`,studentCorrectLabel:`Student Correct Label`}},mathInline:{keypadInstructions:`This field supports both keypad and keyboard input. Use the keyboard to access and interact with the on-screen math keypad, which accepts LaTeX markup. Use the down arrow key to open the keypad and navigate its buttons. Use the escape key to close the keypad and return to the input field.`,mathEquationResponseQuestion:`Math Equation Response Question`,mathResponseQuestion:`Math Response Question`,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.`},mathInput:{enterAnswer:`Enter answer`},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}}.`,multipleChoiceQuestion:`Multiple Choice Question`,multipleCorrectAnswerQuestion:`Multiple Correct Answer Question`,multipleSelectQuestion:`Multiple Select Question`},rubric:{rubric:`Rubric`,showRubric:`Show Rubric`,hideRubric:`Hide Rubric`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`,textGroup:`Selectable text`,textGroupWithLimit:`Selectable text, select up to {{max}}`,tokenPosition:`{{index}} of {{total}}`},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`,show:`Show`,hide:`Hide`,showRationale:`Show Rationale`,hideRationale:`Hide Rationale`,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`,playAudio:`Play audio`}},Cl={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`},dragInTheBlank:{blank:`Espacio en blanco {{index}}`},ebsr:{part:`Parte {{index}}`,twoPartQuestion:`Pregunta de dos partes`},editableHtml:{responseAreaToolbar:`Área de respuesta`,toolbar:`Herramientas de edición`,buttons:{insertTable:`Insertar tabla`,addTableRow:`Agregar fila a la tabla`,removeTableRow:`Eliminar fila de la tabla`,addTableColumn:`Agregar columna a la tabla`,removeTableColumn:`Eliminar columna de la tabla`,removeTable:`Eliminar tabla`,tableBorders:`Bordes de la tabla`,bold:`Negrita`,italic:`Cursiva`,strikethrough:`Tachado`,code:`Código`,underline:`Subrayado`,subscript:`Subíndice`,superscript:`Superíndice`,insertImage:`Insertar imagen`,insertVideo:`Insertar video`,insertAudio:`Insertar audio`,cssClasses:`Clases CSS`,blockquote:`Cita en bloque`,heading:`Encabezado`,insertMath:`Insertar expresión matemática`,spanishCharacters:`Caracteres del español (ñ)`,specialCharacters:`Caracteres especiales (€)`,textAlignment:`Alineación del texto`,bulletedList:`Lista con viñetas`,numberedList:`Lista numerada`,done:`Listo`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Pregunta para completar espacios en blanco`,response:`Respuesta {{index}} de {{total}}`},extendedTextEntry:{comment:`Comentario`,constructedResponseQuestion:`Pregunta de respuesta construida`,response:`Tu respuesta`,writtenResponseQuestion:`Pregunta de respuesta escrita`},fractionModel:{modelLabel_one:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} parte seleccionada`,modelLabel_other:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} partes seleccionadas`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`,closedEnd:`cerrado`,elementCorrect:`Correcto.`,elementIncorrect:`Incorrecto.`,graphLabel:`Recta numérica de {{min}} a {{max}}, con una marca cada {{interval}}`,line:`Línea de {{left}} ({{leftEnd}}) a {{right}} ({{rightEnd}}).`,openEnd:`abierto`,plottedNone:`No hay nada marcado en la recta.`,pointClosed:`Punto cerrado en {{position}}.`,pointOpen:`Punto abierto en {{position}}.`,rayLeft:`Rayo desde {{position}} ({{end}}) hacia la izquierda.`,rayRight:`Rayo desde {{position}} ({{end}}) hacia la derecha.`},hotspot:{correctlySelected:`Seleccionada correctamente`,image_one:`Imagen con {{count}} zona activa`,image_other:`Imagen con {{count}} zonas activas`,shape:`Zona activa {{index}} de {{total}}`,shouldHaveBeenSelected:`Debía seleccionarse`,shouldNotHaveBeenSelected:`No debía seleccionarse`},imageClozeAssociation:{answerChoice:`Opción de respuesta {{index}} de {{total}}`,image_one:`Imagen con {{count}} área de respuesta`,image_other:`Imagen con {{count}} áreas de respuesta`,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`,responseArea:`Área de respuesta {{index}} de {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Pregunta con menú desplegable`,query:`Consulta`,queryNumber:`Consulta {{index}}`,showRationaleForChoices:`Mostrar justificación de las opciones`,hideRationaleForChoices:`Ocultar justificación de las opciones`},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`,drawingArea:`Área de dibujo`,drawingAreaOverImage:`Área de dibujo sobre una imagen de fondo`,tools:{select:`Seleccionar`,freeDraw:`Dibujo libre`,line:`Línea`,rectangle:`Rectángulo`,circle:`Círculo`,textEntry:`Entrada de texto`,eraser:`Borrador`}},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,categoryLabel:`Etiqueta de la categoría {{index}}`,categoryLabelValue:`Etiqueta de la categoría {{index}}: {{label}}`,category:`Categoría {{index}}`,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`},chartTypes:{bar:`Gráfico de barras`,histogram:`Histograma`,lineDot:`Gráfico de líneas con puntos`,lineCross:`Gráfico de líneas con cruces`,dotPlot:`Diagrama de puntos`,linePlot:`Diagrama de líneas`},categories_zero:`Sin categorías.`,categories_one:`{{count}} categoría: {{categories}}.`,categories_other:`{{count}} categorías: {{categories}}.`,valueRange:`Valores de {{min}} a {{max}}.`,labelledValueRange:`{{label}} de {{min}} a {{max}}.`},graphing:{graph:`Gráfica de coordenadas`,axisRange:`Eje {{axis}} de {{min}} a {{max}}.`,plotted_zero:`Nada trazado.`,plotted_one:`{{count}} objeto trazado: {{marks}}.`,plotted_other:`{{count}} objetos trazados: {{marks}}.`,shadedRegion:`Región sombreada`,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`,markLabel:`Etiqueta en ({{x}}, {{y}})`,correctMarkLabel:`Etiqueta correcta en ({{x}}, {{y}})`,redo:`Rehacer`,reset:`Reiniciar`,keyLegend:{missingRequiredLabel:`Falta una etiqueta obligatoria`,answerKeyCorrect:`Clave de respuesta correcta`,answerKeyCorrectLabel:`Etiqueta correcta de la clave de respuesta`,studentIncorrect:`Respuesta incorrecta del estudiante`,incorrectStudentLabel:`Etiqueta incorrecta del estudiante`,studentCorrect:`Respuesta correcta del estudiante`,studentCorrectLabel:`Etiqueta correcta del estudiante`}},mathInline:{keypadInstructions:`Este campo admite la entrada con el teclado en pantalla y con el teclado físico. Usa el teclado físico para acceder al teclado matemático en pantalla e interactuar con él; este acepta notación LaTeX. Usa la tecla de flecha hacia abajo para abrir el teclado en pantalla y recorrer sus botones. Usa la tecla Escape para cerrar el teclado en pantalla y volver al campo de entrada.`,mathEquationResponseQuestion:`Pregunta de respuesta con ecuación matemática`,mathResponseQuestion:`Pregunta de respuesta matemática`,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.`},mathInput:{enterAnswer:`Escribe la respuesta`},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}}.`,multipleChoiceQuestion:`Pregunta de opción múltiple`,multipleCorrectAnswerQuestion:`Pregunta con varias respuestas correctas`,multipleSelectQuestion:`Pregunta de selección múltiple`},rubric:{rubric:`Rúbrica`,showRubric:`Mostrar rúbrica`,hideRubric:`Ocultar rúbrica`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`,textGroup:`Texto seleccionable`,textGroupWithLimit:`Texto seleccionable, selecciona hasta {{max}}`,tokenPosition:`{{index}} de {{total}}`},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`,show:`Mostrar`,hide:`Ocultar`,showRationale:`Mostrar justificación`,hideRationale:`Ocultar justificación`,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`,playAudio:`Reproducir audio`}},Q=e=>typeof e==`string`,wl=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Tl=e=>e==null?``:``+e,El=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Dl=/###/g,Ol=e=>e&&e.indexOf(`###`)>-1?e.replace(Dl,`.`):e,kl=e=>!e||Q(e),Al=(e,t,n)=>{let r=Q(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(kl(e))return{};let t=Ol(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return kl(e)?{}:{obj:e,k:Ol(r[i])}},jl=(e,t,n)=>{let{obj:r,k:i}=Al(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=Al(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Al(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Ml=(e,t,n,r)=>{let{obj:i,k:a}=Al(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Nl=(e,t)=>{let{obj:n,k:r}=Al(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Pl=(e,t,n)=>{let r=Nl(e,n);return r===void 0?Nl(t,n):r},Fl=(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]):Fl(e[r],t[r],n):e[r]=t[r]);return e},Il=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Ll={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},Rl=e=>Q(e)?e.replace(/[&<>"'\/]/g,e=>Ll[e]):e,zl=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}},Bl=[` `,`,`,`?`,`!`,`;`],Vl=new zl(20),Hl=(e,t,n)=>{t||=``,n||=``;let r=Bl.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=Vl.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},Ul=(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},Wl=e=>e?.replace(/_/g,`-`),Gl={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)}},Kl=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Gl,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)}},ql=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])})}},Jl=class extends ql{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=Nl(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:Ul(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),jl(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=Nl(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Fl(s,n,i):s={...s,...n},jl(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}},Yl={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}},Xl=Symbol(`i18next/PATH_KEY`);function Zl(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Xl?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Ql(e,t){let{[Xl]:n}=e(Zl()),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 $l={},eu=e=>!Q(e)&&typeof e!=`boolean`&&typeof e!=`number`,tu=class e extends ql{constructor(e,t={}){super(),El([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Kl.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=eu(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&&!Hl(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=Ql(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Ql(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):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let ee=eu(E),te=Object.prototype.toString.apply(E);if(y&&E&&ee&&_.indexOf(te)<0&&!(Q(v)&&Array.isArray(E))){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,E,{...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(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:eu(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[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=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?T: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);w&&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}`]||T)})}):n(e,s,T))}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=Yl.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`?Ql(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,!$l[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&($l[`${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}},nu=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Kl.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Wl(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=Wl(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}},ru={zero:0,one:1,two:2,few:3,many:4,other:5},iu={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},au=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Kl.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Wl(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!`),iu;if(!e.match(/-|_/))return iu;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)=>ru[e]-ru[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))}},ou=(e,t,n,r=`.`,i=!0)=>{let a=Pl(e,t,n);return!a&&i&&Q(n)&&(a=Ul(e,n,r),a===void 0&&(a=Ul(t,n,r))),a},su=e=>e.replace(/\$/g,`$$$$`),cu=class{constructor(e={}){this.logger=Kl.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?Rl:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?Il(i):a||`{{`,this.suffix=o?Il(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?Il(d):f||Il(`$t(`),this.nestingSuffix=p?Il(p):m||Il(`)`),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=ou(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(ou(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=>su(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?su(this.escape(e)):su(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=Tl(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(`${Il(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=Tl(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}},lu=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}},uu=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(Wl(r),i),t[o]=s),s(n)}},du=e=>(t,n,r)=>e(Wl(n),r)(t),fu=class{constructor(e={}){this.logger=Kl.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?uu:du;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()]=uu(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}=lu(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)}},pu=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},mu=class extends ql{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Kl.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=>{Ml(n.loaded,[i],a),pu(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)}}},hu=()=>({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}),gu=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),_u=()=>{},vu=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},yu=`__i18next_supportNoticeShown`,bu=()=>!!(typeof globalThis<`u`&&globalThis[yu]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env&&process.env.NODE_ENV===`production`),xu=()=>{typeof globalThis<`u`&&(globalThis[yu]=!0)},Su=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)),Cu=class e extends ql{constructor(e={},t){if(super(),this.options=gu(e),this.services={},this.logger=Kl,this.modules={external:[]},vu(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=hu();this.options={...n,...this.options,...gu(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&&!Su(this)&&!bu()&&(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 💙`),xu());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Kl.init(r(this.modules.logger),this.options):Kl.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:fu;let t=new nu(this.options);this.store=new Jl(this.options.resources,this.options);let i=this.services;i.logger=Kl,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new au(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 cu(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new mu(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 tu(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||=_u,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=wl(),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=_u){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=wl();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||=_u,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`&&Yl.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=wl();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=Ql(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=Ql(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=Ql(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=wl();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=wl();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 nu(hu());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=_u){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 Jl(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={...hu().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new cu(n)}return a.translator=new tu(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();Cu.createInstance,Cu.dir,Cu.init,Cu.loadResources,Cu.reloadResources,Cu.use,Cu.changeLanguage,Cu.getFixedT,Cu.t,Cu.exists,Cu.setDefaultNamespace,Cu.hasLoadedNamespace,Cu.loadNamespaces,Cu.loadLanguages,Cu.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:Sl,es:Cl}});var{translator:wu}={translator:{...Cu,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 Cu.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]};function $(e,t,n={}){return wu.t(`translation:vennClassification:${e}`,{lng:t,...n,interpolation:{escapeValue:!1}})}function Tu(e,t){return wu.t(`common:${e}`,{lng:t})}function Eu(e){return(e||``).replace(/<[^>]+>/g,` `).replace(/\s+/g,` `).trim()}function Du(e,t){let n=(e.imageAlt??``).trim();return(e.imageUrl??``).trim()&&n?n:Eu(e.label??``)||$(`tileFallbackName`,t)}function Ou(e,t,n,r){let i=[Du(e,r),t===null?$(`tileNotPlaced`,r):$(`tileInRegion`,r,{region:t})];return n===`correct`&&i.push($(`tileCorrect`,r)),n===`incorrect`&&i.push($(`tileIncorrect`,r)),i.join(`, `)}var ku=br(`<img alt="" class="tile-img svelte-1hgaksk" aria-hidden="true" draggable="false"/>`),Au=br(`<span></span>`),ju=br(`<span class="venn-badge venn-badge-correct svelte-1hgaksk" aria-hidden="true"><svg viewBox="0 0 24 24" width="14" height="14" fill="currentColor"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"></path></svg></span>`),Mu=br(`<span class="venn-badge venn-badge-incorrect svelte-1hgaksk" aria-hidden="true"><svg viewBox="0 0 24 24" width="14" height="14" fill="currentColor"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path></svg></span>`),Nu=br(`<button type="button"><span><!> <!></span> <!></button>`),Pu={hash:`svelte-1hgaksk`,code:`.venn-tile.svelte-1hgaksk {position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:64px;min-height:44px;padding:8px 14px;border:1.5px solid var(--pie-border-dark, #334155);border-radius:10px;background:var(--pie-background, #ffffff);color:var(--pie-text, #0f172a);font-size:14px;font-weight:500;box-shadow:0 1px 2px rgba(15, 23, 42, 0.06);cursor:grab;touch-action:none;user-select:none;transition:box-shadow 120ms ease, transform 120ms ease, background 120ms ease;}.venn-tile.svelte-1hgaksk:focus-visible,
|
|
40
|
+
`;function bc(e=document){if(e.getElementById(`PIE-MJX-explorer-styles`))return;let t=e.createElement(`style`);t.id=pc,t.textContent=yc,e.head.appendChild(t)}var xc=/[-]/g,Sc={"+":`positive`,"-":`negative`,"−":`negative`,"±":`plus or minus`,"∓":`minus or plus`},Cc={"(":`open parenthesis`,"[":`open bracket`,"{":`open brace`,"⟨":`open angle bracket`,"⌊":`open floor`,"⌈":`open ceiling`},wc={")":`close parenthesis`,"]":`close bracket`,"}":`close brace`,"⟩":`close angle bracket`,"⌋":`close floor`,"⌉":`close ceiling`},Tc={"!":`factorial`,"%":`percent`,"°":`degrees`,"′":`prime`,"″":`double prime`},Ec={"+":`plus`,"-":`minus`,"−":`minus`,"±":`plus or minus`,"∓":`minus or plus`,"×":`times`,"⋅":`times`,"·":`times`,"*":`times`,"÷":`divided by`,"/":`divided by`,"=":`equals`,"≠":`does not equal`,"<":`is less than`,">":`is greater than`,"≤":`is less than or equal to`,"≥":`is greater than or equal to`,"≈":`is approximately equal to`,"≡":`is equivalent to`,"∝":`is proportional to`,"∈":`is an element of`,"∉":`is not an element of`,"⊂":`is a subset of`,"⊆":`is a subset of or equal to`,"∪":`union`,"∩":`intersection`,"→":`right arrow`,"←":`left arrow`,"⇒":`implies`,"⇔":`if and only if`,"∑":`sum`,"∏":`product`,"∫":`integral`,"∞":`infinity`,"∠":`angle`,"⊥":`is perpendicular to`,"∥":`is parallel to`,"∴":`therefore`,",":`comma`,";":`semicolon`,":":`colon`,"|":`vertical bar`,"‖":`double vertical bar`,...Cc,...wc,...Tc},Dc=new Set([`|`,`‖`]),Oc=new Set([`∑`,`∏`,`∫`,`∪`,`∩`]),kc={α:`alpha`,β:`beta`,γ:`gamma`,δ:`delta`,ε:`epsilon`,θ:`theta`,λ:`lambda`,μ:`mu`,π:`pi`,ρ:`rho`,σ:`sigma`,τ:`tau`,φ:`phi`,ω:`omega`,Δ:`capital delta`,Σ:`capital sigma`,Ω:`capital omega`,"∞":`infinity`,sin:`sine`,cos:`cosine`,tan:`tangent`,sec:`secant`,csc:`cosecant`,cot:`cotangent`,ln:`natural log`,lim:`limit`},Ac={"¯":`bar`,"‾":`bar`,"―":`bar`,"^":`hat`,ˆ:`hat`,"~":`tilde`,"˜":`tilde`,"→":`vector`,"⃗":`vector`,"˙":`dot`},jc=e=>(e.textContent??``).replace(xc,``).replace(/\s+/g,` `).trim(),Mc=e=>e.replace(/\s+/g,` `).trim(),Nc=e=>[...e.children];function Pc(e){return!e||[`mn`,`mi`,`mtext`,`mo`].includes(e.localName)?!0:[`mrow`,`mstyle`].includes(e.localName)&&e.children.length===1?Pc(e.children[0]):!1}function Fc(e){let t=e?jc(e):``;return/^\d{1,3}$/.test(t)?Number(t):void 0}function Ic(e){return`${e}${e%100>=11&&e%100<=13?`th`:{1:`st`,2:`nd`,3:`rd`}[e%10]??`th`}`}function Lc(e){return kc[e]??e}function Rc(e){return Ec[e]??e}function zc(e){let t=[],n=!1;for(let r of e){if(r.localName!==`mo`){t.push(Z(r)),n=!0;continue}let e=jc(r);e&&(!n&&Sc[e]?t.push(Sc[e]):e in Tc?t.push(Tc[e]):(t.push(Rc(e)),n=e in wc||Dc.has(e)&&n))}return t.filter(Boolean).join(` `)}function Bc(e){let[t,...n]=e,r=n[n.length-1],i=e=>e?.localName===`mo`&&[`|`,`‖`].includes(jc(e)),a=n.slice(0,-1);if(a.length&&i(t)&&i(r)&&jc(t)===jc(r)&&!a.some(i)){let e=Mc(zc(a));return jc(t)===`|`?`absolute value of ${e} end absolute value`:`norm of ${e} end norm`}return zc(e)}function Vc(e,t){let n=e?Z(e):``,r=t?Z(t):``;return Pc(e)&&Pc(t)?`${n} over ${r}`:`the fraction with numerator ${n} and denominator ${r}`}function Hc(e,t,n){return n?`${t} of ${e}`:`${t} of ${e} end root`}function Uc(e,t){let n=t?jc(t):``;if(t&&Pc(t)){if(n===`2`)return`${e} squared`;if(n===`3`)return`${e} cubed`;if(n in Tc)return`${e} ${Tc[n]}`}let r=t?Z(t):``;return Pc(t)?`${e} to the power of ${r}`:`${e} to the power of ${r} end power`}function Wc(e,t){let n=t?Z(t):``;return Pc(t)?`${e} sub ${n}`:`${e} sub ${n} end sub`}function Gc(e,t,n){let r=jc(e);if(r===`lim`)return`limit as ${t?Z(t):``} of`;if(!Oc.has(r))return;let i=t?`from ${Z(t)}`:``,a=n?`to ${Z(n)}`:``;return`${Rc(r)} ${i} ${a} of`}function Kc(e){let t=Nc(e).filter(e=>[`mtr`,`mlabeledtr`].includes(e.localName)),n=t.map(e=>Nc(e).filter(e=>e.localName===`mtd`)),r=Math.max(0,...n.map(e=>e.length)),i=n.map((e,t)=>`row ${t+1}: ${e.map(e=>Mc(zc(Nc(e)))).join(`, `)}`);return`table with ${t.length} ${t.length===1?`row`:`rows`} and ${r} ${r===1?`column`:`columns`}. ${i.join(`. `)}`}function qc(e){let t=e.getAttribute(`open`)??`(`,n=e.getAttribute(`close`)??`)`,r=(e.getAttribute(`separators`)??`,`).replace(/\s+/g,``).split(``),i=Nc(e).map((e,t,n)=>t<n.length-1?`${Z(e)} ${Rc(r[Math.min(t,r.length-1)]??`,`)}`:Z(e));return[Rc(t),...i,Rc(n)].filter(Boolean).join(` `)}function Z(e){let t=Nc(e);switch(e.localName){case`mi`:return Lc(jc(e));case`mn`:case`mtext`:case`ms`:return jc(e);case`mo`:return Rc(jc(e));case`mspace`:case`mphantom`:case`annotation`:case`annotation-xml`:return``;case`semantics`:return t[0]?Z(t[0]):``;case`mfrac`:return Vc(t[0],t[1]);case`msqrt`:return Hc(Mc(zc(t)),`square root`,t.length===1&&Pc(t[0]));case`mroot`:{let e=Fc(t[1]),n=e===2?`square root`:e===3?`cube root`:e?`${Ic(e)} root`:`root with index ${t[1]?Z(t[1]):``}`;return Hc(t[0]?Z(t[0]):``,n,Pc(t[0]))}case`msup`:return Uc(t[0]?Z(t[0]):``,t[1]);case`msub`:return Wc(t[0]?Z(t[0]):``,t[1]);case`msubsup`:return(t[0]?Gc(t[0],t[1],t[2]):void 0)||Uc(Wc(t[0]?Z(t[0]):``,t[1]),t[2]);case`munder`:case`mover`:case`munderover`:{let[n,r,i]=t,a=e.localName===`mover`?void 0:r,o=e.localName===`munder`?void 0:e.localName===`mover`?r:i,s=n?Gc(n,a,o):void 0;if(s)return s;let c=n?Z(n):``,l=e.localName===`mover`&&r?Ac[jc(r)]:void 0;return l?l===`vector`?`vector ${c}`:`${c} ${l}`:[c,a?`with ${Z(a)} below`:``,o?`with ${Z(o)} above`:``].filter(Boolean).join(` `)}case`mfenced`:return qc(e);case`mtable`:return Kc(e);case`mrow`:case`math`:return Bc(t);default:return t.length?zc(t):jc(e)}}function Jc(e){return Mc(Z(e))}var Yc=[`a[href]`,`button`,`label`,`summary`,...[`button`,`checkbox`,`combobox`,`link`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`switch`,`tab`,`treeitem`].map(e=>`[role="${e}"]`)].join(`, `);function Xc(e){if(e.hasAttribute(`aria-label`)||!e.closest(Yc))return;let t=e.querySelector(`math`),n=t?Jc(t):``;n&&e.setAttribute(`aria-label`,n)}function Zc(e){for(let t of e.querySelectorAll(`mjx-container`))Xc(t)}var Qc=Symbol.for(`@pie-element/shared-math-rendering-mathjax/speech-worker-failed`);function $c(){let e=globalThis;e[Qc]||(e[Qc]=!0,console.warn(`[math-rendering] MathJax's speech worker did not start, so speech, braille and the explorer are off. A content security policy must allow blob: workers, and scripts and fetches from the asset root. See ${Yo}`))}function el(e){let t=e.webworker;if(!t||t.ready)return;e.options??={};let n=e.options;n.enableSpeech=!1,n.enableBraille=!1,n.speechError=()=>{},t.Post=()=>Promise.reject(Error(`The speech worker did not start`)),t.Terminate(),$c()}function tl(e){let t=e?.adaptor,n=t?.createWorker;!e||!t||!n||(t.createWorker=async(r,i)=>{let a=await n.call(t,r,i);return a.addEventListener(`error`,()=>el(e),{once:!0}),a})}`${Qo}`;var nl={parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`,abs:[`\\left|#1\\right|`,1]},rl=`[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)`,il=/\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/,al=/\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/,ol=/\\embed\{newLine\}\[\]/g,sl=[[`$$`,`$$`],[`$`,`$`],[`\\[`,`\\]`],[`\\(`,`\\)`]],cl=Symbol.for(`@pie-element/shared-math-rendering-mathjax/loading`),ll=`MJX-CHTML-styles`,ul=`PIE-MJX-SVG-styles`,dl=`PIE-MathJax-Menu-Settings`,fl={'mjx-container[overflow="linebreak"][display]':{overflow:`auto clip`,"min-width":`initial !important`}},pl=200,ml=201,hl=202;function gl(e){let t=[...e.matches(`mjx-container`)?[e]:[],...e.querySelectorAll(`mjx-container`)];for(let e of t)for(let t of[e,...e.querySelectorAll(`[data-latex],[data-latex-item]`)])t.removeAttribute(`data-latex`),t.removeAttribute(`data-latex-item`)}function _l(e){for(let[t,n]of sl)if(e.startsWith(t)&&e.endsWith(n))return e.substring(t.length,e.length-n.length);return e}function vl(e){return _l(e.includes(`\\displaystyle`)?e.replace(`\\displaystyle`,``).trim():e)}var yl=`mathjax_ignore`,bl=`mathjax_process`;function xl(e,t){let n=e.closest(`.${yl}, .${bl}`);return n!==null&&t.contains(n)&&!n.classList.contains(bl)}function Sl(e){for(let t of e.querySelectorAll(`[data-latex]`)){if(t.dataset.mathHandled||t.closest(`mjx-container`)||xl(t,e))continue;let n=t.textContent;n&&(t.textContent=`\\(${vl(n)}\\)`.replace(ol,`\\newline `),t.dataset.mathHandled=`true`)}}function Cl(e){for(let t of e.querySelectorAll(`math`))t.closest(`mjx-container`)||t.setAttribute(`displaystyle`,`true`)}function wl(e,t){for(let t of e.querySelectorAll(`math`))if(!t.closest(`mjx-assistive-mml`))return!0;return(t?al:il).test(e.textContent??``)}function Tl(e){return new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s=as(e,{}.url),c={loader:{load:i?[`a11y/assistive-mml`]:[],failed:e=>n(e),"output/svg":{ready:e=>{let t=gs();return El(t)&&Dl(t),e}}},startup:{typeset:!1,ready:()=>{let e=gs(),r=e?.startup,i=El(e);i&&(Dl(e),Ol(e,s.speechLocales),os(e?._?.a11y?.sre_ts?.locales,s.speechLocales)),r?.defaultReady?.(),i&&(kl(r?.document),Al(r?.document),r?.document?.addStyles?.(fl),tl(r?.document)),Promise.resolve(r?.promise).then(()=>t(),n)}},tex:{macros:{...nl}},output:{displayOverflow:`linebreak`},options:{enableMenu:i,menuOptions:{settings:{assistiveMml:i,enrich:!1,inTabOrder:!1}},a11y:{inTabOrder:!1}}};r&&c.tex&&(console.warn(rl),c.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],c.tex.processEscapes=!0),a||(c.chtml={fontURL:``});let l=ss(s.speechLocales);l&&c.options&&(c.options.sre={locale:l}),vs(c,{...s,srcUrl:o}).then(e=>{e||t()},n)})}function El(e){return!!e?.version?.startsWith(`4.`)}function Dl(e){let t=e?._?.output,n=t?.chtml_ts?.CHTML;n&&(n.STYLESHEETID=bs);let r=t?.svg_ts?.SVG;r&&(r.STYLESHEETID=ul)}function Ol(e,t){let n=e?._?.ui?.menu?.Menu?.Menu;if(n){n.MENU_STORAGE=dl;try{let e=localStorage.getItem(dl);if(!e)return;let{assistiveMml:n,locale:r,...i}=JSON.parse(e),a=r===void 0||!t||t.has(r);if(n===void 0&&a)return;a&&r!==void 0&&(i.locale=r),Object.keys(i).length?localStorage.setItem(dl,JSON.stringify(i)):localStorage.removeItem(dl)}catch{}}}function kl(e){if(!e)return;let t=new WeakSet,n=e=>{let n=e.typesetRoot;!n||t.has(n)||(gl(n),t.add(n))};e.addRenderAction?.(`pie-strip-latex`,ml,e=>{for(let t of e.math??[])n(t);return!1},e=>{let t=e.typesetRoot;return t&&gl(t),!1});let r=e.outputJax?.chtmlStyles;r?.id===ll&&(r.id=bs),Nl()}function Al(e){let t=e=>{e.typesetRoot&&Xc(e.typesetRoot)};e?.addRenderAction?.(`pie-name-math`,hl,e=>{for(let n of e.math??[])t(n);return!1},e=>(t(e),!1))}function jl(e){return e instanceof HTMLStyleElement&&xs.includes(e.id)}function Ml(e){ms(`foreign-output-stylesheet`,`another MathJax added <style id="${e.id}"> to <head>`)}function Nl(){let e=document.head,t=[...e.children].find(jl);if(t){Ml(t);return}let n=new MutationObserver(e=>{for(let t of e){let e=[...t.addedNodes].find(jl);if(e){Ml(e),n.disconnect();return}}});n.observe(e,{childList:!0})}function Pl(e){let t=e?.math;if(!t?.remove)return;let n=[...t].filter(e=>(e.state?.()??0)>=pl&&e.typesetRoot?.isConnected===!1);if(n.length!==0){for(let e of[...n].reverse())e.clear?.();t.remove(...n)}}function Fl(e){return new Promise((t,n)=>{let r=e.startup??{};e.startup=r;let i=r.ready;r.ready=()=>{let e=gs()?.startup;i?i.call(r):e?.defaultReady?.(),Promise.resolve(e?.promise).then(()=>t(),n)}})}function Il(e){let t=gs();return t?t.version?t.startup?.promise?Promise.resolve(t.startup.promise).then(()=>void 0):Promise.resolve():Fl(t):Tl(e)}function Ll(e){return Il(e).then(()=>{let e=gs();e&&typeof e.typesetPromise!=`function`&&console.warn(`[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.`)})}function Rl(e){let t=ys,n=t[cl];return n||(n=Ll(e),t[cl]=n),n}function zl(e={}){let t=e.useSingleDollar??!1;return async n=>{if(typeof window>`u`)return;let r=Ss();r&&ms(`mathjax-3-global`,`window.MathJax is MathJax ${r}`),Sl(n),Es(n),Cl(n),fc(n);let i=Rl(e);if(!wl(n,t)){i.catch(()=>{});return}await i;let a=gs();if(await a?.startup?.promise,typeof a?.typesetPromise==`function`){bc(),Pl(a.startup?.document);try{await a.typesetPromise([n])}catch(e){throw a.typesetClear?.([n]),e}gl(n),Zc(n)}}}var Bl=`@pie-lib/math-rendering`,Vl=`@pie-lib/math-rendering@2`,Hl=`pie-print`,Ul=50,Wl=1e4,Gl=null;function Kl(){return!!window[Vl]?.opts?.useSingleDollar}function ql(){return Gl||=zl({useSingleDollar:Kl()}),Gl}function Jl(){if(typeof window>`u`)return null;let e=window[Bl];return typeof e?.renderMath==`function`&&e.renderMath!==Ql?e:null}function Yl(e){let t=e;for(;t;){if(t instanceof Element&&t.localName===Hl)return t;t=t instanceof ShadowRoot?t.host:t.parentNode}return null}function Xl(){let e=window.renderMath;return typeof e==`function`?e:null}async function Zl(e){let t=Yl(e);if(!t)return null;let n=Xl();if(n||t.mathRenderingModuleUrlImported!==!0)return n;let r=Date.now()+Wl;for(;Date.now()<r;){await new Promise(e=>setTimeout(e,Ul));let e=Xl();if(e)return e}return null}var Ql=async e=>{if(typeof window>`u`)return;let t=typeof e==`string`,n;t?(n=document.createElement(`div`),n.innerHTML=e):n=e||document.body;let r=Jl(),i=r||t?null:await Zl(n);return r?(await r.renderMath?.(n),Zc(n)):i&&i!==Ql?(await i(n),Zc(n)):await ql()(n),t?n.innerHTML:void 0},$l={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].`},dragInTheBlank:{blank:`Blank {{index}}`},ebsr:{part:`Part {{index}}`,twoPartQuestion:`Two-Part Question`},editableHtml:{responseAreaToolbar:`Response area`,toolbar:`Editing tools`,buttons:{insertTable:`Insert table`,addTableRow:`Add table row`,removeTableRow:`Remove table row`,addTableColumn:`Add table column`,removeTableColumn:`Remove table column`,removeTable:`Remove table`,tableBorders:`Table borders`,bold:`Bold`,italic:`Italic`,strikethrough:`Strikethrough`,code:`Code`,underline:`Underline`,subscript:`Subscript`,superscript:`Superscript`,insertImage:`Insert image`,insertVideo:`Insert video`,insertAudio:`Insert audio`,cssClasses:`CSS classes`,blockquote:`Blockquote`,heading:`Heading`,insertMath:`Insert math`,spanishCharacters:`Spanish characters (ñ)`,specialCharacters:`Special characters (€)`,textAlignment:`Text alignment`,bulletedList:`Bulleted list`,numberedList:`Numbered list`,done:`Done`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Fill in the Blank Question`,response:`Response {{index}} of {{total}}`},extendedTextEntry:{comment:`Comment`,constructedResponseQuestion:`Constructed Response Question`,response:`Your response`,writtenResponseQuestion:`Written Response Question`},fractionModel:{modelLabel_one:`Model {{index}} of {{total}}: {{selected}} of {{count}} part selected`,modelLabel_other:`Model {{index}} of {{total}}: {{selected}} of {{count}} parts selected`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`,closedEnd:`closed`,elementCorrect:`Correct.`,elementIncorrect:`Incorrect.`,graphLabel:`Number line from {{min}} to {{max}}, with a tick every {{interval}}`,line:`Line from {{left}} ({{leftEnd}}) to {{right}} ({{rightEnd}}).`,openEnd:`open`,plottedNone:`Nothing is plotted.`,pointClosed:`Closed point at {{position}}.`,pointOpen:`Open point at {{position}}.`,rayLeft:`Ray from {{position}} ({{end}}) to the left.`,rayRight:`Ray from {{position}} ({{end}}) to the right.`},hotspot:{correctlySelected:`Correctly selected`,image_one:`Image with {{count}} hotspot`,image_other:`Image with {{count}} hotspots`,shape:`Hotspot {{index}} of {{total}}`,shouldHaveBeenSelected:`Should have been selected`,shouldNotHaveBeenSelected:`Should not have been selected`},imageClozeAssociation:{answerChoice:`Answer choice {{index}} of {{total}}`,image_one:`Image with {{count}} response area`,image_other:`Image with {{count}} response areas`,reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`,responseArea:`Response area {{index}} of {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Inline Dropdown Question`,query:`Query`,queryNumber:`Query {{index}}`,showRationaleForChoices:`Show Rationale for choices`,hideRationaleForChoices:`Hide Rationale for choices`},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.`,drawingArea:`Drawing area`,drawingAreaOverImage:`Drawing area over a background image`,tools:{select:`Select`,freeDraw:`Free Draw`,line:`Line`,rectangle:`Rectangle`,circle:`Circle`,textEntry:`Text Entry`,eraser:`Eraser`}},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,categoryLabel:`Category {{index}} label`,categoryLabelValue:`Category {{index}} label: {{label}}`,category:`Category {{index}}`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`},chartTypes:{bar:`Bar chart`,histogram:`Histogram`,lineDot:`Line chart with dots`,lineCross:`Line chart with crosses`,dotPlot:`Dot plot`,linePlot:`Line plot`},categories_zero:`No categories.`,categories_one:`{{count}} category: {{categories}}.`,categories_other:`{{count}} categories: {{categories}}.`,valueRange:`Values from {{min}} to {{max}}.`,labelledValueRange:`{{label}} from {{min}} to {{max}}.`},graphing:{graph:`Coordinate graph`,axisRange:`{{axis}} axis from {{min}} to {{max}}.`,plotted_zero:`Nothing plotted.`,plotted_one:`{{count}} object plotted: {{marks}}.`,plotted_other:`{{count}} objects plotted: {{marks}}.`,shadedRegion:`Shaded region`,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`,markLabel:`Label at ({{x}}, {{y}})`,correctMarkLabel:`Correct label at ({{x}}, {{y}})`,redo:`Redo`,reset:`Reset`,keyLegend:{missingRequiredLabel:`Missing Required Label`,answerKeyCorrect:`Answer Key Correct`,answerKeyCorrectLabel:`Answer Key Correct Label`,studentIncorrect:`Student Incorrect`,incorrectStudentLabel:`Incorrect Student Label`,studentCorrect:`Student Correct`,studentCorrectLabel:`Student Correct Label`}},mathInline:{keypadInstructions:`This field supports both keypad and keyboard input. Use the keyboard to access and interact with the on-screen math keypad, which accepts LaTeX markup. Use the down arrow key to open the keypad and navigate its buttons. Use the escape key to close the keypad and return to the input field.`,mathEquationResponseQuestion:`Math Equation Response Question`,mathResponseQuestion:`Math Response Question`,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.`},mathInput:{enterAnswer:`Enter answer`},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}}.`,multipleChoiceQuestion:`Multiple Choice Question`,multipleCorrectAnswerQuestion:`Multiple Correct Answer Question`,multipleSelectQuestion:`Multiple Select Question`},rubric:{rubric:`Rubric`,showRubric:`Show Rubric`,hideRubric:`Hide Rubric`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`,textGroup:`Selectable text`,textGroupWithLimit:`Selectable text, select up to {{max}}`,tokenPosition:`{{index}} of {{total}}`},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`,show:`Show`,hide:`Hide`,showRationale:`Show Rationale`,hideRationale:`Hide Rationale`,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`,playAudio:`Play audio`}},eu={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`},dragInTheBlank:{blank:`Espacio en blanco {{index}}`},ebsr:{part:`Parte {{index}}`,twoPartQuestion:`Pregunta de dos partes`},editableHtml:{responseAreaToolbar:`Área de respuesta`,toolbar:`Herramientas de edición`,buttons:{insertTable:`Insertar tabla`,addTableRow:`Agregar fila a la tabla`,removeTableRow:`Eliminar fila de la tabla`,addTableColumn:`Agregar columna a la tabla`,removeTableColumn:`Eliminar columna de la tabla`,removeTable:`Eliminar tabla`,tableBorders:`Bordes de la tabla`,bold:`Negrita`,italic:`Cursiva`,strikethrough:`Tachado`,code:`Código`,underline:`Subrayado`,subscript:`Subíndice`,superscript:`Superíndice`,insertImage:`Insertar imagen`,insertVideo:`Insertar video`,insertAudio:`Insertar audio`,cssClasses:`Clases CSS`,blockquote:`Cita en bloque`,heading:`Encabezado`,insertMath:`Insertar expresión matemática`,spanishCharacters:`Caracteres del español (ñ)`,specialCharacters:`Caracteres especiales (€)`,textAlignment:`Alineación del texto`,bulletedList:`Lista con viñetas`,numberedList:`Lista numerada`,done:`Listo`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Pregunta para completar espacios en blanco`,response:`Respuesta {{index}} de {{total}}`},extendedTextEntry:{comment:`Comentario`,constructedResponseQuestion:`Pregunta de respuesta construida`,response:`Tu respuesta`,writtenResponseQuestion:`Pregunta de respuesta escrita`},fractionModel:{modelLabel_one:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} parte seleccionada`,modelLabel_other:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} partes seleccionadas`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`,closedEnd:`cerrado`,elementCorrect:`Correcto.`,elementIncorrect:`Incorrecto.`,graphLabel:`Recta numérica de {{min}} a {{max}}, con una marca cada {{interval}}`,line:`Línea de {{left}} ({{leftEnd}}) a {{right}} ({{rightEnd}}).`,openEnd:`abierto`,plottedNone:`No hay nada marcado en la recta.`,pointClosed:`Punto cerrado en {{position}}.`,pointOpen:`Punto abierto en {{position}}.`,rayLeft:`Rayo desde {{position}} ({{end}}) hacia la izquierda.`,rayRight:`Rayo desde {{position}} ({{end}}) hacia la derecha.`},hotspot:{correctlySelected:`Seleccionada correctamente`,image_one:`Imagen con {{count}} zona activa`,image_other:`Imagen con {{count}} zonas activas`,shape:`Zona activa {{index}} de {{total}}`,shouldHaveBeenSelected:`Debía seleccionarse`,shouldNotHaveBeenSelected:`No debía seleccionarse`},imageClozeAssociation:{answerChoice:`Opción de respuesta {{index}} de {{total}}`,image_one:`Imagen con {{count}} área de respuesta`,image_other:`Imagen con {{count}} áreas de respuesta`,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`,responseArea:`Área de respuesta {{index}} de {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Pregunta con menú desplegable`,query:`Consulta`,queryNumber:`Consulta {{index}}`,showRationaleForChoices:`Mostrar justificación de las opciones`,hideRationaleForChoices:`Ocultar justificación de las opciones`},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`,drawingArea:`Área de dibujo`,drawingAreaOverImage:`Área de dibujo sobre una imagen de fondo`,tools:{select:`Seleccionar`,freeDraw:`Dibujo libre`,line:`Línea`,rectangle:`Rectángulo`,circle:`Círculo`,textEntry:`Entrada de texto`,eraser:`Borrador`}},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,categoryLabel:`Etiqueta de la categoría {{index}}`,categoryLabelValue:`Etiqueta de la categoría {{index}}: {{label}}`,category:`Categoría {{index}}`,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`},chartTypes:{bar:`Gráfico de barras`,histogram:`Histograma`,lineDot:`Gráfico de líneas con puntos`,lineCross:`Gráfico de líneas con cruces`,dotPlot:`Diagrama de puntos`,linePlot:`Diagrama de líneas`},categories_zero:`Sin categorías.`,categories_one:`{{count}} categoría: {{categories}}.`,categories_other:`{{count}} categorías: {{categories}}.`,valueRange:`Valores de {{min}} a {{max}}.`,labelledValueRange:`{{label}} de {{min}} a {{max}}.`},graphing:{graph:`Gráfica de coordenadas`,axisRange:`Eje {{axis}} de {{min}} a {{max}}.`,plotted_zero:`Nada trazado.`,plotted_one:`{{count}} objeto trazado: {{marks}}.`,plotted_other:`{{count}} objetos trazados: {{marks}}.`,shadedRegion:`Región sombreada`,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`,markLabel:`Etiqueta en ({{x}}, {{y}})`,correctMarkLabel:`Etiqueta correcta en ({{x}}, {{y}})`,redo:`Rehacer`,reset:`Reiniciar`,keyLegend:{missingRequiredLabel:`Falta una etiqueta obligatoria`,answerKeyCorrect:`Clave de respuesta correcta`,answerKeyCorrectLabel:`Etiqueta correcta de la clave de respuesta`,studentIncorrect:`Respuesta incorrecta del estudiante`,incorrectStudentLabel:`Etiqueta incorrecta del estudiante`,studentCorrect:`Respuesta correcta del estudiante`,studentCorrectLabel:`Etiqueta correcta del estudiante`}},mathInline:{keypadInstructions:`Este campo admite la entrada con el teclado en pantalla y con el teclado físico. Usa el teclado físico para acceder al teclado matemático en pantalla e interactuar con él; este acepta notación LaTeX. Usa la tecla de flecha hacia abajo para abrir el teclado en pantalla y recorrer sus botones. Usa la tecla Escape para cerrar el teclado en pantalla y volver al campo de entrada.`,mathEquationResponseQuestion:`Pregunta de respuesta con ecuación matemática`,mathResponseQuestion:`Pregunta de respuesta matemática`,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.`},mathInput:{enterAnswer:`Escribe la respuesta`},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}}.`,multipleChoiceQuestion:`Pregunta de opción múltiple`,multipleCorrectAnswerQuestion:`Pregunta con varias respuestas correctas`,multipleSelectQuestion:`Pregunta de selección múltiple`},rubric:{rubric:`Rúbrica`,showRubric:`Mostrar rúbrica`,hideRubric:`Ocultar rúbrica`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`,textGroup:`Texto seleccionable`,textGroupWithLimit:`Texto seleccionable, selecciona hasta {{max}}`,tokenPosition:`{{index}} de {{total}}`},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`,show:`Mostrar`,hide:`Ocultar`,showRationale:`Mostrar justificación`,hideRationale:`Ocultar justificación`,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`,playAudio:`Reproducir audio`}},Q=e=>typeof e==`string`,tu=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},nu=e=>e==null?``:``+e,ru=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},iu=/###/g,au=e=>e&&e.indexOf(`###`)>-1?e.replace(iu,`.`):e,ou=e=>!e||Q(e),su=(e,t,n)=>{let r=Q(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(ou(e))return{};let t=au(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return ou(e)?{}:{obj:e,k:au(r[i])}},cu=(e,t,n)=>{let{obj:r,k:i}=su(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=su(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=su(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},lu=(e,t,n,r)=>{let{obj:i,k:a}=su(e,t,Object);i[a]=i[a]||[],i[a].push(n)},uu=(e,t)=>{let{obj:n,k:r}=su(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},du=(e,t,n)=>{let r=uu(e,n);return r===void 0?uu(t,n):r},fu=(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]):fu(e[r],t[r],n):e[r]=t[r]);return e},pu=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),mu={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},hu=e=>Q(e)?e.replace(/[&<>"'\/]/g,e=>mu[e]):e,gu=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}},_u=[` `,`,`,`?`,`!`,`;`],vu=new gu(20),yu=(e,t,n)=>{t||=``,n||=``;let r=_u.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=vu.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},bu=(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},xu=e=>e?.replace(/_/g,`-`),Su={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)}},Cu=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Su,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)}},wu=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])})}},Tu=class extends wu{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=uu(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:bu(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),cu(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=uu(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?fu(s,n,i):s={...s,...n},cu(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}},Eu={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}},Du=Symbol(`i18next/PATH_KEY`);function Ou(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Du?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function ku(e,t){let{[Du]:n}=e(Ou()),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 Au={},ju=e=>!Q(e)&&typeof e!=`boolean`&&typeof e!=`number`,Mu=class e extends wu{constructor(e,t={}){super(),ru([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Cu.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=ju(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&&!yu(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=ku(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?ku(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):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let ee=ju(E),te=Object.prototype.toString.apply(E);if(y&&E&&ee&&_.indexOf(te)<0&&!(Q(v)&&Array.isArray(E))){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,E,{...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(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:ju(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[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=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?T: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);w&&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}`]||T)})}):n(e,s,T))}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=Eu.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`?ku(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,!Au[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(Au[`${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}},Nu=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Cu.create(`languageUtils`)}getScriptPartFromCode(e){if(e=xu(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=xu(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}},Pu={zero:0,one:1,two:2,few:3,many:4,other:5},Fu={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},Iu=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Cu.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=xu(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!`),Fu;if(!e.match(/-|_/))return Fu;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)=>Pu[e]-Pu[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))}},Lu=(e,t,n,r=`.`,i=!0)=>{let a=du(e,t,n);return!a&&i&&Q(n)&&(a=bu(e,n,r),a===void 0&&(a=bu(t,n,r))),a},Ru=e=>e.replace(/\$/g,`$$$$`),zu=class{constructor(e={}){this.logger=Cu.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?hu:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?pu(i):a||`{{`,this.suffix=o?pu(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?pu(d):f||pu(`$t(`),this.nestingSuffix=p?pu(p):m||pu(`)`),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=Lu(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(Lu(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=>Ru(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Ru(this.escape(e)):Ru(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=nu(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(`${pu(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=nu(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}},Bu=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}},Vu=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(xu(r),i),t[o]=s),s(n)}},Hu=e=>(t,n,r)=>e(xu(n),r)(t),Uu=class{constructor(e={}){this.logger=Cu.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Vu:Hu;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()]=Vu(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}=Bu(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)}},Wu=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Gu=class extends wu{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Cu.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=>{lu(n.loaded,[i],a),Wu(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)}}},Ku=()=>({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}),qu=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),Ju=()=>{},Yu=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},Xu=`__i18next_supportNoticeShown`,Zu=()=>!!(typeof globalThis<`u`&&globalThis[Xu]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env&&process.env.NODE_ENV===`production`),Qu=()=>{typeof globalThis<`u`&&(globalThis[Xu]=!0)},$u=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)),ed=class e extends wu{constructor(e={},t){if(super(),this.options=qu(e),this.services={},this.logger=Cu,this.modules={external:[]},Yu(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=Ku();this.options={...n,...this.options,...qu(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&&!$u(this)&&!Zu()&&(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 💙`),Qu());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Cu.init(r(this.modules.logger),this.options):Cu.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:Uu;let t=new Nu(this.options);this.store=new Tu(this.options.resources,this.options);let i=this.services;i.logger=Cu,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new Iu(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 zu(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Gu(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 Mu(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||=Ju,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=tu(),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=Ju){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=tu();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||=Ju,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`&&Eu.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=tu();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=ku(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=ku(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=ku(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=tu();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=tu();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 Nu(Ku());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=Ju){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 Tu(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={...Ku().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new zu(n)}return a.translator=new Mu(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();ed.createInstance,ed.dir,ed.init,ed.loadResources,ed.reloadResources,ed.use,ed.changeLanguage,ed.getFixedT,ed.t,ed.exists,ed.setDefaultNamespace,ed.hasLoadedNamespace,ed.loadNamespaces,ed.loadLanguages,ed.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:$l,es:eu}});var{translator:td}={translator:{...ed,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 ed.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]};function $(e,t,n={}){return td.t(`translation:vennClassification:${e}`,{lng:t,...n,interpolation:{escapeValue:!1}})}function nd(e,t){return td.t(`common:${e}`,{lng:t})}function rd(e){return(e||``).replace(/<[^>]+>/g,` `).replace(/\s+/g,` `).trim()}function id(e,t){let n=(e.imageAlt??``).trim();return(e.imageUrl??``).trim()&&n?n:rd(e.label??``)||$(`tileFallbackName`,t)}function ad(e,t,n,r){let i=[id(e,r),t===null?$(`tileNotPlaced`,r):$(`tileInRegion`,r,{region:t})];return n===`correct`&&i.push($(`tileCorrect`,r)),n===`incorrect`&&i.push($(`tileIncorrect`,r)),i.join(`, `)}var od=xr(`<img alt="" class="tile-img svelte-1hgaksk" aria-hidden="true" draggable="false"/>`),sd=xr(`<span></span>`),cd=xr(`<span class="venn-badge venn-badge-correct svelte-1hgaksk" aria-hidden="true"><svg viewBox="0 0 24 24" width="14" height="14" fill="currentColor"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"></path></svg></span>`),ld=xr(`<span class="venn-badge venn-badge-incorrect svelte-1hgaksk" aria-hidden="true"><svg viewBox="0 0 24 24" width="14" height="14" fill="currentColor"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path></svg></span>`),ud=xr(`<button type="button"><span><!> <!></span> <!></button>`),dd={hash:`svelte-1hgaksk`,code:`.venn-tile.svelte-1hgaksk {position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:64px;min-height:44px;padding:8px 14px;border:1.5px solid var(--pie-border-dark, #334155);border-radius:10px;background:var(--pie-background, #ffffff);color:var(--pie-text, #0f172a);font-size:14px;font-weight:500;box-shadow:0 1px 2px rgba(15, 23, 42, 0.06);cursor:grab;touch-action:none;user-select:none;transition:box-shadow 120ms ease, transform 120ms ease, background 120ms ease;}.venn-tile.svelte-1hgaksk:focus-visible,
|
|
41
41
|
.venn-tile.focused.svelte-1hgaksk {outline:2px solid var(--vc-focus-ring, #1565c0);outline-offset:2px;}.venn-tile.svelte-1hgaksk:hover:not(:disabled) {background:var(--pie-background-dark, #f8fafc);}.venn-tile.held.svelte-1hgaksk {cursor:grabbing;box-shadow:0 6px 18px rgba(15, 23, 42, 0.18);transform:translateY(-1px);background:var(--pie-faded-primary, #eef2ff);}.venn-tile.invisible.svelte-1hgaksk {visibility:hidden;}.venn-tile.ghost.svelte-1hgaksk {pointer-events:none;cursor:grabbing;box-shadow:0 10px 24px rgba(15, 23, 42, 0.22);transform:rotate(-1.5deg);background:var(--pie-background, #ffffff);opacity:0.96;}.venn-tile.correct.svelte-1hgaksk {border-color:var(--pie-correct-tertiary, #0ea449);}.venn-tile.incorrect.svelte-1hgaksk {border-color:var(--pie-incorrect-icon, #bf0d00);}.venn-tile.svelte-1hgaksk:disabled {cursor:default;}.tile-body.svelte-1hgaksk {display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;pointer-events:none;max-width:220px;}.tile-body-image.svelte-1hgaksk {flex-direction:column;gap:4px;}.tile-img.svelte-1hgaksk {width:40px;height:40px;object-fit:contain;flex-shrink:0;}.tile-label.svelte-1hgaksk {pointer-events:none;text-align:center;line-height:1.25;word-break:break-word;}.tile-label-below.svelte-1hgaksk {font-size:12px;font-weight:600;}.venn-tile.fit.svelte-1hgaksk {box-sizing:border-box;width:100%;height:100%;min-width:0;min-height:0;padding:6px 10px;}.fit.svelte-1hgaksk .tile-body:where(.svelte-1hgaksk) {max-width:100%;max-height:100%;overflow:hidden;}.fit.svelte-1hgaksk .tile-label:where(.svelte-1hgaksk) {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;}.fit.svelte-1hgaksk .tile-label-below:where(.svelte-1hgaksk) {-webkit-line-clamp:1;line-clamp:1;}.venn-badge.svelte-1hgaksk {position:absolute;top:-8px;right:-8px;width:20px;height:20px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;color:var(--pie-background, #ffffff);}.venn-badge-correct.svelte-1hgaksk {background:var(--pie-correct-tertiary, #0ea449);}.venn-badge-incorrect.svelte-1hgaksk {background:var(--pie-incorrect-icon, #bf0d00);}
|
|
42
42
|
@media (prefers-reduced-motion: reduce) {.venn-tile.svelte-1hgaksk {transition:none;}
|
|
43
|
-
}`};function
|
|
43
|
+
}`};function fd(e,t){Be(t,!0),ei(e,dd);let n=J(t,`id`,7),r=J(t,`label`,7),i=J(t,`imageUrl`,7),a=J(t,`imageAlt`,7),o=J(t,`name`,7),s=J(t,`language`,7),c=J(t,`correctness`,7,`neutral`),l=J(t,`held`,7,!1),u=J(t,`invisible`,7,!1),d=J(t,`ghost`,7,!1),f=J(t,`disabled`,7,!1),p=J(t,`focused`,7,!1),m=J(t,`fit`,7,!1),h=J(t,`onpointerdown`,7),g=J(t,`onkeydown`,7),_=J(t,`onkeyup`,7),v=J(t,`onfocus`,7),y=J(t,`onclick`,7),b=I(()=>o()??id({label:r(),imageUrl:i(),imageAlt:a()},s())),x=I(()=>!!(i()??``).trim()),S=I(()=>!!(r()??``).replace(/<[^>]*>/g,``).trim());var C={get id(){return n()},set id(e){n(e),z()},get label(){return r()},set label(e){r(e),z()},get imageUrl(){return i()},set imageUrl(e){i(e),z()},get imageAlt(){return a()},set imageAlt(e){a(e),z()},get name(){return o()},set name(e){o(e),z()},get language(){return s()},set language(e){s(e),z()},get correctness(){return c()},set correctness(e=`neutral`){c(e),z()},get held(){return l()},set held(e=!1){l(e),z()},get invisible(){return u()},set invisible(e=!1){u(e),z()},get ghost(){return d()},set ghost(e=!1){d(e),z()},get disabled(){return f()},set disabled(e=!1){f(e),z()},get focused(){return p()},set focused(e=!1){p(e),z()},get fit(){return m()},set fit(e=!1){m(e),z()},get onpointerdown(){return h()},set onpointerdown(e){h(e),z()},get onkeydown(){return g()},set onkeydown(e){g(e),z()},get onkeyup(){return _()},set onkeyup(e){_(e),z()},get onfocus(){return v()},set onfocus(e){v(e),z()},get onclick(){return y()},set onclick(e){y(e),z()}},w=ud();let T;var E=Yt(w);let ee;var te=Yt(E),ne=e=>{var t=od();vn(()=>q(t,`src`,i())),K(e,t)};Hr(te,e=>{G(x)&&e(ne)});var re=H(te,2),ie=e=>{var t=sd();let n;$r(t,()=>qo(r()),!0),N(t),vn(()=>n=oi(t,1,`tile-label svelte-1hgaksk`,null,n,{"tile-label-below":G(x)})),K(e,t)};Hr(re,e=>{G(S)&&e(ie)}),N(E);var D=H(E,2),ae=e=>{K(e,cd())},oe=e=>{K(e,ld())};return Hr(D,e=>{c()===`correct`?e(ae):c()===`incorrect`&&e(oe,1)}),N(w),vn(()=>{T=oi(w,1,`venn-tile svelte-1hgaksk`,null,T,{held:l(),focused:p(),invisible:u(),ghost:d(),fit:m(),correct:c()===`correct`,incorrect:c()===`incorrect`}),q(w,`data-tile-id`,n()),q(w,`aria-label`,G(b)),q(w,`aria-pressed`,l()),q(w,`aria-hidden`,d()),w.disabled=f(),q(w,`tabindex`,d()||f()?-1:0),ee=oi(E,1,`tile-body svelte-1hgaksk`,null,ee,{"tile-body-image":G(x)})}),fr(`pointerdown`,w,function(...e){h()?.apply(this,e)}),fr(`keydown`,w,function(...e){g()?.apply(this,e)}),fr(`keyup`,w,function(...e){_()?.apply(this,e)}),dr(`focus`,w,function(...e){v()?.apply(this,e)}),fr(`click`,w,function(...e){y()?.apply(this,e)}),K(e,w),Ve(C)}pr([`pointerdown`,`keydown`,`keyup`,`click`]),Ei(fd,{id:{},label:{},imageUrl:{},imageAlt:{},name:{},language:{},correctness:{},held:{},invisible:{},ghost:{},disabled:{},focused:{},fit:{},onpointerdown:{},onkeydown:{},onkeyup:{},onfocus:{},onclick:{}},[],[],{mode:`open`});var pd=xr(`<div role="region" data-region-key="tray"><div class="tray-label svelte-1ogsh8s"> </div> <div class="tray-items svelte-1ogsh8s"><!></div></div>`),md={hash:`svelte-1ogsh8s`,code:`.venn-tray.svelte-1ogsh8s {border:1.5px dashed var(--pie-border-dark, #64748b);border-radius:12px;padding:14px 16px;background:var(--pie-surface, #f8fafc);min-height:120px;transition:background 120ms ease, border-color 120ms ease;}.venn-tray.drop-target.svelte-1ogsh8s {background:var(--pie-faded-primary, #e0f2fe);border-color:var(--pie-tertiary, #0284c7);}.venn-tray.focused.svelte-1ogsh8s {outline:2px solid var(--vc-focus-ring, #1565c0);outline-offset:2px;}.tray-label.svelte-1ogsh8s {font-size:12px;font-weight:600;color:var(--pie-text, #475569);text-transform:uppercase;letter-spacing:0.05em;margin-bottom:8px;}.tray-items.svelte-1ogsh8s {display:flex;flex-wrap:wrap;gap:10px;}
|
|
44
44
|
@media (prefers-reduced-motion: reduce) {.venn-tray.svelte-1ogsh8s {transition:none;}
|
|
45
|
-
}`};function Ru(e,t){Be(t,!0),$r(e,Lu);let n=Y(t,`isDropTarget`,7,!1),r=Y(t,`focused`,7,!1),i=Y(t,`label`,7),a=Y(t,`onpointerenter`,7),o=Y(t,`onpointerleave`,7),s=Y(t,`children`,7);var c={get isDropTarget(){return n()},set isDropTarget(e=!1){n(e),z()},get focused(){return r()},set focused(e=!1){r(e),z()},get label(){return i()},set label(e){i(e),z()},get onpointerenter(){return a()},set onpointerenter(e){a(e),z()},get onpointerleave(){return o()},set onpointerleave(e){o(e),z()},get children(){return s()},set children(e){s(e),z()}},l=Iu();let u;var d=Yt(l),f=Zt(d,!0),p=H(d,2),m=Yt(p),h=e=>{var t=Cr();Rr(Xt(t),s),q(e,t)};return Vr(m,e=>{s()&&e(h)}),N(p),N(l),U(()=>{u=ai(l,1,`venn-tray svelte-1ogsh8s`,null,u,{"drop-target":n(),focused:r()}),J(l,`aria-label`,i()),Ar(f,i())}),ur(`pointerenter`,l,function(...e){a()?.apply(this,e)}),ur(`pointerleave`,l,function(...e){o()?.apply(this,e)}),q(e,l),Ve(c)}Ti(Ru,{isDropTarget:{},focused:{},label:{},onpointerenter:{},onpointerleave:{},children:{}},[],[],{mode:`open`});var zu=br(`<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>`),Bu={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(--vc-focus-ring, #1565c0);outline-offset:2px;}.teacher-instructions-content.svelte-1jhejbv {padding-top:1rem;}`};function Vu(e,t){Be(t,!0),$r(e,Bu);let n=Y(t,`html`,7),r=Y(t,`language`,7),i=Mt(!1),a=`venn-teacher-instructions-${Math.random().toString(36).slice(2,10)}`;var o={get html(){return n()},set html(e){n(e),z()},get language(){return r()},set language(e){r(e),z()}},s=zu(),c=Yt(s),l=Zt(c,!0),u=H(c,2);return Qr(u,()=>Ko(n()),!0),N(u),N(s),U(e=>{J(c,`aria-expanded`,K(i)),J(c,`aria-controls`,a),Ar(l,e),J(u,`id`,a),J(u,`hidden`,!K(i))},[()=>Tu(K(i)?`hideTeacherInstructions`:`showTeacherInstructions`,r())]),dr(`click`,c,()=>V(i,!K(i))),q(e,s),Ve(o)}fr([`click`]),Ti(Vu,{html:{},language:{}},[],[],{mode:`open`});function Hu(e){return!e||e.length===0?``:[...e].sort((e,t)=>e-t).join(`,`)}function Uu(e){return!e||e.length===0?[]:[...e].sort((e,t)=>e-t)}function Wu(e,t){if(!e||!t)return!e==!t&&(e?.length??0)===(t?.length??0);if(e.length!==t.length)return!1;let n=Uu(e),r=Uu(t);for(let e=0;e<n.length;e++)if(n[e]!==r[e])return!1;return!0}function Gu(e){let t=[],n=1<<e;for(let r=0;r<n;r++){let n=[];for(let t=0;t<e;t++)r&1<<t&&n.push(t);t.push(n)}return t}function Ku(e,t,n){let r=Uu(t),i=t=>e[t]?.label??$(`setNumber`,n,{number:t+1}),a=r.map(i);return r.length===0?e.length===2?$(`regionNeither`,n,{first:i(0),second:i(1)}):$(`regionNoneOf`,n,{sets:e.map((e,t)=>i(t)).join(`, `)}):r.length===1?$(`regionOnly`,n,{set:a[0]}):a.join($(`regionAndSeparator`,n))}function qu(e,t){let n=Hu(t),r=e.regionLabels?.[n];return typeof r==`string`&&r.trim().length>0?r:Ku(e.circles??[],t,e.language)}var Ju={w:120,h:52},Yu={w:120,h:84},Xu=.6;function Zu(e){return Math.min(1,44/Math.min(e.w,e.h))}var Qu={side:24,top:40,radius:236,centerDistance:200,outsideGap:12,outsideStripHeight:136},$u=.05;function ed(e=1,t=0){let n=Qu.side*e,r=Qu.radius*e,i=Qu.centerDistance*e,a=Qu.top*e+r,o=Qu.outsideGap*e,s=Math.max(Qu.outsideStripHeight*e,t);return{width:2*n+2*r+i,height:a+r+o+s,scale:e,outsideGap:o,outsideStripHeight:s,circles:[{cx:n+r,cy:a,r},{cx:n+r+i,cy:a,r}]}}function td(){return ed()}function nd(e,t){return`min(100%, max(min(720px, ${Xu*100*e.width/e.height}vh), ${e.width*Zu(t)}px))`}function rd(e,t,n){return e>0?Math.max(Zu(n),Math.min(1,e/t.width)):1}function id(e,t){return Math.max(0,Math.floor((e+8)/(t.w+8)+1e-9))}function ad(e,t){return t>e.r?-1:Math.sqrt(e.r*e.r-t*t)}function od(e,t,n){let r=ad(e,Math.max(Math.abs(t-e.cy),Math.abs(n-e.cy)));return r<0?null:[e.cx-r,e.cx+r]}function sd(e,t,n){return ad(e,t<=e.cy&&e.cy<=n?0:Math.min(Math.abs(t-e.cy),Math.abs(n-e.cy)))}function cd(e,t,n,r,i){let a=od(t,r,i),o=od(n,r,i),s,c;if(e===`0`){if(!a)return null;let e=sd(n,r,i);[s,c]=[a[0],e<0?a[1]:Math.min(a[1],n.cx-e)]}else if(e===`1`){if(!o)return null;let e=sd(t,r,i);[s,c]=[e<0?o[0]:Math.max(o[0],t.cx+e),o[1]]}else{if(!a||!o)return null;[s,c]=[Math.max(a[0],o[0]),Math.min(a[1],o[1])]}return c>s?[s,c]:null}function ld(e,t,n,r){let i=r.h+8,a=t.cy,o=Math.max(t.r,n.r);return[0,.5].map(s=>{let c=[],l=Math.ceil(o/i)+1;for(let o=-l;o<=l;o++){let l=a+(o+s)*i,u=cd(e,t,n,l-r.h/2-6,l+r.h/2+6);if(!u)continue;let d=u[0]+6,f=u[1]-6,p=id(f-d,r);p>0&&c.push({y:l,lo:d,hi:f,n:p})}return c})}function ud(e){return e.reduce((e,t)=>e+t.n,0)}function dd(e,t,n){let r=e.width-6,i=id(r-6,n),a=n.h+8,o=e.height-t,s=i*Math.max(0,Math.floor((o-12+8)/a+1e-9)),c={x:e.width/2,y:t+o/2};return{capacity:s,slots:e=>{if(e<=0)return[];let l=Math.min(e,s),u=i>0?Math.ceil(l/i):0,d=t+(o-(u*a-8))/2;return gd(hd(Array.from({length:u},(e,t)=>({y:d+n.h/2+t*a,lo:6,hi:r,n:i})),l,n),e,c)}}}function fd(e){return{x:e.x+e.w/2,y:e.y+e.h/2}}function pd(e,t,n){let r=t*n.w+(t-1)*8,i=(e.lo+e.hi)/2-r/2+n.w/2;return Array.from({length:t},(t,r)=>({x:i+r*(n.w+8),y:e.y}))}function md(e,t,n){let r=[...e].sort((e,n)=>Math.abs(e.y-t)-Math.abs(n.y-t)||e.y-n.y),i=[],a=0;for(let e of r){if(a>=n)break;i.push(e),a+=e.n}return i.sort((e,t)=>e.y-t.y)}function hd(e,t,n){let r=[],i=t;for(let t of e){let e=Math.min(t.n,i);r.push(...pd(t,e,n)),i-=e}return r}function gd(e,t,n){let r=e[e.length-1]??n;for(;e.length<t;)e.push({...r});return e}function _d(e,t,n,r){let i=Math.max(...e.map(ud));return a=>{if(a<=0)return[];let o=Math.min(a,i),s=null,c=[1/0,1/0];for(let n of e){if(ud(n)<o)continue;let e=md(n,t,o),r=Math.abs(e.reduce((e,t)=>e+t.y,0)/e.length-t),i=[e.length,r];(i[0]<c[0]||i[0]===c[0]&&i[1]<c[1]-1e-9)&&(s=e,c=i)}return gd(s?hd(s,o,n):[],a,r)}}function vd(e,t,n){let r=t.cy,i=0,a=Math.min(t.r,n.r);for(let o=0;o<40;o++){let o=(i+a)/2,s=cd(e,t,n,r-o,r+o);s&&s[1]-s[0]>=2*o?i=o:a=o}let o=cd(e,t,n,r-i,r+i)??[0,0];return{x:o[0]+1,y:r-i+1,w:o[1]-o[0]-2,h:2*i-2}}function yd(e,t,n){let[r,i]=t.circles;return Math.max(...ld(e,r,i,n).map(ud))}var bd=[`0`,`0,1`,`1`];function xd(e,t=Ju){let n=ed();for(let r=1;;r++){let i=n;if(bd.every(n=>yd(n,i,t)>=(e[n]??0)))break;n=ed(1+r*$u)}let r=e[``]??0,i=id(n.width-12,t),a=Math.ceil(r/i)*(t.h+8)-8+12;return a>n.outsideStripHeight?ed(n.scale,a):n}function Sd(e,t=td(),n=Ju){if(e.circles?.length!==2)throw Error(`buildLayout2Set requires exactly 2 circles (got ${e.circles?.length??0})`);let[r,i]=t.circles,a=Gu(2),o=Math.max(r.cy+r.r,i.cy+i.r),s=Math.min(t.height-t.outsideStripHeight,o+t.outsideGap),c=(e,t,n)=>(r,i)=>{let a=r-e,o=i-t;return a*a+o*o<=n*n},l=c(r.cx,r.cy,r.r),u=c(i.cx,i.cy,i.r),d={};return{geometry:t,cell:n,regions:a.map(a=>{let o=Hu(a),c=qu(e,a),f,p,m,h;if(o===``)f=(e,n)=>e>=0&&e<=t.width&&n>=0&&n<=t.height&&!l(e,n)&&!u(e,n),p={x:0,y:s,w:t.width,h:t.height-s},{capacity:m,slots:h}=dd(t,s,n);else if(o===`0`||o===`1`||o===`0,1`){f=o===`0`?(e,t)=>l(e,t)&&!u(e,t):o===`1`?(e,t)=>u(e,t)&&!l(e,t):(e,t)=>l(e,t)&&u(e,t),p=vd(o,r,i);let e=ld(o,r,i,n);m=Math.max(...e.map(ud)),h=_d(e,r.cy,n,fd(p))}else f=()=>!1,p={x:0,y:0,w:0,h:0},m=0,h=()=>[];let g={region:a,key:o,label:c,hitRect:p,pointInRegion:f,capacity:m,slots:h};return d[o]=g,g}),regionByKey:d,outsideStripTop:s}}function Cd(e,t,n){for(let r of[`0,1`,`0`,`1`,``]){let i=e.regionByKey[r];if(i?.pointInRegion(t,n))return i}return null}function wd(e,t){let n={...e||{}},r=e?.placements??{},i={};for(let[e,t]of Object.entries(r))t==null?i[e]=null:Array.isArray(t)?i[e]=Uu(t):i[e]=null;if(t?.tiles)for(let e of t.tiles)e.id in i||(i[e.id]=null);return n.placements=i,n.completed=Td(t,{...n,placements:i}),n}function Td(e,t){if(!e||!Array.isArray(e.tiles)||e.tiles.length===0)return!1;let n=t?.placements??{};for(let t of e.tiles)if(n[t.id]==null)return!1;return!0}function Ed({model:e,session:t,tileId:n,placement:r}){let i=wd(t,e),a={...i,placements:{...i.placements,[n]:r===null?null:Uu(r)}};return a.completed=Td(e,a),a}function Dd(e,t){let n=e?.placements?.[t];return Array.isArray(n)?Uu(n):null}function Od(e,t,n){let r=Dd(e,t);return r===null||n===null?r===n:Wu(r,n)}function kd(e,t){let n=t?.placements??{};return(e.tiles||[]).filter(e=>n[e.id]==null)}function Ad(e,t){let n=t?.placements??{},r={};for(let t of e.tiles||[]){let e=n[t.id];if(e==null)continue;let i=Uu(e).join(`,`);r[i]||(r[i]=[]),r[i].push(t)}return r}var jd=br(`<div class="venn-prompt svelte-gkcqor"></div>`),Md=Sr(`<svg class="toggle-icon svelte-gkcqor" preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-283 359 34 35" aria-hidden="true"><circle cx="-266" cy="375.9" r="14" fill="var(--pie-tertiary-light, #bce2ff)"></circle><path d="M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z" fill="var(--pie-tertiary-light, #bce2ff)"></path><polygon points="-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6" fill="var(--pie-tertiary, #1a9cff)"></polygon></svg>`),Nd=Sr(`<svg class="toggle-icon svelte-gkcqor" preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-129.5 127 34 35" aria-hidden="true"><path style="fill: var(--pie-border-light, #D0CAC5); stroke: var(--pie-border-light, #E6E3E0); stroke-width: 0.75; stroke-miterlimit: 10;" d="M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z"></path><path style="fill: var(--pie-border-light, #B3ABA4); stroke: var(--pie-border-light, #CDC7C2); stroke-width: 0.5; stroke-miterlimit: 10;" d="M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"></path><circle cx="-114.2" cy="143.5" r="14" fill="var(--pie-background, 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-tertiary-light, #bce2ff)"></path><polygon points="-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2" fill="var(--pie-tertiary, #1a9cff)"></polygon></svg>`),Pd=br(`<button type="button" class="toggle-correct svelte-gkcqor"><!> <span class="toggle-label svelte-gkcqor"> </span></button>`),Fd=br(`<div class="venn-error svelte-gkcqor" role="alert"> </div>`),Id=Sr(`<circle fill="color-mix(in srgb, var(--pie-primary, #0ea5e9) 12%, transparent)"></circle>`),Ld=Sr(`<rect x="0" y="0"></rect>`),Rd=Sr(`<circle></circle>`),zd=Sr(`<circle fill="none" stroke="var(--pie-text, #1e293b)"></circle>`),Bd=Sr(`<text font-weight="600" fill="var(--pie-text, #0f172a)"> </text>`),Vd=br(`<div class="region-aria svelte-gkcqor" role="region"></div>`),Hd=br(`<div class="tile-wrapper svelte-gkcqor"><!></div>`),Ud=br(`<div class="venn-diagram svelte-gkcqor"><svg preserveAspectRatio="xMidYMid meet" aria-hidden="true" class="svelte-gkcqor"><defs><mask maskUnits="userSpaceOnUse" x="0" y="0"><rect x="0" y="0" fill="black"></rect><circle fill="white"></circle><circle fill="black"></circle></mask><mask maskUnits="userSpaceOnUse" x="0" y="0"><rect x="0" y="0" fill="black"></rect><circle fill="white"></circle><circle fill="black"></circle></mask><clipPath clipPathUnits="userSpaceOnUse"><circle></circle></clipPath><mask maskUnits="userSpaceOnUse" x="0" y="0"><rect x="0" y="0" fill="white"></rect><circle fill="black"></circle><circle fill="black"></circle></mask></defs><rect fill="var(--pie-background, #ffffff)" stroke="var(--pie-border-light, #cbd5e1)"></rect><!><!><!><!><!><!><!><line stroke="var(--pie-border, #64748b)"></line></svg> <div class="region-labels svelte-gkcqor" aria-hidden="false"></div> <div class="placed-tiles svelte-gkcqor"></div></div> <!>`,1),Wd=br(`<div class="drag-ghost svelte-gkcqor"><!></div>`),Gd=br(`<div class="venn-root svelte-gkcqor"><!> <!> <!> <!> <!> <div class="sr-only svelte-gkcqor" aria-live="polite" aria-atomic="true"></div></div>`),Kd={hash:`svelte-gkcqor`,code:`.venn-root.svelte-gkcqor {display:flex;flex-direction:column;gap:16px;padding:16px;color:var(--pie-text, #0f172a);font-family:system-ui, -apple-system, Segoe UI, Roboto, sans-serif;--vc-focus-ring: var(
|
|
45
|
+
}`};function hd(e,t){Be(t,!0),ei(e,md);let n=J(t,`isDropTarget`,7,!1),r=J(t,`focused`,7,!1),i=J(t,`label`,7),a=J(t,`onpointerenter`,7),o=J(t,`onpointerleave`,7),s=J(t,`children`,7);var c={get isDropTarget(){return n()},set isDropTarget(e=!1){n(e),z()},get focused(){return r()},set focused(e=!1){r(e),z()},get label(){return i()},set label(e){i(e),z()},get onpointerenter(){return a()},set onpointerenter(e){a(e),z()},get onpointerleave(){return o()},set onpointerleave(e){o(e),z()},get children(){return s()},set children(e){s(e),z()}},l=pd();let u;var d=Yt(l),f=Zt(d,!0),p=H(d,2),m=Yt(p),h=e=>{var t=wr();zr(Xt(t),s),K(e,t)};return Hr(m,e=>{s()&&e(h)}),N(p),N(l),vn(()=>{u=oi(l,1,`venn-tray svelte-1ogsh8s`,null,u,{"drop-target":n(),focused:r()}),q(l,`aria-label`,i()),jr(f,i())}),dr(`pointerenter`,l,function(...e){a()?.apply(this,e)}),dr(`pointerleave`,l,function(...e){o()?.apply(this,e)}),K(e,l),Ve(c)}Ei(hd,{isDropTarget:{},focused:{},label:{},onpointerenter:{},onpointerleave:{},children:{}},[],[],{mode:`open`});var gd=xr(`<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>`),_d={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(--vc-focus-ring, #1565c0);outline-offset:2px;}.teacher-instructions-content.svelte-1jhejbv {padding-top:1rem;}`};function vd(e,t){Be(t,!0),ei(e,_d);let n=J(t,`html`,7),r=J(t,`language`,7),i=Mt(!1),a=`venn-teacher-instructions-${Math.random().toString(36).slice(2,10)}`;var o={get html(){return n()},set html(e){n(e),z()},get language(){return r()},set language(e){r(e),z()}},s=gd(),c=Yt(s),l=Zt(c,!0),u=H(c,2);return $r(u,()=>qo(n()),!0),N(u),N(s),vn(e=>{q(c,`aria-expanded`,G(i)),q(c,`aria-controls`,a),jr(l,e),q(u,`id`,a),q(u,`hidden`,!G(i))},[()=>nd(G(i)?`hideTeacherInstructions`:`showTeacherInstructions`,r())]),fr(`click`,c,()=>V(i,!G(i))),K(e,s),Ve(o)}pr([`click`]),Ei(vd,{html:{},language:{}},[],[],{mode:`open`});function yd(e){return!e||e.length===0?``:[...e].sort((e,t)=>e-t).join(`,`)}function bd(e){return!e||e.length===0?[]:[...e].sort((e,t)=>e-t)}function xd(e,t){if(!e||!t)return!e==!t&&(e?.length??0)===(t?.length??0);if(e.length!==t.length)return!1;let n=bd(e),r=bd(t);for(let e=0;e<n.length;e++)if(n[e]!==r[e])return!1;return!0}function Sd(e){let t=[],n=1<<e;for(let r=0;r<n;r++){let n=[];for(let t=0;t<e;t++)r&1<<t&&n.push(t);t.push(n)}return t}function Cd(e,t,n){let r=bd(t),i=t=>e[t]?.label??$(`setNumber`,n,{number:t+1}),a=r.map(i);return r.length===0?e.length===2?$(`regionNeither`,n,{first:i(0),second:i(1)}):$(`regionNoneOf`,n,{sets:e.map((e,t)=>i(t)).join(`, `)}):r.length===1?$(`regionOnly`,n,{set:a[0]}):a.join($(`regionAndSeparator`,n))}function wd(e,t){let n=yd(t),r=e.regionLabels?.[n];return typeof r==`string`&&r.trim().length>0?r:Cd(e.circles??[],t,e.language)}var Td={w:120,h:52},Ed={w:120,h:84},Dd=.6;function Od(e){return Math.min(1,44/Math.min(e.w,e.h))}var kd={side:24,top:40,radius:236,centerDistance:200,outsideGap:12,outsideStripHeight:136},Ad=.05;function jd(e=1,t=0){let n=kd.side*e,r=kd.radius*e,i=kd.centerDistance*e,a=kd.top*e+r,o=kd.outsideGap*e,s=Math.max(kd.outsideStripHeight*e,t);return{width:2*n+2*r+i,height:a+r+o+s,scale:e,outsideGap:o,outsideStripHeight:s,circles:[{cx:n+r,cy:a,r},{cx:n+r+i,cy:a,r}]}}function Md(){return jd()}function Nd(e,t){return`min(100%, max(min(720px, ${Dd*100*e.width/e.height}vh), ${e.width*Od(t)}px))`}function Pd(e,t,n){return e>0?Math.max(Od(n),Math.min(1,e/t.width)):1}function Fd(e,t){return Math.max(0,Math.floor((e+8)/(t.w+8)+1e-9))}function Id(e,t){return t>e.r?-1:Math.sqrt(e.r*e.r-t*t)}function Ld(e,t,n){let r=Id(e,Math.max(Math.abs(t-e.cy),Math.abs(n-e.cy)));return r<0?null:[e.cx-r,e.cx+r]}function Rd(e,t,n){return Id(e,t<=e.cy&&e.cy<=n?0:Math.min(Math.abs(t-e.cy),Math.abs(n-e.cy)))}function zd(e,t,n,r,i){let a=Ld(t,r,i),o=Ld(n,r,i),s,c;if(e===`0`){if(!a)return null;let e=Rd(n,r,i);[s,c]=[a[0],e<0?a[1]:Math.min(a[1],n.cx-e)]}else if(e===`1`){if(!o)return null;let e=Rd(t,r,i);[s,c]=[e<0?o[0]:Math.max(o[0],t.cx+e),o[1]]}else{if(!a||!o)return null;[s,c]=[Math.max(a[0],o[0]),Math.min(a[1],o[1])]}return c>s?[s,c]:null}function Bd(e,t,n,r){let i=r.h+8,a=t.cy,o=Math.max(t.r,n.r);return[0,.5].map(s=>{let c=[],l=Math.ceil(o/i)+1;for(let o=-l;o<=l;o++){let l=a+(o+s)*i,u=zd(e,t,n,l-r.h/2-6,l+r.h/2+6);if(!u)continue;let d=u[0]+6,f=u[1]-6,p=Fd(f-d,r);p>0&&c.push({y:l,lo:d,hi:f,n:p})}return c})}function Vd(e){return e.reduce((e,t)=>e+t.n,0)}function Hd(e,t,n){let r=e.width-6,i=Fd(r-6,n),a=n.h+8,o=e.height-t,s=i*Math.max(0,Math.floor((o-12+8)/a+1e-9)),c={x:e.width/2,y:t+o/2};return{capacity:s,slots:e=>{if(e<=0)return[];let l=Math.min(e,s),u=i>0?Math.ceil(l/i):0,d=t+(o-(u*a-8))/2;return qd(Kd(Array.from({length:u},(e,t)=>({y:d+n.h/2+t*a,lo:6,hi:r,n:i})),l,n),e,c)}}}function Ud(e){return{x:e.x+e.w/2,y:e.y+e.h/2}}function Wd(e,t,n){let r=t*n.w+(t-1)*8,i=(e.lo+e.hi)/2-r/2+n.w/2;return Array.from({length:t},(t,r)=>({x:i+r*(n.w+8),y:e.y}))}function Gd(e,t,n){let r=[...e].sort((e,n)=>Math.abs(e.y-t)-Math.abs(n.y-t)||e.y-n.y),i=[],a=0;for(let e of r){if(a>=n)break;i.push(e),a+=e.n}return i.sort((e,t)=>e.y-t.y)}function Kd(e,t,n){let r=[],i=t;for(let t of e){let e=Math.min(t.n,i);r.push(...Wd(t,e,n)),i-=e}return r}function qd(e,t,n){let r=e[e.length-1]??n;for(;e.length<t;)e.push({...r});return e}function Jd(e,t,n,r){let i=Math.max(...e.map(Vd));return a=>{if(a<=0)return[];let o=Math.min(a,i),s=null,c=[1/0,1/0];for(let n of e){if(Vd(n)<o)continue;let e=Gd(n,t,o),r=Math.abs(e.reduce((e,t)=>e+t.y,0)/e.length-t),i=[e.length,r];(i[0]<c[0]||i[0]===c[0]&&i[1]<c[1]-1e-9)&&(s=e,c=i)}return qd(s?Kd(s,o,n):[],a,r)}}function Yd(e,t,n){let r=t.cy,i=0,a=Math.min(t.r,n.r);for(let o=0;o<40;o++){let o=(i+a)/2,s=zd(e,t,n,r-o,r+o);s&&s[1]-s[0]>=2*o?i=o:a=o}let o=zd(e,t,n,r-i,r+i)??[0,0];return{x:o[0]+1,y:r-i+1,w:o[1]-o[0]-2,h:2*i-2}}function Xd(e,t,n){let[r,i]=t.circles;return Math.max(...Bd(e,r,i,n).map(Vd))}var Zd=[`0`,`0,1`,`1`];function Qd(e,t=Td){let n=jd();for(let r=1;;r++){let i=n;if(Zd.every(n=>Xd(n,i,t)>=(e[n]??0)))break;n=jd(1+r*Ad)}let r=e[``]??0,i=Fd(n.width-12,t),a=Math.ceil(r/i)*(t.h+8)-8+12;return a>n.outsideStripHeight?jd(n.scale,a):n}function $d(e,t=Md(),n=Td){if(e.circles?.length!==2)throw Error(`buildLayout2Set requires exactly 2 circles (got ${e.circles?.length??0})`);let[r,i]=t.circles,a=Sd(2),o=Math.max(r.cy+r.r,i.cy+i.r),s=Math.min(t.height-t.outsideStripHeight,o+t.outsideGap),c=(e,t,n)=>(r,i)=>{let a=r-e,o=i-t;return a*a+o*o<=n*n},l=c(r.cx,r.cy,r.r),u=c(i.cx,i.cy,i.r),d={};return{geometry:t,cell:n,regions:a.map(a=>{let o=yd(a),c=wd(e,a),f,p,m,h;if(o===``)f=(e,n)=>e>=0&&e<=t.width&&n>=0&&n<=t.height&&!l(e,n)&&!u(e,n),p={x:0,y:s,w:t.width,h:t.height-s},{capacity:m,slots:h}=Hd(t,s,n);else if(o===`0`||o===`1`||o===`0,1`){f=o===`0`?(e,t)=>l(e,t)&&!u(e,t):o===`1`?(e,t)=>u(e,t)&&!l(e,t):(e,t)=>l(e,t)&&u(e,t),p=Yd(o,r,i);let e=Bd(o,r,i,n);m=Math.max(...e.map(Vd)),h=Jd(e,r.cy,n,Ud(p))}else f=()=>!1,p={x:0,y:0,w:0,h:0},m=0,h=()=>[];let g={region:a,key:o,label:c,hitRect:p,pointInRegion:f,capacity:m,slots:h};return d[o]=g,g}),regionByKey:d,outsideStripTop:s}}function ef(e,t,n){for(let r of[`0,1`,`0`,`1`,``]){let i=e.regionByKey[r];if(i?.pointInRegion(t,n))return i}return null}function tf(e,t){let n={...e||{}},r=e?.placements??{},i={};for(let[e,t]of Object.entries(r))t==null?i[e]=null:Array.isArray(t)?i[e]=bd(t):i[e]=null;if(t?.tiles)for(let e of t.tiles)e.id in i||(i[e.id]=null);return n.placements=i,n.completed=nf(t,{...n,placements:i}),n}function nf(e,t){if(!e||!Array.isArray(e.tiles)||e.tiles.length===0)return!1;let n=t?.placements??{};for(let t of e.tiles)if(n[t.id]==null)return!1;return!0}function rf({model:e,session:t,tileId:n,placement:r}){let i=tf(t,e),a={...i,placements:{...i.placements,[n]:r===null?null:bd(r)}};return a.completed=nf(e,a),a}function af(e,t){let n=e?.placements?.[t];return Array.isArray(n)?bd(n):null}function of(e,t,n){let r=af(e,t);return r===null||n===null?r===n:xd(r,n)}function sf(e,t){let n=t?.placements??{};return(e.tiles||[]).filter(e=>n[e.id]==null)}function cf(e,t){let n=t?.placements??{},r={};for(let t of e.tiles||[]){let e=n[t.id];if(e==null)continue;let i=bd(e).join(`,`);r[i]||(r[i]=[]),r[i].push(t)}return r}var lf=xr(`<div class="venn-prompt svelte-gkcqor"></div>`),uf=Cr(`<svg class="toggle-icon svelte-gkcqor" preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-283 359 34 35" aria-hidden="true"><circle cx="-266" cy="375.9" r="14" fill="var(--pie-tertiary-light, #bce2ff)"></circle><path d="M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z" fill="var(--pie-tertiary-light, #bce2ff)"></path><polygon points="-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6" fill="var(--pie-tertiary, #1a9cff)"></polygon></svg>`),df=Cr(`<svg class="toggle-icon svelte-gkcqor" preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-129.5 127 34 35" aria-hidden="true"><path style="fill: var(--pie-border-light, #D0CAC5); stroke: var(--pie-border-light, #E6E3E0); stroke-width: 0.75; stroke-miterlimit: 10;" d="M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z"></path><path style="fill: var(--pie-border-light, #B3ABA4); stroke: var(--pie-border-light, #CDC7C2); stroke-width: 0.5; stroke-miterlimit: 10;" d="M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"></path><circle cx="-114.2" cy="143.5" r="14" fill="var(--pie-background, 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-tertiary-light, #bce2ff)"></path><polygon points="-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2" fill="var(--pie-tertiary, #1a9cff)"></polygon></svg>`),ff=xr(`<button type="button" class="toggle-correct svelte-gkcqor"><!> <span class="toggle-label svelte-gkcqor"> </span></button>`),pf=xr(`<div class="venn-error svelte-gkcqor" role="alert"> </div>`),mf=Cr(`<circle fill="color-mix(in srgb, var(--pie-primary, #0ea5e9) 12%, transparent)"></circle>`),hf=Cr(`<rect x="0" y="0"></rect>`),gf=Cr(`<circle></circle>`),_f=Cr(`<circle fill="none" stroke="var(--pie-text, #1e293b)"></circle>`),vf=Cr(`<text font-weight="600" fill="var(--pie-text, #0f172a)"> </text>`),yf=xr(`<div class="region-aria svelte-gkcqor" role="region"></div>`),bf=xr(`<div class="tile-wrapper svelte-gkcqor"><!></div>`),xf=xr(`<div class="venn-diagram svelte-gkcqor"><svg preserveAspectRatio="xMidYMid meet" aria-hidden="true" class="svelte-gkcqor"><defs><mask maskUnits="userSpaceOnUse" x="0" y="0"><rect x="0" y="0" fill="black"></rect><circle fill="white"></circle><circle fill="black"></circle></mask><mask maskUnits="userSpaceOnUse" x="0" y="0"><rect x="0" y="0" fill="black"></rect><circle fill="white"></circle><circle fill="black"></circle></mask><clipPath clipPathUnits="userSpaceOnUse"><circle></circle></clipPath><mask maskUnits="userSpaceOnUse" x="0" y="0"><rect x="0" y="0" fill="white"></rect><circle fill="black"></circle><circle fill="black"></circle></mask></defs><rect fill="var(--pie-background, #ffffff)" stroke="var(--pie-border-light, #cbd5e1)"></rect><!><!><!><!><!><!><!><line stroke="var(--pie-border, #64748b)"></line></svg> <div class="region-labels svelte-gkcqor" aria-hidden="false"></div> <div class="placed-tiles svelte-gkcqor"></div></div> <!>`,1),Sf=xr(`<div class="drag-ghost svelte-gkcqor"><!></div>`),Cf=xr(`<div class="venn-root svelte-gkcqor"><!> <!> <!> <!> <!> <div class="sr-only svelte-gkcqor" aria-live="polite" aria-atomic="true"></div></div>`),wf={hash:`svelte-gkcqor`,code:`.venn-root.svelte-gkcqor {display:flex;flex-direction:column;gap:16px;padding:16px;color:var(--pie-text, #0f172a);font-family:system-ui, -apple-system, Segoe UI, Roboto, sans-serif;--vc-focus-ring: var(
|
|
46
46
|
--pie-focus-outline,
|
|
47
47
|
var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565c0))
|
|
48
48
|
);}.venn-prompt.svelte-gkcqor {font-size:16px;line-height:1.5;}.venn-prompt.svelte-gkcqor p {margin:0 0 8px 0;}.toggle-correct.svelte-gkcqor {align-self:center;display:inline-flex;align-items:center;gap:8px;margin:0 0 4px 0;padding:0;background:transparent;border:0;color:inherit;font:inherit;font-size:14px;cursor:pointer;user-select:none;}.toggle-correct.svelte-gkcqor:focus-visible {outline:2px solid var(--vc-focus-ring, #1565c0);outline-offset:2px;border-radius:2px;}.toggle-icon.svelte-gkcqor {width:25px;height:25px;flex-shrink:0;}.toggle-label.svelte-gkcqor {line-height:1.2;}.toggle-correct.svelte-gkcqor:hover .toggle-label:where(.svelte-gkcqor),
|
|
@@ -54,4 +54,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
54
54
|
* to the width that keeps tiles at 44 px (\`diagramCssWidth\`).
|
|
55
55
|
*/position:relative;margin:0 auto;}.venn-diagram.svelte-gkcqor svg:where(.svelte-gkcqor) {width:100%;height:100%;display:block;}.placed-tiles.svelte-gkcqor,
|
|
56
56
|
.region-labels.svelte-gkcqor {position:absolute;inset:0;pointer-events:none;}.tile-wrapper.svelte-gkcqor {position:absolute;display:flex;pointer-events:auto;}.region-aria.svelte-gkcqor {position:absolute;width:1px;height:1px;transform:translate(-50%, -50%);opacity:0;pointer-events:none;}.venn-error.svelte-gkcqor {padding:12px 16px;border:1.5px solid var(--pie-incorrect-icon, #bf0d00);border-radius:8px;background:var(--pie-incorrect-secondary, #fef2f2);color:var(--pie-text, #7f1d1d);font-size:14px;}
|
|
57
|
-
/* Tailwind's \`sr-only\`, scoped: PIE players ship no Tailwind. */.sr-only.svelte-gkcqor {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}.drag-ghost.svelte-gkcqor {position:fixed;top:0;left:0;transform:translate(-50%, -50%);pointer-events:none;z-index:1000;}`};function qd(e,t){Be(t,!0),$r(e,Kd);let n=[{label:`Set A`},{label:`Set B`}],r=`venn-${Math.random().toString(36).slice(2,10)}`,i=`${r}-mask-left-only`,a=`${r}-mask-right-only`,o=`${r}-mask-outside`,s=`${r}-clip-left`,c=null,l=Mt(null),u=null,d=Mt(!1),f=Mt(null),p=Mt(null),m=Mt(null),h=Mt(null),g=Mt(0),_=null,v=null,y=I(()=>t?.model?.circles??n),x=I(()=>K(y).length===2),S=I(()=>t?.model?.language),C=I(()=>({circles:K(y),tiles:t?.model?.tiles??[],regionLabels:t?.model?.regionLabels??{},language:K(S),scoringPolicy:`partialPerTile`,promptEnabled:!0})),w=I(()=>t?.model?.env?.mode===`evaluate`),T=I(()=>t?.model?.disabled===!0),E=I(()=>t?.model?.prompt??null),ee=I(()=>le(t?.session,t?.model,K(d))),te=I(()=>({placements:K(ee)})),ne=I(()=>Ad(K(C),K(te))),re=I(()=>kd(K(C),K(te))),ie=I(()=>(K(C).tiles??[]).some(e=>(e.imageUrl??``).trim())?Yu:Ju),D=I(()=>xd(Object.fromEntries(Object.entries(K(ne)).map(([e,t])=>[e,t.length])),K(ie))),ae=I(()=>K(x)?Sd(K(C),K(D),K(ie)):null),oe=I(()=>rd(K(g),K(D),K(ie))),se=I(()=>[`0`,`0,1`,`1`,``,`tray`]),ce;fn(()=>{let e=t?.session,n=K(w)&&!!t?.model?.correctRegionsById;ar(()=>{(!n||e!==ce)&&V(d,!1),ce=e})}),un(()=>{K(T)&&ar(_e)}),Br(()=>{_?.()});function le(e,t,n){let r={...e?.placements??{}};if(n&&t?.correctRegionsById)for(let[e,n]of Object.entries(t.correctRegionsById))r[e]=n;return r}function ue(e){u&&(u.textContent=``,requestAnimationFrame(()=>{u&&(u.textContent=e)}))}function de(e,t){return{left:e/K(D).width*100,top:t/K(D).height*100}}function O(e,t){if(!K(l))return null;let n=K(l).getBoundingClientRect();if(n.width===0||n.height===0)return null;let r=(e-n.left)/n.width,i=(t-n.top)/n.height;return{x:r*K(D).width,y:i*K(D).height}}function fe(e,n){let r=Ed({model:K(C),session:t?.session,tileId:e,placement:n});t.onSessionChange?.(r)}function pe(e){return e?(K(C).tiles||[]).find(t=>t.id===e)??null:null}function me(e){return K(ae)?.regionByKey[e]}function he(e){return e===`tray`?$(`tray`,K(S)):me(e)?.label??$(`unknownTarget`,K(S))}function ge(){V(f,null),V(m,null),V(p,null),V(h,null)}function _e(){_?.(),K(f)!==null&&ge()}function ve(e,n){let r=Du(e,K(S)),i=n===`tray`?null:n===null?void 0:me(n)?.region;if(i===void 0||Od(t?.session,e.id,i)){ue($(`cancelled`,K(S)));return}fe(e.id,i),ue(i===null?$(`returnedToTray`,K(S),{name:r}):$(`placedIn`,K(S),{name:r,target:he(n)}))}function k(e,t){if(K(T))return;t.preventDefault(),_?.(),t.currentTarget.setPointerCapture?.(t.pointerId),V(f,e.id,!0),V(m,null),V(h,{x:t.clientX,y:t.clientY},!0),V(p,ye(t.clientX,t.clientY),!0),ue($(`pickedUp`,K(S),{name:Du(e,K(S))}));let n=e=>{V(h,{x:e.clientX,y:e.clientY},!0),V(p,ye(e.clientX,e.clientY),!0)},r=t=>{a();let n=ye(t.clientX,t.clientY),r=K(p);ge(),!K(T)&&ve(e,n??r)},i=()=>{a(),ge(),ue($(`cancelled`,K(S)))},a=()=>{window.removeEventListener(`pointermove`,n),window.removeEventListener(`pointerup`,r),window.removeEventListener(`pointercancel`,i),_===a&&(_=null)};_=a,window.addEventListener(`pointermove`,n),window.addEventListener(`pointerup`,r),window.addEventListener(`pointercancel`,i)}function ye(e,t){if(A(e,t))return`tray`;let n=O(e,t);if(!n||!K(ae))return null;let r=Cd(K(ae),n.x,n.y);return r?r.key:null}function A(e,t){let n=c?.querySelector(`[data-region-key="tray"]`);if(!n)return!1;let r=n.getBoundingClientRect();return e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom}async function j(e){await nr();let t=c?.querySelectorAll(`button[data-tile-id]`)??[];for(let n of t)if(n.dataset.tileId===e&&n.getAttribute(`aria-hidden`)!==`true`){n.focus();return}}function M(e){if(K(f)===e.id){let t=K(m);ge(),ve(e,t),j(e.id)}else{let t=Dd(K(te),e.id),n=t===null?K(se)[0]??null:Hu(t);V(f,e.id,!0),V(m,n,!0),ue($(`pickedUpWithKeyboard`,K(S),{name:Du(e,K(S)),target:he(n??``)}))}}function be(e,t){if(!(K(T)||t.detail!==0)){if(v===e.id){v=null;return}M(e)}}function xe(){setTimeout(()=>{v=null},0)}function Se(e,t){if(!K(T)){if(t.key===` `||t.key===`Enter`){t.preventDefault(),v=e.id,M(e);return}if(t.key===`Escape`&&K(f)===e.id){t.preventDefault(),ge(),ue($(`cancelled`,K(S)));return}if(K(f)===e.id&&(t.key===`ArrowLeft`||t.key===`ArrowRight`||t.key===`ArrowUp`||t.key===`ArrowDown`||t.key===`Tab`)){t.preventDefault();let e=K(m)??K(se)[0]??`0`,n=K(se).indexOf(e);n<0&&(n=0);let r=t.key===`ArrowLeft`||t.key===`ArrowUp`||t.key===`Tab`&&t.shiftKey?-1:1;n=(n+r+K(se).length)%K(se).length,V(m,K(se)[n],!0),ue($(`dropTarget`,K(S),{target:he(K(m))}))}}}function Ce(e){if(K(f)===null||K(h)!==null)return;let t=e.relatedTarget;t&&c?.contains(t)||(ge(),ue($(`cancelled`,K(S))))}function we(e){if(!K(w)||K(d))return null;let n=t?.model?.correctness?.[e];return n===`correct`||n===`incorrect`||n===`unanswered`?n:null}function Te(){if(!c)return;let e=e=>console.warn(`venn-classification: MathJax render failed`,e);try{Promise.resolve(xl(c)).catch(e)}catch(t){e(t)}}zr(()=>{nr().then(Te)}),un(()=>{K(ee),K(C).tiles?.length,nr().then(Te)});let Ee=I(()=>K(w)?Object.values(t?.model?.correctness??{}).filter(e=>e===`incorrect`||e===`unanswered`).length:0),De=I(()=>K(f)===null?K(p)??null:K(p)??K(m)??null),Oe=I(()=>K(De)===`0`),ke=I(()=>K(De)===`1`),Ae=I(()=>K(De)===`0,1`),je=I(()=>K(De)===``),Me=`color-mix(in srgb, var(--pie-primary, #2563eb) 18%, transparent)`,Ne=I(()=>K(f)!==null&&K(h)!==null?pe(K(f)):null);var Pe=Gd(),Fe=Yt(Pe),Ie=e=>{Vu(e,{get html(){return t.model.teacherInstructions},get language(){return K(S)}})};Vr(Fe,e=>{t?.model?.teacherInstructions&&e(Ie)});var Le=H(Fe,2),Re=e=>{var t=jd();Qr(t,()=>Ko(K(E)),!0),N(t),q(e,t)};Vr(Le,e=>{K(E)&&e(Re)});var P=H(Le,2),ze=e=>{var t=Pd(),n=Yt(t),r=e=>{q(e,Md())},i=e=>{q(e,Nd())};Vr(n,e=>{K(d)?e(r):e(i,-1)});var a=Zt(H(n,2),!0);N(t),U(e=>{J(t,`aria-pressed`,K(d)),Ar(a,e)},[()=>Tu(K(d)?`hideCorrectAnswer`:`showCorrectAnswer`,K(S))]),dr(`click`,t,()=>V(d,!K(d))),q(e,t)};Vr(P,e=>{K(w)&&K(Ee)>0&&e(ze)});var He=H(P,2),Ue=e=>{var t=Fd(),n=Zt(t,!0);U(e=>Ar(n,e),[()=>$(`unsupportedCircles`,K(S),{count:K(y).length,supported:2})]),q(e,t)},We=e=>{var t=Ud(),n=Xt(t);let r;var c=Yt(n),u=Yt(c),d=Yt(u),_=Yt(d),v=H(_),y=H(v);N(d);var x=H(d),w=Yt(x),E=H(w),ee=H(E);N(x);var te=H(x),se=Zt(te),ce=H(te),le=Yt(ce),ue=H(le),O=H(ue);N(ce),N(u);var fe=H(u),pe=H(fe);Kr(pe,17,()=>K(D).circles,Hr,(e,t)=>{var n=Id();U(()=>{J(n,`cx`,K(t).cx),J(n,`cy`,K(t).cy),J(n,`r`,K(t).r)}),q(e,n)});var me=H(pe),he=e=>{var t=Ld();J(t,`fill`,Me),U(()=>{J(t,`width`,K(D).width),J(t,`height`,K(D).height),J(t,`mask`,`url(#${i})`)}),q(e,t)};Vr(me,e=>{K(Oe)&&e(he)});var ge=H(me),_e=e=>{var t=Ld();J(t,`fill`,Me),U(()=>{J(t,`width`,K(D).width),J(t,`height`,K(D).height),J(t,`mask`,`url(#${a})`)}),q(e,t)};Vr(ge,e=>{K(ke)&&e(_e)});var ve=H(ge),ye=e=>{var t=Rd();J(t,`fill`,Me),U(()=>{J(t,`cx`,K(D).circles[1].cx),J(t,`cy`,K(D).circles[1].cy),J(t,`r`,K(D).circles[1].r),J(t,`clip-path`,`url(#${s})`)}),q(e,t)};Vr(ve,e=>{K(Ae)&&e(ye)});var A=H(ve),j=e=>{var t=Ld();J(t,`fill`,Me),U(()=>{J(t,`width`,K(D).width),J(t,`height`,K(D).height),J(t,`mask`,`url(#${o})`)}),q(e,t)};Vr(A,e=>{K(je)&&e(j)});var M=H(A);Kr(M,17,()=>K(D).circles,Hr,(e,t)=>{var n=zd();U(()=>{J(n,`cx`,K(t).cx),J(n,`cy`,K(t).cy),J(n,`r`,K(t).r),J(n,`stroke-width`,2*K(D).scale)}),q(e,n)});var Ce=H(M);Kr(Ce,17,()=>K(D).circles,Hr,(e,t,n)=>{var r=Bd();J(r,`text-anchor`,n===0?`start`:`end`);var i=Zt(r,!0);U((e,t)=>{J(r,`x`,e),J(r,`y`,t),J(r,`font-size`,18*K(D).scale),Ar(i,K(C).circles[n]?.label??``)},[()=>n===0?Math.max(20*K(D).scale,K(t).cx-K(t).r):Math.min(K(D).width-20*K(D).scale,K(t).cx+K(t).r),()=>Math.max(26*K(D).scale,K(t).cy-K(t).r-12*K(D).scale)]),q(e,r)});var Te=H(Ce);N(c);var Ee=H(c,2);Kr(Ee,21,()=>K(ae).regions,Hr,(e,t)=>{let n=I(()=>de(K(t).hitRect.x+K(t).hitRect.w/2,K(t).hitRect.y+K(t).hitRect.h/2));var r=Vd();U(()=>{J(r,`aria-label`,K(t).label),J(r,`data-region-key`,K(t).key),si(r,`left: ${K(n).left??``}%; top: ${K(n).top??``}%;`)}),q(e,r)}),N(Ee);var De=H(Ee,2);Kr(De,21,()=>Object.entries(K(ne)),Hr,(e,t)=>{var n=I(()=>b(K(t),2));let r=()=>K(n)[0],i=()=>K(n)[1],a=I(()=>K(ae).regionByKey[r()]);var o=Cr(),s=Xt(o),c=e=>{let t=I(()=>K(a).slots(i().length));var n=Cr();Kr(Xt(n),19,i,e=>e.id,(e,n,r)=>{let i=I(()=>de(K(t)[K(r)].x,K(t)[K(r)].y));var o=Hd(),s=Yt(o);{let e=I(()=>Ou(K(n),K(a).label,we(K(n).id),K(S))),t=I(()=>we(K(n).id)??`neutral`),r=I(()=>K(f)===K(n).id),i=I(()=>K(f)===K(n).id&&K(h)!==null);Fu(s,{fit:!0,get id(){return K(n).id},get label(){return K(n).label},get imageUrl(){return K(n).imageUrl},get imageAlt(){return K(n).imageAlt},get name(){return K(e)},get correctness(){return K(t)},get held(){return K(r)},get invisible(){return K(i)},get disabled(){return K(T)},onpointerdown:e=>k(K(n),e),onkeydown:e=>Se(K(n),e),onkeyup:xe,onclick:e=>be(K(n),e)})}N(o),U(()=>si(o,`left: ${K(i).left??``}%; top: ${K(i).top??``}%; width: ${K(ie).w??``}px; height: ${K(ie).h??``}px; transform: translate(-50%, -50%) scale(${K(oe)??``});`)),q(e,o)}),q(e,n)};Vr(s,e=>{K(a)&&e(c)}),q(e,o)}),N(De),N(n),_i(n,e=>V(l,e),()=>K(l));var Ne=H(n,2);{let e=I(()=>K(p)===`tray`||K(f)!==null&&K(m)===`tray`),t=I(()=>$(`tray`,K(S)));Ru(Ne,{get isDropTarget(){return K(e)},get label(){return K(t)},children:(e,t)=>{var n=Cr();Kr(Xt(n),17,()=>K(re),e=>e.id,(e,t)=>{{let n=I(()=>Ou(K(t),null,we(K(t).id),K(S))),r=I(()=>we(K(t).id)??`neutral`),i=I(()=>K(f)===K(t).id),a=I(()=>K(f)===K(t).id&&K(h)!==null);Fu(e,{get id(){return K(t).id},get label(){return K(t).label},get imageUrl(){return K(t).imageUrl},get imageAlt(){return K(t).imageAlt},get name(){return K(n)},get correctness(){return K(r)},get held(){return K(i)},get invisible(){return K(a)},get disabled(){return K(T)},onpointerdown:e=>k(K(t),e),onkeydown:e=>Se(K(t),e),onkeyup:xe,onclick:e=>be(K(t),e)})}}),q(e,n)},$$slots:{default:!0}})}U(e=>{r=si(n,``,r,{width:e,"aspect-ratio":`${K(D).width??``} / ${K(D).height??``}`}),J(c,`viewBox`,`0 0 ${K(D).width??``} ${K(D).height??``}`),J(d,`id`,i),J(d,`width`,K(D).width),J(d,`height`,K(D).height),J(_,`width`,K(D).width),J(_,`height`,K(D).height),J(v,`cx`,K(D).circles[0].cx),J(v,`cy`,K(D).circles[0].cy),J(v,`r`,K(D).circles[0].r),J(y,`cx`,K(D).circles[1].cx),J(y,`cy`,K(D).circles[1].cy),J(y,`r`,K(D).circles[1].r),J(x,`id`,a),J(x,`width`,K(D).width),J(x,`height`,K(D).height),J(w,`width`,K(D).width),J(w,`height`,K(D).height),J(E,`cx`,K(D).circles[1].cx),J(E,`cy`,K(D).circles[1].cy),J(E,`r`,K(D).circles[1].r),J(ee,`cx`,K(D).circles[0].cx),J(ee,`cy`,K(D).circles[0].cy),J(ee,`r`,K(D).circles[0].r),J(te,`id`,s),J(se,`cx`,K(D).circles[0].cx),J(se,`cy`,K(D).circles[0].cy),J(se,`r`,K(D).circles[0].r),J(ce,`id`,o),J(ce,`width`,K(D).width),J(ce,`height`,K(D).height),J(le,`width`,K(D).width),J(le,`height`,K(D).height),J(ue,`cx`,K(D).circles[0].cx),J(ue,`cy`,K(D).circles[0].cy),J(ue,`r`,K(D).circles[0].r),J(O,`cx`,K(D).circles[1].cx),J(O,`cy`,K(D).circles[1].cy),J(O,`r`,K(D).circles[1].r),J(fe,`x`,K(D).scale),J(fe,`y`,K(D).scale),J(fe,`width`,K(D).width-2*K(D).scale),J(fe,`height`,K(D).height-2*K(D).scale),J(fe,`stroke-width`,1.5*K(D).scale),J(fe,`rx`,12*K(D).scale),J(Te,`x1`,16*K(D).scale),J(Te,`x2`,K(D).width-16*K(D).scale),J(Te,`y1`,K(ae).outsideStripTop),J(Te,`y2`,K(ae).outsideStripTop),J(Te,`stroke-width`,K(D).scale),J(Te,`stroke-dasharray`,`${4*K(D).scale} ${6*K(D).scale}`)},[()=>nd(K(D),K(ie))]),hi(n,`clientWidth`,e=>V(g,e)),q(e,t)};Vr(He,e=>{K(ae)?e(We,-1):e(Ue)});var Ge=H(He,2),Ke=e=>{var t=Wd();Fu(Yt(t),{get id(){return K(Ne).id},get label(){return K(Ne).label},get imageUrl(){return K(Ne).imageUrl},get imageAlt(){return K(Ne).imageAlt},get language(){return K(S)},correctness:`neutral`,ghost:!0}),N(t),U(()=>si(t,`left: ${K(h).x??``}px; top: ${K(h).y??``}px;`)),q(e,t)};Vr(Ge,e=>{K(Ne)&&K(h)&&e(Ke)}),_i(H(Ge,2),e=>u=e,()=>u),N(Pe),_i(Pe,e=>c=e,()=>c),dr(`focusout`,Pe,Ce),q(e,Pe),Ve()}fr([`focusout`,`click`]),Ti(qd,{model:{type:`Object`},session:{type:`Object`},onSessionChange:{}},[],[]);function Jd(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Yd(e,t){if(e===t)return e;if(!Jd(e)||!Jd(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 Xd=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}},Zd=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 Qd(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 Xd(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=Yd(this.#t,e),super.session=e}dispatchSessionChanged(){this.dispatchEvent(new Zd(this.tagName.toLowerCase(),this.isComplete()))}}return r}return Qd(qd,{isComplete:Td})})();
|
|
57
|
+
/* Tailwind's \`sr-only\`, scoped: PIE players ship no Tailwind. */.sr-only.svelte-gkcqor {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}.drag-ghost.svelte-gkcqor {position:fixed;top:0;left:0;transform:translate(-50%, -50%);pointer-events:none;z-index:1000;}`};function Tf(e,t){Be(t,!0),ei(e,wf);let n=[{label:`Set A`},{label:`Set B`}],r=`venn-${Math.random().toString(36).slice(2,10)}`,i=`${r}-mask-left-only`,a=`${r}-mask-right-only`,o=`${r}-mask-outside`,s=`${r}-clip-left`,c=null,l=Mt(null),u=null,d=Mt(!1),f=Mt(null),p=Mt(null),m=Mt(null),h=Mt(null),g=Mt(0),_=null,v=null,y=I(()=>t?.model?.circles??n),x=I(()=>G(y).length===2),S=I(()=>t?.model?.language),C=I(()=>({circles:G(y),tiles:t?.model?.tiles??[],regionLabels:t?.model?.regionLabels??{},language:G(S),scoringPolicy:`partialPerTile`,promptEnabled:!0})),w=I(()=>t?.model?.env?.mode===`evaluate`),T=I(()=>t?.model?.disabled===!0),E=I(()=>t?.model?.prompt??null),ee=I(()=>le(t?.session,t?.model,G(d))),te=I(()=>({placements:G(ee)})),ne=I(()=>cf(G(C),G(te))),re=I(()=>sf(G(C),G(te))),ie=I(()=>(G(C).tiles??[]).some(e=>(e.imageUrl??``).trim())?Ed:Td),D=I(()=>Qd(Object.fromEntries(Object.entries(G(ne)).map(([e,t])=>[e,t.length])),G(ie))),ae=I(()=>G(x)?$d(G(C),G(D),G(ie)):null),oe=I(()=>Pd(G(g),G(D),G(ie))),se=I(()=>[`0`,`0,1`,`1`,``,`tray`]),ce;fn(()=>{let e=t?.session,n=G(w)&&!!t?.model?.correctRegionsById;or(()=>{(!n||e!==ce)&&V(d,!1),ce=e})}),un(()=>{G(T)&&or(_e)}),Vr(()=>{_?.()});function le(e,t,n){let r={...e?.placements??{}};if(n&&t?.correctRegionsById)for(let[e,n]of Object.entries(t.correctRegionsById))r[e]=n;return r}function ue(e){u&&(u.textContent=``,requestAnimationFrame(()=>{u&&(u.textContent=e)}))}function de(e,t){return{left:e/G(D).width*100,top:t/G(D).height*100}}function O(e,t){if(!G(l))return null;let n=G(l).getBoundingClientRect();if(n.width===0||n.height===0)return null;let r=(e-n.left)/n.width,i=(t-n.top)/n.height;return{x:r*G(D).width,y:i*G(D).height}}function fe(e,n){let r=rf({model:G(C),session:t?.session,tileId:e,placement:n});t.onSessionChange?.(r)}function pe(e){return e?(G(C).tiles||[]).find(t=>t.id===e)??null:null}function me(e){return G(ae)?.regionByKey[e]}function he(e){return e===`tray`?$(`tray`,G(S)):me(e)?.label??$(`unknownTarget`,G(S))}function ge(){V(f,null),V(m,null),V(p,null),V(h,null)}function _e(){_?.(),G(f)!==null&&ge()}function ve(e,n){let r=id(e,G(S)),i=n===`tray`?null:n===null?void 0:me(n)?.region;if(i===void 0||of(t?.session,e.id,i)){ue($(`cancelled`,G(S)));return}fe(e.id,i),ue(i===null?$(`returnedToTray`,G(S),{name:r}):$(`placedIn`,G(S),{name:r,target:he(n)}))}function k(e,t){if(G(T))return;t.preventDefault(),_?.(),t.currentTarget.setPointerCapture?.(t.pointerId),V(f,e.id,!0),V(m,null),V(h,{x:t.clientX,y:t.clientY},!0),V(p,ye(t.clientX,t.clientY),!0),ue($(`pickedUp`,G(S),{name:id(e,G(S))}));let n=e=>{V(h,{x:e.clientX,y:e.clientY},!0),V(p,ye(e.clientX,e.clientY),!0)},r=t=>{a();let n=ye(t.clientX,t.clientY),r=G(p);ge(),!G(T)&&ve(e,n??r)},i=()=>{a(),ge(),ue($(`cancelled`,G(S)))},a=()=>{window.removeEventListener(`pointermove`,n),window.removeEventListener(`pointerup`,r),window.removeEventListener(`pointercancel`,i),_===a&&(_=null)};_=a,window.addEventListener(`pointermove`,n),window.addEventListener(`pointerup`,r),window.addEventListener(`pointercancel`,i)}function ye(e,t){if(A(e,t))return`tray`;let n=O(e,t);if(!n||!G(ae))return null;let r=ef(G(ae),n.x,n.y);return r?r.key:null}function A(e,t){let n=c?.querySelector(`[data-region-key="tray"]`);if(!n)return!1;let r=n.getBoundingClientRect();return e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom}async function j(e){await rr();let t=c?.querySelectorAll(`button[data-tile-id]`)??[];for(let n of t)if(n.dataset.tileId===e&&n.getAttribute(`aria-hidden`)!==`true`){n.focus();return}}function M(e){if(G(f)===e.id){let t=G(m);ge(),ve(e,t),j(e.id)}else{let t=af(G(te),e.id),n=t===null?G(se)[0]??null:yd(t);V(f,e.id,!0),V(m,n,!0),ue($(`pickedUpWithKeyboard`,G(S),{name:id(e,G(S)),target:he(n??``)}))}}function be(e,t){if(!(G(T)||t.detail!==0)){if(v===e.id){v=null;return}M(e)}}function xe(){setTimeout(()=>{v=null},0)}function Se(e,t){if(!G(T)){if(t.key===` `||t.key===`Enter`){t.preventDefault(),v=e.id,M(e);return}if(t.key===`Escape`&&G(f)===e.id){t.preventDefault(),ge(),ue($(`cancelled`,G(S)));return}if(G(f)===e.id&&(t.key===`ArrowLeft`||t.key===`ArrowRight`||t.key===`ArrowUp`||t.key===`ArrowDown`||t.key===`Tab`)){t.preventDefault();let e=G(m)??G(se)[0]??`0`,n=G(se).indexOf(e);n<0&&(n=0);let r=t.key===`ArrowLeft`||t.key===`ArrowUp`||t.key===`Tab`&&t.shiftKey?-1:1;n=(n+r+G(se).length)%G(se).length,V(m,G(se)[n],!0),ue($(`dropTarget`,G(S),{target:he(G(m))}))}}}function Ce(e){if(G(f)===null||G(h)!==null)return;let t=e.relatedTarget;t&&c?.contains(t)||(ge(),ue($(`cancelled`,G(S))))}function we(e){if(!G(w)||G(d))return null;let n=t?.model?.correctness?.[e];return n===`correct`||n===`incorrect`||n===`unanswered`?n:null}function Te(){if(!c)return;let e=e=>console.warn(`venn-classification: MathJax render failed`,e);try{Promise.resolve(Ql(c)).catch(e)}catch(t){e(t)}}Br(()=>{rr().then(Te)}),un(()=>{G(ee),G(C).tiles?.length,rr().then(Te)});let Ee=I(()=>G(w)?Object.values(t?.model?.correctness??{}).filter(e=>e===`incorrect`||e===`unanswered`).length:0),De=I(()=>G(f)===null?G(p)??null:G(p)??G(m)??null),Oe=I(()=>G(De)===`0`),ke=I(()=>G(De)===`1`),Ae=I(()=>G(De)===`0,1`),je=I(()=>G(De)===``),Me=`color-mix(in srgb, var(--pie-primary, #2563eb) 18%, transparent)`,Ne=I(()=>G(f)!==null&&G(h)!==null?pe(G(f)):null);var Pe=Cf(),Fe=Yt(Pe),Ie=e=>{vd(e,{get html(){return t.model.teacherInstructions},get language(){return G(S)}})};Hr(Fe,e=>{t?.model?.teacherInstructions&&e(Ie)});var Le=H(Fe,2),Re=e=>{var t=lf();$r(t,()=>qo(G(E)),!0),N(t),K(e,t)};Hr(Le,e=>{G(E)&&e(Re)});var P=H(Le,2),ze=e=>{var t=ff(),n=Yt(t),r=e=>{K(e,uf())},i=e=>{K(e,df())};Hr(n,e=>{G(d)?e(r):e(i,-1)});var a=Zt(H(n,2),!0);N(t),vn(e=>{q(t,`aria-pressed`,G(d)),jr(a,e)},[()=>nd(G(d)?`hideCorrectAnswer`:`showCorrectAnswer`,G(S))]),fr(`click`,t,()=>V(d,!G(d))),K(e,t)};Hr(P,e=>{G(w)&&G(Ee)>0&&e(ze)});var He=H(P,2),Ue=e=>{var t=pf(),n=Zt(t,!0);vn(e=>jr(n,e),[()=>$(`unsupportedCircles`,G(S),{count:G(y).length,supported:2})]),K(e,t)},We=e=>{var t=xf(),n=Xt(t);let r;var c=Yt(n),u=Yt(c),d=Yt(u),_=Yt(d),v=H(_),y=H(v);N(d);var x=H(d),w=Yt(x),E=H(w),ee=H(E);N(x);var te=H(x),se=Zt(te),ce=H(te),le=Yt(ce),ue=H(le),O=H(ue);N(ce),N(u);var fe=H(u),pe=H(fe);qr(pe,17,()=>G(D).circles,Ur,(e,t)=>{var n=mf();vn(()=>{q(n,`cx`,G(t).cx),q(n,`cy`,G(t).cy),q(n,`r`,G(t).r)}),K(e,n)});var me=H(pe),he=e=>{var t=hf();q(t,`fill`,Me),vn(()=>{q(t,`width`,G(D).width),q(t,`height`,G(D).height),q(t,`mask`,`url(#${i})`)}),K(e,t)};Hr(me,e=>{G(Oe)&&e(he)});var ge=H(me),_e=e=>{var t=hf();q(t,`fill`,Me),vn(()=>{q(t,`width`,G(D).width),q(t,`height`,G(D).height),q(t,`mask`,`url(#${a})`)}),K(e,t)};Hr(ge,e=>{G(ke)&&e(_e)});var ve=H(ge),ye=e=>{var t=gf();q(t,`fill`,Me),vn(()=>{q(t,`cx`,G(D).circles[1].cx),q(t,`cy`,G(D).circles[1].cy),q(t,`r`,G(D).circles[1].r),q(t,`clip-path`,`url(#${s})`)}),K(e,t)};Hr(ve,e=>{G(Ae)&&e(ye)});var A=H(ve),j=e=>{var t=hf();q(t,`fill`,Me),vn(()=>{q(t,`width`,G(D).width),q(t,`height`,G(D).height),q(t,`mask`,`url(#${o})`)}),K(e,t)};Hr(A,e=>{G(je)&&e(j)});var M=H(A);qr(M,17,()=>G(D).circles,Ur,(e,t)=>{var n=_f();vn(()=>{q(n,`cx`,G(t).cx),q(n,`cy`,G(t).cy),q(n,`r`,G(t).r),q(n,`stroke-width`,2*G(D).scale)}),K(e,n)});var Ce=H(M);qr(Ce,17,()=>G(D).circles,Ur,(e,t,n)=>{var r=vf();q(r,`text-anchor`,n===0?`start`:`end`);var i=Zt(r,!0);vn((e,t)=>{q(r,`x`,e),q(r,`y`,t),q(r,`font-size`,18*G(D).scale),jr(i,G(C).circles[n]?.label??``)},[()=>n===0?Math.max(20*G(D).scale,G(t).cx-G(t).r):Math.min(G(D).width-20*G(D).scale,G(t).cx+G(t).r),()=>Math.max(26*G(D).scale,G(t).cy-G(t).r-12*G(D).scale)]),K(e,r)});var Te=H(Ce);N(c);var Ee=H(c,2);qr(Ee,21,()=>G(ae).regions,Ur,(e,t)=>{let n=I(()=>de(G(t).hitRect.x+G(t).hitRect.w/2,G(t).hitRect.y+G(t).hitRect.h/2));var r=yf();vn(()=>{q(r,`aria-label`,G(t).label),q(r,`data-region-key`,G(t).key),ci(r,`left: ${G(n).left??``}%; top: ${G(n).top??``}%;`)}),K(e,r)}),N(Ee);var De=H(Ee,2);qr(De,21,()=>Object.entries(G(ne)),Ur,(e,t)=>{var n=I(()=>b(G(t),2));let r=()=>G(n)[0],i=()=>G(n)[1],a=I(()=>G(ae).regionByKey[r()]);var o=wr(),s=Xt(o),c=e=>{let t=I(()=>G(a).slots(i().length));var n=wr();qr(Xt(n),19,i,e=>e.id,(e,n,r)=>{let i=I(()=>de(G(t)[G(r)].x,G(t)[G(r)].y));var o=bf(),s=Yt(o);{let e=I(()=>ad(G(n),G(a).label,we(G(n).id),G(S))),t=I(()=>we(G(n).id)??`neutral`),r=I(()=>G(f)===G(n).id),i=I(()=>G(f)===G(n).id&&G(h)!==null);fd(s,{fit:!0,get id(){return G(n).id},get label(){return G(n).label},get imageUrl(){return G(n).imageUrl},get imageAlt(){return G(n).imageAlt},get name(){return G(e)},get correctness(){return G(t)},get held(){return G(r)},get invisible(){return G(i)},get disabled(){return G(T)},onpointerdown:e=>k(G(n),e),onkeydown:e=>Se(G(n),e),onkeyup:xe,onclick:e=>be(G(n),e)})}N(o),vn(()=>ci(o,`left: ${G(i).left??``}%; top: ${G(i).top??``}%; width: ${G(ie).w??``}px; height: ${G(ie).h??``}px; transform: translate(-50%, -50%) scale(${G(oe)??``});`)),K(e,o)}),K(e,n)};Hr(s,e=>{G(a)&&e(c)}),K(e,o)}),N(De),N(n),vi(n,e=>V(l,e),()=>G(l));var Ne=H(n,2);{let e=I(()=>G(p)===`tray`||G(f)!==null&&G(m)===`tray`),t=I(()=>$(`tray`,G(S)));hd(Ne,{get isDropTarget(){return G(e)},get label(){return G(t)},children:(e,t)=>{var n=wr();qr(Xt(n),17,()=>G(re),e=>e.id,(e,t)=>{{let n=I(()=>ad(G(t),null,we(G(t).id),G(S))),r=I(()=>we(G(t).id)??`neutral`),i=I(()=>G(f)===G(t).id),a=I(()=>G(f)===G(t).id&&G(h)!==null);fd(e,{get id(){return G(t).id},get label(){return G(t).label},get imageUrl(){return G(t).imageUrl},get imageAlt(){return G(t).imageAlt},get name(){return G(n)},get correctness(){return G(r)},get held(){return G(i)},get invisible(){return G(a)},get disabled(){return G(T)},onpointerdown:e=>k(G(t),e),onkeydown:e=>Se(G(t),e),onkeyup:xe,onclick:e=>be(G(t),e)})}}),K(e,n)},$$slots:{default:!0}})}vn(e=>{r=ci(n,``,r,{width:e,"aspect-ratio":`${G(D).width??``} / ${G(D).height??``}`}),q(c,`viewBox`,`0 0 ${G(D).width??``} ${G(D).height??``}`),q(d,`id`,i),q(d,`width`,G(D).width),q(d,`height`,G(D).height),q(_,`width`,G(D).width),q(_,`height`,G(D).height),q(v,`cx`,G(D).circles[0].cx),q(v,`cy`,G(D).circles[0].cy),q(v,`r`,G(D).circles[0].r),q(y,`cx`,G(D).circles[1].cx),q(y,`cy`,G(D).circles[1].cy),q(y,`r`,G(D).circles[1].r),q(x,`id`,a),q(x,`width`,G(D).width),q(x,`height`,G(D).height),q(w,`width`,G(D).width),q(w,`height`,G(D).height),q(E,`cx`,G(D).circles[1].cx),q(E,`cy`,G(D).circles[1].cy),q(E,`r`,G(D).circles[1].r),q(ee,`cx`,G(D).circles[0].cx),q(ee,`cy`,G(D).circles[0].cy),q(ee,`r`,G(D).circles[0].r),q(te,`id`,s),q(se,`cx`,G(D).circles[0].cx),q(se,`cy`,G(D).circles[0].cy),q(se,`r`,G(D).circles[0].r),q(ce,`id`,o),q(ce,`width`,G(D).width),q(ce,`height`,G(D).height),q(le,`width`,G(D).width),q(le,`height`,G(D).height),q(ue,`cx`,G(D).circles[0].cx),q(ue,`cy`,G(D).circles[0].cy),q(ue,`r`,G(D).circles[0].r),q(O,`cx`,G(D).circles[1].cx),q(O,`cy`,G(D).circles[1].cy),q(O,`r`,G(D).circles[1].r),q(fe,`x`,G(D).scale),q(fe,`y`,G(D).scale),q(fe,`width`,G(D).width-2*G(D).scale),q(fe,`height`,G(D).height-2*G(D).scale),q(fe,`stroke-width`,1.5*G(D).scale),q(fe,`rx`,12*G(D).scale),q(Te,`x1`,16*G(D).scale),q(Te,`x2`,G(D).width-16*G(D).scale),q(Te,`y1`,G(ae).outsideStripTop),q(Te,`y2`,G(ae).outsideStripTop),q(Te,`stroke-width`,G(D).scale),q(Te,`stroke-dasharray`,`${4*G(D).scale} ${6*G(D).scale}`)},[()=>Nd(G(D),G(ie))]),gi(n,`clientWidth`,e=>V(g,e)),K(e,t)};Hr(He,e=>{G(ae)?e(We,-1):e(Ue)});var Ge=H(He,2),Ke=e=>{var t=Sf();fd(Yt(t),{get id(){return G(Ne).id},get label(){return G(Ne).label},get imageUrl(){return G(Ne).imageUrl},get imageAlt(){return G(Ne).imageAlt},get language(){return G(S)},correctness:`neutral`,ghost:!0}),N(t),vn(()=>ci(t,`left: ${G(h).x??``}px; top: ${G(h).y??``}px;`)),K(e,t)};Hr(Ge,e=>{G(Ne)&&G(h)&&e(Ke)}),vi(H(Ge,2),e=>u=e,()=>u),N(Pe),vi(Pe,e=>c=e,()=>c),fr(`focusout`,Pe,Ce),K(e,Pe),Ve()}pr([`focusout`,`click`]),Ei(Tf,{model:{type:`Object`},session:{type:`Object`},onSessionChange:{}},[],[]);function Ef(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Df(e,t){if(e===t)return e;if(!Ef(e)||!Ef(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 Of=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}},kf=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 Af(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 Of(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=Df(this.#t,e),super.session=e}dispatchSessionChanged(){this.dispatchEvent(new kf(this.tagName.toLowerCase(),this.isComplete()))}}return r}return Af(Tf,{isComplete:nf})})();
|