| import{h as u,b as c,c as E,d as P,f as V,C as F,H as q,j as d,B as g,p as R,k as H,l as k,m as v,n as x,o as W,t as C,v as I,w as j,x as U,g as $,y as w,z as b,A as z,D as G,E as L,q as J,F as K,G as Q,I as X,J as Z,K as tt,s as et,L as N,M as st,N as it,O as nt,P as A,Q as y,R as rt,S as at,T as ht,U as ot,V as lt,W as ft,X as _t,Y as dt}from"./BYqqIqIr.js";import{a as ut,r as Y,h as m,i as ct,b as pt}from"./XY1_JITN.js";import{c as gt}from"./CEU4_UFD.js";var vt=Q|X|Z;function yt(i,t,e){new mt(i,t,e)}class mt{parent;#s=!1;#e;#g=c?u:null;#n;#_;#r;#i=null;#t=null;#a=null;#h=null;#o=null;#d=0;#l=0;#u=!1;#f=null;#m=gt(()=>(this.#f=et(this.#d),()=>{this.#f=null}));constructor(t,e,n){this.#e=t,this.#n=e,this.#_=n,this.parent=E.b,this.#s=!!this.#n.pending,this.#r=P(()=>{if(E.b=this,c){const s=this.#g;V(),s.nodeType===F&&s.data===q?this.#b():this.#E()}else{var o=this.#v();try{this.#i=d(()=>n(o))}catch(s){this.error(s)}this.#l>0?this.#p():this.#s=!1}return()=>{this.#o?.remove()}},vt),c&&(this.#e=u)}#E(){try{this.#i=d(()=>this.#_(this.#e))}catch(t){this.error(t)}this.#s=!1}#b(){const t=this.#n.pending;t&&(this.#t=d(()=>t(this.#e)),g.enqueue(()=>{var e=this.#v();this.#i=this.#c(()=>(g.ensure(),d(()=>this.#_(e)))),this.#l>0?this.#p():(R(this.#t,()=>{this.#t=null}),this.#s=!1)}))}#v(){var t=this.#e;return this.#s&&(this.#o=H(),this.#e.before(this.#o),t=this.#o),t}is_pending(){return this.#s||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#n.pending}#c(t){var e=E,n=C,o=I;k(this.#r),v(this.#r),x(this.#r.ctx);try{return t()}catch(s){return W(s),null}finally{k(e),v(n),x(o)}}#p(){const t=this.#n.pending;this.#i!==null&&(this.#h=document.createDocumentFragment(),this.#h.append(this.#o),j(this.#i,this.#h)),this.#t===null&&(this.#t=d(()=>t(this.#e)))}#y(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(t);return}this.#l+=t,this.#l===0&&(this.#s=!1,this.#t&&R(this.#t,()=>{this.#t=null}),this.#h&&(this.#e.before(this.#h),this.#h=null))}update_pending_count(t){this.#y(t),this.#d+=t,this.#f&&U(this.#f,this.#d)}get_effect_pending(){return this.#m(),$(this.#f)}error(t){var e=this.#n.onerror;let n=this.#n.failed;if(this.#u||!e&&!n)throw t;this.#i&&(w(this.#i),this.#i=null),this.#t&&(w(this.#t),this.#t=null),this.#a&&(w(this.#a),this.#a=null),c&&(b(this.#g),z(),b(G()));var o=!1,s=!1;const a=()=>{if(o){tt();return}o=!0,s&&K(),g.ensure(),this.#d=0,this.#a!==null&&R(this.#a,()=>{this.#a=null}),this.#s=this.has_pending_snippet(),this.#i=this.#c(()=>(this.#u=!1,d(()=>this.#_(this.#e)))),this.#l>0?this.#p():this.#s=!1};var l=C;try{v(null),s=!0,e?.(t,a),s=!1}catch(f){L(f,this.#r&&this.#r.parent)}finally{v(l)}n&&J(()=>{this.#a=this.#c(()=>{g.ensure(),this.#u=!0;try{return d(()=>{n(this.#e,()=>t,()=>a)})}catch(f){return L(f,this.#r.parent),null}finally{this.#u=!1}})})}}function wt(i,t){var e=t==null?"":typeof t=="object"?t+"":t;e!==(i.__t??=i.nodeValue)&&(i.__t=e,i.nodeValue=e+"")}function Et(i,t){return M(i,t)}function Nt(i,t){N(),t.intro=t.intro??!1;const e=t.target,n=c,o=u;try{for(var s=st(e);s&&(s.nodeType!==F||s.data!==it);)s=nt(s);if(!s)throw A;y(!0),b(s);const a=M(i,{...t,anchor:s});return y(!1),a}catch(a){if(a instanceof Error&&a.message.split(` | |
| `).some(l=>l.startsWith("https://svelte.dev/e/")))throw a;return a!==A&&console.warn("Failed to hydrate: ",a),t.recover===!1&&rt(),N(),at(e),y(!1),Et(i,t)}finally{y(n),b(o)}}const p=new Map;function M(i,{target:t,anchor:e,props:n={},events:o,context:s,intro:a=!0}){N();var l=new Set,f=_=>{for(var h=0;h<_.length;h++){var r=_[h];if(!l.has(r)){l.add(r);var O=ct(r);t.addEventListener(r,m,{passive:O});var S=p.get(r);S===void 0?(document.addEventListener(r,m,{passive:O}),p.set(r,1)):p.set(r,S+1)}}};f(ht(ut)),Y.add(f);var T=void 0,B=ot(()=>{var _=e??t.appendChild(H());return yt(_,{pending:()=>{}},h=>{if(s){lt({});var r=I;r.c=s}if(o&&(n.$$events=o),c&&pt(h,null),T=i(h,n)||{},c&&(E.nodes_end=u,u===null||u.nodeType!==F||u.data!==ft))throw _t(),A;s&&dt()}),()=>{for(var h of l){t.removeEventListener(h,m);var r=p.get(h);--r===0?(document.removeEventListener(h,m),p.delete(h)):p.set(h,r)}Y.delete(f),_!==e&&_.parentNode?.removeChild(_)}});return D.set(T,B),T}let D=new WeakMap;function At(i,t){const e=D.get(i);return e?(D.delete(i),e(t)):Promise.resolve()}export{Nt as h,Et as m,wt as s,At as u}; | |