4 lines
6.4 KiB
JavaScript
4 lines
6.4 KiB
JavaScript
var it=Object.defineProperty;var st=(t,e,n)=>e in t?it(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var N=(t,e,n)=>(st(t,typeof e!="symbol"?e+"":e,n),n);import{n as v,r as b,i as M,h as U,j as T,k as rt,l as at}from"./utils-3fb61e8d.js";import{A as ot,d as X,B as ft,C as A,D as Y,E as lt,a as ut,F as ct,G as dt}from"./lifecycle-de4a075a.js";const Z=typeof window<"u";let V=Z?()=>window.performance.now():()=>Date.now(),H=Z?t=>requestAnimationFrame(t):v;const O=new Set;function tt(t){O.forEach(e=>{e.c(t)||(O.delete(e),e.f())}),O.size!==0&&H(tt)}function J(t){let e;return O.size===0&&H(tt),{promise:new Promise(n=>{O.add(e={c:t,f:n})}),abort(){O.delete(e)}}}const B=new Map;let D=0;function _t(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function ht(t,e){const n={stylesheet:ft(e),rules:{}};return B.set(t,n),n}function F(t,e,n,i,l,a,u,s=0){const c=16.666/i;let r=`{
|
|
`;for(let h=0;h<=1;h+=c){const m=e+(n-e)*a(h);r+=h*100+`%{${u(m,1-m)}}
|
|
`}const d=r+`100% {${u(n,1-n)}}
|
|
}`,f=`__svelte_${_t(d)}_${s}`,g=ot(t),{stylesheet:p,rules:o}=B.get(g)||ht(g,t);o[f]||(o[f]=!0,p.insertRule(`@keyframes ${f} ${d}`,p.cssRules.length));const _=t.style.animation||"";return t.style.animation=`${_?`${_}, `:""}${f} ${i}ms linear ${l}ms 1 both`,D+=1,f}function I(t,e){const n=(t.style.animation||"").split(", "),i=n.filter(e?a=>a.indexOf(e)<0:a=>a.indexOf("__svelte")===-1),l=n.length-i.length;l&&(t.style.animation=i.join(", "),D-=l,D||pt())}function pt(){H(()=>{D||(B.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&X(e)}),B.clear())})}const S=[],W=[];let j=[];const G=[],gt=Promise.resolve();let L=!1;function mt(){L||(L=!0,gt.then(et))}function C(t){j.push(t)}function jt(t){G.push(t)}const q=new Set;let E=0;function et(){if(E!==0)return;const t=Y;do{try{for(;E<S.length;){const e=S[E];E++,A(e),$t(e.$$)}}catch(e){throw S.length=0,E=0,e}for(A(null),S.length=0,E=0;W.length;)W.pop()();for(let e=0;e<j.length;e+=1){const n=j[e];q.has(n)||(q.add(n),n())}j.length=0}while(S.length);for(;G.length;)G.pop()();L=!1,q.clear(),A(t)}function $t(t){if(t.fragment!==null){t.update(),b(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(C)}}function yt(t){const e=[],n=[];j.forEach(i=>t.indexOf(i)===-1?e.push(i):n.push(i)),n.forEach(i=>i()),j=e}let P;function K(){return P||(P=Promise.resolve(),P.then(()=>{P=null})),P}function x(t,e,n){t.dispatchEvent(lt(`${e?"intro":"outro"}${n}`))}const z=new Set;let $;function Ct(){$={r:0,c:[],p:$}}function Pt(){$.r||b($.c),$=$.p}function wt(t,e){t&&t.i&&(z.delete(t),t.i(e))}function At(t,e,n,i){if(t&&t.o){if(z.has(t))return;z.add(t),$.c.push(()=>{z.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}const Q={duration:0};function Mt(t,e,n){const i={direction:"in"};let l=e(t,n,i),a=!1,u,s,c=0;function r(){u&&I(t,u)}function d(){const{delay:g=0,duration:p=300,easing:o=U,tick:_=v,css:h}=l||Q;h&&(u=F(t,0,1,p,g,o,h,c++)),_(0,1);const m=V()+g,y=m+p;s&&s.abort(),a=!0,C(()=>x(t,!0,"start")),s=J(w=>{if(a){if(w>=y)return _(1,0),x(t,!0,"end"),r(),a=!1;if(w>=m){const k=o((w-m)/p);_(k,1-k)}}return a})}let f=!1;return{start(){f||(f=!0,I(t),M(l)?(l=l(i),K().then(d)):d())},invalidate(){f=!1},end(){a&&(r(),a=!1)}}}function Rt(t,e,n){const i={direction:"out"};let l=e(t,n,i),a=!0,u;const s=$;s.r+=1;let c;function r(){const{delay:d=0,duration:f=300,easing:g=U,tick:p=v,css:o}=l||Q;o&&(u=F(t,1,0,f,d,g,o));const _=V()+d,h=_+f;C(()=>x(t,!1,"start")),"inert"in t&&(c=t.inert,t.inert=!0),J(m=>{if(a){if(m>=h)return p(0,1),x(t,!1,"end"),--s.r||b(s.c),!1;if(m>=_){const y=g((m-_)/f);p(1-y,y)}}return a})}return M(l)?K().then(()=>{l=l(i),r()}):r(),{end(d){d&&"inert"in t&&(t.inert=c),d&&l.tick&&l.tick(1,0),a&&(u&&I(t,u),a=!1)}}}function zt(t,e,n,i){let a=e(t,n,{direction:"both"}),u=i?0:1,s=null,c=null,r=null,d;function f(){r&&I(t,r)}function g(o,_){const h=o.b-u;return _*=Math.abs(h),{a:u,b:o.b,d:h,duration:_,start:o.start,end:o.start+_,group:o.group}}function p(o){const{delay:_=0,duration:h=300,easing:m=U,tick:y=v,css:w}=a||Q,k={start:V()+_,b:o};o||(k.group=$,$.r+=1),"inert"in t&&(o?d!==void 0&&(t.inert=d):(d=t.inert,t.inert=!0)),s||c?c=k:(w&&(f(),r=F(t,u,o,h,_,m,w)),o&&y(0,1),s=g(k,h),C(()=>x(t,o,"start")),J(R=>{if(c&&R>c.start&&(s=g(c,h),c=null,x(t,s.b,"start"),w&&(f(),r=F(t,u,s.b,s.duration,0,m,a.css))),s){if(R>=s.end)y(u=s.b,1-u),x(t,s.b,"end"),c||(s.b?f():--s.group.r||b(s.group.c)),s=null;else if(R>=s.start){const nt=R-s.start;u=s.a+s.d*m(nt/s.duration),y(u,1-u)}}return!!(s||c)}))}return{run(o){M(a)?K().then(()=>{a=a({direction:o?"in":"out"}),p(o)}):p(o)},end(){f(),s=c=null}}}function Bt(t,e,n){const i=t.$$.props[e];i!==void 0&&(t.$$.bound[i]=n,n(t.$$.ctx[i]))}function Dt(t){t&&t.c()}function Ft(t,e){t&&t.l(e)}function xt(t,e,n){const{fragment:i,after_update:l}=t.$$;i&&i.m(e,n),C(()=>{const a=t.$$.on_mount.map(at).filter(M);t.$$.on_destroy?t.$$.on_destroy.push(...a):b(a),t.$$.on_mount=[]}),l.forEach(C)}function vt(t,e){const n=t.$$;n.fragment!==null&&(yt(n.after_update),b(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function bt(t,e){t.$$.dirty[0]===-1&&(S.push(t),mt(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function It(t,e,n,i,l,a,u=null,s=[-1]){const c=Y;A(t);const r=t.$$={fragment:null,ctx:[],props:a,update:v,not_equal:l,bound:T(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:T(),dirty:s,skip_bound:!1,root:e.target||c.$$.root};u&&u(r.root);let d=!1;if(r.ctx=n?n(t,e.props||{},(f,g,...p)=>{const o=p.length?p[0]:g;return r.ctx&&l(r.ctx[f],r.ctx[f]=o)&&(!r.skip_bound&&r.bound[f]&&r.bound[f](o),d&&bt(t,f)),g}):[],r.update(),d=!0,b(r.before_update),r.fragment=i?i(r.ctx):!1,e.target){if(e.hydrate){ct();const f=ut(e.target);r.fragment&&r.fragment.l(f),f.forEach(X)}else r.fragment&&r.fragment.c();e.intro&&wt(t.$$.fragment),xt(t,e.target,e.anchor),dt(),et()}A(c)}class Nt{constructor(){N(this,"$$");N(this,"$$set")}$destroy(){vt(this,1),this.$destroy=v}$on(e,n){if(!M(n))return v;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const l=i.indexOf(n);l!==-1&&i.splice(l,1)}}$set(e){this.$$set&&!rt(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const kt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(kt);export{Nt as S,At as a,Dt as b,Pt as c,Ft as d,vt as e,W as f,Ct as g,F as h,It as i,I as j,C as k,J as l,xt as m,V as n,Mt as o,Rt as p,et as q,Bt as r,jt as s,wt as t,zt as u};
|