@pie-element/venn-classification 0.1.1-next.1 → 0.1.1-next.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/author.js +2 -0
  2. package/dist/author/index.d.ts +2 -10
  3. package/dist/author/index.js +23824 -18172
  4. package/dist/author/index.js.map +1 -1
  5. package/dist/browser/VennClassification-CijQL7Lf.js +3620 -0
  6. package/dist/browser/VennClassification-CijQL7Lf.js.map +1 -0
  7. package/dist/browser/author/index.js +5428 -4285
  8. package/dist/browser/author/index.js.map +1 -1
  9. package/dist/browser/controller/index.js +2 -2
  10. package/dist/browser/controller-bkBJ6-j1.js +1779 -0
  11. package/dist/browser/controller-bkBJ6-j1.js.map +1 -0
  12. package/dist/browser/delivery/index.js +86 -27
  13. package/dist/browser/delivery/index.js.map +1 -1
  14. package/dist/browser/editor-runtime/VennClassification-CijQL7Lf.js +3620 -0
  15. package/dist/browser/editor-runtime/VennClassification-CijQL7Lf.js.map +1 -0
  16. package/dist/browser/editor-runtime/author/index.js +950 -0
  17. package/dist/browser/editor-runtime/author/index.js.map +1 -0
  18. package/dist/browser/editor-runtime/controller/index.js +2 -0
  19. package/dist/browser/editor-runtime/controller-bkBJ6-j1.js +1779 -0
  20. package/dist/browser/editor-runtime/controller-bkBJ6-j1.js.map +1 -0
  21. package/dist/browser/editor-runtime/delivery/index.js +95 -0
  22. package/dist/browser/editor-runtime/delivery/index.js.map +1 -0
  23. package/dist/controller/defaults.d.ts +5 -0
  24. package/dist/controller/index.d.ts +21 -7
  25. package/dist/controller/index.js +2400 -50
  26. package/dist/controller/index.js.map +1 -1
  27. package/dist/controller/region.d.ts +2 -2
  28. package/dist/delivery/dnd.d.ts +9 -0
  29. package/dist/delivery/index.d.ts +2 -14
  30. package/dist/delivery/index.js +6672 -3644
  31. package/dist/delivery/index.js.map +1 -1
  32. package/dist/delivery/layout.d.ts +104 -34
  33. package/dist/delivery/tile-accessible-name.d.ts +13 -1
  34. package/dist/i18n.d.ts +9 -0
  35. package/dist/index.iife.js +17 -17
  36. package/dist/index.js +2 -6697
  37. package/dist/runtime-support.js +5 -5
  38. package/dist/runtime-support.js.map +1 -1
  39. package/dist/types.d.ts +7 -0
  40. package/package.json +20 -20
  41. package/dist/browser/VennClassification-C6roHfLf.js +0 -3412
  42. package/dist/browser/VennClassification-C6roHfLf.js.map +0 -1
  43. package/dist/browser/controller-Dt0dg5dA.js +0 -249
  44. package/dist/browser/controller-Dt0dg5dA.js.map +0 -1
  45. package/dist/index.js.map +0 -1
