var j=Object.defineProperty;var A=t=>{throw TypeError(t)};var B=(t,e,s)=>e in t?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var S=(t,e,s)=>B(t,typeof e!="symbol"?e+"":e,s),E=(t,e,s)=>e.has(t)||A("Cannot "+s);var n=(t,e,s)=>(E(t,e,"read from private field"),s?s.call(t):e.get(t)),d=(t,e,s)=>e.has(t)?A("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),M=(t,e,s,a)=>(E(t,e,"write to private field"),a?a.call(t,s):e.set(t,s),s);import{aE as D,aL as k,aF as L,as as F,av as R,D as O,k as x,V as T,aK as $,ax as q,b0 as z,aN as I,L as K,o as V,ar as W,v as X,R as G,b1 as H,b2 as J,b3 as v,an as Q,X as h,b4 as N,W as Y,b5 as P,b6 as Z,a9 as ee,u as w,b7 as te,I as se,b8 as ae,b9 as ne,ba as re,bb as ie,aU as oe,bc as ce,P as fe}from"./Dpn8_Hnn.mjs";import{h as le,m as ue,u as he}from"./B4YZClIG.mjs";var u,_,f,b,m,p,g;class _e{constructor(e,s=!0){S(this,"anchor");d(this,u,new Map);d(this,_,new Map);d(this,f,new Map);d(this,b,new Set);d(this,m,!0);d(this,p,e=>{if(n(this,u).has(e)){var s=n(this,u).get(e),a=n(this,_).get(s);if(a)D(a),n(this,b).delete(s);else{var r=n(this,f).get(s);r&&(D(r.effect),n(this,_).set(s,r.effect),n(this,f).delete(s),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),a=r.effect)}for(const[i,o]of n(this,u)){if(n(this,u).delete(i),i===e)break;const c=n(this,f).get(o);c&&(k(c.effect),n(this,f).delete(o))}for(const[i,o]of n(this,_)){if(i===s||n(this,b).has(i))continue;const c=()=>{if(Array.from(n(this,u).values()).includes(i)){var y=document.createDocumentFragment();$(o,y),y.append(F()),n(this,f).set(i,{effect:o,fragment:y})}else k(o);n(this,b).delete(i),n(this,_).delete(i)};n(this,m)||!a?(n(this,b).add(i),L(o,c,!1)):c()}}});d(this,g,e=>{n(this,u).delete(e);const s=Array.from(n(this,u).values());for(const[a,r]of n(this,f))s.includes(a)||(k(r.effect),n(this,f).delete(a))});this.anchor=e,M(this,m,s)}ensure(e,s){var a=O,r=q();if(s&&!n(this,_).has(e)&&!n(this,f).has(e))if(r){var i=document.createDocumentFragment(),o=F();i.append(o),n(this,f).set(e,{effect:R(()=>s(o)),fragment:i})}else n(this,_).set(e,R(()=>s(this.anchor)));if(n(this,u).set(a,e),r){for(const[c,l]of n(this,_))c===e?a.unskip_effect(l):a.skip_effect(l);for(const[c,l]of n(this,f))c===e?a.unskip_effect(l.effect):a.skip_effect(l.effect);a.oncommit(n(this,p)),a.ondiscard(n(this,g))}else x&&(this.anchor=T),n(this,p).call(this,a)}}u=new WeakMap,_=new WeakMap,f=new WeakMap,b=new WeakMap,m=new WeakMap,p=new WeakMap,g=new WeakMap;function Ae(t,e,...s){var a=new _e(t);X(()=>{var i;const r=(i=e())!=null?i:null;a.ensure(r,r&&(o=>r(o,...s)))},G)}function de(t){return(e,...s)=>{var l;var a=t(...s),r;if(x)r=T,V();else{var i=a.render().trim(),o=z(i);r=W(o),e.before(r)}const c=(l=a.setup)==null?void 0:l.call(a,r);I(r,r),typeof c=="function"&&K(c)}}function be(t,e){var s;if(H(),x){const a=(s=window.__svelte)==null?void 0:s.h;if(a!=null&&a.has(t))return a.get(t);J()}return e()}function me(){var t,e;return P===null&&Z(),((e=(t=P).ac)!=null?e:t.ac=new AbortController).signal}function U(t){h===null&&v(),ee&&h.l!==null?C(h).m.push(t):Q(()=>{const e=w(t);if(typeof e=="function")return e})}function pe(t){h===null&&v(),U(()=>()=>w(t))}function ve(t,e,{bubbles:s=!1,cancelable:a=!1}={}){return new CustomEvent(t,{detail:e,bubbles:s,cancelable:a})}function ge(){const t=h;return t===null&&v(),(e,s,a)=>{var i;const r=(i=t.s.$$events)==null?void 0:i[e];if(r){const o=Y(r)?r.slice():[r],c=ve(e,s,a);for(const l of o)l.call(t.x,c);return!c.defaultPrevented}return!0}}function ye(t){h===null&&v(),h.l===null&&N(),C(h).b.push(t)}function ke(t){h===null&&v(),h.l===null&&N(),C(h).a.push(t)}function C(t){var s;var e=t.l;return(s=e.u)!=null?s:e.u={a:[],b:[],m:[]}}const Se=Object.freeze(Object.defineProperty({__proto__:null,afterUpdate:ke,beforeUpdate:ye,createContext:te,createEventDispatcher:ge,createRawSnippet:de,flushSync:se,fork:ae,getAbortSignal:me,getAllContexts:ne,getContext:re,hasContext:ie,hydratable:be,hydrate:le,mount:ue,onDestroy:pe,onMount:U,setContext:oe,settled:ce,tick:fe,unmount:he,untrack:w},Symbol.toStringTag,{value:"Module"}));export{_e as B,pe as a,Ae as b,ge as c,U as o,Se as s};