@@ -1,20 +1,20 @@
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,ee=16384,te=32768,ne=1<<25,re=65536,ie=1<<19,ae=1<<20,oe=1<<25,se=65536,ce=1<<21,le=1<<22,ue=1<<23,de=Symbol(`$state`),fe=Symbol(`legacy props`),pe=Symbol(``),me=Symbol(`attributes`),he=Symbol(`class`),ge=Symbol(`style`),_e=Symbol(`text`),ve=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ye=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function be(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function xe(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Se(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Ce(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function we(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Te(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Ee(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function De(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Oe(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function ke(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ae(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function je(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Me(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}function Ne(){console.warn(`https://svelte.dev/e/derived_inert`)}function Pe(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Fe(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var T=!1;function E(e){T=e}var D;function O(t){if(t===null)throw Pe(),e;return D=t}function Ie(){return O(on(D))}function k(t){if(T){if(on(D)!==null)throw Pe(),e;D=t}}function Le(e=1){if(T){for(var t=e,n=D;t--;)n=on(n);D=n}}function Re(e=!0){for(var t=0,n=D;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else (r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=on(n);e&&n.remove(),n=i}}function ze(t){if(!t||t.nodeType!==8)throw Pe(),e;return t.data}function Be(e){return e===this.v}function Ve(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function He(e){return!Ve(e,this.v)}var Ue=!1,We=!1,A=null;function Ge(e){A=e}function Ke(e,t=!1,n){A={p:A,i:!1,c:null,e:null,s:e,x:null,r:G,l:We&&!t?{s:null,u:null,$:[]}:null}}function qe(e){var t=A,n=t.e;if(n!==null){t.e=null;for(var r of n)yn(r)}return e!==void 0&&(t.x=e),t.i=!0,A=t.p,e??{}}function Je(){return!We||A!==null&&A.l===null}var Ye=[];function Xe(){var e=Ye;Ye=[],v(e)}function Ze(e){if(Ye.length===0&&!ft){var t=Ye;queueMicrotask(()=>{t===Ye&&Xe()})}Ye.push(e)}function Qe(){for(;Ye.length>0;)Xe()}function $e(e){var t=G;if(t===null)return W.f|=ue,e;if(!(t.f&32768)&&!(t.f&4))throw e;et(e,t)}function et(e,t){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}var tt=~(S|C|x);function j(e,t){e.f=e.f&tt|t}function nt(e){e.f&512||e.deps===null?j(e,x):j(e,C)}function rt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=se,rt(t.deps))}function it(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),rt(e.deps),j(e,x)}var at=!1,ot=!1;function st(e){var t=ot;try{return ot=!1,[e(),ot]}finally{ot=t}}var ct=null,lt=null,M=null,ut=null,N=null,dt=null,ft=!1,pt=!1,mt=null,ht=null,gt=0,_t=1,vt=class e{id=_t++;#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(){lt===null?ct=lt=this:(lt.#n=this,this.#t=lt),lt=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)j(r,S),t(r);for(r of n.m)j(r,C),t(r)}this.#p.add(e)}#g(){this.#e=!0,gt++>1e3&&(this.#S(),yt());for(let e of this.#u)this.#d.delete(e),j(e,S),this.schedule(e);for(let e of this.#d)j(e,C),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=mt=[],r=[],i=ht=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw Et(e),this.#h()||this.discard(),t}if(M=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(mt=null,ht=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)Tt(e,t);i.length>0&&M.#g();return}let o=this.#v();if(o){this.#b(r),this.#b(n),o.#y(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),ut=this,xt(r),xt(n),ut=null,this.#s?.resolve();var s=M;if(this.#a===0&&(this.#c.length===0||s!==null)&&(this.#S(),Ue&&(this.#x(),M=s)),this.#c.length>0)if(s!==null){let e=s;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}else s=this;s!==null&&s.#g()}#_(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):Ue&&i&16777224?n.push(r):$n(r)&&(i&16&&this.#d.add(r),ir(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#v(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#y(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null)for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),j(i,S),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#S(),M=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)it(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]),N?.set(e,n)),this.is_fork||(e.v=n)}activate(){M=this}deactivate(){M=null,N=null}flush(){try{pt=!0,M=this,this.#g()}finally{gt=0,dt=null,mt=null,ht=null,pt=!1,M=null,N=null,Gt.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear(),this.#S(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}#x(){for(let l=ct;l!==null;l=l.#n){var e=l.id<this.id,t=[];for(let[r,[i,a]]of this.current){if(l.current.has(r)){var n=l.current.get(r)[0];if(e&&i!==n)l.current.set(r,[i,a]);else continue}t.push(r)}if(e)for(let[e,t]of this.async_deriveds){let n=l.async_deriveds.get(e);n&&t.promise.then(n.resolve).catch(n.reject)}if(l.#e){var r=[...l.current.keys()].filter(e=>!l.current.get(e)[1]&&!this.current.has(e));if(r.length===0)e&&l.discard();else if(t.length>0){if(e)for(let e of this.#p)l.unskip_effect(e,e=>{e.f&4194320?l.schedule(e):l.#b([e])});l.activate();var i=new Set,a=new Map;for(var o of t)St(o,r,i,a);a=new Map;var s=[...l.current].filter(([e,t])=>{let n=this.current.get(e);return n?n[0]!==t[0]||n[1]!==t[1]:!0}).map(([e])=>e);if(s.length>0)for(let e of this.#l)!(e.f&155648)&&Ct(e,s,a)&&(e.f&4194320?(j(e,S),l.schedule(e)):l.#u.add(e));if(l.#c.length>0&&!l.#m){l.apply();for(var c of l.#c)l.#_(c,[],[]);l.#c=[]}l.deactivate()}}}}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,Ze(()=>{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(M===null){let t=M=new e;!pt&&!ft&&Ze(()=>{t.#e||t.flush()})}return M}apply(){if(!Ue||!this.is_fork&&this.#t===null&&this.#n===null){N=null;return}N=new Map;for(let[e,[t]]of this.current)N.set(e,t);for(let t=ct;t!==null;t=t.#n)if(!(t===this||t.is_fork)){var e=!1;if(t.id<this.id){for(let[n,[,r]]of t.current)if(!r&&this.current.has(n)){e=!0;break}}if(!e)for(let[e,n]of t.previous)N.has(e)||N.set(e,n)}}schedule(e){if(dt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(mt!==null&&t===G&&(Ue||(W===null||!(W.f&2))&&!at))return;if(n&96){if(!(n&1024))return;t.f^=x}}this.#c.push(t)}#S(){if(this.linked){var e=this.#t,t=this.#n;e===null?ct=t:e.#n=t,t===null?lt=e:t.#t=e,this.linked=!1}}};function P(e){var t=ft;ft=!0;try{var n;for(e&&(M!==null&&!M.is_fork&&M.flush(),n=e());;){if(Qe(),M===null)return n;M.flush()}}finally{ft=t}}function yt(){try{Ee()}catch(e){et(e,dt)}}var bt=null;function xt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&$n(r)&&(bt=new Set,ir(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&jn(r),bt?.size>0)){Gt.clear();for(let e of bt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)bt.has(n)&&(bt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||ir(n)}}bt.clear()}}bt=null}}function St(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?St(i,t,n,r):e&4194320&&!(e&2048)&&Ct(i,t,r)&&(j(i,S),wt(i))}}function Ct(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&&Ct(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function wt(e){M.schedule(e)}function Tt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),j(e,x);for(var n=e.first;n!==null;)Tt(n,t),n=n.next}}function Et(e){j(e,x);for(var t=e.first;t!==null;)Et(t),t=t.next}function Dt(e){let t=0,n=qt(0),r;return()=>{gn()&&(J(n),wn(()=>(t===0&&(r=cr(()=>e(()=>Zt(n)))),t+=1,()=>{Ze(()=>{--t,t===0&&(r?.(),r=void 0,Zt(n))})})))}}var Ot=re|ie;function kt(e,t,n,r){new At(e,t,n,r)}var At=class{parent;is_pending=!1;transform_error;#e;#t=T?D:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=Dt(()=>(this.#m=qt(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=Tn(()=>{if(T){let e=this.#t;Ie();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},Ot),T&&(this.#e=D)}#g(){try{this.#a=En(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=En(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=En(()=>e(this.#e)),Ze(()=>{var e=this.#c=document.createDocumentFragment(),t=R();e.append(t),this.#a=this.#x(()=>En(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,Mn(this.#o,()=>{this.#o=null}),this.#b(M))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=En(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();In(this.#a,e);let t=this.#n.pending;this.#o=En(()=>t(this.#e))}else this.#b(M)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){it(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=G,n=W,r=A;Un(this.#i),Hn(this.#i),Ge(this.#i.ctx);try{return vt.ensure(),e()}catch(e){return $e(e),null}finally{Un(t),Hn(n),Ge(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&Mn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,Ze(()=>{this.#d=!1,this.#m&&Yt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),J(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;M?.is_fork?(this.#a&&M.skip_effect(this.#a),this.#o&&M.skip_effect(this.#o),this.#s&&M.skip_effect(this.#s),M.oncommit(()=>{this.#C(e)})):this.#C(e)}#C(e){this.#a&&=(U(this.#a),null),this.#o&&=(U(this.#o),null),this.#s&&=(U(this.#s),null),T&&(O(this.#t),Le(),O(Re()));var t=this.#n.onerror;let n=this.#n.failed;var r=!1,i=!1;let a=()=>{if(r){Fe();return}r=!0,i&&Me(),this.#s!==null&&Mn(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){et(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return En(()=>{var t=G;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return et(e,this.#i.parent),null}}))};Ze(()=>{var t;try{t=this.transform_error(e)}catch(e){et(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>et(e,this.#i&&this.#i.parent)):o(t)})}};function jt(e,t,n,r){let i=Je()?Ft:Rt;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=Mt(),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){et(e,s)}Nt()}}var d=Pt();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>Lt(e))).then(u).catch(e=>et(e,s)).finally(d)}l?l.then(()=>{c(),f(),Nt()}):f()}function Mt(){var e=G,t=W,n=A,r=M;return function(i=!0){Un(e),Hn(t),Ge(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function Nt(e=!0){Un(null),Hn(null),Ge(null),e&&M?.deactivate()}function Pt(){var e=G,t=e.b,n=M,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 Ft(e){var n=2|S;return G!==null&&(G.f|=ie),{ctx:A,deps:null,effects:null,equals:Be,f:n,fn:e,reactions:null,rv:0,v:t,wv:0,parent:G,ac:null}}var It=Symbol(`obsolete`);function Lt(e,n,r){let i=G;i===null&&xe();var a=void 0,o=qt(t),s=!W,c=new Set;return Cn(()=>{var t=G,n=y();a=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ve&&n.reject(e)}).finally(Nt)}catch(e){n.reject(e),Nt()}var r=M;if(s){if(t.f&32768)var l=Pt();if(i.b?.is_rendered())r.async_deriveds.get(t)?.reject(It);else for(let e of c.values())e.reject(It);c.add(n),r.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),c.delete(n),t!==It&&(r.activate(),t?(o.f|=ue,Yt(o,t)):(o.f&8388608&&(o.f^=ue),Yt(o,e)),r.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),_n(()=>{for(let e of c)e.reject(It)}),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function F(e){let t=Ft(e);return Ue||Gn(t),t}function Rt(e){let t=Ft(e);return t.equals=He,t}function zt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)U(t[n])}}function Bt(e){var n,r=G,i=e.parent;if(!zn&&i!==null&&e.v!==t&&i.f&24576)return Ne(),e.v;Un(i);try{e.f&=~se,zt(e),n=tr(e)}finally{Un(r)}return n}function Vt(e){var t=Bt(e);if(!e.equals(t)&&(e.wv=Qn(),(!M?.is_fork||e.deps===null)&&(M===null?e.v=t:(M.capture(e,t,!0),ut?.capture(e,t,!0)),e.deps===null))){j(e,x);return}zn||(N===null?nt(e):(gn()||M?.is_fork)&&N.set(e,t))}function Ht(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ve),t.fn!==null&&(t.teardown=_),t.ac=null,rr(t,0),On(t))}function Ut(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&ir(t)}var Wt=new Set,Gt=new Map,Kt=!1;function qt(e,t){return{f:0,v:e,reactions:null,equals:Be,rv:0,wv:0}}function I(e,t){let n=qt(e,t);return Gn(n),n}function Jt(e,t=!1,n=!0){let r=qt(e);return t||(r.equals=He),We&&n&&A!==null&&A.l!==null&&(A.l.s??=[]).push(r),r}function L(e,t,n=!1){return W!==null&&(!Vn||W.f&131072)&&Je()&&W.f&4325394&&(Wn===null||!Wn.has(e))&&je(),Yt(e,n?$t(t):t,ht)}function Yt(e,t,n=null){if(!e.equals(t)){Gt.set(e,zn?t:e.v);var r=vt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&Bt(t),N===null&&nt(t)}e.wv=Qn(),Qt(e,S,n),Je()&&G!==null&&G.f&1024&&!(G.f&96)&&(Kn===null?qn([e]):Kn.push(e)),!r.is_fork&&Wt.size>0&&!Kt&&Xt()}return t}function Xt(){Kt=!1;for(let e of Wt){e.f&1024&&j(e,C);let t;try{t=$n(e)}catch{t=!0}t&&ir(e)}Wt.clear()}function Zt(e){L(e,e.v+1)}function Qt(e,t,n){var r=e.reactions;if(r!==null)for(var i=Je(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===G)){var l=(c&S)===0;if(l&&j(s,t),c&131072)Wt.add(s);else if(c&2){var u=s;N?.delete(u),c&65536||(c&512&&(G===null||!(G.f&2097152))&&(s.f|=se),Qt(u,C,n))}else if(l){var d=s;c&16&&bt!==null&&bt.add(d),n===null?wt(d):n.push(d)}}}}function $t(e){if(typeof e!=`object`||!e||de in e)return e;let n=h(e);if(n!==p&&n!==m)return e;var r=new Map,i=a(e),o=I(0),s=null,c=Xn,l=e=>{if(Xn===c)return e();var t=W,n=Xn;Hn(null),Zn(c);var r=e();return Hn(t),Zn(n),r};return i&&r.set(`length`,I(e.length,s)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&ke();var i=r.get(t);return i===void 0?l(()=>{var e=I(n.value,s);return r.set(t,e),e}):L(i,n.value,!0),!0},deleteProperty(e,n){var i=r.get(n);if(i===void 0){if(n in e){let e=l(()=>I(t,s));r.set(n,e),Zt(o)}}else L(i,t),Zt(o);return!0},get(n,i,a){if(i===de)return e;var o=r.get(i),c=i in n;if(o===void 0&&(!c||d(n,i)?.writable)&&(o=l(()=>I($t(c?n[i]:t),s)),r.set(i,o)),o!==void 0){var u=J(o);return u===t?void 0:u}return Reflect.get(n,i,a)},getOwnPropertyDescriptor(e,n){var i=Reflect.getOwnPropertyDescriptor(e,n);if(i&&`value`in i){var a=r.get(n);a&&(i.value=J(a))}else if(i===void 0){var o=r.get(n),s=o?.v;if(o!==void 0&&s!==t)return{enumerable:!0,configurable:!0,value:s,writable:!0}}return i},has(e,n){if(n===de)return!0;var i=r.get(n),a=i!==void 0&&i.v!==t||Reflect.has(e,n);return(i!==void 0||G!==null&&(!a||d(e,n)?.writable))&&(i===void 0&&(i=l(()=>I(a?$t(e[n]):t,s)),r.set(n,i)),J(i)===t)?!1:a},set(e,n,a,c){var u=r.get(n),f=n in e;if(i&&n===`length`)for(var p=a;p<u.v;p+=1){var m=r.get(p+``);m===void 0?p in e&&(m=l(()=>I(t,s)),r.set(p+``,m)):L(m,t)}if(u===void 0)(!f||d(e,n)?.writable)&&(u=l(()=>I(void 0,s)),L(u,$t(a)),r.set(n,u));else{f=u.v!==t;var h=l(()=>$t(a));L(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&&L(_,v+1)}Zt(o)}return!0},ownKeys(e){J(o);var n=Reflect.ownKeys(e).filter(e=>{var n=r.get(e);return n===void 0||n.v!==t});for(var[i,a]of r)a.v!==t&&!(i in e)&&n.push(i);return n},setPrototypeOf(){Ae()}})}new Set([`copyWithin`,`fill`,`pop`,`push`,`reverse`,`shift`,`sort`,`splice`,`unshift`]);var en,tn,nn,rn;function an(){if(en===void 0){en=window,tn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;nn=d(t,`firstChild`).get,rn=d(t,`nextSibling`).get,g(e)&&(e[he]=void 0,e[me]=null,e[ge]=void 0,e.__e=void 0),g(n)&&(n[_e]=void 0)}}function R(e=``){return document.createTextNode(e)}function z(e){return nn.call(e)}function on(e){return rn.call(e)}function B(e,t){if(!T)return z(e);var n=z(D);if(n===null)n=D.appendChild(R());else if(t&&n.nodeType!==3){var r=R();return n?.before(r),O(r),r}return t&&dn(n),O(n),n}function sn(e,t=!1){if(!T){var n=z(e);return n instanceof Comment&&n.data===``?on(n):n}if(t){if(D?.nodeType!==3){var r=R();return D?.before(r),O(r),r}dn(D)}return D}function V(e,t=1,n=!1){let r=T?D:e;for(var i;t--;)i=r,r=on(r);if(!T)return r;if(n){if(r?.nodeType!==3){var a=R();return r===null?i?.after(a):r.before(a),O(a),a}dn(r)}return O(r),r}function cn(e){e.textContent=``}function ln(){return!Ue||bt!==null?!1:(G.f&te)!==0}function un(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 dn(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 fn(e){var t=W,n=G;Hn(null),Un(null);try{return e()}finally{Hn(t),Un(n)}}function pn(e){G===null&&(W===null&&Te(e),we()),zn&&Ce(e)}function mn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function hn(e,t){var n=G;n!==null&&n.f&8192&&(e|=w);var r={ctx:A,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};M?.register_created_effect(r);var i=r;if(e&4)mt===null?vt.ensure().schedule(r):mt.push(r);else if(t!==null){try{ir(r)}catch(e){throw U(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|=re))}if(i!==null&&(i.parent=n,n!==null&&mn(i,n),W!==null&&W.f&2&&!(e&64))){var a=W;(a.effects??=[]).push(i)}return r}function gn(){return W!==null&&!Vn}function _n(e){let t=hn(8,null);return j(t,x),t.teardown=e,t}function vn(e){pn(`$effect`);var t=G.f;if(!W&&t&32&&A!==null&&!A.i){var n=A;(n.e??=[]).push(e)}else return yn(e)}function yn(e){return hn(4|ae,e)}function bn(e){vt.ensure();let t=hn(64|ie,e);return()=>{U(t)}}function xn(e){vt.ensure();let t=hn(64|ie,e);return(e={})=>new Promise(n=>{e.outro?Mn(t,()=>{U(t),n(void 0)}):(U(t),n(void 0))})}function Sn(e){return hn(4,e)}function Cn(e){return hn(le|ie,e)}function wn(e,t=0){return hn(8|t,e)}function H(e,t=[],n=[],r=[]){jt(r,t,n,t=>{hn(8,()=>{e(...t.map(J))})})}function Tn(e,t=0){return hn(16|t,e)}function En(e){return hn(32|ie,e)}function Dn(e){var t=e.teardown;if(t!==null){let e=zn,n=W;Bn(!0),Hn(null);try{t.call(null)}finally{Bn(e),Hn(n)}}}function On(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&fn(()=>{e.abort(ve)});var r=n.next;n.f&64?n.parent=null:U(n,t),n=r}}function kn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||U(t),t=n}}function U(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(An(e.nodes.start,e.nodes.end),n=!0),e.f|=ne,On(e,t&&!n),rr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Dn(e),e.f^=ne,e.f|=ee;var i=e.parent;i!==null&&i.first!==null&&jn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function An(e,t){for(;e!==null;){var n=e===t?null:on(e);e.remove(),e=n}}function jn(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 Mn(e,t,n=!0){var r=[];Nn(e,r,!0);var i=()=>{n&&U(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Nn(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;Nn(i,t,o?n:!1)}i=a}}}function Pn(e){Fn(e,!0)}function Fn(e,t){if(e.f&8192){e.f^=w,e.f&1024||(j(e,S),vt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;Fn(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 In(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:on(n);t.append(n),n=i}}var Ln=null,Rn=!1,zn=!1;function Bn(e){zn=e}var W=null,Vn=!1;function Hn(e){W=e}var G=null;function Un(e){G=e}var Wn=null;function Gn(e){W!==null&&(!Ue||W.f&2)&&(Wn??=new Set).add(e)}var K=null,q=0,Kn=null;function qn(e){Kn=e}var Jn=1,Yn=0,Xn=Yn;function Zn(e){Xn=e}function Qn(){return++Jn}function $n(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~se),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if($n(a)&&Vt(a),a.wv>e.wv)return!0}t&512&&N===null&&j(e,x)}return!1}function er(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!Ue&&Wn!==null&&Wn.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?er(a,t,!1):t===a&&(n?j(a,S):a.f&1024&&j(a,C),wt(a))}}function tr(e){var t=K,n=q,r=Kn,i=W,a=Wn,o=A,s=Vn,c=Xn,l=e.f;K=null,q=0,Kn=null,W=l&96?null:e,Wn=null,Ge(e.ctx),Vn=!1,Xn=++Yn,e.ac!==null&&(fn(()=>{e.ac.abort(ve)}),e.ac=null);try{e.f|=ce;var u=e.fn,d=u();e.f|=te;var f=e.deps,p=M?.is_fork;if(K!==null){var m;if(p||rr(e,q),f!==null&&q>0)for(f.length=q+K.length,m=0;m<K.length;m++)f[q+m]=K[m];else e.deps=f=K;if(gn()&&e.f&512)for(m=q;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&q<f.length&&(rr(e,q),f.length=q);if(Je()&&Kn!==null&&!Vn&&f!==null&&!(e.f&6146))for(m=0;m<Kn.length;m++)er(Kn[m],e);if(i!==null&&i!==e){if(Yn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Yn;if(t!==null)for(let e of t)e.rv=Yn;Kn!==null&&(r===null?r=Kn:r.push(...Kn))}return e.f&8388608&&(e.f^=ue),d}catch(e){return $e(e)}finally{e.f^=ce,K=t,q=n,Kn=r,W=i,Wn=a,Ge(o),Vn=s,Xn=c}}function nr(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&&(K===null||!s.call(K,n))){var c=n;c.f&512&&(c.f^=512,c.f&=~se),c.v!==t&&nt(c),Ht(c),rr(c,0)}}function rr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)nr(e,n[r])}function ir(e){var t=e.f;if(!(t&16384)){j(e,x);var n=G,r=Rn;G=e,Rn=!0;try{t&16777232?kn(e):On(e),Dn(e);var i=tr(e);e.teardown=typeof i==`function`?i:null,e.wv=Jn}finally{Rn=r,G=n}}}async function ar(){if(Ue)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),P()}function J(e){var t=(e.f&2)!=0;if(Ln?.add(e),W!==null&&!Vn&&!(G!==null&&G.f&16384)&&(Wn===null||!Wn.has(e))){var n=W.deps;if(W.f&2097152)e.rv<Yn&&(e.rv=Yn,K===null&&n!==null&&n[q]===e?q++:K===null?K=[e]:K.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(zn&&Gt.has(e))return Gt.get(e);if(t){var i=e;if(zn){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||sr(i))&&(a=Bt(i)),Gt.set(i,a),a}var o=(i.f&512)==0&&!Vn&&W!==null&&(Rn||(W.f&512)!=0),c=(i.f&te)===0;$n(i)&&(o&&(i.f|=512),Vt(i)),o&&!c&&(Ut(i),or(i))}if(N?.has(e))return N.get(e);if(e.f&8388608)throw e.v;return e.v}function or(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(Ut(t),or(t))}function sr(e){if(e.v===t)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Gt.has(t)||t.f&2&&sr(t))return!0;return!1}function cr(e){var t=Vn;try{return Vn=!0,e()}finally{Vn=t}}var lr=Symbol(`events`),ur=new Set,dr=new Set;function fr(e,t,n,r={}){function i(e){if(r.capture||_r.call(t,e),!e.cancelBubble)return fn(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?Ze(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function pr(e,t,n,r,i){var a={capture:r,passive:i},o=fr(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&_n(()=>{t.removeEventListener(e,o,a)})}function mr(e,t,n){(t[lr]??={})[e]=n}function hr(e){for(var t=0;t<e.length;t++)ur.add(e[t]);for(var n of dr)n(e)}var gr=null;function _r(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;gr=e;var o=0,s=gr===e&&e[lr];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[lr]=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;Hn(null),Un(null);try{for(var p,m=[];a!==null&&a!==t;){try{var h=a[lr]?.[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[lr]=t,delete e.currentTarget,Hn(d),Un(f)}}}var vr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function yr(e){return vr?.createHTML(e)??e}function br(e){var t=un(`template`);return t.innerHTML=yr(e.replaceAll(`<!>`,`<!---->`)),t.content}function xr(e,t){var n=G;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Y(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(T)return xr(D,null),D;i===void 0&&(i=br(a?e:`<!>`+e),n||(i=z(i)));var t=r||tn?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=z(t),s=t.lastChild;xr(o,s)}else xr(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(T)return xr(D,null),D;if(!o){var e=z(br(a));if(i)for(o=document.createDocumentFragment();z(e);)o.appendChild(z(e));else o=z(e)}var t=o.cloneNode(!0);if(i){var n=z(t),r=t.lastChild;xr(n,r)}else xr(t,t);return t}}function Cr(e,t){return Sr(e,t,`svg`)}function wr(){if(T)return xr(D,null),D;var e=document.createDocumentFragment(),t=document.createComment(``),n=R();return e.append(t,n),xr(t,n),e}function X(e,t){if(T){var n=G;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=D),Ie();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,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[_e]??=e.nodeValue)&&(e[_e]=n,e.nodeValue=`${n}`)}function Or(e,t){return jr(e,t)}function kr(t,n){an(),n.intro=n.intro??!1;let r=n.target,i=T,a=D;try{for(var o=z(r);o&&(o.nodeType!==8||o.data!==`[`);)o=on(o);if(!o)throw e;E(!0),O(o);let i=jr(t,{...n,anchor:o});return E(!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&&De(),an(),cn(r),E(!1),Or(t,n)}finally{E(i),O(a)}}var Ar=new Map;function jr(t,{target:n,anchor:r,props:i={},events:a,context:o,intro:s=!0,transformError:l}){an();var u=void 0,d=xn(()=>{var s=r??n.appendChild(R());kt(s,{pending:()=>{}},n=>{Ke({});var r=A;if(o&&(r.c=o),a&&(i.$$events=a),T&&xr(n,null),u=t(n,i)||{},T&&(G.nodes.end=D,D===null||D.nodeType!==8||D.data!==`]`))throw Pe(),e;qe()},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=Ar.get(e);a===void 0&&(a=new Map,Ar.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,_r,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(c(ur)),dr.add(f),()=>{for(var e of d)for(let r of[n,document]){var t=Ar.get(r),i=t.get(e);--i==0?(r.removeEventListener(e,_r),t.delete(e),t.size===0&&Ar.delete(r)):t.set(e,i)}dr.delete(f),s!==r&&s.parentNode?.removeChild(s)}});return Mr.set(u,d),u}var Mr=new WeakMap;function Nr(e,t){let n=Mr.get(e);return n?(Mr.delete(e),n(t)):Promise.resolve()}var Pr=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)Pn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(Pn(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&&(U(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();In(r,t),t.append(R()),this.#n.set(e,{effect:r,fragment:t})}else U(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Mn(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)||(U(n.effect),this.#n.delete(e))};ensure(e,t){var n=M,r=ln();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=R();i.append(a),this.#n.set(e,{effect:En(()=>t(a)),fragment:i})}else this.#t.set(e,En(()=>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 T&&(this.anchor=D),this.#a(n)}};function Fr(e,t,...n){var r=new Pr(e);Tn(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},re)}function Ir(e){A===null&&be(`onMount`),We&&A.l!==null?Lr(A).m.push(e):vn(()=>{let t=cr(e);if(typeof t==`function`)return t})}function Lr(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}function Z(e,t,n=!1){var r;T&&(r=D,Ie());var i=new Pr(e),a=n?re:0;function o(e,t){if(T){var n=ze(r);if(e!==parseInt(n.substring(1))){var a=Re();O(a),i.anchor=a,E(!1),i.ensure(e,t),E(!0);return}}i.ensure(e,t)}Tn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Rr(e,t){return t}function zr(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];Mn(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Br(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;if(l){var u=n,d=u.parentNode;cn(d),d.append(u),e.items.clear()}Br(e,t,!l)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Br(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|=oe,In(a,document.createDocumentFragment())):U(t[i],n)}}var Vr;function Hr(e,t,n,r,i,o=null){var s=e,l=new Map;if(t&4){var u=e;s=T?O(z(u)):u.appendChild(R())}T&&Ie();var d=null,f=Rt(()=>{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,Wr(v,p,s,t,r),d!==null&&(p.length===0?d.f&33554432?(d.f^=oe,Kr(d,null,s)):Pn(d):Mn(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:Tn(()=>{p=J(f);var e=p.length;let a=!1;T&&ze(s)===`[!`!=(e===0)&&(s=Re(),O(s),E(!1),a=!0);for(var c=new Set,u=M,v=ln(),y=0;y<e;y+=1){T&&D.nodeType===8&&D.data===`]`&&(s=D,a=!0,E(!1));var b=p[y],x=r(b,y),S=h?null:l.get(x);S?(S.v&&Yt(S.v,b),S.i&&Yt(S.i,y),v&&u.unskip_effect(S.e)):(S=Gr(l,h?s:Vr??=R(),b,x,y,i,t,n),h||(S.e.f|=oe),l.set(x,S)),c.add(x)}if(e===0&&o&&!d&&(h?d=En(()=>o(s)):(d=En(()=>o(Vr??=R())),d.f|=oe)),e>c.size&&Se(``,``,``),T&&e>0&&O(Re()),!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&&E(!0),J(f)}),flags:t,items:l,pending:m,outrogroups:null,fallback:d};h=!1,T&&(s=D)}function Ur(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Wr(e,t,n,r,i){var a=(r&8)!=0,o=t.length,s=e.items,l=Ur(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&&(Pn(_),a&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432)if(_.f^=oe,_===l)Kr(_,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),Kr(_,y,n),d=_,p=[],m=[],l=Ur(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)Kr(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(_),Kr(_,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=Ur(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Ur(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Br(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=Ur(l.next);var ee=w.length;if(ee>0){var te=r&4&&o===0?n:null;if(a){for(v=0;v<ee;v+=1)w[v].nodes?.a?.measure();for(v=0;v<ee;v+=1)w[v].nodes?.a?.fix()}zr(e,w,te)}}a&&Ze(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Gr(e,t,n,r,i,a,o,s){var c=o&1?o&16?qt(n):Jt(n,!1,!1):null,l=o&2?qt(i):null;return{v:c,i:l,e:En(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Kr(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=on(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 Jr(t,n,a=!1,o=!1,s=!1,c=!1){var l=t,u=``;if(a){var d=t;T&&(l=O(z(d)))}H(()=>{var t=G;if(u===(u=n()??``)){T&&Ie();return}if(a&&!T){t.nodes=null,d.innerHTML=u,u!==``&&xr(z(d),d.lastChild);return}if(t.nodes!==null&&(An(t.nodes.start,t.nodes.end),t.nodes=null),u!==``){if(T){for(var c=D.data,f=Ie(),p=f;f!==null&&(f.nodeType!==8||f.data!==``);)p=f,f=on(f);if(f===null)throw Pe(),e;xr(D,p),l=O(f);return}var m=un(o?`svg`:s?`math`:`template`,o?r:s?i:void 0);m.innerHTML=u;var h=o||s?m:m.content;if(xr(z(h),h.lastChild),o||s)for(;z(h);)l.before(z(h));else l.before(h)}})}function Yr(e,t){Sn(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector(`#`+t.hash)){let e=un(`style`);e.id=t.hash,e.textContent=t.code,r.appendChild(e)}})}var Xr=[...`
3
- \r\f\xA0\v`];function Zr(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||Xr.includes(r[o-1]))&&(s===r.length||Xr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Qr(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 $r(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function ei(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map($r)),i&&c.push(...Object.keys(i).map($r));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=$r(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+=Qr(r)),i&&(n+=Qr(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function ti(e,t,n,r,i,a){var o=e[he];if(T||o!==n||o===void 0){var s=Zr(n,r,a);(!T||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[he]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function ni(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 ri(e,t,n,r){var i=e[ge];if(T||i!==t){var a=ei(t,r);(!T||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[ge]=t}else r&&(Array.isArray(r)?(ni(e,n?.[0],r[0]),ni(e,n?.[1],r[1],`important`)):ni(e,n,r));return r}var ii=Symbol(`is custom element`),ai=Symbol(`is html`),oi=ye?`link`:`LINK`;function Q(e,t,n,r){var i=si(e);T&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===oi)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[pe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&li(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function si(e){return e[me]??={[ii]:e.nodeName.includes(`-`),[ai]:e.namespaceURI===n}}var ci=new Map;function li(e){var t=e.getAttribute(`is`)||e.nodeName,n=ci.get(t);if(n)return n;ci.set(t,n=[]);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.push(o);i=h(i)}return n}function ui(e,t){return e===t||e?.[de]===t}function di(e={},t,n,r){var i=A.r,a=G;return Sn(()=>{var o,s;return wn(()=>{o=s,s=r?.()||[],cr(()=>{ui(n(...s),e)||(t(e,...s),o&&ui(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&&ui(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function $(e,t,n,r){var i=!We||(n&2)!=0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=void 0,u=()=>o&&i?(l??=Ft(r),J(l)):(c&&(c=!1,s=o?cr(r):r),s);let f;if(a){var p=de in e||fe in e;f=d(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=st(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=u(),f&&(i&&Oe(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?Ft:Rt)(()=>(v=!1,g()));a&&J(y);var b=G;return(function(e,t){if(arguments.length>0){let n=t?J(y):i&&a?$t(e):e;return L(y,n),v=!0,s!==void 0&&(s=n),e}return zn&&v||b.f&16384?y.v:J(y)})}function fi(e){return new pi(e)}var pi=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=Jt(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return J(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===fe?!0:(J(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return L(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?kr:Or)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!Ue&&(!e?.props?.$$host||e.sync===!1)&&P(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||u(this,e,{get(){return this.#t[e]},set(t){this.#t[e]=t},enumerable:!0});this.#t.$set=e=>{Object.assign(r,e)},this.#t.$destroy=()=>{Nr(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()}},mi;typeof HTMLElement==`function`&&(mi=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=un(`slot`);e!=="default"&&(n.name=e),X(t,n)}}let t={},n=gi(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]=hi(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=fi({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=bn(()=>{wn(()=>{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=hi(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]=hi(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 hi(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 gi(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function _i(e,t,n,r,i,a){let o=class extends mi{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=hi(e,n,t),this.$$d[e]=n;var r=this.$$c;r&&(d(r,e)?.get?r[e]=n:r.$set({[e]:n}))}})}),r.forEach(e=>{u(o.prototype,e,{get(){return this.$$c?.[e]}})}),a&&(o=a(o)),e.element=o,o}var vi=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}},yi=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}},bi=e=>{let t=e;return t?typeof t.onSessionChange==`function`||typeof t.onAudioStarted==`function`||typeof t.onAudioEnded==`function`:!1};function xi(e,t={}){let n=t.hostPredicate??bi,r=e;for(;r;){if(n(r))return r;r=r.parentElement}if(typeof document<`u`&&t.fallbackSelector){let e=document.querySelector(t.fallbackSelector);if(n(e))return e}return null}function Si({sourceEl:e,fallbackSelector:t,component:n,complete:r,session:i}){let a=xi(e,{fallbackSelector:t});return a?typeof a.onSessionChange==`function`?(a.onSessionChange(i),a):(a.dispatchEvent(new yi(n,r)),a):null}var Ci=`https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js`,wi=null;function Ti(e){return typeof window>`u`||window.MathJax?.version?Promise.resolve():wi||(wi=new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s={loader:{load:i?[`a11y/assistive-mml`]:[]},tex:{packages:[`base`,`ams`,`autoload`],macros:{parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`}},options:{enableMenu:i,enableExplorer:i,enableAssistiveMml:i},startup:{ready:()=>{window.MathJax?.startup.defaultReady&&(window.MathJax.startup.defaultReady(),t())},defaultReady:()=>{}}};r&&s.tex&&(s.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],s.tex.processEscapes=!0),a||(s.chtml={fontURL:``}),window.MathJax=s;let c=document.createElement(`script`);c.src=o||Ci,c.async=!0,c.onload=()=>{setTimeout(t,100)},c.onerror=()=>{n(Error(`Failed to load MathJax`))},document.head.appendChild(c)}),wi)}function Ei(){let e=window.MathJax?.startup?.document;if(typeof e?.assistiveMml==`function`)try{e.assistiveMml().updateDocument?.()}catch(e){console.warn(`[mathjax-renderer] Failed to attach assistive MathML:`,e)}}function Di(e={}){return async t=>{if(await Ti(e),!window.MathJax?.typesetPromise){console.warn(`[mathjax-renderer] MathJax not loaded or missing typesetPromise.`);return}await window.MathJax.typesetPromise([t]),Ei()}}var Oi=null;function ki(){return Oi||=Di({accessibility:!0,useSingleDollar:!0}),Oi}var Ai=async e=>{if(typeof window>`u`)return;let t=typeof e==`string`,n;return t?(n=document.createElement(`div`),n.innerHTML=e):n=e||document.body,await ki()(n),t?n.innerHTML:void 0};function ji(e){return(e||``).replace(/<[^>]+>/g,` `).replace(/\s+/g,` `).trim()}function Mi(e){let t=(e.imageAlt??``).trim();return(e.imageUrl??``).trim()&&t?t:ji(e.label??``)||`Tile`}var Ni=Y(`<img alt="" class="tile-img svelte-1hgaksk" aria-hidden="true" draggable="false"/>`),Pi=Y(`<span></span>`),Fi=Y(`<span class="badge 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>`),Ii=Y(`<span class="badge 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>`),Li=Y(`<button type="button"><span><!> <!></span> <!></button>`),Ri={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 #334155;border-radius:10px;background:#ffffff;color:#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,
4
- .venn-tile.focused.svelte-1hgaksk {outline:2px solid #2563eb;outline-offset:2px;}.venn-tile.svelte-1hgaksk:hover:not(:disabled) {background:#f8fafc;}.venn-tile.held.svelte-1hgaksk {cursor:grabbing;box-shadow:0 6px 18px rgba(15, 23, 42, 0.18);transform:translateY(-1px);background:#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:#ffffff;opacity:0.96;}.venn-tile.correct.svelte-1hgaksk {border-color:#0ea449;}.venn-tile.incorrect.svelte-1hgaksk {border-color:#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;}.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:#ffffff;}.badge-correct.svelte-1hgaksk {background:#0ea449;}.badge-incorrect.svelte-1hgaksk {background:#bf0d00;}
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 ee(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 b=1024,x=2048,S=4096,C=8192,w=16384,T=32768,te=1<<25,ne=65536,re=1<<19,ie=1<<20,ae=1<<25,E=65536,oe=1<<21,se=1<<22,ce=1<<23,le=Symbol(`$state`),ue=Symbol(`component`),de=Symbol(`legacy props`),fe=Symbol(``),pe=Symbol(`attributes`),me=Symbol(`class`),he=Symbol(`style`),ge=Symbol(`text`),_e=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ve=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function ye(){console.warn(`https://svelte.dev/e/derived_inert`)}function be(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function xe(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var D=!1;function Se(e){D=e}var O;function k(t){if(t===null)throw be(),e;return O=t}function Ce(){return k($t(O))}function A(t){if(D){if($t(O)!==null)throw be(),e;O=t}}function we(e=1){if(D){for(var t=e,n=O;t--;)n=$t(n);O=n}}function Te(e=!0){for(var t=0,n=O;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=$t(n);e&&n.remove(),n=i}}function Ee(t){if(!t||t.nodeType!==8)throw be(),e;return t.data}function De(e){return e===this.v}function Oe(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function ke(e){return!Oe(e,this.v)}function Ae(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function je(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Me(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Ne(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Pe(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Fe(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Ie(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Le(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Re(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function ze(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Be(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Ve(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function He(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var j=null;function Ue(e){j=e}function We(e,t=!1,n){j={p:j,i:!1,c:null,e:null,s:e,x:null,r:W,l:null}}function Ge(e){var t=j,n=t.e;if(n!==null){t.e=null;for(var r of n)hn(r)}return e!==void 0&&(t.x=e),t.i=!0,j=t.p,Ke(e)}function Ke(e={}){return u(e,ue,{value:!0}),e}function qe(){return!0}var Je=[];function Ye(){var e=Je;Je=[],v(e)}function Xe(e){if(Je.length===0&&!St){var t=Je;queueMicrotask(()=>{t===Je&&Ye()})}Je.push(e)}function Ze(){for(;Je.length>0;)Ye()}var Qe=~(x|S|b);function M(e,t){e.f=e.f&Qe|t}function $e(e){e.f&512||e.deps===null?M(e,b):M(e,S)}function et(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=E,et(t.deps))}function tt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),et(e.deps),M(e,b)}var nt=!1;function rt(e){var t=nt;try{return nt=!1,[e(),nt]}finally{nt=t}}function it(e){var t=U,n=W;zn(null),Bn(null);try{return e()}finally{zn(t),Bn(n)}}function at(e,t,n,r){let i=qe()?lt:ft;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=W,c=ot(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){cn(e,s)}st()}}var d=ct();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>dt(e))).then(u).catch(e=>cn(e,s)).finally(d)}l?l.then(()=>{c(),f(),st()}):f()}function ot(){var e=W,t=U,n=j,r=P;return function(i=!0){Bn(e),zn(t),Ue(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function st(e=!0){Bn(null),zn(null),Ue(null),e&&P?.deactivate()}function ct(){var e=W,t=e.b,n=P,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function lt(e){var n=2|x;return W!==null&&(W.f|=re),{ctx:j,deps:null,effects:null,equals:De,f:n,fn:e,reactions:null,rv:0,v:t,wv:0,parent:W,ac:null}}var ut=Symbol(`obsolete`);function dt(e,n,r){let i=W;i===null&&je();var a=void 0,o=Bt(t),s=!U,c=new Set;return bn(()=>{var t=W,n=y();a=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==_e&&n.reject(e)}).finally(st)}catch(e){n.reject(e),st()}var r=P;if(s){if(t.f&32768)var l=ct();if(i.b?.is_rendered())r.async_deriveds.get(t)?.reject(ut);else for(let e of c.values())e.reject(ut);c.add(n),r.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),c.delete(n),t!==ut&&(r.activate(),t?(o.f|=ce,Ht(o,t)):(o.f&8388608&&(o.f^=ce),Ht(o,e)),r.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),pn(()=>{for(let e of c)e.reject(ut)}),new Promise(e=>{function t(n){function r(){n===a?e(o):t(a)}n.then(r,r)}t(a)})}function N(e){let t=lt(e);return Hn(t),t}function ft(e){let t=lt(e);return t.equals=ke,t}function pt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)H(t[n])}}function mt(e){var n,r=W,i=e.parent;if(!In&&i!==null&&e.v!==t&&i.f&24576)return ye(),e.v;Bn(i);try{e.f&=~E,pt(e),n=er(e)}finally{Bn(r)}return n}function ht(e){var t=mt(e);if(!e.equals(t)&&(e.wv=Zn(),(!P?.is_fork||e.deps===null)&&(P===null?e.v=t:(P.capture(e,t,!0),yt?.capture(e,t,!0)),e.deps===null))){M(e,b);return}In||(bt===null?$e(e):(fn()||P?.is_fork)&&bt.set(e,t))}function gt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&it(()=>{t.ac.abort(_e),t.ac=null}),t.fn!==null&&(t.teardown=_),rr(t,0),Tn(t))}function _t(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&ir(t)}var vt=null,P=null,yt=null,bt=null,xt=null,St=!1,Ct=!1,wt=null,Tt=null,Et=0,Dt=1,Ot=class e{id=Dt++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){vt===null?vt=this:(vt.#n=this,this.#t=vt),vt=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)M(r,x),t(r);for(r of n.m)M(r,S),t(r)}this.#p.add(e)}#g(){this.#e=!0,Et++>1e3&&(this.#x(),kt());for(let e of this.#u)this.#d.delete(e),M(e,x),this.schedule(e);for(let e of this.#d)M(e,S),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=wt=[],r=[],i=Tt=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw It(e),this.#h()||this.discard(),t}if(P=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(wt=null,Tt=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)Ft(e,t);i.length>0&&P.#g();return}let o=this.#v();if(o){this.#b(r),this.#b(n),o.#y(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),yt=this,jt(r),jt(n),yt=null,this.#s?.resolve();var s=P;if(this.#a===0&&(this.#c.length===0||s!==null)&&this.#x(),this.#c.length>0)if(s!==null){let e=s;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}else s=this;s!==null&&(Rt.clear(),s.#g())}#_(e,t,n){e.f^=b;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=b:i&4?t.push(r):Qn(r)&&(i&16&&this.#d.add(r),ir(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#v(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#y(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),M(i,x),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#x(),P=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)tt(e[t],this.#u,this.#d)}capture(e,n,r=!1){e.v!==t&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[n,r]),bt?.set(e,n)),this.is_fork||(e.v=n)}activate(){P=this}deactivate(){P=null,bt=null}flush(){try{Ct=!0,P=this,this.#g()}finally{Et=0,xt=null,wt=null,Tt=null,Ct=!1,P=null,bt=null,Rt.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(ut);this.#x(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,Xe(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=y()).promise}static ensure(){if(P===null){let t=P=new e;!Ct&&!St&&Xe(()=>{t.#e||t.flush()})}return P}apply(){bt=null}schedule(e){if(xt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(wt!==null&&t===W&&(U===null||!(U.f&2)))return;if(n&96){if(!(n&1024))return;t.f^=b}}this.#c.push(t)}#x(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?vt=e:t.#t=e,this.linked=!1}}};function F(e){var t=St;St=!0;try{var n;for(e&&(P!==null&&!P.is_fork&&P.flush(),n=e());;){if(Ze(),P===null)return n;P.flush()}}finally{St=t}}function kt(){try{Ie()}catch(e){cn(e,xt)}}var At=null;function jt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Qn(r)&&(At=new Set,ir(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&On(r),At?.size>0)){Rt.clear();for(let e of At){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)At.has(n)&&(At.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||ir(n)}}At.clear()}}At=null}}function Mt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?Mt(i,t,n,r):e&4194320&&!(e&2048)&&Nt(i,t,r)&&(M(i,x),Pt(i))}}function Nt(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(s.call(t,r))return!0;if(r.f&2&&Nt(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function Pt(e){P.schedule(e)}function Ft(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),M(e,b);for(var n=e.first;n!==null;)Ft(n,t),n=n.next}}function It(e){M(e,b);for(var t=e.first;t!==null;)It(t),t=t.next}var Lt=new Set,Rt=new Map,zt=!1;function Bt(e,t){return{f:0,v:e,reactions:null,equals:De,rv:0,wv:0}}function I(e,t){let n=Bt(e,t);return Hn(n),n}function Vt(e,t=!1,n=!0){let r=Bt(e);return t||(r.equals=ke),r}function L(e,t,n=!1){return U!==null&&(!Rn||U.f&131072)&&qe()&&U.f&4325394&&(Vn===null||!Vn.has(e))&&Ve(),Ht(e,n?Kt(t):t,Tt)}function Ht(e,t,n=null){if(!e.equals(t)){In?Rt.set(e,t):Rt.has(e)||Rt.set(e,e.v);var r=Ot.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&mt(t),bt===null&&$e(t)}e.wv=Zn(),Gt(e,x,n),qe()&&W!==null&&W.f&1024&&!(W.f&96)&&(Gn===null?Kn([e]):Gn.push(e)),!r.is_fork&&Lt.size>0&&!zt&&Ut()}return t}function Ut(){zt=!1;for(let e of Lt){e.f&1024&&M(e,S);let t;try{t=Qn(e)}catch{t=!0}t&&ir(e)}Lt.clear()}function Wt(e){L(e,e.v+1)}function Gt(e,t,n){var r=e.reactions;if(r!==null)for(var i=qe(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===W)){var l=(c&x)===0;if(l&&M(s,t),c&131072)Lt.add(s);else if(c&2){var u=s;bt?.delete(u),c&65536||(c&512&&(W===null||!(W.f&2097152))&&(s.f|=E),Gt(u,S,n))}else if(l){var d=s;c&16&&At!==null&&At.add(d),n===null?Pt(d):n.push(d)}}}}function Kt(e){if(typeof e!=`object`||!e||le in e||ue in e)return e;let n=h(e);if(n!==p&&n!==m)return e;var r=new Map,i=a(e),o=I(0),s=null,c=Yn,l=e=>{if(Yn===c)return e();var t=U,n=Yn;zn(null),Xn(c);var r=e();return zn(t),Xn(n),r};return i&&r.set(`length`,I(e.length,s)),new Proxy(e,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&ze();var i=r.get(t);return i===void 0?l(()=>{var e=I(n.value,s);return r.set(t,e),e}):L(i,n.value,!0),!0},deleteProperty(e,n){var i=r.get(n);if(i===void 0){if(n in e){let e=l(()=>I(t,s));r.set(n,e),Wt(o)}}else L(i,t),Wt(o);return!0},get(n,i,a){if(i===le)return e;var o=r.get(i),c=i in n;if(o===void 0&&(!c||d(n,i)?.writable)&&(o=l(()=>I(Kt(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){var i=Reflect.getOwnPropertyDescriptor(e,n);if(i&&`value`in i){var a=r.get(n);a&&(i.value=G(a))}else if(i===void 0){var o=r.get(n),s=o?.v;if(o!==void 0&&s!==t)return{enumerable:!0,configurable:!0,value:s,writable:!0}}return i},has(e,n){if(n===le)return!0;var i=r.get(n),a=i!==void 0&&i.v!==t||Reflect.has(e,n);return(i!==void 0||W!==null&&(!a||d(e,n)?.writable))&&(i===void 0&&(i=l(()=>I(a?Kt(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(()=>I(t,s)),r.set(p+``,m)):L(m,t)}if(u===void 0)(!f||d(e,n)?.writable)&&(u=l(()=>I(void 0,s)),L(u,Kt(a)),r.set(n,u));else{f=u.v!==t;var h=l(()=>Kt(a));L(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&&L(_,v+1)}Wt(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(){Be()}})}var qt,Jt,Yt,Xt;function Zt(){if(qt===void 0){qt=window,Jt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Yt=d(t,`firstChild`).get,Xt=d(t,`nextSibling`).get,g(e)&&(e[me]=void 0,e[pe]=null,e[he]=void 0,e.__e=void 0),g(n)&&(n[ge]=void 0)}}function Qt(e=``){return document.createTextNode(e)}function R(e){return Yt.call(e)}function $t(e){return Xt.call(e)}function z(e,t){if(!D)return R(e);var n=R(O);if(n===null)n=O.appendChild(Qt());else if(t&&n.nodeType!==3){var r=Qt();return n?.before(r),k(r),r}return t&&on(n),k(n),n}function en(e,t=!1){if(!D){var n=R(e);return n instanceof Comment&&n.data===``?$t(n):n}if(t){if(O?.nodeType!==3){var r=Qt();return O?.before(r),k(r),r}on(O)}return O}function tn(e,t=!1){if(!D)return R(e);var n=z(e,t);return A(e),n}function B(e,t=1,n=!1){let r=D?O:e;for(var i;t--;)i=r,r=$t(r);if(!D)return r;if(n){if(r?.nodeType!==3){var a=Qt();return r===null?i?.after(a):r.before(a),k(a),a}on(r)}return k(r),r}function nn(e){e.textContent=``}function rn(){return!1}function an(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function on(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function sn(e){var t=W;if(t===null)return U.f|=ce,e;if(!(t.f&32768)&&!(t.f&4))throw e;cn(e,t)}function cn(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 ln(e){W===null&&(U===null&&Fe(e),Pe()),In&&Ne(e)}function un(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function dn(e,t){var n=W;n!==null&&n.f&8192&&(e|=C);var r={ctx:j,deps:null,nodes:null,f:e|x|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};P?.register_created_effect(r);var i=r;if(e&4)wt===null?Ot.ensure().schedule(r):wt.push(r);else if(t!==null){try{ir(r)}catch(e){throw H(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|=ne))}if(i!==null&&(i.parent=n,n!==null&&un(i,n),U!==null&&U.f&2&&!(e&64))){var a=U;(a.effects??=[]).push(i)}return r}function fn(){return U!==null&&!Rn}function pn(e){let t=dn(8,null);return M(t,b),t.teardown=e,t}function mn(e){ln(`$effect`);var t=W.f;if(!U&&t&32&&j!==null&&!j.i){var n=j;(n.e??=[]).push(e)}else return hn(e)}function hn(e){return dn(4|ie,e)}function gn(e){return ln(`$effect.pre`),dn(8|ie,e)}function _n(e){Ot.ensure();let t=dn(64|re,e);return()=>{H(t)}}function vn(e){Ot.ensure();let t=dn(64|re,e);return(e={})=>new Promise(n=>{e.outro?kn(t,()=>{H(t),n(void 0)}):(H(t),n(void 0))})}function yn(e){return dn(4,e)}function bn(e){return dn(se|re,e)}function xn(e,t=0){return dn(8|t,e)}function V(e,t=[],n=[],r=[]){at(r,t,n,t=>{dn(8,()=>{e(...t.map(G))})})}function Sn(e,t=0){return dn(16|t,e)}function Cn(e){return dn(32|re,e)}function wn(e){var t=e.teardown;if(t!==null){let n=In,r=U;Ln(!0),zn(null);try{t.call(null)}catch(t){cn(t,e.parent)}finally{Ln(n),zn(r)}}}function Tn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&it(()=>{e.abort(_e)});var r=n.next;n.f&64?n.parent=null:H(n,t),n=r}}function En(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||H(t),t=n}}function H(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Dn(e.nodes.start,e.nodes.end),n=!0),e.f|=te,Tn(e,t&&!n),rr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();wn(e),e.f^=te,e.f|=w;var i=e.parent;i!==null&&i.first!==null&&On(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Dn(e,t){for(;e!==null;){var n=e===t?null:$t(e);e.remove(),e=n}}function On(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 kn(e,t,n=!0){var r=[];e.f|=256,An(e,r,!0);var i=()=>{n&&H(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function An(e,t,n){if(!(e.f&8192)){e.f^=C;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;An(i,t,o?n:!1)}i=a}}}function jn(e){e.f&=-257,Mn(e,!0)}function Mn(e,t){if(!(e.f&256)&&e.f&8192){e.f^=C,e.f&1024||(M(e,x),Ot.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;Mn(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 Nn(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:$t(n);t.append(n),n=i}}var Pn=null,Fn=!1,In=!1;function Ln(e){In=e}var U=null,Rn=!1;function zn(e){U=e}var W=null;function Bn(e){W=e}var Vn=null;function Hn(e){U!==null&&(Vn??=new Set).add(e)}var Un=null,Wn=0,Gn=null;function Kn(e){Gn=e}var qn=1,Jn=0,Yn=Jn;function Xn(e){Yn=e}function Zn(){return++qn}function Qn(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~E),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Qn(a)&&ht(a),a.wv>e.wv)return!0}t&512&&bt===null&&M(e,b)}return!1}function $n(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Vn!==null&&Vn.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?$n(a,t,!1):t===a&&(n?M(a,x):a.f&1024&&M(a,S),Pt(a))}}function er(e){var t=Un,n=Wn,r=Gn,i=U,a=Vn,o=j,s=Rn,c=Yn,l=e.f;Un=null,Wn=0,Gn=null,U=l&96?null:e,Vn=null,Ue(e.ctx),Rn=!1,Yn=++Jn,e.ac!==null&&(it(()=>{e.ac.abort(_e)}),e.ac=null);try{e.f|=oe;var u=e.fn,d=u();e.f|=T;var f=tr(e);if(qe()&&Gn!==null&&!Rn&&f!==null&&!(e.f&6146))for(var p=0;p<Gn.length;p++)$n(Gn[p],e);if(i!==null&&i!==e){if(Jn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Jn;if(t!==null)for(let e of t)e.rv=Jn;Gn!==null&&(r===null?r=Gn:r.push(...Gn))}return e.f&8388608&&(e.f^=ce),d}catch(t){return tr(e),sn(t)}finally{e.f^=oe,Un=t,Wn=n,Gn=r,U=i,Vn=a,Ue(o),Rn=s,Yn=c}}function tr(e){var t=e.deps,n=P?.is_fork;if(Un!==null){var r;if(n||rr(e,Wn),t!==null&&Wn>0)for(t.length=Wn+Un.length,r=0;r<Un.length;r++)t[Wn+r]=Un[r];else e.deps=t=Un;if(fn()&&e.f&512)for(r=Wn;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&Wn<t.length&&(rr(e,Wn),t.length=Wn);return t}function nr(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&&(Un===null||!s.call(Un,n))){var c=n;c.f&512&&(c.f^=512,c.f&=~E),c.v!==t&&$e(c),c.ac!==null&&it(()=>{c.ac.abort(_e),c.ac=null,M(c,x)}),gt(c),rr(c,0)}}function rr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)nr(e,n[r])}function ir(e){var t=e.f;if(!(t&16384)){M(e,b);var n=W,r=Fn;W=e,Fn=(t&96)==0;try{t&16777232?En(e):Tn(e),wn(e);var i=er(e);e.teardown=typeof i==`function`?i:null,e.wv=qn}finally{Fn=r,W=n}}}async function ar(){await Promise.resolve(),F()}function G(e){var t=(e.f&2)!=0;if(Pn?.add(e),U!==null&&!Rn&&!(W!==null&&W.f&16384)&&(Vn===null||!Vn.has(e))){var n=U.deps;if(U.f&2097152)e.rv<Jn&&(e.rv=Jn,Un===null&&n!==null&&n[Wn]===e?Wn++:Un===null?Un=[e]:Un.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(In&&Rt.has(e))return Rt.get(e);if(t){var i=e;if(In){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||sr(i))&&(a=mt(i)),Rt.set(i,a),a}var o=(i.f&512)==0&&!Rn&&U!==null&&(Fn||(U.f&512)!=0),c=(i.f&T)===0;Qn(i)&&(o&&(i.f|=512),ht(i)),o&&!c&&(_t(i),or(i))}if(bt?.has(e))return bt.get(e);if(e.f&8388608)throw e.v;return e.v}function or(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(_t(t),or(t))}function sr(e){if(e.v===t)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Rt.has(t)||t.f&2&&sr(t))return!0;return!1}function cr(e){var t=Rn;try{return Rn=!0,e()}finally{Rn=t}}var lr=Symbol(`events`),ur=new Set,dr=new Set;function fr(e,t,n,r={}){function i(e){if(r.capture||vr.call(t,e),!e.cancelBubble)return it(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?Xe(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function pr(e,t,n,r,i){var a={capture:r,passive:i},o=fr(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&pn(()=>{t.removeEventListener(e,o,a)})}function mr(e,t,n){(t[lr]??={})[e]=n}function hr(e){for(var t=0;t<e.length;t++)ur.add(e[t]);for(var n of dr)n(e)}var gr=null,_r=!1;function vr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;gr=e,_r||(_r=!0,setTimeout(()=>{_r=!1,gr=null}));var o=0,s=gr===e&&e[lr];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[lr]=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;zn(null),Bn(null);try{for(var p,m=[];a!==null&&a!==t;){try{var h=a[lr]?.[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[lr]=t,delete e.currentTarget,zn(d),Bn(f)}}}var yr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function br(e){return yr?.createHTML(e)??e}function xr(e){var t=an(`template`);return t.innerHTML=br(e.replaceAll(`<!>`,`<!---->`)),t.content}function Sr(e,t){var n=W;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function K(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(D)return Sr(O,null),O;i===void 0&&(i=xr(a?e:`<!>`+e),n||(i=R(i)));var t=r||Jt?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=R(t),s=t.lastChild;Sr(o,s)}else Sr(t,t);return t}}function Cr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(D)return Sr(O,null),O;if(!o){var e=R(xr(a));if(i)for(o=document.createDocumentFragment();R(e);)o.appendChild(R(e));else o=R(e)}var t=o.cloneNode(!0);if(i){var n=R(t),r=t.lastChild;Sr(n,r)}else Sr(t,t);return t}}function wr(e,t){return Cr(e,t,`svg`)}function Tr(){if(D)return Sr(O,null),O;var e=document.createDocumentFragment(),t=document.createComment(``),n=Qt();return e.append(t,n),Sr(t,n),e}function q(e,t){if(D){var n=W;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=O),Ce();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 Er=[`touchstart`,`touchmove`];function Dr(e){return Er.includes(e)}function Or(e){let t=0,n=Bt(0),r;return()=>{fn()&&(G(n),xn(()=>(t===0&&(r=cr(()=>e(()=>Wt(n)))),t+=1,()=>{Xe(()=>{--t,t===0&&(r?.(),r=void 0,Wt(n))})})))}}var kr=ne|re;function Ar(e,t,n,r){new jr(e,t,n,r)}var jr=class{parent;is_pending=!1;transform_error;#e;#t=D?O:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=Or(()=>(this.#m=Bt(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=Sn(()=>{if(D){let e=this.#t;Ce();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()},kr),D&&(this.#e=O)}#g(){try{this.#a=Cn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);Xe(r),t&&(this.#s=Cn(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{if(t){xe();return}t=!0,n&&He(),this.#s!==null&&kn(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){cn(e,this.#i&&this.#i.parent)}}}}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=Cn(()=>e(this.#e)),Xe(()=>{var e=this.#c=document.createDocumentFragment(),t=Qt(),n=!1;if(e.append(t),this.#a=this.#S(()=>{try{return Cn(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){cn(e,this.#i.parent)}return null}}),this.#a===null){this.#c=null,n&&this.#x(P);return}this.#u===0&&(this.#e.before(e),this.#c=null,kn(this.#o,()=>{this.#o=null}),this.#x(P))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=Cn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Nn(this.#a,e);let t=this.#n.pending;this.#o=Cn(()=>t(this.#e))}else this.#x(P)}catch(e){this.error(e)}}#x(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){tt(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#S(e){var t=W,n=U,r=j;Bn(this.#i),zn(this.#i),Ue(this.#i.ctx);try{return Ot.ensure(),e()}finally{Bn(t),zn(n),Ue(r)}}#C(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#C(e,t);return}this.#u+=e,this.#u===0&&(this.#x(t),this.#o&&kn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#C(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,Xe(()=>{this.#d=!1,this.#m&&Ht(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),G(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;P?.is_fork?(this.#a&&P.skip_effect(this.#a),this.#o&&P.skip_effect(this.#o),this.#s&&P.skip_effect(this.#s),P.oncommit(()=>{this.#w(e)})):this.#w(e)}#w(e){this.#a&&=(H(this.#a),null),this.#o&&=(H(this.#o),null),this.#s&&=(H(this.#s),null),D&&(k(this.#t),we(),k(Te()));let t=this.#n.failed,n=e=>{let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&(this.#s=this.#S(()=>{try{return Cn(()=>{var r=W;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return cn(e,this.#i.parent),null}}))};Xe(()=>{var t;try{t=this.transform_error(e)}catch(e){cn(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>cn(e,this.#i&&this.#i.parent)):n(t)})}};function Mr(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[ge]??=e.nodeValue)&&(e[ge]=n,e.nodeValue=`${n}`)}function Nr(e,t){return Ir(e,t)}function Pr(t,n){Zt(),n.intro=n.intro??!1;let r=n.target,i=D,a=O;try{for(var o=R(r);o&&(o.nodeType!==8||o.data!==`[`);)o=$t(o);if(!o)throw e;Se(!0),k(o);let i=Ir(t,{...n,anchor:o});return Se(!1),i}catch(i){if(i instanceof Error&&i.message.split(`
2
+ `).some(e=>e.startsWith(`https://svelte.dev/e/`)))throw i;return i!==e&&console.warn(`Failed to hydrate: `,i),n.recover===!1&&Le(),Zt(),nn(r),Se(!1),Nr(t,n)}finally{Se(i),k(a)}}var Fr=new Map;function Ir(t,{target:n,anchor:r,props:i={},events:a,context:o,intro:s=!0,transformError:l}){Zt();var u=void 0,d=vn(()=>{var s=r??n.appendChild(Qt());Ar(s,{pending:()=>{}},n=>{We({});var r=j;if(o&&(r.c=o),a&&(i.$$events=a),D&&Sr(n,null),u=t(n,i)||Ke(),D&&(W.nodes.end=O,O===null||O.nodeType!==8||O.data!==`]`))throw be(),e;Ge()},l);var d=new Set,f=e=>{for(var t=0;t<e.length;t++){var r=e[t];if(!d.has(r)){d.add(r);var i=Dr(r);for(let e of[n,document]){var a=Fr.get(e);a===void 0&&(a=new Map,Fr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,vr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return f(c(ur)),dr.add(f),()=>{for(var e of d)for(let r of[n,document]){var t=Fr.get(r),i=t.get(e);--i==0?(r.removeEventListener(e,vr),t.delete(e),t.size===0&&Fr.delete(r)):t.set(e,i)}dr.delete(f),s!==r&&s.parentNode?.removeChild(s)}});return Lr.set(u,d),u}var Lr=new WeakMap;function Rr(e,t){let n=Lr.get(e);return n?(Lr.delete(e),n(t)):Promise.resolve()}var zr=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)jn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(jn(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&&(H(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();Nn(r,t),t.append(Qt()),this.#n.set(e,{effect:r,fragment:t})}else H(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),kn(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)||(H(n.effect),this.#n.delete(e))};ensure(e,t){var n=P,r=rn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=Qt();i.append(a),this.#n.set(e,{effect:Cn(()=>t(a)),fragment:i})}else this.#t.set(e,Cn(()=>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 D&&(this.anchor=O),this.#a(n)}};function Br(e,t,...n){var r=new zr(e);Sn(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},ne)}function Vr(e){j===null&&Ae(`onMount`),mn(()=>{let t=cr(e);if(typeof t==`function`)return t})}function Hr(e){j===null&&Ae(`onDestroy`),Vr(()=>()=>cr(e))}function J(e,t,n=!1){var r;D&&(r=O,Ce());var i=new zr(e),a=n?ne:0;function o(e,t){if(D){var n=Ee(r);if(e!==parseInt(n.substring(1))){var a=Te();k(a),i.anchor=a,Se(!1),i.ensure(e,t),Se(!0);return}}i.ensure(e,t)}Sn(()=>{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];kn(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;nn(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|=ae,Nn(a,document.createDocumentFragment())):H(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=D?k(R(u)):u.appendChild(Qt())}D&&Ce();var d=null,f=ft(()=>{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^=ae,Zr(d,null,s)):jn(d):kn(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:Sn(()=>{p=G(f);var e=p.length;let a=!1;D&&Ee(s)===`[!`!=(e===0)&&(s=Te(),k(s),Se(!1),a=!0);for(var c=new Set,u=P,v=rn(),y=0;y<e;y+=1){D&&O.nodeType===8&&O.data===`]`&&(s=O,a=!0,Se(!1));var ee=p[y],b=r(ee,y),x=h?null:l.get(b);x?(x.v&&Ht(x.v,ee),x.i&&Ht(x.i,y),v&&u.unskip_effect(x.e)):(x=Xr(l,h?s:Kr??=Qt(),ee,b,y,i,t,n),h||(x.e.f|=ae),l.set(b,x)),c.add(b)}if(e===0&&o&&!d&&(h?d=Cn(()=>o(s)):(d=Cn(()=>o(Kr??=Qt())),d.f|=ae)),e>c.size&&Me(``,``,``),D&&e>0&&k(Te()),!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&&Se(!0),G(f)}),flags:t,items:l,pending:m,outrogroups:null,fallback:d};h=!1,D&&(s=O)}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&&(jn(_),a&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432)if(_.f^=ae,_===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 ee=m[0],b;d=ee.prev;var x=p[0],S=p[p.length-1];for(b=0;b<p.length;b+=1)Zr(p[b],ee,n);for(b=0;b<m.length;b+=1)u.delete(m[b]);Qr(e,x.prev,S.next),Qr(e,d,x),Qr(e,S,ee),l=ee,d=S,--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 C=[];if(u!==void 0)for(_ of u)_.f&8192||C.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&C.push(l),l=Jr(l.next);var w=C.length;if(w>0){var T=r&4&&o===0?n:null;if(a){for(v=0;v<w;v+=1)C[v].nodes?.a?.measure();for(v=0;v<w;v+=1)C[v].nodes?.a?.fix()}Wr(e,C,T)}}a&&Xe(()=>{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?Bt(n):Vt(n,!1,!1):null,l=o&2?Bt(i):null;return{v:c,i:l,e:Cn(()=>(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=$t(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;D&&(l=k(R(d)))}V(()=>{var t=W;if(u===(u=n()??``)){D&&Ce();return}if(a&&!D){t.nodes=null,d.innerHTML=u,u!==``&&Sr(R(d),d.lastChild);return}if(t.nodes!==null&&(Dn(t.nodes.start,t.nodes.end),t.nodes=null),u!==``){if(D){for(var c=O.data,f=Ce(),p=f;f!==null&&(f.nodeType!==8||f.data!==``);)p=f,f=$t(f);if(f===null)throw be(),e;Sr(O,p),l=k(f);return}var m=an(o?`svg`:s?`math`:`template`,o?r:s?i:void 0);m.innerHTML=u;var h=o||s?m:m.content;if(Sr(R(h),h.lastChild),o||s)for(;R(h);)l.before(R(h));else l.before(h)}})}function ei(e,t){yn(()=>{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=an(`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[me];if(D||o!==n||o===void 0){var s=ni(n,r,a);(!D||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[me]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function 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[he];if(D||i!==t){var a=ai(t,r);(!D||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[he]=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=ve?`link`:`LINK`;function Y(e,t,n,r){var i=fi(e);D&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===di)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[fe]=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[pe]??={[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]));yn(()=>(cr(()=>n(e[t])),r))}function _i(e,t){return e===t||e?.[le]===t}function vi(e=Ke(),t,n,r){var i=j.r,a=W;return yn(()=>{var o,s;return xn(()=>{o=s,s=r?.()||[],cr(()=>{_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}function X(e,t,n,r){var i=!0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=void 0,u=()=>o&&i?(l??=lt(r),G(l)):(c&&(c=!1,s=o?cr(r):r),s);let f;if(a){var p=le in e||de in e;f=d(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;a?[m,h]=rt(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=u(),f&&(i&&Re(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?u():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?lt:ft)(()=>(v=!1,g()));a&&G(y);var ee=W;return(function(e,t){if(arguments.length>0){let n=t?G(y):i&&a?Kt(e):e;return L(y,n),v=!0,s!==void 0&&(s=n),e}return In&&v||ee.f&16384?y.v:G(y)})}function yi(e){return new bi(e)}var bi=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=Vt(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===de?!0:(G(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return L(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?Pr:Nr)(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)&&F(),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=()=>{Rr(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()}},xi;typeof HTMLElement==`function`&&(xi=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){let n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){let e=this.$$l_u.get(t);e&&(e(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){if(await Promise.resolve(),!this.$$cn||this.$$c)return;function e(e){return t=>{let n=an(`slot`);e!=="default"&&(n.name=e),q(t,n)}}let t={},n=Ci(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]=Si(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=yi({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=_n(()=>{xn(()=>{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=Si(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]=Si(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 Si(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 Ci(e){let t={};return e.childNodes.forEach(e=>{t[e.slot||`default`]=!0}),t}function wi(e,t,n,r,i,a){let o=class extends xi{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=Si(e,n,t),this.$$d[e]=n;var r=this.$$c;r&&(d(r,e)?.get?r[e]=n:r.$set({[e]:n}))}})}),r.forEach(e=>{u(o.prototype,e,{get(){return this.$$c?.[e]}})}),a&&(o=a(o)),e.element=o,o}var Ti=Symbol.for(`@pie-element/shared-math-rendering-mathjax/loading`);function Ei(e){if(typeof window>`u`||window.MathJax?.typesetPromise)return Promise.resolve();let t=globalThis,n=t[Ti];if(n)return n;let r=new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s={loader:{load:i?[`a11y/assistive-mml`]:[]},tex:{packages:[`base`,`ams`,`autoload`],macros:{parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`}},options:{enableMenu:i,enableExplorer:i,enableAssistiveMml:i},startup:{ready:()=>{window.MathJax?.startup.defaultReady&&(window.MathJax.startup.defaultReady(),t())},defaultReady:()=>{}}};r&&s.tex&&(s.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],s.tex.processEscapes=!0),a||(s.chtml={fontURL:``}),window.MathJax=s;let c=document.createElement(`script`);c.src=o||`https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js`,c.async=!0,c.onload=()=>{setTimeout(t,100)},c.onerror=()=>{n(Error(`Failed to load MathJax`))},document.head.appendChild(c)});return t[Ti]=r,r}function Di(){let e=window.MathJax?.startup?.document;if(typeof e?.assistiveMml==`function`)try{e.assistiveMml().updateDocument?.()}catch(e){console.warn(`[mathjax-renderer] Failed to attach assistive MathML:`,e)}}function Oi(e={}){return async t=>{if(await Ei(e),!window.MathJax?.typesetPromise){console.warn(`[mathjax-renderer] MathJax not loaded or missing typesetPromise.`);return}await window.MathJax.typesetPromise([t]),Di()}}var ki=`@pie-lib/math-rendering`,Ai=null;function ji(){return Ai||=Oi({accessibility:!0,useSingleDollar:!0}),Ai}function Mi(){if(typeof window>`u`)return null;let e=window[ki];return typeof e?.renderMath==`function`?e:null}var Ni=async e=>{if(typeof window>`u`)return;let t=typeof e==`string`,n;t?(n=document.createElement(`div`),n.innerHTML=e):n=e||document.body;let r=Mi();return r?await r.renderMath?.(n):await ji()(n),t?n.innerHTML:void 0},Pi={translation:{categorize:{limitMaxChoicesPerCategory:`You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.`,maxChoicesPerCategoryRestriction:`To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].`},ebsr:{part:`Part {{index}}`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`},imageClozeAssociation:{reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`},drawingResponse:{fillColor:`Fill color`,outlineColor:`Outline color`,noFill:`No fill`,lightblue:`Light blue`,lightyellow:`Light yellow`,red:`Red`,orange:`Orange`,yellow:`Yellow`,violet:`Violet`,blue:`Blue`,green:`Green`,white:`White`,black:`Black`,onDoubleClick:`Double click to edit this text. Press Enter to submit.`},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`}},graphing:{point:`Point`,circle:`Circle`,line:`Line`,parabola:`Parabola`,absolute:`Absolute Value`,exponential:`Exponential`,polygon:`Polygon`,ray:`Ray`,segment:`Segment`,sine:`Sine`,vector:`Vector`,label:`Label`,redo:`Redo`,reset:`Reset`},mathInline:{primaryCorrectWithAlternates:`Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.`},mcPopulatedBlank:{answerChoices:`Answer choices`,blankLabel:`blank`,emptyBlank:`(blank)`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,correctAnswerSelected:`Correct answer selected`,incorrectAnswerSelected:`Incorrect answer selected`,selectedAnswerImage:`Selected answer image`,choiceImage:`Choice {{id}}`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,listen:`Listen`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,printAudio:`Audio:`,printTranscript:`Transcript:`},multipleChoice:{minSelections:`Select at least {{minSelections}}.`,maxSelections_one:`Only {{maxSelections}} answer is allowed.`,maxSelections_other:`Only {{maxSelections}} answers are allowed.`,minmaxSelections_equal:`Select {{minSelections}}.`,minmaxSelections_range:`Select between {{minSelections}} and {{maxSelections}}.`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`},simpleCloze:{correctAnswerShown:`Correct answer`,correct:`Correct`,incorrect:`Incorrect`,unanswered:`No answer`,placeholder:`Enter your answer...`,answerInput:`Your answer`,printCorrectAnswer:`Correct answer:`,printAnswerBlank:`Answer blank`},vennClassification:{tray:`Tiles to classify`,unknownTarget:`unknown`,cancelled:`Cancelled`,returnedToTray:`{{name}} returned to tray`,placedIn:`{{name}} placed in {{target}}`,pickedUp:`Picked up {{name}}`,pickedUpWithKeyboard:`Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.`,dropTarget:`Drop target: {{target}}`,unsupportedCircles_one:`This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.`,unsupportedCircles_other:`This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.`,setNumber:`Set {{number}}`,regionOnly:`{{set}} only`,regionNeither:`Neither {{first}} nor {{second}}`,regionNoneOf:`None of {{sets}}`,regionAndSeparator:` and `,tileFallbackName:`Tile`,tileNotPlaced:`not placed`,tileInRegion:`in {{region}}`,tileCorrect:`correct`,tileIncorrect:`incorrect`}},common:{undo:`Undo`,clearAll:`Clear all`,correct:`Correct`,incorrect:`Incorrect`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,showTeacherInstructions:`Show Teacher Instructions`,hideTeacherInstructions:`Hide Teacher Instructions`,commonCorrectAnswerWithAlternates:`Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.`,warning:`Warning`,showNote:`Show Note`,hideNote:`Hide Note`,cancel:`Cancel`}},Fi={translation:{categorize:{limitMaxChoicesPerCategory:`Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,maxChoicesPerCategoryRestriction:`Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta`},ebsr:{part:`Parte {{index}}`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`},imageClozeAssociation:{reachedLimit_one:`Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,reachedLimit_other:`Lleno`},drawingResponse:{fillColor:`Color de relleno`,outlineColor:`Color del contorno`,noFill:`Sin relleno`,lightblue:`Azul claro`,lightyellow:`Amarillo claro`,red:`Rojo`,orange:`Naranja`,yellow:`Amarillo`,violet:`Violeta`,blue:`Azul`,green:`Verde`,white:`Blanco`,black:`Negro`,onDoubleClick:`Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar`},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,reachedLimit_other:`No puede haber más de {{count}} categorías.`,keyLegend:{incorrectAnswer:`Respuesta incorrecta del estudiante`,correctAnswer:`Respuesta correcta del estudiante`,correctKeyAnswer:`Clave de respuesta correcta`}},graphing:{point:`Punto`,circle:`Circulo`,line:`Línea`,parabola:`Parábola`,absolute:`Valor absoluto`,exponential:`Exponencial`,polygon:`Polígono`,ray:`Semirrecta`,segment:`Segmento `,sine:`Seno`,vector:`Vector`,label:`Etiqueta`,redo:`Rehacer`,reset:`Reiniciar`},mathInline:{primaryCorrectWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.`},mcPopulatedBlank:{answerChoices:`Opciones de respuesta`,blankLabel:`espacio en blanco`,emptyBlank:`(en blanco)`,blankPreSelectionHint:`La respuesta que elijas aparecerá en la línea en blanco de arriba.`,correctAnswerSelected:`Respuesta correcta seleccionada`,incorrectAnswerSelected:`Respuesta incorrecta seleccionada`,selectedAnswerImage:`Imagen de la respuesta seleccionada`,choiceImage:`Opción {{id}}`,clickToEnableAutoplay:`Haz clic para activar la reproducción automática del audio`,audioResourceUnavailable:`El audio está activado, pero no hay una URL de audio reproducible configurada.`,listen:`Escuchar`,listenSilentAlt:`Escuchar. Repetir las instrucciones.`,listenPlayingAlt:`Escuchar. Estas son las instrucciones.`,printAudio:`Audio:`,printTranscript:`Transcripción:`},multipleChoice:{minSelections:`Seleccione al menos {{minSelections}}.`,maxSelections_one:`Sólo se permite {{maxSelections}} respuesta.`,maxSelections_other:`Sólo se permiten {{maxSelections}} respuestas.`,minmaxSelections_equal:`Seleccione {{minSelections}}.`,minmaxSelections_range:`Seleccione entre {{minSelections}} y {{maxSelections}}.`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`},simpleCloze:{correctAnswerShown:`Respuesta correcta`,correct:`Correcto`,incorrect:`Incorrecto`,unanswered:`Sin respuesta`,placeholder:`Escribe tu respuesta...`,answerInput:`Tu respuesta`,printCorrectAnswer:`Respuesta correcta:`,printAnswerBlank:`Espacio para la respuesta`},vennClassification:{tray:`Fichas para clasificar`,unknownTarget:`desconocido`,cancelled:`Cancelado`,returnedToTray:`Se devolvió {{name}} a la bandeja`,placedIn:`Se colocó {{name}} en {{target}}`,pickedUp:`Se tomó {{name}}`,pickedUpWithKeyboard:`Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.`,dropTarget:`Destino: {{target}}`,unsupportedCircles_one:`No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.`,unsupportedCircles_other:`No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.`,setNumber:`Conjunto {{number}}`,regionOnly:`Solo {{set}}`,regionNeither:`Ni {{first}} ni {{second}}`,regionNoneOf:`Ninguno de {{sets}}`,regionAndSeparator:` y `,tileFallbackName:`Ficha`,tileNotPlaced:`sin colocar`,tileInRegion:`en {{region}}`,tileCorrect:`correcta`,tileIncorrect:`incorrecta`}},common:{undo:`Deshacer`,clearAll:`Borrar todo`,correct:`Correcto`,incorrect:`Incorrecto`,showCorrectAnswer:`Mostrar respuesta correcta`,hideCorrectAnswer:`Ocultar respuesta correcta`,showTeacherInstructions:`Mostrar instrucciones para el maestro`,hideTeacherInstructions:`Ocultar instrucciones para el maestro`,commonCorrectAnswerWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.`,warning:`Advertencia`,showNote:`Mostrar Nota`,hideNote:`Ocultar Nota`,cancel:`Cancelar`}},Z=e=>typeof e==`string`,Ii=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Li=e=>e==null?``:``+e,Ri=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},zi=/###/g,Bi=e=>e&&e.indexOf(`###`)>-1?e.replace(zi,`.`):e,Vi=e=>!e||Z(e),Hi=(e,t,n)=>{let r=Z(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(Vi(e))return{};let t=Bi(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Vi(e)?{}:{obj:e,k:Bi(r[i])}},Ui=(e,t,n)=>{let{obj:r,k:i}=Hi(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=Hi(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Hi(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Wi=(e,t,n,r)=>{let{obj:i,k:a}=Hi(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Gi=(e,t)=>{let{obj:n,k:r}=Hi(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Ki=(e,t,n)=>{let r=Gi(e,n);return r===void 0?Gi(t,n):r},qi=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?Z(e[r])||e[r]instanceof String||Z(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):qi(e[r],t[r],n):e[r]=t[r]);return e},Ji=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Yi={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},Xi=e=>Z(e)?e.replace(/[&<>"'\/]/g,e=>Yi[e]):e,Zi=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}},Qi=[` `,`,`,`?`,`!`,`;`],$i=new Zi(20),ea=(e,t,n)=>{t||=``,n||=``;let r=Qi.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=$i.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},ta=(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},na=e=>e?.replace(/_/g,`-`),ra={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)}},ia=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||ra,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(Z(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},aa=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])})}},oa=class extends aa{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):Z(n)&&i?o.push(...n.split(i)):o.push(n)));let s=Gi(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!Z(n)?s:ta(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),Ui(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(Z(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=Gi(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?qi(s,n,i):s={...s,...n},Ui(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}},sa={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}},ca=Symbol(`i18next/PATH_KEY`);function la(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===ca?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function ua(e,t){let{[ca]:n}=e(la()),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 da={},fa=e=>!Z(e)&&typeof e!=`boolean`&&typeof e!=`number`,pa=class e extends aa{constructor(e,t={}){super(),Ri([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=ia.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=fa(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&&!ea(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:Z(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:Z(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=ua(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?ua(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,ee=i.count!==void 0&&!Z(i.count),b=e.hasDefaultValue(i),x=ee?this.pluralResolver.getSuffix(d,i.count,i):``,S=i.ordinal&&ee?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,C=ee&&!i.ordinal&&i.count===0,w=C&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${x}`]||i[`defaultValue${S}`]||i.defaultValue,T=m;y&&!m&&b&&(T=w);let te=fa(T),ne=Object.prototype.toString.apply(T);if(y&&T&&te&&_.indexOf(ne)<0&&!(Z(v)&&Array.isArray(T))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,T,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(T),t=e?[]:{},n=e?g:h;for(let e in T)if(Object.prototype.hasOwnProperty.call(T,e)){let r=`${n}${o}${e}`;b&&!m?t[e]=this.translate(r,{...i,defaultValue:fa(w)?w[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=T[e])}m=t}}else if(y&&Z(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&b&&(e=!0,m=w),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=b&&w!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?w:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=b&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&ee?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);C&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||w)})}):n(e,s,w))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=Z(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!Z(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=Z(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=sa.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return Z(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?ua(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!Z(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(Z(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!da[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(da[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!Z(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},ma=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ia.create(`languageUtils`)}getScriptPartFromCode(e){if(e=na(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=na(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Z(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),Z(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return Z(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):Z(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},ha={zero:0,one:1,two:2,few:3,many:4,other:5},ga={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},_a=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ia.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=na(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!`),ga;if(!e.match(/-|_/))return ga;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)=>ha[e]-ha[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))}},va=(e,t,n,r=`.`,i=!0)=>{let a=Ki(e,t,n);return!a&&i&&Z(n)&&(a=ta(e,n,r),a===void 0&&(a=ta(t,n,r))),a},ya=e=>e.replace(/\$/g,`$$$$`),ba=class{constructor(e={}){this.logger=ia.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?Xi:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?Ji(i):a||`{{`,this.suffix=o?Ji(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?Ji(d):f||Ji(`$t(`),this.nestingSuffix=p?Ji(p):m||Ji(`)`),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=va(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(va(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=>ya(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?ya(this.escape(e)):ya(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=Z(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!Z(a)&&!this.useRawValueToEscape&&(a=Li(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(`${Ji(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!Z(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!Z(i))return i;Z(i)||(i=Li(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}},xa=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}},Sa=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(na(r),i),t[o]=s),s(n)}},Ca=e=>(t,n,r)=>e(na(n),r)(t),wa=class{constructor(e={}){this.logger=ia.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Sa:Ca;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()]=Sa(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}=xa(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)}},Ta=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Ea=class extends aa{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=ia.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{Wi(n.loaded,[i],a),Ta(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();Z(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Z(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},Da=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,simplifyPluralSuffix:!0,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),Z(e[1])&&(t.defaultValue=e[1]),Z(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Oa=e=>(Z(e.ns)&&(e.ns=[e.ns]),Z(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Z(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),ka=()=>{},Aa=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},ja=`__i18next_supportNoticeShown`,Ma=()=>!!(typeof globalThis<`u`&&globalThis[ja]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env&&process.env.NODE_ENV===`production`),Na=()=>{typeof globalThis<`u`&&(globalThis[ja]=!0)},Pa=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),Q=class e extends aa{constructor(e={},t){if(super(),this.options=Oa(e),this.services={},this.logger=ia,this.modules={external:[]},Aa(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(Z(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=Da();this.options={...n,...this.options,...Oa(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Pa(this)&&!Ma()&&(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 💙`),Na());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?ia.init(r(this.modules.logger),this.options):ia.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:wa;let t=new ma(this.options);this.store=new oa(this.options.resources,this.options);let i=this.services;i.logger=ia,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new _a(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 ba(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Ea(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 pa(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||=ka,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=Ii(),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=ka){let n=t,r=Z(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=Ii();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||=ka,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`&&sa.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=Ii();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=Z(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(Z(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=ua(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=ua(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=ua(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return Z(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=Ii();return this.options.ns?(Z(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=Ii();Z(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new ma(Da());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=ka){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 oa(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={...Da().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new ba(n)}return a.translator=new pa(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();Q.createInstance,Q.dir,Q.init,Q.loadResources,Q.reloadResources,Q.use,Q.changeLanguage,Q.getFixedT,Q.t,Q.exists,Q.setDefaultNamespace,Q.hasLoadedNamespace,Q.loadNamespaces,Q.loadLanguages,Q.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:Pi,es:Fi}});var{translator:Fa}={translator:{...Q,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 Q.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]};function $(e,t,n={}){return Fa.t(`translation:vennClassification:${e}`,{lng:t,...n,interpolation:{escapeValue:!1}})}function Ia(e,t){return Fa.t(`common:${e}`,{lng:t})}function La(e){return(e||``).replace(/<[^>]+>/g,` `).replace(/\s+/g,` `).trim()}function Ra(e,t){let n=(e.imageAlt??``).trim();return(e.imageUrl??``).trim()&&n?n:La(e.label??``)||$(`tileFallbackName`,t)}function za(e,t,n,r){let i=[Ra(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 Ba=K(`<img alt="" class="tile-img svelte-1hgaksk" aria-hidden="true" draggable="false"/>`),Va=K(`<span></span>`),Ha=K(`<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>`),Ua=K(`<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>`),Wa=K(`<button type="button"><span><!> <!></span> <!></button>`),Ga={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 #334155;border-radius:10px;background:#ffffff;color:#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,
4
+ .venn-tile.focused.svelte-1hgaksk {outline:2px solid var(--vc-focus-ring, #1565c0);outline-offset:2px;}.venn-tile.svelte-1hgaksk:hover:not(:disabled) {background:#f8fafc;}.venn-tile.held.svelte-1hgaksk {cursor:grabbing;box-shadow:0 6px 18px rgba(15, 23, 42, 0.18);transform:translateY(-1px);background:#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:#ffffff;opacity:0.96;}.venn-tile.correct.svelte-1hgaksk {border-color:#0ea449;}.venn-tile.incorrect.svelte-1hgaksk {border-color:#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:#ffffff;}.venn-badge-correct.svelte-1hgaksk {background:#0ea449;}.venn-badge-incorrect.svelte-1hgaksk {background:#bf0d00;}
5
5
  @media (prefers-reduced-motion: reduce) {.venn-tile.svelte-1hgaksk {transition:none;}
6
- }`};function zi(e,t){Ke(t,!0),Yr(e,Ri);let n=$(t,`id`,7),r=$(t,`label`,7),i=$(t,`imageUrl`,7),a=$(t,`imageAlt`,7),o=$(t,`correctness`,7,`neutral`),s=$(t,`held`,7,!1),c=$(t,`invisible`,7,!1),l=$(t,`ghost`,7,!1),u=$(t,`disabled`,7,!1),d=$(t,`focused`,7,!1),f=$(t,`onpointerdown`,7),p=$(t,`onkeydown`,7),m=$(t,`onfocus`,7),h=$(t,`onclick`,7),g=F(()=>Mi({label:r(),imageUrl:i(),imageAlt:a()})),_=F(()=>!!(i()??``).trim()),v=F(()=>!!(r()??``).replace(/<[^>]*>/g,``).trim());var y={get id(){return n()},set id(e){n(e),P()},get label(){return r()},set label(e){r(e),P()},get imageUrl(){return i()},set imageUrl(e){i(e),P()},get imageAlt(){return a()},set imageAlt(e){a(e),P()},get correctness(){return o()},set correctness(e=`neutral`){o(e),P()},get held(){return s()},set held(e=!1){s(e),P()},get invisible(){return c()},set invisible(e=!1){c(e),P()},get ghost(){return l()},set ghost(e=!1){l(e),P()},get disabled(){return u()},set disabled(e=!1){u(e),P()},get focused(){return d()},set focused(e=!1){d(e),P()},get onpointerdown(){return f()},set onpointerdown(e){f(e),P()},get onkeydown(){return p()},set onkeydown(e){p(e),P()},get onfocus(){return m()},set onfocus(e){m(e),P()},get onclick(){return h()},set onclick(e){h(e),P()}},b=Li();let x;var S=B(b);let C;var w=B(S),ee=e=>{var t=Ni();H(()=>Q(t,`src`,i())),X(e,t)};Z(w,e=>{J(_)&&e(ee)});var te=V(w,2),ne=e=>{var t=Pi();let n;Jr(t,r,!0),k(t),H(()=>n=ti(t,1,`tile-label svelte-1hgaksk`,null,n,{"tile-label-below":J(_)})),X(e,t)};Z(te,e=>{J(v)&&e(ne)}),k(S);var re=V(S,2),ie=e=>{X(e,Fi())},ae=e=>{X(e,Ii())};return Z(re,e=>{o()===`correct`?e(ie):o()===`incorrect`&&e(ae,1)}),k(b),H(()=>{x=ti(b,1,`venn-tile svelte-1hgaksk`,null,x,{held:s(),focused:d(),invisible:c(),ghost:l(),correct:o()===`correct`,incorrect:o()===`incorrect`}),Q(b,`data-tile-id`,n()),Q(b,`aria-label`,J(g)),Q(b,`aria-pressed`,s()),Q(b,`aria-hidden`,l()),b.disabled=u(),Q(b,`tabindex`,l()||u()?-1:0),C=ti(S,1,`tile-body svelte-1hgaksk`,null,C,{"tile-body-image":J(_)})}),mr(`pointerdown`,b,function(...e){f()?.apply(this,e)}),mr(`keydown`,b,function(...e){p()?.apply(this,e)}),pr(`focus`,b,function(...e){m()?.apply(this,e)}),mr(`click`,b,function(...e){h()?.apply(this,e)}),X(e,b),qe(y)}hr([`pointerdown`,`keydown`,`click`]),_i(zi,{id:{},label:{},imageUrl:{},imageAlt:{},correctness:{},held:{},invisible:{},ghost:{},disabled:{},focused:{},onpointerdown:{},onkeydown:{},onfocus:{},onclick:{}},[],[],{mode:`open`});var Bi=Y(`<div role="region" data-region-key="tray"><div class="tray-label svelte-1ogsh8s"> </div> <div class="tray-items svelte-1ogsh8s"><!></div></div>`),Vi={hash:`svelte-1ogsh8s`,code:`.venn-tray.svelte-1ogsh8s {border:1.5px dashed #94a3b8;border-radius:12px;padding:14px 16px;background:#f8fafc;min-height:120px;transition:background 120ms ease, border-color 120ms ease;}.venn-tray.drop-target.svelte-1ogsh8s {background:#e0f2fe;border-color:#0ea5e9;}.venn-tray.focused.svelte-1ogsh8s {outline:2px solid #2563eb;outline-offset:2px;}.tray-label.svelte-1ogsh8s {font-size:12px;font-weight:600;color:#475569;text-transform:uppercase;letter-spacing:0.05em;margin-bottom:8px;}.tray-items.svelte-1ogsh8s {display:flex;flex-wrap:wrap;gap:10px;}
6
+ }`};function Ka(e,t){We(t,!0),ei(e,Ga);let n=X(t,`id`,7),r=X(t,`label`,7),i=X(t,`imageUrl`,7),a=X(t,`imageAlt`,7),o=X(t,`name`,7),s=X(t,`language`,7),c=X(t,`correctness`,7,`neutral`),l=X(t,`held`,7,!1),u=X(t,`invisible`,7,!1),d=X(t,`ghost`,7,!1),f=X(t,`disabled`,7,!1),p=X(t,`focused`,7,!1),m=X(t,`fit`,7,!1),h=X(t,`onpointerdown`,7),g=X(t,`onkeydown`,7),_=X(t,`onkeyup`,7),v=X(t,`onfocus`,7),y=X(t,`onclick`,7),ee=N(()=>o()??Ra({label:r(),imageUrl:i(),imageAlt:a()},s())),b=N(()=>!!(i()??``).trim()),x=N(()=>!!(r()??``).replace(/<[^>]*>/g,``).trim());var S={get id(){return n()},set id(e){n(e),F()},get label(){return r()},set label(e){r(e),F()},get imageUrl(){return i()},set imageUrl(e){i(e),F()},get imageAlt(){return a()},set imageAlt(e){a(e),F()},get name(){return o()},set name(e){o(e),F()},get language(){return s()},set language(e){s(e),F()},get correctness(){return c()},set correctness(e=`neutral`){c(e),F()},get held(){return l()},set held(e=!1){l(e),F()},get invisible(){return u()},set invisible(e=!1){u(e),F()},get ghost(){return d()},set ghost(e=!1){d(e),F()},get disabled(){return f()},set disabled(e=!1){f(e),F()},get focused(){return p()},set focused(e=!1){p(e),F()},get fit(){return m()},set fit(e=!1){m(e),F()},get onpointerdown(){return h()},set onpointerdown(e){h(e),F()},get onkeydown(){return g()},set onkeydown(e){g(e),F()},get onkeyup(){return _()},set onkeyup(e){_(e),F()},get onfocus(){return v()},set onfocus(e){v(e),F()},get onclick(){return y()},set onclick(e){y(e),F()}},C=Wa();let w;var T=z(C);let te;var ne=z(T),re=e=>{var t=Ba();V(()=>Y(t,`src`,i())),q(e,t)};J(ne,e=>{G(b)&&e(re)});var ie=B(ne,2),ae=e=>{var t=Va();let n;$r(t,r,!0),A(t),V(()=>n=oi(t,1,`tile-label svelte-1hgaksk`,null,n,{"tile-label-below":G(b)})),q(e,t)};J(ie,e=>{G(x)&&e(ae)}),A(T);var E=B(T,2),oe=e=>{q(e,Ha())},se=e=>{q(e,Ua())};return J(E,e=>{c()===`correct`?e(oe):c()===`incorrect`&&e(se,1)}),A(C),V(()=>{w=oi(C,1,`venn-tile svelte-1hgaksk`,null,w,{held:l(),focused:p(),invisible:u(),ghost:d(),fit:m(),correct:c()===`correct`,incorrect:c()===`incorrect`}),Y(C,`data-tile-id`,n()),Y(C,`aria-label`,G(ee)),Y(C,`aria-pressed`,l()),Y(C,`aria-hidden`,d()),C.disabled=f(),Y(C,`tabindex`,d()||f()?-1:0),te=oi(T,1,`tile-body svelte-1hgaksk`,null,te,{"tile-body-image":G(b)})}),mr(`pointerdown`,C,function(...e){h()?.apply(this,e)}),mr(`keydown`,C,function(...e){g()?.apply(this,e)}),mr(`keyup`,C,function(...e){_()?.apply(this,e)}),pr(`focus`,C,function(...e){v()?.apply(this,e)}),mr(`click`,C,function(...e){y()?.apply(this,e)}),q(e,C),Ge(S)}hr([`pointerdown`,`keydown`,`keyup`,`click`]),wi(Ka,{id:{},label:{},imageUrl:{},imageAlt:{},name:{},language:{},correctness:{},held:{},invisible:{},ghost:{},disabled:{},focused:{},fit:{},onpointerdown:{},onkeydown:{},onkeyup:{},onfocus:{},onclick:{}},[],[],{mode:`open`});var qa=K(`<div role="region" data-region-key="tray"><div class="tray-label svelte-1ogsh8s"> </div> <div class="tray-items svelte-1ogsh8s"><!></div></div>`),Ja={hash:`svelte-1ogsh8s`,code:`.venn-tray.svelte-1ogsh8s {border:1.5px dashed #94a3b8;border-radius:12px;padding:14px 16px;background:#f8fafc;min-height:120px;transition:background 120ms ease, border-color 120ms ease;}.venn-tray.drop-target.svelte-1ogsh8s {background:#e0f2fe;border-color:#0ea5e9;}.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:#475569;text-transform:uppercase;letter-spacing:0.05em;margin-bottom:8px;}.tray-items.svelte-1ogsh8s {display:flex;flex-wrap:wrap;gap:10px;}
7
7
  @media (prefers-reduced-motion: reduce) {.venn-tray.svelte-1ogsh8s {transition:none;}
8
- }`};function Hi(e,t){Ke(t,!0),Yr(e,Vi);let n=$(t,`isDropTarget`,7,!1),r=$(t,`focused`,7,!1),i=$(t,`label`,7,`Tiles to classify`),a=$(t,`onpointerenter`,7),o=$(t,`onpointerleave`,7),s=$(t,`children`,7);var c={get isDropTarget(){return n()},set isDropTarget(e=!1){n(e),P()},get focused(){return r()},set focused(e=!1){r(e),P()},get label(){return i()},set label(e=`Tiles to classify`){i(e),P()},get onpointerenter(){return a()},set onpointerenter(e){a(e),P()},get onpointerleave(){return o()},set onpointerleave(e){o(e),P()},get children(){return s()},set children(e){s(e),P()}},l=Bi();let u;var d=B(l),f=B(d,!0);k(d);var p=V(d,2),m=B(p),h=e=>{var t=wr();Fr(sn(t),s),X(e,t)};return Z(m,e=>{s()&&e(h)}),k(p),k(l),H(()=>{u=ti(l,1,`venn-tray svelte-1ogsh8s`,null,u,{"drop-target":n(),focused:r()}),Q(l,`aria-label`,i()),Dr(f,i())}),pr(`pointerenter`,l,function(...e){a()?.apply(this,e)}),pr(`pointerleave`,l,function(...e){o()?.apply(this,e)}),X(e,l),qe(c)}_i(Hi,{isDropTarget:{},focused:{},label:{},onpointerenter:{},onpointerleave:{},children:{}},[],[],{mode:`open`});function Ui(e){return!e||e.length===0?``:[...e].sort((e,t)=>e-t).join(`,`)}function Wi(e){return!e||e.length===0?[]:[...e].sort((e,t)=>e-t)}function Gi(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 Ki(e,t){let n=Wi(t),r=n.map(t=>e[t]?.label??`Set ${t+1}`),i=e.length;return n.length===0?i===2?`Neither ${e[0]?.label??`Set 1`} nor ${e[1]?.label??`Set 2`}`:`None of ${e.map((e,t)=>e?.label??`Set ${t+1}`).join(`, `)}`:n.length===1?`${r[0]} only`:r.join(` and `)}function qi(e,t){let n=Ui(t),r=e.regionLabels?.[n];return typeof r==`string`&&r.trim().length>0?r:Ki(e.circles??[],t)}function Ji(){return{width:900,height:540,outsideGap:20,outsideStripHeight:140,circles:[{cx:340,cy:210,r:170},{cx:560,cy:210,r:170}]}}function Yi(e,t){return(n,r,i)=>{let a=n%t,o=Math.floor(n/t),s=t*r+(t-1)*8;return{x:e.x-s/2+r/2+a*(r+8),y:e.y+o*(i+8)}}}function Xi(e,t=Ji()){if(!e.circles||e.circles.length!==2)throw Error(`buildLayout2Set requires exactly 2 circles (got ${e.circles?.length??0})`);let[n,r]=t.circles,i=Gi(2),a=Math.max(n.cy+n.r,r.cy+r.r),o=Math.min(t.height-t.outsideStripHeight,a+t.outsideGap),s=(e,t,n)=>(r,i)=>{let a=r-e,o=i-t;return a*a+o*o<=n*n},c=s(n.cx,n.cy,n.r),l=s(r.cx,r.cy,r.r),u=r.cx-r.r,d=n.cx+n.r,f=(u+d)/2,p={x:Math.max(0,n.cx-n.r-10),y:Math.max(0,n.cy-n.r),w:u-Math.max(0,n.cx-n.r-10),h:2*n.r},m={x:d,y:Math.max(0,r.cy-r.r),w:Math.min(t.width,r.cx+r.r+10)-d,h:2*r.r},h={x:u,y:Math.max(0,Math.min(n.cy,r.cy)-Math.min(n.r,r.r)),w:d-u,h:2*Math.min(n.r,r.r)},g={x:0,y:o,w:t.width,h:t.height-o},_={};return{geometry:t,regions:i.map(i=>{let a=Ui(i),s=qi(e,i),u,d,v,y;a===``?(u=(e,n)=>e>=0&&e<=t.width&&n>=0&&n<=t.height&&!c(e,n)&&!l(e,n),d=g,v={x:t.width/2,y:o+g.h/2},y=6):a===`0`?(u=(e,t)=>c(e,t)&&!l(e,t),d=p,v={x:n.cx-n.r/3,y:n.cy},y=1):a===`1`?(u=(e,t)=>l(e,t)&&!c(e,t),d=m,v={x:r.cx+r.r/3,y:r.cy},y=1):a===`0,1`?(u=(e,t)=>c(e,t)&&l(e,t),d=h,v={x:f,y:(n.cy+r.cy)/2},y=1):(u=()=>!1,d={x:0,y:0,w:0,h:0},v={x:0,y:0},y=1);let b={region:i,key:a,label:s,hitRect:d,pointInRegion:u,gridSlot:Yi(v,y)};return _[a]=b,b}),regionByKey:_,outsideStripTop:o}}function Zi(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 Qi(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 $i({model:e,session:t,tileId:n,placement:r}){let i=t||{},a=i.placements??{},o=r===null?null:Wi(r),s={...a,[n]:o},c={...i,placements:s};return c.completed=Qi(e,c),c}function ea(e,t){let n=t?.placements??{};return(e.tiles||[]).filter(e=>n[e.id]==null)}function ta(e,t){let n=t?.placements??{},r={};for(let t of e.tiles||[]){let e=n[t.id];if(e==null)continue;let i=Wi(e).join(`,`);r[i]||(r[i]=[]),r[i].push(t)}return r}new Set([`$$slots`,`$$events`,`$$legacy`,`$$host`]);var na=Y(`<div class="venn-prompt prose svelte-gkcqor"></div>`),ra=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="#bce2ff"></circle><path d="M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z" fill="#bce2ff"></path><polygon points="-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6" fill="#1a9cff"></polygon></svg>`),ia=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: #D0CAC5; stroke: #E6E3E0; stroke-width: 0.75; stroke-miterlimit: 10;" d="M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z"></path><path style="fill: #B3ABA4; stroke: #CDC7C2; stroke-width: 0.5; stroke-miterlimit: 10;" d="M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"></path><circle cx="-114.2" cy="143.5" r="14" fill="white"></circle><path d="M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z" fill="#bce2ff"></path><polygon points="-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2" fill="#1a9cff"></polygon></svg>`),aa=Y(`<button type="button" class="toggle-correct svelte-gkcqor"><!> <span class="toggle-label svelte-gkcqor"> </span></button>`),oa=Cr(`<circle fill="rgba(14, 165, 233, 0.12)"></circle>`),sa=Cr(`<rect x="0" y="0" mask="url(#venn-mask-left-only)"></rect>`),ca=Cr(`<rect x="0" y="0" mask="url(#venn-mask-right-only)"></rect>`),la=Cr(`<circle clip-path="url(#venn-clip-left)"></circle>`),ua=Cr(`<rect x="0" y="0" mask="url(#venn-mask-outside)"></rect>`),da=Cr(`<circle fill="none" stroke="#1e293b" stroke-width="2.5"></circle>`),fa=Cr(`<text font-size="22" font-weight="600" fill="#0f172a"> </text>`),pa=Y(`<div class="region-aria svelte-gkcqor" role="region"></div>`),ma=Y(`<div class="tile-wrapper svelte-gkcqor"><!></div>`),ha=Y(`<div class="drag-ghost svelte-gkcqor"><!></div>`),ga=Y(`<div class="venn-root svelte-gkcqor"><!> <!> <div class="venn-diagram svelte-gkcqor"><svg preserveAspectRatio="xMidYMid meet" aria-hidden="true" class="svelte-gkcqor"><defs><mask id="venn-mask-left-only" maskUnits="userSpaceOnUse" x="0" y="0"><rect x="0" y="0" fill="black"></rect><circle fill="white"></circle><circle fill="black"></circle></mask><mask id="venn-mask-right-only" maskUnits="userSpaceOnUse" x="0" y="0"><rect x="0" y="0" fill="black"></rect><circle fill="white"></circle><circle fill="black"></circle></mask><clipPath id="venn-clip-left" clipPathUnits="userSpaceOnUse"><circle></circle></clipPath><mask id="venn-mask-outside" 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 x="1" y="1" fill="#ffffff" stroke="#cbd5e1" stroke-width="1.5" rx="12"></rect><!><!><!><!><!><!><!><line x1="16" stroke="#cbd5e1" stroke-width="1" stroke-dasharray="4 6"></line></svg> <div class="region-labels svelte-gkcqor" aria-hidden="false"></div> <div class="placed-tiles svelte-gkcqor"></div></div> <!> <!> <div class="sr-only svelte-gkcqor" aria-live="polite" aria-atomic="true"></div></div>`),_a={hash:`svelte-gkcqor`,code:`.venn-root.svelte-gkcqor {display:flex;flex-direction:column;gap:16px;padding:16px;color:#0f172a;font-family:system-ui, -apple-system, Segoe UI, Roboto, sans-serif;}.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 #2563eb;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),
9
- .toggle-correct.svelte-gkcqor:focus-visible .toggle-label:where(.svelte-gkcqor) {text-decoration:underline;}.venn-diagram.svelte-gkcqor {position:relative;width:100%;
8
+ }`};function Ya(e,t){We(t,!0),ei(e,Ja);let n=X(t,`isDropTarget`,7,!1),r=X(t,`focused`,7,!1),i=X(t,`label`,7),a=X(t,`onpointerenter`,7),o=X(t,`onpointerleave`,7),s=X(t,`children`,7);var c={get isDropTarget(){return n()},set isDropTarget(e=!1){n(e),F()},get focused(){return r()},set focused(e=!1){r(e),F()},get label(){return i()},set label(e){i(e),F()},get onpointerenter(){return a()},set onpointerenter(e){a(e),F()},get onpointerleave(){return o()},set onpointerleave(e){o(e),F()},get children(){return s()},set children(e){s(e),F()}},l=qa();let u;var d=z(l),f=tn(d,!0),p=B(d,2),m=z(p),h=e=>{var t=Tr();Br(en(t),s),q(e,t)};return J(m,e=>{s()&&e(h)}),A(p),A(l),V(()=>{u=oi(l,1,`venn-tray svelte-1ogsh8s`,null,u,{"drop-target":n(),focused:r()}),Y(l,`aria-label`,i()),Mr(f,i())}),pr(`pointerenter`,l,function(...e){a()?.apply(this,e)}),pr(`pointerleave`,l,function(...e){o()?.apply(this,e)}),q(e,l),Ge(c)}wi(Ya,{isDropTarget:{},focused:{},label:{},onpointerenter:{},onpointerleave:{},children:{}},[],[],{mode:`open`});var Xa=K(`<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>`),Za={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 Qa(e,t){We(t,!0),ei(e,Za);let n=X(t,`html`,7),r=X(t,`language`,7),i=I(!1),a=`venn-teacher-instructions-${Math.random().toString(36).slice(2,10)}`;var o={get html(){return n()},set html(e){n(e),F()},get language(){return r()},set language(e){r(e),F()}},s=Xa(),c=z(s),l=tn(c,!0),u=B(c,2);return $r(u,n,!0),A(u),A(s),V(e=>{Y(c,`aria-expanded`,G(i)),Y(c,`aria-controls`,a),Mr(l,e),Y(u,`id`,a),Y(u,`hidden`,!G(i))},[()=>Ia(G(i)?`hideTeacherInstructions`:`showTeacherInstructions`,r())]),mr(`click`,c,()=>L(i,!G(i))),q(e,s),Ge(o)}hr([`click`]),wi(Qa,{html:{},language:{}},[],[],{mode:`open`});function $a(e){return!e||e.length===0?``:[...e].sort((e,t)=>e-t).join(`,`)}function eo(e){return!e||e.length===0?[]:[...e].sort((e,t)=>e-t)}function to(e,t){if(!e||!t)return!e==!t&&(e?.length??0)===(t?.length??0);if(e.length!==t.length)return!1;let n=eo(e),r=eo(t);for(let e=0;e<n.length;e++)if(n[e]!==r[e])return!1;return!0}function no(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 ro(e,t,n){let r=eo(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 io(e,t){let n=$a(t),r=e.regionLabels?.[n];return typeof r==`string`&&r.trim().length>0?r:ro(e.circles??[],t,e.language)}var ao={w:120,h:52},oo={w:120,h:84},so=.6;function co(e){return Math.min(1,44/Math.min(e.w,e.h))}var lo={side:24,top:40,radius:236,centerDistance:200,outsideGap:12,outsideStripHeight:136},uo=.05;function fo(e=1,t=0){let n=lo.side*e,r=lo.radius*e,i=lo.centerDistance*e,a=lo.top*e+r,o=lo.outsideGap*e,s=Math.max(lo.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 po(){return fo()}function mo(e,t){return`min(100%, max(min(720px, ${so*100*e.width/e.height}vh), ${e.width*co(t)}px))`}function ho(e,t,n){return e>0?Math.max(co(n),Math.min(1,e/t.width)):1}function go(e,t){return Math.max(0,Math.floor((e+8)/(t.w+8)+1e-9))}function _o(e,t){return t>e.r?-1:Math.sqrt(e.r*e.r-t*t)}function vo(e,t,n){let r=_o(e,Math.max(Math.abs(t-e.cy),Math.abs(n-e.cy)));return r<0?null:[e.cx-r,e.cx+r]}function yo(e,t,n){return _o(e,t<=e.cy&&e.cy<=n?0:Math.min(Math.abs(t-e.cy),Math.abs(n-e.cy)))}function bo(e,t,n,r,i){let a=vo(t,r,i),o=vo(n,r,i),s,c;if(e===`0`){if(!a)return null;let e=yo(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=yo(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 xo(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=bo(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=go(f-d,r);p>0&&c.push({y:l,lo:d,hi:f,n:p})}return c})}function So(e){return e.reduce((e,t)=>e+t.n,0)}function Co(e,t,n){let r=e.width-6,i=go(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 Oo(Do(Array.from({length:u},(e,t)=>({y:d+n.h/2+t*a,lo:6,hi:r,n:i})),l,n),e,c)}}}function wo(e){return{x:e.x+e.w/2,y:e.y+e.h/2}}function To(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 Eo(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 Do(e,t,n){let r=[],i=t;for(let t of e){let e=Math.min(t.n,i);r.push(...To(t,e,n)),i-=e}return r}function Oo(e,t,n){let r=e[e.length-1]??n;for(;e.length<t;)e.push({...r});return e}function ko(e,t,n,r){let i=Math.max(...e.map(So));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(So(n)<o)continue;let e=Eo(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 Oo(s?Do(s,o,n):[],a,r)}}function Ao(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=bo(e,t,n,r-o,r+o);s&&s[1]-s[0]>=2*o?i=o:a=o}let o=bo(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 jo(e,t,n){let[r,i]=t.circles;return Math.max(...xo(e,r,i,n).map(So))}var Mo=[`0`,`0,1`,`1`];function No(e,t=ao){let n=fo();for(let r=1;;r++){let i=n;if(Mo.every(n=>jo(n,i,t)>=(e[n]??0)))break;n=fo(1+r*uo)}let r=e[``]??0,i=go(n.width-12,t),a=Math.ceil(r/i)*(t.h+8)-8+12;return a>n.outsideStripHeight?fo(n.scale,a):n}function Po(e,t=po(),n=ao){if(e.circles?.length!==2)throw Error(`buildLayout2Set requires exactly 2 circles (got ${e.circles?.length??0})`);let[r,i]=t.circles,a=no(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=$a(a),c=io(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}=Co(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=Ao(o,r,i);let e=xo(o,r,i,n);m=Math.max(...e.map(So)),h=ko(e,r.cy,n,wo(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 Fo(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 Io(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]=eo(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=Lo(t,{...n,placements:i}),n}function Lo(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 Ro({model:e,session:t,tileId:n,placement:r}){let i=Io(t,e),a={...i,placements:{...i.placements,[n]:r===null?null:eo(r)}};return a.completed=Lo(e,a),a}function zo(e,t){let n=e?.placements?.[t];return Array.isArray(n)?eo(n):null}function Bo(e,t,n){let r=zo(e,t);return r===null||n===null?r===n:to(r,n)}function Vo(e,t){let n=t?.placements??{};return(e.tiles||[]).filter(e=>n[e.id]==null)}function Ho(e,t){let n=t?.placements??{},r={};for(let t of e.tiles||[]){let e=n[t.id];if(e==null)continue;let i=eo(e).join(`,`);r[i]||(r[i]=[]),r[i].push(t)}return r}var Uo=K(`<div class="venn-prompt svelte-gkcqor"></div>`),Wo=wr(`<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="#bce2ff"></circle><path d="M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z" fill="#bce2ff"></path><polygon points="-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6" fill="#1a9cff"></polygon></svg>`),Go=wr(`<svg class="toggle-icon svelte-gkcqor" preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-129.5 127 34 35" aria-hidden="true"><path style="fill: #D0CAC5; stroke: #E6E3E0; stroke-width: 0.75; stroke-miterlimit: 10;" d="M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z"></path><path style="fill: #B3ABA4; stroke: #CDC7C2; stroke-width: 0.5; stroke-miterlimit: 10;" d="M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"></path><circle cx="-114.2" cy="143.5" r="14" fill="white"></circle><path d="M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z" fill="#bce2ff"></path><polygon points="-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2" fill="#1a9cff"></polygon></svg>`),Ko=K(`<button type="button" class="toggle-correct svelte-gkcqor"><!> <span class="toggle-label svelte-gkcqor"> </span></button>`),qo=K(`<div class="venn-error svelte-gkcqor" role="alert"> </div>`),Jo=wr(`<circle fill="rgba(14, 165, 233, 0.12)"></circle>`),Yo=wr(`<rect x="0" y="0"></rect>`),Xo=wr(`<circle></circle>`),Zo=wr(`<circle fill="none" stroke="#1e293b"></circle>`),Qo=wr(`<text font-weight="600" fill="#0f172a"> </text>`),$o=K(`<div class="region-aria svelte-gkcqor" role="region"></div>`),es=K(`<div class="tile-wrapper svelte-gkcqor"><!></div>`),ts=K(`<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="#ffffff" stroke="#cbd5e1"></rect><!><!><!><!><!><!><!><line stroke="#cbd5e1"></line></svg> <div class="region-labels svelte-gkcqor" aria-hidden="false"></div> <div class="placed-tiles svelte-gkcqor"></div></div> <!>`,1),ns=K(`<div class="drag-ghost svelte-gkcqor"><!></div>`),rs=K(`<div class="venn-root svelte-gkcqor"><!> <!> <!> <!> <!> <div class="sr-only svelte-gkcqor" aria-live="polite" aria-atomic="true"></div></div>`),is={hash:`svelte-gkcqor`,code:`.venn-root.svelte-gkcqor {display:flex;flex-direction:column;gap:16px;padding:16px;color:#0f172a;font-family:system-ui, -apple-system, Segoe UI, Roboto, sans-serif;--vc-focus-ring: var(
9
+ --pie-focus-outline,
10
+ var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565c0))
11
+ );}.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),
12
+ .toggle-correct.svelte-gkcqor:focus-visible .toggle-label:where(.svelte-gkcqor) {text-decoration:underline;}.venn-diagram.svelte-gkcqor {
10
13
  /*
11
- * Keep the diagram "smart" about vertical space: it should not monopolise
12
- * the viewport and force the tray below the fold.
13
- * - aspect-ratio preserves the 3:2 geometry the SVG is tuned for
14
- * - max-width keeps the diagram from dominating wide layouts
15
- * - max-height (viewport-relative) shrinks it further in short windows
16
- * so the prompt, toggle, and tray remain in view without scrolling
17
- * whenever possible. The SVG uses preserveAspectRatio="xMidYMid meet",
18
- * so when max-height wins the width reduces in lockstep.
19
- */max-width:720px;aspect-ratio:900 / 540;max-height:min(60vh, 430px);margin:0 auto;}.venn-diagram.svelte-gkcqor svg:where(.svelte-gkcqor) {width:100%;height:100%;display:block;}.placed-tiles.svelte-gkcqor,
20
- .region-labels.svelte-gkcqor {position:absolute;inset:0;pointer-events:none;}.tile-wrapper.svelte-gkcqor {position:absolute;transform:translate(-50%, -50%);pointer-events:auto;}.region-aria.svelte-gkcqor {position:absolute;width:1px;height:1px;transform:translate(-50%, -50%);opacity:0;pointer-events:none;}.sr-only.svelte-gkcqor {position:absolute;width:1px;height:1px;padding:0;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 va(e,t){Ke(t,!0),Yr(e,_a);let n=null,r=null,i=null,a=null,o=I(!1),s=I(null),c=I(null),l=I(null),u=I(null),d=Ji(),f=F(()=>({circles:t?.model?.circles??[{label:`Set A`},{label:`Set B`}],tiles:t?.model?.tiles??[],regionLabels:t?.model?.regionLabels??{},scoringPolicy:`partialPerTile`,promptEnabled:!0})),p=F(()=>Xi(J(f),d)),m=F(()=>t?.model?.env?.mode===`evaluate`),h=F(()=>t?.model?.disabled===!0),g=F(()=>t?.model?.prompt??null),_=F(()=>C(t?.session,t?.model,J(o))),v=F(()=>({placements:J(_)})),y=F(()=>ta(J(f),J(v))),x=F(()=>ea(J(f),J(v))),S=F(()=>[`0`,`0,1`,`1`,``,`tray`]);function C(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 w(e){a&&(a.textContent=``,requestAnimationFrame(()=>{a&&(a.textContent=e)}))}function ee(e,t){return{left:e/d.width*100,top:t/d.height*100}}function te(e,t){if(!r)return null;let n=r.getBoundingClientRect();if(n.width===0||n.height===0)return null;let i=(e-n.left)/n.width,a=(t-n.top)/n.height;return{x:i*d.width,y:a*d.height}}function ne(e,r){let i=$i({model:J(f),session:t?.session,tileId:e,placement:r});Si({sourceEl:n,fallbackSelector:`venn-classification`,component:`venn-classification`,session:i,complete:i.completed===!0})}function re(e){return e?(J(f).tiles||[]).find(t=>t.id===e)??null:null}function ie(e){return J(p).regionByKey[e]}function ae(e,t){if(J(h))return;t.preventDefault(),t.currentTarget.setPointerCapture?.(t.pointerId),L(s,e.id,!0),L(u,{x:t.clientX,y:t.clientY},!0),L(c,oe(t.clientX,t.clientY),!0),w(`Picked up ${Mi(e)}`);let n=e=>{L(u,{x:e.clientX,y:e.clientY},!0),L(c,oe(e.clientX,e.clientY),!0)},r=t=>{window.removeEventListener(`pointermove`,n),window.removeEventListener(`pointerup`,r),window.removeEventListener(`pointercancel`,r);let i=oe(t.clientX,t.clientY);L(s,null),L(u,null);let a=J(c);L(c,null);let o=i??a;if(o===null){w(`Cancelled`);return}if(o===`tray`){ne(e.id,null),w(`${Mi(e)} returned to tray`);return}let l=ie(o);if(!l){w(`Cancelled`);return}ne(e.id,l.region),w(`${Mi(e)} placed in ${l.label}`)};window.addEventListener(`pointermove`,n),window.addEventListener(`pointerup`,r),window.addEventListener(`pointercancel`,r)}function oe(e,t){if(se(e,t))return`tray`;let n=te(e,t);if(!n)return null;let r=Zi(J(p),n.x,n.y);return r?r.key:null}function se(e,t){let r=n?.querySelector(`[data-region-key="tray"]`);if(!r)return!1;let i=r.getBoundingClientRect();return e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom}function ce(e,t){if(!J(h)){if(t.key===` `||t.key===`Enter`){if(t.preventDefault(),J(s)===e.id){let t=J(l);if(L(s,null),!t){w(`Cancelled`);return}if(t===`tray`){ne(e.id,null),w(`${Mi(e)} returned to tray`);return}let n=ie(t);if(!n)return;ne(e.id,n.region),w(`${Mi(e)} placed in ${n.label}`)}else L(s,e.id,!0),L(l,J(S)[0]??null,!0),w(`Picked up ${Mi(e)}. Use arrow keys to choose a region, then press Enter to commit.`);return}if(t.key===`Escape`&&J(s)===e.id){t.preventDefault(),L(s,null),L(l,null),w(`Cancelled`);return}if(J(s)===e.id&&(t.key===`ArrowLeft`||t.key===`ArrowRight`||t.key===`ArrowUp`||t.key===`ArrowDown`||t.key===`Tab`)){t.preventDefault();let e=J(l)??J(S)[0]??`0`,n=J(S).indexOf(e);n<0&&(n=0);let r=t.key===`ArrowLeft`||t.key===`ArrowUp`||t.key===`Tab`&&t.shiftKey?-1:1;n=(n+r+J(S).length)%J(S).length,L(l,J(S)[n],!0),w(`Drop target: ${(J(l)===`tray`?{label:`Tiles tray`}:ie(J(l)))?.label??`unknown`}`)}}}function le(e){if(!J(m)||J(o))return`neutral`;let n=t?.model?.correctness?.[e];return n===`correct`||n===`incorrect`||n===`unanswered`?n:`neutral`}function ue(){if(n)try{Ai(n)}catch(e){console.warn(`venn-classification: MathJax render failed`,e)}}Ir(()=>{ar().then(ue)}),vn(()=>{J(_),J(f).tiles?.length,ar().then(ue)});let de=F(()=>J(m)?Object.values(t?.model?.correctness??{}).filter(e=>e===`incorrect`||e===`unanswered`).length:0),fe=F(()=>J(s)===null?J(c)??null:J(c)??J(l)??null),pe=F(()=>J(fe)===`0`),me=F(()=>J(fe)===`1`),he=F(()=>J(fe)===`0,1`),ge=F(()=>J(fe)===``),_e=`rgba(37, 99, 235, 0.18)`,ve=F(()=>J(s)!==null&&J(u)!==null?re(J(s)):null);var ye=ga(),be=B(ye),xe=e=>{var t=na();Jr(t,()=>J(g),!0),k(t),X(e,t)};Z(be,e=>{J(g)&&e(xe)});var Se=V(be,2),Ce=e=>{var t=aa(),n=B(t),r=e=>{X(e,ra())},i=e=>{X(e,ia())};Z(n,e=>{J(o)?e(r):e(i,-1)});var a=V(n,2),s=B(a);k(a),k(t),H(()=>{Q(t,`aria-pressed`,J(o)),Dr(s,`${J(o)?`Hide`:`Show`} correct answer`)}),mr(`click`,t,()=>L(o,!J(o))),X(e,t)};Z(Se,e=>{J(m)&&J(de)>0&&e(Ce)});var we=V(Se,2),Te=B(we),Ee=B(Te),De=B(Ee),Oe=B(De),ke=V(Oe),Ae=V(ke);k(De);var je=V(De),Me=B(je),Ne=V(Me),Pe=V(Ne);k(je);var Fe=V(je),T=B(Fe);k(Fe);var E=V(Fe),D=B(E),O=V(D),Ie=V(O);k(E),k(Ee);var Le=V(Ee),Re=V(Le);Hr(Re,17,()=>d.circles,Rr,(e,t)=>{var n=oa();H(()=>{Q(n,`cx`,J(t).cx),Q(n,`cy`,J(t).cy),Q(n,`r`,J(t).r)}),X(e,n)});var ze=V(Re),Be=e=>{var t=sa();Q(t,`fill`,_e),H(()=>{Q(t,`width`,d.width),Q(t,`height`,d.height)}),X(e,t)};Z(ze,e=>{J(pe)&&e(Be)});var Ve=V(ze),He=e=>{var t=ca();Q(t,`fill`,_e),H(()=>{Q(t,`width`,d.width),Q(t,`height`,d.height)}),X(e,t)};Z(Ve,e=>{J(me)&&e(He)});var Ue=V(Ve),We=e=>{var t=la();Q(t,`fill`,_e),H(()=>{Q(t,`cx`,d.circles[1].cx),Q(t,`cy`,d.circles[1].cy),Q(t,`r`,d.circles[1].r)}),X(e,t)};Z(Ue,e=>{J(he)&&e(We)});var A=V(Ue),Ge=e=>{var t=ua();Q(t,`fill`,_e),H(()=>{Q(t,`width`,d.width),Q(t,`height`,d.height)}),X(e,t)};Z(A,e=>{J(ge)&&e(Ge)});var Je=V(A);Hr(Je,17,()=>d.circles,Rr,(e,t)=>{var n=da();H(()=>{Q(n,`cx`,J(t).cx),Q(n,`cy`,J(t).cy),Q(n,`r`,J(t).r)}),X(e,n)});var Ye=V(Je);Hr(Ye,17,()=>d.circles,Rr,(e,t,n)=>{var r=fa();Q(r,`text-anchor`,n===0?`start`:`end`);var i=B(r,!0);k(r),H((e,t)=>{Q(r,`x`,e),Q(r,`y`,t),Dr(i,J(f).circles[n]?.label??``)},[()=>n===0?Math.max(20,J(t).cx-J(t).r):Math.min(d.width-20,J(t).cx+J(t).r),()=>Math.max(26,J(t).cy-J(t).r-12)]),X(e,r)});var Xe=V(Ye);k(Te),di(Te,e=>i=e,()=>i);var Ze=V(Te,2);Hr(Ze,21,()=>J(p).regions,Rr,(e,t)=>{let n=F(()=>ee(J(t).hitRect.x+J(t).hitRect.w/2,J(t).hitRect.y+J(t).hitRect.h/2));var r=pa();H(()=>{Q(r,`aria-label`,J(t).label),Q(r,`data-region-key`,J(t).key),ri(r,`left: ${J(n).left??``}%; top: ${J(n).top??``}%;`)}),X(e,r)}),k(Ze);var Qe=V(Ze,2);Hr(Qe,21,()=>Object.entries(J(y)),Rr,(e,t)=>{var n=F(()=>b(J(t),2));let r=()=>J(n)[0],i=()=>J(n)[1],a=F(()=>J(p).regionByKey[r()]);var o=wr(),c=sn(o),l=e=>{var t=wr();Hr(sn(t),19,i,e=>e.id,(e,t,n)=>{let r=F(()=>J(a).gridSlot(J(n),132,68)),i=F(()=>ee(J(r).x,J(r).y));var o=ma(),c=B(o);{let e=F(()=>le(J(t).id)),n=F(()=>J(s)===J(t).id),r=F(()=>J(s)===J(t).id&&J(u)!==null);zi(c,{get id(){return J(t).id},get label(){return J(t).label},get imageUrl(){return J(t).imageUrl},get imageAlt(){return J(t).imageAlt},get correctness(){return J(e)},get held(){return J(n)},get invisible(){return J(r)},get disabled(){return J(h)},onpointerdown:e=>ae(J(t),e),onkeydown:e=>ce(J(t),e)})}k(o),H(()=>ri(o,`left: ${J(i).left??``}%; top: ${J(i).top??``}%;`)),X(e,o)}),X(e,t)};Z(c,e=>{J(a)&&e(l)}),X(e,o)}),k(Qe),k(we),di(we,e=>r=e,()=>r);var $e=V(we,2);{let e=F(()=>J(c)===`tray`||J(s)!==null&&J(l)===`tray`);Hi($e,{get isDropTarget(){return J(e)},label:`Tiles to classify`,children:(e,t)=>{var n=wr();Hr(sn(n),17,()=>J(x),e=>e.id,(e,t)=>{{let n=F(()=>J(s)===J(t).id),r=F(()=>J(s)===J(t).id&&J(u)!==null);zi(e,{get id(){return J(t).id},get label(){return J(t).label},get imageUrl(){return J(t).imageUrl},get imageAlt(){return J(t).imageAlt},correctness:`neutral`,get held(){return J(n)},get invisible(){return J(r)},get disabled(){return J(h)},onpointerdown:e=>ae(J(t),e),onkeydown:e=>ce(J(t),e)})}}),X(e,n)},$$slots:{default:!0}})}var et=V($e,2),tt=e=>{var t=ha();zi(B(t),{get id(){return J(ve).id},get label(){return J(ve).label},get imageUrl(){return J(ve).imageUrl},get imageAlt(){return J(ve).imageAlt},correctness:`neutral`,ghost:!0}),k(t),H(()=>ri(t,`left: ${J(u).x??``}px; top: ${J(u).y??``}px;`)),X(e,t)};Z(et,e=>{J(ve)&&J(u)&&e(tt)}),di(V(et,2),e=>a=e,()=>a),k(ye),di(ye,e=>n=e,()=>n),H(()=>{Q(Te,`viewBox`,`0 0 ${d.width??``} ${d.height??``}`),Q(De,`width`,d.width),Q(De,`height`,d.height),Q(Oe,`width`,d.width),Q(Oe,`height`,d.height),Q(ke,`cx`,d.circles[0].cx),Q(ke,`cy`,d.circles[0].cy),Q(ke,`r`,d.circles[0].r),Q(Ae,`cx`,d.circles[1].cx),Q(Ae,`cy`,d.circles[1].cy),Q(Ae,`r`,d.circles[1].r),Q(je,`width`,d.width),Q(je,`height`,d.height),Q(Me,`width`,d.width),Q(Me,`height`,d.height),Q(Ne,`cx`,d.circles[1].cx),Q(Ne,`cy`,d.circles[1].cy),Q(Ne,`r`,d.circles[1].r),Q(Pe,`cx`,d.circles[0].cx),Q(Pe,`cy`,d.circles[0].cy),Q(Pe,`r`,d.circles[0].r),Q(T,`cx`,d.circles[0].cx),Q(T,`cy`,d.circles[0].cy),Q(T,`r`,d.circles[0].r),Q(E,`width`,d.width),Q(E,`height`,d.height),Q(D,`width`,d.width),Q(D,`height`,d.height),Q(O,`cx`,d.circles[0].cx),Q(O,`cy`,d.circles[0].cy),Q(O,`r`,d.circles[0].r),Q(Ie,`cx`,d.circles[1].cx),Q(Ie,`cy`,d.circles[1].cy),Q(Ie,`r`,d.circles[1].r),Q(Le,`width`,d.width-2),Q(Le,`height`,d.height-2),Q(Xe,`x2`,d.width-16),Q(Xe,`y1`,J(p).outsideStripTop),Q(Xe,`y2`,J(p).outsideStripTop)}),X(e,ye),qe()}hr([`click`]),_i(va,{model:{type:`Object`},session:{type:`Object`}},[],[]);var ya=va.element;return class extends ya{_internalSession=null;_model=null;_isComplete=()=>Qi(this._model,this._internalSession);_dispatchModelSet=()=>{this.dispatchEvent(new vi(this.tagName.toLowerCase(),this._isComplete(),this._model!==void 0))};_dispatchSessionChanged=()=>{this.dispatchEvent(new yi(this.tagName.toLowerCase(),this._isComplete()))};set model(e){this._model=e,super.model=e,this._dispatchModelSet()}get model(){return this._model}set session(e){e!==this._internalSession&&(this._internalSession=e,super.session=e,this._dispatchSessionChanged())}get session(){return this._internalSession}onSessionChange=e=>{this._internalSession=e,super.session=e,this._dispatchSessionChanged()};connectedCallback(){super.connectedCallback(),this.onSessionChange=this.onSessionChange}}})();
14
+ * Width and aspect ratio come from the geometry, inline. The width cap
15
+ * keeps the diagram from dominating wide layouts, and the viewport-height
16
+ * share keeps the prompt, toggle and tray in view in short windows, down
17
+ * to the width that keeps tiles at 44 px (\`diagramCssWidth\`).
18
+ */position:relative;margin:0 auto;}.venn-diagram.svelte-gkcqor svg:where(.svelte-gkcqor) {width:100%;height:100%;display:block;}.placed-tiles.svelte-gkcqor,
19
+ .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 #bf0d00;border-radius:8px;background:#fef2f2;color:#7f1d1d;font-size:14px;}
20
+ /* 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 as(e,t){We(t,!0),ei(e,is);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=I(null),u=null,d=I(!1),f=I(null),p=I(null),m=I(null),h=I(null),g=I(0),_=null,v=null,y=N(()=>t?.model?.circles??n),b=N(()=>G(y).length===2),x=N(()=>t?.model?.language),S=N(()=>({circles:G(y),tiles:t?.model?.tiles??[],regionLabels:t?.model?.regionLabels??{},language:G(x),scoringPolicy:`partialPerTile`,promptEnabled:!0})),C=N(()=>t?.model?.env?.mode===`evaluate`),w=N(()=>t?.model?.disabled===!0),T=N(()=>t?.model?.prompt??null),te=N(()=>ue(t?.session,t?.model,G(d))),ne=N(()=>({placements:G(te)})),re=N(()=>Ho(G(S),G(ne))),ie=N(()=>Vo(G(S),G(ne))),ae=N(()=>(G(S).tiles??[]).some(e=>(e.imageUrl??``).trim())?oo:ao),E=N(()=>No(Object.fromEntries(Object.entries(G(re)).map(([e,t])=>[e,t.length])),G(ae))),oe=N(()=>G(b)?Po(G(S),G(E),G(ae)):null),se=N(()=>ho(G(g),G(E),G(ae))),ce=N(()=>[`0`,`0,1`,`1`,``,`tray`]),le;gn(()=>{let e=t?.session,n=G(C)&&!!t?.model?.correctRegionsById;cr(()=>{(!n||e!==le)&&L(d,!1),le=e})}),mn(()=>{G(w)&&cr(ye)}),Hr(()=>{_?.()});function ue(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 de(e){u&&(u.textContent=``,requestAnimationFrame(()=>{u&&(u.textContent=e)}))}function fe(e,t){return{left:e/G(E).width*100,top:t/G(E).height*100}}function pe(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(E).width,y:i*G(E).height}}function me(e,n){let r=Ro({model:G(S),session:t?.session,tileId:e,placement:n});t.onSessionChange?.(r)}function he(e){return e?(G(S).tiles||[]).find(t=>t.id===e)??null:null}function ge(e){return G(oe)?.regionByKey[e]}function _e(e){return e===`tray`?$(`tray`,G(x)):ge(e)?.label??$(`unknownTarget`,G(x))}function ve(){L(f,null),L(m,null),L(p,null),L(h,null)}function ye(){_?.(),G(f)!==null&&ve()}function be(e,n){let r=Ra(e,G(x)),i=n===`tray`?null:n===null?void 0:ge(n)?.region;if(i===void 0||Bo(t?.session,e.id,i)){de($(`cancelled`,G(x)));return}me(e.id,i),de(i===null?$(`returnedToTray`,G(x),{name:r}):$(`placedIn`,G(x),{name:r,target:_e(n)}))}function xe(e,t){if(G(w))return;t.preventDefault(),_?.(),t.currentTarget.setPointerCapture?.(t.pointerId),L(f,e.id,!0),L(m,null),L(h,{x:t.clientX,y:t.clientY},!0),L(p,D(t.clientX,t.clientY),!0),de($(`pickedUp`,G(x),{name:Ra(e,G(x))}));let n=e=>{L(h,{x:e.clientX,y:e.clientY},!0),L(p,D(e.clientX,e.clientY),!0)},r=t=>{a();let n=D(t.clientX,t.clientY),r=G(p);ve(),!G(w)&&be(e,n??r)},i=()=>{a(),ve(),de($(`cancelled`,G(x)))},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 D(e,t){if(Se(e,t))return`tray`;let n=pe(e,t);if(!n||!G(oe))return null;let r=Fo(G(oe),n.x,n.y);return r?r.key:null}function Se(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 O(e){await ar();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 k(e){if(G(f)===e.id){let t=G(m);ve(),be(e,t),O(e.id)}else{let t=zo(G(ne),e.id),n=t===null?G(ce)[0]??null:$a(t);L(f,e.id,!0),L(m,n,!0),de($(`pickedUpWithKeyboard`,G(x),{name:Ra(e,G(x)),target:_e(n??``)}))}}function Ce(e,t){if(!(G(w)||t.detail!==0)){if(v===e.id){v=null;return}k(e)}}function we(){setTimeout(()=>{v=null},0)}function Te(e,t){if(!G(w)){if(t.key===` `||t.key===`Enter`){t.preventDefault(),v=e.id,k(e);return}if(t.key===`Escape`&&G(f)===e.id){t.preventDefault(),ve(),de($(`cancelled`,G(x)));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(ce)[0]??`0`,n=G(ce).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(ce).length)%G(ce).length,L(m,G(ce)[n],!0),de($(`dropTarget`,G(x),{target:_e(G(m))}))}}}function Ee(e){if(G(f)===null||G(h)!==null)return;let t=e.relatedTarget;t&&c?.contains(t)||(ve(),de($(`cancelled`,G(x))))}function De(e){if(!G(C)||G(d))return null;let n=t?.model?.correctness?.[e];return n===`correct`||n===`incorrect`||n===`unanswered`?n:null}function Oe(){if(!c)return;let e=e=>console.warn(`venn-classification: MathJax render failed`,e);try{Promise.resolve(Ni(c)).catch(e)}catch(t){e(t)}}Vr(()=>{ar().then(Oe)}),mn(()=>{G(te),G(S).tiles?.length,ar().then(Oe)});let ke=N(()=>G(C)?Object.values(t?.model?.correctness??{}).filter(e=>e===`incorrect`||e===`unanswered`).length:0),Ae=N(()=>G(f)===null?G(p)??null:G(p)??G(m)??null),je=N(()=>G(Ae)===`0`),Me=N(()=>G(Ae)===`1`),Ne=N(()=>G(Ae)===`0,1`),Pe=N(()=>G(Ae)===``),Fe=`rgba(37, 99, 235, 0.18)`,Ie=N(()=>G(f)!==null&&G(h)!==null?he(G(f)):null);var Le=rs(),Re=z(Le),ze=e=>{Qa(e,{get html(){return t.model.teacherInstructions},get language(){return G(x)}})};J(Re,e=>{t?.model?.teacherInstructions&&e(ze)});var Be=B(Re,2),Ve=e=>{var t=Uo();$r(t,()=>G(T),!0),A(t),q(e,t)};J(Be,e=>{G(T)&&e(Ve)});var He=B(Be,2),j=e=>{var t=Ko(),n=z(t),r=e=>{q(e,Wo())},i=e=>{q(e,Go())};J(n,e=>{G(d)?e(r):e(i,-1)});var a=tn(B(n,2),!0);A(t),V(e=>{Y(t,`aria-pressed`,G(d)),Mr(a,e)},[()=>Ia(G(d)?`hideCorrectAnswer`:`showCorrectAnswer`,G(x))]),mr(`click`,t,()=>L(d,!G(d))),q(e,t)};J(He,e=>{G(C)&&G(ke)>0&&e(j)});var Ue=B(He,2),Ke=e=>{var t=qo(),n=tn(t,!0);V(e=>Mr(n,e),[()=>$(`unsupportedCircles`,G(x),{count:G(y).length,supported:2})]),q(e,t)},qe=e=>{var t=ts(),n=en(t);let r;var c=z(n),u=z(c),d=z(u),_=z(d),v=B(_),y=B(v);A(d);var b=B(d),C=z(b),T=B(C),te=B(T);A(b);var ne=B(b),ce=tn(ne),le=B(ne),ue=z(le),de=B(ue),pe=B(de);A(le),A(u);var me=B(u),he=B(me);qr(he,17,()=>G(E).circles,Ur,(e,t)=>{var n=Jo();V(()=>{Y(n,`cx`,G(t).cx),Y(n,`cy`,G(t).cy),Y(n,`r`,G(t).r)}),q(e,n)});var ge=B(he),_e=e=>{var t=Yo();Y(t,`fill`,Fe),V(()=>{Y(t,`width`,G(E).width),Y(t,`height`,G(E).height),Y(t,`mask`,`url(#${i})`)}),q(e,t)};J(ge,e=>{G(je)&&e(_e)});var ve=B(ge),ye=e=>{var t=Yo();Y(t,`fill`,Fe),V(()=>{Y(t,`width`,G(E).width),Y(t,`height`,G(E).height),Y(t,`mask`,`url(#${a})`)}),q(e,t)};J(ve,e=>{G(Me)&&e(ye)});var be=B(ve),D=e=>{var t=Xo();Y(t,`fill`,Fe),V(()=>{Y(t,`cx`,G(E).circles[1].cx),Y(t,`cy`,G(E).circles[1].cy),Y(t,`r`,G(E).circles[1].r),Y(t,`clip-path`,`url(#${s})`)}),q(e,t)};J(be,e=>{G(Ne)&&e(D)});var Se=B(be),O=e=>{var t=Yo();Y(t,`fill`,Fe),V(()=>{Y(t,`width`,G(E).width),Y(t,`height`,G(E).height),Y(t,`mask`,`url(#${o})`)}),q(e,t)};J(Se,e=>{G(Pe)&&e(O)});var k=B(Se);qr(k,17,()=>G(E).circles,Ur,(e,t)=>{var n=Zo();V(()=>{Y(n,`cx`,G(t).cx),Y(n,`cy`,G(t).cy),Y(n,`r`,G(t).r),Y(n,`stroke-width`,2*G(E).scale)}),q(e,n)});var Ee=B(k);qr(Ee,17,()=>G(E).circles,Ur,(e,t,n)=>{var r=Qo();Y(r,`text-anchor`,n===0?`start`:`end`);var i=tn(r,!0);V((e,t)=>{Y(r,`x`,e),Y(r,`y`,t),Y(r,`font-size`,18*G(E).scale),Mr(i,G(S).circles[n]?.label??``)},[()=>n===0?Math.max(20*G(E).scale,G(t).cx-G(t).r):Math.min(G(E).width-20*G(E).scale,G(t).cx+G(t).r),()=>Math.max(26*G(E).scale,G(t).cy-G(t).r-12*G(E).scale)]),q(e,r)});var Oe=B(Ee);A(c);var ke=B(c,2);qr(ke,21,()=>G(oe).regions,Ur,(e,t)=>{let n=N(()=>fe(G(t).hitRect.x+G(t).hitRect.w/2,G(t).hitRect.y+G(t).hitRect.h/2));var r=$o();V(()=>{Y(r,`aria-label`,G(t).label),Y(r,`data-region-key`,G(t).key),ci(r,`left: ${G(n).left??``}%; top: ${G(n).top??``}%;`)}),q(e,r)}),A(ke);var Ae=B(ke,2);qr(Ae,21,()=>Object.entries(G(re)),Ur,(e,t)=>{var n=N(()=>ee(G(t),2));let r=()=>G(n)[0],i=()=>G(n)[1],a=N(()=>G(oe).regionByKey[r()]);var o=Tr(),s=en(o),c=e=>{let t=N(()=>G(a).slots(i().length));var n=Tr();qr(en(n),19,i,e=>e.id,(e,n,r)=>{let i=N(()=>fe(G(t)[G(r)].x,G(t)[G(r)].y));var o=es(),s=z(o);{let e=N(()=>za(G(n),G(a).label,De(G(n).id),G(x))),t=N(()=>De(G(n).id)??`neutral`),r=N(()=>G(f)===G(n).id),i=N(()=>G(f)===G(n).id&&G(h)!==null);Ka(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(w)},onpointerdown:e=>xe(G(n),e),onkeydown:e=>Te(G(n),e),onkeyup:we,onclick:e=>Ce(G(n),e)})}A(o),V(()=>ci(o,`left: ${G(i).left??``}%; top: ${G(i).top??``}%; width: ${G(ae).w??``}px; height: ${G(ae).h??``}px; transform: translate(-50%, -50%) scale(${G(se)??``});`)),q(e,o)}),q(e,n)};J(s,e=>{G(a)&&e(c)}),q(e,o)}),A(Ae),A(n),vi(n,e=>L(l,e),()=>G(l));var Ie=B(n,2);{let e=N(()=>G(p)===`tray`||G(f)!==null&&G(m)===`tray`),t=N(()=>$(`tray`,G(x)));Ya(Ie,{get isDropTarget(){return G(e)},get label(){return G(t)},children:(e,t)=>{var n=Tr();qr(en(n),17,()=>G(ie),e=>e.id,(e,t)=>{{let n=N(()=>za(G(t),null,De(G(t).id),G(x))),r=N(()=>De(G(t).id)??`neutral`),i=N(()=>G(f)===G(t).id),a=N(()=>G(f)===G(t).id&&G(h)!==null);Ka(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(w)},onpointerdown:e=>xe(G(t),e),onkeydown:e=>Te(G(t),e),onkeyup:we,onclick:e=>Ce(G(t),e)})}}),q(e,n)},$$slots:{default:!0}})}V(e=>{r=ci(n,``,r,{width:e,"aspect-ratio":`${G(E).width??``} / ${G(E).height??``}`}),Y(c,`viewBox`,`0 0 ${G(E).width??``} ${G(E).height??``}`),Y(d,`id`,i),Y(d,`width`,G(E).width),Y(d,`height`,G(E).height),Y(_,`width`,G(E).width),Y(_,`height`,G(E).height),Y(v,`cx`,G(E).circles[0].cx),Y(v,`cy`,G(E).circles[0].cy),Y(v,`r`,G(E).circles[0].r),Y(y,`cx`,G(E).circles[1].cx),Y(y,`cy`,G(E).circles[1].cy),Y(y,`r`,G(E).circles[1].r),Y(b,`id`,a),Y(b,`width`,G(E).width),Y(b,`height`,G(E).height),Y(C,`width`,G(E).width),Y(C,`height`,G(E).height),Y(T,`cx`,G(E).circles[1].cx),Y(T,`cy`,G(E).circles[1].cy),Y(T,`r`,G(E).circles[1].r),Y(te,`cx`,G(E).circles[0].cx),Y(te,`cy`,G(E).circles[0].cy),Y(te,`r`,G(E).circles[0].r),Y(ne,`id`,s),Y(ce,`cx`,G(E).circles[0].cx),Y(ce,`cy`,G(E).circles[0].cy),Y(ce,`r`,G(E).circles[0].r),Y(le,`id`,o),Y(le,`width`,G(E).width),Y(le,`height`,G(E).height),Y(ue,`width`,G(E).width),Y(ue,`height`,G(E).height),Y(de,`cx`,G(E).circles[0].cx),Y(de,`cy`,G(E).circles[0].cy),Y(de,`r`,G(E).circles[0].r),Y(pe,`cx`,G(E).circles[1].cx),Y(pe,`cy`,G(E).circles[1].cy),Y(pe,`r`,G(E).circles[1].r),Y(me,`x`,G(E).scale),Y(me,`y`,G(E).scale),Y(me,`width`,G(E).width-2*G(E).scale),Y(me,`height`,G(E).height-2*G(E).scale),Y(me,`stroke-width`,1.5*G(E).scale),Y(me,`rx`,12*G(E).scale),Y(Oe,`x1`,16*G(E).scale),Y(Oe,`x2`,G(E).width-16*G(E).scale),Y(Oe,`y1`,G(oe).outsideStripTop),Y(Oe,`y2`,G(oe).outsideStripTop),Y(Oe,`stroke-width`,G(E).scale),Y(Oe,`stroke-dasharray`,`${4*G(E).scale} ${6*G(E).scale}`)},[()=>mo(G(E),G(ae))]),gi(n,`clientWidth`,e=>L(g,e)),q(e,t)};J(Ue,e=>{G(oe)?e(qe,-1):e(Ke)});var Je=B(Ue,2),Ye=e=>{var t=ns();Ka(z(t),{get id(){return G(Ie).id},get label(){return G(Ie).label},get imageUrl(){return G(Ie).imageUrl},get imageAlt(){return G(Ie).imageAlt},get language(){return G(x)},correctness:`neutral`,ghost:!0}),A(t),V(()=>ci(t,`left: ${G(h).x??``}px; top: ${G(h).y??``}px;`)),q(e,t)};J(Je,e=>{G(Ie)&&G(h)&&e(Ye)}),vi(B(Je,2),e=>u=e,()=>u),A(Le),vi(Le,e=>c=e,()=>c),mr(`focusout`,Le,Ee),q(e,Le),Ge()}hr([`focusout`,`click`]),wi(as,{model:{type:`Object`},session:{type:`Object`},onSessionChange:{}},[],[]);function os(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function ss(e,t){if(e===t)return e;if(!os(e)||!os(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 cs=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}},ls=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 us(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 cs(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=ss(this.#t,e),super.session=e}dispatchSessionChanged(){this.dispatchEvent(new ls(this.tagName.toLowerCase(),this.isComplete()))}}return r}return us(as,{isComplete:Lo})})();